View Full Version : highslide for IMG BBCODE
brfrankl
07-25-2007, 06:28 PM
Anyone have a hack for using the highslide stuff with IMG tags?
soulplayer
07-30-2007, 01:40 PM
yeah this would be cool to :)
salata
09-01-2007, 04:53 PM
bump
Elenna
09-02-2007, 03:51 AM
From my post in the Highslide thread:
https://vborg.vbsupport.ru/showpost.php?p=1319020&postcount=392
You can add an additional [img] tag in BBCode, and it will get parsed in place of your regular img code.
Once you have Highslide installed and working for Attachments, here is what I did (not pretty, very rudamentary, but working!):
In AdminCP>Custom BB Codes> BBCode Manager, scroll to bottom and click Add New.
Title: Image
Tag: img
Replacement:
<a href="{param}" class="highslide" onclick="return hs.expand(this,{slideshowGroup:'$post[postid]'})" target="_blank"><img src="{param}" width="100"></a>
Example: (Whatever you want)
Description: (Whatever you want)
Note: I added another BBCode called imgsmall which does NOT use highslide. I use this for instructions, etc, where the image itself is smaller than 100px, so it would make no sense to have a thumbnail for it.
I use the following replacement code:
<img src={param} border=0>
<a href="https://vborg.vbsupport.ru/showthread.php?t=150491&page=47" target="_blank">https://vborg.vbsupport.ru/showt...150491&page=47</a>
brfrankl
09-02-2007, 05:57 PM
From my post in the Highslide thread:
https://vborg.vbsupport.ru/showpost.php?p=1319020&postcount=392
You can add an additional [img] tag in BBCode, and it will get parsed in place of your regular img code.
Once you have Highslide installed and working for Attachments, here is what I did (not pretty, very rudamentary, but working!):
In AdminCP>Custom BB Codes> BBCode Manager, scroll to bottom and click Add New.
Title: Image
Tag: img
Replacement:
<a href="{param}" class="highslide" onclick="return hs.expand(this,{slideshowGroup:'$post[postid]'})" target="_blank"><img src="{param}" width="100"></a>
Example: (Whatever you want)
Description: (Whatever you want)
Note: I added another BBCode called imgsmall which does NOT use highslide. I use this for instructions, etc, where the image itself is smaller than 100px, so it would make no sense to have a thumbnail for it.
I use the following replacement code:
<img src={param} border=0>
Only problem is when there ia a [img] in the sig (didn't think of this before).. gonna have to play with this.... thanks fo the idea though...
salata
09-02-2007, 11:13 PM
Only problem is when there ia a [img] in the sig (didn't think of this before).. gonna have to play with this.... thanks fo the idea though...
please keep me updated if you find away around this, i'd like to know how to do that as well :)
Did you guys check that link I sent? The mod I'm working on there does images with highslide also.
Alfa1
09-03-2007, 02:18 PM
I am following this with much interest. I hope you find a way to make it less rudamentary.
parabat
09-25-2007, 06:38 PM
Elenna, this works like a dream.:up: Thanx for your assistance in this one.:D
-PB
Alfa1
09-26-2007, 09:53 AM
This works, but if a image is smaller than a thumbnail, it wll be enlarged. This includes smiley's. These images will look very bad. Asides that; if such an image is clicked and the image resizes to its original size, it will display 'powered by Highslide'. Clicking that image loads the highslide homepage (http://vikjavev.no/highslide/) in the same window and brings your visitor to their website.
Is there a solution for this?
Tralala
09-28-2007, 03:26 PM
This works, but if a image is smaller than a thumbnail, it wll be enlarged. This includes smiley's. These images will look very bad.
Same here... I set the thumbnail size to 150 and now images that are smaller than that get enlarged. :( Ideally I'd like it only to resize things that are larger than 150, and leave everything else alone.
For now I left the IMG tag set to the original default, and use Spleasure's ncode image resizer (https://vborg.vbsupport.ru/showthread.php?p=1273197#post1273197)to keep them small.
And then I assigned this highslide effect to a brand new bbcode: [imgh]
But ideally I'd like them to work in concert...
I'll post this again. But my hack https://vborg.vbsupport.ru/showthread.php?t=150491&page=47 does images with highslide.
Alfa1
09-29-2007, 11:02 AM
I'll post this again. But my hack https://vborg.vbsupport.ru/showthread.php?t=150491&page=47 does images with highslide.
Can you please post a links to where this is explained or can you please explain how your hack handles [IMG] tags and small images?
Defkalion
10-06-2007, 10:49 AM
This is a very nice hack, I do have one question though.
Is it possible to use it with other img bbcodes besides the default [img] code?
I use on my website the "image floating left" bbcode , that enables the text to wrap around the image. This tag is [imgl] for example, but of course these images don't get resized by this hack. Is there any easy way to make this hack work with this tag too?
tehQspm
01-30-2008, 06:48 AM
This seems to work for me and it doesn't affect signature pics (that I know of). Also, it applies to everything inside IMG tags even small images but luckily they don't resize to the default width, they just show their actual dimensions and if you click on them they still show inside the highslide box but just don't resize.
This is a plugin I was told to put inside the postbit_display_complete hook. And it also uses phpThumbs which is where the image resizing comes into play. It resizes on the fly server-side. You can edit it out if you want or you can download phpThumbs and install it to compliment highslide.
$post['message'] = preg_replace('/<img src="([^"]*)" border="0" alt="" \/>/', '<a href="\\1" target="_blank" class="highslide" onclick="return hs.expand(this, { dimmingOpacity: 0.7 })"><img src="phpThumb.php?src=\\1&w=400" border="0" alt="" /></a>', $post['message']);
furst
03-10-2008, 11:56 PM
I'm still looking for a smoother way to do this. I don't like having even the smallest images effected and would prefer it if it didn't effect the sigs either.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.