Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Allow usergroups ( Admins ) to use HTML for posts , sigs Details »»
Allow usergroups ( Admins ) to use HTML for posts , sigs
Version: 1.01, by Tekton Tekton is offline
Developer Last Online: Jun 2009 Show Printable Version Email this Page

Version: 3.0.6 Rating:
Released: 02-01-2005 Last Update: Never Installs: 52
 
No support by the author.

___________
NOTE: While the primary purpose of this hack is to allow the usergroup to use html in their sig, they may also use it in threads/posts as well. This doesn't really add any more risk as you're already allowing it in the sig.

???????????
Requested Here

Estimated Time: ~2 minutes [ Any questions? This thread only please ]

// ###### INSTALLATION ######

IN INCLUDES/FUNCTIONS_BBCODEPARSE.PHP
Find:
PHP Code:
// ###################### Start bbcodeparse2 #######################
function parse_bbcode2($bbcode$dohtml$dobbimagecode$dosmilies$dobbcode$iswysiwyg 0$donl2br 1)
{
// parses text for vB code, smilies and censoring
global $DB_site$vboptions$bbuserinfo$templatecache$smiliecache
Change to:
PHP Code:
// ###################### Start bbcodeparse2 #######################
function parse_bbcode2($bbcode$dohtml$dobbimagecode$dosmilies$dobbcode$iswysiwyg 0$donl2br 1)
{
// parses text for vB code, smilies and censoring
global $DB_site$vboptions$bbuserinfo$templatecache$smiliecache$userinfo$post
----

Find:
PHP Code:
// ********************* REMOVE HTML CODES ***************************
if(!$dohtml
Change to:
PHP Code:
$html_allowed=array(6); // add more by seperating each by commas in the ()'s: (6,8,19)
// ********************* REMOVE HTML CODES ***************************
if(!$dohtml && !in_array($userinfo[usergroupid],$html_allowed)&& !in_array($post[usergroupid],$html_allowed)) 
Note: Edit the values in the "$html_allowed" array to change or add usergroups.
// ==========

DONE! This hack has been tested and does work~ Use at your own risk! (I'm not responsible, etc etc)

Show Your Support

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

Comments
  #12  
Old 02-03-2005, 04:36 AM
Spyke's Avatar
Spyke Spyke is offline
 
Join Date: Jan 2003
Location: Canada
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Tekton
I'm not sure how vB would handle javascript inside of posts/sigs, but I know that it works for plain html~
Ok, thanks anyway
Reply With Quote
  #13  
Old 02-03-2005, 07:55 AM
Tekton Tekton is offline
 
Join Date: Jun 2004
Location: Wisconsin
Posts: 362
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Spyke
Ok, thanks anyway
I've tried a bit of javascript, but it doesn't seem to work? Oh well~

If anyone ever gets some working, let me know
Reply With Quote
  #14  
Old 02-07-2005, 11:59 AM
Carnage Carnage is offline
 
Join Date: Jan 2005
Location: uk
Posts: 760
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I acctually have my own personal sig replaced by the output of a php function. i have fun by adding things like the readers username into my sig, it got alot of members really paranoid until they figured it out because its a php file, i can pull any data i want from the vbdb and display it there, things i've thought about doing are having different sigs in different forums i already show different sigs to different users... i've done random images as well... Some great fun can be had with it
Reply With Quote
  #15  
Old 02-08-2005, 12:00 AM
DeMiNe0 DeMiNe0 is offline
 
Join Date: Jun 2004
Posts: 175
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Carnage-, how did you manage to do that? I could have alot of fun with that. "$bbuserinfo['username'] has been banned!"
Reply With Quote
  #16  
Old 02-08-2005, 01:19 PM
chriswible chriswible is offline
 
Join Date: Sep 2003
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Tekton
Just change the 6 to the usergroup that you want to allow if you want it to work for someone else.

Or for multiple I think it's:
PHP Code:
if($userinfo[usergroupid]==in_array(678)||$post[usergroupid]==in_array(678)) 

Please correct me if that's wrong.
That didn't work for me... in_array doesn't work that way in my experience.

Here's how I did it:
PHP Code:
$html_groups = array(6,19);
 
if(
in_array($userinfo[usergroupid],$html_groups)||in_array($post[usergroupid],$html_groups)){ 
Anyway, Great hack, thanks. *thinks of all the evil things he's going to do now*
Reply With Quote
  #17  
Old 02-08-2005, 10:48 PM
Tekton Tekton is offline
 
Join Date: Jun 2004
Location: Wisconsin
Posts: 362
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah, you're right. I just realized this the other day too; I'll go change that. Thanks~ ^__^;
Reply With Quote
  #18  
Old 02-09-2005, 11:35 PM
oil oil is offline
 
Join Date: Feb 2005
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just that did it right now

I replace
Quote:
// ********************* REMOVE HTML CODES ***************************
if(!$dohtml)
with this one
Quote:
$html_groups = array(6,5);
if(in_array($userinfo[usergroupid],$html_groups)||in_array($post[usergroupid],$html_groups)){

// ********************* REMOVE HTML CODES ****************
if(!$dohtml && $tx2x==0)
and the ending, open bracket "{" is also right ??
Reply With Quote
  #19  
Old 02-10-2005, 06:44 AM
neocorteqz's Avatar
neocorteqz neocorteqz is offline
 
Join Date: May 2002
Location: Barefoot Bay Fl
Posts: 473
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by oil
just that did it right now

I replace


with this one


and the ending, open bracket "{" is also right ??
Quote code in code brackets, it prevents non licensed users from viewing it.

and the bracket is supposed to be a } unless he has more code and doesn't need to close it yet.

If you're getting an error, try a } instead of a {
Reply With Quote
  #20  
Old 02-10-2005, 12:43 PM
oil oil is offline
 
Join Date: Feb 2005
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

now I closed the last bracket } and still get this error
only on the multiple usersgroup, the singel usergrous just work fine

Parse error: parse error in
/usr/www/odb14/domain.com/htdocs/forum/includes/functions_bbcodeparse.php on line 347

Fatal error: Call to undefined function: parse_bbcode2() in
/usr/www/odb14/domain.com/htdocs/forum/includes/functions_bbcodeparse.php on line 299
Reply With Quote
  #21  
Old 02-10-2005, 01:01 PM
Tekton Tekton is offline
 
Join Date: Jun 2004
Location: Wisconsin
Posts: 362
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There should be no {}'s on that line.

Find:
PHP Code:
// ********************* REMOVE HTML CODES *************************** 
if(!$dohtml
Change to:
PHP Code:
$group_check= array(6,19); 
if(
in_array($userinfo[usergroupid],$group_check)||in_array($post[usergroupid],$group_check)) 
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 01:01 AM.


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.08820 seconds
  • Memory Usage 2,332KB
  • Queries Executed 25 (?)
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
  • (8)bbcode_php
  • (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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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