News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Highslide 4 SMF

Started by Spuds, May 01, 2010, 01:03:29 PM

Previous topic - Next topic

Cutter65

I have users that I can't seem to get it through there head when posting images to use either upper case or lower case [img] tags. Not to mix them in a post.

When there mixed upper and lower the image resizing is broken on most of the photos in that post.

Is there a way the maybe add a edit to the highslides mod so it works well with mixed [img] tags?

Thanks in advance.

azretl

10 pieces to a topic you add a picture is only the first one. I wonder why?

digger

Quote from: azretl on June 13, 2012, 11:56:32 AM
Fatal error: Call to undefined function hs4smf() in /home/u953745372/public_html/Sources/Subs.php on line 2422

the attached file
hs4smf is anoter mod

Spuds

Quote from: digger on June 13, 2012, 03:31:02 PM
Quote from: azretl on June 13, 2012, 11:56:32 AM
Fatal error: Call to undefined function hs4smf() in /home/u953745372/public_html/Sources/Subs.php on line 2422

the attached file
hs4smf is anoter mod

First ignore digger, he's been delusional and can't remember which thread is which, I'm just glad he did it before me  :P

You need to make sure that the file hs4smf-Subs.php is in /home/u953745372/public_html/Sources, if its not you need to extract it from the zip package and add it there.  There may be other missing files, this is generally caused by a permissions issue on the server where it can't create the new files.

QuoteI have users that I can't seem to get it through there head when posting images to use either upper case or lower case [img] tags. Not to mix them in a post.
Ban them !!! :) ... I'll take a look and see what can be done.

Quote10 pieces to a topic you add a picture is only the first one. I wonder why?
24 beers in a case, 24 hours in a day, I wonder why?

digger

Quote from: Spuds on June 13, 2012, 09:21:17 PM
First ignore digger, he's been delusional and can't remember which thread is which, I'm just glad he did it before me  :P
:-X

Cutter65

Quote from: Spuds on June 13, 2012, 09:21:17 PM

QuoteI have users that I can't seem to get it through there head when posting images to use either upper case or lower case [img] tags. Not to mix them in a post.
Ban them !!! :) ... I'll take a look and see what can be done.

Theres a few I would like to ban. LOL

Thanks Spuds for checking into this when you get time.

z80z

Hi, nice mod.
One question i have and maybe i am doing something wrong:
i use this mod together with the Simple Image Upload mod, which loads pictures into postimage and integrates the thumbnail the url to the picture in the field.
Those are not highsliding. I guess because the image tag is within an url tag?
Would be cool if you can tell me what i can do there as i think it is very nice for the user to upload pictures like that and then have a highsliding thumbnail automatically embedded.

NeoXII

Great mod!
I have only a little question:

Highslide 4 SMF open all image in forum also little icons etc, it is possible to open only those of a certain size or format?

Thank You very much

:)

stevie1001

Hi,

I installed a theme of Blocwebdesign, called coral.
My forum: www.ionizationx.com [nofollow]
The mod works on the standard themes  but not on this one.
And yes, i have installed it for all themes.

What can be the problem?
Thanks in advance!
Steve

MadTogger

Quote from: Spuds on April 02, 2012, 07:47:35 PM
Quote from: MadTogger on April 02, 2012, 03:00:32 PM
Hi Spuds,

I have been looking into getting this working for my Flickr images and have made some headway but now I am a little stuck.

Try the attached version ... it should work with a _t style link (inside IMG tags of course)

Quote from: Eudemon on April 02, 2012, 05:30:03 PM
got any instruction on use it outside of smf system?
for example i create a php page that uses ssi.php
Sorry no  :(

Hi Spuds,

I need to call on your expertise again, this time setting the MOD to use Picasa links.

Here is an example thumbnail link:

https://lh6.googleusercontent.com/-pZqx1CVQ1CY/UFXDCYirwkI/AAAAAAAABo4/bZvMLyyOJ7Y/s144/Novice-001.jpg

And here is the full version link:

https://lh6.googleusercontent.com/-pZqx1CVQ1CY/UFXDCYirwkI/AAAAAAAABo4/bZvMLyyOJ7Y/s800/Novice-001.jpg

I can see the hash this time for the thumbnail is s144 & for the large image is s800, unfortunately this is contained within the URL and not just before the image extension.

How could the hs4smf-Subs.php file be altered to accomodate this change?

Kind regards..,

MadTogger

Hi Spuds,

I figured it out now, the coding for 'ggpht' in the hs4smf-Subs.php file is extremely similar to what I needed, so I played around with it until I got what I wanted.

Here what I did:

find:
$image_hosters = array('imageshack', 'photobucket', 'ipicture', 'radikal', 'keep4u', 'fotosik', 'xs', 'postimage', 'ggpht');

replace with:
$image_hosters = array('imageshack', 'photobucket', 'ipicture', 'radikal', 'keep4u', 'fotosik', 'xs', 'postimage', 'ggpht', 'googleusercontent');


find:
elseif (stripos($image['domain_url'], 'ggpht') !== false && preg_match('~(.*?)/(?:s\d{3,4}|)/([^/]*?)\.(png|gif|jp(e)?g|bmp)$~is' . ($context['utf8'] ? 'u' : ''), $image[4], $out))
$out = $out[1] . '/' . $out[2] . '.' . $out[3];


add after:
elseif (stripos($image['domain_url'], 'googleusercontent') !== false && preg_match('~(.*?)/(?:s\d{3,4}|)/([^/]*?)\.(png|gif|jp(e)?g|bmp)$~is' . ($context['utf8'] ? 'u' : ''), $image[4], $out))
$out = $out[1] . '/s800/' . $out[2] . '.' . $out[3];


Now I can post images onto my forum using Picasa Image links and they flyout to the large size - s800.

The only thing that I can't figure is how can I limit the flyout to only images that are the 's144' size because at the moment whatever size format I choose to post the images in i.e.

s144, s288, s400, s640 and even s800 itself all produce the flyout lightbox.

Regards..,

MadTogger

Futher to my last post I have narrowed down the issue slightly.

I changed this line:
elseif (stripos($image['domain_url'], 'googleusercontent') !== false && preg_match('~(.*?)/(?:s\d{3,4}|)/([^/]*?)\.(png|gif|jp(e)?g|bmp)$~is' . ($context['utf8'] ? 'u' : ''), $image[4], $out))
$out = $out[1] . '/s800/' . $out[2] . '.' . $out[3];


To this:
elseif (stripos($image['domain_url'], 'googleusercontent') !== false && preg_match('~(.*?)/(?:s144|)/([^/]*?)\.(png|gif|jp(e)?g|bmp)$~is' . ($context['utf8'] ? 'u' : ''), $image[4], $out))
$out = $out[1] . '/s800/' . $out[2] . '.' . $out[3];


now the only the thumbnail image 's144' gets expanded in the lightbox to the large size 's800'.

There is still a small issue though because through testing this I placed an image with a size greater then 's144' i.e. an 's400' and although it did not expand to the 's800' size, it still appeared in the lightbox, albeit still at 's400' size.

I am trying to limit the use of the lightbox in this case to only the 's144' size image, I want all other images to do nothing.

Hope this further information helps.

Regards..,

MadTogger

Sorry all,

just after my last post I searched through the hs4smf-Sub.php file looking for something that would point me in the direction for solving the issues of all image sizes being shown in lightbox.

Here is what I found.

find:
// As long as we have images to work on
foreach ($images as $image)
{
// not on the smileys, avatars, alt="ns" or img tags from attachments, icons etc ... primarily to find smileys since they are IN the
// message, next is the NS override, the rest should not happen but .....
if (stripos($image['img_tag'], 'class="smiley"'))
continue;
elseif (stripos($image['img_tag'], 'alt=""ns""'))
continue;
elseif (stripos($image['img_tag'], 'type=avatar'))
continue;
elseif (stripos($image['img_tag'], 'class="icon"'))
continue;
elseif (stripos($image['img_tag'], $modSettings['smileys_url']))
continue;
elseif (stripos($image['img_tag'], 'index.php?action=dlattach;'))
continue;
elseif (stripos($image['img_tag'], $settings['images_url']))
continue;


replace with:
// As long as we have images to work on
foreach ($images as $image)
{
// not on the smileys, avatars, alt="ns" or img tags from attachments, icons etc ... primarily to find smileys since they are IN the
// message, next is the NS override, the rest should not happen but .....
if (stripos($image['img_tag'], 'class="smiley"'))
continue;
elseif (stripos($image['img_tag'], 'alt=""ns""'))
continue;
elseif (stripos($image['img_tag'], 'type=avatar'))
continue;
elseif (stripos($image['img_tag'], 'class="icon"'))
continue;
elseif (stripos($image['img_tag'], $modSettings['smileys_url']))
continue;
elseif (stripos($image['img_tag'], 'index.php?action=dlattach;'))
continue;
elseif (stripos($image['img_tag'], $settings['images_url']))
continue;
elseif (stripos($image['img_tag'], 's288'))
continue;
elseif (stripos($image['img_tag'], 's400'))
continue;
elseif (stripos($image['img_tag'], 's640'))
continue;
elseif (stripos($image['img_tag'], 's800'))
continue;


this now limits the use of the lightbox to only 's144' size images posted from Picasa.

Very happy now that I have solved this myself.

Regards..,

jan.van.gent

I like the modification a LOT, but now I had to disable it.

It slowed my forum down, (a lot).
See the original search of the problem here: http://www.simplemachines.org/community/index.php?topic=486559.40

Now with the HS4SMF disabled, the forum doesn't look up anymore. CPU usage is now only 5% instead of 90-100% before.

Any suggestion what could cause this?

Bugo

Did you try to disable option "Use Coral CDN as JS/CSS source"?

jan.van.gent

Quote from: Bugo on January 04, 2013, 06:38:45 AM
Did you try to disable option "Use Coral CDN as JS/CSS source"?
It was off.

dimiurg

HEllo

Will this mod be developed to be compatible with SMF 2.0.3?

Arvacon

Hi. Thanks for this great mod, I don't know what would I doing without this.
A little late for an answer on this question, but yes, this mod is working even at 2.0.4 that I use, with custom theme.

I have a question about this mod too.
I have noticed that in some forums, sites or blogs, you can use similar sliding mod to see the pictures, but the difference is that that has a nice future. When you move to the next picture, it doesn't need to push an arrow to do that, you just push at the right of the left of the picture and it moves next or back, as it would doing with the arrows.
How can we do this with your mod? Is there any way to change some code and fix this?

I feel that the 3 types of closing the picture is not necessary, as you could have use the above future with the "push at right/left of picture for next/previous " function, instead of "click to close image".

Is this easy to change it?
It would be very handy future  :)


Skaty

Awesome mod and work perfectly. Just a little thing.

How can i disable it from quote images ?


Skaty

Hi again. Is this override feature is working just in bbcode ? I added alt=''ns'' in picture's html but didn't effect. Is there a way to use it html ?

Can override an image from sliding by using the alt="ns" option to prevent specified images from highsliding, use it as [img alt="ns"]your image[/img]

Advertisement: