TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,230
  • Total Topics: 21,353
  • Online today: 446
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 112
  • Total: 112

Warcraft Recruitment Form

Started by Azphat12, April 14, 2009, 02:00:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Azphat12

That "Join Us" is very close to the one I use.  But not the original.  I think he did the same thing I have done and modified it for his preference.  As I can see his version does not have all the //rule on how to this, and //rule on how to do that.  That was in the original and I left it in. 

Regardless it gives me a good base to use to examine mine with.  Thank you very much.

JPDeni

I hadn't looked closely at your code. I wrote the original! :2funny:

I can look for it if you need me to, but it is sorta cool for you to be looking at it. You can learn a whole lot that way. That's how I learned how to code.

Starrbuck

Below is the one I am currently running.  Note this has not been tested with the latest TP.


global $user_info;

//*******************CONFIGURATION SECTION*********************

//--Individual Class Need Rating--//
//Place the need for each class to the right of the equals sign.
//0 = closed
//1 = low
//2 = med
//3 = high
//4 = open (just in case people still like the open/closed wording)
$deathknight_need = 4;
$druid_need = 4;
$hunter_need = 4;
$mage_need = 0;
$paladin_need = 4;
$priest_need = 0;
$rogue_need = 4;
$shaman_need = 4;
$warlock_need = 0;
$warrior_need = 4;

//--Quantity needed of each spec!--//
//To the right of the = sign, type the # you need of that spec!
//Here you can be much more specific than simply "High," "Medium," or "Low."

//Deathknight
$needed_deathknight = 1;

//Druid
$feral_druid = 1;
$resto_druid = 1;
$balance_druid = 1;

//Hunter
$needed_hunter = 1;

//Mage
$needed_mage = 0;
$arcane_mage = 0;
$fire_mage = 0;
$frost_mage = 0;

//Paladin
$holy_paladin = 1;
$prot_paladin = 1;
$ret_paladin =  0;

//Priest
$holy_priest = 0;
$shad_priest = 0;

//Rogue
$needed_rogue = 1;

//Shaman
$resto_sham = 1;
$enhance_sham = 1;
$elemental_sham = 1;

//Warlock
$needed_warlock = 0;

//Warrior
$prot_war = 1;
$arms_war = 0;
$fury_war = 0;

//--COLORS--//
/*
$closed_color = 'red';
$low_color = 'green';
$medium_color = 'orange';
$high_color = 'red';
$open_color = 'green';
*/

//--LOCALIZATION--//
//LANGUAGE VARIABLES FOR EACH SPEC

$deathknight_spec = 'Needed:';

$feral_spec = 'Feral:';
$resto_spec = 'Restoration:';
$balance_spec = 'Boomkin:';

$hunter_spec = 'Needed:';

$mage_spec = 'Needed:';
$arcane_spec = 'Arcane:';
$fire_spec = 'Fire:';
$frost_spec = 'Frost:';

$holy_spec = 'Holy:';
$shadow_spec = 'Shadow:';

$prot_spec = 'Protection:';
$ret_spec = 'Retribution:';

$rogue_spec = 'Needed:';

$enhance_spec = 'Enhancement:';
$elemental_spec = 'Elemental:';

$warlock_spec = 'Needed:';

$arms_spec = 'Arms:';
$fury_spec = 'Fury:';

//************************END CONFIG****************************

//*************************FUNCTIONS****************************

function printClassStatus($className)
{
switch($className)
{
case 0: return '<font color="red">Closed</font>';
case 1: return '<font color="green">Low</font>';
case 2: return '<font color="orange">Medium</font>';
case 3: return '<font color="red">High</font>';
case 4: return '<font color="green">Open</font>';
}
}
function displayTT($class="",$specName1="",$spec1="",$specName2="",$spec2="",$specName3="",$spec3="",$specName4="",$spec4="")
{
return '
<script type="text/javascript" src="./wz_tooltip/wz_tooltip.js"></script>
<a href="javascript:void(0);" onmouseover="Tip(\'<table width=100%><tr><td><font color=black>' . $specName1 .  '</font></td><td><font color=black>' . $spec1 . '</font></td></tr><tr><td><font color=black>' . $specName2 . '</font></td><td><font color=black>' . $spec2 . '</font></td></tr><tr><td><font color=black>' . $specName3 . '</font></td><td><font color=black>' . $spec3 . '</font></td></tr><tr><td><font color=black>' . $specName4 . '</font></td><td><font color=black>' . $spec4 . '</font></td></tr></table>\')" onmouseout="UnTip()">' . printClassStatus($class) . '</a>';

}

//**********************END FUNCTIONS****************************

echo'
<center>Hover over the recruitment level for spec details</center>
<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="70%" class="tbcphp"><img alt="" src="images/IconSmall_Deathknight.gif" />Death Knight</font></td>
            <td valign="bottom"><strong>' . displayTT($deathknight_need,$deathknight_spec,$needed_deathknight) . '</strong></td>
            <td width="10%"> </td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="70%" class="tbcphp"><img alt="" src="images/IconSmall_Druid.gif" />Druid</font></td>
            <td valign="bottom"><strong>' . displayTT($druid_need,$resto_spec,$resto_druid,$feral_spec,$feral_druid,$balance_spec,$balance_druid) . '</strong></td>
            <td width="10%"> </td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="70%" class="tbcphp"><img alt="" src="images/IconSmall_Hunter.gif" />Hunter</td>
            <td valign="bottom"><strong>' . displayTT($hunter_need,$hunter_spec,$needed_hunter) . '</strong></td>
            <td width="10%"> </td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="70%" class="tbcphp"><img alt="" src="images/IconSmall_Mage.gif" />Mage</td>
            <td valign="bottom"><strong>' . displayTT($mage_need,$mage_spec,$needed_mage,$arcane_spec,$arcane_mage,$fire_spec,$fire_mage,$frost_spec,$frost_mage) . '</strong></td>
            <td width="10%"> </td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="70%" class="tbcphp"><img alt="" src="images/IconSmall_Paladin.gif" />Paladin</td>
            <td valign="bottom"><strong>' . displayTT($paladin_need,$holy_spec,$holy_paladin,$prot_spec,$prot_paladin,$ret_spec,$ret_paladin) . '</a></strong></td>
            <td width="10%"> </td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="70%" class="tbcphp"><img alt="" src="images/IconSmall_Priest.gif" />Priest</td>
            <td valign="bottom"><strong>' . displayTT($priest_need,$holy_spec,$holy_priest,$shadow_spec,$shad_priest) . '</strong></td>
            <td width="10%"> </td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="70%" class="tbcphp"><img alt="" src="images/IconSmall_Rogue.gif" />Rogue</td>
            <td valign="bottom"><strong>' . displayTT($rogue_need,$rogue_spec,$needed_rogue) . '</strong></td>
            <td width="10%"> </td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="70%" class="tbcphp"><img alt="" src="images/IconSmall_Shaman.gif" />Shaman</td>
            <td valign="bottom"><strong>' . displayTT($shaman_need,$resto_spec,$resto_sham,$elemental_spec,$elemental_sham,$enhance_spec,$enhance_sham) . '</strong></td>
            <td width="10%"> </td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="70%" class="tbcphp"><img alt="" src="images/IconSmall_Warlock.gif" />Warlock</td>
            <td valign="bottom"><strong>' . displayTT($warlock_need,$warlock_spec,$needed_warlock) . '</strong></td>
            <td width="10%"> </td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="70%" class="tbcphp"><img alt="" src="images/IconSmall_Warrior.gif" />Warrior</td>
            <td valign="bottom"><strong>' . displayTT($warrior_need,$prot_spec,$prot_war,$arms_spec,$arms_war,$fury_spec,$fury_war) . '</strong></td>
            <td width="10%"> </td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
             <td class="tbcphp"><center>Recruitment is currently open to select classes.</center>
             </td>
        </tr>
        <tr>';
if($user_info['is_guest'])
{
echo'
            <td class="tbcphp">
            <div align="center">Please <a href="/smf/index.php?action=register">Register</a> before applying.<br />
            </div>
            </td>';
}
else
{
echo'
            <td>
            <div align="center">Apply in our <a href="/smf/index.php?board=2.0" alt="Recruiting">Recruiting</a> forum.<br />
            </div>
            </td>';
}
echo'
        </tr>
    </tbody>
</table>
</font>
';


Azphat12

Well for the time being I decided to take the lesser of two evils.  I took the "Join Us" code since it was working, and just added in several of the elements I wanted for the game we play.

It looks very similar, and in all reality taking out several of the \ or whatnot makes it somewhat easier for me to read anyway.

I am actually doing something a little different with this.  I am technically not using Tinyportal to view anything.  I have eqdkp+ for my main portal, which has a built in gui interface recruitment block.  You hit "Apply" and it is linked to the app in Tinyportal which all the panels are hidden.  It posts it to the forum, and redirects to the thank you page.  And this hopefully will be done all in the eqdkp+ iframe. 

Just got the page done last night, am going to start working on the iframe setup tonight.

Inny

EQDKP as portal its a bit messy and not that practical  :P

Azphat12

I think it looks ok...

www.darkaftermathguild.com

The frontpage will be removed here shortly, is temporary.

This website is proudly hosted on Crocweb Cloud Website Hosting.