Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Admin/Mod BBcodes Details »»
Admin/Mod BBcodes
Version: 1.00, by VaaKo VaaKo is offline
Developer Last Online: Dec 2007 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 01-13-2006 Last Update: Never Installs: 71
Additional Files  
No support by the author.

this is an easy hack for admins and mods who edit their users' posts and always wanna leave a msg at the bottom of it!

check the screenshots!
download the zip file for installation instructions!

For those who are looking to restrict the use of these bbcodes for normal users, please use this hack:
Advanced BBcode Permissions

http://www.oneforum.org

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-13-2006, 10:39 PM
Brent H's Avatar
Brent H Brent H is offline
 
Join Date: Sep 2004
Location: Phoenix, AZ
Posts: 162
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome! Thanks for this
Reply With Quote
  #3  
Old 01-13-2006, 11:44 PM
Julie's Avatar
Julie Julie is offline
 
Join Date: Mar 2005
Location: Oslo, Norway
Posts: 187
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Say a regular user knows, or finds out about this certain tag, what will stop he/she from using it?

Because if it's somehow restricted to admins/mods, I'd like to use it!
Reply With Quote
  #4  
Old 01-14-2006, 01:11 AM
COBRAws's Avatar
COBRAws COBRAws is offline
 
Join Date: Oct 2002
Location: Buenos Aires
Posts: 864
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Julie
Say a regular user knows, or finds out about this certain tag, what will stop he/she from using it?

Because if it's somehow restricted to admins/mods, I'd like to use it!
I believe its only for staff, cuz the title says "Admin/Mod BBcodes"

I want to know that too, so ill wait.
Reply With Quote
  #5  
Old 01-14-2006, 07:05 AM
Yorixz Yorixz is offline
 
Join Date: Jun 2005
Location: Netherlands
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by COBRAws
I believe its only for staff, cuz the title says "Admin/Mod BBcodes"

I want to know that too, so ill wait.
The title says so but theres not a single line or whatsoever that would stop members from using it; they'll actually see the bbcode if they quote a post.

Very nice hack, but imho a bit unusable without restriction.
Reply With Quote
  #6  
Old 01-14-2006, 08:00 AM
VaaKo VaaKo is offline
 
Join Date: Jul 2005
Location: Lebanon
Posts: 400
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you could use the "permission bbcode" hack release somewhere in here!
you're right about what you said, my suggestion is to use the hack I mentioned along with this one, you will restrict normal users from using certain bbcodes along with this one!
Reply With Quote
  #7  
Old 01-14-2006, 08:21 AM
PersianImmortal PersianImmortal is offline
 
Join Date: Dec 2005
Location: Australia
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great mod. Very handy for mods and admins, and makes it harder for members to pretend they never saw an admin/mod edit.

I'd say it would be pretty ballsy for a user to use these tags in their own posts. Obviously imitating a mod or admin would be grounds for punishment.
Reply With Quote
  #8  
Old 01-14-2006, 10:37 AM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice addition!
Reply With Quote
  #9  
Old 01-14-2006, 01:45 PM
bang bang is offline
 
Join Date: Sep 2005
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

have been looking for this! is it possible to make the text be alligned to the center of the [!] sign? right now it's on top and it looks rather odd.
Reply With Quote
  #10  
Old 01-14-2006, 01:55 PM
Jaynesh Jaynesh is offline
 
Join Date: Nov 2005
Location: London, UK
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks very nice, i will be giving this a try
Reply With Quote
  #11  
Old 01-14-2006, 04:02 PM
VaaKo VaaKo is offline
 
Join Date: Jul 2005
Location: Lebanon
Posts: 400
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bang
have been looking for this! is it possible to make the text be alligned to the center of the [!] sign? right now it's on top and it looks rather odd.
tweak the php code, maybe use this

HTML Code:
<valign="center">{param}
Reply With Quote
  #12  
Old 01-14-2006, 09:03 PM
Darat Darat is offline
 
Join Date: Aug 2004
Posts: 329
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Don Corleone
you could use the "permission bbcode" hack release somewhere in here!
you're right about what you said, my suggestion is to use the hack I mentioned along with this one, you will restrict normal users from using certain bbcodes along with this one!
I'd like to install this but I want to restrict it's use to only mods and admins - I've looked for the hack you mention "permission bbcode" but can't find it anywhere?
Reply With Quote
  #13  
Old 01-14-2006, 10:14 PM
VaaKo VaaKo is offline
 
Join Date: Jul 2005
Location: Lebanon
Posts: 400
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is it:

Advanced BBCode Permissions
Reply With Quote
  #14  
Old 01-15-2006, 07:49 AM
Yorixz Yorixz is offline
 
Join Date: Jun 2005
Location: Netherlands
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Yorick
Any news on custom bbcodes?
Quote:
Originally Posted by Abe1
Doesn't look like it's possable unless VB loads the custom bbcode admin PHP with hooks.
In the topic https://vborg.vbsupport.ru/showthread.php?t=103747

So I'm afraid you can't restrict these two custom bbcodes
Reply With Quote
  #15  
Old 02-07-2006, 08:53 PM
Wild-Wing Wild-Wing is offline
 
Join Date: Dec 2005
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its a pain in the ass to restrict them you have to hard code them. damn.
heres the code
go to class_bbcode
add theses some where
Code:
/**
	* Handles a [admin] tag. Displays a preformatted string.
	*
	* @param	string	The code to display
	*
	* @return	string	HTML representation of the tag.
	*/
	function handle_bbcode_admin($code)
	{
		global $vbulletin, $vbphrase, $stylevar, $show;

		// remove unnecessary line breaks and escaped quotes
		$code = str_replace(array('<br>', '<br />', '\\"'), array('', '', '"'), $code);

		$code = $this->strip_front_back_whitespace($code, 1);
		if ($this->printthread)
		{
			$code = $this->emulate_pre_tag($code);
			$template = 'bbcode_admin_printthread';
		}
		else
		{
			$blockheight = $this->fetch_block_height($code);
			$template = 'bbcode_admin';
		}

		eval('$html = "' . fetch_template($template) . '";');
		return $html;
	}
	/**
	* Handles a [mod] tag. Displays a preformatted string.
	*
	* @param	string	The code to display
	*
	* @return	string	HTML representation of the tag.
	*/
	function handle_bbcode_mod($code)
	{
		global $vbulletin, $vbphrase, $stylevar, $show;

		// remove unnecessary line breaks and escaped quotes
		$code = str_replace(array('<br>', '<br />', '\\"'), array('', '', '"'), $code);

		$code = $this->strip_front_back_whitespace($code, 1);
		if ($this->printthread)
		{
			$code = $this->emulate_pre_tag($code);
			$template = 'bbcode_mod_printthread';
		}
		else
		{
			$blockheight = $this->fetch_block_height($code);
			$template = 'bbcode_mod';
		}

		eval('$html = "' . fetch_template($template) . '";');
		return $html;
	}
find [CODE]if ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_CODE)
{
//
Code:
			$tag_list['no_option']['code'] = array(
				'callback' => 'handle_bbcode_code',
				'strip_empty' => true,
				'disable_smilies' => true,
				'disable_wordwrap' => true,
				'strip_space_after' => 1
			);
		}
after add:
[CODE]if ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_ADMINWARN)
{
//[CODE]
$tag_list['no_option']['admin'] = array(
'callback' => 'handle_bbcode_admin',
'strip_empty' => true,
'disable_smilies' => true,
'disable_wordwrap' => true,
'strip_space_after' => 1
);
}
if ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_MODWARN)
{
//
Code:
			$tag_list['no_option']['mod'] = array(
				'callback' => 'handle_bbcode_mod',
				'strip_empty' => true,
				'disable_smilies' => true,
				'disable_wordwrap' => true,
				'strip_space_after' => 1
			);
		}
find this at the top of the file
Code:
define('ALLOW_BBCODE_HTML',  512);
after add :
Code:
define('ALLOW_BBCODE_MODWARN',  1024);
define('ALLOW_BBCODE_ADMINWARN',  2048);
save that file

open class_bbcode_alt.php
find:
Code:
function handle_bbcode_code($code)
	{
		$current_tag =& $this->current_tag;

		$code = str_replace('  ', ' &nbsp;', $code);
		$code = preg_replace('#(\r\n|\n|\r|<p>)( )(?!([\r\n]}|<p>))#i', '$1&nbsp;', $code);

		return "[$current_tag[name]]" . $code . "[/$current_tag[name]]";
	}
after add:
Code:
function handle_bbcode_admin($code)
	{
		$current_tag =& $this->current_tag;

		$code = str_replace('  ', ' &nbsp;', $code);
		$code = preg_replace('#(\r\n|\n|\r|<p>)( )(?!([\r\n]}|<p>))#i', '$1&nbsp;', $code);

		return "[$current_tag[name]]" . $code . "[/$current_tag[name]]";
	}
		function handle_bbcode_mod($code)
	{
		$current_tag =& $this->current_tag;

		$code = str_replace('  ', ' &nbsp;', $code);
		$code = preg_replace('#(\r\n|\n|\r|<p>)( )(?!([\r\n]}|<p>))#i', '$1&nbsp;', $code);

		return "[$current_tag[name]]" . $code . "[/$current_tag[name]]";
	}
then make templates.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:33 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05261 seconds
  • Memory Usage 2,358KB
  • Queries Executed 28 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_code
  • (1)bbcode_html
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (15)post_thanks_box
  • (15)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (15)post_thanks_postbit_info
  • (14)postbit
  • (15)postbit_onlinestatus
  • (15)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete