Advanced search  

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

Pages: [1]   Go Down

Author Topic: add link to host homepage  (Read 23275 times)

0 Members and 1 Guest are viewing this topic.

John A.

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
add link to host homepage
« 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)
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: add link to host homepage
« Reply #1 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
Logged
SANIsoft PHP applications for E Biz

dale

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 41
    • http://club.storm-riders.org
add link to host homepage
« Reply #2 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.
Logged
Im not a complete idiot... Some parts are missing.

John A.

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
re. link to homepage
« Reply #3 on: October 03, 2003, 11:11:43 pm »

Many thanks Dale. It worked perfectly.
John :lol:
Logged

vrviji

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: add link to host homepage
« Reply #4 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
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: add link to host homepage
« Reply #5 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 :)
Logged
SANIsoft PHP applications for E Biz

vrviji

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: add link to host homepage
« Reply #6 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 :)

Logged

ISBB

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 93
    • Northwest ZR2's
Re: add link to host homepage
« Reply #7 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>
Logged
Its gaurunteed.. until it breaks

Lifted trucks are like boob jobs, no matter what size shape or dimension they are always fun to look at.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: add link to host homepage
« Reply #8 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
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 19 queries.