vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   A better IMG tag (https://vborg.vbsupport.ru/showthread.php?t=122660)

Renmiri 07-30-2006 10:00 PM

A better IMG tag
 
You know all that white space by the side of every image ever posted on a forum using the standard IMG tag ? I happen to hate it. I want my images to blend in with the text.

So I did my own BBCODE for it:

1 - Go to the Admin panel and select "Add Custom BBCode"
2 - For title enter "Float Image on text" or something like it, same for description
3 - for tag enter xFLOAT
4 - for "Replacement" enter the text below

Code:

<a href="{param}"><img alt="" border="0" src="{param}" style="margin: 0px 10px 10px 0px; float: {option};"/></a>
5 - For "Example" enter this:

Code:

[xFLOAT=left]http://upload.wikimedia.org/wikipedia/en/thumb/3/3e/Magic_Pot_FFX.jpg/65px-Magic_Pot_FFX.jpg[/xFLOAT]blah, blah, blah, yada, yada, yakety yak
6 - Check yes on "use {option}"

7 - optionally, add an icon path to have it come up on your posting box

tada!

Here it is at work!
http://forums.ffproject.net/showthread.php?t=747

http://ffproject.net/forumwiki/image...0px-FLOAT2.jpg

rmxs 07-31-2006 07:08 PM

thanks i use it in future :)

bashy 07-31-2006 07:28 PM

Can you pleases explain what to do, and also add the instructions to a notepad file? :)

tazB.ca 07-31-2006 07:50 PM

i dont understand what this does

Mr Chad 07-31-2006 08:24 PM

Quote:

Originally Posted by tazB.ca
i dont understand what this does

look at the picture...

it lets you wrap text next to the image. (instead of being confined to one line)

HappyPike 08-01-2006 12:07 AM

I made a tag like that recently too. However, I simply use the same IMG tag name, but with align option.

To align an image to the right, people would use

https://vborg.vbsupport.ru/

bandoftheweek 08-01-2006 12:39 AM

Awesome mod seriously, I needed this for my site www.bandoftheweek.com - I shall install it in a while.

murrtex 08-01-2006 10:24 AM

I did it but.it mixed with my signature

https://vborg.vbsupport.ru/

Renmiri 08-01-2006 10:36 AM

Quote:

Originally Posted by murrtex
I did it but.it mixed with my signature

http://img207.imageshack.us/img207/9...age1fg8.th.jpg

Yes it does. Any text around the image gets mixed

Just add some empty lines after the image to push your signature down far enough and it will be back to it's normal place (or add a couple of <br> to the beggining of your sig)

HappyPike 08-01-2006 02:51 PM

Someone asked me to post my version of the IMG with align code, so here it is:

Title: IMG with align option
Tag: IMG
Replacement: <img src="{param}" align="{option}" border="0" hspace="5" alt="Image">
Example: https://vborg.vbsupport.ru/This image should align to the right of these texts.

Description: This image tag allows align option. The align option can be TOP, BOTTOM, MIDDLE, LEFT, or RIGHT.
Use {option}: Yes

Some of you may not like to use the "align" within <IMG>, but I don't have problem with it myself. :)

Snakey 08-01-2006 06:11 PM

Quote:

Originally Posted by HappyPike
Someone asked me to post my version of the IMG with align code, so here it is:

......

Some of you may not like to use the "align" within <IMG>, but I don't have problem with it myself. :)

I've modified it a bit so it makes use of css (w/o align-attribute) and made it xhtml compliant:

Title: IMG with align option
Tag: IMG
Replacement: <img src="{param}" style="margin:0px 5px 0px 5px; border-width: 0px; float:{option};" alt="Image" />
Example: [img=right]https://vborg.vbsupport.ru/images/smoothblue/buttons/reply.gif[/img]This image should align to the right of these texts.

Description: This image tag allows align option. The align option can be LEFT or RIGHT.
Use {option}: Yes

For replacement, you can also use it without margin:0px 5px 0px 5px; (which replaces hspace) or without border-width: 0px; (replaces border)

Renmiri 08-01-2006 06:19 PM

Quote:

Originally Posted by Snakey
I've modified it a bit so it makes use of css (w/o align-attribute) and made it xhtml compliant:...

Wow!

Great suggestions guys, thanks! :)

I also did a "thumbnail" one, that always dislays a 150px wide version of the picture with a link to the original one.

Title: Float image with thumbnail
Tag: FLOAT (or IMG if you prefer)
Replacement: (now fixed 8/2/06)
<a href="{param}"><img alt="" border="0" src="{param}" style="width:150px; margin: 0px 10px 10px 0px; float: {option};"/></a>

Example: [float=right]https://vborg.vbsupport.ru/images/smoothblue/buttons/reply.gif[/float]This image should be 150 px wide, should align to the right of these texts and should link to the original full sized image

Description: This image tag allows align option. The align option can be LEFT or RIGHT.
Use {option}: Yes

project-Buckfas 08-02-2006 01:39 PM

I've wanted this for a while. I hit install so I can do it when I go home ;)

blue6995 08-02-2006 02:31 PM

Quote:

Originally Posted by renmiri
I also did a "thumbnail" one, that always dislays a 150px wide version of the picture with a link to the original one

I have tried this twice, changing the image link to my own, but all I get is the original image not a thumbnail!

Any ideas why?

Renmiri 08-02-2006 02:41 PM

Quote:

Originally Posted by blue6995
I have tried this twice, changing the image link to my own, but all I get is the original image not a thumbnail!

Any ideas why?

My mistake!

Where it says width="150px" it should say width:"150px"

Here's the correct code
Code:

<a href="{param}"><img alt="" border="0" src="{param}" style="width:150px; margin: 0px 10px 10px 0px; float: {option};"/></a>

category 08-31-2006 04:16 AM

does it work for 3.6.0

HappyPike 08-31-2006 05:16 AM

Yes, it does. These BBCodes should work for any v3.x of vBulletin.

BTW, a small downside is, if you have images disabled in sigs, people would be able to bypass it using these custom image tags. The disable images in sigs rule only affects the official [IMG] tag.

category 08-31-2006 06:33 PM

doest work for me it doesnt display the image

zooki 08-31-2006 06:56 PM

Hi how do you get it to work with Dynamic images?

Here is one:

http://video.google.com/ThumbnailSer...8S-h9V4WM5xhPc

If you can add dynamic images it wud be cool :) thanks

Renmiri 08-31-2006 11:39 PM

Quote:

Originally Posted by category
doest work for me it doesnt display the image

Can you recheck the BBCode ? It should work even for 3.6

Renmiri 08-31-2006 11:41 PM

Quote:

Originally Posted by zooki
Hi how do you get it to work with Dynamic images?

Here is one:

http://video.google.com/ThumbnailSer...8S-h9V4WM5xhPc

If you can add dynamic images it wud be cool :) thanks

What you are looking for is a "media" BBCode. The best one can be found here
https://vborg.vbsupport.ru/showthread.php?t=106239

category 09-01-2006 12:10 AM

Quote:

Originally Posted by Renmiri
Can you recheck the BBCode ? It should work even for 3.6

yep doesnt work for me

Renmiri 09-01-2006 01:18 AM

Quote:

Originally Posted by category
yep doesnt work for me

Sorry!

When I upgrade my forums to 3.6 I'll post an update, ok ?

category 09-01-2006 02:43 AM

Quote:

Originally Posted by Renmiri
Sorry!

When I upgrade my forums to 3.6 I'll post an update, ok ?

ok thanks but arent there any similar hacks like this?

Renmiri 09-01-2006 11:35 PM

Quote:

Originally Posted by category
ok thanks but arent there any similar hacks like this?

Not that I know of....

Morning Glory 09-03-2006 08:43 PM

I'm not getting the image either. :confused:

Renmiri 09-07-2006 09:48 PM

Quote:

Originally Posted by Morning Glory
I'm not getting the image either. :confused:

Can you paste the code you put on "replacement" for the BBcode here ?

3.5.4 should be working....

attroll 04-12-2007 04:12 AM

I can not get this to work either. I posted the code exactly like you said and when I post an image it post like this. It does not put the [XFLOAT=left] in the message like it should instead it looks like this.

[XFLOAT="http://www.mysite.net/gallery/files/2/9/3/IMAG0048_1_thumb.jpg"][/XFLOAT]

attroll 04-12-2007 04:34 AM

Dah, I figured out what I was doing wrong. When it ask for the prmpt i have to type either left, center. or right. My bust.

Renmiri 05-06-2007 02:10 AM

Glad you found the problem :D

towermatt 06-21-2007 03:21 PM

I love this but for some reason when I try to enter down, it does not create blank white space to separate the sig text.

If I enter down and type (which people will normally do I suppose) it works fine. But not if I don't but text in. Is this an option setting? Show blank spaces or something.

Great modification though, I really needed this and it works well on 3.6

Renmiri 06-21-2007 08:43 PM

Yes, it doesn't work so well if your image is the last thing on the page, it makes your sig look weird. I usually avoid putting images at the bottom of my post or use the regular img tag for short posts.

Thanks for the comments :)

Big Island 08-14-2007 08:44 AM

Excellent...have been wondering how to do this for a while now. Can anyone devise a way to attach a gray caption box to the bottom and add text to it to make sense of the picture for the reader?

Big Island 08-17-2007 01:51 AM

Anybody? ;-)

Renmiri 08-20-2007 10:40 PM

I do have a similar one for description plus thumbnail but no gray box:

[IMGG=world map]MAP3.jpg[/IMGG] will get a tumbnail of MAP3.jpg with a caption that says "World Map"

Follow the instructions above but use IMGG instead of xFLOAT and then use this code instead

Code:

<a href="{param}"><img src="{param}" style="width:150px; margin: 0px 10px 10px 0px;"/></a> {option}

Big Island 08-23-2007 08:37 AM

Quote:

Originally Posted by Renmiri (Post 1321953)
I do have a similar one for description plus thumbnail but no gray box:

[IMGG=world map]MAP3.jpg[/IMGG] will get a tumbnail of MAP3.jpg with a caption that says "World Map"

Follow the instructions above but use IMGG instead of xFLOAT and then use this code instead

Code:

<a href="{param}"><img src="{param}" style="width:150px; margin: 0px 10px 10px 0px;"/></a> {option}

Nice work!

I've played around a bit, but I can't get it to format quite the way I want. Can anyone show an example of how we could do an image, complete with box/border and caption like the "A yawning cat" found here:

http://en.wikipedia.org/wiki/Cat_communication

Many thanks to anyone that could help with this.

NFLfbJunkie 08-27-2007 01:54 AM

Great BBCode Renmiri, but is there a way to for the signature to the bottom without having to enter empty space if there's not enough text to wrap with the image?

Renmiri 08-31-2007 01:17 AM

I'll post here when I find a way to fix signatures Junkie.

Same for your box Big Island.

Keep an eye on this thread :D

Renmiri 09-17-2007 10:54 PM

Good news!!!

I got the thumbnail code here AND the solution for the signatures

Big Island's Wiki like thumbnails

First create the new Thumbnail code: Follow the instructions above to add a bbcode, in my case TMB1, flag the option thingy to yes and use the replacement below

Code:

<table style="border: 1px solid rgb(0, 0, 0); background-color: rgb(0, 0, 0); color: rgb(255, 255, 255); font-size: 11px;" cellpadding="0" cellspacing="0">
  <tbody><tr>
        <td><a href="{param}" target="_new"><img src="{param}" alt="Thumbnail" title="Thumbnail" border="0" width="250"></a><br><center>{option}</center></td>

  </tr>
</tbody></table><br>

When you use it like
Quote:

[TMB1=Yeti]http://ffproject.net/forumwiki/images/Bikanel_13.jpg[/TMB1]
You should get a thumbnail with 250 width that links to the real image, with a black line on the bottom with the image title "Yeti" or whatever users put after the = sign, just like my image below.

you can play around with the background color of the text, right now it is rgb(0,0,0) which is black, with rgb(255,255,255) for the font, which is white. The border can be made thicker too, right now I put "border: 1px" but you can increase it to 3px to make it thicker.

This option does require that the user enters a description for each image.

Renmiri 09-17-2007 11:17 PM

Now here is the fix for the signature... I's a half fix because the posts' font style gets weird and it is not very intuitive to use, from a user's point ov view but it works...

Junker's fix for signatures

First add the new thumbnail code: Follow the instructions above to add a bbcode, in my case TMB2, flag the option thingy to yes and use the replacement below

Code:

<table align="left" cellpadding="0" cellspacing="0" width="100%"><tr><td valign="top" align="left">{param}</td>
        <td valign="top"><a href="{option}" target="_new"><img src="{option}" alt="Thumbnail" title="Thumbnail" border="0" width="300"></a></td>
  </tr></table><br>

Very important: Keep the width=100% above otherwise the sig problem will still be there. To use it user just have to put the TMB2 tags around a paragraph (like making a QUOTE then specify the url of the image, like they would specify a URL link

Quote:

[TMB2="http://ffproject.net/forumwiki/images/Bikanel_13.jpg"]yadda, yadda wwwww wwww wwww wwwww [/TMB2]

Signature should work
anything below the image, including sig goes under the TMB2 quotes


All times are GMT. The time now is 06:11 PM.

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.01590 seconds
  • Memory Usage 1,837KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete