This topic is locked

Thumbnail help

10/12/2006 10:21:43 AM
PHPRunner General questions
M
mousewonders author

Okay so far I'm loving this program other then I cant seem to make thumbnails work correctly.
On the search property page it will list the results and show a "NO IMAGE.jpg" but once you click on the listing to view the details of the property it will so the thumbnail.
Currently how my system works is that I have a different admin for adding properties and pictures, this admin creates a thumbnail of each photo uploaded and puts it in a /thumbnail/ folder.
What I want my search program to do is display a thumbnail then if you click the thumbnail, it will enlarge to the full size.
Everything is working other then this. Anyone know how to help me?
Richard
(P.s http://www.xlinesoft.com/phprunner/article..._thumbnails.htm seems to be out dated. I dont have the options of a format screen in PHPrunner, well I have something that looks like the screen they show, but not with the options they have.) I tried everything else this said to do and it still didnt work.

J
Jane 10/13/2006

Hi,
here is a step-by-step instruction how to set up thumbnails.

  1. Proceed to the Visual Editor tab in PHPRunner and set for Image field View as format as File-based image and Edit as format as Document upload. (To edit format of field double click on the field)
  2. Build your project.
  3. Open generated \include\YourTable_variables.php file by any text editor and replace this code snippet:
    $thumbnail_fields = array();

    // $thumbnail_fields = array("Field1","Field2");

    // field names are case-sensitive!

    $thumbnail_prefixes = array();



with this one:

$thumbnail_fields = array("Image");

// $thumbnail_fields = array("Field1","Field2");

// field names are case-sensitive!

$thumbnailprefixes = array("Image"=>"t");


4. Also you can set the thumbnail- image size changing the value in the bottom line:

$thumbnail_maxsize = 150;


We'll refresh our article in the new future.

M
mmponline 10/20/2006

I replaced the code as explained, but the thumbnail is not hyperlinked to open larger in new window? Any suggestions?

J
Jane 10/20/2006

Stephan,
did you create new records with thumbnails or use old?

This method works for new pictures which you upload after modification.
Also please note that Image is your actual field name.

M
mmponline 10/22/2006

Jane
This is an existing project with over 500 entries. Is there a way to just make the thumbnail field a click to enlarge option that shows the bigger picture (in the picture1 field) as a popup picture in a new window?
I would hate to need to reload all 500 thumbs again.

J
Jane 10/23/2006

Stephan,
when you turn on thumbnails and upload new image PHPRunner create new small image (thumbnail) with t1_... name.

If you don't want to upload your images you can create thumbnails manually and then rename these files.

M
mmponline 10/23/2006

Jane
The project has 2 fields, thumbnails and picture 1. The thumbnails are created already and displays as well. See

http://orchidssa.co.za/runnerdb/Orchids_list.php
All I need for this specific project, is a hyperlink on the thumbnail photo that displays a large photo (picture field) in a new window. (With a close hyperlink on would be a bonus, and if the window could take the size of the photo, even better).
The thumbnail option will be great for future use, but this specific project was brought from another interface and the fields and data was established already.
Hope you can assist. You normally have great answers.

Alexey admin 10/23/2006

Stephan,
the workaround described in the article would work perfectly for your project.

You don't need to reload any pictures since you already have the thumbnails.
You should display Picture field on the List page instead of Thumbnail.

Here is the code for ..._variables.php:

$thumbnail_fields = array("Picture");

$thumbnail_prefixes = array("Image"=>"th");

M
mmponline 10/25/2006

I tried this, but the picture is still not hyperlinked to show a large picture when clicked. This is my need:

  1. When I click on the displayed thumbnail, it must open the corresponding picture field in a larger window.
    Sounds to be some hyperlink to the *.jpg in the picture field.

J
Jane 10/25/2006

please zip and send to [email=support@xlinesoft.com]support@xlinesoft.com[/email] a full set of generated PHP files, your database creation script with sample data.

I'll find what's wrong with your project running it on my test box.

T
thesofa 11/11/2006

Hi

is there a published answer to this problem please?

M
mmponline 11/13/2006

I had my focus away from this due to other commitments, but I still could not get this to work. Will have a try again this week, but I'm sure there must be some simple solution for this.
Stephan