Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 44
1 members and 43 guests
bescm9ttgamiiyr
Most users ever online was 611, 03-21-2008 at 10:10 PM.
» .::.
» .:.

Go Back   Nukemods Forum > General > Site design

Reply
 
LinkBack Thread Tools Display Modes
would this be possible?
Old
  (#1 (permalink))
Junior Member
 
Status: Offline
Posts: 90
Join Date: Nov 2002
Location: Fort Payne, AL
would this be possible? - 07-16-2003, 12:33 PM

ok i have the advanced downloads block.. v2 i think w/ the featured download listed also

well i want the featured/newest/popular images to show up dif colors for dif themes.

i got it to work. for changing themes. the image changes but thats if they upload featured1/newest1/popular1 to there themes/$themesel/images folder.

now if they don't upload those images to there images folder, i want it to change back to the way it was by using $image_color = "blue/black/or grey";

how would this work?

so far i have this but it dosen't work. any help is appreciated.

(so far i have added this part (below the imagecolor line))
Code:
$image_color = "black"; // Options include grey, black, blue
$default_featured = "images/$image_color/featured1.gif";
$default_newest = "images/$image_color/newest1.gif";
$default_popular = "images/$image_color/popular1.gif";
(function to get the image from the themes folder if exists)
Code:
function featuredimg($gfile) {
        $ThemeSel = get_theme();
        if (file_exists("themes/$ThemeSel/images/$gfile")) {
	$featuredimg = "themes/$ThemeSel/images/$gfile";
        } else {
	$featuredimg = $default_featured; 
        }
        return($featuredimg);
        }
(code to display the image)
Code:
$featuredimg = featuredimg("featured1.gif");
$content .= "<center>
<img src=\"featuredimg\" align=\"center\" border=\"0\">
</center>
";
again it works. if i have the images uploaded to the themes/images folder but not if they don't exist.

any help is appreciated thnx.

EDIT.. That is only code for the featured image. also there for newest/popular just did not show it
 Send a message via ICQ to ShRapNeR Send a message via Yahoo to ShRapNeR Send a message via AIM to ShRapNeR Send a message via MSN to ShRapNeR  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#2 (permalink))
Junior Member
 
Status: Offline
Posts: 90
Join Date: Nov 2002
Location: Fort Payne, AL
07-16-2003, 12:51 PM

ha. nevermind. thnx anyway though

i solved the problem by adding the code

$image_color to the function making it

Code:
function featuredimg($gfile) { 
        $image_color = "black";
        $ThemeSel = get_theme(); 
        if (file_exists("themes/$ThemeSel/images/$gfile")) { 
   $featuredimg = "themes/$ThemeSel/images/$gfile"; 
        } else { 
   $featuredimg = "images/$image_color/featured1.gif"; 
        } 
        return($featuredimg); 
        }
and just commenting out the lines

Code:
$image_color = "black"; // Options include grey, black, blue 
$default_featured = "images/$image_color/featured1.gif"; 
$default_newest = "images/$image_color/newest1.gif"; 
$default_popular = "images/$image_color/popular1.gif";
or deleting them

but now i can have the featured/popular/newest images all three of the colors

thnx anyway though
 Send a message via ICQ to ShRapNeR Send a message via Yahoo to ShRapNeR Send a message via AIM to ShRapNeR Send a message via MSN to ShRapNeR  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





vBulletin Skin developed by: vBStyles.com


LinkBacks Enabled by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31