News:

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

Main Menu

Highslide 4 SMF

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

Previous topic - Next topic

Scott S

Quote from: Spuds on June 11, 2010, 10:25:29 PM
I hear you on the logs .... sorry about that .... Does the error log show which line is throwing the error?  I think I know where it is occurring based on the index but what to be sure before I post a change.

Afraid not. That's all it says.

Any suggestions will be gratefully received!

Spuds

Try the following and lets see if it makes things better:

find:
            $footer .= ($modSettings['hs4smf_slideshowcontrols'] == 0) ? 'hs.wrapperClassName = \'outer-glow \';' . "\n" : 'hs.wrapperClassName = \'outer-glow dark\';' . "\n";


replace with:
            $footer .= (!isset($modSettings['hs4smf_slideshowcontrols'])) ? 'hs.wrapperClassName = \'outer-glow \';' . "\n" : 'hs.wrapperClassName = \'outer-glow dark\';' . "\n";

Scott S

That seems to have done the trick, thanks Spuds :)

Salkiri

Quote from: Salkiri on June 03, 2010, 07:49:54 PM
I love this mod, but I'm trying to use it in conjunction with AEVA Media.  It doesn't seem to work properly with images that have an URL like http://www.company.org/MGalleryItem.php?id=2 [nofollow]  Any idea how I can get this to work together?

Anyone?

Spuds

Quote from: Salkiri on June 03, 2010, 07:49:54 PM
I love this mod, but I'm trying to use it in conjunction with AEVA Media.  It doesn't seem to work properly with images that have an URL like http://www.company.org/MGalleryItem.php?id=2  Any idea how I can get this to work together?

Sorry, I missed this when it was first posted ...

Where/how are you calling MGalleryItem?  Generally its used as the direct link to an image or direct embed code and does not call SMF or its functions (ie its used to show an image from the media gallery on another site altogether) so I'm not sure how highslide work work in that instance.

Salkiri

So the direct link that would be used in the post would be would be like http://www.company.org/MGalleryItem.php?id=41 [nofollow] so you would use a tag like:


[img]http://www.black-company.org/MGalleryItem.php?id=41[/img]


It shows the image correctly, but instead of opening the highslide, it just opens the image in the same window.

Spuds

#46
OK now I understand  .... I'll take a look into what might be going on and see if there is a fix.


Salkiri

thx, that would be great.  and great mod btw!

Spuds

OK .... Here is what I believe is occurring.

Using the AEVA direct link, as you have shown, is a link to the full sized image and that is what displays in the post, at least on the quick test that I did on my test forum.  Since its already a full sized image there is nothing to highslide since its already expanded (granted it could be even larger but restricted to the post max setting).  If you have a link where this is different please let me have it so I can see it in action.

Some options we could explore are to use thumb option (ie the id=xx;thumb) on the direct link tag and I could make an update to expand that.  I could also look for img tags optional width / height attributes but I'm less keen on that idea.

Anyway let me know.


Axodious

#49
Hey,

Just installed this mod on a new SMF 2.0 RC3 forum with Aeva & WoW - World of Warcraft Tooltips. Getting 3 errors on install that don't seem to be affecting functionality but I figured they should be noted.

Type of error: General
http://*****/forum/index.php?action=admin;area=packages;sa=install2;package=HS4SMF_0.3.zip;pid=02: Invalid argument supplied for foreach()File: /home/*****/public_html/forum/Sources/DbPackages-mysql.php
Line: 194


Type of error: Undefined
http://*****/forum/index.php?action=admin;area=packages;sa=install2;package=HS4SMF_0.3.zip;pid=08: Undefined index: indexesFile: /home/*****/public_html/forum/Packages/temp/add_settings.php
Line: 228


Type of error: Undefined
http://*****/forum/index.php?action=admin;area=packages;sa=install2;package=HS4SMF_0.3.zip;pid=08: Use of undefined constant value - assumed 'value'File: /home/*****/public_html/forum/Packages/temp/add_settings.php
Line: 16


If you uninstall the modification and leave the MySQL entry for it then try to reinstall I receive many more errors (don't have them at the moment as I cleared my log).

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.

P.S.
Pretty sure this is purely a problem with the browser but Highslide doesn't seem to be working in Chrome, when I click an image i get the border for Highslide but nothing in it.

*UPDATE*
It seems that the problem with Highslide not working in Chrome is because of a plugin for Chrome that blocks advertisements also breaks Highslide. Easy fix is to either remove the plugin or whitelist any websites that you visit with Highslide on them.

Specifically for AdThwart (the plugin I am using) if you right click the icon for it and go to options then go to the "General" tab then uncheck "Experimental: Block some ads before they load".
"You make my heart pound; my mouth water. Yeah, there's nothing like a chili dog." Sonic the Hedgehog

frozenas

Hi. I have installed this plugin, but when i click on the image, it just writes "Loading..." and nothing happens... For infinite time amount. When you click on the text loading, it disappears. I've enabled the plugin at options, haven't configured anything else.

Spuds

That usually means that the JavaScript (highslide) is not loading correctly.  Do you have a link that I can look at to see if I can determine what might be occurring in your instance?   Also is this the default theme?

frozenas

#52
Yes, of course. I have a fresh installation, testing everything out at the moment. :)

Here you are: http://ekstaze.co.cc/test/forum/index.php?topic=1.0. And yea, i'm using the default theme, until i get everything working, then i can determine, which plugins will need modifications for the new theme.

Okay, website is up again. Please check it out.

Sabre™

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
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Spuds

Quote from: frozenas on July 25, 2010, 10:50:20 PM
Yes, of course. I have a fresh installation, testing everything out at the moment. :)

Here you are: http://ekstaze.co.cc/test/forum/index.php?topic=1.0. And yea, i'm using the default theme, until i get everything working, then i can determine, which plugins will need modifications for the new theme.

Okay, website is up again. Please check it out.

Took a quick look, the main highslide javascript is not being loaded in to the page so the on-click event that is associated with the image can't fire.  Since its not the default theme did you get any errors when you installed the mod (I'm assuming you did install it into this theme)?  The index.template.php file in your theme needs to have the following in it.

// HS4SMF enable footer
if (!empty($modSettings['hs4smf_enabled'])) {
if (!function_exists('hs4smf')) {
global $sourcedir;
$success = (include_once $sourcedir . '/hs4smf-Subs.php');
if ($success)
echo hs4smf_prepare_footer();
}
else
echo hs4smf_prepare_footer();
}


in the default theme the above is insterted after this section
function template_html_below()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;



Spuds

Quote from: Sabre™ on July 26, 2010, 03:15:46 AM
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];


Temp fix
Thank you very much for the updated regex ... have not looked at imageshack but did the link style change or was the old regex just a bit weak ...

frozenas

Quote from: Spuds on July 26, 2010, 08:58:27 AM
Quote from: frozenas on July 25, 2010, 10:50:20 PM
Yes, of course. I have a fresh installation, testing everything out at the moment. :)

Here you are: http://ekstaze.co.cc/test/forum/index.php?topic=1.0. And yea, i'm using the default theme, until i get everything working, then i can determine, which plugins will need modifications for the new theme.

Okay, website is up again. Please check it out.

Took a quick look, the main highslide javascript is not being loaded in to the page so the on-click event that is associated with the image can't fire.  Since its not the default theme did you get any errors when you installed the mod (I'm assuming you did install it into this theme)?  The index.template.php file in your theme needs to have the following in it.

// HS4SMF enable footer
if (!empty($modSettings['hs4smf_enabled'])) {
if (!function_exists('hs4smf')) {
global $sourcedir;
$success = (include_once $sourcedir . '/hs4smf-Subs.php');
if ($success)
echo hs4smf_prepare_footer();
}
else
echo hs4smf_prepare_footer();
}


in the default theme the above is insterted after this section
function template_html_below()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;


Oh, you must've hit the moment, where i switched the themes for around 10 minutes for another plugin.

Anyway, it is the default theme it is not working on. And that thing wasn't added to the index.template.php file in the default theme too, although the installation haven't any errors.

I have added this big column after    global $context, $settings, $options, $scripturl, $txt, $modSettings;, so no everything in my website became oversized and it is still not working. :/ Won't remove it, in case you want to check it. I will have a question in these forums, also i have to set up joomla as a new installation website, moving from e107... So yea, i'm not in a rush about the plugin.

Spuds

Now all the site says is database error ....

frozenas

Eh, i'm editing the site by hand now, it's in maintenance mode. Maybe i'll get less errors that way. ALthough, i cannot find some files to edit. I will post, if i get any anyway...

Sabre™

Quote from: Spuds on July 26, 2010, 09:00:19 AM
... did the link style change or was the old regex just a bit weak ...

I'm not too sure if it had changed, as I hadn't looked at it before, but saw why the original string wasn't working.
Good job on this mod mate, it's a standard feature for me now.
Thanks :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Advertisement: