Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: May 1999
Posts: 23
Journeyman
Journeyman
Offline
Joined: May 1999
Posts: 23
"Edit" doesn't show up as active for moderators in forums they moderate, even in their own posts
Problem is near line 294 in showflat.php and somewhere in showthreaded.php:
if (ereg(",$Username,",$modlist)) {
This doesn't work if user is either first or last moderator in a board.
Simple fix: replace ",$Username," with "$Username"

Last edited by stroker; 04/25/2002 4:35 PM.

Greetings,
Piotr
Sponsored Links
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
jepp that did it, thanx!

in showthreaded.php in line 329

Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
Hmm, that's odd. The problem with this is if you have a moderator named threadster, and a user named thread, the user thread will get the edit button because it will match.

The moderator list should start and end with a comma even after the first/last one. Can you SELECT Bo_Moderators FROM w3t_Boards and check if this is true?


UBB.threads Developer
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
Yes, it's true.
We did a upgrade from 5.5.1
Query result: ,Mod1,Mod12,Mod3,Mod4,

I'm not very experienced in PhP but maybe lines 236-251 (showflat.php) change the modlist array so that there arenn't commas at the end and beginning?

Joined: May 1999
Posts: 23
Journeyman
Journeyman
Offline
Joined: May 1999
Posts: 23
You're right.
I now use:
if (ereg(">$Username<",$modlist)) {

and it works


Greetings,
Piotr
Sponsored Links
Joined: May 1999
Posts: 23
Journeyman
Journeyman
Offline
Joined: May 1999
Posts: 23
> Hmm, that's odd

I know []/forum/images/icons/smile.gif[/]


> Can you SELECT Bo_Moderators FROM w3t_Boards and check if this is true

Yes, it's true.

I think Astaran found where the problem is.


Greetings,
Piotr
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Same problem confirmed on my board.

In addition, for a moderator's own post, the edit link is active, but results in "This post can no longer be edited because the maximum edit time has expired". The time limit for editing posts is set to 0 in the admin area.

The moderator lists all look correct:
,mod1,mod2,

There's one forum I created which has no moderators. Its moderator list consists of a single comma.

There were a few forums imported from UBB.classic which had no moderators. Their moderator lists are blank. Is that a problem?

Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
No problem with the modlist being blank as it defaults to the admin in this case. Need to check on the code for the single comma though.


UBB.threads Developer
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
Yeah, looks like I have some variable reusage going on. Need to rework the variable names for this. Thanks for the info.


UBB.threads Developer

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:
• Shock Hosting
• Stable Host
• bluehost
• InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,080
Joined: March 2000
Forum Statistics
Forums63
Topics37,583
Posts293,957
Members13,826
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 3418
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 25
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20261026)