Page 1 of 1
Moderation only for Super-Administrator
Posted: 10 Apr 2009, 15:57
by hbrui
Hi,
I installed PhocaGuestbook and really like it, but have some problems with it. The complete translation I could fix with forum serarch. My most important problem to be solved is: only users in group "Super-Administrators" are shown the delete and unpublish icons in frontend. No other group will be accepted, even when added to com_phocaguestbook\helpers\phocaguestbook.php or/and com_phocaguestbook\views\phocaguestbook\view.html.php to be flagged as administrator. I`m not an expert in coding, so I just try to find the matching passages. I installed phoca guestbook on Joomla 1.5.10 on two different webservers, but get the same result. Only Superadmin are allowed to moderate in frontend. How can I fix this?
Thanks for any help.
Bernd
Re: Moderation only for Super-Administrator
Posted: 10 Apr 2009, 23:07
by Jan
Hi, you need to customize the code, so. e.g. you will set other user group or direct some user to moderate the forum, this needs to be changed:
components\com_phocaguestbook\views\phocaguestbook\view.html.php
line 31
Jan
Re: Moderation only for Super-Administrator
Posted: 11 Apr 2009, 20:26
by hbrui
Hi Jan,
thanks for your tip. But I already tried to add group manager here. Even tried to add just a specific user by adding "|| $user->usertype == strtolower('test')" after the administrator, but it is ignored.
Without any modification all users of the administrator group should see the trash and unpublish-icon. But on my webspace only Super-Administrator see those icons. So there must be an existing problem with the code without me (=noob

) tampering with it.
Any hints?
Bernd
Re: Moderation only for Super-Administrator
Posted: 14 Apr 2009, 18:17
by sweet160
Hi,
I have the same problem here,
Would like to give publishers the right to manage the messages in Phoca Guestbook, FRONT end
but I dont know how to make it happen...
Jo
Re: Moderation only for Super-Administrator
Posted: 15 Apr 2009, 17:33
by Jan
hbrui
Hi, be aware, usertype is not user or username.
See the controller too:
components\com_phocaguestbook\controllers\phocaguestbook.php
436, 475
Jan
Re: Moderation only for Super-Administrator
Posted: 04 Sep 2009, 22:31
by Jan
Hi, I am testing it (as administrator only) and get no problem there
Jan
Re: Moderation only for Super-Administrator
Posted: 13 Jan 2010, 15:02
by Alhifi
hbrui wrote:
... Even tried to add just a specific user by adding "|| $user->usertype == strtolower('test')" after the administrator, but it is ignored.
...
I actually have the same problem, i want to add the group "Manager" to get the access-rights for "delete" and "unpublish", so i tried the way above ... and it's very simply, why the original script did only work with "Super Administrator" and not with "Administrator".
File /component/views/phocaguestbook/views/view.html.php Line 31:
Original (wrong):
Code: Select all
if (strtolower($user->usertype) == strtolower('super administrator') || $user->usertype == strtolower('administrator')) {
What is wrong? See the missing 'strtolower' in the second check of usertype ...
Correct:
Code: Select all
if (strtolower($user->usertype) == strtolower('super administrator') || strtolower($user->usertype) == strtolower('administrator')) {
Extended with group "Manager":
Code: Select all
if ( strtolower($user->usertype) == strtolower('super administrator') || strtolower($user->usertype) == strtolower('administrator') || strtolower($user->usertype) == strtolower('manager')) {
Hope it helps, it's working for me ...
Actually i finished to change phocaguestbook to do the publishing, unpublishing and deleting on the frontend ... working fine.
Bye
Alhifi
BTW: Sorry for my bad english ...
Re: Moderation only for Super-Administrator
Posted: 18 Jan 2010, 18:04
by Jan
Hi, thank you for this information.
Jan
Re: Moderation only for Super-Administrator
Posted: 27 Feb 2010, 00:36
by hbrui
Wonderful, thanks for this solution. It works fine now for my Managers
