Previous Thread
Next Thread
Print Thread
Rate Thread
Show Admin Functions Only to Admins and Mods
#43110 03/03/2000 9:51 PM
Joined: Aug 2000
Posts: 3,590
Moderator
OP Offline
Moderator
Joined: Aug 2000
Posts: 3,590
Well, this hack was thrown together, and is not extensively tested. I do not think it works if the user viewing the page does not have a cookie from the UBB, so they have to be registered.
Description: Hides the administrative functions located at the bottom of the message display page from all but administrators and moderators.
Hack:
Find:
Quote
quote:
and add right next to it:
Quote
quote:
Remember, this is still in beta, drop any suggestions/fixes to my code in this message. Hopefully we get this worked out!

Sponsored Links
Re: Show Admin Functions Only to Admins and Mods
#43111 03/05/2000 5:54 PM
Joined: Aug 2000
Posts: 3,590
Moderator
OP Offline
Moderator
Joined: Aug 2000
Posts: 3,590
*bump*

Still looking for people to tell me if it works or not

------------------
I wish I were a Canuck
All they have to do is drink beer, play hockey, and say "Eh"

* No offense meant to any Canadians

Re: Show Admin Functions Only to Admins and Mods
#43112 03/06/2000 4:11 AM
Joined: Feb 1999
Posts: 1,379
cal Offline
Programmer
Offline
Programmer
Joined: Feb 1999
Posts: 1,379
About to test it....

Just a thought [Linked Image]

Re: Show Admin Functions Only to Admins and Mods
#43113 03/06/2000 4:24 AM
Joined: Feb 1999
Posts: 1,379
cal Offline
Programmer
Offline
Programmer
Joined: Feb 1999
Posts: 1,379
Seems fine to me. Nice hack.

Just a thought [Linked Image]

Re: Show Admin Functions Only to Admins and Mods
#43114 03/06/2000 7:00 PM
Joined: Aug 2000
Posts: 3,590
Moderator
OP Offline
Moderator
Joined: Aug 2000
Posts: 3,590
Can i get a confirmation from someone else?

------------------
I wish I were a Canuck
All they have to do is drink beer, play hockey, and say "Eh"

* No offense meant to any Canadians

Sponsored Links
Re: Show Admin Functions Only to Admins and Mods
#43115 03/07/2000 3:33 PM
Joined: Feb 1999
Posts: 1,379
cal Offline
Programmer
Offline
Programmer
Joined: Feb 1999
Posts: 1,379
Don't you trust me or something?

Just a thought [Linked Image]

Re: Show Admin Functions Only to Admins and Mods
#43116 03/07/2000 5:40 PM
Joined: Aug 2000
Posts: 3,590
Moderator
OP Offline
Moderator
Joined: Aug 2000
Posts: 3,590
Me2Be -- It didn't work for you? It only shows if you are an admin or mod. Please let me know exactly what happened. It reads your profile, so you must not clear your cookies, and your username and pword need to be stored.

cal -- It's not that, things end up better if they are double, triple, or even more, checked [Linked Image]

------------------
I wish I were a Canuck
All they have to do is drink beer, play hockey, and say "Eh"

* No offense meant to any Canadians

Re: Show Admin Functions Only to Admins and Mods
#43117 03/11/2000 9:13 PM
Joined: Jan 2000
Posts: 23
Member
Offline
Member
Joined: Jan 2000
Posts: 23
Forgive me if I'm wrong here, but this stuff is in the CreateThreadHTML sub, right? Well, then wouldn't this just supress it if the poster wasn't an Admin/Mod?

In other words, "Billy Bob", a member, posts a topic -- no one sees the admin stuff. If "Mr. Admin" posts, then everyone sees the the admin stuff.

Or am I completely wrong here?

------------------
-mike
Casual Players Alliance

Re: Show Admin Functions Only to Admins and Mods
#43118 03/11/2000 11:16 PM
Joined: Aug 2000
Posts: 3,590
Moderator
OP Offline
Moderator
Joined: Aug 2000
Posts: 3,590
hmmm, i didn't think so, but maybe...

------------------
I wish I were a Canuck
All they have to do is drink beer, play hockey, and say "Eh"

* No offense meant to any Canadians

Re: Show Admin Functions Only to Admins and Mods
#43119 03/12/2000 8:54 AM
Joined: Feb 1999
Posts: 1,379
cal Offline
Programmer
Offline
Programmer
Joined: Feb 1999
Posts: 1,379
Very good point (shouldn't have trusted me Atom). The page isn't dynamic so either has them for everyone or for no one. To do this hack, you'd need to generate the page every time it was loaded.

This hack is impossible (without A LOT of recoding)

Just a thought [Linked Image]

Sponsored Links
Re: Show Admin Functions Only to Admins and Mods
#43120 03/12/2000 1:23 PM
Joined: Jan 2000
Posts: 23
Member
Offline
Member
Joined: Jan 2000
Posts: 23
Well, theoretically you could create a cookie with your user status and then use some javascript to only write it if the cookie says Admin or Moderator. Not worth it IMO.

------------------
-mike
Casual Players Alliance

Re: Show Admin Functions Only to Admins and Mods
#43121 03/18/2000 9:32 AM
Joined: Feb 2000
Posts: 10
Junior Member
Offline
Junior Member
Joined: Feb 2000
Posts: 10
You'll probably won't need stuff like this anyway.

Re: Show Admin Functions Only to Admins and Mods
#43122 03/18/2000 11:11 AM
Joined: Aug 2000
Posts: 3,590
Moderator
OP Offline
Moderator
Joined: Aug 2000
Posts: 3,590
Yup, i didn't need it, someone requestied it, so I made a quick and weak attempt at it [Linked Image] I wasn't using it...

------------------
I wish I were a Canuck
All they have to do is drink beer, play hockey, and say "Eh"

* No offense meant to any Canadians

Re: Show Admin Functions Only to Admins and Mods
#43123 03/18/2000 11:17 AM
Joined: Feb 1999
Posts: 1,379
cal Offline
Programmer
Offline
Programmer
Joined: Feb 1999
Posts: 1,379
Certainly was weak. hehe.

Just a thought [Linked Image]


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
badfrog
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
Forum Statistics
Forums63
Topics37,543
Posts293,774
Members13,837
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online 286
Topics Created 0
Posts Made 0
Users Online 0
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,805
Greg Hard 4,625
Top Posters(30 Days)
isaac 1
Top Likes Received
isaac 39
Gizmo 10
Brett 7
Morgan 2
Top Likes Received (30 Days)
isaac 1
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2020 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.5
(Snapshot build 20200618.dev)
Responsive Width:

PHP: 5.4.45 Page Time: 0.051s Queries: 42 (0.014s) Memory: 3.3586 MB (Peak: 3.6278 MB) Data Comp: Zlib Server Time: 2020-07-05 11:11:48 UTC
Valid HTML 5 and Valid CSS