vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   FORM to THREAD/ FORUM/ POLL/ PM/ EMAIL - CUSTOMIZABLE FORMS - Mod Apps, Orders, News. (https://vborg.vbsupport.ru/showthread.php?t=66082)

RMS-Chef 09-04-2004 03:43 AM

Anyone know if it would be possible to add something like a drop down menu that could list of admin defined forums in which the form would be submitted as a new thread?

I am helping a friend with writing style forum so he has many categories/forums to submit writing. Rather than creating 20 forms that are identical other than the forum they would be submitting to, it would be great to have one form with the user defining which forum to send it to as a new thread.

RMS-Chef 09-04-2004 12:50 PM

Quote:

Originally Posted by oldford
OK, finally got this to work. Here's the code if you want to have the "New Thread" button redirect to different forms for different forums. Don't forget to end with the correct number of </if> end tags to close out the code.

HTML Code:

<a href="<if condition="$foruminfo['forumid'] == 123">form123.php<else /><if condition="$foruminfo['forumid'] == 456">form456.php<else />newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]</if></if>">
PKRWUD, it looks like the <elseif> code isn't supported by VB so you need to nest <if> instead. At least according to the manual:
http://www.vbulletin.com/docs/html/m...e_conditionals

This works great.
I am not sure if anyone else would do it this way but I have a lot of different forms and instead of typing the name of each form file name such as:
Code:

<if condition="$foruminfo['forumid'] == 123">form123.php<else />
I instead am using:
Code:

<if condition="$foruminfo['forumid'] == 123">form$foruminfo[forumid].php<else />
Means one less thing to edit when nesting a bunch of these if/else.

This brings me to another question, would it be possible to just have one if statement and use an array of some sort like:
Code:

<if condition="$foruminfo['forumid'] == 123,124,125,126">form$foruminfo[forumid].php<else />
I know this does not work but could it be done? I am a complete code newb so I wouldn't have the first clue if it's possible or what's involved but that would cut down on huge nesting.

AmbitiousLemon 09-05-2004 12:10 AM

Erwin I would also like to add my vote for allowing attachments in the form should it be used to create a new thread. You mentioned earlier that this might be hard while simply uploading an image to the db wouldn't be as hard. Could you give us some example code on how to allow someone to uplaod to db and then show the template mod that would be needed to display that image in the thread?

I like a previous poster am trying to use this for a classifieds section.

PcGamer 09-05-2004 05:56 PM

Nice modification. I have it working well on my site :)

I use my forms to just send an email to my address. Is it possible for it to send to multiple addresses? If so how?


Thanks!

Abe1 09-05-2004 07:05 PM

Quote:

Originally Posted by PcGamer
Nice modification. I have it working well on my site :)

I use my forms to just send an email to my address. Is it possible for it to send to multiple addresses? If so how?


Thanks!

Sure,

Look for this:
PHP Code:

    vbmail($formemailaddress$formtitle$formsend); 

copy this line over and over for as many email addreess you want the email going to. Change
PHP Code:

$formemailaddress 

to a different email on each line.




Anyone figured out yet how to make a thread made by these forms search able?

y2krazy 09-06-2004 01:57 AM

Quote:

Originally Posted by y2krazy
Is there a way to make a form that is created to be required by any new registration before they can do anything else? Such as a form that posts an introduction thread in a specified forum when someone registers, and it will be a requirement before said new member can do anything on the entire forum(almost like a "second" registration page). Maybe a re-direct once the registration goes through or something to the form before anything else can take place. Let me know if this can be done, or is even possible. Thanks!

No one has any idea how this can be done? Would be great if someone could help me out... :)

Abe1 09-08-2004 05:18 PM

Quote:

Originally Posted by Abe1
Thanks for the hack. I made 14 forms for my site. All leading to new threads.

I got 2 problems now. One, the posts don't count. Two, the posts don't get searched.

I fixed number one by my self.

find:
PHP Code:

$forum[forumid] = $formforumid

add before:
PHP Code:

                $DB_site->query("
                                UPDATE " 
TABLE_PREFIX "user
                                SET posts = posts + 1
                                WHERE userid = 
$bbuserinfo[userid]
                        "
); 

find:
PHP Code:

$forum[forumid] = $formreplyforumid

add before:
PHP Code:

                $DB_site->query("
                                UPDATE " 
TABLE_PREFIX "user
                                SET posts = posts + 1
                                WHERE userid = 
$bbuserinfo[userid]
                        "
); 

For the search problem, I couldn't come up with anything yet. Maybe someone else can.

I Just fixed a MAJOR bug in this. If you used this, you MUST fix and run 'update user post count' in you acp. ALL users post count were going up evey time one person would use the form.

Michael2 09-11-2004 02:24 PM

This is a long thread so I'm sorry if these questions have been asked, I skimmed through it but didn't see the answers...

What would I need to do to get the thread title to be the answer from the first question? I'm using it for recipes, the first question is the recipe name, I want that to be the thread title.

Is there any way to use BB code? When I try putting it in the formanswers template I get an error when trying to save it. I want the questions to be in bold so that they stand out from the answers.

This is an awesome hack, thanks!

dndog 09-11-2004 03:35 PM

Quote:

Originally Posted by Erwin
Replace:

HTML Code:

<A HREF="$answer1">$answer2</a>
With:

The [url ] bbtag:

HTML Code:

[url="$answer1" ] $answer2 [/url ]
Remove the space in the url tags, but keep the space around $answer2.

I tried doing that, but the url came out like this:

http://&quot/;www.yahoo.com&quot;

Please let me know what I Can do to fix this...

wrongful 09-12-2004 01:26 PM

Does anyone have any idea how I can add a flood check to this?


All times are GMT. The time now is 12:38 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.01490 seconds
  • Memory Usage 1,765KB
  • 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_code_printable
  • (3)bbcode_html_printable
  • (6)bbcode_php_printable
  • (5)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
  • (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