vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   highslide for IMG BBCODE (https://vborg.vbsupport.ru/showthread.php?t=153378)

brfrankl 07-25-2007 06:28 PM

highslide for IMG BBCODE
 
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....&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:
HTML Code:

<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:
HTML Code:

<img src={param} border=0>

nix 09-02-2007 06:10 AM

<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

Quote:

Originally Posted by Elenna (Post 1330501)
From my post in the Highslide thread:
https://vborg.vbsupport.ru/showpost....&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:
HTML Code:

<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:
HTML 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

Quote:

Originally Posted by brfrankl (Post 1330883)
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 :)

nix 09-03-2007 05:30 AM

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 in the same window and brings your visitor to their website.
Is there a solution for this?

Tralala 09-28-2007 03:26 PM

Quote:

Originally Posted by Alfa1 (Post 1347386)
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 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...

nix 09-29-2007 04:01 AM

I'll post this again. But my hack https://vborg.vbsupport.ru/showthrea...150491&page=47 does images with highslide.

Alfa1 09-29-2007 11:02 AM

Quote:

Originally Posted by nix (Post 1349350)
I'll post this again. But my hack https://vborg.vbsupport.ru/showthrea...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.

PHP Code:

$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&amp;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.


All times are GMT. The time now is 05:49 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.01210 seconds
  • Memory Usage 1,760KB
  • 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
  • (4)bbcode_html_printable
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (17)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete