vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=262161

Disable Smileys and Annoying Images by BOP5 VB4
by BirdOPrey5
17 Apr 2011 22:41

5 Attachment(s)
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 :eek: 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

sticky 18 Apr 2011 11:04

Is it possible for the user to choose for themselves?

BirdOPrey5 18 Apr 2011 14:05

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.

BirdOPrey5 22 Apr 2011 12:54

Quick update. The mod was disabling all smileys for guests- fixed this and updated the top post with the fixed version.

sticky 27 Apr 2011 11:09

Quote:

Originally Posted by BirdOPrey5 (Post 2185941)
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.

dai-kun 23 Jun 2011 04:17

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?

BirdOPrey5 23 Jun 2011 11:20

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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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.

John Lester 23 Aug 2011 01:13

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 :D

BirdOPrey5 23 Aug 2011 03:34

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

Find the line:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And add a subforum like this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Then the mod will only disable the smilies in that subforum and ignore the regular ones.

John Lester 23 Aug 2011 07:58

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

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 :cool:

BirdOPrey5 23 Aug 2011 13:01

It would be a lot of work for an unusual request. I was giving you an alternative.

John Lester 24 Aug 2011 00:28

Yea I realized it wouldn't be easy :D I'll just move the other smilies :)

Limality 01 Sep 2011 11:41

Hello, I followed the instructions to the dot and I still seem to have problems getting this mod to work. All Smilies are in the default smilies folder as it should be. One thing to mention though is, that most of the smilies were imported from phpBB earlier yesterday, but they seem to sit in the default smilies folder of vB. Also, I'm using the German Language Pack on my forum if that's any help in finding out what exactly isn't working.

vBulletin 4.1.5

Update

I removed [/forums/]* from this line...


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to make it...


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This kind of worked for one smiley which is a .png, all other gifs are small animated gifs or transparent gifs and they're still visible. Another information I missed to mention earlier is that my forum runs directly from the domain http://www.lostgamers.ch/

BirdOPrey5 01 Sep 2011 13:09

Removing [/forums/]* doesn't do anything of value, the * means it's optional, it doesn't have to be there.

The problem is you aren't using any titles for your smilies- probably because they were imported from phpbb. The mod needs a title for each smiley to work.

Limality 01 Sep 2011 21:14

Quote:

Originally Posted by BirdOPrey5 (Post 2240779)
Removing [/forums/]* doesn't do anything of value, the * means it's optional, it doesn't have to be there.

The problem is you aren't using any titles for your smilies- probably because they were imported from phpbb. The mod needs a title for each smiley to work.

Indeed, it is as you say :D I must've overread the part where it mentions the titles for smilies! Thank you for the help!

Cheers
Limality

OldSchoolDSL 19 Dec 2011 22:07

BirdOPrey5, just wondering if you plan on expanding on this modification? Perhaps a per user option, where users themselves could elect to ignore photos all together (globally) or from a particular user?

Thank you in advance for taking the time to answer my reply :)

BirdOPrey5 19 Dec 2011 22:58

Users can already disable images globally already in the user cp.

Per user image ignore is interesting but truthfully I doubt I will be adding it to this mod.

OldSchoolDSL 19 Dec 2011 23:14

Quote:

Originally Posted by BirdOPrey5 (Post 2279215)
Users can already disable images globally already in the user cp.

Per user image ignore is interesting but truthfully I doubt I will be adding it to this mod.

With so many setting within vBulletin, I often forget what is already there. :o

Thank you for taking the time to answer my question BirdOPrey5 :)

walsc 20 Dec 2011 22:42

I searched for exactly this, thank you!
After reading your instructions I added a profile field, installed this addon, enabled it for the additional profile field, but it does not work.
If I enter a user-id to disable smilies it works perfect.
I don't know what I've done wrong with the profile-field.
My VB is version 4.1.9.

GRE 15 Dec 2012 07:46

How we keep the same text? :D to become : D (without space)

BirdOPrey5 18 Dec 2012 20:00

Not an option with this mod, sorry.

yukirina 21 Jun 2014 20:38

What happens to the smiley for people using this mod? Does it revert to the text based format?

BirdOPrey5 22 Jun 2014 11:18

It replaces the image with the name/title of the smiley inside curly brackets...

So... :happy: might become {Happy Face} if "Happy Face" was the title of the smilie.


All times are GMT. The time now is 22:34.

Powered by vBulletin® Version 3.8.13
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.