vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   New Posting Features - Easy Forms v4.x - Create a form or multiple forms without php or html knowledge (https://vborg.vbsupport.ru/showthread.php?t=234385)

your24hourstore 05-26-2010 01:37 AM

1 Attachment(s)
you would have to create a plug in in admincp/plugin manager

you would put some code in it like this
Code:

if (in_array($forumid, array(5)))

      header( 'Location: http://www.hillbillygold.com/forums/misc.php?do=form&fid=1' ) ; 
 }

heres a pic of what the plug in looks like

added: hook location newthread_start you will have to edit the part that describes the forum you want to make the thread open in array(5)))

and you will have to edit the form&fid=1' one is the form number im useing all forms have their own numbers

oh yes and of course you will have to replace the www.hillbillygold.com part

Tiryaki 05-26-2010 01:59 AM

thank you very much, now it works fine :up:

promoprompt 05-27-2010 05:05 PM

Hello,

I would like to use EasyForms in different ways.
One case to use EasyForms as Inputform for Blog and CMS-Articles.

Is there any possibility to do so?

I'm sorry I am a newbie in VB.

Is anybody there to help in this?

best regards
promoprompt

Alisa Lindsay 05-27-2010 05:37 PM

1 Attachment(s)
Quote:

Originally Posted by bananalive (Post 2042856)
Fixed? I went on your site just now and it looks as it should?

Yeah...and it was like magic too. *chuckles*

I logged on the other morning and presto... the issue had resolved itself at some point. My bad in not noting it here sooner.

Here's the screen now (See attached screenshot)... I'm delighted...just not sure how it happened. Literally, I've done nothing that could have fixed it and my Tech Guru denies all culpability for fixing it as well. 'Tis a mystery. I'm going to credit vB Board Elves for fixing it.

Thanks and Regards.... Alisa

PS: I've downloaded the latest update, but almost afraid to install it. :D

vilhiem 05-28-2010 11:53 AM

Great Mod!

Is there any way to remove some of the "options" available on the main Forms page?

For instance, for Registered Users, I would like to remove "Export Form Results", "Form Results", etc. .. and just leave "Form Results Table" ...?

Thanks!!!

vilhiem 05-28-2010 02:26 PM

How do you calculate ...?

For instance, here are the questions:
(1) Stock Purchase Price?
(2) Stock Sale Price?
(3) Percentage Difference (calculated)

Thanks!!!

Welshy2008 05-28-2010 05:20 PM

Quote:

Originally Posted by bananalive (Post 2042851)

If you use the vB 4 default buttons use this:

PHP Code:

if ($threadinfo[threadid] == 31

$show['quickreply'] = false;
$vbphrase['reply_to_thread'] = "Your Text";


You are getting the no securitytoken error because vBulletin now has different template syntax

<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="searchthreadid" value="{vb:raw threadinfo.threadid]}'" />


Also use <vb:if> instead of <if>


Thanks BananaAlive,

The button one worked perfectly. Sorry, I have already done the <vb:if> and </vb:if>, I meant how to get the border around it (Box).

Many Thanks,
Once Again,

Welshy.

Welshy2008 05-28-2010 05:26 PM

The search facilty, still doesn't work and does not return post results that I know are listed.

Any Ideas Please BA?

The following is what I have in my vB4.0.3


PHP Code:

<tr>
<
vb:if condition="$threadinfo['threadid'] == 'XXXX'">
<
td align="$stylevar[left]valign="top" width="50%">
<
fieldset class="fieldset" style="margin:0px">
<
legend><b><font size="3">Search</font> <font size="2"></b></legend>
<
table cellpadding="0" cellspacing="$stylevar[formspacer]border="0">
<
tr>
<
td colspan="2">
<
tr>
<
form action="search.php?do=process&searchthreadid=XXXX" method="post">
<
table cellpadding="4" cellspacing="1" border="0">
<
tr>
<
td class=""><b><font size="2">Please enter a search word:</font></b><a name="goto_threadsearch"></a></td>
</
tr>
<
tr>
<
td align="left">
<
input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<
input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<
input type="hidden" name="do" value="process" />
<
input type="hidden" name="searchthreadid" value="$threadinfo['threadid']}'" />
<
font size="3"><b>Find:</b></font> <input type="text" class="bginput" name="query" size="25" />&nbsp<input type="image" src="http://www.myforumaddress.com/images/sample.gif" alt="Search ."><br/>
</
td>
</
tr>
</
table>
</
form>
</
select></label>
</
tr>
</
fieldset></vb:if>
<
br /> 

I have also tried the following too:

PHP Code:

<input type="hidden" name="searchthreadid" value="$threadinfo['threadid']}'XXXX" /> 

PHP Code:

<input type="hidden" name="searchthreadid" value="$threadinfo['threadid']}'XXXX'" /> 

PHP Code:

<input type="hidden" name="searchthreadid" value="$threadinfo['threadid']} == 'XXXX" /> 


Where XXXX is the threadID.

vilhiem 05-28-2010 10:59 PM

Three outstanding questions:

(1) Is there any way to remove some of the "options" available on the main Forms page? For instance, for Registered Users, I would like to remove "Export Form Results", "Form Results", etc. .. and just leave "Form Results Table" ...?

(2) How do you calculate ...? For instance, here are the questions:
>>> (a) Stock Purchase Price?
>>> (b) Stock Sale Price?
>>> (c) Percentage Difference (calculated)

(3) How do I change the web page title, from "Forms" to something different?

Thanks & Great Mod!

vilhiem 05-29-2010 04:11 AM

anyone ...?

promoprompt 05-29-2010 11:22 AM

Quote:

Originally Posted by promoprompt (Post 2044204)
Hello,

I would like to use EasyForms in different ways.
One case to use EasyForms as Inputform for Blog and CMS-Articles.

Is there any possibility to do so?

I'm sorry I am a newbie in VB.

Is anybody there to help in this?

best regards
promoprompt

Any Hint for me?

Thanks

sean-zigster 05-30-2010 05:55 AM

As you can see from the pictures we are using ours like a database. Is there anyway we can add lines to the rows to make them stand out a little more and also make the fields sort alphabetically ?

I am also having trouble with permissions as i have to allow everyone to edit everyones entries as the edit personal entries does not work

https://vborg.vbsupport.ru/external/2010/05/7.png

Thanks

Cedric_FP 05-30-2010 06:20 AM

Could you post the hooks to have a new thread go through the "build new post" function rather than the data manager directly?

promoprompt 05-30-2010 07:39 AM

Quote:

Originally Posted by Cedric_FP (Post 2045382)
Could you post the hooks to have a new thread go through the "build new post" function rather than the data manager directly?

Who is ment?

If me, I dont know what Hooks realy is or do.

Do you have any excamples to me?

greets promoprompt

Cedric_FP 05-30-2010 08:24 AM

promopromt - I mean the developer of this modification :)

riskofficer 06-01-2010 08:54 AM

bug -- users can't edit their own entries

when they choose "edit" -- mod bringing them to edit page, but then, they can't save -- error about missing permissions

in admin panel option that let users to edit their own entries is turned on

Veer 06-01-2010 03:06 PM

Form Description text is always BOLD, Please fix it.

Largo .//npc 06-01-2010 04:04 PM

Question about Hooks.
In vB3.8, I modded Easy Forms to insert some data into a new table which I used for a recruitment process. I can use hooks to do the same thing without editing the code I believe, but is it possible for me to pass the results of question 1 and 6 for example.

riskofficer 06-02-2010 04:00 AM

Quote:

Originally Posted by bananalive (Post 2038507)
To fix date issue, upgrade to v4.1.2, then add the following to Form Hook: Form Start:
PHP Code:

$usealtdate true


when editing form result, in date field in year cell -- entrie like "2010" is fine, but years 2009, 2008 are shown as "209, 208"

in excel export everything fine

vilhiem 06-02-2010 04:01 PM

How can I change the "Title" on a Thread or Posting if I have the results sent there ...?

Thanks!!!!

sweetguy2004 06-02-2010 04:22 PM

very interesting i will sure install this thanks for your efforts :)

Bobbo 06-02-2010 08:02 PM

What would be an easy way to display custom variable data in a form email body. For example, I have a form, the user fills it out and clicks submit. The contents of that form get emailed to someone else. Now, in the Before Submit hook, I have some logic that sets a variable based on how the user filled out the form. I'd like the contents of that variable to be displayed in the body of the email.

The variable is completely custom and based on data returning from a SQL dB lookup.

Any ideas? Geesh, I love this mod. It offers so much flexibility!

********
Figured this out. I simply appended my information to $formoutput, ie, $formoutput .= "My variable: " .$row[variable];
This works fine. I would think there is a way to make it a template variable so I could then use something like {my_variable}, but suspect it might take a lot more work.
********

Bobbo

rtrm 06-04-2010 08:11 PM

This is a great mod, thanks very much for all your hard work on it.

I have a small issue. When including an entered value for thread title, I can't include the value of the first field. On another form the values of the 2nd and 3rd field are included as {q_3} and {q_4}, so I figured I should use {q_0}, but that isn't recognized and the code is displayed. I tried {q_1}, but that produces nothing.

vilhiem 06-04-2010 08:25 PM

is there any way to do CALCULATIONS on the fields so when it's appended to the table, a number is generated in a field based on the values entered in other fields ...?

Reycer 06-05-2010 12:20 AM

This is one awesome mod...I've been using it since it's debut quite a while back.

Question: I have a situation to where I need to have files to be uploaded. So I direct the form to post into a forum. Problem is, I don't want that particular forum to be seen be anyone but myself, so I set the forum permissions so that only I can see it. This creates a problem with the attachments, it will not allow users to then upload attachments, when that forum is hidden. I can go in and make it so that they can make posts in in, but it is still hidden, and I can turn on that they can upload attachments, but if they can't view the forum, then they can't upload attachments in the form.

I have considered making this forum an "Admin Only" forum, and making so they can't get into it, but I would just rather have it not seen at all. Anyway to make this work?

HolyKiller 06-06-2010 11:53 PM

Quote:

Originally Posted by rtrm (Post 2048415)
This is a great mod, thanks very much for all your hard work on it.

I have a small issue. When including an entered value for thread title, I can't include the value of the first field. On another form the values of the 2nd and 3rd field are included as {q_3} and {q_4}, so I figured I should use {q_0}, but that isn't recognized and the code is displayed. I tried {q_1}, but that produces nothing.

You need to use unique ID of that question, not his "position" in that specific form. So if you have question like this:

1. Favorite color _______ (Single Line Text Field) #44 ______ 10

Simply use {q_44} for thread title :)

rtrm 06-07-2010 06:05 AM

Quote:

Originally Posted by HolyKiller (Post 2049647)
You need to use unique ID of that question, not his "position" in that specific form. So if you have question like this:

1. Favorite color _______ (Single Line Text Field) #44 ______ 10

Simply use {q_44} for thread title :)

Ah! Obvious really. Thanks very much.

Cedric_FP 06-07-2010 07:30 AM

Using the following code:

Code:

$forumid2 = 31;
if ($complete)
    {
        if (!$vbulletin->userinfo['userid'])
        {
            $vbulletin->input->clean_array_gpc('p', array(
                'humanverify' => TYPE_ARRAY,
            ));
            $newpost['humanverify'] = $vbulletin->GPC['humanverify'];
        }
        require_once(DIR . '/includes/functions_editor.php');
        require_once(DIR . '/includes/functions_bigthree.php');
        require_once('./includes/class_dm.php');
        require_once('./includes/class_dm_threadpost.php');
        require_once('./includes/functions_databuild.php');
        if (!$closed)
        {
            $open = 1;
        }
        else
        {
            $open = 0;
        }
        $threaddm = new vB_DataManager_Thread_FirstPost($vbulletin, ERRTYPE_STANDARD);
        /*$foruminfo = fetch_foruminfo($forumid);*/
        $threaddm->set_info('forum',$foruminfo);
        $threaddm->set_info('user', $vbulletin->userinfo);
        $threaddm->set('forumid', $forumid2);
        $threaddm->set('userid', $vbulletin->userinfo['userid']);
        $threaddm->set('title', $threadtitle);
        $threaddm->set('pagetext', $formoutput);
        $allow_smilie = '1';
        $visible = '1';
        $threaddm->set('open', $open);
        if ($form[prefixid])
        {
            $threaddm->set('prefixid', $form[prefixid]);
        }
        if ($form[iconid])
        {
            $threaddm->set('iconid', $iconid);
        }
        $threaddm->set('allowsmilie', $allow_smilie);
        $threaddm->set('visible', $visible);
        $threaddm->pre_save();
        $threadid = $threaddm->save();
        unset($threaddm);
        build_thread_counters($threadid);
        build_forum_counters($forumid); 
        if (!empty($threaddm->errors))
        {
            $errorss .= $threaddm->errors;
            $errormessage = "Form failed to submit. The following error(s) occured: <br /> ".$errorss;
            eval(standard_error($errormessage));
        }
        $threadinfo = fetch_threadinfo($threadid);
        $newpost['postid'] = $threadinfo['firstpostid'];
        mark_thread_read($threadinfo, $foruminfo, $vbulletin->userinfo['userid'], TIMENOW);
        /*($hook = vBulletinHook::fetch_hook('newthread_post_complete')) ? eval($hook) : false;*/
        if ($form[poll] == 1)
        {
            $question = $form[pollquestion];
            $threadinfo = verify_id('thread', $threadid, 0, 1);
            $polloptions = count($polloption);
            $vbulletin->GPC['options'] = $polloption;
            $counter = 0;
            $optioncount = 0;
            $badoption = '';
            while ($counter++ < $polloptions)
            {
                if ($vbulletin->options['maxpolllength'] AND vbstrlen($vbulletin->GPC['options']["$counter"]) > $vbulletin->options['maxpolllength'])
                {
                    $badoption .= iif($badoption, ', ') . $counter;
                }
                if (!empty($vbulletin->GPC['options']["$counter"]))
                {
                    $optioncount++;
                }
            }
            $poll = datamanager_init('Poll', $vbulletin, ERRTYPE_STANDARD);
            $counter = 0;
            while ($counter++ < $polloptions)
            {
                if ($vbulletin->GPC['options']["$counter"] != '')
                {
                    $poll->set_option($vbulletin->GPC['options']["$counter"]);
                }
            }
            $poll->set('question', $question);
            $poll->set('dateline', TIMENOW);
            $poll->set('active', '1');
            $poll->set('public', $form['publicpoll']);
            $poll->set('multiple', $form['multiplepoll']);
            $pollid = $poll->save();
            $threadman = datamanager_init('Thread', $vbulletin, ERRTYPE_STANDARD, 'threadpost');
            $threadman->set_existing($threadinfo);
            $threadman->set('pollid', $pollid);
            $threadman->save();
        }
        if ($form[submitmessage])
        {
            $errormessage = $form[submitmessage];
        }
        else
        {
            $errormessage = "Form was submitted successfully. Click <a href=\"showthread.php?" . $vbulletin->session->vars['sessionurl'] . "p=" . $newpost[postid] . "#post" . $newpost[postid] . "\">here</a> to view the thread.";
        }
    }

How would I also create replies to the thread created? The replies don't have to contain form data, they are just standard replies such as "Reserved".

Thanks.

bananalive 06-08-2010 02:03 PM

Quote:

Originally Posted by vilhiem (Post 2048426)
is there any way to do CALCULATIONS on the fields so when it's appended to the table, a number is generated in a field based on the values entered in other fields ...?

Form Hook: Before Submit:
PHP Code:

$qo[4] = $qo[4]+1;
$q[4] = $q[4]+1

4 is the question hash

bananalive 06-08-2010 02:26 PM

1 Attachment(s)
Quote:

Originally Posted by riskofficer (Post 2046878)
when editing form result, in date field in year cell -- entrie like "2010" is fine, but years 2009, 2008 are shown as "209, 208"

in excel export everything fine

Fixed in attached file

bananalive 06-08-2010 02:35 PM

Quote:

Originally Posted by Cedric_FP (Post 2045382)
Could you post the hooks to have a new thread go through the "build new post" function rather than the data manager directly?

Why? build_new_post() function is just an easy way to access the datamanagers but in this mod it is advantageous not to have extra permissions checked

build_new_post() is used for new threads atm.

jdj 06-08-2010 02:38 PM

Apologies if the answer to this is on this thread already.

Can this mod be used to allow users to subscribe to a forum as a condition of their entry to it? E.g. if you want to collect user address details upon registration to your site? Or perhaps if you wish to allow them to register on the site as registered users using the default details then ask them for more details to subscribe to a particular forum within your site...... if for example you have a group that wants a mailing database but you don't need it on the entire site? Or perhaps if you simply wanted them to provide a registration number to gain access to a particular forum?

JJ

bananalive 06-08-2010 02:39 PM

1 Attachment(s)
Quote:

Originally Posted by sean-zigster (Post 2045376)
As you can see from the pictures we are using ours like a database. Is there anyway we can add lines to the rows to make them stand out a little more and also make the fields sort alphabetically ?

I am also having trouble with permissions as i have to allow everyone to edit everyones entries as the edit personal entries does not work

http://i44.photobucket.com/albums/f1...30at075155.png

Thanks

Fixed in attached file

bananalive 06-08-2010 02:40 PM

Quote:

Originally Posted by promoprompt (Post 2045390)
Who is ment?

If me, I dont know what Hooks realy is or do.

Do you have any excamples to me?

greets promoprompt

hooks, are similar to vbulletin plugins, allow php to be inserted at certain points in the code

bananalive 06-08-2010 02:41 PM

Quote:

Originally Posted by Veer (Post 2046549)
Form Description text is always BOLD, Please fix it.

that will be the css styling

bananalive 06-08-2010 02:46 PM

Quote:

Originally Posted by Tiryaki (Post 2043430)
Hello,

I've downloaded, installed this addon and created a test form, but I don't now how to open the form automatically in a forum by clicking on the "New Thread" Button.

what must be done?

Thanks in advance.
-Tiryaki

Create plugin with vBulletin Hook Location: newthread_form_complete with the following php code:
PHP Code:

if (in_array($forumid, array(1,2,3)))

header'Location: http://www.your-site.com/forum/misc.php?do=form&fid=1' ) ; 


Change 1,2,3 for appropriate threadids.

bananalive 06-08-2010 03:08 PM

Quote:

Originally Posted by harleyparts (Post 2043368)
OK i made this form but i want it to calculate the answers and rate them
its all in fun and not important , but by golly i want it :)

I have added the form so those who know something can look it over.
works fine except for the vbif and or but stuff

its a test and its basically 1 of 2 choice's but i want to average the score and based on that score i want it to rate the test

so score of 20 7 or highest and the score of 20 1 or lowest answers is lowest

and maybe a middle then i would like it to say in the final results the score that was calculated :D

any help would be really appreciated ..rofl

Form Hook: Before Submit:
PHP Code:

$disabled_updateuserids true;  
$closed=true;
$count 0;
foreach (
$q AS $a => $b)
{
 if (
$a && is_numeric($b) && $b 0)
 {
  
$average += $b;
  
$count++;
 }
}
if (
$count != 0)
{
$q['average'] = $average/$count;
if (
$q['average']>5)
{
$formoutput "you are hillbilly average 5+";
}
else
{
$formoutput "you are not hillbilly average 5-";
}



rfsforums 06-08-2010 04:48 PM

I want to create a membership renewal form. Basically, all our users have the same primary user group (registered users, id:2) but most have joined 1 or more secondary "additional" groups. Each year they have to re-new their membership and I think we can use your forms mod to make this task much easier.
When the user goes to the form, I would like to have a renewal clause that they must accept as well as have each of their additional usergroups displayed (these are the 2010 year groups) with a check box so if they don't want to renew they can just uncheck that particular additional usergroup and on form submission that additional usergroup would get dropped from their account. I would also like to, upon submission, move the user from the checked groups (2010) to a pre-defined 2011 version of the particular group.

Example user4 bob is a member of the following secondary groups:
_ Clause > must be checked to proceed
_ 2010 Hunting group (id:18) > if checked, upon submission move to 2011 Hunting group (id:30)
_2010 Fishing group (id: 27)> if checked, upon submission move to 2011 Fishing Group (id:40)

Bananalive - any suggestions on how to go about this? Thanks!

riskofficer 06-09-2010 11:05 AM

Quote:

Originally Posted by riskofficer (Post 2043218)
Thank you, but this patch does not work, everything are messed up in export after apply.

Quote:

Originally Posted by bananalive (Post 2050481)
Fixed in attached file

This patch contains error from previous patch, when Excel export doesnt work. (as you remember you removed &quote; tags from Excel export, but this crashes all table layout it export).

bananalive 06-09-2010 11:45 AM

1 Attachment(s)
Quote:

Originally Posted by riskofficer (Post 2050941)
This patch contains error from previous patch, when Excel export doesnt work. (as you remember you removed &quote; tags from Excel export, but this crashes all table layout it export).

ok, try this version


All times are GMT. The time now is 04:06 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.02665 seconds
  • Memory Usage 1,914KB
  • 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
  • (2)bbcode_code_printable
  • (9)bbcode_php_printable
  • (18)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