vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Edit User Options Menu (https://vborg.vbsupport.ru/showthread.php?t=97793)

akanevsky 10-21-2005 10:44 PM

Very nice :)

Chris M 10-21-2005 10:53 PM

Just for reference, the following start to the if condition is a bit hefty:

HTML Code:

<if condition="$post[usergroupid]!=6 AND $post[usergroupid]!=5 AND $post[usergroupid]!=7 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])">
You can use the [high]is_member_of[/high] function in template conditionals:
HTML Code:

<if condition="!is_member_of($post['usergroupid'], array(5,6,7)) AND can_moderate($forum['forumid'], '', $bbuserinfo['userid'])">
:)

Chris

akanevsky 10-21-2005 10:55 PM

Is there a specific reason that you do not want the options to show up for admins/mods/smods? I think that would actually be useful it they did. :)

Besides, you should not check for moderator, because moderator cannot edit anything. Check for administrator instead... :)

Chris M 10-21-2005 11:22 PM

Quote:

Originally Posted by Dark Visor
Is there a specific reason that you do not want the options to show up for admins/mods/smods? I think that would actually be useful it they did. :)

Besides, you should not check for moderator, because moderator cannot edit anything. Check for administrator instead... :)

The code checks to see if the poster is a supermod, administrator or moderator, not the other way around ;)
He put the code, not me:p

I personally would have put:

PHP Code:

<if condition="!is_member_of($post['usergroupid'], array(5,6,7)) AND is_member_of($bbuserinfo, array(5,6))"

Chris

akanevsky 10-21-2005 11:35 PM

But why $post['usergroupid']? $bbuserinfo['usergroupid'] would make more sense :)
Besides, that is not how you use is_member_of :)
Valid syntax:
is_member_of($userinfo_array, $usergroups_array)
e.g.
is_member_of($bbuserinfo, array(5,6,7))
:)

And I know you did not put it, never said you did :)

Chris M 10-22-2005 01:29 PM

Evidently you fail to understand how this hack functions ;)

It is $post['usergroupid'] because we are checking if the POSTER is not an admin, supermod or mod; i.e. If the poster isn't staff, and the user browsing is, then they can edit the options...

I know what I'm doing :p

You've just gotten confused about the !is_member_of and is_member_of code ;)

Chris

akanevsky 10-22-2005 01:44 PM

Quote:

It is $post['usergroupid'] because we are checking if the POSTER is not an admin, supermod or mod; i.e. If the poster isn't staff, and the user browsing is, then they can edit the options...
read earlier:

Quote:

Is there a specific reason that you do not want the options to show up for admins/mods/smods? I think that would actually be useful it they did.
I meant, is there a reason that it shouldn't show up on staff's posts?

Chris M 10-22-2005 01:52 PM

The reason is that the author of this modification had that as default - I simply made it part of the !is_member_of function instead of another AND clause for each usergroup...

I personally don't want my mod's editing each other's signatures or my signature etc from the postbit, and thankfully most are not clued in enough to find the Mod Panel abilities to do so ;)

Chris

akanevsky 10-22-2005 05:19 PM

Ok, if anyone is interested, this is the code I use:

Quote:

<if condition="is_member_of($bbuserinfo, array(5,6))">
<tr><td class="vbmenu_option"><span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/user.php?do=editsig&userid=$post[userid]','edit','width=500,height=350,scrollbars=yes')">< b>Edit $post[username]'s Signature</b></span></td></tr>
<tr><td class="vbmenu_option"><span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/user.php?do=avatar&userid=$post[userid]','edit','width=500,height=350,scrollbars=yes')">< b>Edit $post[username]'s Avatar</b></span></td></tr>
<tr><td class="vbmenu_option"><span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/user.php?do=profilepic&userid=$post[userid]','edit','width=500,height=350,scrollbars=yes')">< b>Edit $post[username]'s Profile Picture</b></span></td></tr>
</if>

phonexpo 11-05-2005 06:08 PM

Installed, ;-)


All times are GMT. The time now is 04:26 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.01566 seconds
  • Memory Usage 1,741KB
  • 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_html_printable
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete