embedding gallery concept question

trigjan

Joined: 2006-03-20
Posts: 3
Posted: Mon, 2006-04-10 05:23

I want to make sure i fully understand what i need to do to embedd a gallery into a page with user accounts.

SO i have my own login forms in a database, managed by my software, and if they are logged in i set:
GalleryCapabilities::set('login',true);
but how do i specify what user is logged in to allow them to post comments and what not.
GalleryCapabilities::set('user','michael');
that right? what other key/value pairs can be applied here, there was no reference in the API that i checked.

Lastly, is there an effiecent way to create links based off the sidebar links, or only grab a key/value pair of all the sidebar links so i can print them in the manor i choose?

thanks,

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2006-04-10 08:03
Quote:
SO i have my own login forms in a database, managed by my software, and if they are logged in i set:
GalleryCapabilities::set('login',true);

nope. what lead you to believe that? is there some documentation that is ambiguous?

Quote:
but how do i specify what user is logged in to allow them to post comments and what not.
GalleryCapabilities::set('user','michael');
that right?

absolutely no. :)

see:
http://codex.gallery2.org/index.php/Gallery2:Embedding

 
trigjan

Joined: 2006-03-20
Posts: 3
Posted: Mon, 2006-04-10 22:53

yeah, everyone likes to pass that link around as an authority.
so what does GalleryCapabilities::set('login', true); do?
and well, since the code sample for embedding isn't line-by-line described, yes, it is ambiguous. documentation never explains what this line is, or property. you need to go on an easter egg hunt to do anything with this application.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2006-04-11 04:47

there are always the API docs which are quite useful in the case of G2.

capabilities generally toggle something on or off, in this case you'd toggle the login form on / off.

please visit the above Embedding page and follow on the devel docs.

GalleryEmbed::init, GalleryEmbed::handleRequest are the two methods you're interested in.