Welcome, Guest
Please Login or Register.    Lost Password?

How to display multiple images in a grid?
(1 viewing) (1) Guest
Welcome to the ToolsJX forum!


Go to bottom
Post Reply
Post New Topic
Page: 1
TOPIC: How to display multiple images in a grid?
#669
How to display multiple images in a grid? 1 Year, 6 Months ago Karma: 0
Hi,

I have been using TableJX for a couple of months now and and find it great for displaying information from my mysql tables.

I would like to start including images in my grid but am not sure how to achieve this. I have trawled the internet for solutions and only really discovered that the image should reside in a directory on the server and use a table containing the path and file name to point to the image.

I can create a table containing pointers to my images and link that in a view with my other tables.

My database contains information about people and I have between 0 and 5 images to be linked to any one person.

At this point I become stuck. Can anyone help me to achieve my goals of:

1. Displaying an image in the grid based on the path and filename?

2. Ideally I would like to display a thumbnail and expand this is the user clicks on it. I use multithumb on my site for image control and thumbnails but I'm not clear how this would interact.

3. How best to manage the variable number of images per person. Presumably the view could look like this:

Surname1 Initials1 ImageX
Surname2 Initials2
Surname3 Initials3 ImageY
Surname3 Initials3 ImageZ

If so, would this mean I would have a duplicate biography each time there is an associated image? Is there any way I can manipulate the information to give me:

Surname1 Initials1 ImageX
Surname2 Initials2
Surname3 Initials3 ImageY ImageZ

With thanks for any help or suggestions.
David
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
djb
Junior Boarder
Posts: 20
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#678
Re:How to display multiple images in a grid? 1 Year, 6 Months ago Karma: 1
Hi,

1. You can insert html tag:
Code:

<img src="link_to_your_image" />


2. You can insert html tag image + link on image, that opens in a new window
Code:

<a href="http://www.quackit.com/pix/worlds_largest_rabbit_2.jpg" target="_blank">
<img src="http://www.quackit.com/pix/worlds_largest_rabbit_2_t.jpg" width="100" height="131" border="0" alt="Photo of a big bunny rabbit!" />
</a>



3. It depends on your data model, everything is possible. The easiest way (if you have let's say limited max pictures to e.g. 4)
Name|Surname|Pic1|Pic2|Pic3|Pic4

If you don't know the number of max pictures, you can create view that can transpose records (vertical to horizontal), a little bit complicated solution

Best regards,
Viljem
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
viljem
Admin
Posts: 181
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/08/02 01:30 By viljem.
Reply Quote
 
#685
Re:How to display multiple images in a grid? 1 Year, 6 Months ago Karma: 0
Viljem,

Thank you for your help. I am still having problems so can you help me a little further please?

I have define a new table with two fields.

Record 1, field 1 contains:

<a href="www.my site .. image.jpg" target="_blank"> <img src="www.mysite .. image.jpg" width="100" height="131" border="0" alt="Image"/> </a>

Record 1, field 2 is defined as a blob and I have uploaded a small jpg to it.

When I display this record in a grid, the results are:

Field 1 - displays 'Image'

Field 2 - displays the characters that make up the image (some 200 lines x 100 characters).

Can you tell me how to display the actual image in the grid please?

Thank you
David
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
djb
Junior Boarder
Posts: 20
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#686
Re:How to display multiple images in a grid? 1 Year, 6 Months ago Karma: 0
Viljem,

I investigated this a little further and found the problem with the first picture was that I had in the code image.jpg whereas the picture was called IMAGE.jpg. Correcting the name allowed the picture to display in the grid and opened in a new window when it was clicked on.

Using this method, should I enter all my pictures using the syntax in the table field of:

<a href="www.mysite .. image.jpg" target="_blank"> <img src="www.mysite .. image.jpg" width="100" height="131" border="0" alt="Picture name" /> </a>

With regard to the second issue, do you know why the blob would not display as an image? Presumably there's nothing to convert the binary to the image?

Thank you
David
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
djb
Junior Boarder
Posts: 20
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#996
Re:How to display multiple images in a grid? 10 Months, 1 Week ago Karma: 0
viljem wrote:
Hi,

1. You can insert html tag:
Code:

<img src="link_to_your_image" />


Hi, sorry for being so slow, but where do I need to insert the html tag above in order to have an image appear within the grid?

Many thanks!



2. You can insert html tag image + link on image, that opens in a new window
Code:

<a href="http://www.quackit.com/pix/worlds_largest_rabbit_2.jpg" target="_blank">
<img src="http://www.quackit.com/pix/worlds_largest_rabbit_2_t.jpg" width="100" height="131" border="0" alt="Photo of a big bunny rabbit!" />
</a>



3. It depends on your data model, everything is possible. The easiest way (if you have let's say limited max pictures to e.g. 4)
Name|Surname|Pic1|Pic2|Pic3|Pic4

If you don't know the number of max pictures, you can create view that can transpose records (vertical to horizontal), a little bit complicated solution

Best regards,
Viljem
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
biru32
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
Go to top
Post Reply
Post New Topic
Page: 1
Moderators: tomaz
Tools JX, Powered by Joomla!; Joomla templates by SG web hosting