Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-11-2004, 04:51 PM
Caspartheghost Caspartheghost is offline
 
Join Date: Jan 2004
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default HTML just for admins?

Is it possible to only allow HTML posting for admin or a specified group, or even one user?

What I really want is to give the admins the ability to insert a javascript into their/ my signatures

All admins are trusted, btw
Reply With Quote
  #2  
Old 02-11-2004, 05:25 PM
Dark_Wizard Dark_Wizard is offline
 
Join Date: Nov 2001
Location: North Carolina
Posts: 1,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

All admins are trusted? Hmmm... anyway just set it per usergroup in the usergroup manager....
Reply With Quote
  #3  
Old 02-11-2004, 07:24 PM
Caspartheghost Caspartheghost is offline
 
Join Date: Jan 2004
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where abouts, I don't see the option there?
Reply With Quote
  #4  
Old 02-12-2004, 12:19 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you add that ability, some tags in your php boxes will not show up right in the code. If you post any code on your board with those tags, I would advise not to turn that on.
Reply With Quote
  #5  
Old 08-01-2004, 03:48 PM
Michael Morris's Avatar
Michael Morris Michael Morris is offline
 
Join Date: Nov 2003
Location: Knoxville TN
Posts: 774
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I need a similar setup for my vb CMPS pages. I start threads in the news forums but anyone on the board can post replies. How do I turn HTML on only for myself?
Reply With Quote
  #6  
Old 08-01-2004, 06:42 PM
technicali taze technicali taze is offline
 
Join Date: Jul 2004
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes i too want this.

Dark Wizard there is no option regarding posting html, vb code, php, or the likes in the usergroup -- usergroup manager -- edit options
Reply With Quote
  #7  
Old 08-02-2004, 01:49 AM
romeshomey romeshomey is offline
 
Join Date: Oct 2002
Location: Ohio
Posts: 119
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Same here...
Reply With Quote
  #8  
Old 08-02-2004, 02:12 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Caspartheghost
This is how I did it (really baaaad code, but seems to work):

In functions_showthread.php FIND
PHP Code:
$post['signature'] = parse_bbcode($post['signature'], 'nonforum'$vboptions['allowsmilies']); 
REPLACE that with
PHP Code:
if ($post['permissions']['adminpermissions'] & CANCONTROLPANEL) {
  
$allowhtml $vboptions['allowhtml'];
  
$vboptions['allowhtml'] = true;
  
$post['signature'] = parse_bbcode($post['signature'], 'nonforum'$vboptions['allowsmilies']);
  
$vboptions['allowhtml'] = $allowhtml;
} else {
  
$post['signature'] = parse_bbcode($post['signature'], 'nonforum'$vboptions['allowsmilies']);

In member.php FIND
PHP Code:
// signature
if ($userinfo['signature'])
{
        require_once(
'./includes/functions_bbcodeparse.php');
        
$userinfo['signature'] = parse_bbcode($userinfo['signature'], 01); 
REPLACE that with
PHP Code:
// signature
if ($userinfo['signature'])
{
        require_once(
'./includes/functions_bbcodeparse.php');
        if (
$userinfo['permissions']['adminpermissions'] & CANCONTROLPANEL) {
          
$allowhtml $vboptions['allowhtml'];
          
$vboptions['allowhtml'] = true;
          
$userinfo['signature'] = parse_bbcode($userinfo['signature'], 01);
          
$vboptions['allowhtml'] = $allowhtml;
        } else {
          
$userinfo['signature'] = parse_bbcode($userinfo['signature'], 01);
        } 
Reply With Quote
  #9  
Old 08-02-2004, 02:28 AM
CarCdr CarCdr is offline
 
Join Date: Apr 2004
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

KirbyDE,

I suspect that
Code:
if ($post['permissions']['adminpermissions'] & CANCONTROLPANEL)
is not right. Perhaps
Code:
$permissions['adminpermissions'] & CANCONTROLPANEL)
although I am not sure in showthread.php where it is set. (Too tired to check. )

In any case, this suggested mod will only allow CANCONTROLPANEL to view/run the HTML. I am not sure, but I think the request might be for admin's to be able to post and all to view/run.

Cheers
Reply With Quote
  #10  
Old 08-02-2004, 02:51 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

$permissions does give you the permissions for the current user, whereas $post['permissions'] contains the permissions for the user who made the post.

And this is exactly what was requested here: Check if the user who made the post has admin permissions and then parse his sig with HTML enabled.
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 06:17 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.05238 seconds
  • Memory Usage 2,271KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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