The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Add form login to every page on site - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5)
+--- Thread: Add form login to every page on site (/showthread.php?tid=427)



Add form login to every page on site - jacoblang - Jan 5th, 2010

Hello,
I'm an avid fan of FT1 and have been digesting and bringing myself up to speed with FT2.

With FT2 I would like to know if there is a way to add the form login credentials to every page on a website and report login error messages when applicable? I.E. simply allow a user to login with their user name and password located at the top of every page on the website, rather than using the standard login page of: http://www.somesite.com/formtools/index.php I would like to change .

I was able to accomplish this with FT1 but after looking at the index.php page for FT2, it appears a bit more complex.

Any help on this would be greatly appreciated! Smile


RE: Add form login to every page on site - Ben - Jan 5th, 2010

Ah yes... I remember doing something like this with FT1.

Tell you what, I'll look into this when I get some time this weekend. Offhand, you'll need to re-use the ft_login function, but I'd have to step it through myself to figure it out.

Keep you posted!

- Ben


RE: Add form login to every page on site - Ben - Jan 10th, 2010

Hi jacoblang,

Huh! I was just sitting down to look at this when I found out I'd already written an API function for this very job! Wow, I must be getting old: I'd completely forgotten.

Give this page a read:
http://docs.formtools.org/api/?page=ft_api_login

It's bare bones: it just explains how the function works. You'll need to do the following:
1. Include the FT API in all pages where you want to add this login form (or much better would to be just add it to one include file).
2. wrap the code in that page to detect the presence of a login POST submit, so it only tries to login with the username + password from your form.

That's pretty much it... please do let me know if you have any trouble.

- Ben


RE: Add form login to every page on site - jacoblang - Jan 10th, 2010

Hello Ben,
Thanks for the help. I'll read up on this function along with your suggested tips and post back my results. Hopefully everything will run smoothly!


RE: Add form login to every page on site - bill09 - Feb 20th, 2010

(Jan 10th, 2010, 10:59 AM)Ben Wrote: Hi jacoblang,

Huh! I was just sitting down to look at this when I found out I'd already written an API function for this very job! Wow, I must be getting old: I'd completely forgotten.

Give this page a read:
http://docs.formtools.org/api/?page=ft_api_login

It's bare bones: it just explains how the function works. You'll need to do the following:
1. Include the FT API in all pages where you want to add this login form (or much better would to be just add it to one include file).
2. wrap the code in that page to detect the presence of a login POST submit, so it only tries to login with the username + password from your form.

That's pretty much it... please do let me know if you have any trouble.

- Ben

Hi Ben,

I have a similar question:

I need to a have a custom login page (I can use the above to add the login form to the custom page), however, once logged in and on their personalized landing page, I need them to have access to their assigned FT2 forms and views.

Any suggestions?

Thanks,

Bill


RE: Add form login to every page on site - Ben - Feb 21st, 2010

Hey Bill,

Ah, that's getting a lot more complex. The simplest approach would be to write a custom Form Tools theme and just log them in using that theme. But depending on the extent of the functionality of the existing personalized landing page, this may not be possible - you'd have to integrate that content & functionality into the FT theme, which is a pain.

Alternatively, you could just provide a link or two on your personalized landing page to the appropriate Form Tools pages (e.g. forms). You could either hardcode those, or use some of the Form Tools core functions to list the forms.

But either way, to view the form content you should really do it via the existing Form Tools pages. There's just too much complexity on those pages to emulate from outside.

Hope this info helps a little at least.

- Ben


RE: Add form login to every page on site - bill09 - Feb 22nd, 2010

(Feb 21st, 2010, 11:16 AM)Ben Wrote: Hey Bill,

Ah, that's getting a lot more complex. The simplest approach would be to write a custom Form Tools theme and just log them in using that theme. But depending on the extent of the functionality of the existing personalized landing page, this may not be possible - you'd have to integrate that content & functionality into the FT theme, which is a pain.

Alternatively, you could just provide a link or two on your personalized landing page to the appropriate Form Tools pages (e.g. forms). You could either hardcode those, or use some of the Form Tools core functions to list the forms.

But either way, to view the form content you should really do it via the existing Form Tools pages. There's just too much complexity on those pages to emulate from outside.

Hope this info helps a little at least.

- Ben

Thanks, Ben. I'll ponder your suggestions and dabble for a bit.

Take care,
Bill