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

Reply
 
Thread Tools
Require Approval for HTML Signatures Details »»
Require Approval for HTML Signatures
Version: 1.6, by antialiasis antialiasis is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 05-07-2006 Last Update: 06-06-2006 Installs: 6
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

This hack in a nutshell: To avoid security risks and general page mess-ups by users who are inexperienced at HTML, users will have to get HTML signatures approved before they are shown in the forums.

The full functionality of this hack is perhaps better explained by the features and screenshots.

Admin and approver features:

- Fully phrased (unless I missed something)
- Specify groups which can approve HTML signatures in the Admin CP (moderators, super moderators and administrators by default)
- View list of all unapproved HTML signatures
- View a single HTML signature's code without having it executed on the page or preview it after making sure it does not posess a security risk

User features:

- Either use a normal BBCode signature, which does not need approval, or an advanced HTML signature
- Normal BBCode signature, if any, is used while HTML signature has not yet been approved
- HTML is shown as "on" in Forum Rules box when editing HTML signature to avoid confusion, and is parsed in HTML signature preview

PLEASE NOTE THAT THIS HACK FAILS CATASTROPHICALLY IN VBULLETIN 3.6.0. A separate version for vBulletin 3.6 will be released soon.


Version History:

1.6: Another missing TABLE_PREFIX added and the setting is now definitely included. No changes have been made to htmlsig.php, so to upgrade you only need to download the zip and import the new product-htmlsigapproval.xml.
1.5: HTML signatures now work in PMs. Added missing TABLE_PREFIX in a query. To upgrade: Again, reupload htmlsig.php and import the new product-htmlsigapproval.xml, making sure that "Allow Overwrite" is on.
1.1: It used to make HTML disabled in your already-approved HTML signature again after you edited it; now that's fixed. To upgrade: Reupload htmlsig.php and import the new product-htmlsigapproval.xml through the Admin CP, making sure that "Allow Overwrite" is ON.
1.0: Initial release.

---

Difficulty: Easy
Template edits: 5
Product installs: 1
File uploads: 1
Code modifications: 0
Additional database rows: 2

INSTALLATION INSTRUCTIONS

1: Unzip htmlsigapproval.zip.
2: Upload htmlsig.php to your main forum folder (the one containing global.php, forumdisplay.php, etc.)
3: Import product-htmlsigapproval.xml via the Admin CP Product Manager.
4: Go to vBulletin Options in the Admin CP, select User Profile Options and scroll to the bottom. Edit the setting "Groups that can approve of HTML signatures" to the groups you want to be able to approve HTML signatures. (Leave it as 5,6,7 if you want moderators, super moderators and administrators to have that ability.)
5: Make sure that "Allow HTML in Signatures?", located a little bit higher in the same setting group, is set to no - there's not much use having an HTML signature approval system if people can use HTML in their normal signatures without needing to have them approved!
6: Make the following template edits:

In modifysignature FIND

Code:
			<!-- message area -->
			<div class="smallfont">$vbphrase[your_signature]:</div>
			$messagearea
			<!-- / message area -->
ABOVE it add

Code:
                        <if condition="$usehtmlsignature"><div class="smallfont">$vbphrase[note_html_signature_approval]</div><br /></if>
and BELOW it (below the earlier code you searched for, not below what you just inserted) add

Code:
                        <if condition="$usehtmlsignature">
                                 <span class="smallfont"><a href="profile.php?$session[sessionurl]do=editsignature&amp;htmlsig=no">$vbphrase[standard_signature]</a></span>
                        <else />
                                 <span class="smallfont"><a href="profile.php?$session[sessionurl]do=editsignature&amp;htmlsig=yes">$vbphrase[html_signature]</a></span>
                        </if>
FIND

Code:
		<input type="hidden" name="s" value="$session[sessionhash]" />
		<input type="hidden" name="do" value="updatesignature" />
ABOVE it add

Code:
                <if condition="$usehtmlsignature">
                         <input type="hidden" name="htmlsig" value="yes" />
                </if>
FIND

Code:
	<td class="tcat">$vbphrase[edit_signature]</td>
REPLACE with

Code:
	<td class="tcat"><if condition="$usehtmlsignature">$vbphrase[edit_html_signature]<else />$vbphrase[edit_signature]</if></td>

In footer FIND

Code:
				<if condition="$show['modcplink']"><a href="$modcpdir/index.php$session[sessionurl_q]">$vbphrase[mod]</a> -</if>
BELOW it add

Code:
				<if condition="$show['htmlsiglink']"><a href="htmlsig.php$session[sessionurl_q]">$vbphrase[manage_html_signatures]</a> -</if>
7: Inform your users of the change so they won't get confused.

Please report any problems with the hack in this thread. I will try to fix them as soon as possible.

EDIT: Heh, forgot to attach the screenshots.

Show Your Support

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

Comments
  #2  
Old 05-08-2006, 06:48 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Whoa what a great feature to have for my forums. Thanks!
Reply With Quote
  #3  
Old 05-28-2006, 11:04 PM
antialiasis's Avatar
antialiasis antialiasis is offline
 
Join Date: Jan 2006
Location: Iceland
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Updated to version 1.1 for a fairly important feature.
Reply With Quote
  #4  
Old 06-02-2006, 01:04 AM
antialiasis's Avatar
antialiasis antialiasis is offline
 
Join Date: Jan 2006
Location: Iceland
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Version 1.5. HTML sigs now work in PMs and the hack will now be functional with table prefixes.
Reply With Quote
  #5  
Old 06-06-2006, 03:39 AM
ComputerVitals ComputerVitals is offline
 
Join Date: Oct 2005
Posts: 131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When importing the xml.. I get this

Quote:
Database error in vBulletin 3.5.4:

Invalid SQL:

ALTER TABLE usertextfield
ADD htmlsignature TEXT;

MySQL Error : Table 'cvital_forum.usertextfield' doesn't exist
Reply With Quote
  #6  
Old 06-06-2006, 12:17 PM
P Grizz P Grizz is offline
 
Join Date: Jan 2005
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'm using 3.5.3

i seem to be having 2 issues, the link to approve sigs in the footer simply isnt there.

also if i try to access htmlsig.php directly, it says I do not have permission to access the page. Is this a usergroup permissions situation? I couldnt find anything in usergroup permissions or in options.

"Groups that can approve of HTML signatures"
is not visible in user profile settings.
Reply With Quote
  #7  
Old 06-06-2006, 11:02 PM
antialiasis's Avatar
antialiasis antialiasis is offline
 
Join Date: Jan 2006
Location: Iceland
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Both of those should be fixed now.

I also just realized that HTML signatures aren't working in post/PM previews, and am working on that.
Reply With Quote
  #8  
Old 06-07-2006, 12:42 PM
P Grizz P Grizz is offline
 
Join Date: Jan 2005
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i"m still having the same problem....although last time installing this screwed up everyone's sigs....but once i uninstalled it and got rid of the extra code, they're sigs went back to normal...however, i reinstalled this with the fix and all the same problems I was having before still apply, accept everyone's sig is fine.....I can only assume it's either the version of vb I have, or a conflict with another plugin. Thanks for the effort though.
Reply With Quote
  #9  
Old 06-07-2006, 07:16 PM
antialiasis's Avatar
antialiasis antialiasis is offline
 
Join Date: Jan 2006
Location: Iceland
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The problem is definitely just the lack of that setting (as it checks for the setting when deciding whether to display the link in the bottom bar and gives you a no-permission message if you aren't in one of the allowed usergroups), but I can't for the life of me figure out why it isn't being added to your setting list since it definitely is a part of the product XML. I have only tested it on 3.5.4, but it seems very odd that this would have changed majorly since 3.5.3. I have a test board running 3.5.3, so I'll check if I succeed in installing it there...

EDIT: I installed it at my test forum and it worked just fine. Are you absolutely sure you imported the new product?

Incidentally, I updated the template edit instructions. They're pretty much just making the code a little more readable, though, so changing them should not be necessary.
Reply With Quote
  #10  
Old 06-07-2006, 08:47 PM
ComputerVitals ComputerVitals is offline
 
Join Date: Oct 2005
Posts: 131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just installed using your updated xml..
Works great here.

One question though.
When you add the link to the footer, I run vbdavanced, the link there is wrong but when in the forum the link is fine, Any way of making the link work in both? Or hiding the link in the front vbadvanced?
More info.. my root is just vbadvanced, the forums are in .com/forum/
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:07 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.04417 seconds
  • Memory Usage 2,305KB
  • Queries Executed 23 (?)
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
  • (9)bbcode_code
  • (1)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
  • (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
  • (9)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_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