Highslide 4 SMF

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

Previous topic - Next topic

Am'

it does not work, always error

I think the apostrophe is not escaped ... as on other subjects, no problem
اذا أحس أحد انه لم يخطأ ابدا في حياته, فهذا يعني أنه لم يجرب أي جديد في حياته
My Mods For SMF 2 RC3 : XQuote XCode - Vbulletin Style New Meta Tags

Spuds

#101
well with all the possible permutations of how you might have set up the mod options and not being able to view a site where the the problem exists I can't really help ....  :(

EDIT:
Am' was able to provide me access to see the issue first hand, looks like a couple of contributing factors were at work (mainly special characters in a subject breaking the javascript) .... I released an .5d version to clean those issues up.

flutter

I cant get this to work.  I'm using 2.0 rc3.  I have downloads pro installed but vb has given us an option to not use his hightslide now in his last update, I requested it as I thought that was what was making this mod not work.

I also have aeva lite installled but nothing else I can think of that would conflict with it.

Downloads pro is based off the forum so images I upload there should use it shouldnt they?

Spuds

QuoteI have downloads pro installed
I have no way to test that mod to see what it is doing, vb will have to help in that regard as I can't test what I don't have  :(.  HS4SMF runs at the end of page loads and looks for attachments and img tags in a page and modifies the html so that highslide is attached to those items.  If you can provide me a page to view then maybe I can see what is happening.

Full Aeva also has its version of highslide but hs4smf and aeva do co-exist but there are some issues.  Its best to always install aeva and then hs4smf , and if you update aeva you should uninstall and re-install hs4smf as it hooks in to one of aeva files to help with compatibility.

kaitenkid

Excelent mod, ..

In RC3 was amazing for my site.. but ..  :'( now please in RC4  please please

Spuds

Quote from: kaitenkid on November 03, 2010, 12:29:19 PM
Excelent mod, ..

In RC3 was amazing for my site.. but ..  :'( now please in RC4  please please

You package version 'e' is now available for RC4 users only ....

wjhdiz

I got this error and believe this is the problem for 2.0RC4:
Execute Modification ./Themes/core/Display.template.php Test failed
1. Replace ./Themes/core/Display.template.php Test failed

Freedom of speech? It is freer if not speaking out.
Believing in God? Yes, talk with God every day through God creations.
Coding is poem and a way of keeping away from the troubled world.

Spuds

I don't think the core theme will be in the final release, as such I did not do any work to have the mod install in that theme.  If you want to use core you will have to manually add in the changes to the display template file.

Chas Large

Hi Spuds,

I've previously used the other Highslide Inage Viewer mod with SMF 2 RC2&3 but as it's not been updated for a while and will not install in RC4 - even using RC2 emulation - I've decided to switch to yours. It works very well with no problems installing on RC4. Many thanks.

Like some others, I also use the SMF Gallery and neither the original HSIV or you're mod works directly with it.

There was a use fix given for HSIV that allowed full functionality of the Highslide facility in the Gallery which consisted of the following changes to Themes/Default/Gallery2.template.php

Find:

// Show the pictures

$rowlevel = 0;
$styleclass = 'windowbg';


$image_count = $context['gallery_image_count'];

if ($image_count == 0)
{
echo '
<tr class="' . $styleclass . '">
<td colspan="4" align="center"><b>',$txt['gallery_nopicsincategory'],'</b></td>
</tr>

';


}


foreach($context['gallery_image_list'] as $row)
{
if ($rowlevel == 0)
echo '<tr class="' . $styleclass . '">';

echo '<td align="center"><a href="' . $scripturl . '?action=gallery;sa=view;pic=' . $row['id_picture'] . '">
<img ' . ($GD_Installed == true ?  'src="' . $modSettings['gallery_url'] . $row['thumbfilename'] . '" ' : 'src="' . $modSettings['gallery_url'] . $row['filename'] . '" height="78" width="120" ')  . ' border="0" alt="" /></a><br />';
echo '<span class="smalltext">' . $txt['gallery_text_views'] . $row['views'] . '<br />';


Replace with:

// Show the pictures

$rowlevel = 0;
$styleclass = 'windowbg';


$image_count = $context['gallery_image_count'];

if ($image_count == 0)
{
echo '
<tr class="' . $styleclass . '">
<td colspan="4" align="center"><b>',$txt['gallery_nopicsincategory'],'</b></td>
</tr>

';


}


foreach($context['gallery_image_list'] as $row)
{
if ($rowlevel == 0)
echo '<tr class="' . $styleclass . '">';

echo '<td align="center"><a href="' . $modSettings['gallery_url'] . $row['filename'] . '" class="highslide" rel="highslide">
<img ' . ($GD_Installed == true ?  'src="' . $modSettings['gallery_url'] . $row['thumbfilename'] . '" ' : 'src="' . $modSettings['gallery_url'] . $row['filename'] . '" height="78" width="120" ')  . ' border="0" alt="' .  '<a href=\'' . $scripturl . '?action=gallery;sa=view;id=' . $row['ID_PICTURE'] . '\'>[Detail]</a>' . '" /></a><br />';
echo '<div class="highslide-heading">' , @$context['gallery_cat_name'] , '</div>';


This almost makes your mod fully compatible with SMF gallery. I now get the magnifier over the images in the gallery but when clicked they open as an enlarged image on the page rather than in the typical highslide box.

Could I ask you to tell me how to modify this code so that I can integrate your mod correctly into SMF gallery.

Attached is the original Gallery2.template.php if it helps.

Many thanks

Chas
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Spuds

Chas,

hs4smf does not use the "Unobtrusive" format of highslide, so you should just be able to replace the

rel="highslide"

in your modified code with

Quoteonclick="return hs.expand(this)"

Give that a try and let me know, I'm not really familiar with SMF Gallery so if that does not work I'll do some further digging around.

Chas Large

Quote from: Spuds on December 05, 2010, 07:42:16 PM
Chas,

hs4smf does not use the "Unobtrusive" format of highslide, so you should just be able to replace the

rel="highslide"

in your modified code with

Quoteonclick="return hs.expand(this)"

Give that a try and let me know, I'm not really familiar with SMF Gallery so if that does not work I'll do some further digging around.
Thanks Spuds, great, that fixes the highlight box effect. The only other issue is that I don't get the slideshow buttons at the top but can use the left and right arrow keys. I did with the previous version. I have "use Slideshow" enabled and in posts where there are multiple attachments, the slideshow feature works fine.

Any ideas?
Chas
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Spuds

QuoteI don't get the slideshow buttons

You can try one thing, after that I'd need to see a sample page to know for sure .... change the onclick event to be

onclick="return hs.expand(this, { slideshowGroup: 'fullgroup' })"
- or -
onclick="return hs.expand(this, { slideshowGroup: 'group1' })"

we need to tie in the control bar overlay via a slidegroup and I'm not sure what is being generated without seeing it ....

Chas Large

Thanks for the suggestions Spuds but either of those changes result in a parse error:

Quote from: parse errorParse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/nas05l/f/fiftyplusforum.co.uk/user/htdocs/forum/Themes/default/Gallery2.template.php on line 198

Attached is a screenshot which shows how an expanded image looks.

If you need to join the forum to see for yourself, please PM me and I'll send you a login.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Spuds

Sorry about that, forgot that was inside of an echo ....  anyway lets go back to the start ....

find:
// Show the pictures
$rowlevel = 0;
$styleclass = 'windowbg';


$image_count = $context['gallery_image_count'];

if ($image_count == 0)
{
echo '
<tr class="' . $styleclass . '">
<td colspan="' . $maxrowlevel . '" align="center"><b>',$txt['gallery_nopicsincategory'],'</b></td>
</tr>

';

}


foreach($context['gallery_image_list'] as $row)
{
if ($rowlevel == 0)
echo '<tr class="' . $styleclass . '">';

echo '<td align="center"><a href="' . $scripturl . '?action=gallery;sa=view;pic=' . $row['id_picture'] . '">
<img ' . ($GD_Installed == true ?  'src="' . $modSettings['gallery_url'] . $row['thumbfilename'] . '" ' : 'src="' . $modSettings['gallery_url'] . $row['filename'] . '" height="78" width="120" ')  . ' border="0" alt="" /></a><br />';


replace with:
// Show the pictures
$rowlevel = 0;
$styleclass = 'windowbg';


$image_count = $context['gallery_image_count'];

if ($image_count == 0)
{
echo '
<tr class="' . $styleclass . '">
<td colspan="' . $maxrowlevel . '" align="center"><b>',$txt['gallery_nopicsincategory'],'</b></td>
</tr>

';

}

if (!isset($settings['hs4smf_slideshow']) && $image_count > 1) {
$settings['hs4smf_slideshow'] = 1;
$settings['hs4smf_slideshow_group']['fullgroup'] = $image_count;
$settings['hs4smf_img_count'] = $image_count;
}

foreach($context['gallery_image_list'] as $row)
{
if ($rowlevel == 0)
echo '<tr class="' . $styleclass . '">';

echo '<td align="center"><a href="' . $modSettings['gallery_url'] . $row['filename'] . '" class="highslide" onclick="return hs.expand(this, { slideshowGroup: \'fullgroup\' })">
<img ' . ($GD_Installed == true ?  'src="' . $modSettings['gallery_url'] . $row['thumbfilename'] . '" ' : 'src="' . $modSettings['gallery_url'] . $row['filename'] . '" height="78" width="120" ')  . ' border="0" alt="' .  '<a href=\'' . $scripturl . '?action=gallery;sa=view;id=' . $row['ID_PICTURE'] . '\'>[Detail]</a>' . '" title="' . $row['title'] . '" /></a><br />';


that should set up the gallery to use the slide controls you have chosen in the admin panel, including image counts (if enabled) and picture title in the caption / heading if enabled.

Note the original code you supplied had removed the view count and also removed the start of the smalltext span for the image information (left the ending span in place) ... not sure that was intentional or not but I put it back to look like what was supplied with the gallery and not have the html error.

Chas Large

Hi Spuds,

Thanks again for taking the time to try and sort this issue out, I/we really appreciate it.

I have applied the fix and it's brought the image title back to the image when the mouse cursor is hovered over it but no slideshow controls other than the left and right arrow keys. See attached.

It's not a ball buster as the functionality is there but some members like to see buttons ;)
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Spuds

Chas,

Yup after I typed in that response I remembered that I forgot one step  :-[

find:
function template_image_listing()
{
global $scripturl,  $txt, $context, $modSettings, $id_member;


replace with:
function template_image_listing()
{
global $scripturl,  $txt, $context, $modSettings, $id_member, $settings;

Chas Large

Brilliant  :D

Thanks Spuds, you've made a lot of people very happy.

Kind regards

Chas
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Lou69

Thank you very much!  Highslide 4 SMF just installed perfectly on RC4.

Looks very nice and is working quite well with Aeva 1.4c.


thanks,

Lou     :)

Baekcity

Hi all,

I just installed HS4SMF on RC4, only theres 1 problem .... when i click the photo it stays loading the photo but nothing else happends?

Thanks

Spuds

Are you using a custom theme or the standard curve theme?  Just loading generally means that not all of the javascript bits have been loaded.

Advertisement: