Displaying jpg in forms

A place for users and developers of the Xataface to discuss and receive support.

Postby smartstuf » Sun Feb 11, 2007 9:27 am

HI folks, only 'discovered' dataface on Friday of last week... have set it up and linked it into existing mySQL databases. Still very much 'playing around' with it during the learning curve. But, I have a question...
I have an inhouse EPOS running off mySQL and I have been using this as the basis of my playtime. Although the previous PHP scripted forms that we used as the interface for the epos displayed stored jpg images (extracting the file locations from the database fields) and displaying them to the users, I don't seem to be able to work out how to do such with dataface (I am trying to use just the ini and php files rather than ripping into the html .. to keep it simple for the users later), but I don't seem to be able to find anything in the documentation that refers to this. And trying various options for the config files doesn't appear to work.
Sorry for the long intro... but the basic question is ... can the dataface forms be made to display graphic images stored on the server and addressed via the database fields? It's probably obvious and simple... (hopefully).

Thanks
Ian
smartstuf
 
Posts: 2
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Sun Feb 11, 2007 10:01 am

Check out http://framework.weblite.ca/documentation/how-to/how-to-handle-file-uploads

I believe that setting your field to a Container field (as described in that tutorial) will yield the desired results.


-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby smartstuf » Sun Feb 11, 2007 12:26 pm

Check out http://framework.weblite.ca/documentation/how-to/how-to-handle-file-uploads

I believe that setting your field to a Container field (as described in that tutorial) will yield the desired results.


-Steve



Thanks for that Steve.
OK rattled it in... and Yep, did the trick..... well almost.. the 'old' system displayed the jpg's as the users browsed the detail without having to open them in another window.
But, I must say that I have accomplished more with Dataface in less than 3 days (and that includes installing it) than any other 'new' (new to me that is) App I have come across in years. I love the fact that most aspects are configurable from the 'ini' files.

I'll certainly be using this a lot in the future. The EPOS system I am using as my learning tool took me about 16 weeks to create.... I believe that if I had used dataface originally that time would have been about 3-4 weeks.

Thank you for sharing Dataface ...

Ian
smartstuf
 
Posts: 2
Joined: Wed Dec 31, 1969 5:00 pm

Postby ghiebert » Sun Apr 01, 2007 3:36 pm

Is Ian talking about thumbnail images that show up in a field in the details page, without having to click on a link?

I don't think is an option yet, is it? Personally I could use it, eventually. Lot of work to get done before that though.

Gord H
ghiebert
 
Posts: 11
Joined: Wed Dec 31, 1969 5:00 pm

Postby fcc » Sun Apr 01, 2007 5:18 pm

Actually you can have thumbnail images show up as a field already. Just follow method 2 of the link http://framework.weblite.ca/documentation/how-to/how-to-handle-file-uploads
fcc
 
Posts: 7
Joined: Wed Dec 31, 1969 5:00 pm

Postby ghiebert » Mon Apr 02, 2007 12:16 pm

Actually I have tried method 2. I get a link that shows, in the Picture field I created, to /myappPath/tables/inventory/41-210-0.jpg. You click on it in Details screen and it popups up a nice picture in another windows.
ghiebert
 
Posts: 11
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Tue Apr 03, 2007 10:16 am

This is strange.Ê If you have a field to record the mimetype i.e. image_mimetype , and it is an image, it should just show the image inline.

In any case, you can override the details view for that field using the fieldname__htmlValue() method in the delegate class.

e.g.:


function myimagefield__htmlValue(&$record){
Ê return '';
}


Best regards
STeve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 26 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved