Figuring out gallery ID for random gallery thumbs
Posted: 09 March 2005 01:27 PM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  353
Joined  06-26-2003

When I visit Control Panel Home ›  Modules ›  Image Galleries

and mouse over my “photos” gallery, i get this url:

http://www.adetskas.net/pathto expressionengine/index.php?S=blahblahblah=modules&M=gallery&P=manage_gallery&gallery_id=2

the key part is the id=2 at the end. I’m using this id to plug into this random thumb from category trick found in the wiki:

http://www.eewiki.com/index.php/Gallery_Category_Images

I’m copy and pasting the code from the wiki and just changing the “gallery_id” part to be gallery_id=‘2’ but this doesnt’ seem to work. I fixed the URLS elsewhere in the code snippet in hopes that it required those to work, no dice.

So my question is how do I know for sure I’m using the correct gallery id? Where are my gallery id’s displayed?

Profile
 
 
Posted: 09 March 2005 03:42 PM   [ Ignore ]   [ # 1 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9868
Joined  06-19-2002

That’s the correct Gallery ID.  How exactly does it not “seem to work”?

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 10 March 2005 06:01 AM   [ Ignore ]   [ # 2 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  353
Joined  06-26-2003

Well, nothing displays at all. It’s acting like the gallery doesn’t exist or something.  Now, I only have a couple images in each gallery category, may this cause a problem?

Here’s the page:

http://photos.adetskas.net/index/photos/allgalleries/

And here’s the code:

{exp:query sql=“SELECT cat_id FROM exp_gallery_categories WHERE gallery_id= ‘2’ ORDER BY cat_name;”}
{exp:gallery:entries gallery=“gat_gallery” category=”{cat_id}” columns=“1” rows=“1” orderby=“random”}
{entries}{row}
<a href=“http://photos.adetskas.net/index/photos/category/C{cat_id}”><img src=”{thumb_url}”  width=”{thumb_width}” height=”{thumb_height}” border=“0” title=”{category}” alt=”{category}” /></a>
<br />
<a href=“http://photos.adetskas.net/index/photos/category/C{cat_id}”>
{category}</a>
{/row}{/entries}
{/exp:gallery:entries}{/exp:query}


Profile
 
 
Posted: 10 March 2005 06:04 AM   [ Ignore ]   [ # 3 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  353
Joined  06-26-2003

Ok, this is what I get for following directions so closely. The wiki document seen here: http://www.eewiki.com/index.php/Gallery_Category_Images leaves out an important point. You need to customize “gallery_id” AND “gallery=”. Can I update this wiki document or is that someone elses job?

Profile
 
 
Posted: 10 March 2005 06:05 AM   [ Ignore ]   [ # 4 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32895
Joined  05-14-2004

Yes, of course you can update it, it’s a wiki, that’s the point. =)

 Signature 
Profile
MSG
 
 
Posted: 10 March 2005 06:35 AM   [ Ignore ]   [ # 5 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  353
Joined  06-26-2003

I know, but sometimes you feel icky about updating the wiki.

Updated:

http://www.eewiki.com/index.php/Gallery_Category_Images

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64978 Total Logged-in Users: 22
Total Topics: 82016 Total Anonymous Users: 19
Total Replies: 440814 Total Guests: 192
Total Posts: 522830    
Members ( View Memberlist )