Welcome, Guest. Please login or register.
Did you miss your activation email?

 
Advanced search

22735 Posts in 6699 Topics- by 17593 Members - Latest Member: permsk

21-08-2019 06:22:56
JOOM::GALLERY::FORUMArchivePonyGallery MLFrontendfrontend - userpanel only for selected registered users
Pages: [1]
Print
Author Topic: frontend - userpanel only for selected registered users  (Read 5735 times)
0 Members and 1 Guest are viewing this topic.
flerd
Newbie
*
Offline Offline

Posts: 3


View Profile
« on: 01-10-2008 13:11:37 »

Hi all,

on one of my sites i needed this, maybe it is usefull for someone.

So i needed to select some users from my registered users who can upload in the galleries (i didn't want to set them as special users (author, publisher, ect.)), so i have to select them from the registered users manually.

My solution:
(**backup all files before any changes**)

build:
JOOMGALLERY_BETA_1_BUILD_20080914.zip

***
file:
admin.configuration.html.php

after this:
Code:
$suserpanel[] = mosHTML::makeOption('3', _JGA_DISPLAY_TO_ALL);

add this:
Code:
$suserpanel[] = mosHTML::makeOption('4', _JGA_DISPLAY_TO_OWN);

search for this:
Code:
$mc_jg_showuserpanel = mosHTML::selectList($suserpanel, 'jg_showuserpanel', 'class="inputbox" size="4"', 'value', 'text', $jg_showuserpanel);

change to his:
Code:
$mc_jg_showuserpanel = mosHTML::selectList($suserpanel, 'jg_showuserpanel', 'class="inputbox" size="5"', 'value', 'text', $jg_showuserpanel);

****
file:
admin.english.php (or your language file)

add this:
Code:
DEFINE('_JGA_DISPLAY_TO_OWN','Display for selected registered users :)');

***
file:
joomgallery.html.php

search for:
Code:
function Joom_GalleryHeader() {
  global $gid,$func,$Itemid,$jg_showuserpanel,$jg_showgalleryhead,$jg_showallpics,
         $jg_showtoplist, $jg_showbacklink,$jg_whereshowtoplist,$jg_userspace,
         $jg_search, $jg_showpathway, $catid, $database, $id

change to this:
Code:
function Joom_GalleryHeader() {
  global $gid,$func,$Itemid,$jg_showuserpanel,$jg_showgalleryhead,$jg_showallpics,
         $jg_showtoplist, $jg_showbacklink,$jg_whereshowtoplist,$jg_userspace,
         $jg_search, $jg_showpathway, $catid, $database, $id, $selecteduser_id, $my, $alloweduser_id1, $alloweduser_id2

after this:
Code:
if ($jg_userspace == 1){

add this:
Code:
$selecteduser_id = $my->id;
$alloweduser_id1 = 590;
$alloweduser_id2 = 75;
here you can set the registered user's ID, change 590 and 75 to your needs.

search for this:
Code:
if ( ( ( $jg_showuserpanel == 1 ) && ( $gid > 0 ) ) || ( ( $jg_showuserpanel > 0 ) && ( $gid == 2 ) ) || ( $jg_showuserpanel == 3 ) )

change to this:
Code:
if ( ( ( $jg_showuserpanel == 1 ) && ( $gid > 0 ) ) || ( ( $jg_showuserpanel > 0 ) && ( $gid == 2 ) ) || ( $jg_showuserpanel == 3 ) || ( ( $jg_showuserpanel == 4 ) && ( $selecteduser_id == $alloweduser_id1 or $alloweduser_id2 ) ) )

that's it.

in $alloweduser_id1 and $alloweduser_id2 you can add the registered user's user ID. If you want more than 2 useres you can add more $alloweduser_id, but don't forget to add it to the globals too in function "Joom_GalleryHeader" mentioned above.

your last thing to do is to set this option in admin panel:
"Display for selected registered users :)"
save the settings and test it!

i hope it helped to someone ;) if not maybe in the far far future it will :)
« Last Edit: 02-10-2008 16:30:47 by flerd » Logged
aram7x
Newbie
*
Offline Offline

Posts: 35



View Profile WWW
« Reply #1 on: 18-11-2008 15:17:27 »

Hi,
I have problem with Pony Gallery ML,when I active userpanel for SM(Special Members) ,Register members when login into the site and write direct link of user panel they can view and use upload setting and userpanel menu .
I want only Special Members use the userpanel!!!!
Logged

Iran Machinery Reference
www.iranmachinery.com
Richt
Newbie
*
Offline Offline

Posts: 11


View Profile
« Reply #2 on: 26-08-2009 13:08:11 »

Hi I would like to be able to implement this but I seem unable to locate the correct file, I have the joomgallery.html.php but I am unable to find the string suggested the same with the admin.english.php. Could someone help and make sure I have th right files please ...

Thanks

Richt Sad

Logged
Pages: [1]
Print
Jump to:  

HOSTED BY SCHWARZKÜNSTLER ®

PROTECTED BY  ZB BLOCK  AND Project Honey Pot
Theme orange-lt created by panic

Bad Behavior has blocked 6162 access attempts in the last 7 days.