forum.coppermine-gallery.net
Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: Themis on October 17, 2003, 12:53:05 am
-
Hi,
I'm just visiting the demo of CPG.
On the demo, there is at the end of the first page, a row where it is possible to choose the lang et the theme.
I installe the new CPG 1.2, but i don't have a such option row.
Could someone tell me if it is normal, and how to get the same lang and theme row.
Thanks
Themis
-
That is a custom anycontent.php being used
@gaugau - please put that code online somewhere
-
OK, but remember: the code is crappy, it works with our demo - no more guarantees. I will make this into a mod and integrate it into a future version, for now just replace anycontent.php with this:
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery 1.2.0 //
// ------------------------------------------------------------------------- //
// Copyright (C) 2002,2003 Gregory DEMAR <gdemar@wanadoo.fr> //
// http://www.chezgreg.net/coppermine/ //
// ------------------------------------------------------------------------- //
// Updated by the Coppermine Dev Team //
// (http://coppermine.sf.net/team/) //
// see /docs/credits.html for details //
// ------------------------------------------------------------------------- //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// ------------------------------------------------------------------------- //
starttable("100%", "Language & Theme",2);
?>
<tr><td class="tableb">
<?php
print cpg_show_flags();
?>
</td></tr>
<?php
endtable();
function cpg_show_flags()
{
// ------------------------------------------------------------------------- //
// ChooseLanguageByFlag.mod v1.3 for Coppermine Photo Gallery 1.1.0 (final) //
// by GauGau (Joachim Mueller) http://gaugau.de/ //
// ------------------------------------------------------------------------- //
// ---edit below vars--- //
$choice= "list";
//edit this: choose between "flag" (pictures of flags), "list" (dropdown box) and "both"
$number_of_rows=1;
// edit this value: how many rows of flags should be shown (it makes sense to//
// have more than 1 row if you have you coppermine navigation not on top of //
// the page (horizontally) but on the side of the gallery (vertically). //
// Usually (with most themes) this value can be set to 1 //
$border_flag_color = "";
//do you want a border around your flag? Set the color here, leave blank if //
// you don't want a border. Use color codes that css understands, e.g. //
// "#FF0000" or "red". //
// For more details on color codes, check //
// http://www.w3.org/TR/REC-CSS1#color-units/ //
$translate_language = "Sprache/language";
// edit this: translate "Sprache" to the word "language" in your country or //
// whatever text you want to appear in front of the flags/dropdown box //
// Use below arrays to specify which countries should show up. The expression//
// in brackets must be the name of the language file (without the ".php" at //
// the end). The first array specifies the "realname" of the language, the //
// second arry must contain the country code (see the folder /images/flags) //
// and must correspond to the image. Example: if you want the stars and //
// stripes turn up instead of the union jack, use //
// $language_name['english'] = 'English'; $country_code_flag['english'] = 'gb';
$language_name['arabic'] = 'Arabic (العربية)'; $country_code_flag['arabic'] = 'sa';
$language_name['bosnian'] = 'Bosnian (Bosanski)'; $country_code_flag['bosnian'] = 'ba';
$language_name['brazilian_portuguese'] = 'Portuguese [Brazilian]'; $country_code_flag['brazilian_portuguese'] = 'br';
//$language_name['bulgarian'] = 'Bulgarian (Български)'; $country_code_flag['bulgarian'] = 'bg';
$language_name['chinese_big5'] = 'Chinese-Big5 (台灣)'; $country_code_flag['chinese_big5'] = 'tw';
$language_name['chinese_gb'] = 'Chinese-GB2312 (中国)'; $country_code_flag['chinese_gb'] = 'cn';
$language_name['croatian'] = 'Croatian(Hrvatski)'; $country_code_flag['croatian'] = 'hr';
$language_name['czech'] = 'Czech(Česky)'; $country_code_flag['czech'] = 'cz';
$language_name['danish'] = 'Danish (Dansk)'; $country_code_flag['danish'] = 'dk';
$language_name['dutch'] = 'Dutch (Nederlands)'; $country_code_flag['dutch'] = 'nl';
$language_name['english'] = 'English'; $country_code_flag['english'] = 'gb';
//$language_name['estonian'] = 'Estonian'; $country_code_flag['estonian'] = 'ee';
$language_name['finnish'] = 'Finnish (Suomea)'; $country_code_flag['finnish'] = 'fi';
$language_name['french'] = 'French (Français)'; $country_code_flag['french'] = 'fr';
$language_name['german'] = 'German (Deutsch)'; $country_code_flag['german'] = 'de';
$language_name['greek'] = 'Greek (Ελληνικά)'; $country_code_flag['greek'] = 'gr';
$language_name['hebrew'] = 'Hebrew (עברית)'; $country_code_flag['hebrew'] = 'il';
$language_name['hungarian'] = 'Hungarian (Magyarul)'; $country_code_flag['hungarian'] = 'hu';
$language_name['indonesian'] = 'Indonesian (Bahasa Indonesia)'; $country_code_flag['indonesian'] = 'in';
$language_name['italian'] = 'Italian (Italiano)'; $country_code_flag['italian'] = 'it';
//$language_name['japanese'] = 'Japanese (日本語)'; $country_code_flag['japanese'] = 'jp';
$language_name['korean'] = 'Korean (한국어)'; $country_code_flag['korean'] = 'kr';
//$language_name['latvian'] = 'Latvian'; $country_code_flag['latvian'] = 'lv';
$language_name['norwegian'] = 'Norwegian (Norsk)'; $country_code_flag['norwegian'] = 'no';
//$language_name['polish'] = 'Polish (Polski)'; $country_code_flag['polish'] = 'pl';
//$language_name['portugues-utf-8'] = 'Portugues-Brazil (Portugu?s)'; $country_code_flag['portugues-utf-8'] = 'br';
$language_name['portuguese'] = 'Portugues -Portugal (Portugu?s)'; $country_code_flag['portuguese'] = 'pt';
$language_name['russian'] = 'Russian (Русский)'; $country_code_flag['russian'] = 'ru';
$language_name['slovenian'] = 'Slovenian (Slovensko)'; $country_code_flag['slovenian'] = 'si';
$language_name['spanish'] = 'Spanish (Español)'; $country_code_flag['spanish'] = 'es';
$language_name['swedish'] = 'Swedish (Svenska)'; $country_code_flag['swedish'] = 'se';
//$language_name['thai'] = 'Thai (ไทย)'; $country_code_flag['thai'] = 'th';
$language_name['turkish'] = 'Turkish (Türkçe)'; $country_code_flag['turkish'] = 'tr';
$language_name['xxx'] = 'Reset to default language'; $country_code_flag['xxx'] = 'xx';
// ------------------------------------------------------------------------- //
//---------don't edit below this line unless you know hat you're doing-------- //
// ------------------------------------------------------------------------- //
global $CONFIG,$USER;
// get the current language
$cpg_current_language=$CONFIG['lang'];
if($USER['lang']!=""){$cpg_current_language=$USER['lang'];}
if($_GET['lang']!=""){$cpg_current_language=$_GET['lang'];}
//get the url and all vars except $lang
$cpg_current=$_SERVER["SCRIPT_NAME"]."?";
foreach ($_GET as $key => $value) {
if ($key!="lang"){$cpg_current.= $key . "=" . $value . "&";}
}
$cpg_current.="lang=";
//get the url and all vars except $theme
$cpg_theme=$_SERVER["SCRIPT_NAME"]."?";
foreach ($_GET as $key => $value) {
if ($key!="theme"){$cpg_theme.= $key . "=" . $value . "&";}
}
$cpg_theme.="theme=";
//set the border
if ($border_flag_color!="")
{
$flagborder='style="border-width:1px; border-color:'.$border_flag_color.'; margin:0px;"';
}
if($choice=="flag" || $choice=="both")
{ //----------------flags start
$cpg_flags_total=count($language_name);
$cpg_flags_cols=ceil($cpg_flags_total/$number_of_rows);
if ($number_of_rows!=1) {$cpg_flag_return = '<hr />';}
else {$cpg_flag_return = '';}
$cpg_flag_return.= '<span class="winzig">' . $translate_language .':</span>';
if ($number_of_rows!=1) {$cpg_flag_return.='<br />';}else{$cpg_flag_return.='';}
$cpg_flag_return.= '';
$cpg_flags_counter=1;
foreach ($language_name as $key => $value)
{
$cpg_flag_return.= '<img src="images/flags/' . $country_code_flag[$key] . '.gif" width="16" height="10" border="0" alt="" title="' . $value .'" '.$flagborder.' /></a>';
if($cpg_flags_counter==$cpg_flags_cols){$cpg_flag_return.="</tr><tr>";$cpg_flags_counter=0;}
$cpg_flags_counter++;
}
$cpg_flag_return.= '';
} //----------------flags end
if($choice=="list" or $choice=="both")
{ //----------------list start
if ($number_of_rows==1 and $choice=="both"){$cpg_flag_return .='';}
$cpg_flag_return.="<form name=\"choose_language\" action=\"" . $cpg_current . $key. "\" method=\"get\" style=\"margin-top:0px;margin-bottom:0px\"><span class=\"winzig\">";
if ($choice=="list")
{
if ($number_of_rows!=1) {$cpg_flag_return .= '<hr />' . $translate_language .':';}else{$cpg_flag_return.='';}
}
$cpg_flag_return.="Choose a language: <select name=\"lang\" size=\"1\" onchange=\"if (this.options[this.selectedIndex].value) window.location.href='".$cpg_current."' + this.options[this.selectedIndex].value;\">";
foreach ($language_name as $key => $value)
{
$cpg_flag_return.='<option value="' . $key . '"';
if($key==$cpg_current_language){$cpg_flag_return.=' selected';}
$cpg_flag_return.='>' . $value . '</option>';
}
$cpg_flag_return.= '</select></span></td><td class="tableb">';
} //----------------list end
$cpg_flag_return.='<span class="winzig"> Choose a theme: ';
$cpg_flag_return.='<a href="'.$cpg_theme.'default">Default</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'eyeball">Eyeball</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'fruity">Fruity</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'hardwired">Hardwired</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'igames">Igames</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'mac_ox_x">Mac OS X</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'project_vii">Project VII</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'rainy_day">Rainy Day</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'water_drop">Water Drop</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'xxx">Reset theme</a>';
$cpg_flag_return.='</span>';
$cpg_flag_return.='<style type="text/css">
<!--
.winzig {font-size:9px}
-->
</style>';
$cpg_flag_return.="</form>
";
/*
$cpg_flag_return.="<form name=\"choose_theme\" action=\"" . $cpg_theme."&theme=\" method=\"get\" style=\"margin-top:0px;margin-bottom:0px\"><span class=\"winzig\">";
$theme_name['default'] = 'Default';
$theme_name['eyeball'] = 'Eyeball';
$theme_name['fruity'] = 'Fruity';
$theme_name['hardwired'] = 'Hardwired';
$theme_name['igames'] = 'Igames';
$theme_name['mac_ox_x'] = 'Mac OS X';
$theme_name['project_vii'] = 'Project VII';
$theme_name['rainy_day'] = 'Rainy Day';
$theme_name['water drop'] = 'Water Drop';
$cpg_flag_return.="
Choose a theme: <select name=\"theme\" size=\"1\" onchange=\"if (this.options[this.selectedIndex].value) window.location.href='".$cpg_current."' + this.options[this.selectedIndex].value;\">";
foreach ($theme_name as $key => $value)
{
$cpg_flag_return.='<option value="' . $key . '"';
//if($key==$cpg_current_language){$cpg_flag_return.=' selected';}
$cpg_flag_return.='>' . $value . '</option>';
}
$cpg_flag_return.= '</select></span>';
*/
if ($number_of_rows==1){$cpg_flag_return.='<!--foo</td></tr></table>-->';}
$cpg_flag_return.='';
return $cpg_flag_return;
} //--- def function cpg_show_flags end
function cpg_ascii_onoff()
{
$cpg_current=$_SERVER["SCRIPT_NAME"]."?";
foreach ($_GET as $key => $value) {
if ($key=="ascii"){
$ascii_exist=1;
if ($value==1){$value=0;}else{$value=1;}
}
$cpg_current.= $key . "=" . $value . "&";
}
if($ascii_exist!=1){$cpg_current.="ascii=1";}
$cpg_current = rtrim($cpg_current , "&");
return $cpg_current;
}
GauGau
-
Thanks a lot.
Themis
-
Yes gaugau, that code is crappy :)
But like you said no gaurantees, so I thank you, it was most usefull and the problems it has do not affect me.
One thing I noticed: Just for reference:
A prob it has is the language, selecting flag instead of list here:
// ---edit below vars---
$choice= "list";
//edit this: choose between "flag" (pictures of flags), "list" (dropdown box) and "both"
The table not liking "flag" as it makes the "Choose a theme" section bust out of table and sit just above.
Please, If anyone can be bothered to fix this themselves please make it available, it would take me a very long time to fix as I know only vb/asp, and its not something i would use but i find it interesting, no doubt its just a small class or tr problem, but sorting thru php makes my head hurt :)
John
-
Yes gaugau, that code is crappy :)
But like you said no gaurantees, so I thank you, it was most usefull and the problems it has do not affect me.
One thing I noticed: Just for reference:
A prob it has is the language, selecting flag instead of list here:
// ---edit below vars---
$choice= "list";
//edit this: choose between "flag" (pictures of flags), "list" (dropdown box) and "both"
The table not liking "flag" as it makes the "Choose a theme" section bust out of table and sit just above.
Please, If anyone can be bothered to fix this themselves please make it available, it would take me a very long time to fix as I know only vb/asp, and its not something i would use but i find it interesting, no doubt its just a small class or tr problem, but sorting thru php makes my head hurt :)
John
I corrected the code, here you are :)
<?php
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery 1.2.0 //
// ------------------------------------------------------------------------- //
// Copyright (C) 2002,2003 Gregory DEMAR <gdemar@wanadoo.fr> //
// http://www.chezgreg.net/coppermine/ //
// ------------------------------------------------------------------------- //
// Updated by the Coppermine Dev Team //
// see /docs/credits.html for details //
// ------------------------------------------------------------------------- //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// ------------------------------------------------------------------------- //
starttable("100%"); ?>
<tr>
<td class="tableb">
<?php print cpg_show_flags(); ?>
</td>
</tr>
<?php endtable(); ?>
<?php
function cpg_show_flags()
{
// ------------------------------------------------------------------------- //
// ChooseLanguageByFlag.mod v1.3 for Coppermine Photo Gallery 1.1.0 (final) //
// by GauGau (Joachim Mueller) http://gaugau.de/ //
// ------------------------------------------------------------------------- //
// ---edit below vars--- //
$choice= "flag";
//edit this: choose between "flag" (pictures of flags), "list" (dropdown box) "both" or "none"
$theme_choice= "pulldown";
//edit this: choose between "pulldown" (dropdown box), "links" (horisontal list of links) or "none"
$number_of_rows=1;
// edit this value: how many rows of flags should be shown (it makes sense to//
// have more than 1 row if you have you coppermine navigation not on top of //
// the page (horizontally) but on the side of the gallery (vertically). //
// Usually (with most themes) this value can be set to 1 //
$border_flag_color = "#000000";
//do you want a border around your flag? Set the color here, leave blank if //
// you don't want a border. Use color codes that css understands, e.g. //
// "#FF0000" or "red". //
// For more details on color codes, check //
// http://www.w3.org/TR/REC-CSS1#color-units/ //
$translate_language = "Nyelv/language: ";
$select_theme = "Téma/theme: ";
// edit this: translate "Sprache" to the word "language" in your country or //
// whatever text you want to appear in front of the flags/dropdown box //
// Use below arrays to specify which countries should show up. The expression//
// in brackets must be the name of the language file (without the ".php" at //
// the end). The first array specifies the "realname" of the language, the //
// second arry must contain the country code (see the folder /images/flags) //
// and must correspond to the image. Example: if you want the stars and //
// stripes turn up instead of the union jack, use //
// $language_name['english'] = 'English'; $country_code_flag['english'] = 'gb';
$language_name['hungarian'] = 'Hungarian (Magyar)'; $country_code_flag['hungarian']= 'hu';
$language_name['english'] = 'English'; $country_code_flag['english'] = 'gb';
$language_name['german'] = 'German'; $country_code_flag['german'] = 'de';
// ------------------------------------------------------------------------- //
//---------don't edit below this line unless you know hat you're doing-------- //
// ------------------------------------------------------------------------- //
global $CONFIG,$USER;
// get the current language
$cpg_current_language=$CONFIG['lang'];
if($USER['lang']!=""){$cpg_current_language=$USER['lang'];}
if($_GET['lang']!=""){$cpg_current_language=$_GET['lang'];}
$cpg_current_theme=$CONFIG['theme'];
if($USER['theme']!=""){$cpg_current_theme=$USER['theme'];}
if($_GET['theme']!=""){$cpg_current_theme=$_GET['theme'];}
//get the url and all vars except $lang
$cpg_current=$_SERVER["SCRIPT_NAME"]."?";
foreach ($_GET as $key => $value) {
if ($key!="lang"){$cpg_current.= $key . "=" . $value . "&";}
}
$cpg_current.="lang=";
//get the url and all vars except $theme
$cpg_theme=$_SERVER["SCRIPT_NAME"]."?";
foreach ($_GET as $key => $value) {
if ($key!="theme"){$cpg_theme.= $key . "=" . $value . "&";}
}
$cpg_theme.="theme=";
//set the border
if ($border_flag_color!="")
{
$flagborder='style="border-width:1px; border-color:'.$border_flag_color.'; margin:0px;"';
}
if($choice=="flag" || $choice=="both")
{ //----------------flags start
$cpg_flags_total=count($language_name);
$cpg_flags_cols=ceil($cpg_flags_total/$number_of_rows);
$cpg_flag_return='<style type="text/css"><!-- .winzig {font-size:9px} --></style>';
if ($number_of_rows!=1) $cpg_flag_return.= '<hr />';
$cpg_flag_return.= '<span class="winzig">' . $translate_language .'</span>';
if ($number_of_rows!=1) {$cpg_flag_return.='<br />';}else{$cpg_flag_return.='';}
$cpg_flag_return.= '';
$cpg_flags_counter=1;
foreach ($language_name as $key => $value)
{
$cpg_flag_return.= '<a href="' . $cpg_current . $key . '" class="menu"><img src="images/flags/' . $country_code_flag[$key] . '.gif" width="16" height="10" border="0" alt="" title="' . $value .'" '.$flagborder.' /></a>';
if($cpg_flags_counter==$cpg_flags_cols){$cpg_flag_return.="</td><td class='tableb'>";$cpg_flags_counter=0;}
$cpg_flags_counter++;
}
} //----------------flags end
if($choice=="list" or $choice=="both")
{ //----------------list start
if ($number_of_rows==1 and $choice=="both"){$cpg_flag_return .='';}
$cpg_flag_return.="<form name=\"choose_language\" action=\"" . $cpg_current . $key. "\" method=\"get\" style=\"margin-top:0px;margin-bottom:0px\"><span class=\"winzig\">";
if ($choice=="list")
{
if ($number_of_rows!=1) {$cpg_flag_return .= '<hr />' . $translate_language;}else{$cpg_flag_return.='';}
}
$cpg_flag_return.=$translate_language . "<select name=\"lang\" size=\"1\" onchange=\"if (this.options[this.selectedIndex].value) window.location.href='".$cpg_current."' + this.options[this.selectedIndex].value;\">";
foreach ($language_name as $key => $value)
{
$cpg_flag_return.='<option value="' . $key . '"';
if($key==$cpg_current_language){$cpg_flag_return.=' selected';}
$cpg_flag_return.='>' . $value . '</option>';
}
$cpg_flag_return.= '</select></span></td><td class="tableb">';
} //----------------list end
if ($theme_choice== "links")
{ // start links menu
$cpg_flag_return.='<span class="winzig">' .$select_theme;
$cpg_flag_return.='<a href="'.$cpg_theme.'default">Default</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'eyeball">Eyeball</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'fruity">Fruity</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'hardwired">Hardwired</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'igames">Igames</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'mac_ox_x">Mac OS X</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'project_vii">Project VII</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'rainy_day">Rainy Day</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'water_drop">Water Drop</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'xxx">Reset theme</a>';
$cpg_flag_return.='</span>';
$cpg_flag_return.="</form>";
} // end links menu
else if ($theme_choice== "pulldown"){ // start pul-down menu
$cpg_flag_return.="<form name=\"choose_theme\" action=\"" . $cpg_theme."&theme=\" method=\"get\" style=\"margin-top:0px;margin-bottom:0px\"><span class=\"winzig\">";
$theme_name['default'] = 'Default';
$theme_name['eyeball'] = 'Eyeball';
$theme_name['fruity'] = 'Fruity';
$theme_name['hardwired'] = 'Hardwired';
$theme_name['igames'] = 'Igames';
$theme_name['mac_ox_x'] = 'Mac OS X';
$theme_name['project_vii'] = 'Project VII';
$theme_name['rainy_day'] = 'Rainy Day';
$theme_name['water_drop'] = 'Water Drop';
$cpg_flag_return.=$select_theme . "<select name=\"theme\" size=\"1\" onchange=\"if (this.options[this.selectedIndex].value) window.location.href='".$cpg_theme."' + this.options[this.selectedIndex].value;\">";
foreach ($theme_name as $key => $value)
{
$cpg_flag_return.='<option value="' . $key . '"';
if($key==$cpg_current_theme){$cpg_flag_return.=' selected';}
$cpg_flag_return.='>' . $value . '</option>';
}
$cpg_flag_return.= '</select></span>';
} // end pul-down menu
if ($number_of_rows==1){$cpg_flag_return.='<!--foo</td></tr></table>-->';}
$cpg_flag_return.='';
return $cpg_flag_return;
} //--- def function cpg_show_flags end
function cpg_ascii_onoff()
{
$cpg_current=$_SERVER["SCRIPT_NAME"]."?";
foreach ($_GET as $key => $value) {
if ($key=="ascii"){
$ascii_exist=1;
if ($value==1){$value=0;}else{$value=1;}
}
$cpg_current.= $key . "=" . $value . "&";
}
if($ascii_exist!=1){$cpg_current.="ascii=1";}
$cpg_current = rtrim($cpg_current , "&");
return $cpg_current;
}
?>
You can test it:
http://album.carambola.hu/
petardo
-
thanks for that - the language and theme selection has been taken from a mod based on cpg1.1.x and wasn't "adjusted" to work with cpg1.2.0 - I'll do a complete re-coding of the mod and present it (once it's done) on the mod board (and it will hopefully go into the next release as well).
GauGau
-
i just installed coppermine 1.2.0 RC2 and changed anycontent.php, but nothing changed as you can see at www.vilafoto.wz.cz.
What else should I do to let my user change language and theme on the "fly"?
Can anybody help,
Thanx Mayo
-
i just installed coppermine 1.2.0 RC2 and changed anycontent.php, but nothing changed as you can see at www.vilafoto.wz.cz.
What else should I do to let my user change language and theme on the "fly"?
Can anybody help,
Thanx Mayo
You have to configure cpm to display anycontent on the main page.
e. g.: menu config ==> The content of the main page ==> anycontent/catlist/alblist/random,1
petardo
-
that solved my problem. :D i'm happy now
-
Hello Everyone,
I've used "Petardo's" code and all works fine. However I only want to display the flags and not the theme option. :roll:
Can someone please send me the code to display only the flags?
I would really appreciated.
Await your comments...
Thanks, Antonio
-
Hello Everyone,
I've used "Petardo's" code and all works fine. However I only want to display the flags and not the theme option. :roll:
Can someone please send me the code to display only the flags?
I would really appreciated.
Await your comments...
Thanks, Antonio
I made a minor code modification and stored again to http://forum.coppermine-gallery.net/viewtopic.php?p=3534#3534. Update your code, set $theme_choice= "none"; and ready. :)
petardo
-
Hello,
Ive just installed this mod, yet I get this:
Fatal error: Cannot redeclare cpg_show_flags() (previously declared in /home/www/phelumaw/gallery/themes/default/theme.php:1482) in /home/www/phelumaw/gallery/anycontent.php on line 26
-
you have a theme where the old flag mod is already in. Edit your theme and remove the flag stuff (or build a little more complicated statement with if exist if you know some php).
GauGau
-
Petardo,
I have used the anycontent.php in the original as posted by you as you can see here: http://rockyroephotographics.com/gallery but I get these parse errors when using Mozilla 1.5:
Notice: Undefined index: lang in /hsphere/local/home/bandisch/rockyroephotographics.com/gallery/anycontent.php on line 76
Notice: Undefined index: lang in /hsphere/local/home/bandisch/rockyroephotographics.com/gallery/anycontent.php on line 77
Notice: Undefined index: theme in /hsphere/local/home/bandisch/rockyroephotographics.com/gallery/anycontent.php on line 81
at the top of the page four symbols appear that I cannot replicate with this keyboard, two of them are '>>' and one is an upside down question mark.
Once I click on an image other parse errors are shown:
Notice: Undefined variable: lang_picinfo in /hsphere/local/home/bandisch/rockyroephotographics.com/gallery/displayimage.php on line 145
and
Notice: Undefined variable: header in /hsphere/local/home/bandisch/rockyroephotographics.com/gallery/themes/eyeball/theme.php on line 1426
Notice: Undefined variable: template_tab_display in /hsphere/local/home/bandisch/rockyroephotographics.com/gallery/themes/eyeball/theme.php on line 1431
Notice: Undefined variable: lang_thumb_view in /hsphere/local/home/bandisch/rockyroephotographics.com/gallery/themes/eyeball/theme.php on line 1434
Notice: Undefined index: inactive_tab in /hsphere/local/home/bandisch/rockyroephotographics.com/gallery/themes/eyeball/theme.php on line 1435
apart from that everyting seems ot work well!
any ideas?
-
the notices should go away if you turn debug_mode off
GauGau
-
Hi,
I am using petardo's code, and it works well, but I have a question concerning a minor cosmetic change.
I only show the flags, not the themes, which means I have a small empty cell to the right of the flags. I want to centre the flags and remove the small empty cell.
I have tried several edits to the anycontent.php, but all have failed, as I don't really know what I'm doing.
Can anyone help me please.
ps, I have a screenshot, but don't know how to upload it to here
-
you can't upload stuff here; put it on your webspace and just link it here.
GauGau
-
OK, thanks for that. Here is a screenshot which helps explain what I am trying to do;
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.langportrd.f2s.com%2Fimages%2FScreenShot004.jpg&hash=a0909b1f8b66b84e9a02e3a02360714b8840e6ac)
I want to get rid of the small empty cell (where the eggtimer is) and center the flags. I have tried several edits of the anycontent.php, commenting out the themes cell, but all have failed.
-
OK, I have done it. I removed the empty theme cell by commenting out the second cell as below. An end comment out was not neccessary, as one is already in place.
change this
if($cpg_flags_counter==$cpg_flags_cols){$cpg_flag_return.="</td><td class='tableb'>";$cpg_flags_counter=0;}
$cpg_flags_counter++;
}
} //----------------flags end
to this
if($cpg_flags_counter==$cpg_flags_cols){$cpg_flag_return.="</td> <!-- <td class='tableb'>";$cpg_flags_counter=0;}
$cpg_flags_counter++;
} p
} //----------------flags end
to center the flags, amend the following code;
Change this
starttable("100%"); ?>
<tr>
<td class="tableb">
<?php print cpg_show_flags(); ?>
to this
starttable("100%"); ?>
<tr>
<td align="center" class="tableb">
<?php print cpg_show_flags(); ?>
-
and heres the result, much more pleasing;
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.langportrd.f2s.com%2Fimages%2FScreenShot005.jpg&hash=823f0ec16e456d4bb8975d1132ebc6128bfe5d79)
-
oops, double post, sorry :oops:
-
Hello
Just installed this on a test server, sure seems like a uber pc of software
now on to my question
has there been any work done on a mod for this yet?
If not has there been a reworked anycontent.php file made?
as i am a real beginner at this im not sure what to do.
Are there detailed instructions from point a to point z.
this really looks like a wonderful option to have.
-
What do you want, language selection, theme selection, or both?
its easy whichever you want
-
Hello again
yes id like to have both if possble
seems like a good idea to have some language selection
-
I will send you full details by IM.
-
casper: how did you get the little space between the flags ? what tag did you change ?
TIA :D
-
Hi Nirre,
in anycontent, find this code;
foreach ($language_name as $key => $value)
{
$cpg_flag_return.= '<a href="' . $cpg_current . $key . '" class="menu"><img src="images/flags/' . $country_code_flag[$key] . '.gif" width="16" height="10" border="0" alt="" title="' . $value .'" '.$flagborder.' /></a>';
and change it to this;
foreach ($language_name as $key => $value)
{
$cpg_flag_return.= ' <a href="' . $cpg_current . $key . '" class="menu"><img src="images/flags/' . $country_code_flag[$key] . '.gif" width="16" height="10" border="1" alt="" title="' . $value .'" '.$flagborder.' /></a> 
As you can see, I've just added a space (&emsp) before and after each flag, and also a border of 1, which I had set to the same colour as my background.
I have now removed the word 'Language' so just the flags show, and put up slightly bigger flags, which you can see if you visit my site (below).
-
real strange :roll:
when i use the code above the whole anycontent block dissapears ??? :roll:
im a novice at this - sorry
-
Nirre,
You can IM me your anycontent.php, and I'll have a look.
-
Hello Everyone,
I would like to know if you help me with the below. I would like to have the flags to be aligned in the center of the page instead of the left.
(anycontent.php) I've removed the theme selector but when doing so, I get a table line I can't seem to remove at the left.
Presently this is what I have:
http://www.orrego.net/vladimir/works/
How can I add additional links on top of the page?...meaning the grey top border below the title.
Await your comments...and thanking you in advance, Antonio 8)
-
I would like to know if you help me with the below. I would like to have the flags to be aligned in the center of the page instead of the left.
Try this: open file anycontent.php, look for line:
<td class="tableb">
and change it to <td class="tableb" align="center">
How can I add additional links on top of the page?...meaning the grey top border below the title.
Open file "themes/(name of your theme)/template.html", find word "{MAIN_MENU}" and add links next to it.
-
HI,
for part one, look at this thread, where it is explained how to get rid of the empty cell, and to centre the flags; http://forum.coppermine-gallery.net/index.php?topic=621&start=15.
for part 2, you can place extra links by adding them in themes/yourtheme/theme.php. The links are near the top of the page, and you can add / remove as you like.
Please only post one question per thread :wink:
-
Im trying to edit and remove the table border however Im getting a parse error.
The center code is fine.
this my anycontent.php: Please advise me if there is anything wrong..
<?php
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery 1.2.0 //
// ------------------------------------------------------------------------- //
// Copyright (C) 2002,2003 Gregory DEMAR <gdemar@wanadoo.fr> //
// http://www.chezgreg.net/coppermine/ //
// ------------------------------------------------------------------------- //
// Updated by the Coppermine Dev Team //
// see /docs/credits.html for details //
// ------------------------------------------------------------------------- //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// ------------------------------------------------------------------------- //
starttable("100%"); ?>
<tr>
<td class="tableb" align="center">
<?php print cpg_show_flags(); ?>
</td>
</tr>
<?php endtable(); ?>
<?php
function cpg_show_flags()
{
// ------------------------------------------------------------------------- //
// ChooseLanguageByFlag.mod v1.3 for Coppermine Photo Gallery 1.1.0 (final) //
// by GauGau (Joachim Mueller) http://gaugau.de/ //
// ------------------------------------------------------------------------- //
// ---edit below vars--- //
$choice= "flag";
//edit this: choose between "flag" (pictures of flags), "list" (dropdown box) and "both"
$number_of_rows=1;
// edit this value: how many rows of flags should be shown (it makes sense to//
// have more than 1 row if you have you coppermine navigation not on top of //
// the page (horizontally) but on the side of the gallery (vertically). //
// Usually (with most themes) this value can be set to 1 //
$border_flag_color = "#000000";
//do you want a border around your flag? Set the color here, leave blank if //
// you don't want a border. Use color codes that css understands, e.g. //
// "#FF0000" or "red". //
// For more details on color codes, check //
// http://www.w3.org/TR/REC-CSS1#color-units/ //
$translate_language = "Language: ";
$select_theme = "Theme: ";
// edit this: translate "Sprache" to the word "language" in your country or //
// whatever text you want to appear in front of the flags/dropdown box //
// Use below arrays to specify which countries should show up. The expression//
// in brackets must be the name of the language file (without the ".php" at //
// the end). The first array specifies the "realname" of the language, the //
// second arry must contain the country code (see the folder /images/flags) //
// and must correspond to the image. Example: if you want the stars and //
// stripes turn up instead of the union jack, use //
// $language_name['english'] = 'English'; $country_code_flag['english'] = 'gb';
$language_name['spanish'] = 'Castellano (Spanish)'; $country_code_flag['spanish']= 'es';
$language_name['english'] = 'English'; $country_code_flag['english'] = 'gb';
$language_name['french'] = 'Francais (French)'; $country_code_flag['french'] = 'fr';
$language_name['italian'] = 'Italiano'; $country_code_flag['italian'] = 'it';
// ------------------------------------------------------------------------- //
//---------don't edit below this line unless you know hat you're doing-------- //
// ------------------------------------------------------------------------- //
global $CONFIG,$USER;
// get the current language
$cpg_current_language=$CONFIG['lang'];
if($USER['lang']!=""){$cpg_current_language=$USER['lang'];}
if($_GET['lang']!=""){$cpg_current_language=$_GET['lang'];}
$cpg_current_theme=$CONFIG['theme'];
if($USER['theme']!=""){$cpg_current_theme=$USER['theme'];}
if($_GET['theme']!=""){$cpg_current_theme=$_GET['theme'];}
//get the url and all vars except $lang
$cpg_current=$_SERVER["SCRIPT_NAME"]."?";
foreach ($_GET as $key => $value) {
if ($key!="lang"){$cpg_current.= $key . "=" . $value . "&";}
}
$cpg_current.="lang=";
//get the url and all vars except $theme
$cpg_theme=$_SERVER["SCRIPT_NAME"]."?";
foreach ($_GET as $key => $value) {
if ($key!="theme"){$cpg_theme.= $key . "=" . $value . "&";}
}
$cpg_theme.="theme=";
//set the border
if ($border_flag_color!="")
{
$flagborder='style="border-width:1px; border-color:'.$border_flag_color.'; margin:0px;"';
}
if($choice=="flag" || $choice=="both")
{ //----------------flags start
$cpg_flags_total=count($language_name);
$cpg_flags_cols=ceil($cpg_flags_total/$number_of_rows);
$cpg_flag_return='<style type="text/css"><!-- .winzig {font-size:9px} --></style>';
if ($number_of_rows!=1) $cpg_flag_return.= '<hr />';
$cpg_flag_return.= '<span class="winzig">' . $translate_language .'</span>';
if ($number_of_rows!=1) {$cpg_flag_return.='<br />';}else{$cpg_flag_return.='';}
$cpg_flag_return.= '';
$cpg_flags_counter=1;
foreach ($language_name as $key => $value)
{
$cpg_flag_return.= '<a href="' . $cpg_current . $key . '" class="menu"><img src="images/flags/' . $country_code_flag[$key] . '.gif" width="16" height="10" border="0" alt="" title="' . $value .'" '.$flagborder.' /></a>';
if($cpg_flags_counter==$cpg_flags_cols){$cpg_flag_return.="</td> <!-- <td class='tableb'>";$cpg_flags_counter=0;}
$cpg_flags_counter++;
} p
} //----------------flags end
if($choice=="list" or $choice=="both")
{ //----------------list start
if ($number_of_rows==1 and $choice=="both"){$cpg_flag_return .='';}
$cpg_flag_return.="<form name=\"choose_language\" action=\"" . $cpg_current . $key. "\" method=\"get\" style=\"margin-top:0px;margin-bottom:0px\"><span class=\"winzig\">";
if ($choice=="list")
{
if ($number_of_rows!=1) {$cpg_flag_return .= '<hr />' . $translate_language;}else{$cpg_flag_return.='';}
}
$cpg_flag_return.=$translate_language . "<select name=\"lang\" size=\"1\" onchange=\"if (this.options[this.selectedIndex].value) window.location.href='".$cpg_current."' + this.options[this.selectedIndex].value;\">";
foreach ($language_name as $key => $value)
{
$cpg_flag_return.='<option value="' . $key . '"';
if($key==$cpg_current_language){$cpg_flag_return.=' selected';}
$cpg_flag_return.='>' . $value . '</option>';
}
$cpg_flag_return.= '</select></span></td><td class="tableb">';
} //----------------list end
if ($number_of_rows==1){$cpg_flag_return.='<!--foo</td></tr></table>-->';}
$cpg_flag_return.='';
return $cpg_flag_return;
} //--- def function cpg_show_flags end
function cpg_ascii_onoff()
{
$cpg_current=$_SERVER["SCRIPT_NAME"]."?";
foreach ($_GET as $key => $value) {
if ($key=="ascii"){
$ascii_exist=1;
if ($value==1){$value=0;}else{$value=1;}
}
$cpg_current.= $key . "=" . $value . "&";
}
if($ascii_exist!=1){$cpg_current.="ascii=1";}
$cpg_current = rtrim($cpg_current , "&");
return $cpg_current;
}
?>
-
please post the actual message of the parse error, and post a link to your site.
-
Error Message:
Parse error: parse error, unexpected '}' in /home/virtual/site25/fst/var/www/html/vladimir/works/anycontent.php on line 118
I verified this line..and all is ok. I don't see what the problem is.
Link:
http://www.orrego.net/vladimir/works/
-
OK, you have not just commented out the themes, but removed several bits that the code needs (I think). I see you only want flags, no theme choice, and you want them centered. This is the same as I have.
Try the following code, and see if it is what you want.
<?php
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery 1.2.0 //
// ------------------------------------------------------------------------- //
// Copyright (C) 2002,2003 Gregory DEMAR <gdemar@wanadoo.fr> //
// http://www.chezgreg.net/coppermine/ //
// ------------------------------------------------------------------------- //
// Updated by the Coppermine Dev Team //
// see /docs/credits.html for details //
// ------------------------------------------------------------------------- //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// ------------------------------------------------------------------------- //
starttable("100%"); ?>
<tr>
<td class="tableb" align="center">
<?php print cpg_show_flags(); ?>
</td>
</tr>
<?php endtable(); ?>
<?php
function cpg_show_flags()
{
// ------------------------------------------------------------------------- //
// ChooseLanguageByFlag.mod v1.3 for Coppermine Photo Gallery 1.1.0 (final) //
// by GauGau (Joachim Mueller) http://gaugau.de/ //
// ------------------------------------------------------------------------- //
// ---edit below vars--- //
$choice= "flag";
//edit this: choose between "flag" (pictures of flags), "list" (dropdown box) "both" or "none"
$theme_choice= "none";
//edit this: choose between "pulldown" (dropdown box), "links" (horisontal list of links) or "none"
$number_of_rows=1;
// edit this value: how many rows of flags should be shown (it makes sense to//
// have more than 1 row if you have you coppermine navigation not on top of //
// the page (horizontally) but on the side of the gallery (vertically). //
// Usually (with most themes) this value can be set to 1 //
$border_flag_color = "#000000";
//do you want a border around your flag? Set the color here, leave blank if //
// you don't want a border. Use color codes that css understands, e.g. //
// "#FF0000" or "red". //
// For more details on color codes, check //
// http://www.w3.org/TR/REC-CSS1#color-units/ //
$translate_language = "Language: ";
$select_theme = "Theme: ";
// edit this: translate "Sprache" to the word "language" in your country or //
// whatever text you want to appear in front of the flags/dropdown box //
// Use below arrays to specify which countries should show up. The expression//
// in brackets must be the name of the language file (without the ".php" at //
// the end). The first array specifies the "realname" of the language, the //
// second arry must contain the country code (see the folder /images/flags) //
// and must correspond to the image. Example: if you want the stars and //
// stripes turn up instead of the union jack, use //
// $language_name['english'] = 'English'; $country_code_flag['english'] = 'gb';
$language_name['spanish'] = 'Castellano (Spanish)'; $country_code_flag['spanish']= 'es';
$language_name['english'] = 'English'; $country_code_flag['english'] = 'gb';
$language_name['french'] = 'Francais (French)'; $country_code_flag['french'] = 'fr';
$language_name['italian'] = 'Italiano'; $country_code_flag['italian'] = 'it';
// ------------------------------------------------------------------------- //
//---------don't edit below this line unless you know hat you're doing-------- //
// ------------------------------------------------------------------------- //
global $CONFIG,$USER;
// get the current language
$cpg_current_language=$CONFIG['lang'];
if($USER['lang']!=""){$cpg_current_language=$USER['lang'];}
if($_GET['lang']!=""){$cpg_current_language=$_GET['lang'];}
$cpg_current_theme=$CONFIG['theme'];
if($USER['theme']!=""){$cpg_current_theme=$USER['theme'];}
if($_GET['theme']!=""){$cpg_current_theme=$_GET['theme'];}
//get the url and all vars except $lang
$cpg_current=$_SERVER["SCRIPT_NAME"]."?";
foreach ($_GET as $key => $value) {
if ($key!="lang"){$cpg_current.= $key . "=" . $value . "&";}
}
$cpg_current.="lang=";
//get the url and all vars except $theme
$cpg_theme=$_SERVER["SCRIPT_NAME"]."?";
foreach ($_GET as $key => $value) {
if ($key!="theme"){$cpg_theme.= $key . "=" . $value . "&";}
}
$cpg_theme.="theme=";
//set the border
if ($border_flag_color!="")
{
$flagborder='style="border-width:1px; border-color:'.$border_flag_color.'; margin:0px;"';
}
if($choice=="flag" || $choice=="both")
{ //----------------flags start
$cpg_flags_total=count($language_name);
$cpg_flags_cols=ceil($cpg_flags_total/$number_of_rows);
$cpg_flag_return='<style type="text/css"><!-- .winzig {font-size:9px} --></style>';
if ($number_of_rows!=1) $cpg_flag_return.= '<hr />';
$cpg_flag_return.= '<span class="winzig">' . $translate_language .'</span>';
if ($number_of_rows!=1) {$cpg_flag_return.='<br />';}else{$cpg_flag_return.='';}
$cpg_flag_return.= '';
$cpg_flags_counter=1;
foreach ($language_name as $key => $value)
{
$cpg_flag_return.= ' <a href="' . $cpg_current . $key . '" class="menu"><img src="images/flags/' . $country_code_flag[$key] . '.gif" width="24" height="13" border="1" alt="" title="' . $value .'" '.$flagborder.' /></a> 
';
if($cpg_flags_counter==$cpg_flags_cols){$cpg_flag_return.="</td><!--<td class='tableb'>";$cpg_flags_counter=0;}
$cpg_flags_counter++;
}
} //----------------flags end
if($choice=="list" or $choice=="both")
{ //----------------list start
if ($number_of_rows==1 and $choice=="both"){$cpg_flag_return .='';}
$cpg_flag_return.="<form name=\"choose_language\" action=\"" . $cpg_current . $key. "\" method=\"get\" style=\"margin-top:0px;margin-bottom:0px\"><span class=\"winzig\">";
if ($choice=="list")
{
if ($number_of_rows!=1) {$cpg_flag_return .= '<hr />' . $translate_language;}else{$cpg_flag_return.='';}
}
$cpg_flag_return.=$translate_language . "<select name=\"lang\" size=\"1\" onchange=\"if (this.options[this.selectedIndex].value) window.location.href='".$cpg_current."' + this.options[this.selectedIndex].value;\">";
foreach ($language_name as $key => $value)
{
$cpg_flag_return.='<option value="' . $key . '"';
if($key==$cpg_current_language){$cpg_flag_return.=' selected';}
$cpg_flag_return.='>' . $value . '</option>';
}
$cpg_flag_return.= '</select></span></td><td class="tableb">';
} //----------------list end
if ($theme_choice== "links")
{ // start links menu
$cpg_flag_return.='<span class="winzig">' .$select_theme;
$cpg_flag_return.='<a href="'.$cpg_theme.'default">Default</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'blue_tatoo">Blue Tatoo</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'eyeball">Eyeball</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'fruity">Fruity</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'hardwired">Hardwired</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'hsocuk">HSOCUK</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'igames">Igames</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'mac_ox_x">Mac OS X</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'project_vii">Project VII</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'rainy_day">Rainy Day</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'water_drop">Water Drop</a> | ';
$cpg_flag_return.='<a href="'.$cpg_theme.'xxx">Reset theme</a>';
$cpg_flag_return.='</span>';
$cpg_flag_return.="</form>";
} // end links menu
else if ($theme_choice== "pulldown"){ // start pul-down menu
$cpg_flag_return.="<form name=\"choose_theme\" action=\"" . $cpg_theme."&theme=\" method=\"get\" style=\"margin-top:0px;margin-bottom:0px\"><span class=\"winzig\">";
$theme_name['default'] = 'Default';
$cpg_flag_return.=$select_theme . "<select name=\"theme\" size=\"1\" onchange=\"if (this.options[this.selectedIndex].value) window.location.href='".$cpg_theme."' + this.options[this.selectedIndex].value;\">";
foreach ($theme_name as $key => $value)
{
$cpg_flag_return.='<option value="' . $key . '"';
if($key==$cpg_current_theme){$cpg_flag_return.=' selected';}
$cpg_flag_return.='>' . $value . '</option>';
}
$cpg_flag_return.= '</select></span>';
} // end pul-down menu
if ($number_of_rows==1){$cpg_flag_return.='<!--foo</td></tr></table>-->';}
$cpg_flag_return.='';
return $cpg_flag_return;
} //--- def function cpg_show_flags end
function cpg_ascii_onoff()
{
$cpg_current=$_SERVER["SCRIPT_NAME"]."?";
foreach ($_GET as $key => $value) {
if ($key=="ascii"){
$ascii_exist=1;
if ($value==1){$value=0;}else{$value=1;}
}
$cpg_current.= $key . "=" . $value . "&";
}
if($ascii_exist!=1){$cpg_current.="ascii=1";}
$cpg_current = rtrim($cpg_current , "&");
return $cpg_current;
}
?>
This is based on your code for languages.
-
Thank you so much...all works fine now..
-
i didn't understand the hack were users can select there own theme
-
i didn't understand the hack were users can select there own theme
then why don't you reply to the thread you're referring to instead of starting a new thread? I merged your separate posting with this thread.
What exactly doesn't work for you?
GauGau
-
i just installed coppermine 1.2.0 RC2 and changed anycontent.php, but nothing changed as you can see at www.vilafoto.wz.cz.
What else should I do to let my user change language and theme on the "fly"?
Can anybody help,
Thanx Mayo
You have to configure cpm to display anycontent on the main page.
e. g.: menu config ==> The content of the main page ==> anycontent/catlist/alblist/random,1
petardo
Petardo, I have modified the default anycontent.php with the code provided and did the change in the configuration section.
I am running Coppermine 1.2.1_standalone and I'm getting the following error where it's supposed to be the anycontent.php stuff:
Parse error: parse error in /physical/path/to/coppermine/anycontent.php on line 16
Line 16 shows:
starttable("100%"); ?>
...and I can't figure out what's going on... ???
-
Must be
starttable("100%"); ?>GauGau
-
Must bestarttable("100%"); ?>GauGau
Thanks, GauGau...
But, talking about the last (more clear) code posted in this thread, I guess I have to re-format all the code like
starttable("100%"); ?>
<tr>
<td class="tableb">
<?php print cpg_show_flags(); ?>
</td>
</tr>
<?php endtable(); ?>
...to its correspondent ASCII characters like quotes or % sign? :(
Am I right?
-
Replace ( with ( and ) with )
GauGau
-
just to let you know..
I've set up coppermine with the flag code but it didn't work properly on my pc maybe due to the $_SERVER["script_name"] value..
so I've made a change..
//get the url and all vars except $lang
//this is like it was
//$cpg_current=$_SERVER["SCRIPT_NAME"]."?";
//this is the replaced version
$cpg_current=$_SERVER['REQUEST_URI']."?";
now all works fine even on a remote server!
hope this is useful..
bye