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: How to add another button on the Navbar?  (Read 4292 times)

0 Members and 1 Guest are viewing this topic.

guntherize

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 45
    • Photo Showdown
How to add another button on the Navbar?
« on: August 10, 2010, 10:27:50 pm »

I recently upgraded to 1.5.6 from 1.4.2.   My older version had a customize theme and the addition of a drop down menu to navigate from the coppermine gallery to the phpbb forum. It was built a long time ago and I am no longer in contact with the person who helped me.

Is there a way I add a couple more buttons in the navigation bar?  One to go to my sites front page and one to go to the phpBB3 forum
http://PhotoShowdown.com - Front Page
http://www.photoshowdown.com/main/phpBB3/ - Forum Page

My site is: http://Photoshowdown.com/main/coppermine 
Sign in with test_me as the user and camera as the password

I have approx. 500 members - 50-100 who are regular users.

Logged

grantson

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 35
Re: How to add another button on the Navbar?
« Reply #1 on: August 11, 2010, 09:17:36 pm »

if you look at your theme and look for the following

Code: [Select]
// HTML template for template sys_menu buttons

    // {HREF_LNK}{HREF_TITLE}{HREF_TGT}{BLOCK_ID}{SPACER}{HREF_ATTRIBUTES}
    addbutton($sys_menu_buttons,'{HOME_LNK}','{HOME_TITLE}','{HOME_TGT}','home',$template_sys_menu_spacer);
addbutton($sys_menu_buttons,'Gallery','Gallery','index.php?cat=0','gallery',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{CONTACT_LNK}','{CONTACT_TITLE}','{CONTACT_TGT}','contact',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'About Us','About Magic Mirror','about.php','about',$template_sys_menu_spacer);
addbutton($sys_menu_buttons,'Hire Info','Hire Information','hire.php','hire',$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);
    if (array_key_exists('allowed_albums', $USER_DATA) && is_array($USER_DATA['allowed_albums']) && count($USER_DATA['allowed_albums'])) {
      addbutton($sys_menu_buttons,'{UPL_APP_LNK}','{UPL_APP_TITLE}','{UPL_APP_TGT}','upload_approval',$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,'{SIDEBAR_LNK}','{SIDEBAR_TITLE}','{SIDEBAR_TGT}','sidebar',$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,'{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.

if you dont have it you can get it from the sample theme...
check out the documentation with the ample theme

also im sure there are other pot on the topic as I had a similar issue a few week ago

hope i was able to point you in the right direction at least

:)
Logged

guntherize

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 45
    • Photo Showdown
Re: How to add another button on the Navbar?
« Reply #2 on: August 14, 2010, 05:49:41 am »

I found this in the sample theme, but how do I apply this to the theme that I am using?  I'm a little lost here.
Logged

guntherize

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 45
    • Photo Showdown
Re: How to add another button on the Navbar?
« Reply #3 on: August 14, 2010, 07:43:32 pm »

Here is the theme that I am using, but when you look at the page it has many nav buttons.  How do I add one?

http://photoshowdown.com/main/coppermine/





<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2010 Coppermine Dev Team
  v1.0 originally written by Gregory Demar

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 3
  as published by the Free Software Foundation.

  ********************************************
  Coppermine version: 1.5.6
  $HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.5.x/themes/rainy_day/theme.php $
  $Revision: 7620 $
**********************************************/

// ------------------------------------------------------------------------- //
// This theme has had all redundant CORE items removed                           //
// ------------------------------------------------------------------------- //

define('THEME_HAS_RATING_GRAPHICS', 1);
define('THEME_HAS_PROGRESS_GRAPHICS', 1);

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

// HTML template for template sys_menu buttons
$template_sys_menu_button = <<<EOT
<!-- BEGIN {BLOCK_ID} -->
  <td><img src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
  <td><img src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" alt="" /></td>
  <td style="background-image:url(themes/rainy_day/images/background3_2009.gif)">
          <a href="{HREF_TGT}" title="{HREF_TITLE}">{HREF_LNK}</a>
  </td>
  <td><img src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" alt="" /></td>
<!-- END {BLOCK_ID} -->
EOT;

?>
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: How to add another button on the Navbar?
« Reply #4 on: September 03, 2010, 10:30:51 am »

Please read the documentation and search the board how to add new menu buttons. That has been discussed many many times.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.