differnet flash banner depending on users language differnet flash banner depending on users language
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

differnet flash banner depending on users language

Started by rgloverd, April 01, 2005, 11:23:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rgloverd

Hi,
I want to be able to put a flash menu in the header (this part is easy) But the problem comes is that I want a different flash menu to be displayed when the language of Welsh is chosen and just a standard english one if any other language is choosen, any ideas?
Thanks,
Richard

Nibbler

Use a custom header (see docs), and decide which menu to add based on the value of $CONFIG['lang']

rgloverd


rgloverd

Could you please give me some more detail on how to do this I have looked at the FAQ docs, but I am new to PHP, I am a java coder by trade, any help would be great,
Thanks,
Richard

Nibbler

Look in your theme.php for the theme you wish to modify and find the pageheader function. Then under

'{ADMIN_MENU}' => theme_admin_mode_menu(),

add

'{MY_NEW_HEADER}' => $CONFIG['lang'] == 'welsh' ? 'your welsh banner code' : 'your other banner code'

And then in the corresponding template.html file you add the placeholder tag

{MY_NEW_HEADER}

in the place on the page you wish the header to be displayed.

rgloverd

Thanks for all the help, it now looks really good,

Richard