Is there a way to add a background image to a module or block? If so, how do you do it? I've been able to modify the theme.php file to put a bg image in a background, but I've been using dreamweaver to make some HTML pages for new modules I build. I add the BG image in dreamweaver, but it doesn't come up in the site when I upload it. do I have to modify some story section of the theme [php? Thanks in advance .
~SilverWulf
Raven General
Joined: Mar 22, 2003
Posts: 5233
Location: USA
Posted:
Mon Apr 21, 2003 7:01 pm
Here would be one way.
Code:
<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (eregi("block-bgtest.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (eregi("block-bgtest.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
I see what you are saying - but I'm not sure I understand.
This code is at the end of my theme.php file (Using Mtechnik Ultra theme)
I've identified the two lines I want to add a image instead of a color to.
Code:
/************************************************************/
/* Function themesidebox() */
/************************************************************/
function themesidebox($title, $content) {
echo "<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"\" width=\"165\"><tr><td>"
."<table width=\"100%\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\">"
."<tr><td><img src=\"themes/Mtechnik_Ultra/images/bb.png\" width=\"100%\" height=\"15\"></td></tr></table>\n"
."<table border=\"1\" cellpadding=\"3\" cellspacing=\"1\" bgcolor=\"\" width=\"100%\">\n"
/*This changes the color in the top of the side block*/
."<tr><td bgcolor=\"#fffcd9\" align=\"center\" bordercolor=\"#000000\"> <font class=\"content\"><b>$title</b></font></td></tr>\n"
/*This line changes the blocks background color*/
."<tr><td bgcolor=\"#CCDCFD\" bordercolor=\"#000000\"><font class=\"content\">$content</font></td></tr>\n"
."</table></td></tr></table><br><br>\n";
}
Thanks as usual, Tony DG
Raven General
Joined: Mar 22, 2003
Posts: 5233
Location: USA
Posted:
Mon Aug 11, 2003 6:37 am
Because they are using the content class, you can try to override it with an in-line style syntax.
If that doesn't work, try this
<td bgcolor=\"#CCDCFD\" bordercolor=\"#000000\"><font class=\"content\"><span style=\"background-image:url(images/spectrum2.png);\">$content</span>
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum