vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   New Posting Features - Form Hack (https://vborg.vbsupport.ru/showthread.php?t=126676)

attroll 11-12-2007 04:31 PM

Quote:

Originally Posted by zglows (Post 1380968)
attroll, im talking about this little image https://vborg.vbsupport.ru/external/2007/11/22.gif on the editor, its disabled

Sorry I misunderstood you. I don't know why it is disabled. I don't know how to enable it either. I wish the people that posted these hacks would come in once and a while and support them. I will look at it some but I don't know if I can figure it out.

zglows 11-12-2007 04:54 PM

thanks anyway attroll, you're cool
i really need this

zglows 11-13-2007 12:31 PM

it's working now!!!
i'd like to know how to add a message when you forget to add a title. I mean the popup that goes like "please add a title" and wouldn't let you submit the form.

dieselpowered 11-14-2007 02:23 AM

Anyone figure out how to make it so that when in a specific forum and the new thread button is clicked, the forum is brought up?

CMF 11-14-2007 11:20 AM

Thank you attroll and Brundlefly for you help :)

I now have the form working exactly as I would like it to, except for one thing:
How can I change the poll title?

Thanks again :D

zglows 11-14-2007 01:04 PM

how can i add post icons to the form???

mufar 11-15-2007 06:56 AM

Ok, wtf. Where are these freakin' "templates" you are talking about?
I imported the "hook" I have a PHP file, that i edited correctly i believe. (the two top parts)
And then modified the individual questions.
But no sign of any "templates".
The readme.txt isn't very comprehensive.

attroll 11-15-2007 07:09 AM

Quote:

Originally Posted by mufar (Post 1382837)
Ok, wtf. Where are these freakin' "templates" you are talking about?
I imported the "hook" I have a PHP file, that i edited correctly i believe. (the two top parts)
And then modified the individual questions.
But no sign of any "templates".
The readme.txt isn't very comprehensive.

Look in your ADMINCP-->Styles & Templates

mufar 11-15-2007 08:14 AM

Thank You, Finally got it working.

exstatic 11-16-2007 10:34 AM

Hey, for some reason when I edit the formanswers template, html formatting is not working, I can actually see the tags.. is there somewhere I have to enable html in posts?

zglows 11-16-2007 03:22 PM

a want the popup that goes like: please write something
but i think this is java on the template, right?

CMF 11-17-2007 12:40 PM

Quote:

Originally Posted by CMF (Post 1382310)
Thank you attroll and Brundlefly for you help :)

I now have the form working exactly as I would like it to, except for one thing:
How can I change the poll title?

Thanks again :D

Anyone? :confused:

attroll 11-17-2007 04:04 PM

Quote:

Originally Posted by CMF (Post 1384333)
Anyone? :confused:

Can't you change it just like you do with any other poll in the forums.

CMF 11-18-2007 12:03 AM

Quote:

Originally Posted by attroll (Post 1384447)
Can't you change it just like you do with any other poll in the forums.

I can, but what I mean is:
At the moment the poll question/title is automatically set as the title of the thread, I however would like for it to be automatically set to something else.

Thanks for getting back to me :)

attroll 11-18-2007 02:38 AM

I am confused as to why you want a poll in a form in the first place? If a person wants users to reply to polls and to vote in them then why aren?t they posting them in the forums? Why do they want to post them in a form?

Don?t take this wrong I am just asking.

CMF 11-18-2007 01:51 PM

No offence taken.

I am using the form for application purposes, I run a gaming clan.
If someone wants to join my clan the must apply - using the form.

When they post the form, the form gets posted into a private forum which only current clan members can view. They can then see the new application, comment on it, and vote in the poll whether or not they want to let the user join or not.

At the moment however, it's not entirely clear what the poll is there for so they all comment on the applications saying they want them in the clan or not, but nobody uses the poll lol :D

jheigl 11-21-2007 04:27 AM

I am having a lot of trouble customizing this to what I need. Can the coder or anyone else for that matter make it to what I need please? I will give you exactly what I need if anyone is willing to do it for me. Thanks!

Brundlefly 11-21-2007 12:05 PM

Quote:

Originally Posted by CMF (Post 1384926)
No offence taken.

I am using the form for application purposes, I run a gaming clan.
If someone wants to join my clan the must apply - using the form.

When they post the form, the form gets posted into a private forum which only current clan members can view. They can then see the new application, comment on it, and vote in the poll whether or not they want to let the user join or not.

At the moment however, it's not entirely clear what the poll is there for so they all comment on the applications saying they want them in the clan or not, but nobody uses the poll lol :D

I'm using this hack for the exact same purpose in one of our applications. The way probably around your issue is to form the post title in a way that corresponds to the poll options. The poll title will be the same as the post title. It seems fluid in the way i've done it, example provided;

Quote:

Post title = "Membership request from CMF - Sponsored by Brundlefly"
Poll option1 = "Yes, I support granting membership"
Poll option 2 - "No, I do not supporting granting membership"

Grimbone 11-21-2007 02:54 PM

In the code below. how would I go about sending a post to 2 different forums?

Code:

$formforumid = "13";
I am trying to get this to post to both a regular section of the forums and to a private section.

snakeair 11-22-2007 12:08 AM

[edit]==== Nevermind, i just un-installed and re-installed.

Works now. I must have deleted something by mistake on first try.

attroll 11-22-2007 01:35 AM

Quote:

Originally Posted by jheigl (Post 1386632)
I am having a lot of trouble customizing this to what I need. Can the coder or anyone else for that matter make it to what I need please? I will give you exactly what I need if anyone is willing to do it for me. Thanks!

If it is not a lot I will look at it for you and see if I have time to do this. Let me know what you want it to do. Like I said if it is not a lot to do then I will try when I have free time.

snakeair 11-22-2007 02:55 AM

I searched but not good enough cause i am still lost on this. How can i make it when the form is used after user submits it... the title $posttitle is the title of the thread. I get this default message everytime i create a thread. :(

If you need more info, please PM me or post here. It's getting late out for me.

attroll 11-22-2007 06:25 AM

Quote:

Originally Posted by snakeair (Post 1387285)
I searched but not good enough cause i am still lost on this. How can i make it when the form is used after user submits it... the title $posttitle is the title of the thread. I get this default message everytime i create a thread. :(

If you need more info, please PM me or post here. It's getting late out for me.

It is in this thread a couple of times. You can start reading here https://vborg.vbsupport.ru/showthrea...81#post1368881.

Mazinger 11-22-2007 10:59 AM

That's too complicated - I failed to customize fields. :(

snakeair 11-22-2007 11:02 AM

Quote:

Originally Posted by attroll (Post 1387360)
It is in this thread a couple of times. You can start reading here https://vborg.vbsupport.ru/showthrea...81#post1368881.


Thanks for that link. I just managed to get everything working the way i want it to. (Well untill i create another form.. lol)

Have a great holiday and time for me to get on the road.

firstrebel 11-22-2007 04:43 PM

This is a very good hack, but I need to pass on this warning. Do not create too many different forms, they will kill the server.

We have our own server, quite a good one, and this evening the server load hit 40.

I have been using this hack to make separate forms for our car sales forum, a total of about 30, one for each model of Volvo car. I noticed that as I created each new plugin the server response got slower. It was not until I disabled all the forms plugins that the server load went back to normal.

Bob

CMF 11-22-2007 06:02 PM

Quote:

Originally Posted by Brundlefly (Post 1386834)
I'm using this hack for the exact same purpose in one of our applications. The way probably around your issue is to form the post title in a way that corresponds to the poll options. The poll title will be the same as the post title. It seems fluid in the way i've done it, example provided;
Quote:

Post title = "Membership request from CMF - Sponsored by Brundlefly"
Poll option1 = "Yes, I support granting membership"
Poll option 2 - "No, I do not supporting granting membership"


Good thinking, thanks :rolleyes:

Brundlefly 11-24-2007 02:31 PM

I was looking for a way to set the timelimit a poll, using this hack should run. Forgive me if I missed it in previous posts. I've come up with a way to do this for each form hack that is running. All of the below changes are accomplished in the hook.

after
Code:

$pollpublic = "1";
add
Code:

//Time in days after posting poll shall close
$polltimeout = 10;

Where 10 is the number of days you choose to end the poll

after
Code:

$poll->set('public',        $pollpublic);
add
Code:

$poll->set('timeout',        $polltimeout);
If you have a Default Poll Timeout set on all created polls, the above changes will overide that setting.

I really hope I didn't recreate what already had been figured out.

zmmmzz 11-24-2007 09:16 PM

will this hack work on 3.7?

attroll 11-24-2007 11:52 PM

3.7 is not out yet so I don't know how anyone can answer your question yet.

PH03N1X 11-25-2007 05:38 AM

Oi mate, you really gotta make thsi hack easier to work with, maybe a bit normal.. lol

sbkp 11-29-2007 04:09 PM

I haven't been able to find what I'm looking for in the 51 pages of comments here, so I'll post: Is there a way to put this form in a thread? I'd like to have a sticky thread with a few links for online support resources, and then right there in the post, the form to request support. I'm not familiar enough with vBulletin (or certainly this mod) to determine if Form Hack can do such a thing.

Thanks.

Brundlefly 12-02-2007 10:47 AM

Quote:

Originally Posted by sbkp (Post 1391762)
I haven't been able to find what I'm looking for in the 51 pages of comments here, so I'll post: Is there a way to put this form in a thread? I'd like to have a sticky thread with a few links for online support resources, and then right there in the post, the form to request support. I'm not familiar enough with vBulletin (or certainly this mod) to determine if Form Hack can do such a thing.

Thanks.

Perhaps editing the forum properties will get you close to what you want.

Goto:
Forums and Moderators
Forum Manager
Click to edit the forum
Enter the form URL using Forum Link

theoz1 12-06-2007 04:42 AM

I cant get this thing to make a thread. i followed i think page 10 and put this under Forum display
<if condition="$foruminfo[forumid] == 16">
<!-- controls above thread list -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px">
<tr valign="bottom">
<td class="smallfont"><if condition="$show['newthreadlink']"><a href="newthread.php?do=form" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else />&nbsp;</if></td>
<if condition="$pagenav"><td align="$stylevar[right]">$pagenav</td></if>
</tr>
</table>
<!-- / controls above thread list -->
</if>

when i make the form it says the right message but doesnt post anywhere. Someone please help me

attroll 12-06-2007 06:04 AM

  • First you either create a forum or use an existing forum
  • Find out the ID of the forum
  • go into your Plugins & Products
  • Edit the Plugin
  • Scroll down through the plugin code until you find $formforumid = "16"; and replace 16 with your forum ID you want the form to be posted in.

jwocky 12-06-2007 06:22 PM

Ive installed this hack and its great, but the vb editor box doesnt show the icon for the attachment manager (to easily place attachments inline with the text of the post)

Anyone else notice this or have this issue ?

theoz1 12-07-2007 02:10 PM

Quote:

Originally Posted by attroll (Post 1396000)
  • First you either create a forum or use an existing forum
  • Find out the ID of the forum
  • go into your Plugins & Products
  • Edit the Plugin
  • Scroll down through the plugin code until you find $formforumid = "16"; and replace 16 with your forum ID you want the form to be posted in.

Yea I did that, this is my coding, I havent changed any of the coding.

// To add more then one form, copy this whole text, and creat a new plug-in with the hook location 'newthread_start'.
// After, change the form name. You can't have 2 forms with the same name.

// Name of this form
$formname = "form";

if ($_REQUEST['do'] == $formname)
{

// ################################################## #####################
// ######################## CUSTOMIZE VARIABLES ##########################
// ################################################## #####################

////////////////////////////////////////////////////////////////////////////////////////////////////
////// BEGIN CUSTOMIZATION BELOW////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//VARIABLES
//Study how variables are add here to add or remove any. If you add a variable to your form, you must add it to part one and part two.
////////////////////////////////////////////////////////////////////////////////////////////////////

// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'normalanswer1' => TYPE_STR,
'normalanswer2' => TYPE_STR,
'normalanswer3' => TYPE_STR,
'normalanswer4' => TYPE_STR,
'normalanswer5' => TYPE_STR,
'longanswer1' => TYPE_STR
));

// Part 2
$normalanswer1 = $vbulletin->GPC['normalanswer1'];
$normalanswer2 = $vbulletin->GPC['normalanswer2'];
$normalanswer3 = $vbulletin->GPC['normalanswer3'];
$normalanswer4 = $vbulletin->GPC['normalanswer4'];
$normalanswer5 = $vbulletin->GPC['normalanswer5'];
$longanswer1 = $vbulletin->GPC['longanswer1'];

////////////////////////////////////////////////////////////////////////////////////////////////////
//USERGROUPS ALLOWED
//You can add or remove usegroups that are ALLOWED to use this form by changing the numbers below in the array.
//To enable this feature, remove the '//' before the 'if'.
////////////////////////////////////////////////////////////////////////////////////////////////////

if (!in_array($vbulletin->userinfo['usergroupid'], array(2,5,6,7,11,12))) print_no_permission();

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//NAME OF TEMPLATES - DO THIS BIT IF YOU ARE MAKING MORE FORMS AND WANT TO USE A DIFFERENT LOOKING TEMPLATE
////////////////////////////////////////////////////////////////////////////////////////////////////

// Name of the main template
$maintemplate = "form";
// Name of the answer template
$answertemplate = "formanswers";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//CHOOSE WHETHER YOU WANT FORM TO BE POSTED IN A NEW THREAD, NEW POLL, REPLY TO EXISITING THREAD, PMed OR EMAILED
///////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO BE POSTED - 1 = yes, 0 = no
$formforum = "1";

//FORUM TO POST NEW THREAD IN
//You CAN make this number a variable. You can have a drop down menu or in the link like do=form&f=1. Make sure you add it the variables list.
$formforumid = "16";

//ENABLE POLL TO BE CREATED - 1 = yes, 0 = no
$formpoll = "0";
$polloption[1] = "Yes";
$polloption[2] = "No";
$polloption[3] = "Maybe";

//Make poll public - 1 = yes, 0 = no
$pollpublic = "1";

////////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO REPLY TO EXISTING THREAD - 1 = yes, 0 = no
$formreply = "0";

//EXISTING THREAD ID FOR FORM TO REPLY IN
$formreplythreadid = "12345";

////////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO BE PMED (guests CANNOT use this option) - 1 = yes, 0 = no
$formpm = "0";

//USERNAME TO PM TO (separate multiple usernames with a ';')
$formpmname = "";

////////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO BE EMAILED - 1 = yes, 0 = no
$formemail = "0";

//EMAIL ADDRESS TO EMAIL TO (separate multiple usernames with a ';')
$formemailaddress = "youremail@yourforums.com";

////////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE ATTACHMENTS - 1 = yes, 0 = no
//attachments can only be used if the form is going to make a new thread or post
$allow_attachments = "1";

////////////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////////////
//REDIRECT OPTIONS:
// 0 - thank you message (thread, reply, pm, or email)
// 1 - redirect to post (thread or reply)
// 2 - redirect to thread (thread only)
// 3 - redirect to forum (thread only)
// 4 - redirect to editpost (thread or reply)
//
// Feel free to change the thank you message if you choose option 0
////////////////////////////////////////////////////////////////////////////////////////////////////

$redirectoption = "0";

$errormessage = "Your BAP has been submitted, make sure you have sent your BAP fee."; //This is the thank you message

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//FORCE USER TO ANSWER ALL QUESTIONS - 1 = yes, 0 = no
//If you added or deleted variables, you must edit what it checked for. Search for "$answerall ==" and edit 2 lines under it.
////////////////////////////////////////////////////////////////////////////////////////////////////

$answerall = "2";

////////////////////////////////////////////////////////////////////////////////////////////////////
//TITLE OF FORM (do not use quotation marks or you will get a parse error, besides the quotes around the whole title)
////////////////////////////////////////////////////////////////////////////////////////////////////

$formtitle = "BAP Form";

////////////////////////////////////////////////////////////////////////////////////////////////////
//TITLE OF THREAD/POST/PM/EMAIL (do not use quotation marks in the title or you will get a parse error)
//You may use variables from the form for this.
////////////////////////////////////////////////////////////////////////////////////////////////////

$posttitle = "$normalquestion1";

////////////////////////////////////////////////////////////////////////////////////////////////////
//PURPOSE OF FORM (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$formpurpose = "Complete the form in order to put up a BAP. You must send the BAP fee before this will be posted.";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//NORMAL INPUT BOX : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$normalquestion1 = "Title for you BAP";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question1 = "What site is this being played on?";
$explain1 = "Please enter the poker site";

//QUESTION 2 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question2 = "What is your poker account";
$explain2 = "May only use 1 account";

//QUESTION 3 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question3 = "Total Amount of Money";
$explain3 = "Please enter the amount here.";

//Question 4
$question4 = "Number of shares";
$explain4 = "#";

$question5 = "Cost for each share";
$explain5 = "How much is each worth";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//VB TEXT AREA INPUT: You can only have ONE vb text question. (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$vbtextquestion = "All information you are wanting put down.";
$vbtextexplain = "For example, Why people should by your shares, stats, etc";

////////////////////////////////////////////////////////////////////////////////////////////////
////// END OF CUSTOMIZATION ////////////////////////////////////////////////////////////////////
///// DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING!!! ////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////

attroll 12-08-2007 06:12 AM

Quote:

Originally Posted by theoz1 (Post 1396835)
Yea I did that, this is my coding, I havent changed any of the coding.

In this forum you have titled "Buy a Piece" with a forum id of 16 do you have the forum permissions set for each user group so that they are allowed to post new threads to this forum?

theoz1 12-08-2007 07:19 AM

Yea, but it has to be accepted by a mod before it will show up. I also have the new thread link directed to where it will go str8 to the form page and than Im wanting it to be posted in that forum.

atomhead 12-08-2007 03:04 PM

This is awesome but it would be even awesomer :) if these things could be modified through the ACP rather than within the code.


All times are GMT. The time now is 02:09 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02780 seconds
  • Memory Usage 1,888KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete