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)

Erwin 08-22-2004 11:41 PM

Quote:

Originally Posted by duncan99
I found out after the user submit the form, the redirection sends the user to the forum where the answer form will be there. In my case I set the answer form in the Admin forum which the user is not allow to have access. So how can I set the redirection to the forum I specify?

* duncan99 installed

You mean another forum? By default it php file redirects to the forum where the thread is made.

To specify an alternative forum -

Go down to near the end of the php file, replace $forum[forumid] in the $url line to the number of the user forum.

duncan99 08-23-2004 12:37 AM

Thank you, it works great.

oldford 08-23-2004 03:03 AM

Quote:

Originally Posted by PKRWUD
This is how I did it...

In Forumdisplay template, find:
Code:

<a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]">
And replace it with:
Code:

<a href="<if condition="$foruminfo['forumid'] == xx">form.php<else />newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]</if>">
Except you would sustitute your forum ID where it says xx. Works excellent.

Thanks for this. It works great. :)

Now can anyone tell me how that line should look if you want to have more than 1 forum? (example: forum A should use formA.php, forum B should use formB.php, etc.) Basically, how do you extend the "if condition" to work for more than 1 forumid?

Merjawy 08-23-2004 06:16 AM

Quote:

Originally Posted by oldford
Thanks for this. It works great. :)

Now can anyone tell me how that line should look if you want to have more than 1 forum? (example: forum A should use formA.php, forum B should use formB.php, etc.) Basically, how do you extend the "if condition" to work for more than 1 forumid?


https://vborg.vbsupport.ru/showpost....8&postcount=11

mOdEtWo 08-23-2004 12:19 PM

I try to make the form reply to a thread, and I know I have given the right options (enabled, forumid, threadid). When the form is submitted, I get a mysql error:

Code:

mysql error: Table 'forums.post' doesn't exist
mysql error number: 1146

Is there something wrong with the post sql code?

PHP Code:

                $DB_site->query("
                        INSERT INTO " 
TABLE_PREFIX "post
                                (threadid, title, username, userid, dateline, pagetext, allowsmilie,
                                 showsignature, iconid, visible)
                        VALUES
                                (
$thread[threadid], '".addslashes(htmlspecialchars($bbuserinfo[username])).$formtitle',
                                 '" 
addslashes($bbuserinfo['username']) . "', $bbuserinfo[userid], " TIMENOW ",
                                 '" 
addslashes($formsend) . "', 1, 1,
                                 0, 1)
                "
); 


oldford 08-23-2004 01:42 PM

Quote:

Originally Posted by Merjawy

I thought that was to insert one form result into two different forums at the same time? Maybe I'm wrong?

All I'm talking about is the redirect code when you click on "New Thread". I have different form.php files for each forum. I just need the redirect to understand that if it's forumid 123 then clicking on "New Thread" should redirect to form123.php. And if it's forumid 456 it should go to form456.php

PKRWUD 08-23-2004 04:59 PM

I'm very new to PHP, and I don't know that this is correct, but I believe this will work for you...

In Forumdisplay template, find:
Code:

<a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]">
And replace it with this:
Code:

<a href="<if condition="$foruminfo['forumid'] == xx">form.php<elseif condition="$foruminfo['forumid'] == yy">form2.php<elseif condition="$foruminfo['forumid'] == zz">form3.php<else />newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]</if>">
xx is the forum ID for form.php, yy is the forum ID for form2.php, and zz is the forum ID for form3.php.

Back up your template first, but I believe this will work for you. If it doesn't, change the closing </if> tag to </endif>.

oldford 08-23-2004 06:24 PM

Thanks, but I get a parse error. I tried both </if> and </endif>

PKRWUD 08-23-2004 06:53 PM

Damn. Well, I'm sorry, I really thought that would do it. I'll see what I can find out.

Isaiah33 08-23-2004 11:51 PM

a nice feature to this would be to be able to customize everything in admincp


All times are GMT. The time now is 11:27 PM.

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.01423 seconds
  • Memory Usage 1,754KB
  • 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
  • (1)bbcode_php_printable
  • (4)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