News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

Highslide 4 SMF

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

Previous topic - Next topic

Bakdoi

I installed it and everything showed green however when I go into admin>mods> the Highslide mod shows no name but is clickable. I click in and all I see are boxes and drop down menues which are centered and blank without any names to explain what they are.

Spuds

That means the language strings did not get installed in to your modifications.english.php (or english-utf8) file.  You will need to go to the themes->default->languages directory and add the text stings to that file, at the end just before the ?> at the end of that file. 

You can also get to this file from your admin panel  admin_>configuration->themes and layout->modify themes.  Then select the default curve theme and navigate to languages directory and select the modifications.english file ... then add in the missing strings as above and save.

The txt strings can be found in the package in the languages.xml file.

Manual Installation of Mods will also help explain this.

admirable

Hey dude.... may i post here any problem regarding Modification....>>>??
My Website| JA Technologies
-----------------------------------------------------------------------
Do hard work, one day you will be awarded for that!
-----------------------------------------------------------------------

imburner

Quote from: admirable on November 10, 2011, 01:28:09 PM
Hey dude.... may i post here any problem regarding Modification....>>>??

If it has to do with this mod, yes. If not then just find the right board here and post it in the proper location to get help easier and quicker

Shambles

I quite often get this general warning when images from postimage.org get "high slided"

http://www.i30ownersclub.com/forum/index.php?/topic,528.0.html

2: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty

File: /home/********/public_html/forum/Sources/hs4smf-Subs.php
Line: 221


It's no real biggie and doesn't seem to disrupt my forum, but I'd like to stop the message appearing in the Admin error log.

Here are the lines of code producing the warning:

elseif (stripos($image['domain_url'], 'postimage') !== false)
{
// postimage.org appears to set the full image name based on the user agent, different agents generate different image names ...

$out = $image[2];
ini_set('user_agent', $_SERVER['HTTP_USER_AGENT']);

$page = file_get_contents($image[2]);


Not being a php coder (but I do code in assembler/machine code) would something akin to the following relieve me of the error from file-get-contents (ie, is the syntax correct)?

elseif (stripos($image['domain_url'], 'postimage') !== false)
{
// postimage.org appears to set the full image name based on the user agent, different agents generate different image names ...

$out = $image[2];
ini_set('user_agent', $_SERVER['HTTP_USER_AGENT']);

                // only read the file if the name isn't blank
                if ($image[2] !== "")
$page = file_get_contents($image[2]);


Thanks for reading :)

Spuds

I'll have to take a look as to why its getting a blank image, but in the meantime you can just do

Code (find) Select
elseif (stripos($image['domain_url'], 'postimage') !== false)

Code (replace) Select
elseif (stripos($image['domain_url'], 'postimage') !== false && !empty($image[2]))

should stop the errors for you

Shambles

Quote from: Spuds on November 13, 2011, 01:45:38 PM
I'll have to take a look as to why its getting a blank image, but in the meantime you can just do

Code (find) Select
elseif (stripos($image['domain_url'], 'postimage') !== false)

Code (replace) Select
elseif (stripos($image['domain_url'], 'postimage') !== false && !empty($image[2]))

should stop the errors for you

Thanks for the improved code  ;D

I'm not too concerned that postimage often returns non-conformant images, as it doesn't affect much (as far as I can see), but I do appreciate your swift reply.

Did I mention it's an awesome mod?

There, I just did  8)

Manu.G

I searched the topic, but was able to find a solution. :)


I installed your mod and it works great and I like it, but there is a little problem with some posted images
As you can see in this post: http://forum.arsenie.net/index.php/topic,11381.msg245690.html#msg245690
1 image opens in Highslide, the other image in a white page, but I don't know why :(
Version SMF 2.0.8
SimplePortal 2.3.5

Spuds

Its because the first image is named highslide.jpg so its tricking the code in to thinking the image has already been prepared to slide .....

You can open the hs4smf-Subs.php file in the sources directory and find

Code (find) Select
if (stripos($str, "highslide") == false && stripos($str, "onclick") === false)
and replace it with
Code (replace) Select
if (stripos($str, '"highslide') === false && stripos($str, 'onclick="') === false)

Also consider not using the coral CDN setting in hs4smf, I wish that service was more reliable but I often find it causes more problems than it solves.

Manu.G

Thanks it solve the problem :D but there seems to be a problem with radikal.ru :(
When you scroll a bit down in the topic you can see images posted by a member which are loaded
up on radikal.ru and those images open in a white page too :(
http://forum.arsenie.net/index.php/topic,11381.msg245570.html#msg245570
Version SMF 2.0.8
SimplePortal 2.3.5

Spuds

Thats funny .. its a bmp image, I did not know anyone still used that crappy format :)

same file as before ... change
Code (find) Select
if (preg_match('~href=[\'"][^"\']+\.(?:gif|jpe|jpg|jpeg|png)~i', $str))
to
if (preg_match('~href=[\'"][^"\']+\.(?:gif|jpe|jpg|jpeg|png|bmp)~i', $str))

Manu.G


Quote from: Spuds on November 14, 2011, 02:32:30 PM
Thats funny .. its a bmp image, I did not know anyone still used that crappy format :)

same file as before ... change
Code (find) Select
if (preg_match('~href=[\'"][^"\']+\.(?:gif|jpe|jpg|jpeg|png)~i', $str))
to
if (preg_match('~href=[\'"][^"\']+\.(?:gif|jpe|jpg|jpeg|png|bmp)~i', $str))

Didn't you know, fools never dies? ;)

Thanks for your fast help! :D
Version SMF 2.0.8
SimplePortal 2.3.5

Shambles

Hi Spuds. Thanks for your earlier assistance regarding getting rid of the "empty file" message.

I strongly suspect postimage.org is at fault again, for this error which crops up from time to time:

2: file_get_contents(http://www.postimage.org/image.php?v=gxrjs_9) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: HTTP request failed! HTTP/1.1 503 Service Temporarily Unavailable

File: /home/********/public_html/forum/Sources/hs4smf-Subs.php
Line: 221

I'm getting this logged half a dozen times every hour or so, probably because there are half a dozen postimage.org links in one of the threads being reported.

As before, quite willing to simply ignore this, unless you think a bit of "ignore" code could be added...?

Thanks

Spuds

Well I don't normally recommend this since, its really a poor practice, but in this case somewhat unavoidable due to the way that service works or did when I first wrote this mod some time ago

find
Quote$page = file_get_contents($image[2]);
replace with
Quote$page = @file_get_contents($image[2]);
that little '@' should supress the error mesasge, which in this case was the postimage site was either down or swamped ...

Shambles

Quote from: Spuds on November 15, 2011, 09:43:58 AM
Well I don't normally recommend this since, its really a poor practice, but in this case somewhat unavoidable due to the way that service works or did when I first wrote this mod some time ago...

I'm also not into bad coding practices, but if it alleviates the problems extracting from that site then I'm all for it.

Thanks :)

Manu.G

One more question  :-[


In the settings for highslide is this to read
QuoteAdd additional settings in the Aeva Gallery to provide similar lightbox formatting


I've mark this but for some reasons it doesn't show any effect on the gallery.
I'm using Avea Media 2.10, could this be the reason?
Version SMF 2.0.8
SimplePortal 2.3.5

Spuds

Its fine with Aeva 2.1 or should be .... you need to make sure you have enabled highslide in your aeva settings first. 

That setting in hs4smf only attempts to make the style of the lightbox the "similar", but it does not enable it in the gallery.

Manu.G

Quote from: Spuds on November 15, 2011, 08:05:34 PM
Its fine with Aeva 2.1 or should be .... you need to make sure you have enabled highslide in your aeva settings first. 

That setting in hs4smf only attempts to make the style of the lightbox the "similar", but it does not enable it in the gallery.
Ah ok, because in the gallery is it the style far away of what I use in the forum itself, but that's ok :D
Version SMF 2.0.8
SimplePortal 2.3.5

Spuds

Did you install Aeva after HS4SMF, if so then it will not work and you would have to uninstall hs4smf and then reinstall it for it to affect Aeva.  If not then I don't know.

Manu.G

I installed HS4SMF after I installed Aeva, but don't worry, it isn't that big problem. ;) I got the idea it would look nice to get the same effect in the Gallery as in the forum, the dark background when an image open, but it's ok :D
Version SMF 2.0.8
SimplePortal 2.3.5

Advertisement: