vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   [RELEASE vB2B2] Hidden admin options (https://vborg.vbsupport.ru/showthread.php?t=10503)

PeF 03-05-2001 08:25 AM

1 Attachment(s)
Description:
This hack will display admin options only to moderators, super moderators and administrators.

vBulletin versions supported:
2.0 Beta 2

Files to edit:
forumdisplay.php, showthread.php

Templates to modify:
2 - forumdisplay, showthread

Number of new queries:
0

Number of new templates:
2

Size:
1,10KB

Demo:
N/A

Known bugs and issues:
Just test it and let me know. :)

Instructions:
Included in the attached ZIP file.

03-05-2001 09:10 AM

Will try this in the morning. This is actually on my request list :)

03-05-2001 01:49 PM

Usergroupid 7 is not necessarily a moderator, as that group is a group added by the admin. Moderators are determined by there inclusion in the moderator table outside of Admins at usergroup 6 and Super Mods at usergroup 5.

Would be better (may add a query) to use this as it would catch all moderators in addition to hiding options from moderators in forums that they do not moderate.

Code:

// Hide admin options to members
if (ismoderator($thread[forumid)) {
  eval("\$forum_adminoptions = \"".gettemplate('forumdisplay_admin_options')."\";");
} else {
  $forum_adminoptions = "";
}


03-05-2001 02:00 PM

I wasn't thinking of moderators from another forums. Silly me. :)

Thanks Freddie, package updated.

03-05-2001 08:24 PM

Nevermind that, stupid typo on my part that i hadn't noticed. Fixed now

Awesome script and keeps my users from being confused about what those extra options are! Very useful

Maz

03-06-2001 12:27 PM

I did everything I was supposed to and it only works with my default template.

Not sure why it doesn't work.

it just prints nothing for the other templates. Even though I am logged in as admin.

03-06-2001 12:43 PM

I'm not sure either. I need some more info or even better - the link to your pages.

03-15-2001 06:04 AM

is there a way to uses this under vb 1.1.x also? the varialbe "ismoderator" dosn't work

03-15-2001 06:31 AM

I'm not going to hack this for versions lower than 2.0 because of time. This hack should be compatible with all 2.0 betas.

03-15-2001 08:34 AM

Don't find the utility of this hack!

03-15-2001 08:51 AM

Quote:

Originally posted by PeF
I'm not sure either. I need some more info or even better - the link to your pages.
I've got the same problem. Moderators do get to see the links, but I, the administrator, Don't.

That's not good :(

03-15-2001 08:56 AM

I'm uninstalling the hack, but now i have another problem.

Because the template system of vb2 sucks, i've edited the templates through phpmyadmin. Because of that, i can't simply 'revert to original'.

Normally, I can just follow the hack backwards, and so uninstall the hack.

But in these hack instructions, there's only

Code:

************************************************
* Replace everything between the following two lines:
************************************************

<!-- forum rules and admin links -->
...
<!-- /forum rules and admin links -->

************************************************
* With:
************************************************

but not the original code.

Now i don't know to what i have to change it to!!!

:(:(:(:(

03-15-2001 09:06 AM

Fiished. Finally.

I had to beg my host for a second database, and installed vb2 again, temporarily, and then copy the original showthread and forumdisplay templates to the ones that are ****ed up.

I hate the way vbulletin2 is going with the templates. If vb2 had the same template system as in 1.1.x, then i didn't even have to use phpmyadmin, but i could do it in the control panel!

I'm strongly considering uninstalling vb2, despite all the good features that my users love.. and installing 1.1.6..

/me Out.

03-15-2001 09:36 AM

I'll update the package as soon as possible and take a closer look at the issues described here. I'll also update installation instructions.

The wierd thing is it works perfectly on my site.
If anyone experience any problems, feel free to describe them here as X-PhoeniX did.

I've found template system in vB 2.0 more valuable and efficient than in older versions. I've never been forced to use phpMyAdmin or whatever else to edit my templates or even worse, repair them. I have to confess I experience less troubles with vB 2.0 than with vB 1.1.x. My users love new features and new version so do I.

03-15-2001 09:37 AM

Quote:

Originally posted by X-PhoeniX
Now i don't know to what i have to change it to!!!
I really can't know what you have between those lines now. This hack was written for a fresh install of vBulletin.
Feel free to contact me, I'll try to help you as much as possible to make it run if still interested.

03-15-2001 09:44 AM

Quote:

Originally posted by jojo85
Don't find the utility of this hack!
:confused:

03-15-2001 09:45 AM

Quote:

Originally posted by PeF
I've found template system in vB 2.0 more valuable and efficient than in older versions. I've never been forced to use phpMyAdmin or whatever else to edit my templates or even worse, repair them. I have to confess I experience less troubles with vB 2.0 than with vB 1.1.x.
Then I would like to know what troubles you ran into with the template system of vB 1.1.x?
Cuz that one has always worked perfectly for me, in contradiction to the template system of vB 2..
Quote:

Originally posted by PeF

I really can't know what you have between those lines now. This hack was written for a fresh install of vBulletin.
Feel free to contact me, I'll try to help you as much as possible to make it run if still interested.

Yep you're right, you couldn't know what i had between the lines..

I should have written it to a file or something, my mistake :)

Sorry to post all this in 'your' topic, i just was a little pissed-off :)

I've got it all working again.. Thank goodness :)

Oh and the ismoderator function you're calling.. doesn't it only get the moderators for that forum, and not the admins?

If that's true, then that's the cause of my problem, and probably of someone i read higher up in the thread..

03-15-2001 02:34 PM

All hacks are use at your own risk.

Remember they are doing it for free!

03-15-2001 02:46 PM

PeF, does this add a query to showthread to check for moderator status?

03-15-2001 05:57 PM

Oups sorry pef :)

03-15-2001 07:08 PM

Quote:

Originally posted by X-PhoeniX
Fiished. Finally.

I had to beg my host for a second database, and installed vb2 again, temporarily, and then copy the original showthread and forumdisplay templates to the ones that are ****ed up.

What can't you edit via the templates? I've done quite a bit of custom editing via the control panel. I haven't run across anything I can't edit through the vB system.

03-16-2001 07:31 AM

Quote:

Originally posted by Flare


What can't you edit via the templates? I've done quite a bit of custom editing via the control panel. I haven't run across anything I can't edit through the vB system.

It's just because the fact that I *hate* the way the template system is working in vB2..

Why not just 'edit', 'remove' and 'add'?! That's enough.. noo things like custom templates, templatesets, revert to original... All that stuff isn't nesaserry(spelling?)..

03-16-2001 01:45 PM

Quote:

Originally posted by X-PhoeniX
Why not just 'edit', 'remove' and 'add'?! That's enough.. noo things like custom templates, templatesets, revert to original... All that stuff isn't nesaserry(spelling?)..
Uhh... hmm, that would be how it works. :)

change original -> add
revert to original -> remove

03-19-2001 03:32 PM

Quote:

Originally posted by X-PhoeniX
I've got the same problem. Moderators do get to see the links, but I, the administrator, Don't.

That's not good :(

Edit the Administrator usergroup and set "Is Super Moderator" to "Yes".

Let me know if that fixes your problems.

03-19-2001 05:37 PM

Quote:

Originally posted by freddie


Edit the Administrator usergroup and set "Is Super Moderator" to "Yes".

Let me know if that fixes your problems.

I'm sorry for not replying, but i've been offline for a few days (a wonder! :D)

I'll install the hack again this week, and set the admin usergroup to 'is supermod' to yes..

Then i'll post here if that has worked or not.

Alex 06-16-2001 03:39 PM

Does this hack work with VB 2.0.1?

Mentor 06-16-2001 07:12 PM

Its encluded in it :)


All times are GMT. The time now is 12:11 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01615 seconds
  • Memory Usage 1,775KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (27)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete