[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4586: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4588: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4589: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4590: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
Xataface Forums • View topic - Show book cover
Page 1 of 1

PostPosted: Sun Aug 19, 2007 4:12 pm
by dclijste
I see that it is possible in some way to add a cover to your book record. However, where and how can i add such a cover? I'm used to work in php but don't have any experience in the code presented here.

since my covers are all called isbn.jpg it's easy to bypass mysql and just ask for the isbn from this specific record and add .jpg at the end. However, where and how can I show a certain field from the specifik form I'm watching.

I also have thumbnails for the view:browse. However, if I have an answer on previous question i'll figure this out myself.

PostPosted: Mon Aug 20, 2007 10:15 am
by shannah

Hi,

I originally had a book cover feature but removed it because the people who were going to be using it at first, didn't want it.Ê If you have all of the book covers in an easy form as you say, then it wouldn't be too hard to re-add this.Ê The easiest way is to probably add a column to the books table for the cover art.Ê Then implement an htmlValue method in books delegate class (tables/books/books.php) for the column to make sure that it is displayed as an image.

You'll notice remnants of the old columns named cover_art_url_large, cover_art_url_medium, and cover_art_url_small that are already in the fields.ini file and the books.php file.

To make life easier, you may want to just name your field cover_art_url_large so that it will pick up the existing settings.Ê Then you should be able to do one big SQL query on the database to populate that field with the correct cover art url values.


You can alter the cover_art_url_large__htmlValue() method as required to make the output how you like.
-Steve

PostPosted: Mon Aug 20, 2007 4:04 pm
by dclijste
I made it myself easy and added the following line on the place of the missing_logo.gif in Dataface_View_Record.html

val('isbn')}.jpeg" style="max-width:180px"/>

All I needed was $record->val($var) since my covers are all isbn.jpeg

It's not a clean code since only me (and other administrators) can add covers (ftp) and there is no replace image, however, my aim is to add a cover for every book so this is more a push for me to be sure I'll find a cover (by now it's only about 300-400 books).

I see dataface supports uploading files and so on but this line is more than enough for my small library.

Thanks for your fast reply !

Denis

PostPosted: Wed Aug 22, 2007 4:56 am
by dclijste
After experimenting more with dataface I really start loving this application.

So I added widget:type = file to be able to upload files trough dataface.
However, there I found a bug (I think).

I did everyting which is written here:
http://framework.weblite.ca/documentation/how-to/how-to-handle-file-uploads

This didn't work (it handled it just as if it was a blob, and by taking the blob-way i couldn"t upload because it asked for required field cover_mimetype and cover_filetype) untill I changed the name from cover to PDFOutline
This is not a big problem since nobody knows the table name, but it's a weird big ( ? ).

PostPosted: Wed Aug 22, 2007 9:09 am
by shannah
I replied to the comment on that you left on that tutorial page. There is no bug, though. Yoiiur problem was that you specified the 'Type' parameter in the fields.ini file as 'type'. It needs to be 'Type' and not 'type'.

Case sensitivity...

-Steve

PostPosted: Thu Aug 23, 2007 2:21 am
by dclijste
thanks,
I think I have to but 'case sensitive' on a post-it so i'll never forget that. This is not the first time I've lost valuable time because the lack of use of the shift-button :)