forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: zillion on December 11, 2004, 07:01:01 pm
-
When using the "Classic" Theme, hitting the "Coppermine" logo seems to hyperlink you back to the home page (index.php) no matter where you are. The Rainy Day Theme suits me (except you can't read any error messages when uploading files!), but doesn't seem to have that feature. Can anyone give me a clue as to how I can add a "Home" (or whatever) button onto the menu? I've studied various files, and concluded that the menu I want to add to is "menu2"; but where is it? Any guidance appreciated!!
EDIT:
Ah. Getting somewhere. Found the menu in theme.php
Now all I've got to do is fathom out what the bits in curly brackets are!
-
Instead of deleting posts, it's better to share the solution so that others can learn from you just as you learn from others.
-
Quite true. The solution is simply to find this:
$template_main_menu2 = <<<EOT
<!-- BEGIN album_list -->
and add this in between those two lines.
<td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
<td><img name="button1_r1_c1" src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" id="button1_r1_c1" alt="" /></td>
<td background="themes/rainy_day/images/button1_r1_c2.gif">
<a href="index.php">Home Page</a>
</td>
<td><img name="button1_r1_c3" src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" id="button1_r1_c3" alt="" /></td>
Easy. I don't know how it could have taken me so long digging, delving and - yes - using the SEARCH facility here.
-
The classic theme works in exactly the same way as the others. The 'album list' button/link is not a return to index.php, but a return to the album list of the category you are viewing. But it is easy to change it, or to add a link to return to your index.php, as you have discovered.
-
[nitpick]
id="button1_r1_c3"
Should be removed, ID's are supposed to be UNIQUE names to be used with CSS id "#" selectors. "NAME" fields are also depreciated and should be removed.
If you see two ID's with the same name you know there is a problem. If there's no # selector in the themes style.css or embedded in template.html then the ID can and should be deleted.
[/nitpick]
-
If there's no # selector in the themes style.css or embedded in template.html then the ID can and should be deleted.
Not quite true, JavaScript (using DOM) can access objects using the id as well - removing a unique id you can't find reference to in the css definition can get you into trouble...
Of course you're right that it's mandatory that IDs are unique. The use of the name attribute is deprecated, but sometimes needed for backward compatibility with old browsers (especially when using JavaScript).
Joachim
-
True enough, I was just thinking in terms what a novice user could find. If they new enough about how Java uses ID's and Names, they probably wouldn't have duplicate ID's. 8)
I need to go clean those up in rainy day; they are still in the devel version. I'll check the other core themes while I'm at it.
-
very good - we shouldn't give out code to users that is just wrong, fixing the id issues on the coppermine themes is mandatory. Thanks for doing the needfull.
Joachim