News:

Wondering if this will always be free?  See why free is better.

Main Menu

Highslide Image Viewer

Started by digger, October 07, 2008, 09:37:35 PM

Previous topic - Next topic

Kazie

Hi, i think this is awesome and i had it working on attachments..

Is there any way to make it work on the regular tags?

I had a quick look through this posts but i didn't find anything that worked :o

I'm using a custom theme btw. Silentwave it's called.


- Kazie

Ravac

@Kazie

Open Index.template.php file of Silent wave theme.

Code (Find) Select
// If RSS feeds are enabled, advertise the presence of one.

Code (Add Before) Select

// * Highslide mod
   echo '<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/Highslide/highslide.js"></script>
   <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/Highslide/highslide.', $context['user']['language'], '.js"></script>
   <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/Highslide/highslide.css" media="screen" />
   <script type="text/javascript">
hs.graphicsDir = "', $settings['default_theme_url'], '/Highslide/";
hs.outlineType = "rounded-white";
hs.captionEval = "this.thumb.alt";
hs.transitions = ["expand", "crossfade"];
hs.align = "center";
hs.creditsText = "";
hs.creditsHref = "";
hs.creditsTitle = "";
if (hs.addSlideshow) hs.addSlideshow({
interval: 5000,
repeat: false,
useControls: true,
      fixedControls: false,
overlayOptions: {
   opacity: 1,
   position: "top right",
   hideOnMouseOut: false
      }
});
</script>';
// Highslide mod *



I think this should do the work

Kazie

I already tried that, and it didn't work :(

It just links to the actuall image instead of using the Highslide feature.. For some reason it only works on my attachments :s it's kinda frustrating since i see many others making it work, but i just can't :s


Srecko

Greetings all,

maybe some of you could be able to help me about this:

http://www.simplemachines.org/community/index.php?topic=307397.0

How to force attached images to be dissplayed horizontaly in rows, with possible control of number of thumbs in row.

Hope my question is not complicated.

Cheers

AlenNS

Quote from: Srecko on April 30, 2009, 03:35:41 AM
Greetings all,

maybe some of you could be able to help me about this:

http://www.simplemachines.org/community/index.php?topic=307397.0

How to force attached images to be dissplayed horizontaly in rows, with possible control of number of thumbs in row.

Hope my question is not complicated.

Cheers
http://www.simplemachines.org/community/index.php?topic=292526.msg1927990#msg1927990

smldmr

Hello, i have a little issue. All images on my forum (smf 1.1.8 and 2.0 RC1) have the class and rel tags twice. for example a linked image looks like this:


<a href="---" class="highslide" rel="highslide" class="highslide" rel="highslide" target="_blank">
<img src="---" alt="" border="0" /></a>


because of that, my forum is not w3c conform. I installed the mod manually/automatically, and and. The mod is functioning normally but this is not so fine.

perro88

Quote from: Kazie on April 22, 2009, 09:28:38 PM
Hi, i think this is awesome and i had it working on attachments..

Is there any way to make it work on the regular tags?

I had a quick look through this posts but i didn't find anything that worked :o

I'm using a custom theme btw. Silentwave it's called.


- Kazie
hey there. I made this simple modification(didn't look much at the code so it might not be a very good one xD) and it seems to work with img tags.
go to subs.php
and find:
if(empty($b[1]) && empty($b[2])
               && ((preg_match("~<img[^>]*?(width|height)[^>]*?>~ism", $b[3]))
then change the && for a || xD, this is, change the last code for this:
if(empty($b[1]) && empty($b[2])
               || ((preg_match("~<img[^>]*?(width|height)[^>]*?>~ism", $b[3]))
if you find anything wrong in this noob modification let me know :P . it seems to be working here but its a test site only :\

CodeDev

#268
Quote from: smldmr on May 10, 2009, 11:29:28 AM
Hello, i have a little issue. All images on my forum (smf 1.1.8 and 2.0 RC1) have the class and rel tags twice. for example a linked image looks like this:


<a href="---" class="highslide" rel="highslide" class="highslide" rel="highslide" target="_blank">
<img src="---" alt="" border="0" /></a>


because of that, my forum is not w3c conform. I installed the mod manually/automatically, and and. The mod is functioning normally but this is not so fine.

Same problem here!

Here is my quick and dirty fix...
Find:

// Replace the link in the message
$message = str_replace($b[0], $b[5], $message);


Bellow add:

// repeated attributes fix
$message = str_replace('class="highslide" rel="highslide" class="highslide" rel="highslide"', 'class="highslide" rel="highslide"', $message);

CodeDev

Is there any way to remove the slideshow functionality without losing the "close" and "full size" controls at the top?

Thanks in advance!

smldmr

@IceBurn: Thanks for this "dirty" fix :)

Kazie

Anyone who can tell me what might be wrong with my Highslide?

It works on attachments, but not on images in posts through [img] tags, i have followed the steps but it just won't work as intended :(

digger

Quote from: Kazie on May 15, 2009, 04:35:14 AM
Anyone who can tell me what might be wrong with my Highslide?

It works on attachments, but not on images in posts through IMG tags, i have followed the steps but it just won't work as intended :(

Mod don't work for regular IMG tags.
It works for

[url=full_image][img]thumb_image[/img][/url]
and
[img]thumb_image from iPicture.ru, Imageshack.us, Photobucket.com and Fotosik.pl[/img]

qtime

@ digger
this is a great mod, I have it working with inline attachments, and it brings smf forums to a higher place

I have running the image host script (http://custom.simplemachines.org/mods/index.php?mod=1639) on my own server, and like to see your script can handle this format, like Imageshack.us etc.

digger

Quote from: qtime on May 15, 2009, 01:18:43 PM
I have running the image host script (http://custom.simplemachines.org/mods/index.php?mod=1639) on my own server, and like to see your script can handle this format, like Imageshack.us etc.

Can i see any demo?

qtime

Quote from: digger on May 15, 2009, 06:48:32 PM
Quote from: qtime on May 15, 2009, 01:18:43 PM
I have running the image host script (http://custom.simplemachines.org/mods/index.php?mod=1639) on my own server, and like to see your script can handle this format, like Imageshack.us etc.

Can i see any demo?
here is the original script (nice one)

baijianpeng

Thanks to the author of this Mod, digger.

Today I tested this Mod with another Mod named Simple ImageShack. I noticed that HighSlide ImageViewer Mod can't generate small thumbnail image for a bigger picture comes from ImageShack.us which was uploaded by the Simple ImageShack Mod.

Hope these Mods can work together to make better effect.

Thanks.
JoomlaGate: The way to the World of Joomla!

http://www.joomlagate.com

baijianpeng

Quote from: qtime on May 15, 2009, 01:18:43 PM
I have running the image host script (http://custom.simplemachines.org/mods/index.php?mod=1639) on my own server, and like to see your script can handle this format, like Imageshack.us etc.


I also tested this Advanced image uploader Mod with HighSlide ImageViewer Mod today. There is a problem:

The Advanced image uploader Mod can automatically insert the thumbnail image into the post message, that is great. But when click on that small thumbnail image (size: 150*118px), the HighSlide ImageViewer Mod tried to enlarge it. Of course it can't return the correct result, so there show me the loading message a longtime without showing the original image.

I think the author of HighSlide ImageViewer Mod should add a new option to this Mod: don't handle images with a size smaller than ****.

Or, please add support to the Advanced image uploader Mod, that is to say, when visitor click on the thumbnail image which was generated by www.xtupload.com, this HighSlide ImageViewer Mod  can also enlarge it by retrieving the original image from www.xtupload.com.

Thanks.
JoomlaGate: The way to the World of Joomla!

http://www.joomlagate.com

TomW

baijianpeng, thank you for your posts !  I would like to use this mod but will have the same problems.  I hope that they can be solved.

jamz

#279
This mod/addition of the OP's was written based on SMF release 1.1.9

I use xs.to [nofollow] frequently for image hosting and decided to add support for that site. I don't use a gallery or file attachments - just BBCode tags. So I only test for that.

If anyone is interested, the code mods are below. Remember to always make backups before changing code!

In Subs.php find:


// Non-linked images won't have all the data, so make it up
if(empty($b[1]) && empty($b[2])
&& ((preg_match("~<img[^>]*?(width|height)[^>]*?>~ism", $b[3]))
    || (strpos($c, 'imageshack') !== false && preg_match('~(.*?)\.(?:th\.|)(png|gif|jp(e)?g|bmp)$~is'.($context['utf8'] ? 'u' : ''), $b[4]))



And insert this line next:


|| (strpos($c, 'xs') !== false && preg_match('~(.*?)\.(?:jpg.xs\.|)(png|gif|jp(e)?g|bmp)$~is'.($context['utf8'] ? 'u' : ''), $b[4]))




Find:

if(strpos($c, 'imageshack') !== false)
{
// Fix Imageshack thumbnails and for non-direct page links
if(preg_match('~(.*?)\.(?:th\.|)(png|gif|jp(e)?g|bmp)$~is'.($context['utf8'] ? 'u' : ''), $b[4], $out))
{
$out = $out[1].'.'.$out[2];
$d = $b[1];
$b[1] = str_replace($b[2], $out, $b[1]);
$b[2] = $out;
$b[5] = str_replace($d, $b[1], $b[5]);
unset($c, $d, $out);
}
}



And insert this block next:

elseif(strpos($c, 'xs') !== false)
{
// Fix xs thumbnails and for non-direct page links
if(preg_match('~(.*?)\.(?:jpg.xs\.|)(png|gif|jp(e)?g|bmp)$~is'.($context['utf8'] ? 'u' : ''), $b[4], $out))
{
$out = $out[1].'.'.$out[2];
$d = $b[1];
$b[1] = str_replace($b[2], $out, $b[1]);
$b[2] = $out;
$b[5] = str_replace($d, $b[1], $b[5]);
unset($c, $d, $out);
}
}





L8R - Jamz

Advertisement: