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)

PKRWUD 08-28-2004 03:17 AM

Quote:

Originally Posted by alqadir
can i send variables in the form.php. ie. if i made a link that said
<a href="form.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]">

Can I access the forumid variable inside the form.php?
Will the form.php call work?

I am essentially trying to override the newthread.php.

Thanks for all your help so far.


If you're asking me, I don't have a clue. Sorry.

SnowBot 08-28-2004 04:00 AM

Quote:

Originally Posted by PKRWUD
Add $navbar directly underneath $header in the Form template.

$navbar Is already there but i dont get the navbar when the forum is submitted and goes to the "Thank You Message"

I get the navbar when you are answering the questions but not once you submit and get redirected to the "thanks" message.

oldford 08-29-2004 03:36 AM

Quote:

Originally Posted by oldford
I'm talking about 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

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

dndog 08-29-2004 02:40 PM

Erwin,

I'm trying to make a form where someone can type the name of a website in $answer2 and then paste the link in $answer1 and it will link the word in the post. Here is my edited formanswers template:

PHP Code:

$formtitle
$bbuserinfo
[username]
Link to Site:

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

Here is what happens:
PHP Code:

Link to Site

&lt;A HREF=&quot;game name&quot;&gt;http://www.dndonlinegames.com&lt;/a&gt; 

How can I make this work? Thanks!

alqadir 08-30-2004 01:56 AM

I got it to work, now my form.php files overwrites my newthread.
What I did was in the forumdisplay file I redirected the newthread commnd to point to filesCommand.php and in the redirection sent the current forum number. In the filesCommand.php I created multiple global arrays which stored command forum families for thread posting. I then did a CASE compare to see which form.php file should be called. Along with the form.php call I also sent the forum number and a series of on/off commands which enable and disable certain questions. This allows me to have a few generic form.php which are customized during call.

The only draw back I have right now is changing the number and type of questions since an external file handles this, so all you really need is one form.php that can customize itself during call.
If anyone is interested in the alterations I have made email me. I have a word document which highlighted all my edits. I have not put my comments in yet, but when I do I will post a link.

Thanks for all you help guys.

PKRWUD 08-30-2004 01:52 PM

Quote:

Originally Posted by SnowBot
$navbar Is already there but i dont get the navbar when the forum is submitted and goes to the "Thank You Message"

I get the navbar when you are answering the questions but not once you submit and get redirected to the "thanks" message.


My bad, add $navbar directly underneath $header in the STANDARD_ERROR template.

:)

PKRWUD 08-30-2004 01:54 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


I am still very much a rookie at all this, but I can rebuild carburetors in my sleep. lol. Thanks for posting your findings!!!

Take care,
~Chris

PKRWUD 08-30-2004 01:59 PM

Erwin-
I have discovered one small problem. If there is an apostrophe in the thread title, I get a MySQL error.

Erwin 08-31-2004 03:14 AM

Quote:

Originally Posted by dndog
Erwin,

I'm trying to make a form where someone can type the name of a website in $answer2 and then paste the link in $answer1 and it will link the word in the post. Here is my edited formanswers template:

PHP Code:

$formtitle
$bbuserinfo
[username]
Link to Site:
 
<
A HREF="$answer1">$answer2</a

Here is what happens:
PHP Code:

Link to Site
 
&lt;A HREF=&quot;game name&quot;&gt;http://www.dndonlinegames.com&lt;/a&gt; 

How can I make this work? Thanks!

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.

Erwin 08-31-2004 03:16 AM

Quote:

Originally Posted by PKRWUD
Erwin-
I have discovered one small problem. If there is an apostrophe in the thread title, I get a MySQL error.

Just add a \ in FRONT of any apostrophes you want to use IN the quotation marks.


All times are GMT. The time now is 06:32 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.01431 seconds
  • Memory Usage 1,764KB
  • 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
  • (4)bbcode_html_printable
  • (4)bbcode_php_printable
  • (7)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