MemHT Portal is a Free PHP CMS and Blog
It permit the creation and the management online of websites with few and easy steps.
It's completely customizable, expandable and suitable for all needs.
Moderators: Moderators
Forum RSS feedReply
Detect IsGuest,IsModerator,IsUser,IsAdmin
AuthorText
edwinardiant
Junior Member

Posts: 18
Contributes: 18

Gender: _MALE_
Online: No

Version: 4.2
Country: Indonesia
Languages: Indonesian
Date: 16/08/2011 05:56
Detect IsGuest,IsModerator,IsUser,IsAdmin
#post25135
Site url: http://blackant.com
MemHT version: 4.2 evo
Hosting OS: Linux,
PHP and MySQL versions: 5.X
Installed addons/scripts: NOpe
Error/Problem: Nope

Well,mem I want to ask,how do we know is visitor is a guest moderator or admin on our site

well I want to "hide" delete button,and edit button when visitor is user,and show it when it's moderator,
OR show "edit" and "quote" when he/she is a topic starter and "edit" only show on his/her post only

well I only know
code
if (!isUser($userid)) {
}

if visitor is a Guest

code

if (isUser($userid)) {
}

if visitor is a User

but I cannot find
1.how I detect it's as a user and topic starter?
2.how I detect it's as a moderator

well
I use this code to detect as moderator
code
if (isModerator($forum,$userid)) {
}
 

it give me buck of warning error


I use this as she/he is as topic starter,or his/her post

code

if (isUser($post_author,$userid)) {
}
 

not work Smile


Regard Smile
If this mod complete of course I will share it
I want to improve memht forum view Smile
Delete Edit Quote
 
Reply
Twitter updates...
MemHT Wiki
Help MemHT Portal
Navigator
Users Block
Hi Guest
IP: 38.107.179.230

Username
Password
Language
MemHT Portal is a free software released under the GNU/GPL License by Miltenovik Manojlo