Rainy Day: Home button Rainy Day: Home button
 

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

Rainy Day: Home button

Started by zillion, December 11, 2004, 07:01:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zillion

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!

Tranz

Instead of deleting posts, it's better to share the solution so that others can learn from you just as you learn from others.

zillion

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.

Casper

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.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

donnoman

[nitpick]

Quote
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]

Joachim Müller

Quote from: donnoman on December 23, 2004, 06:46:49 AM
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

donnoman

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.

Joachim Müller

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