forum.coppermine-gallery.net

Support => cpg1.5 plugins => cpg1.5.x Support => cpg1.5 plugin contributions => Topic started by: Αndré on June 08, 2009, 04:19:49 pm

Title: Panorama Viewer for cpg1.5.x
Post by: Αndré on June 08, 2009, 04:19:49 pm
This is a simple panorama viewer. It uses HTML to prevent large images breaking your website design. If you upload an image with the extension '_360pano.jpg', the script will loop the image. <- the string is configurable since plugin version 1.4

It's tested only with my preferred settings yet. Please report any messy behavior.



Version 1.4 adds a configuration interface:

Panorama detection (+ corresponding Value)
360° panorama file name string - If the picture's file name contains that string, it will always be looped (ignores above settings)
Title: Re: Panorama Viewer for cpg1.5.x
Post by: Pascal YAP on June 08, 2009, 06:01:35 pm
Great :-)
Is there an example online right now ?
Title: Re: Panorama Viewer for cpg1.5.x
Post by: Αndré on June 08, 2009, 06:18:12 pm
I just created this (http://eenemeenemuu.ee.funpic.de/cpg1.5.x/thumbnails.php?album=4) for you :)
Title: Re: Panorama Viewer for cpg1.5.x
Post by: Pascal YAP on June 08, 2009, 06:50:35 pm
Thanx for all users :-)
Very interresting ! Stunning !!!
Title: Re: Panorama Viewer for cpg1.5.x
Post by: SaWey on June 08, 2009, 07:06:43 pm
This is a great plugin, unfortunately it doesn't seem to work in Chrome and IE.
I think it has something to do with the 'table-layout' style attribute.
Title: Re: Panorama Viewer for cpg1.5.x
Post by: Αndré on June 08, 2009, 07:14:40 pm
it doesn't seem to work in Chrome and IE.

Yes, that's why I said
It's tested only with my preferred settings yet.
= Coppermine settings and my firefox 3.0  ;D

In my first version (0.1.0) I used a fixed image width for setting the scroll bars. This should work for all browsers, but I try to prevent the fixed width.
I'm no css pro. Maybe someone knows how to do that within our table design that works with all/most browsers


I released this plugin and added it to the svn to show that I'm working on such a thing.
Title: Re: Panorama Viewer for cpg1.5.x
Post by: Αndré on June 09, 2009, 10:31:56 am
I think it has something to do with the 'table-layout' style attribute.

Problem is caused by
Code: [Select]
$template_display_media = <<<EOT
        <tr>
                <td align="center" class="display_media" nowrap="nowrap">
                        <table cellspacing="2" cellpadding="0" >
                                <tr>
                                        <td align="center" style="{SLIDESHOW_STYLE}">
                                                {IMAGE}
                                        </td>
                                </tr>
                        </table>
                </td>
            </tr>
            <tr>
                <td>
                <table width="100%" cellspacing="2" cellpadding="0" class="tableb tableb_alternate">
                                <tr>
                                        <td align="center">
                                                {ADMIN_MENU}
                                        </td>
                                </tr>
                </table>


<!-- BEGIN img_desc -->
                        <table cellpadding="0" cellspacing="0" class="tableb tableb_alternate" width="100%">
<!-- BEGIN title -->
                                <tr>
                                        <td class="tableb tableb_alternate"><h1 class="pic_title">
                                                {TITLE}
                                        </h1></td>
                                </tr>
<!-- END title -->
<!-- BEGIN caption -->
                                <tr>
                                        <td class="tableb tableb_alternate"><h2 class="pic_caption">
                                                {CAPTION}
                                        </h2></td>
                                </tr>
<!-- END caption -->
                        </table>
<!-- END img_desc -->
                </td>
        </tr>

EOT;

If I change
Code: [Select]
<table cellspacing="2" cellpadding="0" >to
Code: [Select]
<table cellspacing="2" cellpadding="0" width="100%">it works in all browsers (see my demo page).


Is the missing width attribute intended or can it be added to svn?
Title: Re: Panorama Viewer for cpg1.5.x
Post by: Αndré on June 09, 2009, 06:16:09 pm
As the table in the next table row has a width of 100%, I added the missing width attribute to the table in the first table row.
Title: Re: Panorama Viewer for cpg1.5.x
Post by: Phill Luckhurst on June 09, 2009, 08:41:26 pm
Very nice work. ;D
Title: Re: Panorama Viewer for cpg1.5.x
Post by: SaWey on June 09, 2009, 10:30:33 pm
Maybe when you have some time to spare, you can fix the slideshows for panorama pictures ;)
Title: Re: Panorama Viewer for cpg1.5.x
Post by: Αndré on June 10, 2009, 11:46:57 am
Maybe when you have some time to spare, you can fix the slideshows for panorama pictures ;)
Fixed in revision 6134 (plugin version 0.2.1).
Title: Re: Panorama Viewer for cpg1.5.x
Post by: Joachim Müller on June 11, 2009, 12:28:21 am
Nice plugin.
Recommendation for plugins version numbering is to use only two digits, not three. I suggest to drop the usual modest leading zero that is often meant to indicate the alpha or beta stage. I suggest releasing the next version as 2.2. Just a recommendation though, you're of course free to continue using your version numbering scheme.
Title: Re: Panorama Viewer for cpg1.5.x
Post by: Αndré on June 11, 2009, 08:55:16 am
I introduced the third digit because I often made just some small changes and released every new version on the appropriate plugin announcement thread.
This was before I had access to the svn. Maybe I can drop the third digit and re-release all my cpg1.5.x plugins when cpg1.5.x and this board becomes public.

Thanks for your hint.
Title: Re: Panorama Viewer for cpg1.5.x
Post by: SaWey on June 11, 2009, 11:55:46 am
Nice plugin.
Recommendation for plugins version numbering is to use only two digits, not three. I suggest to drop the usual modest leading zero that is often meant to indicate the alpha or beta stage. I suggest releasing the next version as 2.2. Just a recommendation though, you're of course free to continue using your version numbering scheme.
[semi ot]
For the new plugin repo, I required 3 digits (major.minor.revision release), I thought this was the most common use of version numbering?
[/semi ot]
Title: Re: Panorama Viewer for cpg1.5.x
Post by: Αndré on June 11, 2009, 12:07:26 pm
For the new plugin repo, I required 3 digits (major.minor.revision release), I thought this was the most common use of version numbering?
IMO it's useful to have 3 digits:

Of course the first digit is incremented rarely (or never :P), but it should be there to have the possibility to show the users that there has been much improvements/changes or if a mod is converted to a plugin. That avoids to release a new version with a name like "Better version of foo (ng)" or "foo - the plugin version".


For the moment I will stay at a three digit version numbering.
Title: Re: Panorama Viewer for cpg1.5.x
Post by: Joachim Müller on June 11, 2009, 12:32:10 pm
From the docs: http://coppermine.svn.sourceforge.net/viewvc/coppermine/trunk/cpg1.5.x/docs/en/dev_plugin_writing.htm#plugin_writing_core_files
Quote
# $version
The version of your plugin - usually starting with 1.0 (although you're welcome to come up with any other numbering scheme as long as the difference between versions will be obvious).
Code: [Select]
$version = '1.0';
So, there is nothing mandatory, but personally I'm not fond with the modest version number scheme that many FOSS apps use that have three digits, as end users are not used to that - the more digits a version number has, the less serious users seem to take new releases. That's why I'm not fond of the version numbering scheme of cpg and suggested to drop it in favor of two-digits (similar to Ubuntu for example), which was turned down in a poll we held then (don't remember the thread out of the back of my head). Since 99% of all plugins hardly evolve that much in my eyes two digits should be enough for that as well. Three digit releases look very nerdish to end users in a world where people are used to new software versions having brand new names (think of the naming scheme that Microsoft has chosen for their top product "Windows").
Title: Re: Panorama Viewer for cpg1.5.x
Post by: batabe on June 29, 2010, 04:49:23 pm
hi André,

i've installed the latest version of the panorama viewer, but the panoramas are not shown as discriebed
http://www.balatonparty.com/displayimage.php?album=75&pid=5276#top_display_media

tried IE, Opera (win7), Firefox (linux)

if you open the links above, is it oK? or is there any issue with the 1.5.6 and panoviewer?

thanks
Title: Re: Panorama Viewer for cpg1.5.x
Post by: Αndré on June 29, 2010, 06:31:23 pm
Please disable the Lightbox plugin (and maybe others, too) and try again.
Title: Re: Panorama Viewer for cpg1.5.x
Post by: batabe on June 29, 2010, 08:08:37 pm
after disabled lightbox, the structure of site was right, just image was scrollable, but displayed imageheigt was at about 100px, so it looks now ugly, so i'm using lightbox instead
Title: Re: Panorama Viewer for cpg1.5.x
Post by: Αndré on June 29, 2010, 08:12:35 pm
image was scrollable, but displayed imageheigt was at about 100px, so it looks now ugly
Can you elaborate please (screenshot or set up a second test gallery to show the output)? Please give us the chance to improve our plugins :)
Title: Re: Panorama Viewer for cpg1.5.x
Post by: batabe on June 29, 2010, 08:19:13 pm
Can you elaborate please (screenshot or set up a second test gallery to show the output)? Please give us the chance to improve our plugins :)

sure:

http://www.balatonparty.com/displayimage.php?album=77&pid=5288#top_display_media
Title: Re: Panorama Viewer for cpg1.5.x
Post by: batabe on June 29, 2010, 08:21:19 pm
sure:

http://www.balatonparty.com/displayimage.php?album=77&pid=5288#top_display_media

the height of the image is 640 px


if you can probably panoramaviewer and lightbox compatible to make, it will be fine :)
Title: Re: Panorama Viewer for cpg1.5.x
Post by: Αndré on June 29, 2010, 08:26:45 pm
http://www.balatonparty.com/displayimage.php?album=77&pid=5288#top_display_media
Do you have installed other plugins than the plugin viewer on your screenshot? Can you please test with another browser?
Title: Re: Panorama Viewer for cpg1.5.x
Post by: batabe on June 29, 2010, 08:49:19 pm
Do you have installed other plugins than the plugin viewer on your screenshot? Can you please test with another browser?

win7: opera, ie8
linux: ff

the same result.

i've unintalled all the plugins except forum and panorama viewer, but again the same result :(

does it work for you right with the latest CM?

Title: Re: Panorama Viewer for cpg1.5.x
Post by: Joachim Müller on June 30, 2010, 07:22:52 am
does it work for you right with the latest CM?
The term "latest CM" is useless and will mean less in the future (apart from the fact that the official abbreviation is "CPG"). Versions have numbers for a reason. Use them. I'm pretty sure that Αndré is using a subversion checkout to test new plugins against. It's beyond the scope of this thread though to explain what that is. If you want to figure out, read that term up in our documentation.
Title: Re: Panorama Viewer for cpg1.5.x
Post by: Αndré on June 30, 2010, 07:46:26 am
Works for me as expected with latest svn checkout (r7729, see attached screenshot) and also on my gallery running cpg1.5.6.

Maybe it depends on your settings. Can you please set up a gallery where we can test the issue if you don't want to test it on your live gallery?
Title: Re: Panorama Viewer for cpg1.5.x
Post by: batabe on June 30, 2010, 07:31:19 pm
Works for me as expected with latest svn checkout (r7729, see attached screenshot) and also on my gallery running cpg1.5.6.

Maybe it depends on your settings. Can you please set up a gallery where we can test the issue if you don't want to test it on your live gallery?

i have CPG 1.5.6 (sorry for the "CM"  :)), revision 7620. probably later i can set up a test gallery :(

thanks for the information.
see you later
Title: Re: Panorama Viewer for cpg1.5.x
Post by: peterlustig on October 26, 2010, 04:08:47 pm
Hi Andre,

thanks a lot for this plugin! In fact, the availability of this one made me finally upgrade from 1.4x to 1.5x. Which took me way more time and effort than originally thought, but I am happy now.

However -- your plugin does not seem to work together with the slider plugin http://forum.coppermine-gallery.net/index.php/topic,57388.html (http://forum.coppermine-gallery.net/index.php/topic,57388.html), which I love as well. When both plugins are activated I get the following behaviour on my top-level page
a) the slider only shows one picture
b) this picture is the ONLY clickably item on the page. Alle menu items, thumbnails, categories etc. are blocked.

Of course, I know that with the combination of exactly these two plugins I am probably a rare case... Nevertheless, any help would be greatly appreciated.

Cheers, Peter

PS. Didn't know whether to post here or in the slider-plugin-thread. But as the slider seems to me to be the "older" plugin I decided to post here...
Title: Re: Panorama Viewer for cpg1.5.x
Post by: Αndré on October 26, 2010, 05:14:45 pm
As a workaround comment out
Code: [Select]
$thisplugin->add_filter('page_html','panorama_viewer_page_html_thumb');which will stop the cropping of thumbnails.


The slider span
Code: [Select]
<span id="slider_temp" style="visibility:visible;position:absolute;top:-100px;white-space:nowrap;left:-9000px;"><?php echo $slider_pics;?></span>causes the issue, so we have to adjust the pattern to ignore all images that belongs to that element
Code: [Select]
        $panorama_start = "<table width=\"100%\" style=\"table-layout:fixed;\"><tr><td width=\"100%\" align=\"center\"><div style=\"width:100%; overflow:hidden;\">";
        $panorama_end = "</div></td></tr></table>";
        $pattern = "/(<a href=\"displayimage.*<img src=\".*\/{$CONFIG['thumb_pfx']}.*<\/a>)/Uis";
        $html = preg_replace($pattern, $panorama_start."\\1".$panorama_end, $html);
Title: Re: Panorama Viewer for cpg1.5.x
Post by: peterlustig on October 26, 2010, 05:40:21 pm
Hi André,

commenting out helped -- now everything runs smoothly. Great plugin. I like it very much also without having "_360pano.jpg" added.

Thanks for the help!

Cheers, Peter
Title: Re: Panorama Viewer for cpg1.5.x
Post by: Walkinman on March 25, 2011, 05:50:05 am
Hey André

I installed this plugin, and it works fine for the panoramics, but it gets weird on the thumbnail view. The first row of thumbnails acts weird . the first thumbnail drops down slightly. What's really weird is this happens only if the first thumbnail is a horizontal image, and then only if there is at least one vertical image in the first row .. a row full of horizontal thumbnails aligns correctly. A row starting with a vertical image also aligns correctly. I've disabled the plugin and everything is back to normal.

I apologize if this is an issue already discussed on this thread; I didn't quite understand everything that was said above, but thought I'd post anyway. The plugin is a useful feature, and I would love to use it if I can work around this issue.

I got the same issue in Firefox, Safari and Chrome. See attached screenshot.

Thanks

Cheers

Carl
Title: Re: Panorama Viewer for cpg1.5.x
Post by: Walkinman on April 01, 2011, 12:14:41 am
hey André

Well, I'm not sure what happened .. I uninstalled the plugin last week, because I didn't want the display of the thumbnails askew. I tried it again today, and now the problem posted above is not occurring, everything is fine.  Far as I know, I didn't do anything different this time.

Great plugin, thanks.

Cheers

Carl
Title: Re: Panorama Viewer for cpg1.5.x
Post by: Αndré on September 05, 2012, 03:18:41 pm
Version 1.4 (attached to initial post) adds a configuration interface. For more information have a look at the initial post.