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: Remove login menu option when bridged to Joomla!  (Read 4423 times)

0 Members and 1 Guest are viewing this topic.

Necula

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Remove login menu option when bridged to Joomla!
« on: January 08, 2006, 10:16:36 pm »

I've got Coppermine bridged with Joomla! using the mabo bridging component and it all seems to be working correctly.  Howevere since it's bridged I'm trying to eliminate the amount of login / logout options.  Since my users login from the main Joomla front page, I want to remove the login / logout option that is part of cpg, as the user details are passed from joomla.

I'm using the Water Drop theme and when I look at theme.php or template.html I can't see anything to comment out.

Is this easy or possible to do?

Many thanks.
« Last Edit: January 10, 2006, 08:30:10 am by GauGau »
Logged

Necula

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Remove login menu option when bridged to Joomla!
« Reply #1 on: January 08, 2006, 10:33:20 pm »

I've just tried using the plugin that was supplied in a previous post but that doesn't seem to work for me..
Logged

Necula

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Remove login menu option when bridged to Joomla!
« Reply #2 on: January 08, 2006, 10:47:29 pm »

Tried copying certain sections from sample.php and keep getting:

Fatal error: Call to undefined function: addbutton() in /home/sites/hemelwargaming.com/public_html/cpg143/themes/water_drop/theme.php on line 54
Logged

ecto

  • Supporter
  • Coppermine frequent poster
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 144
    • My very incomplete gallery
Re: Remove login menu option when bridged to Joomla!
« Reply #3 on: January 08, 2006, 11:21:11 pm »

Copy the function addbutton() from the sample theme.php to your theme.php.

I guess you were referring to this thread when you mentioned the plugin. If you had read the whole thread you would have gotten your answer, or if you had searched the forum. Please do so next time.
Logged

Necula

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Remove login menu option when bridged to Joomla!
« Reply #4 on: January 09, 2006, 01:39:27 am »

I had read the whole thread AND searched the forum but did not quite understand the solutions proposed.  One minute the solution was editing files, next it was a plugin.  I was hoping someone helpful could give a definitive answer and say which bits you need to copy, comment out or whether the plugin can be used as in or needs modifying.
Logged

ecto

  • Supporter
  • Coppermine frequent poster
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 144
    • My very incomplete gallery
Re: Remove login menu option when bridged to Joomla!
« Reply #5 on: January 09, 2006, 01:59:47 am »

I'm sorry to say that I don't know why the plugin doesn't work for you. You should post about it in the thread dealing with the plugin to see if it can be solved, as using a plugin is a lot better than modifying the PHP files.

The query I replied to was about the call to an undefined function. A vary straight-forward answer to that specific question is right there in the thread - "It means you need to copy the function over, too." I guess maybe you missed that part.

Anyhow, I haven't done this myself, but from reading what it says in that thread you should

1) Copy over the "if (!defined('THEME_HAS_NO_SYS_MENU_BUTTONS')) {" section, the addbutton() function and the assemble_template_buttons() function from themes/sample/theme.php to themes/your_theme/theme.php
2) Comment out the lines dealing with the buttons you don't want to show, e.g. these:

Code: [Select]
    addbutton($sys_menu_buttons,'{LOGIN_LNK}','{LOGIN_TITLE}','{LOGIN_TGT}','login','');
    addbutton($sys_menu_buttons,'{LOGOUT_LNK}','{LOGOUT_TITLE}','{LOGOUT_TGT}','logout','');

Let us know if it works.
Logged

Necula

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Remove login menu option when bridged to Joomla!
« Reply #6 on: January 09, 2006, 07:01:12 pm »

Thanks for your help.  Looks like I have the plugin working now.  I'll know for the future never to try installing this stuff at 1am in the morning!  ;D

Cheers
Logged
Pages: [1]   Go Up
 

Page created in 0.027 seconds with 19 queries.