Highslide 4 SMF

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

Previous topic - Next topic

Am'

Quote from: Sabre™ on July 26, 2010, 03:15:46 AM
Quote from: Axodious on July 06, 2010, 01:00:25 PM
Also Imageshack images are not working for me either, using a direct link to the image simply opens the image itself rather than in a Highslide box.
In hs4smf-Subs.php change
    if (stripos($image['domain_url'], 'imageshack') !== false && preg_match('~(.*?)(?:\.th\.|)(png|gif|jp(e)?g|bmp)$~is' . ($context['utf8'] ? 'u' : ''), $image[4], $out)) {
        $out = $out[1] . '.' . $out[2];


to
    if (stripos($image['domain_url'], 'imageshack') !== false && preg_match('~(.*?)\.(?:th|)(png|gif|jp(e)?g|bmp)$~is' . ($context['utf8'] ? 'u' : ''), $image[4], $out)) {
        $out = $out[1] . '.' . $out[2];


Temp fix

the bug is fixed, but when I click on an image it does not zoom

any solution for that please ?

i tested this image :

[URL=http://img651.imageshack.us/i/28295439.jpg/][IMG]http://img651.imageshack.us/img651/7214/28295439.th.jpg[/img][/URL]
اذا أحس أحد انه لم يخطأ ابدا في حياته, فهذا يعني أنه لم يجرب أي جديد في حياته
My Mods For SMF 2 RC3 : XQuote XCode - Vbulletin Style New Meta Tags

mariohifi

Good good mod.

Is there a way to implemented Simple Image Upload to viewer th in full size with Highslide?

Link to mod for SIU http://custom.simplemachines.org/mods/index.php?mod=1669 (also works in SMF 2.0 RC3)

This is an example of code generated by SIU

[url=http://www.postimage.org/image.php?v=TsQ9hw0]
[img]http://s2.postimage.org/Q9hw0.jpg[/img][/url]


Thanks

Spuds

I should be able to add in support for that, but I'm still a few weeks away from being able to do any work on this mod due to travels.  So stay tuned ;)

javi712

Hey Spuds,

Thanks a lot for creating this mod. It's exactly what I have been looking for, for a while now!

I am getting the follow error when installing:

3.     Execute Modification     ./Sources/Subs.php     Test failed
     1.     Add After     ./Sources/Subs.php     Test failed
     2.     Add Before     ./Sources/Subs.php     Test successful

I didn't go through with the install since I don't want to break anything. Is there a quick fix to this?

I'm also using the following addons:

Aeva ~ Auto-Embed Video & Audio
InLine Attachments
TinyPortal
WoW - World of Warcraft Tooltips

And this is on a custom theme.

Thanks in advance!

Spuds

I know its compatible with a couple of those mods .... what the error means is that the package is looking for a line in subs.php and is unable to find it, probably because another mod changed or moved the line .... its a common problem with multiple mods.

So ... if you install the mod you will have manually go in to subs.php and look for the line
// Cache the output if it took some time...

and add after that ....
// HS4SMF, call the highslide function on this message, but not on signature, stats or when in the editor
if((empty($cache_id) || substr($cache_id, 0, 3) != 'sig') && $context['current_action'] != 'stats' && $context['current_action'] != 'post' && $context['current_action'] != 'jseditor') {
if (!function_exists('hs4smf')) {
global $sourcedir;
$success = (include_once $sourcedir . '/hs4smf-Subs.php');
if ($success)
hs4smf($message, $cache_id);
}
else
hs4smf($message, $cache_id);
}


and then when you uninstall the mod you will have remove that same section by hand as well ....

if you want attach your subs php file so I can see why its not finding that line so I can try and make the package installer better.

javi712

Thanks for the prompt response! Very much appreciated!

Attached is my subs.php

camoura

I am getting these errors. Can anybody help?

Type of error: General 
http://forum/index.php?pretty;board=teste1;topic=teste.msg13
2: Invalid argument supplied for foreach()
Arquivo: /.../Sources/hs4smf-Subs.php
Linha: 493 

Type of error: Undefined 
http://forum/index.php?pretty;board=teste;topic=teste.msg13
8: Undefined index: hs4smf_slideshow_group
Arquivo: /.../Sources/hs4smf-Subs.php
Linha: 493 

Spuds

#67
I've uploaded a new version of the mod to the site ... the changes are as follows"

0.4 - 03 September 2010
o ! fixed some undefined error log entrys
o ! updated the database install program to fix init values and remove table dependency
o ! fixed imageshack error (thanks Sabre™)
o + added beta support for Postimage (Simple Image Upload) hosted images
o + added alt="ns" option to prevent specified images from highsliding, use it as [img alt="ns"]your image[/img]

Remember to uninstall the old version prior to installing this one.

Spuds

Quote from: javi712 on September 01, 2010, 12:28:36 PM
Thanks for the prompt response! Very much appreciated!

Attached is my subs.php

:-[  If was my own mod causing the problem DOH ... To fix this you will need to un-install the ILA MOD and install the new 1.07 version which adds support for HS4SMF.  Then install the the version of this mod as well.  Both have some nice updates ...

Bugo

Hardcoded text...
Quote from: hs4smf-Subs.php$footer.= "hs.lang.number = 'Image %1 of %2';\n";
Quote from: ManageSettings.phparray('select','hs4smf_slideshownumbers', array(
        '0' => "none",
        '1' => "In Heading",
        '2' => "In Caption",
      )),
   array('select','hs4smf_slideshowcontrollocation', array(
        '1' => "Above",
        '4' => "Top left",
        '5' => "Top center",
      '6' => "Top right",
        '7' => "Bottom left",
        '8' => "Bottom center",
      '9' => "Bottom right",
        '10' => "Below",
      )),
   '',
   array('select','hs4smf_appearance', array(
      '1' => "Highslide rounded-white",
        '2' => "Polaroid Outline + Shadow",
        '3' => "Borderless",
        '4' => "Dark Outer-Glow",
        '5' => "Plain and Simple",
        '6' => "Dark and Glossy",
        '7' => "Dark borderless, floating-caption")),
   array('select', 'hs4smf_dimmingopacity', array(
      '1' => "0% , No Dimming",
        '2' => "10%",
        '3' => "20%",
        '4' => "30%",
        '5' => "40%",
        '6' => "50%",
        '7' => "60%",
        '8' => "70%",
        '9' => "80%",
        '10' => "90%",
        '11' => "100%, full black")),
   '',
   array('select', 'hs4smf_headingsource', array(
        '0' => "none",
        '1' => "Image Title",
        '2' => "Image Alt",
        '3' => "Link Title",
      '4' => "Post Subject")),
   array('select', 'hs4smf_headingposition', array(
      '0' => "none",
        '1' => "Above image",
        '2' => "Overlayed on top",)),
   array('select', 'hs4smf_captionsource', array(
        '0' => "none",
        '1' => "Image Title",
        '2' => "Image Alt",
        '3' => "Link Title",
      '4' => "Post Subject")),
   array('select', 'hs4smf_captionposition', array(
      '0' => "none",
        '1' => "Below image",
        '2' => "Overlayed on bottom",)),
   array('select', 'hs4smf_sourceopacity', array(
      '1' => "0% , No Dimming",
        '2' => "10%",
        '3' => "20%",
        '4' => "30%",
        '5' => "40%",
        '6' => "50%",
        '7' => "60%",
        '8' => "70%",
        '9' => "80%",
        '10' => "90%",
        '11' => "100%, full black")),

Spuds

Well you know it is a mod for a release candidate, i was waiting for smf2 to go gold to update that  :P

I'll look to pull those into a language file, or maybe go for a tooth extraction, not sure which will be more fun !

camoura

#71
I am trying to add another option for the caption, but I am out of luck.

The option would be the attachment name. Shouldn't 'this.a.name' work?


Never mind. Source for the text in the caption set to image alt does the trick.  :-[

Spuds

Ok I've uploaded a new version with the language edits, but since I did not want to release a new version that really offered no changes I added some!

Changelog
0.5 - 05 September 2010
o + moved admin menu items to language strings
o + enabled small and large dark graphic controls
o + added hide slideshow controls on mouse out
o + added ability to set window background color
o + added x,y nudge so you can tweak the slideshow controls position
o + improved logic for handling how/where controls appear when in header/footer or overlayed.
o ! if no text is found for heading or caption a blank will be inserted to maintain formatting (captioneval and headingeval)

Am'

highslide not worked on this image :

[img]http://img291.imageshack.us/img291/7461/sanstitre2zt.jpg[/img]
اذا أحس أحد انه لم يخطأ ابدا في حياته, فهذا يعني أنه لم يجرب أي جديد في حياته
My Mods For SMF 2 RC3 : XQuote XCode - Vbulletin Style New Meta Tags

Spuds

confirmed ... I'll get a 0.5a out in a few mins ....

Spuds

0.5a has been uploaded ... this should fix the imageshack issues folks were having with both thumbs and full images.   Give it a try!

Am'

thx

this not work :

[img]http://a.imageshack.us/img828/3141/92265225.jpg[/img]

someone can confirm that ?
اذا أحس أحد انه لم يخطأ ابدا في حياته, فهذا يعني أنه لم يجرب أي جديد في حياته
My Mods For SMF 2 RC3 : XQuote XCode - Vbulletin Style New Meta Tags

Spuds

Works fine for me .... You do realize that's a full sized image and that highslide will not make it a thumbnail for you. 

Sabre™

I have my image max set to 300 x 300, so instead, I changed the img array to 'before' => '[img width=300 height=300]',
Its a rough hack, but works, and is globally forced lol :P
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Spuds

That would do it :)

In the example the link could be posted with a width attribute like [img width=150]http://a.imageshack.us/img828/3141/92265225.jpg[/img] and he would get a thumbnail ... or just post the thumbnail image that is provided from imageshack to begin with. 

If you post an imageshack thumbnail the mod will figure out what the full sized image is for a given thumbnail but it does not put in a thumbnail when someone posts a full sized image .... I suppose I could make that an option in the future.

Advertisement: