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)
-   -   Admin/Mod BBcodes (https://vborg.vbsupport.ru/showthread.php?t=105253)

Abe1 02-16-2006 12:39 PM

Quote:

Originally Posted by Darat
Although I can't get it to work you can alter the Advanced bbcode permissions mod to control the usergroups that can use the new tags.

Download the Advanced permission add-on and edit the bitfield_advancedbbcodepermissions.xml file to add these two lines to the group options:

<bitfield name="allow_bbcode_admin" group="advanced_bbcode_permissions" phrase="allow_bbcode_admin">1024</bitfield>

<bitfield name="allow_bbcode_mod" group="advanced_bbcode_permissions" phrase="allow_bbcode_mod">2048</bitfield>

Save that. Then open the product-advancedbbcodepermissions.xml file and add these two lines:

<phrase name="allow_bbcode_admin"><![CDATA[[ADMIN]]]></phrase>
<phrase name="allow_bbcode_mod"><![CDATA[[MOD]]]></phrase>

Save that file.

Then install the Advanced permissions product as per the instructions and you can then use that to control permissions to the new "admin" and "mod".

(Word of warning - I can't at the moment test this but it should work!)

Can you tell me why this should work? There is more then just adding bitfields to allow or not allow BBCODES. The bitfield numbers I use are vbulletin's numbers and I over ride them in my hack. Custom BBcodes dont get a bitfield. There is no reason why these insructions should work.

I am trying to work on a way to get permissions for custom bbcodes.

Darat 02-16-2006 12:54 PM

Quote:

Originally Posted by Abe1
Can you tell me why this should work? There is more then just adding bitfields to allow or not allow BBCODES. The bitfield numbers I use are vbulletin's numbers and I over ride them in my hack. Custom BBcodes dont get a bitfield. There is no reason why these insructions should work.

I am trying to work on a way to get permissions for custom bbcodes.

In the code to add to "class_bbcode" (that Wild-Wing posted) there is the code:

if ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_ADMINWARN)

Isn't that then using going to use the new bitcodes that we defined to control these new tags. And my extension to your hack then lets you switch them on and off in the admincp (and that seems to does work).

Abe1 02-16-2006 12:58 PM

Quote:

Originally Posted by Darat
In the code to add to "class_bbcode" (that Wild-Wing posted) there is the code:

if ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_ADMINWARN)

Isn't that then using going to use the new bitcodes that we defined to control these new tags. And my extension to your hack then lets you switch them on and off in the admincp (and that seems to does work).

I still dont understand. I think you are missing a word some where in your post.

Darat 02-16-2006 01:01 PM

Wild Wing code adds the [admin] and [mod] tag into class_bbcode and like the standard bbcodes he does a check if a bit is set or not to see if someone has permission to use them. What I was trying to do was add setting those bits to your script so that they can be toggled in the admincp in your hack.

Abe1 02-16-2006 01:03 PM

Quote:

Originally Posted by Darat
Wild Wing code adds the [admin] and [mod] tag into class_bbcode and like the standard bbcodes he does a check if a bit is set or not to see if someone has permission to use them. What I was trying to do was add setting those bits to your script so that they can be toggled in the admincp in your hack.

Got it.

I would not recommend adding to vb bitfields for 2 reasons.
1) What if vb added to it?
2) What if another coder addes to it? Best no coders add to it.

Darat 02-22-2006 09:00 AM

Quote:

Originally Posted by Abe1
Got it.

I would not recommend adding to vb bitfields for 2 reasons.
1) What if vb added to it?
2) What if another coder addes to it? Best no coders add to it.

All good points but if it worked reliably as I've tweaked it I'd take the chance on using it and deal with any future conflicts as they came up.. :)

Are you making progress in getting this to work without this type of hack?

Abe1 02-22-2006 11:50 AM

Quote:

Originally Posted by Darat
All good points but if it worked reliably as I've tweaked it I'd take the chance on using it and deal with any future conflicts as they came up.. :)

Are you making progress in getting this to work without this type of hack?

100% yes.

I've been working on the hack for the past week. Hours and hours. Last night I finaly finished how to save custom BBcodes permissions. I have the usergroup settings page listing all custom bbcodes already. I have to get that page though to show the current settings now and then work on removing the custom bbcodes if you dont have permissions to use it. I have found the place to do it already.

Darat 02-22-2006 12:05 PM

I suspect you are going to become even more popular when you release this!

Abe1 02-22-2006 12:54 PM

Quote:

Originally Posted by Darat
I suspect you are going to become even more popular when you release this!

I think so also.

BTW, I just totaly completed the usergroup permissions. It works perfectly. The usergroup permissions page pulls all custom codes and gives you an option for them.

I will now be working to actualy remove the bbcodes not allowed to be used because of a setting.

Yorixz 02-22-2006 01:12 PM

I can't wait till you release it Abe1, will it be an "upgrade" of your "Advanced BbCode Permissions"-hack or stand-alone?


All times are GMT. The time now is 01:46 AM.

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.01106 seconds
  • Memory Usage 1,745KB
  • 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
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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