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)

proxyMX 07-12-2003 05:50 AM

what id like to see is how to implement a listbox instead of radios

Talisman 07-12-2003 06:04 AM

Yes, me too!

Erwin, one of these day you're going to feel really ambitious. When that happens, please tell us what coded bits we need to collect from different places so we can set up drop down boxes to display a selection of items that already exist elsewhere.

I'd like to have a drop down box for these things already...

1 - A forum list for people to select the existing forum they want on the moderator application form.

2 - Which country they represent when they register for a tournament (that drop down selection already exists in the country flag hack - but I can't figure out what to use/or how).

3 - Which registered member a person wants to nominate for an award (or something).

4 - Which time zone a player lives in to schedule competition times or a live chat session.

There's more...... but you get the idea. ;)

Oh, one more thing -- how do I make this so the submitted form is emailed or PM'd to multiple addresses/members?

Talisman 07-12-2003 04:51 PM

Hi again,

I don't know if this will help or further confuse anyone trying to customize your own form, but I've got an example of a custom moderator app I made using this hack. You can look at a screenshot of the displays and look at how I customized Erwin's php file and templates.

This is really a combination of two hacks. I expanded on the content found in Lesane's Moderator Application + Rating Hack, but I didn't want the ACP rating system he used and didn't need special database tables. So, basically, I used Erwin's "form" hack to create the same thing. Then we post the form (as a new thread) to a private staff-only forum for review. This lets us post comments in the same thread and then set up a poll to rate the moderator candidate (1 through 5) the way Lesane did in the ACP.

The main thing here is you can see how it looks on the screen, then check the php file and the templates to see how I got it to look that way.

The attached zip contains the php file and templates I'm using, and I'll post a couple of screenshots, to follow.

Please Note - I left the graphics we use in the screenshots to show how you can do this, too, but please don't use them -- I don't own those and they are not public domain graphics. You can make your own if you have that talent, or just get a "person/cartoon with a mirror" and a "person/cartoon with a magnifying glass" image from some clipart library to make something like this for your forum.

Talisman 07-12-2003 04:53 PM

VCup Moderator Application Form (top portion)

Talisman 07-12-2003 04:54 PM

VCup Moderator Application Form (bottom portion)

Talisman 07-12-2003 04:55 PM

VCup Moderator Application Form (Thanks/Confirmation)

Talisman 07-12-2003 04:56 PM

VCup Moderator Application Form (Forum Post)

retsell 07-12-2003 08:59 PM

Quote:

Today at 07:01 AM Erwin said this in Post #158
It's an undefined function error - the gettemplate function could not be found. Makes no sense.

Also, there is no point reposting the whole PHP file out like that for unlicensed users to copy and use. They can't see [php] tag code, but you reposted the whole file in normal text. What was the point of that?

Anyway, like I said, reinstall the hack following the instructions exactly.


I appoligize for posting it, I assumed that it would hide all the code. The reason I posted it was because in other forums (like gentoo) people always ask for it to verify that there were no mistakes.

Anyhow, I've tried removing the templates and the form file and redoing all of them, but still no luck.

What I did find is that if you are not logged in you get this message:

Fatal error: Call to undefined function: show_nopermission() in /home2/cms/public_html/forums/form1.php on line 23

but if I am logged in as administrator:

Fatal error: Call to undefined function: gettemplate() in /home2/cms/public_html/forums/form1.php on line 214

This help any?

I can post screen shots of anything that might help someone find the problem.

Erwin 07-13-2003 12:12 AM

Great job Talisman! :)

I will not be developing any of my vB2 hacks since vB3 is out, and I'm running vB3 on my private forums already.

@ restsell - I still don't get why you are getting the function errors. It makes no sense to me - the only explanation is that the form file is not able to call your forum global.php or functions.php and not getting the functions.

retsell 07-13-2003 03:29 PM

Quote:

Today at 02:12 AM Erwin said this in Post #169
Great job Talisman! :)

I will not be developing any of my vB2 hacks since vB3 is out, and I'm running vB3 on my private forums already.

@ restsell - I still don't get why you are getting the function errors. It makes no sense to me - the only explanation is that the form file is not able to call your forum global.php or functions.php and not getting the functions.


Any reson why? permissions?

Is anyone using this with beta 4? could that be the problem?

retsell 07-13-2003 03:32 PM

Quote:

Today at 02:12 AM Erwin said this in Post #169
Great job Talisman! :)

I will not be developing any of my vB2 hacks since vB3 is out, and I'm running vB3 on my private forums already.

@ restsell - I still don't get why you are getting the function errors. It makes no sense to me - the only explanation is that the form file is not able to call your forum global.php or functions.php and not getting the functions.


I just realized it said for 2.3 on the top, has anyone gotten this to work on 3.0?

Erwin: If this is not for 3.0 do you plan on releasing a ver that will?

Erwin 07-13-2003 11:34 PM

99% of vB2 hacks will not work for vB3 - different code, different functions, different variables.

retsell 07-16-2003 03:55 AM

Is there any way to add the attachments option to a form so it attaches the files with the post?

corsacrazy 07-21-2003 07:48 AM

on my forums there are 2 admins ! so to allow the form to be emailed and pmed to both of us do i just add a comma then the other user id and the other email ad?

Erwin 07-21-2003 08:13 AM

No, you cannot just add a comma. Just duplicate the queries for both PM and email for the second admin.

corsacrazy 07-21-2003 08:39 AM

thanks erwin

romanticyao 08-27-2003 08:57 AM

I hope in the future version i could have multiple pages form :p instead of a long page.

PixelFx 08-28-2003 08:27 AM

:) great script :)

Aaron1 09-17-2003 06:14 AM

Hi Erwin, this hack could be great for my needs, but is there a workaround for the question that Marulatree asked?


Quote:

Originally Posted by Marulatree
If I add a button to the new thread template it will appear on all of the forums. I want the button to only appear for the one forum.

Because it would be great if i could simply replace the 'new thread' button with a special 'Submit news' button for a forum i specify...

Best regards!

/Aaron

Hobbes 09-19-2003 02:20 AM

i dont know if ur still lookin at this, BUuuttt

thanks for the help with the whole required posts thing...

and now , i bring another question :p!

is it possible to have the form posted in 2 different forums???

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. :)

Cyricx 10-15-2003 11:21 PM

Yeah it's not updating the threads post count =/

drives fast 11-10-2003 12:29 AM

I have messed with this thing and figured it out real good for what I am using it for right now

however....could somebody please help with adding the appropriate code into it to allow an attachment?

I want to use this for my classifieds area that I have concocted and the edits I made to newthread.php (adding in some post formatting) keep getting deleted by the poster and this form would be the perfect thing to stop them from changing the format.......but I need for them to be able to use the attachment part to add their item picture

rambling you say? whew

can anyone help with this? It is over my head...I have tried...no success

drives fast 11-11-2003 05:17 AM

I guess nobody checks these threads anymore

zsmom 11-26-2003 06:40 PM

OMG Erwin, this hack is awesome! Thank you thank you! I'm a newbie and got it working with no problems.
And Talisman, you rock for posting your mod app...thanks to you too!
And thank god that Proxy person apologized, I was getting irritated reading that crap.
I guess I'm just a thankful person this week. :p

Byll 01-17-2004 01:29 PM

I was just wondering if there is a way to show this form when a guest press "Want to register"?

Thx for help

h?kkiz 01-20-2004 08:15 PM

Erwin... you're a genius. Thanks a lot! :)

gearshifter47 01-25-2004 06:29 PM

Is there a way to edit this to make certain parts of the forum mandatory to answer... I notice if you just hit submit without filling anything out.. people could just spam you to death by sending blank forums lol....

Fargo 01-27-2004 04:47 PM

Erwin,

Ill have to second the thread post count bug. Ive got that problem as well :( Users post count does not increment as expected, nor does the reply count on the thread its posted to

Odd thing is - if I delete the post created by the form - it decreases the users' post count (as expected).

Im using vbulletin 2.3.4 case that matters.

Good job on the rest - she works like a charm!

bigwest 02-10-2004 09:05 PM

PERFECT!!!! This is just what I need!

I will install tonight! Thank you!

bigwest 02-11-2004 04:18 PM

Oh my gosh....

I installed this last night and I love it!!!!

Customization was easy (if you have ANY knowledge of HTML) :D

Thank you so much for this incredibly useful hack!


All times are GMT. The time now is 04:43 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.01538 seconds
  • Memory Usage 1,848KB
  • 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
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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