How to display an uploaded picture ?

jmauver 17 Mar, 2009
Hello again🙂

Ok, I used ChronoForms to save data on the database. There is field there that contains a file name of the image uploaded to upload folder.
When I use Chrono Connectivity to display the table created and populated via ChronoForms I use the following code inside the body box:

<img src="http://myserver/~linber0/site-live/components/com_chronocontact/upload/myForm/{file_25}"
width="20" height="20">


{file_25} is the table field that has the file name. However the image does not appear or give any error. All other fields appear properly. Probably I am doing something wrong. Can anyone please put me in the right direction ?

A million thanks,

Jmauver
GreyHead 18 Mar, 2009
Hi jmauver,

If you View Source for the page what do you see here. Is no url shown? or one that is mangled?

Bob
jmauver 18 Mar, 2009
Hi Bob,

Thanks again for your reply. I don't know why but when I use PHP "echo <img...." the image appears properly. I think it has to do with style sheets or so.
It is working now🙂

Thanks and Regards,

Jmauver
purple knight 08 Apr, 2009
Hallo Jmauver & Bob,

How to do this?

Hi Bob,

Thanks again for your reply. I don't know why but when I use PHP "echo <img...." the image appears properly. I think it has to do with style sheets or so.
It is working now



I have a similar problem. The connectivity page only showed me this "200903111.jpg" (a jpg uploaded by user), instead of displaying the picture.

Purple Knight. :o
purple knight 08 Apr, 2009
By the way, I checked the page's source file. It only displayed "<td style="width: 20%;">200903111.jpg</td>".
GreyHead 08 Apr, 2009
Hi Purple Knight,

I think that you'll need to edit the html to add the folder path.

Bob
purple knight 09 Apr, 2009
Hallo Bob,

You are indeed very helpful and kind. I see you in almost all the posts 😀

I think that you'll need to edit the html to add the folder path.

Hmmm... what does this mean? Not sure how to do it. The jpg is posted by each individual user & the table should automatically subjected to updates (if new users post).
GreyHead 09 Apr, 2009
Hi Purple Knight,

See jmauver's post at the start of this thread.

Bob
purple knight 10 Apr, 2009
Hallo Bob,

Thanks once again for your magical help. 😀

One more question. So now I am able to display the picture in the chronoconnectivity form (the summary page of all posts submitted by users). Very successful. However, this page is linked with a detailed info page. Once I click the info from the summary page, there's a box pop-up (like Chronoform forum), the images can't be displayed. Been figuring this the entire morning, no luck.

Under the chronoconnectivity general tab, the body has this code:
<div id="cccontent_{id}_box" style="display: none;">Location: {select_2}<hr>
You can find it {select_2}, {text_3}. Nearest bookstall is on {select_12}.
<img src="/components/com_chronocontact/uploads/map/test.jpg">
<img src="/components/com_chronocontact/uploads/map/{file_29}">
<img src="/components/com_chronocontact/uploads/map/{file_30}">
</div>


The picture with the code <img src="/components/com_chronocontact/uploads/map/test.jpg"> comes out fine. But not for {file_29} and {file_30}.
GreyHead 10 Apr, 2009
Hi Purple Knight,

You've probably got to find and save the absolute values of those fields. I'm not sure how to do that, Max may know?

Bob
Zero-one 31 May, 2009
Hi,

The Auto generated Code is wrong.

Front Permissions
<img src="/components/com_chronocontact/uploads/map/{file_30}">

Auto generated
<img src="/components/com_chronocontact/uploads/map/%7Bfile_30%7D">


The solution is, go to phpmyadmin jos_chronoconnectivity > and Connections table and edit "ccCache1"
%7Bfile_30%7D

to
{file_30}


It is a bit awkward but it works.

Greetings,
Zero-one
hohosky 05 Oct, 2012
I try these thread yet failed. Can anyone help?
I'm using Joomla 2.5 CF4(latest) CC(latest)
To do[attachment=1]Q.png[/attachment]
I done[attachment=0]do.png[/attachment]
I fix the code for times, I think I didn't make it right.
Max_admin 05 Oct, 2012
Hi,

Please remove the "echo" and the trailing </a>, and the img tag should be like this:

<img src="..." width="323" height"213" />


Make sure the img path is correct, copy it in your browser bar and try to access it to make sure it works.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
hohosky 05 Oct, 2012
thanks Max

now i fix code like
<img src="http://140.117.75.115/etw/components/com_chronoforms/uploads/cf4-stu-table/20121004163940_images.jpg" width="323" height="213" />

but i still get nothing in list.

i'm sure image link is good.http://140.117.75.115/etw/components/com_chronoforms/uploads/cf4-stu-table/20121004163940_images.jpg

i also check view-source it show like
<a href="/etw/index.php/component/chronoconnectivity/cc_edit_data/22?Itemid=">20121004163940_images.jpg</a>


would you please give me another tips?
Max_admin 05 Oct, 2012
Hi hohosky,

I think that you are using the "Auto listing" ? this will not work in the auto listing, you must enable the custom listing and list all the fields you need in the body box.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
hohosky 11 Oct, 2012
Hi Max
Many thanks for your help.
Now I can get this photo shows up. But just only this one.
Actually, i wish to have it auto display on list.
what i have done as att pics
[attachment=0]custom outcome.png[/attachment]
[attachment=1]custom field display code.png[/attachment]
can you show me how to do?
GreyHead 11 Oct, 2012
Hi hohosky,

In the 'body' section you should be able to use something like this
<td><img src='components/com_chronoforms/uploads/cf4-stu-table/{photo}' /></td>


Bob
hohosky 12 Oct, 2012
hi
i almost make it.
here is my outcome.
[attachment=1]02-no pic show.png[/attachment]
and if open this blank pic, i got a 403 page.
[attachment=0]03-403 issue.png[/attachment]
i check the source code, it's like
[attachment=2]01-source code upload pic.png[/attachment]

I'll say it's a access issue.
But when I use this pic's url in browser, I can see the pic.

I also try the thread by Zero-one , use phpmyadmin to edit table.
But I can't find the field or value it refer to.
So i don't know what else i can do?
GreyHead 12 Oct, 2012
Hi hohosky,

It looks as if you have to use https:// to show an image correctly. This works:
https://140.117.75.115/etw/components/com_chronoforms/uploads/cf4-stu-table/20121004161827_lou365_s.jpg
but this does not work:
http://140.117.75.115/etw/components/com_chronoforms/uploads/cf4-stu-table/20121004161827_lou365_s.jpg


If looks as though {photo} isn't returning the image name but some kind of odd link code? The code that I posted should work if {photo} returns the image name - 20121004161827_lou365_s.jpg

You could also try putting the full URL in
<td><img src='https://140.117.75.115/etw/components/com_chronoforms/uploads/cf4-stu-table/{photo}' /></td>

Bob
hohosky 13 Oct, 2012
Thanks Bob

First, I think you made it opposite. When I use "http://~~" I can see the pic, but "https://~~".
And no matter which full URL I use, I still can't see the picture.

Like you said it seems returning odd string. I copy them all .
http://140.117.75.115/etw/components/com_chronoforms/uploads/cf4-stu-table/%3Ca%20href=%22/etw/index.php/component/chronoconnectivity/cc_edit_data/21?Itemid=%22%3E20121004161827_lou365_s.jpg%3C/a%3E

https://140.117.75.115/etw/components/com_chronoforms/uploads/cf4-stu-table/%3Ca%20href=%22/etw/index.php/component/chronoconnectivity/cc_edit_data/21?Itemid=%22%3E20121004161827_lou365_s.jpg%3C/a%3E


If I use these string "http://~" paste it into browser, I got a 403 page.
And if I use "https://~", I got browser information "102 (net::ERR_CONNECTION_REFUSED):"(I use chrome to browse).
[attachment=0]https error.png[/attachment]
GreyHead 13 Oct, 2012
Hi hohosky,

Interesting, I get the same result as you in Chrome but in FireFox to day both http and https are working. Maybe I had a typo yesterday.

You need to create a valid image link. The URLs you posted here are a mess with an <a> tag included that is breaking them.

The link you need is like this:
http://140.117.75.115/etw/components/com_chronoforms/uploads/cf4-stu-table/20121004161827_lou365_s.jpg
If you put that in your browser you will see the image.

Bob
This topic is locked and no more replies can be posted.