Keyword

[SOLVED] rsform insert to k2 item

More
12 years 11 months ago #57989 by liamm
[SOLVED] rsform insert to k2 item was created by liamm
I am using k2 to insert an entry from rsform to k2 (2.4x) and am using the sql mappings.
i want to insert and image (or three) into the k2 item but cant figure where the image gallery data table is. or is there a better way of doing it?
i am obviously going to ask the same question on the rsform forums

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago #57990 by william white
Replied by william white on topic Re: rsform insert to k2 item
Look at creating a gallery from the backend of K2, all versions
You upload a zip file containing files that are then placed in a directory where they are unzipped.
Most everything is possible, but you will probably need custom code to do this.
Please elaborate on the steps you have taken with rsforms->mapping and how you manipulate rsforms to create a k2 item

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago #57991 by liamm
Replied by liamm on topic Re: rsform insert to k2 item
let me explain a bit more.
the image and or zip file is loaded via rsform along with other details.
i either want the zip xpanded to the gallery as if i was uploading via the normal method or auto insert the image to the item. At the moment it just comes out as a link
here is the current form i used in an attempt to get line breaks inserted into the item

Log in  or Create an account to join the conversation.

More
11 years 9 months ago #57992 by Marinel Cuculj
Replied by Marinel Cuculj on topic Re: rsform insert to k2 item
Did someone solved this?!

I would like to know how can I insert an image to K2 item through a rsform field?!

Can someone post step by step tutorial?!

Thanks!

Please Log in or Create an account to join the conversation.

More
10 years 4 weeks ago #57993 by Marinel Cuculj
Replied by Marinel Cuculj on topic Re: rsform insert to k2 item
Hi,

I am using RSForm Pro with mapings function to make new K2 items... it works like a charm.

I managed to insert images as well.. with this code wich I put in: Script called after form has been processed settings of the PHP SCRIPTS section in RS FORM.
	here
.

It works great, the image is saved, renamed, and it appears in K2. But it gives me an warning message:

Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in /administrator/components/com_k2/lib/class.upload.php on line 2910

Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in /administrator/components/com_k2/lib/class.upload.php on line 2977

Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in /administrator/components/com_k2/lib/class.upload.php on line 3004

Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in /administrator/components/com_k2/lib/class.upload.php on line 3022

Can someone help, please? Thansk! :)

Please Log in or Create an account to join the conversation.

More
10 years 4 weeks ago #57994 by Marinel Cuculj
Replied by Marinel Cuculj on topic Re: rsform insert to k2 item
Issue was in newer version of PHP (5.4) on my server... I have replaced class.upload.php with the new one and now everything is ok :)

The new version of the class.upload.php file you can download from here .

Please Log in or Create an account to join the conversation.