Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [archived] txp->gallery
Thanks elmar,
I will try the approach you suggested, it will probably look better anyway.
By the way, I really like your site. Nice work!
Last edited by tinyfly (2004-05-30 16:24:57)
Refresh Dallas and other Refreshing Cities.
Offline
Re: [archived] txp->gallery
> I wrote earlier:
Is there a way that I can change the plugin so that it accepts xhtml tags in the caption of the image?
An example would be the uploaded links in TP. You can put XHTML in the Description to format it. I would like to do this with image captions.
Last edited by tinyfly (2004-06-01 19:04:09)
Refresh Dallas and other Refreshing Cities.
Offline
Re: [archived] txp->gallery
Can anyone kindly provide an example (xhtml/ css code) of the usage of imageID and descID? I just cannot figure out what should i put inside the tag in order to change my layout , as I want the big image float right of the thumbnails and flollows with the description(image caption).
Offline
Re: [archived] txp->gallery
Here is a samle of the tags from my site:
img id=“img” src=”/images/29.jpg”
div style=“text-align:center” txp:gallery category=“chichihuistan” wraptag=“div” break=” “ imageID=“img” descID=“desc” usethumbs=1 /div br=“clearboth” /
span id=“desc”>Sabine’s horse, Rancho Chichi /span (I can’t get the code to work with Textile here…)
This puts the thumbnails under the picture and then a caption. You will need to play with the css to get you thumbnails on the side, a float:left in the div should do it. Import is to identify the image and caption and then use imageID and descID to replace them. Good luck!
Last edited by elmar (2004-06-04 05:50:01)
Offline
Re: [archived] txp->gallery
elmar wrap your code in the < code> < /code tags> (without the extra spaces I added) then textile won’t mess with your formatting.
Last edited by tinyfly (2004-06-04 13:00:15)
Refresh Dallas and other Refreshing Cities.
Offline
Re: [archived] txp->gallery
I have installed everything as per your instructions and I am getting the following error:
Parse error: parse error, unexpected T_STRING in /homepages/24/d100711248/htdocs/evolutiondesigns.org/textpattern/publish.php on line 30
This is what my file looks like:
include txpath.’/lib/txplib_db.php’; include txpath.’/lib/txplib_html.php’; include txpath.’/lib/txplib_forms.php’; include txpath.’/lib/txplib_misc.php’; include txpath.’/lib/admin_config.php’;
include txpath.’/publish/taghandlers.php’; include txpath.’/publish/log.php’; include txpath.’/publish/comment.php’; include $txpcfg[‘doc_root’].’/plugin_gallery.php’ ob_start();
And if I leave the space between the includes and the ob_start line then I get the same error, but on line 31.
Any thoughts?
I’m sure it’s something silly, but I’m pretty new at this php thing.
Thanks for any assistance in advance.
Offline
Re: [archived] txp->gallery
thanks elmar! your code works perfectly!!
Offline
Re: [archived] txp->gallery
soulship,
mine publish.php file looks different: max say to put the include after ob_start, like this:
include txpath.’/lib/txplib_db.php’; include txpath.’/lib/txplib_html.php’; include txpath.’/lib/txplib_forms.php’; include txpath.’/lib/txplib_misc.php’; include txpath.’/lib/admin_config.php’;
include txpath.’/publish/taghandlers.php’; include txpath.’/publish/log.php’; include txpath.’/publish/comment.php’;
ob_start();
//GALLERY include $txpcfg[‘doc_root’].’/plugin_gallery.php’;
maybe that will help.
Offline
Re: [archived] txp->gallery
my database has a custom prefix before the table, so when I first installed the gallery it didn’t work. Nothing would show up from the gallery tags.
I had to do a quick-fix for it…
for the line
“select * from txp_image”,
I had to change it to
“select * from “.PFX.“txp_image”,
I’m not sure if anyone else had this problem, but I thought you should know.
Cool plugin though :)
Works great!
textpattern.org :: find and share Textpattern resources
textpattern.net :: TextBook – Textpattern wiki
Offline
#25 2004-06-21 17:36:05
- Tek
- New Member
- Registered: 2004-06-03
- Posts: 5
Re: [archived] txp->gallery
I would like to try MZ’s photo gallery plugin but….
“install plugin” what does that mean??????
k, calmer now. having some cheese with my whine.
I downloaded the photogallery zip.
Does it matter what directory is installed on my site? Do I need to install it in the textpattern directory?
Then once I install it, I have to upload the plugin from the admin page, right?
Then I’m not sure what to do.
<b>[edited to say]</b> Okay. do I need to create a template for my photos?
Any help is appreciated.
Last edited by Tek (2004-06-21 17:39:39)
Offline
Re: [archived] txp->gallery
to install:
- Download the zip file to your desktop
- Unzip the files
- go to your Textpattern admin > plugins page
- click the “choose” button and find the file “gallery.plugin” that you unzipped.
- click the “install” plugin.
- in the “Active” column make sure you click it so it says “yes”
To use the plugin use this tag <code><txp:gallery /></code> this will use all images that you have uploaded through Textpattern. There are many other attributes that Textpattern can take look through this thread and also check out Max’s site
Last edited by tinyfly (2004-06-21 18:13:35)
Refresh Dallas and other Refreshing Cities.
Offline
Re: [archived] txp->gallery
Max, currently I am putting together the site for an art group that my wife’s grandfather is part. I’m trying to make a go of it using your plugin which I think can do the job, but (there’s always a but to these kind of comments, isn’t there?) there are a couple of things I would like to know can/will be cured before I invest myself in building the image functions around this.
Issue A.
The first thing is the ‘break’ tag just doesn’t seem to work. Here is what I’m using in the page : <txp:gallery category="bernard" wraptag="ul" break="li" usethumbs="1" />
It produces code that looks so :
<ul><a id="txpg1_17" onclick="return showPic(this,'gallery_image1','gallery_desc1')" href="/images/17.jpg" title=""><img src="/images/17t.jpg" alt="016 bernard 01" title="016 bernard-r 01" /> </a>li<a id="txpg1_18"... </ul>
I have clipped down that example to one full image link and the start of the next. No <li> tags, but there is a nice little ‘li’ in between the ending </a> tag and the next beginning link. Okay, so I have figured out how to get the <li> tags, but as I think you not only intended the tags to function but can get the tags to function I will merely detail what I did to get the thumbnails to display correctly.
1. In the plugin on line 82, insert an <li> tag where I have put it in this example :
$temp = '<li>[a id="txpg'.$txpGalleryCounter.'_'.$id.'" onclick="return
Caution : I changed the opening < bracket in above line to [ to allow this to not break in Textile!
2. line 88, insert an </li> after the closing </a> tag like so :
$temp .= '</a></li>';
3. use, but put nothing in the break attibute of the tag in the page that calls to the plugin, like so :
<txp:gallery category="bernard-r" wraptag="ul" break="" usethumbs="1" />
By doing those things a neat properly structured unordered list is created. Pretty much if you do anything else, it seems to break. At first I thought I would get away with only adding the opening <li> on line 82, and having the break tag be </li> but that doesn’t work because the plugin apparently doesn’t put one after the last thumbnail.
You can see my un-styled test page of what I’ve done here :
http://passerelledesarts.com/rene-bernard/
Issue B.
Can we have the ability to apply a CSS controlled wrapping to the thumbnails? I’ve figured out how to hack the code to wrap/control the caption and the main image. Even instructions about how to add some further structure would be very welcome.
***
Finally, maybe in the above examples I missed something. That is always possible. Maybe I just made a huge and stupid error in my thinking or execution. If I did, I’ll appreciate having it pointed out. either way, I’m not criticizing. I would have never managed this and I appreciate that you have.
Last edited by Damelon (2004-07-04 13:22:12)
Offline
Re: [archived] txp->gallery
I posted a feature request, but this could be done with a possible new version of Gallery: Have a look:
Offline
Re: [archived] txp->gallery
> elmar wrote:
> Here is a samle of the tags from my site:
>img id=“img” src=”/images/29.jpg”
div style=“text-align:center” txp:gallery category=“chichihuistan” wraptag=“div” break=” “ imageID=“img” descID=“desc” usethumbs=1 /div br=“clearboth” /
>span id=“desc”>Sabine’s horse, Rancho Chichi /span (I can’t get the code to work with Textile here…)
>This puts the thumbnails under the picture and then a caption. You will need to play with the css to get you thumbnails on the side, a float:left in the div should do it. Import is to identify the image and caption and then use imageID and descID to replace them. Good luck!
<del>I cannot seem to figure this out. Anyone able to show this code with the < and > in the right spots? I’d like to have my gallery with the thumbnails below the pic, just like elmar so nicely does on his site. Thanks. </del>
[edit 3 of 3] Trial-and-error got me through this. Thanks, elmar, for your code.
Last edited by mistersugar (2004-07-24 03:24:53)
—-
Anton aka mistersugar – ‘yumi stap storian’ – antonzuiker.com
Offline
Re: [archived] txp->gallery
Hey, please file this one under: Yet Another Plea for the Previous | Next link functionality.
This plugin is truly the bomb, but for my purposes, displaying a list image links above the image in not an attractive or viable option. I absolutely need a previous image link and a next image link functionality to make use of this wonderful plugin.
This plugin, to me, is unique because:
-You can associate multiple images to one article. That’s huge and unique among other photo gallery plugins as far as I can tell. If someone out there knows of a similar plugin, please let me know.
-The user can click through the images without having to reload the page. That’s fantastic as well. This feature reinforces a pleasant user experience where one page contains one article and a bunch of images that can be viewed without having to leave the page or constantly refresh it.
So for me, the only thing missing is the Prev and Next links. After digging around your code, I came to the conclusion that the best thing to use is the $rs array returned towards the top of your script. So here’s my question (finally), could I use the $rs array in the javascript to provide the Previous and Next link functionality?
Basically, I was thinking it would go something like this:
-create var for total number of images
-create var for current image number being displayed
(Previous or Next link is clicked)
-check if next or previous link was clicked
-if next
•increment image number by one
•if image number isn’t greater than total images number
-continue
•else
-image number = 1
-if previous
•decrement image number by one
•if image number isn’t less than1
-continue
•else
-image number = total images number
-url=imagesURLArray[imageNumber]
-description= descriptionArray[imageNumber]
-show image
That’s the logic as far as I can see it. I’m just unable to code it up. How do you integrate the php generated arrays with the javascript? Is this even the best way to go about it?
Thanks for all your hard work. I understand you gotta put food on the table, so get back whenever your free. Thanks again!
-justin
Offline