 |
 |
 |
 |
#253602 - 07/12/03 11:53 PM
Re: Form for specific forum
[Re: BlarC]
|
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
|
It's nothing that I ever really "wrote up" as it's so customized it'd be tough to post it as a mod.... and it was nothing that I really wanted to "support". However, it is easy to do.<br /><br />Basically in the newpost.php & newreply.php script where it calls the .tmpl file - you add a clause so that if ($Board == "modifications") {<br />Then it calls a different template as well.<br />Like this:<br /> <br /> if ($Board == "modifications") {<br /> include("$thispath/templates/$tempstyle/newpostmod.tmpl");<br /> } else {<br /> include("$thispath/templates/$tempstyle/newpost.tmpl");<br /> }<br /><br /><br />Then in addpost.php - I had to add some code near the top. Since our modification posting page basically builds a formatted subject and body - you need to use some code to build the subject & body however you want.<br /><br />This is what I have near the top of the addpost.php file:<br /> <br />// ----- JoshPet's Mod Template START ---------<br /> $modname = get_input("modname","post");<br /> $moddesc = get_input("moddesc","post");<br /> $v60 = get_input("60","post");<br /> $v61 = get_input("61","post");<br /> $v62 = get_input("62","post");<br /> $v63 = get_input("63","post");<br /> $prerequisites = get_input("prerequisites","post");<br /> $author = get_input("author","post");<br /> $date = get_input("date","post");<br /> $credits = get_input("credits","post");<br /> $filesaltered = get_input("filesaltered","post");<br /> $databasealter = get_input("databasealter","post");<br /> $instructions = get_input("instructions","post");<br /> $status = get_input("status","post");<br /> $newfiles = get_input("newfiles","post");<br /> $modsubmit = get_input("modsubmit","post");<br /><br />if (($Board == "modifications") && ($modsubmit == "yes")) {<br /><br /> // --- Let's display the checked version numbers right --<br /> if (($v60) && (($v61) || ($v62) || ($v63))) {<br /> $version = $v60."-";<br /> } <br /><br /> if (($v61) && (($v62) || ($v63))) {<br /> $version .= $v61."-";<br /> } else {<br /> $version .= $v61;<br /> } <br /><br /> if (($v62) && ($v63)) {<br /> $version .= $v62."-";<br /> } else {<br /> $version .= $v62;<br /> }<br /> <br /> if ($v63) {<br /> $version .= $v63;<br /> }<br /> <br /> if (!$version) {<br /> $version = "$v60$v61$v62$v63";<br /> } <br /> <br /><br /> // --- Build Subject & Body ---------<br /> $Subject = "$status-[$version] $modname";<br /> $Body = "[b]Mod Name / Version:[/b] $modname \n\n";<br /> $Body .= "[b]Description:[/b] $moddesc \n\n";<br /> $Body .= "[b]Working Under:[/b] UBB.Threads $version \n\n";<br /> $Body .= "[b]Mod Status:[/b] $status \n\n";<br /> $Body .= "[b]Any pre-requisites:[/b] $prerequisites \n\n";<br /> $Body .= "[b]Author(s):[/b] $author \n\n";<br /> $Body .= "[b]Date:[/b] $date \n\n";<br /> $Body .= "[b]Credits:[/b] $credits \n\n";<br /> $Body .= "[b]Files Altered:[/b] $filesaltered \n\n";<br /> $Body .= "[b]New Files:[/b] $newfiles \n\n";<br /> $Body .= "[b]Database Altered:[/b] $databasealter \n\n";<br /> $Body .= "[b]Info/Instructions:[/b] $instructions \n\n";<br /> $Body .= "[i]Disclaimer: Please backup every file that you intend to modify. \n";<br /> $Body .= "If the modification modifies the database, it's a good idea to backup your database before doing so. \n\n";<br /> $Body .= "Note: If you modify your UBB.Threads code, you may be giving up your right for \"official\" support from Infopop.";<br /> $Body .= "If you need official support, you'll need to restore unmodified files. [/i] \n\n";<br />}<br />// ----- JoshPet's Mod Template END -----------<br /><br /><br />That's not real specific - as it's tough to explain this like a generic mod - but hopefully it's enough to get you goin in the right direction. <img src="/forum/images/graemlins/smile.gif" alt="" />
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#253605 - 07/19/03 02:00 AM
Re: Form for specific forum
[Re: Hal_dup2]
|
Member
Registered: 03/01/01
Posts: 652
Loc: West Fargo, ND USA
|
Well, after seeing this thread, I decided to follow up on my dream of creating a unique form within a forum on my board.<br /><br />With the information posted here by both Josh and dimopoulos, I've managed to succeed in my dream! <img src="/forum/images/graemlins/grin.gif" alt="" /><br /><br />Thanks to ericgtr for bringing this topic up, and to Josh and dimopoulos for showing me how it could be done! <br /><br />My board is small, and designed for members of my gaming guild and other guilds/friends who might be interested, but the form I created will help streamline the application process to our guild on our EverQuest chapter.<br /><br />If this works out for our EQ chapter, I will be creating the same thing for our chapters on other games. Would be really easy, now that I have a template to work from. <img src="/forum/images/graemlins/wink.gif" alt="" /><br /><br />If folks were interested, I MIGHT be able to post what I did and how I did it. But keep in mind that I've also integrated a guild roster into my forum as well, so part of my form utilizes that. <img src="/forum/images/graemlins/smile.gif" alt="" /><br /><br />If you want to take a look, pop by my site at http://forum.sofguild.com, login as test/test, then go to the EQ Membership Applications forum and click post. You'll be able to see the form.<br /><br />Unfortunately, I can't let you see the results, except in a screen shot, as the forum that the application is posted to, is a hidden forum for guild officers only.<br /><br />Sorry to get so long winded. <img src="/forum/images/graemlins/tongue.gif" alt="" /> I'm pretty proud of myself over this and just wanted to share. LOL<br /><br />So anyways, here's the results of a submitted application via the form.<br /><br /> New Application in hidden Forum <br /><br /> Viewing the new application <br /><br />Again, big props to you guys for the help. <img src="/forum/images/graemlins/smile.gif" alt="" /><br /><br />I'll answer any questions folks have as best I can, just let me know!<br /><br />Zack
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#253617 - 01/02/04 06:21 PM
Re: Form for specific forum
[Re: Duck]
|
Member
Registered: 03/01/01
Posts: 652
Loc: West Fargo, ND USA
|
Omegatron is right. I have my guild members roster integrated into my threads so I have extra fields there.<br /><br />Most of what is shown on the form though is directly from Threads, i.e. the link to the "sponsor's" profile.<br /><br />I'd go into detail as to why I haven't done a write up yet, or why the other mods I've done haven't been updated (let alone my upgrade to 6.4 <img src="http://www.ubbdev.com/forum/images/graemlins/tongue.gif" alt="" />) but, ya'll think I was lying to ya. <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" /><br /><br />Let's just say, I'm living in a soap opera it seems...<br /><br />Complete with cheating husbands (not me), abusive fiancee's (also not me), and a pregnant wife (yes mine <img src="http://www.ubbdev.com/forum/images/graemlins/grin.gif" alt="" />). <br /><br />ANYWAY, drop me a PM DrChaos and let me know what you need help with regarding setting up this type of form or whatever, I'll give help where I can. As has been stated, a generic write up for this type of thing wouldn't be easy as everyone's forms are basically customized.<br /><br />But I check here a couple times a day still and can chat with ya to assist where I am able. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /><br /><br />PS. Sorry for the long winded blah blah folks. I'll go be quiet now. <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" />
|
|
Top
|
|
|
|
 |
 |
 |
 |
|
|