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)

Smiry Kin's 02-11-2006 10:59 AM

Quote:

Originally Posted by Darat
Damn! Why isn't it working for me? I've even disabled every other plugin and product just to be on the safe side! Frustrating to say the least!

this isnt a plugin :S its just custom bb codes, plugins shouldnt really effect it.. i have this working :s its pretty simple really..

Smiry Kin's 02-11-2006 11:02 AM

Quote:

Originally Posted by Delphiprogrammi
well,

nice addition BUT it has a serious security hole.*anybody* with a username can go to www.yourboard.com/forum/misc.php?do=bbcode this generates a list of bbcode tags your board uses.The "advanced bbcode permissions hack" only handles permissions for bbcode build into vbulletin not custom bbcode tags so without some way to restrict this it is pretty useless

also ......

DO NOT TURN ON DEBUG MODE ON LIVE SITES

danger Will Robinson danger .....

yeh your right dude..

[high]* Smiry Kin's going to uninstall, unless a fix is made soon[/high]

Luggruff 02-11-2006 11:35 AM

Quote:

Originally Posted by Smiry Kin's
yeh your right dude..

[high]* Smiry Kin's going to uninstall, unless a fix is made soon[/high]

*So is Luggruff*

Delphiprogrammi 02-11-2006 03:20 PM

well,

you could add a plugin on hook location bbcodeparse_start which checks the individual permissions using the bitfields from the advanced bbcode permissions hack.But you need to modify this hack a bit.

i'll have a look later no time for it now :D

Darat 02-11-2006 05:19 PM

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!)

Darat 02-12-2006 10:50 AM

I've got this working now - rather embarrassing I'd been mucking around class_bbcode a little while ago on my test forum to see if I could implement this and forgot about them, once I started from original files it all worked first time!

I've modified the advanced bbcode permissions to handle the new tags and that works – so the codes can only be used by a mod or admin however if I use more then one mod box in the thread only the first one is parsed correctly – the subsequent ones are ignored as if I didn’t have permission to use the tag,

Delphiprogrammi 02-12-2006 05:23 PM

well,

if u use that hack called "advanced bbcode permissions" then something like this should work

PHP Code:

if(!$vbulletin->userinfo['permissions']['advanced_bbcode_usergroup_permissions'] & !$vbulletin->bf_ugp_advanced_bbcode_usergroup_permissions['allow_bbcode_modwarn'])//this is set in the bitfield XML 
{
        
//no permission



Darat 02-12-2006 05:29 PM

I've got the advanced bbcode hack installed and working but if I post more then one tag in a thread only the first one is correctly parsed, the subsequent tags are ignored as if I had no permission.

Luggruff 02-15-2006 11:20 AM

Quote:

Originally Posted by Darat
<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>

What is 1024 and 2048?

Quote:

Originally Posted by Delphiprogrammi
well,

if u use that hack called "advanced bbcode permissions" then something like this should work

PHP Code:

if(!$vbulletin->userinfo['permissions']['advanced_bbcode_usergroup_permissions'] & !$vbulletin->bf_ugp_advanced_bbcode_usergroup_permissions['allow_bbcode_modwarn'])//this is set in the bitfield XML 
{
        
//no permission



would work? instead of Darat's solution? And where to put it?

Details please !

Delphiprogrammi 02-15-2006 08:22 PM

Quote:

Originally Posted by Luggruff
What is 1024 and 2048?

those are the bitfield values vbulletin uses to identify each bitfield you can read this if you want to better understand it

Quote:

Originally Posted by Luggruff
would work? instead of Darat's solution? And where to put it?

Details please !

that code would check the value of a bitfield.I didn't check if it *does* work correctly.These two tags are a nice thing but it needs some way to reserve it for mods,supermods, or administrators.We need to figure out what hook location can be used to get that effect


All times are GMT. The time now is 01:45 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.01076 seconds
  • Memory Usage 1,754KB
  • 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_php_printable
  • (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