Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Basic Form that submits to a new Thread Details »
Basic Form that submits to a new Thread
Mod Version: 0, by rustyshack (Designer) rustyshack is offline
Developer Last Online: Jul 2020 I like it Show Printable Version Email this Page

vB Version: 5.5.5 Rating: (1 vote - 5.00 average) Installs: 1
Released: 21 Apr 2020 Last Update: 27 Apr 2020 Downloads: 23
Not Supported Template Edits External Content Is in Beta Stage  

After upgrading my forums to VB5 i was in need of a Review form for my board which I had on VB4. Unfortunately the Easy Forms plugin was disabled for VB5 so I worked to create my own form. As I have seen many saying they would like some type of form like this also, which is why I am posting this here. Also I want to help with the viability of the VB5 platorm.

Installation Instructions:
  1. Open the text file and change the ChannelID in two places in the file to the Channel you want the thread to go in. One spot is a <DIV> at the top of the form. The other is a hidden field at the end of the forum. You can search for '23' which is the current Channel value.
  2. Create a custom template in Style Manager.
  3. Paste the entire attached txt file into that template.
  4. Save the template and record the name of the template for later use.
  5. Go to Site Builder at the top of the forum and choose "New Page.
  6. This will create a new page and you can choose the "Display Template Module".
  7. Drag the Display Template Module into the first slot on your new page.
  8. Click the pencil icon to configure the module.
  9. Enter the Page name and the name of the template, then save the module.
  10. Save and exit out of the page builder.
  11. Go to your new page and see the form. It should work with no other changes.

The form can be tailored to your needs you can add fields or change fields, all you need is some html and Javascript knowledge but it is very easy to change.
There is also a validation function you can extend to put more or different validation on fields. Currently it only checks for required fields.

This uses the CreateContent API which has required fields of "title" and "text".
The 'string_yy() function takes all the field values, format them with BBcode and strings it all into text form field. The form once submitted creates a post in the Channel you specify in the script.

This is an independent template that does not interfere with any other functions outside that page. It should work on all versions of VB5 although I have only tested in on 5.5.4 and 5.5.5

There is probably other and better ways to do this or improve this script.
There is no flood control or captcha, so best only make this available to registered members unless you can implement some protections against multiple submissions.

Update suggestion or modifications welcome.
The intention is that this is a template that you change to fit your needs.
So i can only support what i have created, you would be reponsible for changing the form and working out any bugs that arise from your changes.

It does not work without including the Jquery js from a CDN.
It doesn't seem to work with the native forum jquery but this also does not appear to conflict with anything.

The standard function is that it creates a new thread then redirects you to the new thread.
This could be change to take some other action.

I now works great on 2 of my VB5 forums with no changes in a basic new page.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	busform.jpg
Views:	63
Size:	29.3 KB
ID:	157617  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Statistics Modifications Track replies & new thread clicks/submits in Google Analytics tpearl5 vBulletin 4.x Template Modifications 3 01 Apr 2012 22:13

Comments
  #2  
Old 21 Apr 2020, 22:50
rustyshack rustyshack is offline
 
Join Date: Jun 2009
Real name: +++++++
Sorry.

Last edited by rustyshack; 23 Apr 2020 at 18:17.
Reply With Quote
  #3  
Old 22 Apr 2020, 08:31
delicjous's Avatar
delicjous delicjous is offline
 
Join Date: Nov 2014
Nice idea. In my tests I ends up on mydomain/undefined ... You should use the inbuild jQuery instead of load a new one... just put the script-part to the hook footer_before_body_end ... you could use the api to create a new post instead of loading the new thread page.
__________________
vBulletin-Forum.de closed!
Reply With Quote
  #4  
Old 22 Apr 2020, 09:40
rustyshack rustyshack is offline
 
Join Date: Jun 2009
Real name: +++++++
Originally Posted by delicjous View Post
Nice idea. In my tests I ends up on mydomain/undefined ... You should use the inbuild jQuery instead of load a new one... just put the script-part to the hook footer_before_body_end ... you could use the api to create a new post instead of loading the new thread page.
I'm not clear at all why it wouldn't work for you on a fresh template page in the site builder.
Did you change the channel Ids in the file? Perhaps 23 doesn't exist on your board.

The functionality I wanted was to go to the thread after submission.
In my case it is always a new thread.
I will try the jquery change you mentioned. It isn't the greatest script but there was no other examples or help I could find to build one.

It could be tweaked or changed in many ways. The main point of it is that is strings the many fields into the one text field and formats it for submission. I tried to do this with a second PHP page in the sitebuilder but I didn't get that to work, but there is many options.

There is nothing that specifically connects this script to Vbulletin functionality.
Which makes it not subject to most changes in VB.
My current issue is that the forms i use now will not move from VB4 to VB5.
I shouldn't have that issue next time.
Reply With Quote
  #5  
Old 22 Apr 2020, 11:01
delicjous's Avatar
delicjous delicjous is offline
 
Join Date: Nov 2014
I tried on my testpage with a lot of custom-stuff implemented and I changed the channelid 23 to a 3. So it could work on a fresh installed vB. Its Ok if it is working for you... but I thought I mention because I saw you marked it as supported.
__________________
vBulletin-Forum.de closed!
Reply With Quote
  #6  
Old 22 Apr 2020, 19:51
rustyshack rustyshack is offline
 
Join Date: Jun 2009
Real name: +++++++
Originally Posted by delicjous View Post
I tried on my testpage with a lot of custom-stuff implemented and I changed the channelid 23 to a 3. So it could work on a fresh installed vB. Its Ok if it is working for you... but I thought I mention because I saw you marked it as supported.
Right but is there more information to go by? So are you saying your install is far from standard?
Did you change the channel Id in 2 places?
Did you actually create a post? Is it the redirect to the new thread that is failing only? What part is not working for you?
All of it, some of it? I don't think you are giving me a fair shake to even support it.
Is there any sort of error you can point me too?
Not much for me to go by. But it sounds like you know way more than me anyways.

I can mark it as unsupported and will because on my 6 year old forum it works fine on a new page. Is there any console errors in the script or anything like that? I specifically say i am supporting the basic function and structure of the basic form. In all my testing it works fine on a stand alone standard html page placed in the VB5 main folder. Or when creating it in a new page in the site builder.

My whole intention is to provide an example others could build on.
I will just delete the stupid thing, sorry for trying to help.

Last edited by rustyshack; 22 Apr 2020 at 20:12.
Reply With Quote
  #7  
Old 22 Apr 2020, 20:33
delicjous's Avatar
delicjous delicjous is offline
 
Join Date: Nov 2014
Like I wrote. The idea is good and you should leave it here for others.
__________________
vBulletin-Forum.de closed!
Reply With Quote
  #8  
Old 22 Apr 2020, 20:48
rustyshack rustyshack is offline
 
Join Date: Jun 2009
Real name: +++++++
But why won't you give me information that i can help you make it work.
You didn't answer any of my questions and just made my mod seem like crap.
thanks for that!
Way to encourage developers for the platform.
On most other support requests users actually provide error and feedback.
You should just delete the comments about it not working unless you are prepared to work through it.
Plus you don't seem like anyone who is actually interested in implementing it anyways.

Last edited by rustyshack; 22 Apr 2020 at 20:57.
Reply With Quote
  #9  
Old 22 Apr 2020, 22:06
rustyshack rustyshack is offline
 
Join Date: Jun 2009
Real name: +++++++
What browser are you using, what platform are you using?
Are there any errors in the JS console or otherwise.
Did it create a new thread or not?
Did you change the channel id in two places.
Is there anything in your page that is custom that would affect it?
If there is no jquery errors or conflicts, what error is there?
Reply With Quote
  #10  
Old 23 Apr 2020, 07:43
delicjous's Avatar
delicjous delicjous is offline
 
Join Date: Nov 2014
Originally Posted by rustyshack View Post
What browser are you using, what platform are you using?
Are there any errors in the JS console or otherwise.
Did it create a new thread or not?
Did you change the channel id in two places.
Is there anything in your page that is custom that would affect it?
If there is no jquery errors or conflicts, what error is there?
Like I said the url will become mydomain/undefined and it not creating a thread. You are right I will not using it, but I also tried/try to help you. There is no comment I mention your mod is crap!

My vB-Version is 5.6.1 Alpha 4

It is not give me any error (not in the console or php-errors).
Most users here are to lazy to install a mod to try if it works in new versions, so I want to tell you to go a secure way and do not support a mod which works for you but perhaps not for others.
I looked a little deeper because I will not named a jerk which is not helping!

The form-action attribute you set is "create-content/text" and the ajaxForm url is "this.href" which override the form-action attribute "create-content/text". This is not correct in both cases, because you need to set the ajax-baseurl!!!

Change your js-script url to url: vBulletin.getAjaxBaseurl() + '/create-content/text',

console-answer:
Object { retUrl: "https://mydomain.de/forum/main-forum/782-this-is-a-test-review", nodeId: 782 }

Thats it... content is created and you will be redirected to it.

You have to much places code have to be changed and it is a little unstructured but I did not say crap!

Wonder that it is working for you, but could be the js-changes in version 5.6.0 and 5.6.1 ...

Glad I could help!
__________________
vBulletin-Forum.de closed!

Last edited by delicjous; 23 Apr 2020 at 07:56.
Reply With Quote
  #11  
Old 25 Apr 2020, 18:38
D0RKFI$H D0RKFI$H is offline
 
Join Date: Sep 2006
I have a use for it, can you PM me the details?
Reply With Quote
  #12  
Old 27 Apr 2020, 16:07
redragon29 redragon29 is offline
 
Join Date: Dec 2019
Nice to see someone working here!
good job.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 07:57.

Layout Options | Width: Wide Color: