Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > Programming Articles

Reply
 
Thread Tools
New Image Tag to reduce Imagesize
utw-Mephisto
Join Date: Jan 2005
Posts: 648

 

Show Printable Version Email this Page Subscription
utw-Mephisto utw-Mephisto is offline 08-13-2005, 10:00 PM

I had this done with Deaths with version 3.0.7 but it applies here as well of course.

This is not really professional but ey, it works for me

To post an image you usually use [IMG].

You can create another tag, let's say [IMGO] for oversized images.

Go to your admincp

Admincp => Custom BB Codes => Add New BB Code

Title : Whatever you want
Tag : imgo
Replacement : <a href="{param}" target="_blank"><img border="0" width="400" alt="Thumb resize." src="{param}" /></a>
Example : [imgo]http://img96.imageshack.us/img96/7499/gibraltar12804sx.jpg[/imgo] (you need an example otherwise it will displays only the link)
Description : Whatever you want
Use {option} : No
Button Image (Optional) : Well, optional

As I said, it is not the best, professional one, but usefull. The dark side of that one is when using with picture smaller than 400 pixel width It'll be resized also ....

Original Post / Version 3.0.7
Reply With Quote
  #22  
Old 10-18-2005, 11:58 AM
ggiersdorf ggiersdorf is offline
 
Join Date: Aug 2005
Posts: 251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by utw-Mephisto
The only way to change the [img] is in that file (class_bbcode.php) - I don't know another way ...
I understand that, but the link you sent me to was not a way to replace the IMG tag with this shrinking tag, it was a way to make the img tag leave the image the size it is but add scroll bars to it, I wanted a way to make the img tag by default (shrink the image) to size X
Reply With Quote
  #23  
Old 03-06-2006, 04:29 PM
ricker ricker is offline
 
Join Date: Jun 2003
Location: Apple Valley, CA
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do we specify that this new image tag (mine's called "sized") created can't be used in signatures? I've had someone find the loophole.
Reply With Quote
  #24  
Old 03-10-2006, 04:02 PM
seg seg is offline
 
Join Date: Apr 2005
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is "Allow [IMG] Code in Signatures" in vBulletin Options. Is there a loop hole to get around this?

Quote:
Originally Posted by ricker
How do we specify that this new image tag (mine's called "sized") created can't be used in signatures? I've had someone find the loophole.
I am sure others have done this. I wanted to restrict the image size, but allow readers to click out to the original image for copyright purposes. I adpated this code from: https://vborg.vbsupport.ru/showpost....6&postcount=22

In the file: /includes/class_bbcode.php

Find:
PHP Code:
return '<img src="' .  $link '" border="0" alt="" />'
Replace with:
PHP Code:
return '<table width="300 border="0"><tr><td><a href="' .  $link '" target="_blank"><img src="' .  $link '" border="0" alt="" style="max-width: 300px;" /></td></tr><tr><td><div align="center" style="font-size: 10px;"><a href="' .  $link '" target="_blank">View Original Image</a></div></table>'
Reply With Quote
  #25  
Old 04-11-2006, 09:48 PM
beano33 beano33 is offline
 
Join Date: Feb 2003
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by HR3rdGen
How can I just replace the standard IMG tags with this?
Just turn them off in forums and signatures so they can't be used.

In the Add New BB Code field for Button Image put in the path for your insert image button.
eg. Button Image: images/editor/insertimage.gif

Then your editor toolbars will have the same button using the new bbcode.
Reply With Quote
  #26  
Old 06-21-2006, 12:21 AM
G_Man G_Man is offline
 
Join Date: Feb 2006
Location: Washington State
Posts: 264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Worked a trick for me. Certainly not foolproof, but what is!?!? Fools are so ingenius afterall.

Thanks
Reply With Quote
  #27  
Old 12-28-2006, 04:17 PM
X-Vert's Avatar
X-Vert X-Vert is offline
 
Join Date: Aug 2006
Location: Brooklyn, NYC
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone here? lol

sorry for bringing back and old thread but I need some help.

I installed the new tags and they work great. Now... how can i get the tag image to show up in quick replies? It only shows up when ever I "Go Advanced".

Please reply asap, thanks !
Reply With Quote
Reply

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

Forum Jump


All times are GMT. The time now is 02:05 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.04341 seconds
  • Memory Usage 2,257KB
  • Queries Executed 21 (?)
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
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)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