|
» .::. |
Web Hosting - web hosting, dedicated servers and web design services
|
Online Degree - search for 1000+ online degrees, online colleges & online universities.
|
tattoo - we are a group of tattoo enthusiasts
|
Gexa Energy - your absolute best choice in electric service
|
|
|
buy Rimonabant - Help dieters achieve significant weight loss without having to slog in the gym
|
|
|
|
|
About this Page This is a discussion on Theme Specific download / weblink / images? within the Purged Topics forums, part of the NM Staff category; Is there a way to have the download / web links / forum / (maybe other modules) to have a different image displayed ... |
|
 |
|
 |
|
 |

02-20-2003, 03:38 PM
|
|
Junior Member
|
|
Join Date: Feb 2003
Posts: 2
|
|
|
Theme Specific download / weblink / images?
Is there a way to have the download / web links / forum / (maybe other modules) to have a different image displayed depending on what theme is selected?
With out having to over write the current images.
If i was going with a single theme site i would just overwrite the current / default images to what goes with the theme. Setting up about 4 or 5 themes & want different module images for each.
I know the themes i have from nukemods.com come with download / web link images & could not figure out how to make them work without overwriting.
Seeking help for this. :-)
__________________
WebKnight-
|

02-20-2003, 06:13 PM
|
|
Junior Member
|
|
Join Date: Jan 2003
Location: England
Posts: 71
|
|
Some theme packs come with extra graphics that can be used if desired to overwrite the original 1s. Obviously make sure that you want to use these graphics before you overwrite them, and Always back up any files you overwrite 1st.
You can always make your own graphics to suit your own tastes, thus giving you more satisfaction after knowing that you made your own
If you want to know how to change those images, right click on the text image and follow the correct directory paths for each 1, and upload them to your site, hitting F5 to refresh your page to see the results. 
|

02-20-2003, 06:58 PM
|
|
Senior Member
|
|
Join Date: Oct 2002
Location: Alabama, USA
Posts: 619
|
|
|
You don't have to overwrite them, just rename them to something else (like the theme name, so it will be easy to find them later). Then upload your new image/s.
And not related to the subject, but allmost, Also notice that the your_account images are located in "themes/your_theme/images/menu" folder and change automatically for each theme. If you ever get a theme that uses the default your_account images (located in the "modules/your_account/images" folder) it is because the folder "menu" is missing from themes/your_theme/images/menu
|

02-20-2003, 09:47 PM
|
|
Senior Member
|
|
Join Date: Sep 2002
Posts: 2,905
|
|
To the topic at hand. No there is no way to have the default images for Downloads and Weblinks change with the theme selection. At least not yet. :?
I have tried looking at the code a little, but the couple of methods I tried, in order to get those images to change, did not work. It should be possible though.
I am going to look at the code for the "menu" directory in the themes images folder, why that works and how I can apply THAT same method to the downloads and weblinks images...
Cause the same thing works for Webmail. IF you make a "webmail" folder in your themes images directory, then the theme will change to the images you have in there when viewing the Webmail page.
So in reality, we should be able to make a downloads and weblinks folder in the themes/images folder and apply that code to the index files for the downloads and weblinks and VIOLA!.
I'll give it a shot...
mikem
mikem
|

02-21-2003, 09:51 AM
|
|
Moderator
|
|
Join Date: Nov 2002
Location: Belgium
Posts: 957
|
|
I'm sorry to say it but I already fixed that for nuke 6.0 and think it's the same for 6.5, you guys here asked me if you could include it with your theme packs and I answered yes.
So you can get it here
Bye,
Mighty_Y
|

02-21-2003, 10:01 AM
|
|
Senior Member
|
|
Join Date: Sep 2002
Posts: 2,905
|
|
|
Thanks Mighty. I'll get ti and try to include it with our packs...
I knew you would be on top of it :-)
mikem
|

02-21-2003, 10:22 AM
|
|
Senior Member
|
|
Join Date: Oct 2002
Location: Alabama, USA
Posts: 619
|
|
|
Just a question for Mighty_Y: If you use this mod and you don't have an image in your theme's images folder, does the default image then show up (ie- like it does for your account images)? And even if it does not it's still a great mod!!! Thanks!
|

02-21-2003, 10:33 AM
|
|
Senior Member
|
|
Join Date: Sep 2002
Posts: 2,905
|
|
|
I can answer that Martin..No it does not. You would HAVE to have the respective image in your themes/Your Theme/images folder all the time or it would result in a broken image.
That is What I was trying for, Having the Weblinks and Downloads modules look to the themes images folder for their image first then if it's not there, use the original one in the Downloads/images folder.
Still possible. I just have to look at the code a little more.
mikem
|

02-21-2003, 11:03 AM
|
|
Senior Member
|
|
Join Date: Sep 2002
Posts: 2,905
|
|
|
Holy Canolies, I got it to work. I have successfullly incorporated code into the Download and Weblink modules so they will look to the Themes images folder for their image first, If it is not there then they will use their original images.
Martin you want to test it out for me?
mikem
|

02-21-2003, 11:23 AM
|
|
Senior Member
|
|
Join Date: Sep 2002
Posts: 2,905
|
|
Ok If anyone wants to try it..here it is.
For the Downloads module
Open modules/Downloads/index.php
find
|
Code:
|
global $prefix, $dbi, $user_adddownload, $module_name; |
change it to
|
Code:
|
global $prefix, $dbi, $user_adddownload, $module_name, $ThemeSel; |
then change this
|
Code:
|
echo "
<center><a href=\"modules.php?name=$module_name\"><img src=\"modules/$module_name/images/down-logo.gif\" border=\"0\" alt=\"\"></a>
"; |
to this
|
Code:
|
if (file_exists("themes/$ThemeSel/images/down-logo.gif")) {
echo "
<center><a href=\"modules.php?name=$module_name\"><img src=\"themes/$ThemeSel/images/down-logo.gif\" border=\"0\" alt=\"Downloads\"></a>
";
} else {
echo "
<center><a href=\"modules.php?name=$module_name\"><img src=\"modules/$module_name/images/down-logo.gif\" border=\"0\" alt=\"Downloads\"></a>
";
} |
For the Weblinks Module
open modules/WebLinks/index.php
find and change this
|
Code:
|
global $module_name; |
to this
|
Code:
|
global $module_name, $ThemeSel; |
and then change this
|
Code:
|
echo "
<center><a href=\"modules.php?name=Web_Links\"><img src=\"modules/$module_name/images/web.gif\" border=\"0\" alt=\"\"></a>
"; |
to this
|
Code:
|
if (file_exists("themes/$ThemeSel/images/web.gif")) {
echo "
<center><a href=\"modules.php?name=$module_name\"><img src=\"themes/$ThemeSel/images/web.gif\" border=\"0\" alt=\"Weblinks\"></a>
";
} else {
echo "
<center><a href=\"modules.php?name=$module_name\"><img src=\"modules/$module_name/images/web.gif\" border=\"0\" alt=\"Weblinks\"></a>
";
} |
mikem
|
 |
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|