Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 01 Feb 2016, 16:50
jkotlowski jkotlowski is offline
 
Join Date: May 2015
Automatically resize IMG tags in user signatures?

Hi, I thought for the longest that the sizing options for signatures in the admin CP allowed you adjust the max size of anything in the signature, BBcodes included. But it seems I was wrong.

Is there a method for automatically sizing IMG bbcode in the signature? I'd like to set a maximum of around 500 pixels in width, if possible.
Reply With Quote
  #2  
Old 01 Feb 2016, 17:30
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
You could create a plugin as follows:

Product: vBulletin

Hook Location: parse_templates

Title: Restrict size of images in signatures

Execution Order: 5

Plugin PHP Code:


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

Plugin is Active: Yes

Click "Save".
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #3  
Old 01 Feb 2016, 21:53
jkotlowski jkotlowski is offline
 
Join Date: May 2015
Originally Posted by MarkFL View Post
You could create a plugin as follows:

Product: vBulletin

Hook Location: parse_templates

Title: Restrict size of images in signatures

Execution Order: 5

Plugin PHP Code:


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

Plugin is Active: Yes

Click "Save".
Hi, thanks for the reply.

I'm having some difficulty here. This would be implemented through the "Hooks & Products System" correct?

If so, there's no "parse_templates" in the hook location drop menu.
Reply With Quote
  #4  
Old 01 Feb 2016, 22:03
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
You could also just add

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

To the CSS/additional.css template.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #5  
Old 01 Feb 2016, 23:08
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Originally Posted by jkotlowski View Post
Hi, thanks for the reply.

I'm having some difficulty here. This would be implemented through the "Hooks & Products System" correct?

If so, there's no "parse_templates" in the hook location drop menu.
I didn't notice this was a vB5 request...when you see this thread in the "New Posts" search, that information doesn't show up for some reason.

So yes, just add it to the additional CSS template as mentioned.
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #6  
Old 01 Feb 2016, 23:42
jkotlowski jkotlowski is offline
 
Join Date: May 2015
Thanks for the help, both of you. It seems there's a bug with VB 5.2.0 that doesn't allow me access to the template edits... lol.

I'll install the patch to fix that early in the morning when traffic is low and add it to my additional CSS then.
Reply With Quote
  #7  
Old 02 Feb 2016, 03:37
Replicant's Avatar
Replicant Replicant is offline
 
Join Date: Sep 2014
Real name: Mel
Originally Posted by jkotlowski View Post
Thanks for the help, both of you. It seems there's a bug with VB 5.2.0 that doesn't allow me access to the template edits... lol.

I'll install the patch to fix that early in the morning when traffic is low and add it to my additional CSS then.
FYI, even after the 5.2.1 patch, I had issues in AdminCP with Firefox but Chrome worked perfectly.
__________________
VB5 mods - RepliClock VB4 mods - Member Online Status
Reply With Quote
  #8  
Old 02 Feb 2016, 11:21
jkotlowski jkotlowski is offline
 
Join Date: May 2015
So... I've added the code to the additional.css section of my styles. And it doesn't seem to be having any effect on image sizes in the signature.


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

Am I supposed to add something to it...?

Thanks for the help.
Reply With Quote
  #9  
Old 02 Feb 2016, 11:29
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
It is possible your version of vB uses a different CSS class...please post a link to a page on your site where a signature is visible, and I will look at the page source.
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #10  
Old 02 Feb 2016, 11:30
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Try this.

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

*might be wrong, just waking up.

Last edited by final kaoss; 02 Feb 2016 at 11:59.
Reply With Quote
  #11  
Old 02 Feb 2016, 12:39
jkotlowski jkotlowski is offline
 
Join Date: May 2015
Originally Posted by MarkFL View Post
It is possible your version of vB uses a different CSS class...please post a link to a page on your site where a signature is visible, and I will look at the page source.
http://www.t5forums.com/forum/main-f...772#post161772

Thanks.

Originally Posted by final kaoss View Post
Try this.

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

*might be wrong, just waking up.
This did make signatures smaller. But it also made every other image on the page the same size, including the smilies. So, close! Thanks for trying.
Reply With Quote
  #12  
Old 02 Feb 2016, 13:07
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Okay, please try:


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

__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #13  
Old 02 Feb 2016, 13:14
jkotlowski jkotlowski is offline
 
Join Date: May 2015
Originally Posted by MarkFL View Post
Okay, please try:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Worked beautifully! Thanks so much.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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


New To Site? Need Help?

All times are GMT. The time now is 15:59.

Layout Options | Width: Wide Color: