WordPress.org

Ready to get started?Download WordPress

Forums

Using additional template pages (4 posts)

  1. High-Fidelity
    Member
    Posted 9 years ago #

    I would have thought that this would have been covered before, but I searched for most strings that I could imagine that relate to the topic, and couldn't find anything.

    I created a plugin that takes a Picasa exported gallery and displays it on a post, just by using the add_filter api hook. The gallery is constructed of thumbnails on the main page, and then each thumbnail links to the full size image.

    I'd like to make this a little bit more sophisticated now and have the thumbnail link to another page that maintained the theme of the site, displayed the image in the correct location, based on the theme itself and also some previous and next buttons to link to the corresponding images.

    I'd like to do it "within" WordPress. That is, have a custom template page, say image.php in the template directory, and just link to http://www.site.com/?image=file (or a corresponding URL that makes use of the rewrite rules) and have WordPress automagically know to use the image.php template file.

    I've had a quick glance through the source, but I thought I'd find out if it's possible without hacking up WordPress. I'd like to do it without hacking, but if I had to, then I guess I can, but that makes it less useful for the general public, and I know of a few people that'd like to use it for their own site.

    Any ideas?

  2. Lorelle
    Member
    Posted 9 years ago #

    Have you checked the various Image/Gallery Plugins or straight PHP galleries that do what you want already?

    Also check:
    http://www.wp-plugins.org/
    http://www.wp-plugins.net/
    http://www.bloggingpro.com/archives/category/wordpress-plugins/

  3. High-Fidelity
    Member
    Posted 9 years ago #

    Thanks for the reply, but that doesn't answer the question I was asking. I've tried many of the gallery plugins, and none of them did what I want... so I wrote my own.

    I manage my pictures using Picasa, and Picasa exports some rather tasty galleries. I just read in the XML file and display the pictures in the place of a certain tag that the plugin looks for.

    Now I want to extend it a little bit and add an additional template file... I was wondering if there way anyway to call a non-standard template page, using the regular index.php file.

    So, for example http://www.example.com/?image=<file&gt; which would call up the non standard template theme and pass the query arguments to the page so it could find the image file and display it as a slideshow. This way it stays completely integrated within WordPress, without clogging up the database with unnecessary crap, like some other plugins.

  4. Dieter
    Member
    Posted 9 years ago #

    Hi, I understand what you are trying to do, and I just posted the first public release of it....

    I got a bit annoyed with direct image linking in WP-Picasa-Gallery, and I dont like the idea that WPicasa generates an entry for each photo (I have large photo albums, so it spams my admin panel).

    So I've updated WP-Picasa-Gallery and added a helper script which automatically generates Photo Pages on the fly as they are requested. It also features nice Previous and Next links (with Thumbnails), as well as better Caption display.

    You can find more information and download link here:
    softcoded.net
    or view my live photo album running the script.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.