Tried the code given for adding home button but doesn't work still? Tried the code given for adding home button but doesn't work still?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Tried the code given for adding home button but doesn't work still?

Started by momof3kids, April 03, 2005, 06:26:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

momof3kids

hi everyone.  Well, I found several answers to this on the support search, and I replaced the code that was on there with this:
<!-- BEGIN album_list -->
                                       <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
                                       <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" id="buttonleft" alt="" /></td>
                                       <td background="themes/hardwired/images/buttoncenter1.gif">
                                               <a href="http://www.yourpage.com" title="foo bar whatevere">your custom link text</a>
                                       </td>
                                       <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" id="buttonright1" alt="" /></td>
                                       <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
                                       <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" id="buttonleft" alt="" /></td>
                                       <td background="themes/hardwired/images/buttoncenter1.gif">
                                               <a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a>
                                       </td>
                                       <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" id="buttonright1" alt="" /></td>
<!-- END album_list -->
I found that on a ? from someone else, asking to add a home link.  But it didn't work.   This is my page: http://justfortheartofit.com/coppermine/index.php
and I need to link my home page www.haveyourwaywithpaper.com as a 'home' button on the gallery page.  And a Community button too if I could.  Can anyone tell me what I have done wrong? Thanks.

jmc

Hi, Mom!
Your code changes have worked just fine! The problem is, you are looking at the "Rainy Day" theme, and you have made the changes to the "Hardwired" theme. If you switch to Hardwired, it looks ok!
John Mc
I'm trying hard... at least!

momof3kids

Hi, thanks!! I see now.  Can I get the same kind of code for my rainy day?   ???  I copied that code from an answer from a prev. ?  I get so confused on this stuff.  Where can I find a code for a home page for rainy day?  and do you know how to get a code for other buttons, like: community, chat.

Nibbler


<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="/some/path/here">Community</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></td>

momof3kids

Do I replace the whole thing with that code?  Or do I add it?

Nibbler

Add it where you want the button to be, probablt just before or just after your other buttons. You can put anything as the name as they are not real buttons just text on a background.

momof3kids

Hi, well I have buttons on the hardwired theme that says home and community, but when you click it it says oops, .....doesn't take me to that page for my site.  And it still is in the hardwired theme not rainy day.  I'm lost...I dont know what to change to fix it.

Nibbler

To add new buttons in your rainy day theme you need to be modifying themes/rainy_day/theme.php. The link in the code I posted is an example, you need to change it to where you want it to point to.

momof3kids

Okay, I changed it over to rainy day and added that code, this is what I have there now.  Now there is no buttons?
<!-- BEGIN album_list -->
                                        <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="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</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>
<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="/some/path/here">Community</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></td>

<!-- END album_list -->

Nibbler

I can see the community button. It should be after the <!-- END album_list --> though really. To fix the link you change /some/path/here to what you want it to be.

momof3kids

ha ha okay buttons say community and home now, and home is working perfect.  Community clicks you to error page.  This is what i have now.

<!-- BEGIN album_list -->
                                        <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="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</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>

</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></td>

<!-- END album_list -->
<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="http://haveyourwaywithpaper.com">Home</a>
</td>
<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="justfortheartofit.com/phpbb2/index.php">Community</a>
<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></td>
                                        <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="{LASTUP_TGT}">{LASTUP_LNK}</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>
                                        <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="{LASTCOM_TGT}">{LASTCOM_LNK}</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>
                                        <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="{TOPN_TGT}">{TOPN_LNK}</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>
                                        <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="{TOPRATED_TGT}">{TOPRATED_LNK}</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>
                                        <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="{FAV_TGT}">{FAV_LNK}</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>
                                        <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="{SEARCH_TGT}">{SEARCH_LNK}</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>


[code tags added]


momof3kids

Okay!!   ;) I got the links right, anything I can fix on that home button? 

jmc

Hi Mom!
You have repeated this entry:
</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></td>

Cut the second entry from just before the "End Album List" line and paste it back in just after Home</a></td> and the layout should be fixed. Also, the link for the Community button is missing the http:// at the start.
John Mc
I'm trying hard... at least!

momof3kids

It fixed a piece of it, but it still doesn't look right?
<!-- BEGIN album_list -->
                                        <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="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</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>

<!-- END album_list -->
<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="http://haveyourwaywithpaper.com">Home</a></td>
<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="http://justfortheartofit.com/phpbb2/index.php">Community</a>
<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></td>
                                        <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="{LASTUP_TGT}">{LASTUP_LNK}</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>
                                        <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="{LASTCOM_TGT}">{LASTCOM_LNK}</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>
                                        <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="{TOPN_TGT}">{TOPN_LNK}</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>
                                        <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="{TOPRATED_TGT}">{TOPRATED_LNK}</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>
                                        <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="{FAV_TGT}">{FAV_LNK}</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>
                                        <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="{SEARCH_TGT}">{SEARCH_LNK}</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>
EOT;
// HTML template for gallery admin menu
$template_gallery_admin_menu = <<<EOT :

jmc

BTW -
Just to make life a little easier in future, a couple of the CPG themes build their buttons the same way as this. The format is as follows:
<td>a spacer gif first... spaces buttons out... can be squished/stretched as the navbar demands!</td>
<td>the left-hand "cap" on a button image</td>
<td>the repeating background image for the central area of the button,,, coz some text links are bigger than others and the buttons fits itself around your link! this area includes your "a href" link stuff</td>
<td>the right-hand cap for your button</td>


And that is a standard self-expanding button!
Have fun! LOL.
John Mc
I'm trying hard... at least!

jmc

Nearly there...
The bit you just pasted has a couple of problems...
<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>
Remove the red bits.
John Mc
Umm... hang on... they're all over the place... back soon!
I'm trying hard... at least!

jmc

 :-[
Sorry, Mom!
Don't have a clue what all of those /> things are for, but I suspect your problem is actually a double entry at the end of this bit
<a href="http://justfortheartofit.com/phpbb2/index.php">Community</a>
<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></td>

See the double-td bit? Remove one of them. It shouldn't be there anyway!
John Mc
I'm trying hard... at least!

donnoman

I posted a long time ago that will probably answer some questions about what the /> tags are.  Theres other information regarding encoding ampersands, and discussing doctypes in the quoted post.

Quote from: donnoman on November 24, 2004, 08:59:11 AM
...
One thing I wan't to warn other folks about is that the empty tag notation such as <hr /> that
is becoming more popular as XHTML takes hold is that it is NOT meant to replace normal end tags on
every HTML statement. So don't do a search and replace of ">" with " />" on your pages.

This is the best document I've found that explained what the notation is actually used for (One of my AHA! moments).

http://www.cs.tut.fi/~jkorpela/html/empty.html

Basically if normal html tags enclose data they are not an EMPTY tag.

i.e.:

<p> DATA </p>  
<h1> Heading </h1>

Are not empty tags. There's a <begining> content and </ending>

However:

<hr>
<br>

Are EMPTY tags because they don't surround any data.

<IMG src="blank.gif">

Is ALSO an EMPTY Tag because it doesn't surround any data. (it did sneak some in, but INSIDE the tag itself)

Only EMPTY TAGS woulde be written as:

<hr/>
<br/>

<img src="blank.gif"/>


However this notation has confused a lot of browsers so the W3c came out with a recomendation to use whitespace before the end tag
which results in:

<hr />
<br />
<img src="blank.gif" />

Which in turn, causes your pages to not Validate as proper HTML 4.01 Transitional nor 4.01 Strict.
XHTML 1.0 Transitional should work. A lot of other validaton issues with 1.32 code, I expect most of those getting worked out by the dev team for 1.4. (Thanks Guys)
This notation won't validate as XHTML 1.0 Strict. (Not particularly a goal for Coppermine at this point).
...

momof3kids

Well I found the extra td thing, took it out but the home button isn't complete.  Not a full button missing the end ] look. ?? ???