picture upload and display

akirasrebirth

New Member
Hello

it's possible to do something like this with fabrik:

1) The user uploads a picture (with file upload element)
2) The picture is resized to a thumbnail
3) The thumbnail is visualized in detail view of the table

please help me out with this

best regards

roland
 
Hi Roland,

If you have image magik installed on your server, Fabrik should have no problem doing what your asking.

-Graylan
 
Hi Graylan,

thanks for helping me! :)

for image magik and fabrik file "upload element" configuration see attachments....

I have 2 problems:

1. The original uploaded image is ok, and is showing in detail view, but there is no thumbnail in the images/stories/thumbs/ directory.
2. If the user doesn't upload any image i have this error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \':/www.operenuove.it/, \'\', \'2007-04-18\', \'4:3\', \'Dvd\', \'jos_fabri SQL=INSERT INTO jos_fabrik_formdata_3 (`festival`, `experiment`, `titolo_orig`, `titolo_ingl`, `paese`, `genere`, `altro_genere`, `lingua_orig`, `sottotitoli`, `lingua_sottotitoli`, `formato_ripresa`, `altro_formato`, `durata`, `anno_prod`, `regista`, `sceneggiatura`, `fotografia`, `montaggio`, `musica`, `suono`, `produzione`, `attori`, `sinossioriginalecorta`, `sinossioriginalelunga`, `sinossiinglesecorta`, `sinossiingleselunga`, `biofilmografia`, `premialtrifestival`, `sitofilm`, `foto`, `fabrik_internal_id`, `time_date`, `aspetto_beta`, `formato_copia`, `nomecontatto`, `societaorg`, `vianumero`, `cap`, `citta`, `paesecontatto`, `telefono`, `fax`, `cellulare`, `email`) VALUES (\'Opere Nuove\', \'Yes\', \'riprova imagine\', \'jos_fabrik_formdata_3___titolo_ingl\', \'AF\', \'animazione\', \'-\', \'-\', \'yes\', \'-\', \'16mm\', \'-\', \'1\', \'2007\', \'jos_fabrik_formdata_3___regista\', \'-\', \'-\', \'-\', \'-\', \'-\', \'-\', \'-\', \'jos_fabrik_formdata_3___sinossioriginalecorta\', \'-\', \'jos_fabrik_formdata_3___sinossiinglesecorta\', \'-\', \'-\', \'-\', \'http://|http://', http:/www.operenuove.it/, \'\', \'2007-04-18\', \'4:3\', \'Dvd\', \'jos_fabrik_formdata_3___nomecontatto\', \'jos_fabrik_formdata_3___societaorg\', \'jos_fabrik_formdata_3___vianumero\', \'jos_fabrik_formdata_3___cap\', \'jos_fabrik_formdata_3___citta\', \'AF\', \'jos_fabrik_formdata_3___telefono\', \'jos_fabrik_formdata_3___fax\', \'jos_fabrik_formdata_3___cellulare\', \'example@example.com\')

I have fabrik 1.03 pre release installed. I tried to update to 1.03 final, but with this update the detail view of some tables didn't work anymore.


best regards

roland
 

Attachments

  • ImageMagick.jpg
    ImageMagick.jpg
    9 KB · Views: 223
  • ImageMagick.jpg_thumb
    3.3 KB · Views: 199
  • file upload.jpg
    file upload.jpg
    24.5 KB · Views: 210
  • file upload.jpg_thumb
    10.6 KB · Views: 193
Hi Roland

The image resize has been reworked in 1.0.3 as well as (I think) a fix for the insert error. I'm hours away from releaseing 1.0.4which contains some bug fixes for 1.0.3, if you can hold on till then I'd suggest upgrading and I can then help you with any problems you still might have

If you want to try out the new code for the image resize then you can open components/com_fabrik/fabrik.class.php and replace the whole of the function

Code:
function resizeImage($maxWidth, $maxHeight, $origFile, $destFile, $support = '', $filter=''){
....
}

with

Code:
	function resizeImage($maxWidth, $maxHeight, $origFile, $destFile, $support = '', $filter=''){
		$resource = NewMagickWand();
		MagickReadImage( $resource, $origFile );
		$resource = MagickTransformImage( $resource, '0x0', $maxWidth . 'x' . $maxWidth );
		MagickWriteImage( $resource, $destFile ); 
	}

Cheers
Rob
 
currently for the released versions(up to 1.0.3) only imagemagick is supported.

The svn version has support for the gd library as well.
 
Hello Rob,

I've downloaded the latest version by SVN and installed it on my website by ftp the two directories in clean directories.

I've I edit a element or make a new element then I get the following error:

Fatal error: Cannot instantiate non-existent class: imagecontroller in /home/reumer/domains/reumer.net/public_html/tech/administrator/components/com_fabrik/admin.fabrik.elements.php on line 445

Can you solve this error?

I've tried to include the file with this component, but then I get other errors.

Thank you Mike
 
HI Mike

If installing from scratch you need to make a zip of the relevant files and then install it through the component installer.
To make the zip create a new folder called "com_fabrik1.0.4svn" and paste in all the files from the 1.0.x trunk :

/administrator/components/com_fabrik

and

/components/com_fabrik

create a zip of the ""com_fabrik1.0.4svn" folder and install it as you would a normal component

PS check out the svn code as I have updated it this morning
 
Thanks Rob. This will help us in our project.

I did a clean install and uploaded the missing views files myself and the thumbnail is being created. Fantastic.

I have one question left. The full images are created with -rw------- (600). How can I make this -rw-r--r-- (644)?

A wish is that the thumbnail location and name is also saved in the image field seperated with a ;.

Cheers Mike
 
I used the tutorial to install Tortoise SVN (which I completed successfully). But using my password from joomlacode.org (which I also registered yeterday) doesn't authenticate me to download the CVS files... All these because my server doesn't have ImageMagick installed and the don't plan to install it in the near future. :(
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top