Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > Programming Articles
FAQ Community Calendar Today's Posts Search

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
  #12  
Old 10-10-2005, 10:07 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Actually, this is a common technique. If you only specify one dimensional attribute, the browser will automatically scale the other to match.
Really? That's useful, and I didn't know that
Reply With Quote
  #13  
Old 10-12-2005, 05:46 AM
Ryan McBain's Avatar
Ryan McBain Ryan McBain is offline
 
Join Date: Feb 2002
Location: Earth
Posts: 221
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So what's the right way to do this step by step? I can't get this to work. When I do it, all I see is broken code and red X.
Reply With Quote
  #14  
Old 10-14-2005, 10:17 PM
Ryan McBain's Avatar
Ryan McBain Ryan McBain is offline
 
Join Date: Feb 2002
Location: Earth
Posts: 221
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone?
Reply With Quote
  #15  
Old 10-15-2005, 01:12 AM
utw-Mephisto utw-Mephisto is offline
 
Join Date: Jan 2005
Posts: 648
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I put all the details in the first post which are running since vb3.5 RC1 on ut2007world.com ...

Be sure you have also insert an example, otherwise it won't work ..
Reply With Quote
  #16  
Old 10-15-2005, 02:13 AM
PennylessZ28 PennylessZ28 is offline
 
Join Date: Mar 2002
Location: North America
Posts: 737
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can I just replace the standard IMG tags with this?
Reply With Quote
  #17  
Old 10-15-2005, 02:16 AM
utw-Mephisto utw-Mephisto is offline
 
Join Date: Jan 2005
Posts: 648
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that would require file edits afaik ...
Reply With Quote
  #18  
Old 10-16-2005, 07:44 PM
ggiersdorf ggiersdorf is offline
 
Join Date: Aug 2005
Posts: 251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

utw-Mephisto can you tell us what file edits and how?
Reply With Quote
  #19  
Old 10-16-2005, 08:54 PM
utw-Mephisto utw-Mephisto is offline
 
Join Date: Jan 2005
Posts: 648
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good question, like out of my belly I would say <forum-root>/includes/class_bbcode.php

But I haven't checked the functions in there tbh .... I try to find something more specific, but until then, just take a look yourself, you might be faster finding what you need

edit

I was close

There you go : https://vborg.vbsupport.ru/showthread.php?t=92882
Reply With Quote
  #20  
Old 10-17-2005, 02:14 PM
ggiersdorf ggiersdorf is offline
 
Join Date: Aug 2005
Posts: 251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hey Utw- Not sure if thats the same thing that link pust scroll bars on the screen. I would like to use this new custom BBCODE in place of the IMG tag or modify the IMG tag to do what this custome BBCOD does. Can this be done if so how!?
Reply With Quote
  #21  
Old 10-17-2005, 02:17 PM
utw-Mephisto utw-Mephisto is offline
 
Join Date: Jan 2005
Posts: 648
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The only way to change the [img] is in that file (class_bbcode.php) - I don't know another way ...
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:37 AM.


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.05087 seconds
  • Memory Usage 2,289KB
  • Queries Executed 25 (?)
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
  • (1)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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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