Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
beb_jmrgalleryhack
Essentially, it’s the basics of jmr_gallery, a simple article/category associated slideshow. Although, with a couple of features added mainly for style. Also the option of having a javascript fade which is simple to set up.
Thanks
A great thanks to Jeremy Rhoades and Couloir
Name: beb_jmrgalleryhack
Version: 0.3
Author: Original: Jeremy Rhoades, Edited by: Brandon Erik Bertelsen with code from Coloir
Modified: 09/07/2005
*See an example here , without the fading script.
Procedure for Activating this Plug-in
- Please change $siteurl to match the name of your website in the format designated there
- Additionally, please change $nexttag, and $previoustag to match your preferences
- If your database has a prefix please change the $prefix value from NULL to represent your database prefix. Additionally, please remember to add the seperator at the end of the prefix
Usage
- <code><txp:jmr_gallery category=“some_category”/></code>: This will simply pull in all the images files in “some_category”.
- <code><txp:jmr_gallery /></code>:If you do not supply a category, the plugin takes the current article number and attaches “article-” in front of it and uses that as the category. Thus, if you are looking at article 16 the plugin grabs the images from the image category “article-16”. Please name your article categories accordingly.
Usage Attributes
- <code>displaycaptions=“no”</code> captions will not be displayed.
- <code>sort = “X”</code> uses mysql syntax such as “date” or “name”. However, you could order by any column in the txp_image table, such as: id, name, category, ext ,w ,h ,alt ,caption ,date, author, thumbnail. Hence, giving you the ability to denote your own line up of images with a little bit of forethought while uploading or describing.
- <code>sortdirection=“Y”</code> uses mysql syntax such as “asc” or “desc”.
Styling
- Please add the following id’s to your stylesheet(s) to change the styles on the following items
- #imagenav: Represents the paragraph that has the image navigation control.
- #imagecaption: Represents the paragraph that holds the image caption
- #slideshow: Represents the div element that holds the pictures
- #slideshow-container: Represents the div element that holds #slideshow, #imagenav, and #imagecaption.
Using the Fader
- Please download fade.js, upload it to your server, and ensure that you have called the script in the head section of your template
- You can fade to an image or fade to a specific colour by changing the background settings of #slideshow
Calling the fading script
Within the <code><head></code> of your template(s) please place the below code. Change “path/to/fade.js” to reflect where you have placed the script on your server.
<code>
<script type=“text/javascript” src=“path/to/fade.js”></script>
</code>
- Added ability to specify database prefix
- Added ability to sort by a column in the txp_image table
- Added ability to change the sort order
- Added ability to hide or show captions
- Fixed some mild xhtml compliance errors ( ampersand in links )
Last edited by 1beb (2006-04-20 13:32:19)
Proud Canadian. Toronto Locksmith , Actualize Consulting
Offline
Re: beb_jmrgalleryhack
This works marvelously. Brilliant. I had the hardest time with the original version.
Thanks!
Offline
#3 2005-09-06 13:54:10
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: beb_jmrgalleryhack
Hi Brandon, Using release 4.01 I can’t get the plugin to work. Images are not showing on the article page.
Where should<code><txp:jmr_gallery /></code> be put?
Thanks, Lee
Last edited by lee (2005-09-06 14:02:10)
Offline
Re: beb_jmrgalleryhack
@lee
Ah, I found it. My apologies entirely. I’ve updated the script to reflect your most likely problem. In my txp install my database has a prefix and I completely forgot about that for other people who may use it! I have added a small piece of code that allows you to define at the your db prefix, should you have one. Otherwise, leave the value NULL. ie, something_txp_image… for your second question, Placement of <code><txp:jmr_gallery /></code> is well, anywhere that can reference an article id! So essentially anywhere on any single article page. Article lists don’t work at all.
@soulship
I’m glad it works!
Last edited by 1beb (2005-09-07 04:31:34)
Proud Canadian. Toronto Locksmith , Actualize Consulting
Offline
#5 2005-09-07 07:16:21
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: beb_jmrgalleryhack
Thanks for the update to the code. It’s working perfectly now.
Offline
#6 2006-04-20 12:16:34
- alexandra
- Member
- From: Cologne, Germany
- Registered: 2004-04-02
- Posts: 1,370
Re: beb_jmrgalleryhack
Any sample galleries out there? If so, can you supply your URL?
Offline
Re: beb_jmrgalleryhack
Without the fade script an example of what it does is available here.
http://www.bertelsen.ca/photo/hacking-jmr_gallery
Last edited by 1beb (2006-04-20 13:32:44)
Proud Canadian. Toronto Locksmith , Actualize Consulting
Offline
#8 2006-04-20 16:28:30
- alexandra
- Member
- From: Cologne, Germany
- Registered: 2004-04-02
- Posts: 1,370
Re: beb_jmrgalleryhack
Thanks Brandon :)
For all: i tabelized all available gallery plugins here
Offline
Re: beb_jmrgalleryhack
BTW: There’s a constant which is set by the Textpattern core code containing the site’s URL with a trailing slash (hu
).
Using that instead of $siteurl
(plus the trailing slash) would spare users from the need to enter their website address into the plugin code.
Offline
#10 2007-02-24 18:57:56
- transph0rmer
- Member
- From: Europe
- Registered: 2004-12-24
- Posts: 14
Re: beb_jmrgalleryhack
Hello,
the download link above doesn’t work anymore and it ain’t listed at textpattern.org either. I’d like to give it a try. Anybody knows of a working download link, or at least could anybody mail it to me.
Cheers,
transph0rmer
Offline
#11 2007-08-12 04:44:53
- mhulse
- Plugin Author
- From: Eugene Oregon
- Registered: 2005-01-21
- Posts: 200
Re: beb_jmrgalleryhack
Looks nice. :)
Would be interesting to see it work with multiple image ID’s also.
Thanks!
Cheers,
M
Offline
Pages: 1