URL to your eFiction: http://fiction.tokiohotelfiction.com
Version of eFiction: The latest, with modifications to allow our old adjustments, but current for the most part.
Have you bridged eFiction, if so with what?: No
Version of PHP: 5.2.11
Version of MySQL: 4.0.21
Have you searched for your problem: Yeeesssss
If so, what terms did you try: Admin Level 4 Hide Privileges Reviews Restrict Deny
State the nature of your problem:
On our site, we have Premium Members (people who have donated to keep our site online) and we want to give them special perks. We are trying to mod Admin Level 4 so that it can be for Gold members. Here's the problem. Admin Level 4s can edit/delete reviews and they can edit/delete news posts. We very much want to make it so that Admin Level 4s can't do this. We want them to be like regular members, only Admins in the sense that they can "see" parts of the site that are only viewable to admins.
We tried to modify it ourselves by changing the uLevel values in both reviews.php and in includes/get_sessions_vars.php, but we seriously messed up in that we ended up in a situation where ALL OF OUR MEMBERS HAD ADMIN PRIVS. People started deleting and editing stories - it was a nightmare.
We just would like to be able to disable a Level 4 Admin's ability to edit things that aren't theirs! I really think it's possible. Would very much appreciate it if someone could get back to us. π
Do you have a test account for us?
Yes
Penname: everstar
Password: testing
Thank you so much.
This is not general support. You're asking for a mod. I'm moving this to mod support.
Oops, yeah, I suppose it is more of a mod request than anything else. Just the same... does anyone know how to do this? π
Addendum - I'm more than willing to pay someone for their trouble.
Perhaps you should avoid using level 4 and try doing something else... but what perks do you want to give premium members?
I avoid using level 4 at my archives but, for members who have donated, I add a "star" next to their username to signify their status.
archive:
site:
Available for skin/mod commission! π
Yeah we have the gold stars, too.
The perks we want to give them are, we want to make links viewable to them in the layout (links that no regular member can see) and we want to make skins available to them that have no ads on them. We need to put ads back up because our site ust went over 30, 000 members and it's getting extremely expensive.:
I really would like to be able to use the Admin Level 4 solution, and it seems the only thing standing in my way is that they are able to edit/delete comments and reviews. That's all. If there's another way we can implement these features for the Gold Members then great, but I just don't see how. π
Ah.
It's just the edit/delete news comments and reviews, right?
I bumped myself down to a level 4 admin on my site, and I don't get options for to edit/delete either. Try this: https://efiction.org/forums/index.php?topic=7280.msg40279#msg40279
ETA: oh, my bad, that just removes the links, but it'd be a good mod to have anyway.
For the comments... in news.php, find:
if(isADMIN)
$news->assign("adminoptions", "<a href=""admin.php?action=news&form=".$stories['nid'"]."">"._EDIT."</a> | <a href=""admin.php?action=news&delete=".$stories['nid'"]."">"._DELETE."</a>");
And change it to something like this:
if(isADMIN && uLEVEL <= 3)
$news->assign("adminoptions", "<a href=""admin.php?action=news&form=".$stories['nid'"]."">"._EDIT."</a> | <a href=""admin.php?action=news&delete=".$stories['nid'"]."">"._DELETE."</a>");
That might work? Bump yourself down to a lev 4 admin and see what else is available.
archive:
site:
Available for skin/mod commission! π
That worked perfectly for the news comments! I also had to make that edit to blocks/news/news.php, but we're definitely getting somewhere. π Thank you!
Now if only we can get rid of that ability to edit/delete reviews...
In your reviews.php do you not have something like:
if(isADMIN && uLEVEL < 3) $adminlink = "<span class='label'>"._ADMINOPTIONS.": </span> [<a href=""reviews.php?action=edit&reviewid=".$reviews['reviewid'"]."">"._EDIT."</a>]";
if( (isADMIN && uLEVEL < 3) || (USERUID && USERUID == $reviews['uid'])) $adminlink .= " [<a href=""reviews.php?action=delete&reviewid=".$reviews['reviewid'"]."">"._DELETE."</a>]";
?
The code for the news above will only get rid of the links btw. They might be able to access the news admin part... I'd advise looking at the panel permissions in the admin panel to see who can see it. π
archive:
site:
Available for skin/mod commission! π
Oh I've disabled and hidden the Admin panel for Lev4s completely. π Thank you for the heads up!
As for the code you just gave for reviews.php - no I don't have that *exactly* and I am weary of going in there and messing with it myself because last time I did, every single member suddenly got full admin powers lolol. What exactly should I do with that code?
Thank you again! I'm so relieved we're actually getting somewhere.
Additionally -
I just went in and tried to implement those changes myself (I'm too impatient! lol) and it seems to be working flawlessly...
!!
ETA: Terror strikes. As Lev4 I can still edit/delete News COMMENTS. D:
EDT 2: Ah ha! I think I figured it out. Beginning to learn that in most cases, if "&& uLEVEL < 3" follows admin commands, it disables it for Lev4s.
In most cases. lol
ETA 3: Ok, found one more thing. When looking at a story index, Lev4s can Edit or Delete chapters. Wah.
What was the code that made all users have admin privileges?
viewstory.php:
Find:
if(isADMIN)
$tpl->assign("adminoptions", "<div class="adminoptions">[<span class='label'>"._ADMINOPTIONS.":</span> <a href=""stories.php?action=editchapter&sid=$sid&chapid=".$chap['chapid'"]."&admin=1">"._EDIT."</a> | <a href=""stories.php?action=delete&sid=$sid&chapid=".$chap['chapid'"]."&admin=1">"._DELETE."</a>]</div>");
Change to:
if(isADMIN && uLEVEL <= 3)
$tpl->assign("adminoptions", "<div class="adminoptions">[<span class='label'>"._ADMINOPTIONS.":</span> <a href=""stories.php?action=editchapter&sid=$sid&chapid=".$chap['chapid'"]."&admin=1">"._EDIT."</a> | <a href=""stories.php?action=delete&sid=$sid&chapid=".$chap['chapid'"]."&admin=1">"._DELETE."</a>]</div>");
Basically... isADMIN and uLEVEL are both constants. If isADMIN returns a value that isn't 0/null then it will execute the command after it. With this one, it basically hides/shows the admin options.
When you're looking at the story index, can you actually edit/delete chapters? Or are these just links to unauthorised access pages?
archive:
site:
Available for skin/mod commission! π
Hi again -
I think I have everything figured out, thank you so much for your help. <3
The code that made everyone have admin privs was like, ugh I don't know, it was such a long night of trial and a lot of error. I think it was something like uLevel <= 3... Just something horribly wrong that completely negated the member restrictions.
Thank you again! I hope to not have any more questions. π
Hey,
One last thing. We found another issue with the Lev4s. When a Lev4 author goes to post a fanfic, they have the option to feature or validate their own story. is there a way to disable this for them? I've looked in stories.php and I can't really make sense of it.
Thank you
Look in includes/storyform.php
