Confused and frustrated - Help with Menu's Confused and frustrated - Help with Menu's
 

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

Confused and frustrated - Help with Menu's

Started by SRotherham, January 01, 2009, 07:10:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SRotherham

Hello, I'm new to coppermine gallery though I do have some experience with phpBB and such. I'm trying to make a spry menu for the gallery, yet some menu items don't show up (like the my profile) and becuase of the sys menu and sub menu I've had to try and split the menu so its two spry menu's that sit next to each other and look like one. This isn't ideal so I was wondering is it possible to either

A) be able to send the links ( {HOME_TGT} {HOME_LNK} etc to a html template like in phpBB3?

or

B) Eliminate the sub_menu and have all the links work via sys_menu?

I'm sorry if this seems like I'm being rude and/or lazy but I'm on a project deadline for University and need a workable idea in the next few days - I've had a read through the docs but didn't find what I was after, I may have missed something though. I'm  more than grateful for any help anyone may be able to provide?

Gizmo

I'm short on time for complete answer and I'm assuming you already have the menu code in your theme.php. To point the home menu button to an external page replace the {TAGS} as below:

Change:
addbutton($sys_menu_buttons,'{HOME_LNK}','{HOME_TITLE}','{HOME_TGT}','home',$template_sys_menu_spacer);

To:
addbutton($sys_menu_buttons,'Google','Google','http://www.google.com','home',$template_sys_menu_spacer);
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

SRotherham

That wasn't quite what I was after but thank you anyway :D
I managed to do what I needed to do via editing the themes.inc.php file and moving all the sys_menu items to be sub_menu items. And bim bam bosh the spry drop down menu is working.

The only problem is that the

  <!-- BEGIN my_profile -->
        <li><a href="{MY_PROF_TGT}">{MY_PROF_LNK}</a></li>
  <!-- END my_profile -->


doesn't work, this was a problem I've been having for a while now, even before editing the themes.inc.php file. Any idea's why that what be?
Also one other thing, how do I go about creating a switcher (I think thats what they are called) those <!-- BEGIN --> <!-- END -->. I want one so that an entire menu item doesn't display when the user is logged out.

Joachim Müller

Quote from: SRotherham on January 02, 2009, 04:41:36 AM
I managed to do what I needed to do via editing the themes.inc.php file
Never (under no circumstances) edit include/themes.inc.php. Everything that can be accomplished by editing that file can be accomplished as well by editing themes/yourtheme/theme.php

If you need details, post details (link to your gallery, zip attachment of your custom theme).

Gizmo

I posted exactly what you asked for in #1. Not sure why that isn't what you were after. You can change the {HOME_LNK} and {HOME_TITLE} tags to anything you want. Sorry I didn't mention this last night as I was in a hurry, you can also use the custom menu link located in config->themesettings which will add a new link to the menu list. If you edit themes.inc.php then when you upgrade you will lose all your changes so do as Joachim says and make the changes in your theme.php file only. This is located in your theme folder.

Also there is a one question per thread rule in effect in this forum so start a new thread.
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