Mar 1st, 2010, 4:09 AM
May I know how to use API in Wordpress?
The following warnings occurred: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
Can FT2 API using in WordPress?
|
Mar 1st, 2010, 4:09 AM
May I know how to use API in Wordpress?
Mar 7th, 2010, 7:43 PM
Hi wkl,
I'm afraid I'm not totally sure... do you mean from within a separate plugin or something? What are you trying to do, exactly? - Ben
Jun 2nd, 2010, 12:15 PM
I believe the issue is in using outside php scripts/functions within wordpress.
I am running into the same issue as well I believe - I've always had success with the standard FT setup, however, using API within WordPress has always caused issues. WordPress does not like to accept/use functions or variables included from outside files. I have included the api.php file(verified that the file was loaded by adding a quick echo statement to the top of the api.php file) however, the next line ( fields = ft_api_init_form_page(1, "initialize") ) produces an undefined function error. I know very well that this is not an issue with FormTools, however, if anyone has dealt with this issue before and has any insight on running outside scripts within WordPress it would be greatly appreciated
I've succesfully used FT2's API within wordpress on both the frontend and backend. I'm having a small issue regarding the sending of mails from the backend, but i still think it's my fault. When i finish testing this thing i'm doing i'll post some kind of tutorial or code dump... i just wanted to let you know that it works.
Regars, MatÃas. Me again. The issue i had was related to the bug tracked here: http://bugs.formtools.org/index.php?cmd=view&id=220, so it works. I will be posting the scripts here soon In the meantime, i ran into some simple issues, like using some WP variables as name fields in my form, specifically $name (<input name="name" />). When i used that one i got a 404 error just so you know. Also, do the FT stuff before the get_header(); call or use the wp_init hook. Both have worked. Have fun! |
« Next Oldest | Next Newest »
|