1
noelmaster
Different image header for every page.
  • 2004/12/20 17:19

  • noelmaster

  • Just popping in

  • Posts: 23

  • Since: 2004/10/28


Hello, masters and friends! I need some help. Is it possible to put a different image or logo to the header, i mean if i go to news section i want an image header for it, if i go to the other page it will show only that image header there that i wanted there it should be. Thank you all in advance and Merry Christmas to all Christians and Muslims, Budhist and Pagans!

2
chapi
Re: Different image header for every page.
  • 2004/12/20 19:25

  • chapi

  • Theme Designer

  • Posts: 611

  • Since: 2002/1/22


It is possible to have a different image for each module. Look at this thread for more informations ..

https://xoops.org/modules/newbb/viewtopic.php?topic_id=19532&forum=5&post_id=83900

3
noelmaster
Re: to ( CHAPI ) Different image header for every page.
  • 2004/12/22 15:57

  • noelmaster

  • Just popping in

  • Posts: 23

  • Since: 2004/10/28


Chapi, i appreciate your reply but you have to have more patience to me, sorry for not getting it as my stupidy runs still on my brain and my nerves.
Question:
when i installed XOOPS i have my folder themes where my themes are and it creates a smarty html where i could edit the pages and they are all in the folder template_c. where will i add those codes you provided.
1. in filename.html - in the folder "themes"
2. or in filename.html - in the folder "templates_c"

Here is your code:
<{php}>
$mod = $GLOBALS['xoopsModule'];
$dirname = (isset($mod) ? $mod->getVar('dirname') :'system');
$GLOBALS['xoopsTpl']->assign( 'xoops_cmod', $dirname );
<{/php}>

*Should i change the $dirname and the 'system' ?

Second code:
<{$xoops_cmod}>
*What is this and should i add also this code?

Chapi Thanks for your kindness!

4
windman
Re: Different image header for every page.
  • 2004/12/28 9:23

  • windman

  • Just popping in

  • Posts: 2

  • Since: 2004/12/28


Oh sorry boy! You asked where you can find the city of paris or new york and you've got an answer :"go to planet earth, buy a map and read it!". Sometimes expert does'nt consider the section of Beginner's corner. Guys, be specific! Or else it is really better for you noemaster to have a months of lesson before you install xoops. Goodluck!

5
carnuke
Re: Different image header for every page.
  • 2004/12/28 9:42

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


one way to do this is to use the Theme switcher module It allows each module to have a specific theme automatically. There are other benefits to this module such as keyword and description meta tags for each module.

To use it as you want, you would need to do some changes to the name of the theme you are using, change the header logo and upload it as that different name. Then install the new theme in the usual way. Now you can use theme changer to load this new version of the theme on a specific module achieving the logo change.

6
Anonymous
Re: Different image header for every page.
  • 2004/12/28 9:50

  • Anonymous

  • Posts: 0

  • Since:


I use theme changer and i make different header for each module or section, just dublicate theme folder and rename it then change logo,banner or photos and go to theme changer admin. and select ur theme for what u module want to style it.
u must select z_changeable_theme as default theme from system admin >> Preferences >> General Settings


7
noelmaster
Re: Different image header for every page.
  • 2004/12/28 10:42

  • noelmaster

  • Just popping in

  • Posts: 23

  • Since: 2004/10/28


Hey Guys, thank you very much, i was totally desperated and i was not expecting anymore for any answer, thanks Windman, Carnuke, Mowaffak and also to Chapi. Now i'm playing inside my site over all and over. I've never knew this Theme Changer. It's really Great!

8
carnuke
Re: Different image header for every page.
  • 2004/12/28 10:52

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


Your welcome and thanks for the feedback! As a final comment, I can strongly recommend using XSAS server as a testbed for your online site.

9
noelmaster
Re: Different image header for every page.
  • 2004/12/28 10:54

  • noelmaster

  • Just popping in

  • Posts: 23

  • Since: 2004/10/28


Thanks for the advise Carnuke and thanks to the details Mowaffak!

10
chapi
Re: to ( CHAPI ) Different image header for every page.
  • 2004/12/28 11:02

  • chapi

  • Theme Designer

  • Posts: 611

  • Since: 2002/1/22


Ok, some clarification on the below code snippet. You have to do this in your themes folder in theme.html. The templates_c folder is just compiling the content of the themes folder.

At the very top of your theme.html add this snippet:

Quote:

<{php}>
$mod = $GLOBALS['xoopsModule'];
$dirname = (isset($mod) ? $mod->getVar('dirname') :'system');
$GLOBALS['xoopsTpl']->assign( 'xoops_cmod', $dirname );
<{/php}>


You have to change nothing there. Just copy it as it is.

Quote:

<{$xoops_cmod}>


After that you can access the dirname of your module in your theme.html with the above variable. The dirname for the news module is normally "news". So if you are browsing the news module, the variable $xoops_cmod will contain "news". If you are browsing your profile it will contain "system".

With this you can display different images on each module.

Just try the following snippet:

Quote:




$xoops_imageurl is the path to your themes folder. So you have to create a few images there, one for each of your installed modules and an additional one for the system.

- system.jpg
- news.jpg
- newbb.jpg

.. and so on.

I hope everybody can understand this now

Login

Who's Online

179 user(s) are online (142 user(s) are browsing Support Forums)


Members: 0


Guests: 179


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits