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

Reply
 
Thread Tools
Disable Smileys and Annoying Images by BOP5 VB4 Details »»
Disable Smileys and Annoying Images by BOP5 VB4
Version: 2.0, by BirdOPrey5 (Senior Member) BirdOPrey5 is offline
Developer Last Online: Aug 2023 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.x.x Rating:
Released: 04-16-2011 Last Update: 04-21-2011 Installs: 19
Supported Uses Plugins
Translations  

Screenshots: Attached

Demo: http://www.juot.net/forums/showthread.php?t=57401
This is a test section of my forum, you will have to register to disable the smileys. (VB3 Version, but identical code.)

Version 2.0

*Bug Fixed - Smileys now fixed for guest viewing *

The main point of this mod is to add the much needed option IMO to disable simleys (smilies) for users like they can images, avatars, and signatures.

This became an issue on my forum because I have some large animated smileys and a new member had a medical condition where it was dangerous for him to view such images.

This mod will allow you to disable smileys for certain users. You can choose from the following:
1) (Preferred Method) Add a custom profile field to allow users to enable or disable this on their own. Instructions included in the zip file on how to do this.

2) Disable by usergroup, You can disable smileys by entering the usergroup id, both primary or secondary groups will work.

3) Disable for specific users- You can enter specific userids to disable for a select few users of your choice.

Disabled smileys will be replaced by their title or name. Such as becomes {EEK!}.

Limitations of the mod:

For this to work all your smileys must be in the default path which is images/smilies. They can also be in the fuller path /forums/images/smilies. If they are stored anywhere else this mod will not disable them.

Also the "title" or the "name" of the smileys can not contain a double quote (") character. Names/titles are limited to numbers, letters, underscores, dashes, and some other special characters all of which are listed in the instructions. (Some of them are !, @, #, $, %, &, *, <, >, etc...)

I doubt this will work with Non-English characters but I haven't tried it.

In addition to disabling smileys this mod can also disable images you deem annoying... Again for me I used this to disable some fast-flashing images popular on my forum but which could cause medical concern for some users.

In order to use this part of the mod you must view the HTML source code of your forum and copy the entire <img> tag responsible for the image, and paste it into the mod. The complete tag from < to > is needed. You paste 1 per line into the box in the settings.

You must also specify replacement text in the next box. 1 replacement for each image you want to disable. Keep these lines to match the images above.

This second half of the mod is basically just the built in "Replacement Variable" option in vBulletin except it works on all styles and only works on users you specify or whom have enabled the option. You can use it to replace anything you want, not just images if you want to.

1 Product
- 1 Plugin
- No Files
- No Templates
- No Phrases

Download Now

File Type: zip BOP5 - Disable Smileys - VB4.zip (516.1 KB, 97 views)

Screenshots

File Type: jpg Disable Smiley Mod Settings.jpg (151.8 KB, 0 views)
File Type: jpg Smileys Disabled VB4.jpg (83.8 KB, 0 views)
File Type: jpg Smileys Enabled VB4.jpg (73.0 KB, 0 views)
File Type: jpg Custom Field VB4.jpg (17.0 KB, 0 views)

Show Your Support

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

Comments
  #2  
Old 04-18-2011, 09:04 AM
sticky sticky is offline
 
Join Date: Sep 2003
Posts: 934
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible for the user to choose for themselves?
Reply With Quote
  #3  
Old 04-18-2011, 12:05 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, as I explain above the "preferred method" is to create a custom user profile field to control the mod. Instructions on how to do so are in the .txt file in the .zip.
Reply With Quote
  #4  
Old 04-22-2011, 10:54 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quick update. The mod was disabling all smileys for guests- fixed this and updated the top post with the fixed version.
Reply With Quote
  #5  
Old 04-27-2011, 09:09 AM
sticky sticky is offline
 
Join Date: Sep 2003
Posts: 934
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BirdOPrey5 View Post
Yes, as I explain above the "preferred method" is to create a custom user profile field to control the mod. Instructions on how to do so are in the .txt file in the .zip.
Thank you.
Reply With Quote
  #6  
Old 06-23-2011, 02:17 AM
dai-kun dai-kun is offline
 
Join Date: Jul 2005
Posts: 238
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't seem to get this to work.

My smilies url is domain.com/forum/images/smilies
Tried on smilie

I went to edit the plugin to make it /forum/ instead of /forums/
I set up profile field correctly. Added in 9 and even field9 as my custom field.
Went into my settings and selected second choice Yes to disable smilies.

I even tried doing it per user on myself and it's still showing.

What else can I do?
Reply With Quote
  #7  
Old 06-23-2011, 09:20 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First I would suggest re-installing with "allow-overwrite" set to YES this way we can be sure you are starting with the original code.

Next to edit the plugin to use /forum/ instead of /forums/ change this line in the plugin:
Code:
$bfind = '|<img src="[/forums/]*images/smilies/[\w -.]+" border="0" alt="" title="([\w !@$#%&*()+-=?<>\';:]+)" class="inlineimg" />|';
to:

Code:
$bfind = '|<img src="[/forum/]*images/smilies/[\w -.]+" border="0" alt="" title="([\w !@$#%&*()+-=?<>\';:]+)" class="inlineimg" />|';
For the field number you enter ONLY the number. 9 in your case. It should not have even allowed you to enter "field9" without an error message.

Definitely keep your userid in the manual block setting until we get it working- 1 less thing to troubleshoot.

Are your smiliey file names and php in english? I haven't tested on non-english installations and I think the regex that does the work in this mod would need to be altered for non-english ("A to Z") characters.

Finally if still not working please copy and paste here several filenames of your smilies that you're tested and post or PM me a link to a post on your forum with a smiley in it.
Reply With Quote
  #8  
Old 08-22-2011, 11:13 PM
John Lester John Lester is offline
 
Join Date: Nov 2004
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi BOP

Great mod, I also have members with photosensitive epilepsy. I was wondering if it would be possible to add another path (a sub folder to /images/smilies) and option (radio button)? I have a bunch of added smilies in a separate sub folder that I'd like to allow them the option to disable.

I would move them to the default smilie directory, but some of my members like the default smilies but not the added ones. So if they also had the option to turn off the added ones while leaving the defaults they'd like it
Reply With Quote
Благодарность от:
BirdOPrey5
  #9  
Old 08-23-2011, 01:34 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you edit the plugin "Disable Smileys" in your Plugin Manager,

Find the line:

Code:
$bfind = '|<img src="[/forums/]*images/smilies/[\w -.]+" border="0" alt="" title="([\w !@$#%&*()+-=?<>\';:]+)" class="inlineimg" />|';
And add a subforum like this:

Code:
$bfind = '|<img src="[/forums/]*images/smilies/subforum/[\w -.]+" border="0" alt="" title="([\w !@$#%&*()+-=?<>\';:]+)" class="inlineimg" />|';
Then the mod will only disable the smilies in that subforum and ignore the regular ones.
Reply With Quote
  #10  
Old 08-23-2011, 05:58 AM
John Lester John Lester is offline
 
Join Date: Nov 2004
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the quick response Perhaps I wasn't as clear as I thought I was (happens a lot ).

I want my users to have 2 options, to be able to "disable default smililes" and to "disable additional smilies".

Some of my users don't like the additional smilies and want to turn them off, but keep the default smilies.

My epilepsy members would want to turn them both off.

If it's too much trouble then I'll just move the additional smilies into the smilie folder and call it good
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:58 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.04612 seconds
  • Memory Usage 2,335KB
  • Queries Executed 24 (?)
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
  • (4)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (5)postbit_attachment
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete