Korey's Wordpress Plugins Forums Forum Index Korey's Wordpress Plugins Forums
Home of Lazy-K Gallery
 
 FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Korey's Wordpress Plugins Site

Putting the gallery tag in a page template?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Korey's Wordpress Plugins Forums Forum Index -> Installation/Configuration Issues
View previous topic :: View next topic  
Author Message
j4mie



Joined: 07 Mar 2007
Posts: 3

PostPosted: Wed Mar 07, 2007 9:17 pm    Post subject: Putting the gallery tag in a page template? Reply with quote

Hi Korey, thanks for your brilliant plugin.

Is there any way to insert the gallery tag into a page template rather than the page itself? I've tried it and nothing is displayed.
Back to top
View user's profile Send private message
Korey
Site Admin


Joined: 13 Oct 2006
Posts: 143
Location: United States

PostPosted: Thu Mar 08, 2007 7:08 pm    Post subject: Reply with quote

I don't that would work, because in Wordpress, only the CONTENT of pages passes through the filter that I make use of. Stuff you put in the template doesn't hit that filter. There is probably a way, bypassing the filter code and calling the gallery functions directly, but I haven't tried that route, and I never thought of anyone wanting to do that.

Can I ask if there's some specific problem you're trying to solve?
_________________
Korey - Developer of Lazy-K Gallery
Back to top
View user's profile Send private message Visit poster's website
j4mie



Joined: 07 Mar 2007
Posts: 3

PostPosted: Thu Mar 08, 2007 11:15 pm    Post subject: Reply with quote

Korey wrote:
I don't that would work, because in Wordpress, only the CONTENT of pages passes through the filter that I make use of. Stuff you put in the template doesn't hit that filter. There is probably a way, bypassing the filter code and calling the gallery functions directly, but I haven't tried that route, and I never thought of anyone wanting to do that.

Can I ask if there's some specific problem you're trying to solve?


I want a set of pages on my site to all include a gallery at the bottom of the page. I'd ideally like to do this by having the gallery tags in the template for that set of pages, rather than having to have the <!--lazy-k-gallery... etc tag copied into the bottom of the page content itself.

I was just wondering if there's an easy way to do it!
Back to top
View user's profile Send private message
Korey
Site Admin


Joined: 13 Oct 2006
Posts: 143
Location: United States

PostPosted: Fri Mar 09, 2007 7:50 am    Post subject: Reply with quote

Ok, thanks for the info. I'm pretty busy right know and can't spend much time on coming up with a solution, but here's a starting point if you want to tinker. Trying putting the following code in your template:

Code:

      lzk_setDefaultOptions();
      lzk_buildPaths();
      lzk_showGallery();


This is mostly a guess, taking the important parts from the filter that the gallery normally uses.

So, I guess there's no terribly easy way, but let me know if the above works at all!
_________________
Korey - Developer of Lazy-K Gallery
Back to top
View user's profile Send private message Visit poster's website
j4mie



Joined: 07 Mar 2007
Posts: 3

PostPosted: Fri Mar 09, 2007 6:20 pm    Post subject: Reply with quote

Thank you Korey, that worked perfectly - with a slight modification to allow me to set the subgalleries:

Code:
lzk_setDefaultOptions();
lzk_parseLocalParams("subgallery=showcase/".strtolower(the_title('','',FALSE)));
lzk_buildPaths();
lzk_showGallery();


You can see it in action on the various Showcase pages here: http://www.darkmatterguitars.com/showcase/dmg002/


Once again, thanks for the fantastic plugin and all your help.
Back to top
View user's profile Send private message
Korey
Site Admin


Joined: 13 Oct 2006
Posts: 143
Location: United States

PostPosted: Wed Mar 14, 2007 6:03 pm    Post subject: Reply with quote

Great - thanks for the follow up. I'm sure others will benefit from your work!

By the way- I love your baritone guitar - I've always wanted one!
_________________
Korey - Developer of Lazy-K Gallery
Back to top
View user's profile Send private message Visit poster's website
tomaz



Joined: 20 Apr 2007
Posts: 4

PostPosted: Fri Apr 20, 2007 6:47 pm    Post subject: Thanks guys! Reply with quote

I love you both! I really needed something like this - I am showing subgalleryes in the side bar reguarding on the pages that I open! Thank you Korey for the wonderfull and simple plugin and thank you j4mie for the tweak!

_best
tomaz
Back to top
View user's profile Send private message
Korey
Site Admin


Joined: 13 Oct 2006
Posts: 143
Location: United States

PostPosted: Fri Apr 20, 2007 10:25 pm    Post subject: Reply with quote

Awesome - I'm glad that worked out. When I get some more time I'll put that into the plugin or at least into the FAQ.
_________________
Korey - Developer of Lazy-K Gallery
Back to top
View user's profile Send private message Visit poster's website
danielevsilva



Joined: 31 Aug 2007
Posts: 1

PostPosted: Fri Aug 31, 2007 1:49 am    Post subject: With the Slug :) Reply with quote

I think is than better with the Slug

Code:

<?php
      lzk_setDefaultOptions();
lzk_parseLocalParams("subgallery=".strtolower(($post->post_name)));
lzk_buildPaths();
lzk_showGallery();
?>
Back to top
View user's profile Send private message
Korey
Site Admin


Joined: 13 Oct 2006
Posts: 143
Location: United States

PostPosted: Mon Sep 03, 2007 7:23 am    Post subject: Reply with quote

Yep, that's a good idea! Thanks!
_________________
Korey - Developer of Lazy-K Gallery
Back to top
View user's profile Send private message Visit poster's website
tomaz



Joined: 20 Apr 2007
Posts: 4

PostPosted: Mon Dec 15, 2008 8:47 pm    Post subject: additional tweaks Reply with quote

Hi guys,

I know this thread was a bit unactive, still I have another question. How can I add a comment to a picture??? Not through the comment tag of WP but so to get it from a, let's say, .txt file in the same directory and the same name where the picture resides? Is it possible?

_best
Tomaz
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Korey's Wordpress Plugins Forums Forum Index -> Installation/Configuration Issues All times are GMT + 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP