I have added the language flags token to my homepage using the curves theme and adding the token {LANGUAGE_SELECT_FLAGS} just above {MESSAGE_BLOCK} in the file template.html .
www.RetinaGallery.com
I'd like it to show only on the homepage and not on all subsequent album or category pages clicked.
It seems like the site visitor can choose his or her language once and then use the site without the flags appearing on each page. This would save some space on the top of each page and make the website look cleaner. I appreciate any help with this. Thanks.
I've attached my template.html file.
Thank you and Happy New Year.
Open include/functions.inc.php, find
if ($gallery_pos) {
$template = str_replace('{LANGUAGE_SELECT_FLAGS}', languageSelect('flags'), $template);
}
and replace with
if ($gallery_pos) {
global $CPG_PHP_SELF;
$superCage = Inspekt::makeSuperCage();
if ($CPG_PHP_SELF == 'index.php' && !$superCage->get->keyExists('cat')) {
$template = str_replace('{LANGUAGE_SELECT_FLAGS}', languageSelect('flags'), $template);
}
}
(not tested).
I think this is close.
I upgraded coppermine to 1.5.18 (with some trepidation) and then did the revision you posted.
You can go the site www.RetinaGallery.com
On pages other than the homepage, instead of showing the actual language flags, the website shows the text with brackets:
{LANGUAGE_SELECT_FLAGS}
Oops, use that code:
if ($gallery_pos) {
global $CPG_PHP_SELF;
$superCage = Inspekt::makeSuperCage();
if ($CPG_PHP_SELF == 'index.php' && !$superCage->get->keyExists('cat')) {
$template = str_replace('{LANGUAGE_SELECT_FLAGS}', languageSelect('flags'), $template);
} else {
$template = str_replace('{LANGUAGE_SELECT_FLAGS}','', $template);
}
}
Perfect - thanks. I think my site looks much better now. I appreciate your help.