
Bob # (The record name)
Bob
Last updated Wednesday, December 31, 1969 - 1995 weeks ago
Version Dataface 0.7 dev 4
Ubantu Linux 6.06.1 LTS
FireFox 2.x
PHP5.1.2
MySQL 5.0.22-Debian_0ubuntu
Thanks,
Bob
Put a face on your database
http://xataface.com/forum/
The question mark is a placeholder when the record doesn't have an image field.Ê If the record has a blob field or a container field that stores an image, the image will be displayed here.Ê Alternatively you can specify any image to be a logo field by adding logo=1 in the fields.ini file section for that field (then make sure that you implement the %fieldname%__htmlValue() method to return an tag).
You can hide this image altogether using the hide_record_view_logo preference setting ( seeÊ http://framework.weblite.ca/documentation/manual/conf_ini/prefs for info about preferences).
As for the last updated section.Ê Dataface has some logic to try to figure out the last updated time for a record was.Ê It looks at the names of the fields in the table to see if there is one that looks like a last modified field.Ê It will use this field's value as the last modified time.Ê You can also implement a method in the delegate class called getLastModified(&$record) to return a string representing the last modified time as a string.
e.g.
function getLastModified(&$record){
ÊÊÊ return date('Y-m-d H:i:s');
}
will always return the current time as last modified.
or perhaps
function getLastModified(&$record){
ÊÊÊ return $record->strval('mtime');
}
if you are storing the modification time in the mtime field.
If your dates are looking weird here, that means that either you don't have a datetime/timestamp field in your record or dataface isn't recognizingÊ it.ÊÊ What are the names of your modification fields if you have them, so that I can try to adjust the DatafaceÊ guessing function to handle more cases?
Best regards
Steve
Hi Bob,
When using a blob field it is a good idea to also have a field to store the mimetype.Ê That way dataface can discern whether or not the blob is an image file.Ê If you create a column with the same name as the blob field but with ('_mimetype') at the end, Dataface will know what to do with it.Hi Bob,
This may be a bug that needs to be fixed, but you can work around it for the time being by implementing a portrait__htmlValue() method in your delegate class like the one I described in my previous post.Yes.. Dataface treats the filename and mimetype fields as metadata and by default doesn't display them in the view tab.Ê The mimetype field should store something like:
image/gif
or
image/jpeg
This is gathered when the image is uploaded initially.Ê If you uploaded the image into the blob field before creating the mimetype field then Dataface won't recognize it as an image unfortunately.ÊÊ Try re-uploading it now that you have a mimetype field.
-Steve