vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   FORM TO FORUM/ THREAD/ PM/ EMAIL - CUSTOMIZABLE FORMS for Mod Apps, Orders, News (https://vborg.vbsupport.ru/showthread.php?t=53269)

Erwin 09-19-2003 02:52 AM

Just replicate the code that inserts the form to the forum twice and change the forumid. :)

Hobbes 09-20-2003 12:48 AM

Code:

//FORUM TO POST NEW THREAD IN
$formforumid = "64";

so jus copy paste that and change 64 to the other forumid ?


EDIT- tried that...didnt work..

what to do, what to do :(!

Erwin 09-20-2003 05:58 AM

In form1.php -

Underneath:

PHP Code:

$formforumid "131"

Add:

PHP Code:

$formforumid2 "222"

Change "222" to the second forumid you want.

Then, find:

PHP Code:

    if ($formreply == "1") { 

ABOVE IT, add:

PHP Code:

    if ($formforum == "1") {
    
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($bbuserinfo[username])).$formtitle','".time()."','$formforumid2','1','0','".addslashes($bbuserinfo[username])."','$bbuserinfo[userid]','".addslashes($bbuserinfo[username])."','".time()."','$iconid','1','0')");
    
$formthreadid=$DB_site->insert_id();
    
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$formthreadid','".addslashes(htmlspecialchars($bbuserinfo[username])).$formtitle','".addslashes($bbuserinfo[username])."','$bbuserinfo[userid]','".time()."','".addslashes(parseurl($formsend))."','$allowsmilie','$signature','$ipaddress','$iconid','1')");
        if (
$lastposttitlehack == "1") {
        
$DB_site->query("UPDATE forum SET replycount=replycount+1,lastpost='".time()."',lastposter='".addslashes($bbuserinfo[username])."',lasttitle='".addslashes(htmlspecialchars($bbuserinfo[username])).$formtitle' WHERE forumid='$formforumid2'");
        } else {
        
$DB_site->query("UPDATE forum SET replycount=replycount+1,lastpost='".time()."',lastposter='".addslashes($bbuserinfo[username])."' WHERE forumid='$formforumid2'");
        }
    } 

Done. :)

Hobbes 09-20-2003 02:47 PM

bwhahaahaha SCORE!!!!!!!!

thanks Erwin ;) this is going to be teh useful :D

kreatiV 09-28-2003 06:38 AM

Hi Erwin,

first of all thanks for this great hack! I did as instruction and now when I look at the List of Threads in that forum it shows the new thread. How would I edit this so that only ANSWER ONE is displayed as the Post Titel?


[QUOTE=Erwin]The try this:

PHP Code:

'".addslashes(htmlspecialchars($answer1))." ".addslashes(htmlspecialchars($answer2))."' 

[QUOTE]

kreatiV 09-28-2003 06:46 AM

One more questions, is there a chance to use bbcodes directly in the form? I mean like hardcode bbcodes in there?

So the output is formated like I want it?

I also have a custom bbcode installed which uses a special tag <spoiler> </spoiler> any chance I can hardcode that into the form as well?

Best regards.

Cyricx 10-03-2003 12:32 AM

The answer I found for using bbcode is I added a "parse" line at the very end.

So let's say I used some smilies and bbcode in the $formpurpose

then I'd find
Quote:

eval("dooutput(\"".gettemplate("$formtemplate")."\ ");");
?>
And I'd add ABOVE that
Quote:

$formpurpose=bbcodeparse($formpurpose);

Cyricx 10-03-2003 12:47 AM

I've found one bug so far. I use this form for a TON of things right now and really love this hack man, kick ass job :)

Anyway, I recently made one to post to a thread. It posts correctly, bumps the thread like it has a new reply and everything. But for some reason the reply count for that thread stays at 0 heheh.

Nothing major just a slight quirk :)

Erwin 10-03-2003 02:16 AM

Quote:

Originally Posted by Cyricx
I've found one bug so far. I use this form for a TON of things right now and really love this hack man, kick ass job :)

Anyway, I recently made one to post to a thread. It posts correctly, bumps the thread like it has a new reply and everything. But for some reason the reply count for that thread stays at 0 heheh.

Nothing major just a slight quirk :)

Mmm... that's weird, because the reply count should go up. Is this a confirmed bug?

Cyricx 10-06-2003 05:49 PM

I'm posting two more forms today that post to threads. I'll see if it the problem replicates. Grabbed a fresh form from the zip and will let ya know. :)


All times are GMT. The time now is 10:58 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.04152 seconds
  • Memory Usage 1,762KB
  • 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
  • (1)bbcode_code_printable
  • (5)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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