Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
1 + 7 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
   

Re: to ( CHAPI ) Different image header for every page.
by chapi on 2004/12/28 12:03:05

Didn't thougt about submitting it to the faq yet, since it was an old thread. But I will do this now carnuke!
Re: to ( CHAPI ) Different image header for every page.
by noelmaster on 2004/12/28 11:57:40

Hello, Chapi. I'm now trying this code. Your techniques is nice and will really help me to improve my PHP programming as i am really in a very low level. Sorry for not getting it. This is another way and this is more in a shortened way to solve the problem. Thank you and best regards! Noelmaster of NONE!
Re: to ( CHAPI ) Different image header for every page.
by carnuke on 2004/12/28 11:25:55

chapi, thanks for that clarification. Why don't you submit this as a Q&A on XOOPS FAQ?

Richard
Re: to ( CHAPI ) Different image header for every page.
by chapi on 2004/12/28 11:02:34

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:

<img src="<{$xoops_imageurl}><{$xoops_cmod}>.jpg" alt="" title="" />


$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
Re: Different image header for every page.
by noelmaster on 2004/12/28 10:54:18

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

Who's Online

180 user(s) are online (129 user(s) are browsing Support Forums)


Members: 0


Guests: 180


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits