News:

Wondering if this will always be free?  See why free is better.

Main Menu

Custom Form Mod

Started by live627, July 09, 2008, 10:24:44 PM

Previous topic - Next topic

Plus

8: Undefined index: n

how can i fix ?

alex_cipher

Hi!

I've just installed the mod and asked myself if there shouldn't be a new "button" to access the forms (or maybe somewhere in a submenu)?

Or do I need to create one on my own?

Shades.

Quote from: alex_cipher on March 17, 2022, 06:54:08 PMHi!

I've just installed the mod and asked myself if there shouldn't be a new "button" to access the forms (or maybe somewhere in a submenu)?

Or do I need to create one on my own?
You have to create your own, try using this mod. ;)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Shades.

@live627 I see you update the mod to v2.2.2.

So I installed on a clean SMF 2.1.1 and when a user is using the forms and I check who's online I'm still getting these errors:

QuoteError
Type of error
Undefined_vars
Error message
8: Undefined variable: form_id
File
/home2/*****/public_html/*****/Sources/Subs-CustomForm.php
Line
39
URL of page causing the error
https://beta.bikerhound.com/index.php?action=who

Backtrace information
#0: smf_error_handler()
Called from /home2/*****/public_html/*****/Sources/Subs-CustomForm.php on line 39
#1: customform_load_theme()
Called from /home2/*****/public_html/*****/Sources/Subs.php on line 5751
#2: call_integration_hook()
Called from /home2/*****/public_html/*****/Sources/Load.php on line 2664
#3: loadTheme()
Called from /home2/*****/public_html/*****/index.php on line 230
#4: smf_main()
Called from /home2/*****/public_html/*****/index.php on line 187

QuoteError
Type of error
Undefined_vars
Error message
8: Undefined index: customform_who
File
/home2/*****/public_html/*****/Sources/Subs-CustomForm.php
Line
41
URL of page causing the error
https://beta.bikerhound.com/index.php?action=who

Backtrace information
#0: smf_error_handler()
Called from /home2/*****/public_html/*****/Sources/Subs-CustomForm.php on line 41
#1: customform_load_theme()
Called from /home2/*****/public_html/*****/Sources/Subs.php on line 5751
#2: call_integration_hook()
Called from /home2/*****/public_html/*****/Sources/Load.php on line 2664
#3: loadTheme()
Called from /home2/*****/public_html/*****/index.php on line 230
#4: smf_main()
Called from /home2/*****/public_html/*****/index.php on line 187

QuoteError
Type of error
Undefined_vars
Error message
8: Undefined index: n
File
/home2/*****/public_html/*****/Sources/Subs-CustomForm.php
Line
57
URL of page causing the error
https://beta.bikerhound.com/index.php?action=who

Backtrace information
#0: smf_error_handler()
Called from /home2/*****/public_html/*****/Sources/Subs-CustomForm.php on line 57
#1: customform_whos_online()
Called from /home2/*****/public_html/*****/Sources/Subs.php on line 5751
#2: call_integration_hook()
Called from /home2/*****/public_html/*****/Sources/Who.php on line 468
#3: determineActions()
Called from /home2/*****/public_html/*****/Sources/Who.php on line 213
#4: Who()
Called from /home2/*****/public_html/*****/index.php on line 187
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean


alex_cipher

There's a small typo in the description for the internal link.
QuoteThis setting allows you to chose the title for the action/page that shows the list of forms to a user (at "index.php?action=forms"). By default 'Custom Forms' will be the title.
Here you wrote action=forms but it should be action=form

Just to inform you.

live627

2.2.3

Bug Fixes
  • Load language file for the Who's Online page
  • Typo in the help text for the title setting

alex_cipher

Hey @live627 

Sorry for the double post, and sorry for not reading all 100 pages, but is it possible to force users to use the form for a specific board.
For example I have a support board.
A user want to open a support topic and click on "New Topic", now the form should open.
Is this possible?

Kindred

That would require some custom coding, well outside the design of this mod....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Aleksi "Lex" Kilpinen

Not much though, if it still works like it used to - You could just remove the permission to open a topic in that board, direct people to use the form instead, and voila. (I used to use this to have people post stuff in boards they couldn't even access.)
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Shades.

Quote from: Aleksi "Lex" Kilpinen on March 20, 2022, 09:50:05 AMNot much though, if it still works like it used to - You could just remove the permission to open a topic in that board, direct people to use the form instead, and voila. (I used to use this to have people post stuff in boards they couldn't even access.)
This I what I do too! Users submit an event with the form link I provide and the post goes to a board that only I can see and approve and then move it to the appropriate board. ;)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Shades.

SMF 2.1.1
Custom Forms v2.2.3

The forms work great so no problems with that part and no error messages but the Integration Hook "customform_whos_online" is not working properly. I had to disable it because it was interfering with the rest of the forums "Who's Online" page.

You cannot view this attachment.

Once disabled they work again.

You cannot view this attachment.
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

alex_cipher

Quote from: Aleksi on March 20, 2022, 09:50:05 AMNot much though, if it still works like it used to - You could just remove the permission to open a topic in that board, direct people to use the form instead, and voila. (I used to use this to have people post stuff in boards they couldn't even access.)
Isn't that paradox that the users can't open a topic but with the custom form mod they can? How is this possible?
I haven't looked at the board settings atm but can I deny users to start a topic but to answer in this topic?

Aleksi "Lex" Kilpinen

Yes you can use permissions to allow or limit posting of new topics and replies separately.
It may sound contradictory, but the permissions limit what the user can do - the form though is not a user, it has no user permissions, it has a different set of settings the admin can use how they want to.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

alex_cipher

I looked into the board settings and saw that I can set it to "only answer" and I think this is what you meant.
So the form isn't the user and that's the reason it can post into the board. I understand.
Thank you!

Aleksi "Lex" Kilpinen

No worries, but do remember to test that it actually works like you want it to - I haven't done that in a while, and I'm not sure if the mod still functions exactly the same :)
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

live627

Quote from: Shades. on March 20, 2022, 01:01:58 PMthe Integration Hook "customform_whos_online" is not working properly. I had to disable it because it was interfering with the rest of the forums "Who's Online" page
oh oops it's because of this line return $txt['who_hidden'];https://github.com/live627/smf-custom-forms/blob/d23f0984398c86e087dfdb335489c6aaec78635c/src/Subs-CustomForm.php#L61 (It can be removed)

Shades.

Quote from: live627 on March 21, 2022, 12:28:29 AM
Quote from: Shades. on March 20, 2022, 01:01:58 PMthe Integration Hook "customform_whos_online" is not working properly. I had to disable it because it was interfering with the rest of the forums "Who's Online" page
oh oops it's because of this line return $txt['who_hidden'];https://github.com/live627/smf-custom-forms/blob/d23f0984398c86e087dfdb335489c6aaec78635c/src/Subs-CustomForm.php#L61 (It can be removed)
That fixed it thank you! 8)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Shades.

Installed this today on a fresh/clean SMF 2.1.1 and when creating a form (before creating any new fields and non existing) I get this error in logs:

QuoteError
Type of error
General
Error message
2: assert(): assert(isset($editorOptions['value'])) failed
File
/home/*****/public_html/*****/Sources/Subs-Editor.php
Line
1514
URL of page causing the error
https://*****.com/index.php?action=admin;area=modsettings;sa=customform;form_id=1;

Backtrace information
#0: smf_error_handler()
Called from unknown on line -1
#1: assert()
Called from /home/*****/public_html/*****/Sources/Subs-Editor.php on line 1514
#2: create_control_richedit()
Called from /home/*****/public_html/*****/Sources/ManageCustomForm.php on line 170
#3: ModifyCustomFormSettings()
Called from /home/*****/public_html/*****/Sources/Subs.php on line 6001
#4: call_helper()
Called from /home/*****/public_html/*****/Sources/ManageSettings.php on line 142
#5: ModifyModSettings()
Called from /home/*****/public_html/*****/Sources/Admin.php on line 499
#6: AdminMain()
Called from /home/*****/public_html/*****/index.php on line 187
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Shades.

Also having problems with verification questions on the form. If a user enters the wrong answer it sends them back to correct the answers but duplicates the answers for some reason. If you can help I also have a topic on my issues here!

Thanks! 8)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Advertisement: