Welcome Guest, Not a member yet? Register   Sign In
Rabbit Forms Beta 1.0.5
#71

[eluser]Wilker[/eluser]
Hi ardinotow,

you can change de upload path at rabbit forms configuration file (the upload path of images and files is same).

at this time is not possible to put thumbnails in a separated folder, you can request this feature at tracker in project page, its good to do requests there to they will not be forgotten Wink
#72

[eluser]ardinotow[/eluser]
Thanks wilker
#73

[eluser]ardinotow[/eluser]
I want to ask about form extends.

In wiki I read:

Code:
class Rabbit_Form_User extends Rabbit_Form
{
public function saveData()
{
parent::saveData();
$ci =& get_instance();
$id = $ci->db->insert_id();
$ci->db->where($this->getPrimaryKey(), $id)->update($this->table,
array('regtime' => date('Y-m-d H:i:s')));
}
}

In what folder I should place this file?
What is the filename?
Is there any special configuration to load this class?
#74

[eluser]deck1[/eluser]
ardinotow, you can download the rabbit demo app (rabbit-demo-final.zip):

http://code.google.com/p/rabbit-forms/downloads/list

In this app there is an example of form extends in application/myforms/User.php
#75

[eluser]ardinotow[/eluser]
@ deck1... Thank you!

One more question...how to show tinymce editor in the form?
#76

[eluser]Wilker[/eluser]
Hi, the HTML field is not documented at this time, to a quickuse only put a field type named HTML:

Code:
curriculum:
        type: Html
        label: Curriculum
        params:
            options:
                plugins: fullscreen,paste
                theme: advanced
                theme_advanced_toolbar_location: top
                theme_advanced_toolbar_align: left
                theme_advanced_buttons1_add: |,forecolor,fullscreen
                theme_advanced_buttons3: ''

this is a quick sample, the options param is optional, the options param pass arguments direct to TinyMCE initialization. I'm waiting to google code out of maintenance (i cant edit pages in project page at this time...) to create the documentation Wink
#77

[eluser]ardinotow[/eluser]
FIRST QUESTION

[quote author="Wilker" date="1208831890"]
Code:
curriculum:
        type: Html
        label: Curriculum
        params:
            options:
                plugins: fullscreen,paste
                theme: advanced
                theme_advanced_toolbar_location: top
                theme_advanced_toolbar_align: left
                theme_advanced_buttons1_add: |,forecolor,fullscreen
                theme_advanced_buttons3: ''
[/quote]

I got this error when trying using html with the same params as above:
Code:
Fatal error: Call to undefined function: json_encode() in G:\apache2triad\htdocs\advoria-ci-FA\system\application\rabbit-forms\lib\Rabbit\Field\Html.php on line 43

-------------------------------------------------------------
SECOND QUESTION

I also get error when trying to upload or edit an image
Code:
A PHP Error was encountered
Severity: Notice

Message: Use of undefined constant PATHINFO_FILENAME - assumed 'PATHINFO_FILENAME'

Filename: Field/Image.php

Line Number: 149
Code:
A PHP Error was encountered
Severity: Warning

Message: pathinfo() expects parameter 2 to be long, string given

Filename: Field/Image.php

Line Number: 149
Code:
A PHP Error was encountered
Severity: Notice

Message: Use of undefined constant PATHINFO_FILENAME - assumed 'PATHINFO_FILENAME'

Filename: Field/Image.php

Line Number: 184
Code:
A PHP Error was encountered
Severity: Warning

Message: pathinfo() expects parameter 2 to be long, string given

Filename: Field/Image.php

Line Number: 184

FYI, the new image and it's thumbnail has successfully uploaded to destination folder but the filename is not correct. New filename become:

'1_.JPG' and '1_thumbnail_.JPG' also in database the field updated to '.JPG'

Can somebody help me with these errors?
#78

[eluser]Bsport[/eluser]
[quote author="Bsport" date="1208462950"]This is just what i've been looking for, great work. altho i've hit alittle issue, i can insert records and delete, but retrieve fails with this message

Code:
Parse error: syntax error, unexpected $end in E:\www\licence\system\libraries\Loader.php(704) : eval()'d code on line 54

Now i think this is something to do with my .yml file maybe a typo but i've checked and checked and had no luck finding anything, any idea what would cause this error.[/quote]

all fixed and working correctly, apart from the javascript files which are not linking correctly Sad

so should the rabbit-assets be in the root or system folder?
#79

[eluser]Wilker[/eluser]
ardinotow, it's because your version of PHP...

json_encode and PATHINFO_FILENAME is supported by PHP since 5.2.0

Bsport

it depends how your directory is structured, the files needs to be into root folder of your site and able to access Wink
#80

[eluser]ardinotow[/eluser]
[quote author="Wilker" date="1208889235"]ardinotow, it's because your version of PHP...

json_encode and PATHINFO_FILENAME is supported by PHP since 5.2.0
[/quote]

My PHP version is 5.1.2 which is bundled from apache2triad 1.5.4. Do you know how to upgrade it to the latest PHP 5 version or should I have to wait until next release of apache2triad ? Confusedmirk:




Theme © iAndrew 2016 - Forum software by © MyBB