Generate a link to the current user's album

slomoman

Joined: 2007-11-01
Posts: 47
Posted: Fri, 2007-11-02 08:04

I have embedded Gallery2 into my Joomla page, which seems to work quite fine. Now I would like to add a menu item into my joomla menu that will lead to the current user's gallery2 album.
How should the link to that album look like?


Gallery version: 2.2.3
PHP version (e.g. 5.1.6): 5.5.2
PHPInfo Link (see FAQ):
Webserver: Apache 2.2.4
Database: MYSQL 5.0.41
Activated toolkits: GD
Operating system: Windows
Browser: IE7

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22888
Posted: Sat, 2007-11-03 05:32

If this does not work you should perhaps look/post in the Joomla forum:
http://gallery.menalto.com/forum/92

http://codex.gallery2.org/index.php/Gallery2:Tpl_Reference
I have never used Joomla! so can't offer Joomla! code but this shuold work on a gallery template file:
not tested
in your tpl you can use {g->block type="core.SystemLink" linkId="useralbum.UserAlbum"} to show a single link

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
serbanc

Joined: 2006-05-19
Posts: 314
Posted: Sat, 2007-11-03 10:21

in one of the g2bridge from http://forum.4theweb.nl, there is such functionality.
you can find those on http://www.e-poze.ro/g2bridge

serbanc - www.e-poze.ro

 
slomoman

Joined: 2007-11-01
Posts: 47
Posted: Sat, 2007-11-03 17:52

Hi Serbanc,
I have already installed the modules that you mentioned.
Where exactly would I find the functionality to add a link to the users album to the jommla navigation?

 
serbanc

Joined: 2006-05-19
Posts: 314
Posted: Sat, 2007-11-03 18:40

in joomla, create a menu item, in the link section enter:
index.php?option=com_gallery2&Itemid=XX&task=useralbum
replace XX with yours

take care: I do not know whether michiel1981 (creator of g2bridge) did included my version in the downloadable section, so better take it from http://www.e-poze.ro/g2bridge

Regards

serbanc - www.e-poze.ro

 
slomoman

Joined: 2007-11-01
Posts: 47
Posted: Thu, 2007-11-08 21:40

Hi Serbanc,
the last parameter of the link you suggested does nothing on my side. It will just go to the overview page of all albums, but not to the current user's album. Even when I call the parameter g2_task (as in g2_view or g2_itemId), it has no effect.

Second question: What exactly is the difference between the modules on your webpage and the ones on the g2-bridge homepage?

 
slomoman

Joined: 2007-11-01
Posts: 47
Posted: Thu, 2007-11-08 21:43

One more thing:
Hi Floridave,
I tried to add this block to one of the template files:
{g->block type="core.SystemLink" linkId="useralbum.UserAlbum"}.
However, this returns nothing and my page still looks the same. If I add the following block instead, 2 of the 4 system links are shown (but I want only one of them):
{g->block type="core.SystemLinks"
order="core.SiteAdmin core.YourAccount core.Login core.Logout"
othersAt=4}

Did I miss anything?

 
serbanc

Joined: 2006-05-19
Posts: 314
Posted: Fri, 2007-11-09 00:15

the diff's:
- there are some bug fixes on user syncro + logout problem - if looking on http://forum.4theweb.nl you will see the whole story
- comments module are working
- useralbum feature
useralbum: It should work, I have on my site for about half a year, and no one did not reported any disfunctionality

I will try to respond to the other question as well
You should have this link active on your menu if you have installed and activated useralbum module - perhaps this is the reason why it is not working in joomla as well :)

serbanc - www.e-poze.ro

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22888
Posted: Fri, 2007-11-09 04:16
slomoman wrote:
Hi Floridave,
I tried to add this block to one of the template files:
{g->block type="core.SystemLink" linkId="useralbum.UserAlbum"}.
However, this returns nothing and my page still looks the same.

try <a href="{g->url arg1="controller=useralbum.UserAlbum" useAuthToken=1}">Your Album</a>

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
slomoman

Joined: 2007-11-01
Posts: 47
Posted: Fri, 2007-11-09 07:44

Hi serbanc,
i have to admin i was a bit nervous to unstall my whole g2 bridge and its modules, to replace it with yours.
But now I did, and I have to admin that it has solved all my current problems! Thx, I think you did a great job in adjusting the bridge!

This is what I did:
- uninstall the bridge component
- uninstall the all the g2-brdige modules (image block etc.)
- install component and all modules from serbancs link (see above)

These problems are solved with the new bridge:
- a link to the users album now works (the original problem of this post)
- if a user logs out, he is now also logged of from gallery2 (not before)
- the user sync in the joomla-administrator (components->gallery2->user management) now works. (i got this message though, but everything seems to have worked anyway:
Error (ERROR_MISSING_OBJECT) : 1 GalleryGroup
in modules\core\classes\GalleryEmbed.class at line 904 (GalleryCoreApi::error)
in C:\xampp\htdocs\joomla10\components\com_gallery2\classes\user.class at line 97 (GalleryEmbed::isExternalIdMapped)
in C:\xampp\htdocs\joomla10\administrator\components\com_gallery2\admin.gallery2.php at line 549 (user::addUserToGroup)
in C:\xampp\htdocs\joomla10\administrator\components\com_gallery2\admin.gallery2.php at line 88
in C:\xampp\htdocs\joomla10\administrator\index2.php at line 69
).

Again, thanks a lot for helping.
Regards, Slomoman

 
jillykillroy

Joined: 2007-12-05
Posts: 1
Posted: Wed, 2007-12-05 14:52

Do I have to uninstall/install the whole bridge, or can I just use the mods?

 
serbanc

Joined: 2006-05-19
Posts: 314
Posted: Wed, 2007-12-05 22:37
jillykillroy wrote:
Do I have to uninstall/install the whole bridge, or can I just use the mods?

whatever solution suits you.
The whole bridge is provided just as convenience, since people find it difficult to install original bridge and after that to replace the files.

serbanc - www.e-poze.ro

 
josh007

Joined: 2007-12-14
Posts: 6
Posted: Fri, 2007-12-14 18:38

serbanc...i cant find the download link on ur site. is it possible to guide me to ur site...i couldnt quite understand where to go...thanks in advance

 
serbanc

Joined: 2006-05-19
Posts: 314
Posted: Sat, 2007-12-15 14:13

www.e-poze.ro/downloads
com_* - the component itself
mod_* - J modules for the bridge
serbanc - www.e-poze.ro

 
josh007

Joined: 2007-12-14
Posts: 6
Posted: Mon, 2007-12-17 02:55

thanks serbanc...i found it. and btw, its working now. a few more questions tho...i saw ur site mods and are lined up horizontally, (random, latest etc.), how can i do that to the mods? apparently it lines up vertically

 
serbanc

Joined: 2006-05-19
Posts: 314
Posted: Mon, 2007-12-17 09:05

you have to add somewhere in your .css something like:

.one-image {
display: inline;
}

serbanc - www.e-poze.ro