Hello :)
As mentionned in the title I want to add categories links in the menu.
I read the "Adding Links" topic, but the trick in my case is that I want to use the links of the categories.
Well at this point some might say do it like this:
In /themes/gray_satin/theme.php:
// HTML template for sub_menu
$template_sub_menu = <<<EOT
<span class="topmenu">
<!-- BEGIN custom_link -->
<a href="{CUSTOM_LNK_TGT}" title="{CUSTOM_LNK_TITLE}">{CUSTOM_LNK_LNK}</a><br /><br />
<!-- END custom_link -->
<!-- BEGIN album_list -->
<a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a><br /><br />
<!-- END album_list -->
<!-- BEGIN MODIFICATION HERE : album_submenu -->
<a href="./index.php?cat=2" title="Go To Category 2">Category 2</a><br /><br />
<a href="./index.php?cat=3" title="Go To Category 3">Category 3</a><br /><br />
<a href="./index.php?cat=4" title="Go To Category 4">Category 4</a><br /><br />
<a href="./index.php?cat=5" title="Go To Category 5">Category 5</a><br /><br />
<!-- END MODIFICATION HERE : album_submenu -->
<a href="{LASTUP_TGT}">{LASTUP_LNK}</a><br /><br />
<a href="{LASTCOM_TGT}">{LASTCOM_LNK}</a><br /><br />
<a href="{TOPN_TGT}">{TOPN_LNK}</a><br /><br />
<a href="{TOPRATED_TGT}">{TOPRATED_LNK}</a><br /><br />
<a href="{FAV_TGT}">{FAV_LNK}</a><br /><br />
<a href="{SEARCH_TGT}">{SEARCH_LNK}</a>
</span>
EOT;
BUT, the problem here is that the language is not taken into account :-[
THUS, I want to use if possible these variables : {CATEGORIES_TITLE} {CATEGORIES_LNK} {CATEGORY} {CAT_TITLE}
I don't know which one to use and especially HOW..
I didn't find any answer by searching in the forum and sorry if I missed it.
Could anyone help me? ;D
Thank you!
Replace your hard-coded language with variables. In your case, replace Go To Category
with{$lang_main_menu['go_to_category']}
Then edit your language file(s), e.g. lang/english.php, find$lang_main_menu = array(
and edit the array definition below. Scroll to the end of the array definition, find 'faq_lnk' => 'FAQ',
and add below it (into a new line) 'go_to_category' => 'Go to Category',
. Do a similar thing for all language files that your users will be using.
I was not clear enough (my fault sorry).
In fact, the things I am more interested in is about the links.
I want to replace:
href="./index.php?cat=2"
with something like:
href="{XXX_TGT}"
and I would like this for at least 5 categories.
So that is 5 different links leading each to one specific category.
But I don't know if Coppermine can assign a value (like cat=2; cat=3 etc.) for the variable "{XXX_TGT}".
It seems to be complicated ;D ... so maybe it is not possible :-[
PS: in my previous post, when I was talking about the language I was meaning that when I use the code:
href="./index.php?cat=2"
it is fixed,
so the language is not taken into account like:
href="./index.php?cat=2&lang=french"
or
href="./index.php?cat=2&lang=english"
but I read something on the forum that if we set up Coppermine to Unicode utf-8, Coppermine detects automatically the language used by the computer;
so maybe I just need the link [href="./index.php?cat=2"] because the language will still be the one of the computer and not the one selected by default on Coppermine?
I am not sure to be clear enough again so let just me end with an exemple:
Imagine the user is spanish, but language by default is english. Normally he is supposed to see the website in spanish because Coppermine is set up to "Unicode utf-8"...but this I am not sure ???
When he clicks on the link "Category 2" [href="./index.php?cat=2"]; would he see the page of the category 2 in english or in spanish?
Sorry for all this text, I am sure you have other things to do, but if you can help me I would appreciate it ;D
Thank you! :)
I have no idea what you're talking about.
lol!
Never mind, I'll work it out by myself.
Thanks anyway ;)
Hi !
I also don't understand very well
in my theme.php I have added
<a href="{LINK_TGT}" title="{LINK_TITLE}">{LINK_LNK}</a>
now if I go to the languages pages and add at the end of $lang_main_menu = array
'link_title' => 'LINK: links page',
'link_lnk' => 'LINK',
I don't get it
I also cannot find where to add {LINK_TGT}
thank you for helping
http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616