You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 44 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Adding background image to a module or block... [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
silvrrwulf
Sergeant
Sergeant


Joined: Mar 03, 2003
Posts: 96


PostPosted: Mon Apr 21, 2003 2:00 pm Reply with quoteBack to top

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 Smile.

~SilverWulf
Find all posts by silvrrwulfView user's profileSend private messageSend e-mailVisit poster's website
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Mon Apr 21, 2003 7:01 pm Reply with quoteBack to top

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();
}

$bg_string = <<<_BG_
<div style="background-image:url(images/spectrum2.png);">
Hello World!
</div>
_BG_;

$content = $bg_string;
?>


Here would be another.
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();
}

$content  = "<div style=\"background-image:url(images/spectrum2.png);\">";
$content .= "Hello World!";
$content .= "</div>";
?>

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
tonydg
Nuke Soldier
Nuke Soldier


Joined: Jul 10, 2003
Posts: 32


PostPosted: Mon Aug 11, 2003 6:23 am Reply with quoteBack to top

Raven,

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
Find all posts by tonydgView user's profileSend private message
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Mon Aug 11, 2003 6:37 am Reply with quoteBack to top

Because they are using the content class, you can try to override it with an in-line style syntax.

Something like

<td bgcolor=\"#CCDCFD\" bordercolor=\"#000000\"><font class=\"content\" style=\"background-image:url(images/spectrum2.png);\">

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>

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.193 Seconds - 214 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::