Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2005-08-10 00:31:47
- cpk
- Member
- Registered: 2005-08-07
- Posts: 62
product gallery prob with zem_article_image - help plz
it appears that I am trying to create something similar to an image gallery or portfolio but for a client’s product site in which I have a list of products on a single page showing a single thumbnail for each product accompanied by a short description. When either the thumbnail or product (article) link is clicked, the visitor is taken to a single product page showing a larger image and several smaller thumbnails along with a more in-depth description. It appears that zem_article_image is the recommended way to do this and I have installed it but cannot get it to work properly. I can get it to work with only a single image using the basic <code>txp:article_image</code> tag but no images appear when I replace the article image tage with the <code>zem_article_image</code> tag I am using rc5 and all diagnostics pass. I am very xhtml/CSS savvy but new to txp.
Have I implemented this correctly or am I doing something wrong? Are there better methods to accomplish this? Any help would be appreciated.
below are form examples I am using with the zem article image plugin:
Short list product descriptions:
<code>
<div class=“desc_s”> <h3><txp:permlink><txp:title /></txp:permlink></h3> <txp:permlink><txp:zem_article_thumb /></txp:permlink> <div class=“summary”> <txp:body /> </div> </div> <hr /> </code>Individual product page descriptions:
<code>
<div class=“desc_l”>
<h3><txp:title /></h3>
<txp:zem_article_image /><txp:zem_article_thumb limit=5 wraptag=“div” />
<div class=“summary”>
<txp:body />
</div>
<table>
<tr>
<td>Make:</td>
<td><txp:custom_field name=“make” /></td>
</tr>
<tr>
<td>Model:</td>
<td><txp:custom_field name=“model” /></td>
</tr>
<tr>
<td>Year:</td>
<td><txp:custom_field name=“year” /></td>
</tr>
<tr>
<td>Mileage:</td>
<td><txp:custom_field name=“mileage” /></td>
</tr>
<tr>
<td>Price:</td>
<td><txp:custom_field name=“price” /></td>
</tr>
</table>
</div>
<hr />
</code>
Thanks!
cpk
Offline
Re: product gallery prob with zem_article_image - help plz
should always use inverted comma’s to contain the attribute values in the code – eg
<code><txp:zem_article_thumb limit=“5” wraptag=“div” /></code>
not
<code><txp:zem_article_thumb limit=5 wraptag=“div” /></code>
How many article images have you got?
BE + MEngSc = engineer with a side dish of frustrated designer/developer with a penchant for photography outside
Offline
#3 2005-08-10 03:27:11
- nardo
- Member
- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: product gallery prob with zem_article_image - help plz
when zem_article_image is used… take a look at the source in your browser when the page is loaded… check the URL it is producing for the image
it may be producing a path that ain’t working – this was my experience on a localhost install
Offline
#4 2005-08-10 03:43:52
- cpk
- Member
- Registered: 2005-08-07
- Posts: 62
Re: product gallery prob with zem_article_image - help plz
Thanks for the quick responses. Funny how easy it is to miss syntax errors at the end of the day ;-)
I checked the relative path for the images and that looks like the culprit. TXP seems to be pointing at the root directory and I have the txp version of the site located in a subdirectory for now. Is that the default for the zem_article_image plugin? If so, will I have to hack the PHP code in order to change the path?
cpk
Offline
#5 2005-08-10 07:27:49
- cpk
- Member
- Registered: 2005-08-07
- Posts: 62
Re: product gallery prob with zem_article_image - help plz
Problem solved. Apparently I just needed to fix my admin setting for my image folder…doh!
Thanks for the help
cpk
Offline
#6 2005-08-21 01:31:54
- cpk
- Member
- Registered: 2005-08-07
- Posts: 62
Re: product gallery prob with zem_article_image - help plz
Apparently I did not solve the problem.
I was able to get images to display by including the name of the subdirectory which contains my TxP installation ahead of the images folder in the preferences like so: <code>staging/images</code> but the diagnostics indicate that the folder does not have the proper permissions and should not work since it shows that it’s pointing to a non-existent directory: <code>Image directory is not writable: /home/virtual/site5/fst/var/www/html/staging/staging/images</code> but this is the only way I can get images to display and the html source code points to the proper directory: <code>img src=”/staging/images/9t.jpg…”</code>.
However, if I set the images directory in the preferences to <code>images</code> as it should, the images do not show up and the html source seems to point to the images directory at the root level (there is an images directory there but not the one designated for TxP).
Problem exist with TxP 4, rc4, and rc5. Site is hosted at Media Temple and is a localhost installation.
I realize now that I should have posted in the troubleshooting section so please move this post if necessary.
Thanks,
cpk
Offline
#7 2005-08-21 02:34:07
- cpk
- Member
- Registered: 2005-08-07
- Posts: 62
Re: product gallery prob with zem_article_image - help plz
here are my diagnostics:
<pre>
Textpattern version: 4.0 (r789)
last_update: 2005-08-20 22:46:26/2005-08-20 22:45:46
Document root: /home/virtual/site5/fst/var/www/html
$path_to_site: /home/virtual/site5/fst/var/www/html/staging
Textpattern path: /home/virtual/site5/fst/var/www/html/staging/textpattern
Permanent link mode: section_title
Temp folder: /home/virtual/site5/fst/var/www/html/staging/textpattern/tmp
Site URL: www.sunsetwestrv.com/staging
PHP version: 4.3.10
Register globals: 1
Magic quotes: 1/0
MySQL: 3.23.58
Locale: en_US.UTF-8
Server: Apache/2.0.46 (Red Hat)
Pre-flight check:
————————————
Image directory is not writable: /home/virtual/site5/fst/var/www/html/staging/staging/images
————————————
- DirectoryIndex index.php index.html
- Options +FollowSymLinks
- RewriteBase /relative/web/path/
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]
RewriteRule ^(.*) index.php </IfModule> ———————————— </pre>Strangely, this config works to display the images properly. If I set the default images folder to <code>images</code> in the preferences, the diagnostics will pass but the images will not display.
cpk
Last edited by cpk (2005-08-21 02:36:19)
Offline
#8 2005-08-21 02:53:38
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: product gallery prob with zem_article_image - help plz
When you say “the images will not display”, do you mean in the admin interface, on the public site, or both?
With the images folder set to “images”, can you view the HTML output and show us what an image URL looks like please?
Also, switch to using the <txp:article_image />
tag for now, rather than the plugin. It hasn’t been updated in a long time. [I didn’t realise you were using that at first, since I followed to here from the thread in troubleshooting]
Last edited by zem (2005-08-21 02:56:57)
Alex
Offline
#9 2005-08-21 03:02:39
- cpk
- Member
- Registered: 2005-08-07
- Posts: 62
Re: product gallery prob with zem_article_image - help plz
with the configuration posted above, the images will display in the html output (web page) but will not display in the admin interface. The opposite is true if I reset the preferences to the default image directory of <code>images</code>.
The html output:
<code><img src=”/staging/images/9t.jpg” alt=“1987 Southwind”/></code>
I also notice that there is no space preceding the terminating slash within the <code>img</code> tag.
Also, while I can get the images to display with this config, I cannot upload images.
cpk
Last edited by cpk (2005-08-21 03:18:56)
Offline
Re: product gallery prob with zem_article_image - help plz
I’m experiencing the same situation on a subdirectory install. zem_article_image outputs an erroneous relative image path. Has the thumbnail functionality been rolled into 4.02 yet? Would be nice.
Last edited by mrdale (2005-11-25 16:37:52)
Offline