vb.org Archive

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

nascartr 02-02-2009 02:14 PM

Quote:

Originally Posted by bananalive (Post 1731718)
Create yesno option

Form Hook: Before Submit:
PHP Code:

if ($qo_{54} == $vbphrase[yes] && $complete && $vbulletin->userinfo['email'])
{
$formoutput preg_replace('/(\[(.*?)\])/is'''$formoutput);
vbmail($vbulletin->userinfo['email'], $threadtitle$formoutput);



Ok, I entered the code as you posted but it didn't work so I changed the "54" to the actual # of the question. That works, it will email the votes to the users email however the layout is badly messed up. There is no formatting after it submits...everything is on one line.

Quote:

RaceWeek THUNDER EZ Form

Pole Sitter -----Pole Sitter----- Wreckers -----Wreckers----- Checkers -----Checkers----- Dominator -----Dominator----- Underachiever -----Underachiever----- Wildcard -----Wildcard----- Email Confirmation? Yes
This is before...

Quote:

RaceWeek THUNDER EZ Form

Pole Sitter
24-Jeff Gordon
Wreckers
77-Sam Hornish
Checkers
14-Tony Stewart
Dominator
88-Dale Earnhardt Jr
Underachiever
55-Michael Waltrip
Wildcard
20-Joey Logano


bananalive 02-02-2009 02:17 PM

Quote:

Originally Posted by nascartr (Post 1731936)
That works, it will email the votes to the users email however the layout is badly messed up. There is no formatting after it submits...everything is on one line.

add \r\n at end of the question bbcode, answer bbcode and section bbcode

nascartr 02-02-2009 02:22 PM

Quote:

Originally Posted by bananalive (Post 1731937)
add \r\n at end of the question bbcode, answer bbcode and section bbcode

That works a little better. Still not like before but at least everything's not on one line.

Quote:

RaceWeek THUNDER EZ Form

Email Confirmation?
Yes
Pole Sitter
-----Pole Sitter-----
Wreckers
-----Wreckers-----
Checkers
-----Checkers-----
Dominator
-----Dominator-----
Underachiever
-----Underachiever-----
Wildcard
-----Wildcard-----

lazyseller 02-02-2009 02:25 PM

Made a donation for you help bananna. Thanks so much.

I was able to get it to work!

nascartr 02-02-2009 02:45 PM

Ok, what if I had the option to PM confirmation to user instead of emailing it. How would I get it to do that and still submit to the threadid?

vBulletin's mail system must not allow formatting, but maybe the PM system would?

Simon Lloyd 02-02-2009 03:03 PM

Quote:

Originally Posted by nascartr (Post 1731984)
Ok, what if I had the option to PM confirmation to user instead of emailing it. How would I get it to do that and still submit to the threadid?

vBulletin's mail system must not allow formatting, but maybe the PM system would?

It can be custom formatted in the custom output, here's mine:
Quote:

[CENTre][SIez=5][COLOR=black]Top Tip[/COLro][/SIze][/CENTre]
[FOtn=Arial Black][SIez=3][Uu]Submitted By:[/Uu] [/SIez][/FOtn][Ii]{q_14} [/Ii]
[Bb][Uu][FOtn=Arial Black][SIez=3]Date: [/SIez][/FOtn][/Uu] [/Bb][Ii]{q_16} [/Ii]
[Uu][FOtn=Arial Black][SIez=3]Tip Description[/SIez][/FOtn][/Uu]

[Ii]{q_10} [/Ii]
[Uu][FOtn=Arial Black][SIez=3]Posted Top Tip[/SIez][/FOtn][/Uu]
[bbcode][Ii]{q_12}[/Ii][/bbcode]
all bbcode changed so they dont parse here!

alduren 02-02-2009 03:09 PM

Quote:

Originally Posted by bananalive (Post 1731718)

Form Hook: Before Submit:
PHP Code:

$formoutput str_replace(""""$formoutput); 


Thanks for your support!!!, it works perfect.

Sc00by22 02-02-2009 05:37 PM

Could you add custom user groups into the selection?

bananalive 02-02-2009 05:38 PM

Quote:

Originally Posted by nascartr (Post 1731984)
Ok, what if I had the option to PM confirmation to user instead of emailing it. How would I get it to do that and still submit to the threadid?

vBulletin's mail system must not allow formatting, but maybe the PM system would?

The PM system allows BBcode

PHP Code:

if ($vbulletin->userinfo['userid'] AND $complete
    {
        global 
$vbulletin$botpermissions;
        
$fromuserid $vbulletin->userinfo['userid'];
        
$fromusername $vbulletin->userinfo['username'];
        
$title $threadtitle
        
$recipients $vbulletin->userinfo['username'];
        
$message $formoutput;
        
$pmdm =& datamanager_init('PM'$vbulletinERRTYPE_ARRAY);
        
$pmdm->set('fromuserid'$fromuserid);
        
$pmdm->set('fromusername'$fromusername);
        
$pmdm->set('title'$title);
        
$pmdm->set('message'$message);
        
$pmdm->set_recipients($recipients$botpermissions);
        
$pmdm->set('dateline'TIMENOW); 
        
$pmdm->overridequota true;
        
$errors $pmdm->errors;
        if (
$errors) {
            foreach (
$errors as $error)
            {
                
$errorss .= $error"<br />";
            }
            
$errormessage "Form failed to submit. The following error(s) occured: <br /> ".$errorss;
            eval(
'print_output("' fetch_template('STANDARD_ERROR') . '");');
        }
        
$pmdm->save();
        unset(
$pmdm);
    } 

Quote:

Originally Posted by alduren (Post 1732008)
Thanks for your support!!!, it works perfect.

I'm not sure if you worked it out but there were meant to be [img] tags in the str_replace but they got removed
Quote:

Originally Posted by Sc00by22 (Post 1732148)
Could you add custom user groups into the selection?

Whereabouts? For the questions?

brainfood 02-02-2009 06:42 PM

Thanks bananalive for the quick response on my other questions. I have that working now.

I have another question. When customizing the Custom Form Output:, I noticed that the customized output only applies to newly created thread posts. Is it possible to get the previous posts updated so they incorporated the customized Custom Form Output?

Thanks again!


All times are GMT. The time now is 05:40 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.03701 seconds
  • Memory Usage 1,772KB
  • 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
  • (3)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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