forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Permissions & Access Rights => Topic started by: tuga on November 04, 2005, 11:39:05 pm

Title: Remove MyProfile
Post by: tuga on November 04, 2005, 11:39:05 pm
Hi,

I've been searching and didn't find anything that feets for me.

I'd like to know how to remove "My Profile" from a group of users (for exemple resgistered) so they can't change nothing (email, password...). I only want Administrators to change profiles (only administrators give passwords to users).

Thanks!
Title: Re: Remove MyProfile
Post by: xplicit on November 05, 2005, 02:50:53 am
Location depends a bit on your theme.php but for instance in classic remove:

Code: [Select]
<td class="admin_menu"><a href="profile.php?op=edit_profile" title="">{MY_PROF_LNK}</a></td>
Must be somewhere around line 96
Title: Re: Remove MyProfile
Post by: kegobeer on November 05, 2005, 03:28:21 am
Bear in mind that removing the link won't stop someone from typing profile.php?op=edit_profile into the address bar.  There is no mod or hack that I know of that will actually prevent a group from changing profile information.
Title: Re: Remove MyProfile
Post by: Joachim Müller on November 05, 2005, 05:38:23 am
to make this bullet-proof, you'll have to add
Code: [Select]
if (!GALLERY_ADMIN_MODE) { cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__); }to profile.php
However, I can see little point in disallowing users to change their profile.
Title: Re: Remove MyProfile
Post by: tuga on November 05, 2005, 12:35:10 pm
Hi, thanks everyone for the help. I did everything said in this topic and the GauGau line worked but in the "@" still is the "my profile" option (users can't use it). Is there anyway to remove it? I used the xplicit way and it still appears. If it's difficult never mind, now it does that I want :)

THANKS!
Title: Re: Remove MyProfile
Post by: Abbas Ali on November 05, 2005, 12:40:49 pm
hmmm "@"..... that means you are not using classic theme but some other theme. Modify the respective theme file. xplicit just gave an example keeping classic theme in mind. You will have to modify the theme you are using.
Title: Re: Remove MyProfile
Post by: xplicit on November 05, 2005, 12:46:42 pm
Ok since you are refering to the @ I asume you are using the project VII theme

In your case it will be around 126 in the $template_user_admin_menu

I'm afraid you removed it in the $template_gallery_admin_menu around 109 which you shouldn't do

Title: Re: Remove MyProfile
Post by: tuga on November 05, 2005, 12:54:25 pm
Hi,
I've remove in the $template_user_admin_menu and it still appears. It's strange. By the way i'm using mac ox theme.
Thanks
Title: Re: Remove MyProfile
Post by: xplicit on November 05, 2005, 01:12:36 pm
Well even tested it here and works perfectly, I'm afraid your not adjusting the right files.. or adjusting the correct files but that the server doens't point at these

please post a link to your site with a non admin username and password so we can see
Title: Re: Remove MyProfile
Post by: Abbas Ali on November 05, 2005, 01:29:27 pm
to make it very clear for you edit themes/mac_ox_x/theme.php
Title: Re: Remove MyProfile
Post by: tuga on November 05, 2005, 01:31:11 pm
That I've changed:

Code: [Select]
// HTML template for user admin menu
$template_user_admin_menu = <<<EOT

                <div align="center">
                <table cellpadding="0" cellspacing="1">
                        <tr>
                                <td class="admin_menu"><a href="albmgr.php" title="">{ALBMGR_LNK}</a></td>
                                <td class="admin_menu"><a href="modifyalb.php" title="">{MODIFYALB_LNK}</a></td>
                               
                        </tr>
                </table>
                </div>

EOT;
Title: Re: Remove MyProfile
Post by: Joachim Müller on November 06, 2005, 02:58:28 pm
Do as suggested:
please post a link to your site with a non admin username and password so we can see
Title: MOVED: Re: Remove MyProfile
Post by: Joachim Müller on January 08, 2006, 02:00:17 pm
unrelated reply has been moved to cpg1.4 themes/skins/templates (http://forum.coppermine-gallery.net/index.php?board=51).

http://forum.coppermine-gallery.net/index.php?topic=26170.0 (http://forum.coppermine-gallery.net/index.php?topic=26170.0)
Title: Re: Remove MyProfile
Post by: insightrob on October 13, 2006, 02:58:48 pm
I know this is an old topic, but I have just had the same problems removing the 'my profile' link and discovered this topic using a search.

I have the final extract plugin installed which works great for removing most other fields. However my Gallery is bridged with both SMF and Joomla and I would rather actually keep the profile link than hide it.

I decided to edit theme.incp.php which is in the includes directory.

I edited the following line:

Code: [Select]
<td class="admin_menu"><a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a></td>
To

Code: [Select]
<td class="admin_menu"><a href="http://yoursite/yourprofilelinkhere" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a></td>
Obviously put your own url in there and not mine. :P

The result is that users simply get re-directed to their SMF profile page. I have no idea of the impact of this 'bodge', seems to work okay for me though. :)
Title: Re: Remove MyProfile
Post by: Joachim Müller on October 13, 2006, 03:19:16 pm
This is the deprecated cpg1.3.x support board that you're replying to. As plugins have only been introduced in cpg1.4.x, you can't be using cpg1.3.x. Additionally, support for cpg1.3.x has run out anyway. Respect board rules: start a new thread of your own on the proper sub-board after having searched the forum for answers. Locking.