Advertisement:

Author Topic: Highslide Image Viewer  (Read 272141 times)

Offline Kazie

  • Semi-Newbie
  • *
  • Posts: 27
Re: Highslide Image Viewer
« Reply #260 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

Offline Ravac

  • Full Member
  • ***
  • Posts: 580
  • Gender: Male
Re: Highslide Image Viewer
« Reply #261 on: April 22, 2009, 10:32:59 PM »
@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

Offline Kazie

  • Semi-Newbie
  • *
  • Posts: 27
Re: Highslide Image Viewer
« Reply #262 on: April 22, 2009, 11:25:48 PM »
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

kat

  • Guest
Re: Highslide Image Viewer
« Reply #263 on: April 29, 2009, 01:27:42 PM »

Offline Srecko

  • Semi-Newbie
  • *
  • Posts: 21
  • Gender: Male
    • Aviation enthusiast web site
Re: Highslide Image Viewer
« Reply #264 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

Offline AlenNS

  • Full Member
  • ***
  • Posts: 617
  • Gender: Male
    • Baklja forum - Vaš forum
Re: Highslide Image Viewer
« Reply #265 on: May 09, 2009, 12:10:03 PM »
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

Offline smldmr

  • Semi-Newbie
  • *
  • Posts: 63
Re: Highslide Image Viewer
« Reply #266 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:

Code: [Select]
<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.

Offline perro88

  • Jr. Member
  • **
  • Posts: 358
    • techcoreforum
Re: Highslide Image Viewer
« Reply #267 on: May 10, 2009, 09:21:17 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 :\

Offline IceBurn

  • Semi-Newbie
  • *
  • Posts: 68
  • Gender: Male
  • Slipknot
Re: Highslide Image Viewer
« Reply #268 on: May 13, 2009, 12:26:44 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:

Code: [Select]
<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:
Code: [Select]
// Replace the link in the message
$message = str_replace($b[0], $b[5], $message);

Bellow add:
Code: [Select]
// repeated attributes fix
$message = str_replace('class="highslide" rel="highslide" class="highslide" rel="highslide"', 'class="highslide" rel="highslide"', $message);
« Last Edit: May 13, 2009, 12:32:57 AM by IceBurn »

Offline IceBurn

  • Semi-Newbie
  • *
  • Posts: 68
  • Gender: Male
  • Slipknot
Re: Highslide Image Viewer
« Reply #269 on: May 13, 2009, 01:09:43 AM »
Is there any way to remove the slideshow functionality without losing the "close" and "full size" controls at the top?

Thanks in advance!

Offline smldmr

  • Semi-Newbie
  • *
  • Posts: 63
Re: Highslide Image Viewer
« Reply #270 on: May 14, 2009, 03:20:55 PM »
@IceBurn: Thanks for this "dirty" fix :)

Offline Kazie

  • Semi-Newbie
  • *
  • Posts: 27
Re: Highslide Image Viewer
« Reply #271 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 :(

Offline digger

  • Sr. Member
  • ****
  • Posts: 787
  • Gender: Male
    • realdigger on GitHub
    • SMF Russian Community
Re: Highslide Image Viewer
« Reply #272 on: May 15, 2009, 12:51:35 PM »
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
Code: [Select]
[url=full_image][img]thumb_image[/img][/url]
and
[img]thumb_image from iPicture.ru, Imageshack.us, Photobucket.com and Fotosik.pl[/img]

Offline qtime

  • Full Member
  • ***
  • Posts: 501
Re: Highslide Image Viewer
« Reply #273 on: May 15, 2009, 01:18:43 PM »
@ 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.

Offline digger

  • Sr. Member
  • ****
  • Posts: 787
  • Gender: Male
    • realdigger on GitHub
    • SMF Russian Community
Re: Highslide Image Viewer
« Reply #274 on: May 15, 2009, 06:48:32 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?

Offline qtime

  • Full Member
  • ***
  • Posts: 501
Re: Highslide Image Viewer
« Reply #275 on: May 15, 2009, 06:50:35 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)

Offline baijianpeng

  • Jr. Member
  • **
  • Posts: 180
  • Gender: Male
    • JoomlaGate
Re: Highslide Image Viewer
« Reply #276 on: May 16, 2009, 10:24:40 PM »
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

Offline baijianpeng

  • Jr. Member
  • **
  • Posts: 180
  • Gender: Male
    • JoomlaGate
Re: Highslide Image Viewer
« Reply #277 on: May 16, 2009, 11:00:47 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

Offline TomW

  • Jr. Member
  • **
  • Posts: 294
  • Gender: Male
Re: Highslide Image Viewer
« Reply #278 on: May 16, 2009, 11:45:47 PM »
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.

Offline jamz

  • Semi-Newbie
  • *
  • Posts: 15
    • PentaxDSLR.net
Re: Highslide Image Viewer
« Reply #279 on: May 24, 2009, 02:52:21 PM »
This mod/addition of the OP's was written based on SMF release 1.1.9

I use xs.to 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:

Code: [Select]
// 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:


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



Find:

Code: [Select]
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:

Code: [Select]
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
« Last Edit: May 24, 2009, 07:46:17 PM by jamz »