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: Next Question: removing menu items  (Read 5572 times)

0 Members and 1 Guest are viewing this topic.

Walkinman

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 380
    • Skolai Images - Nature, Travel and Adventure stock photos
Next Question: removing menu items
« on: January 07, 2006, 01:05:10 am »

Hey folks,

I know this has been asked, and I've read the docs (and about a hundred threads looking for it), but I don't know how, exactly, to remove the items like "Last uploads", "Last Comments", etc, from the main page. I understand I have to go to theme/sample/theme.php, and find some coding, copy it to the theme.php for my template (water_drop), and "comment it out" .. but I'm not sure exactly how to do this.

Can someone please give me a detailed lesson on how to do this? Exactly what do I need to copy and tase, and then how do I 'comment it out"?

Thank you.

Cheers

Carl
Logged

ecto

  • Supporter
  • Coppermine frequent poster
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 144
    • My very incomplete gallery
Re: Next Question: removing menu items
« Reply #1 on: January 07, 2006, 01:13:54 am »

Sure you have really read the docs? ::)

http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_album_list

Read "The content of the main page".

So if you'd like to remove random and last uploaded from the default "catlist/alblist/random,2/lastup,2" you'd change it to "catlist/alblist"
Logged

Walkinman

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 380
    • Skolai Images - Nature, Travel and Adventure stock photos
Re: Next Question: removing menu items
« Reply #2 on: January 07, 2006, 01:31:28 am »

ello Ecto,

Thanks for your note. Yes, I did read that. That's not what I was asking, sorry if I wasn't clear. What I want to remove is the menu items at the top of the page. This stuff here:

"Album list    Last uploads    Last comments    Most viewed    Top rated"

Eventually I want to tweak the others too, but I figure one thing at a time is more than enough for me.  :)

Thanks.

Cheers

Carl
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Next Question: removing menu items
« Reply #3 on: January 07, 2006, 01:57:37 am »

Read this thread http://forum.coppermine-gallery.net/index.php?topic=25197.0, there is an excellent plug-in attached to one of the posts by donnoman which does this very well.

it's easy to edit to remove the buttons/links you want.

@gaugau, I think this plug-in (final_extract) should be on the mods board and available in the downloads, perhaps with a simple instruction.  It will be widely used and refered to.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Walkinman

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 380
    • Skolai Images - Nature, Travel and Adventure stock photos
Re: Next Question: removing menu items
« Reply #4 on: January 07, 2006, 02:34:02 am »

Hey Casper,

Thanks for your help. I confess, I can't make it work. I wasn't completely sure how to interpret everything on that thred (I read it last night), but after playing with it now, I think I made it work. At first I would get a blank white page, but I think it's working now.

I really appreciate all your help.

Thanks again.

Cheers

Carl
Logged

Walkinman

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 380
    • Skolai Images - Nature, Travel and Adventure stock photos
Re: Next Question: removing menu items
« Reply #5 on: January 07, 2006, 02:40:40 am »

Hey Casper,

I knnow this might count as a 2nd question, but it's really an extension of the first. Can I make it so the remaining menu items, "Home ::   Register ::   Login
My Favorites :: Search"

all appear on one line, with perhaps some more space between them? And how can I change "My Favorites" to "My Lightbox"?

Thanks so much.

Cheers

Carl
Logged

ecto

  • Supporter
  • Coppermine frequent poster
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 144
    • My very incomplete gallery
Re: Next Question: removing menu items
« Reply #6 on: January 07, 2006, 04:33:03 am »

Find this in lang/english.php and edit as you see fit:

Code: [Select]
'fav_lnk' => 'My Favorites',

And to put the menu items om the same line, find {SYS_MENU} and {SUB_MENU} in themes/your_theme/template.html and make sure there are no <br /> between them.. for the classic theme it looks like this:

Code: [Select]
              {SYS_MENU} <br /> {SUB_MENU}
You could change it to this to have it all on one line, notice I added the " :: " just to make it look good.

Code: [Select]
              {SYS_MENU} :: {SUB_MENU}

To edit the space between them, find $template_sys_menu_spacer in themes/your_theme/theme.php and edit as you see fit. For the classic theme it looks like this:

Code: [Select]
  $template_sys_menu_spacer ="::";
If you can't find it in your theme.php file, then go to themes/sample/theme.php and copy all of this to your theme.php file (add it just above "?>" at the end of the file), and then edit $template_sys_menu_spacer.

Code: [Select]
// HTML template for sub_menu
if (!isset($template_sub_menu))  //{THEMES}
$template_sub_menu = $template_sys_menu;

if (!defined('THEME_HAS_NO_SYS_MENU_BUTTONS')) {

  // HTML template for template sys_menu spacer
  if (!isset($template_sys_menu_spacer))  //{THEMES}
  $template_sys_menu_spacer ="::";

  // HTML template for template sys_menu buttons
  if (!isset($template_sys_menu_button))  //{THEMES}
  $template_sys_menu_button = <<<EOT
  <!-- BEGIN {BLOCK_ID} -->
        <a href="{HREF_TGT}" title="{HREF_TITLE}">{HREF_LNK}</a> {SPACER}
  <!-- END {BLOCK_ID} -->
EOT;

  // HTML template for template sys_menu buttons
  if (!isset($sys_menu_buttons)) { //{THEMES}
    // {HREF_LNK}{HREF_TITLE}{HREF_TGT}{BLOCK_ID}{SPACER}
    addbutton($sys_menu_buttons,'{HOME_LNK}','{HOME_TITLE}','{HOME_TGT}','home',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{MY_GAL_LNK}','{MY_GAL_TITLE}','{MY_GAL_TGT}','my_gallery',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{MEMBERLIST_LNK}','{MEMBERLIST_TITLE}','{MEMBERLIST_TGT}','allow_memberlist',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{MY_PROF_LNK}','{MY_PROF_TITLE}','{MY_PROF_TGT}','my_profile',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{ADM_MODE_LNK}','{ADM_MODE_TITLE}','{ADM_MODE_TGT}','enter_admin_mode',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{USR_MODE_LNK}','{USR_MODE_TITLE}','{USR_MODE_TGT}','leave_admin_mode',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{UPL_PIC_LNK}','{UPL_PIC_TITLE}','{UPL_PIC_TGT}','upload_pic',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{REGISTER_LNK}','{REGISTER_TITLE}','{REGISTER_TGT}','register',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{FAQ_LNK}','{FAQ_TITLE}','{FAQ_TGT}','faq',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{LOGIN_LNK}','{LOGIN_TITLE}','{LOGIN_TGT}','login','');
    addbutton($sys_menu_buttons,'{LOGOUT_LNK}','{LOGOUT_TITLE}','{LOGOUT_TGT}','logout','');
    // Login and Logout don't have a spacer as only one is shown, and either would be the last option.
  } //{THEMES}

  $params = array('{BUTTONS}' => assemble_template_buttons($template_sys_menu_button,$sys_menu_buttons));
  $template_sys_menu = template_eval($template_sys_menu,$params);
}
« Last Edit: January 07, 2006, 04:49:11 am by ecto »
Logged

Walkinman

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 380
    • Skolai Images - Nature, Travel and Adventure stock photos
Re: Next Question: removing menu items
« Reply #7 on: January 07, 2006, 08:40:23 am »

Hey Ecto,

Thank you so much. The help here is really extraordinary. I really do appreciate it very much, thanks again. I'm out for the weekend, but I should be able to edit that space when I get back. Until then, everything else (so far!! . ;)) is coming up great.

Thanks again.

Cheers

Carl
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Next Question: removing menu items
« Reply #8 on: January 08, 2006, 03:35:19 pm »

@gaugau, I think this plug-in (final_extract) should be on the mods board and available in the downloads, perhaps with a simple instruction.  It will be widely used and refered to.
Good idea, please start a thread on the mods board that explains everything and contains a link to the plugin.
Imo we should even add the plugin to the cvs, at least for the devel branch.
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Next Question: removing menu items
« Reply #9 on: January 24, 2006, 05:33:53 pm »

I posted a thread in the plugin contributions board for donnoman's final_extract plugin, as a central place to find it, and for further development: http://forum.coppermine-gallery.net/index.php?topic=26893.0

Also, I'm just about to post a FAQ sticky in this board for the "Failed to find block" error, which also describes removing menu items.
« Last Edit: January 24, 2006, 05:47:47 pm by Paver »
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 20 queries.