Changing the menu item and link. Changing the menu item and link.
 

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

Changing the menu item and link.

Started by a-amp, August 17, 2006, 04:47:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

a-amp

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,

Sami

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

a-amp


Gizmo

Copy this code to your theme.php

// 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
<a href="{FAV_TGT}" title="{FAV_LNK}">{FAV_LNK}</a>

Such as
<a href="http://www.google.com" title="Link to Google">Google</a>
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


Alex53

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?

Sami

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

Alex53

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.

Sami

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 ;)
‍I don't answer to PM with support question
Please post your issue to related board

Alex53

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)

Alex53

I meant text links above not test links.

Sami

Under theme.php
Replace this:


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


$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:


// 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}
‍I don't answer to PM with support question
Please post your issue to related board

Alex53