Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Changing the menu item and link.  (Read 7780 times)

0 Members and 1 Guest are viewing this topic.

a-amp

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Changing the menu item and link.
« on: August 17, 2006, 04:47:21 pm »

I have disable user registration and login in my site and I wanted to change My Favourites to a different menu item and point to different link.  What is the easiest way to do that?  Can somebody help?

Thanks,
« Last Edit: August 18, 2006, 07:21:29 pm by GauGau »
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Changing the menu item and link.
« Reply #1 on: August 18, 2006, 12:30:27 am »

It's depends on your theme ...
what is your theme?
Logged
‍I don't answer to PM with support question
Please post your issue to related board

a-amp

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Changing the menu item and link.
« Reply #2 on: August 18, 2006, 01:44:53 am »

Hi,

I am using waterdrop...

Thx
Logged

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Re: Changing the menu item and link.
« Reply #3 on: August 18, 2006, 03:40:35 am »

Copy this code to your theme.php
Code: [Select]
// HTML template for sub menu
$template_sub_menu = <<<EOT
                                       
<!-- BEGIN custom_link -->
             <a href="{CUSTOM_LNK_TGT}" title="{CUSTOM_LNK_TITLE}">{CUSTOM_LNK_LNK}</a>
             <img src="themes/water_drop/images/orange_carret.gif" width="8" height="8" border="0" alt="" />
<!-- END custom_link -->
<!-- BEGIN album_list -->
             <a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a>
             <img src="themes/water_drop/images/orange_carret.gif" width="8" height="8" border="0" alt="" />
<!-- END album_list -->
             <a href="{LASTUP_TGT}" title="{LASTUP_LNK}">{LASTUP_LNK}</a>
             <img src="themes/water_drop/images/orange_carret.gif" width="8" height="8" border="0" alt="" />
             <a href="{LASTCOM_TGT}" title="{LASTCOM_LNK}">{LASTCOM_LNK}</a>
             <img src="themes/water_drop/images/orange_carret.gif" width="8" height="8" border="0" alt="" />
             <a href="{TOPN_TGT}" title="{TOPN_LNK}">{TOPN_LNK}</a>
             <img src="themes/water_drop/images/orange_carret.gif" width="8" height="8" border="0" alt="" />
             <a href="{TOPRATED_TGT}" title="{TOPRATED_LNK}">{TOPRATED_LNK}</a>
             <img src="themes/water_drop/images/orange_carret.gif" width="8" height="8" border="0" alt="" />
             <a href="{FAV_TGT}" title="{FAV_LNK}">{FAV_LNK}</a>
             <img src="themes/water_drop/images/orange_carret.gif" width="8" height="8" border="0" alt="" />
             <a href="{SEARCH_TGT}" title="{SEARCH_LNK}">{SEARCH_LNK}</a>

EOT;

Change this line to suit your needs
Code: [Select]
<a href="{FAV_TGT}" title="{FAV_LNK}">{FAV_LNK}</a>
Such as
Code: [Select]
<a href="http://www.google.com" title="Link to Google">Google</a>
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

a-amp

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Changing the menu item and link.
« Reply #4 on: August 18, 2006, 12:57:53 pm »

Thanks.  It works perfectly!
Logged

Alex53

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Changing the menu item and link.
« Reply #5 on: October 11, 2006, 03:44:21 pm »

Hey I want to add and delete menu items in my theme too but I cant find an equivalent code. My understanding is that its because rainy day uses all the core menu items as defined in coppermine, how can I change it so that I specify which ones I want?
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Changing the menu item and link.
« Reply #6 on: October 11, 2006, 04:10:48 pm »

Either search the board for mod or use final extarct plugin
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Alex53

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Changing the menu item and link.
« Reply #7 on: October 11, 2006, 04:48:22 pm »

thanks for that, worked a treat :)

sorry to come back with another question, but how do I actually add my own menu items? I am using miniCMS and would like to have menu items linking to the pages I create with it such as 'Links', 'About Me', etc.
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Changing the menu item and link.
« Reply #8 on: October 11, 2006, 05:00:14 pm »

Edit template.html and add manually static link to it
Or add your link to theme.php
why don't you use the search feature ... I'm sure you can find many answer to your question ;)
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Alex53

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Changing the menu item and link.
« Reply #9 on: October 13, 2006, 07:27:49 pm »

I have been searching how to add buttons and been trying to do it but it seems particularly hard with the rainy day theme, becuase they arent just test links, they use some gifs to make a button, but not matter what I do the buttons i try to add in theme.php or template.html never appear the properly. Its driving me crazy to be honest. Couldnt anyone show me the syntax for adding one button and where to put the code? All the threads I have found are too vague (for my limited ability)
Logged

Alex53

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Changing the menu item and link.
« Reply #10 on: October 13, 2006, 07:36:03 pm »

I meant text links above not test links.
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Changing the menu item and link.
« Reply #11 on: October 14, 2006, 07:11:57 am »

Under theme.php
Replace this:

Code: [Select]
// HTML template for sys_menu
$template_sys_menu = <<<EOT
  <div class="topmenu">
          <table border="0" cellpadding="0" cellspacing="0">
                  <tr>
  {BUTTONS}
                  </tr>
          </table>
  </div>
EOT;

to :

Code: [Select]
$template_sys_menu = <<<EOT
  <div class="topmenu">
          <table border="0" cellpadding="0" cellspacing="0">
                  <tr>
  {BUTTONS}
  <!-- Begin My_custom_link --><td><img src="images/spacer.gif" alt="" border="0" height="25" width="5"></td>
  <td><img src="themes/rainy_day/images/button1_r1_c1.gif" alt="" border="0" height="25" width="5"></td>
  <td style="background-image: url(themes/rainy_day/images/button1_r1_c2.gif);">
          <a href="#" title="custom link">Custom link</a>
  </td>
  <td><img src="themes/rainy_day/images/button1_r1_c3.gif" alt="" border="0" height="25" width="5"></td>
<!-- End My_custom_link -->
                  </tr>
          </table>
  </div>
EOT;


and just after that you need to add this:

Code: [Select]
// HTML template for sub_menu
$template_sub_menu = <<<EOT
  <div class="topmenu">
          <table border="0" cellpadding="0" cellspacing="0">
                  <tr>
  {BUTTONS}
                  </tr>
          </table>
  </div>
EOT;

this way you'll have custom link on sys menu if you need more button on that menu just copy paste the block between <!-- Begin My_costom_link --> and <!-- End My_costom_link --> and change the link properties
Also you can add link to sub menu this way, Just add those lines after {BUTTONS}
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Alex53

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Changing the menu item and link.
« Reply #12 on: October 15, 2006, 12:00:32 am »

Excellent. Thanks Sami :)
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.