Lunes, 22 Diciembre 2014 22:05
beggarly

Gallery2 plugin

Suggest/Comment/Post new extensions for Xmap!

Re: Gallery2 plugin

Postby joshua.lyon » Mon Nov 24, 2008 8:23 pm

Awesome work! The plugin works great with the default settings on my install with Joomla 1.5, Gallery2, G2Bridge 2.1a, and XMap for J!1.5.

You can see an example of it at the following URL:
boshdirect.com/site-map

The option to include the links to the photos in the XML only is an awesome option! I am really impressed with the quality of work and how fast you turned it around! Thanks for all the help!
http://boshdirect.com - Blog and photo gallery (auto / tech)
User avatar
joshua.lyon
Fresh Boarder
Fresh Boarder
 
Posts: 8
Joined: Thu Nov 20, 2008 9:07 pm
Location: Dallas/Fort-Worth, Texas

Re: Gallery2 plugin

Postby joshua.lyon » Mon Nov 24, 2008 8:51 pm

It appears that the g2ItemId is getting tacked on to the end of the SEF URLs that are generated by sh404SEF.

For example, the first gallery-album in my site-map shows up with a URL of:
http://boshdirect.com/gallery/Monaro_Conversion/&Itemid=3717

Whereas all that is needed is:
http://boshdirect.com/gallery/Monaro_Conversion/

The Itemid that is being appended, 3717, is the g2itemid of the album... but I thought that the Itemid parameter in a URL was typically the *joomla* menu itemid. In my case, the itemId for the g2bridge menu item would be 45.

It's been a while since I've run my site without SEF URLs... so I might just be a little rusty on the parameters. It doesn't affect the usability to an end-user on my site, but I will try to test this on a test install later tonight to better diagnose what's going on.
http://boshdirect.com - Blog and photo gallery (auto / tech)
User avatar
joshua.lyon
Fresh Boarder
Fresh Boarder
 
Posts: 8
Joined: Thu Nov 20, 2008 9:07 pm
Location: Dallas/Fort-Worth, Texas

Re: Gallery2 plugin

Postby guilleva » Mon Nov 24, 2008 9:04 pm

Hi Joshua,

Thanks for your feedback! Could you please tell me which sh404sef plugin are you using for Gallery2 Bridge? If possible, where can I get it?

Thanks!
User avatar
guilleva
Administrator
Administrator
 
Posts: 1527
Joined: Wed Sep 12, 2007 3:10 am
Location: San José, Costa Rica

Re: Gallery2 plugin

Postby tromp » Tue Nov 25, 2008 8:19 am

Hi Joshua,

Please, can you share the SEF plugin for Gallery2 bridge? I Hope it's for J!1.5.

Tromp
tromp
Fresh Boarder
Fresh Boarder
 
Posts: 1
Joined: Tue Nov 25, 2008 8:18 am

Re: Gallery2 plugin

Postby joshua.lyon » Tue Nov 25, 2008 3:06 pm

SEF URLs with G2 embedded in J!1.5 is somewhat of a pain in the ass. There isn't a direct plugin for sh404SEF... but Gallery2 has it's own SEO system built in.

If you setup the G2 SEO from the embedded version of G2, you will get some additional options that are designed specifically for using SEO with G2 within an embedded application. Once I entered my configuration, it tried to create an htaccess file for handling the SEO URLs. I found that the htaccess file that was generated didn't exactly work, so I had to go into my main Joomla htaccess file and custom build an htaccess file based on the things I saw in the G2 htaccess file that was generated. It is somewhat complicated and it took me a lot of trial and error... but it works great once it's set up.

Code: Select all
##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
#  mod_rewrite in use
RewriteEngine On

# BEGIN G2 Url Rewrite section

<IfModule mod_rewrite.c>

    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d [OR]
    RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php
    RewriteCond %{REQUEST_URI} !/$
    RewriteRule .   -   [L]

    # Slideshow java fullscreen redirection
    RewriteCond %{THE_REQUEST} /gallery/slideshow/full/([0-9]+)\.html(\?.|\ .)
    RewriteCond %{REQUEST_URI} !/$
    RewriteRule .  /index.php?option=com_g2bridge&view=gallery&Itemid=45&g2_view=slideshowapplet.SlideshowApplet&g2_itemId=%1   [QSA,L]
   
#    # Download item redirection
#    RewriteCond %{THE_REQUEST} /gallery/d/([0-9]+)-([0-9]+)/([^/?]+)(\?.|\ .)
#    RewriteCond %{REQUEST_URI} !/$
#    RewriteRule .  /index.php?option=com_g2bridge&view=gallery&Itemid=45&g2_view=core.DownloadItem&g2_itemId=%1&g2_serialNumber=%2&g2_fileName=%3   [r=301,L]
#   
    # slideshow standard redirection
    RewriteCond %{THE_REQUEST} /gallery/slideshow/([0-9]+)\.html(\?.|\ .)
    RewriteCond %{REQUEST_URI} !/$
    RewriteRule .  /index.php?option=com_g2bridge&view=gallery&g2_view=slideshow.Slideshow&g2_itemId=%1   [QSA,L]
   
    # Gallery2 Albums
    RewriteCond %{THE_REQUEST} /gallery/([^?]+)(\?.|\ .)
    RewriteRule .  /index.php?option=com_g2bridge&view=gallery&Itemid=45&g2_path=%1   [QSA,L]
   
    #The base g2 url (with the highlight)
    RewriteCond %{THE_REQUEST} /gallery/\?g2_highlightId\=([0-9]+)
    RewriteRule .  /index.php?option=com_g2bridge&view=gallery&Itemid=45&g2_highlightId=%1   [r=301,L]
   
    #Quick Hack to fix the issue where when you click on the Joomla Breadcrumb it adds a pseudo-session id
    RewriteCond %{THE_REQUEST} /gallery/\?g2_page\=([0-9]+)
    RewriteRule .  /index.php?option=com_g2bridge&view=gallery&Itemid=45&g2_page=%1   [r=301,L]
</IfModule>

# END G2 Url Rewrite section


You'll notice I hardcoded the Itemid of my menu into the htacess file. There is likely a better way of handling it, but it was easy for me and it worked. If I remember correctly, there was also a weird quirk about the location of the G2 SEO stuff within the htaccess file. At first, I had it at the very bottom of my htaccess file (after the Joomla core stuff) and I found that I needed to move it above the Joomla stuff to get it to work.

With the older SEO system I was using, I had to disable the SEF URLs for the gallery2 component. With sh404SEF, in the configuration section > components tab > Default Name (far right) column I entered the SEF name I wanted (eg. "gallery2"). I can't remember if this was required or not, but it's in my sh404sef configuration, so I thought I would share that information with you.

Hope all that helps.
http://boshdirect.com - Blog and photo gallery (auto / tech)
User avatar
joshua.lyon
Fresh Boarder
Fresh Boarder
 
Posts: 8
Joined: Thu Nov 20, 2008 9:07 pm
Location: Dallas/Fort-Worth, Texas

Re: Gallery2 plugin

Postby ledom1 » Wed Nov 26, 2008 11:58 pm

guilleva wrote:Thanks, here you have! Please let me know how does it work for you!

http://joomla.vargas.co.cr/downloads/ca ... -joomla-15

I'll make the version for Joomla 1.0.X soon!


EXCELLENT! thank you Guilleva! It works fine and you can see it in action at: http://picturevolution.com/plan.html?sitemap=1

If you want I can made a game like that http://picturevolution.com/jeu-grattage.html for you.

Thanks
ledom1
ledom1
Fresh Boarder
Fresh Boarder
 
Posts: 3
Joined: Fri Sep 19, 2008 2:46 pm

Re: Gallery2 plugin

Postby sil3nt » Thu Nov 27, 2008 10:33 pm

Hello,

I've tested and had a look at the code of your extension and it realy looks greate.

It supports the multiroot function and thats amazing. I'll link the extension on the wiki of the component as 3rd part extension.

Maybe on question. I found the line:
Code: Select all
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );


Shouldn't it be:
Code: Select all
defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' );

As it is a j!1.5 extension and _VALID_MOS is only available with legacymode.

Thanks for your greate work.

Best Regards
Chris
sil3nt
Fresh Boarder
Fresh Boarder
 
Posts: 1
Joined: Thu Nov 27, 2008 10:24 pm

Re: Gallery2 plugin

Postby guilleva » Thu Nov 27, 2008 11:06 pm

Hi Chris, thank you.

You are right, it should be _JEXEC and not _VALID_MOS. I have updated the pluging with this fix.

Thanks again!
User avatar
guilleva
Administrator
Administrator
 
Posts: 1527
Joined: Wed Sep 12, 2007 3:10 am
Location: San José, Costa Rica

Re: Gallery2 plugin

Postby oggg » Sun Jan 11, 2009 11:56 pm

Hi, I am getting the following error in my frontpage when I activate the gallery2 plugin:

Error loading Modules:MySQL server has gone away SQL=SELECT id, title, module, position, content, showtitle, control, params FROM jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid = m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND ( mm.menuid = 23 OR mm.menuid = 0 ) ORDER BY position, ordering

The error repeats several times. The sitemap shows the gallery albums. On the bottom of the page, the following shows:


MySQL server has gone away SQL=UPDATE jos_xmap_sitemap SET `name`='New Sitemap',`expand_category`='1',`expand_section`='1',`show_menutitle`='1',`columns`='1',`exlinks`='1',`ext_image`='img_grey.gif',`menus`='mainmenu,0,1,1,0.5,daily',`exclmenus`='',`includelink`='1',`usecache`='1',`cachelifetime`='15',`classname`='xmap',`count_xml`='0',`count_html`='453',`views_xml`='0',`views_html`='5',`lastvisit_xml`='0',`lastvisit_html`='1231717383',`excluded_items`='',`compress_xml`='0' WHERE id=1


Any idea of what that can be?

Thanks
oggg
Fresh Boarder
Fresh Boarder
 
Posts: 1
Joined: Sun Jan 11, 2009 11:47 pm

Re: Gallery2 plugin

Postby barcik » Tue Jan 25, 2011 11:14 pm

Hi,

I refresh topic ;)
I have Joomla 1.15.22 and use also Galllery 2 with Jfussion bridge. And I have problem with Xmap. In my site map I haven't any information about pictures and albums from Gallery.
Where am I doing wrong?

BR
Barcik
barcik
Fresh Boarder
Fresh Boarder
 
Posts: 3
Joined: Tue Jan 25, 2011 11:04 pm

Previous

Return to Plugins



Who is online

Users browsing this forum: No registered users and 1 guest