forum.coppermine-gallery.net

Support => Older/other versions => cpg1.1.X Support (standalone) => Topic started by: John A. on October 03, 2003, 02:53:50 am

Title: add link to host homepage
Post by: John A. on October 03, 2003, 02:53:50 am
I would like to add a link to my homepage in the main menu bar (am using "Project vii" theme)
I can see this probably involves editing the theme.php file, but it looks very complicated!
Replacing the "Top Rated" or the "Most Viewed" button would be ideal, as I don't need either.
If this is not possible, I could presumably add a link in html at top of the template.html file.

Sincerely John A. (Toronto, Canada)
Title: Re: add link to host homepage
Post by: Tarique Sani on October 03, 2003, 03:47:08 am
Quote from: "John A."
I would like to add a link to my homepage in the main menu bar (am using "Project vii" theme)
I can see this probably involves editing the theme.php file, but it looks very complicated!


Everything is complicated unless you try - go ahead find the menu part in theme.php and edit it.... at the most it will not work - you can always restore it from a backup
BACKUP!!!  :D
Title: add link to host homepage
Post by: dale on October 03, 2003, 08:19:20 am
Here is the code you want to edit in the theme.php file. It is the code for the Top Rated link. Find it soewhere around line 77.

Code: [Select]

<td class="top_menu_bttn">
<a href="{TOPRATED_TGT}" onMouseOver="MM_showHideLayers('Menu1','','hide')">{TOPRATED_LNK}</a>
</td>


You can change it to something like this:
Code: [Select]

<td class="top_menu_bttn">
<a href="http://Your homepage address.com" onMouseOver="MM_showHideLayers('Menu1','','hide')">Back to home</a>
</td>


You can either replace the code or add it after. I havent edited this theme  before, but this should work fine.

Like tarique says. keep a backup and give it a try.
Title: re. link to homepage
Post by: John A. on October 03, 2003, 11:11:43 pm
Many thanks Dale. It worked perfectly.
John :lol:
Title: Re: add link to host homepage
Post by: vrviji on June 15, 2004, 01:35:02 pm
Hi, Hope someone can help me with this.

This is along the same lines as the question above  - but instead of switching one of the buttons to point at my home page - how can I make the Name of the whole page ( which is now showing  " mydomain.com " on the top left side of the screen become a clickable link to my domain ? That way, the logical place is linked to my home page.

Is this also in the theme.php file ? And if so, if I use Rainy Day Theme - do I go into that directory to edit it , or is there a master theme.php which I have to edit ?

And now to show all of you that I am really new at this - can I edit a .php file with frontpage ? I have only edited .html before.

Thanks,

Viji
Title: Re: add link to host homepage
Post by: Tarique Sani on June 15, 2004, 01:54:28 pm
Search for {GAL_NAME} in the template.html of your theme and place a link around it :)
Title: Re: add link to host homepage
Post by: vrviji on June 15, 2004, 02:12:20 pm
How incredibly excellent ! I just did it - and it worked first go ! (If you know how new I am to this html thing - you too would be surprised)

Thanks alot buddy !

A Very Very Happy Coppermine User !

Viji Rajasundram :)

Title: Re: add link to host homepage
Post by: ISBB on May 24, 2005, 03:34:07 am
this was a old topic but heres the code that i added to mine to get it to work for other coppermine users.. :D

Code: [Select]
// HTML template for main menu
$template_main_menu = <<<EOT
                <span class="topmenu">
<table width=0 height=0 border=0 cellspacing=1 cellpadding=0><tr>
<!-- BEGIN Home_link -->
                        <td><a href="/index.php" title="Home">Forums</a></td><td><img src="/theme_globals/vdiv.gif" border=0 alt=""></td>
<!-- END Home_link -->
<!-- BEGIN album_list -->
                        <td><a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a></td><td><img src="/theme_globals/vdiv.gif" border=0 alt=""></td>
<!-- END album_list -->
<!-- BEGIN my_gallery -->
                        <td><a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}">{MY_GAL_LNK}</a></td><td><img src="/theme_globals/vdiv.gif" border=0 alt=""></td>
<!-- END my_gallery -->
<!-- BEGIN allow_memberlist -->
                        <td><a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}">{MEMBERLIST_LNK}</a></td><td><img src="/theme_globals/vdiv.gif" border=0 alt=""></td>
<!-- END allow_memberlist -->
<!-- BEGIN my_profile -->
                        <td><a href="{MY_PROF_TGT}">{MY_PROF_LNK}</a> ::
<!-- END my_profile -->
<!-- BEGIN faq -->
                        <td><a href="{FAQ_TGT}" title="{FAQ_TITLE}">{FAQ_LNK}</a></td><td><img src="/theme_globals/vdiv.gif" border=0 alt=""></td>
<!-- END faq -->
<!-- BEGIN enter_admin_mode -->
                        <td><a href="{ADM_MODE_TGT}" title="{ADM_MODE_TITLE}">{ADM_MODE_LNK}</a></td><td><img src="/theme_globals/vdiv.gif" border=0 alt=""></td>
<!-- END enter_admin_mode -->
<!-- BEGIN leave_admin_mode -->
                        <td><a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}">{USR_MODE_LNK}</a></td><td><img src="/theme_globals/vdiv.gif" border=0 alt=""></td>
<!-- END leave_admin_mode -->
<!-- BEGIN upload_pic -->
                        <td><a href="{UPL_PIC_TGT}" title="{UPL_PIC_TITLE}">{UPL_PIC_LNK}</a></td><td><img src="/theme_globals/vdiv.gif" border=0 alt=""></td>
<!-- END upload_pic -->
<!-- BEGIN register -->
                        <td><a href="{REGISTER_TGT}" title="{REGISTER_TITLE}">{REGISTER_LNK}</a></td><td><img src="/theme_globals/vdiv.gif" border=0 alt=""></td>
<!-- END register -->
<!-- BEGIN login -->
                        <td><a href="{LOGIN_TGT}">{LOGIN_LNK}</a></td><td><img src="/theme_globals/vdiv.gif" border=0 alt=""></td>
<!-- END login -->
<!-- BEGIN logout -->
                        <td><a href="{LOGOUT_TGT}">{LOGOUT_LNK}</a></td><td><img src="/theme_globals/vdiv.gif" border=0 alt=""></td>
<!-- END logout -->
                        <td><a href="{LASTUP_TGT}">{LASTUP_LNK}</a></td><td><img src="/theme_globals/vdiv.gif" border=0 alt=""></td>
                        <td><a href="{LASTCOM_TGT}">{LASTCOM_LNK}</a></td><td><img src="/theme_globals/vdiv.gif" border=0 alt=""></td>
                        <td><a href="{TOPN_TGT}">{TOPN_LNK}</a></td><td><img src="/theme_globals/vdiv.gif" border=0 alt=""></td>
                        <td><a href="{TOPRATED_TGT}">{TOPRATED_LNK}</a></td><td><img src="/theme_globals/vdiv.gif" border=0 alt=""></td>
                        <td><a href="{FAV_TGT}">{FAV_LNK}</a></td><td><img src="/theme_globals/vdiv.gif" border=0 alt=""></td>
                        <td><a href="{SEARCH_TGT}">{SEARCH_LNK}</a></td>
</tr></table>
                </span>
Title: Re: add link to host homepage
Post by: Joachim Müller on May 24, 2005, 07:16:01 am
you're posting on the support forums for version 1.1 of coppermine, where the theme engine differed very much from what we have now. Your contribution is from cpg1.3.x or better and will definitely not work for users who still run cpg1.1.x, so it shouldn't have been posted here in the first place. All who still run cpg1.1.x are strongly encouraged to upgrade and should not use above code (although it was of course published with the willingness to help in mind, not to break anybody's site; I appreciate ISBB's readiness to contribute).

Joachim