News: TinyPortal Release Schedule. Please read this update for More Info.

Login  |  Register
HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

October 14, 2019, 09:13:44 AM

Login with username, password and session length

Recent

Members
  • Total Members: 3756
  • Latest: Ocean
Stats
  • Total Posts: 189079
  • Total Topics: 20763
  • Online Today: 70
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 1
Guests: 42
Total: 43

Author Topic: World of Warcraft Recruitment Block  (Read 53431 times)

0 Members and 1 Guest are viewing this topic.

Moocat

  • Guest
World of Warcraft Recruitment Block
« on: October 31, 2007, 02:36:13 PM »
Hey all. This is my World of Warcraft Recruitment block.  In the attached screenshot it is currently all set to "Medium" and "0", but that's all very easy to change. wz_tooltip is required.

Images are attached. Upload the images to '/forum/wow/' directory.

Post any questions you have here and I'll do my best to answer.

Also, I am looking for suggestions for cleaning up my code, as I am still an early learner with PHP. I've been thinking of using arrays and loops to display all the different boxes. I can do the loops easy, but am not positive of the syntax for arrays yet. For the tooltips, I originally wanted to use overlib, but couldn't figure it out. Has anyone else got a good solution to tooltips in a tp box?

Code: [Select]

//***********TP: WOW RECRUITMENT BLOCK BY MOOCAT****************
//Version 0.1                                                  *
//                                                             *
//Requires wz_tooltip on your server inside folder "wz_tooltip"*
//in your forum directory.                                     *
//wz_tooltip can be found at:                                  *
//http://www.walterzorn.com/tooltip/tooltip_e.htm              *
//                                                             *
//Enjoy. Modify the code as you see fit.                       *
//**************************************************************

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)
$druid_need = 2;
$hunter_need = 2;
$mage_need = 2;
$paladin_need = 2;
$priest_need = 2;
$rogue_need = 2;
$shaman_need = 2;
$warlock_need = 2;
$warrior_need = 2;




//--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."
//Druid
$feral_druid = 0;
$resto_druid = 0;
$balance_druid = 0;
//Hunter
$needed_hunter = 0;
//Mage
$needed_mage = 0;
//Paladin
$holy_paladin = 0;
$prot_paladin = 0;
$ret_paladin =  0;
//Priest
$holy_priest = 0;
$shad_priest = 0;
//Rogue
$needed_rogue = 0;
//Shaman
$resto_sham = 0;
$enhance_sham = 0;
$elemental_sham = 0;
//Warlock
$needed_warlock = 0;
//Warrior
$prot_war = 0;
$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

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

$hunter_spec = 'Needed:';

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

$holy_spec = 'Holy:';

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

$shadow_spec = 'Shadow:';

$rogue_spec = 'Needed:';

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

$warlock_spec = 'Needed:';

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


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




//*************************FUCNTIONS****************************



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="")
{
return '
<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></table>\')">' . printClassStatus($class) . '</a>';

}


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





echo'
<script type="text/javascript" src="./wz_tooltip/wz_tooltip.js"></script>
<center>Hover over the recruitment level for details</center>


<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="70%" class="tbcphp"><img alt="" src="wow/druid_icon.gif" />Druid</font></td>
            <td valign="bottom"><strong>' . displayTT($druid_need,$resto_spec,$resto_druid,$feral_spec,$feral_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="wow/hunter_icon.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="wow/mage_icon.gif" />Mage</td>
            <td valign="bottom"><strong>' . displayTT($mage_need,$mage_spec,$needed_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="wow/paladin_icon.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="wow/priest_icon.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="wow/rogue_icon.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="wow/shaman_icon.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="wow/warlock_icon.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="wow/warrior_icon.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><i>Exceptional applicants of any class will be considered.</center></i>
             </td>
        </tr>
        <tr>';
if($user_info['is_guest'])
{
echo'
            <td class="tbcphp"><br />
            <div align="center"><a href="/forum/index.php?action=register">Please Register before Applying</a><br />
            </div>
            </td>';
}
else
{
echo'

            <td> <br />
            <div align="center"><a href="/forum/index.php?page=3">Apply Here</a><br />
            </div>
            </td>';
}
echo'
        </tr>
    </tbody>
</table>
</font>
';

Sorry the code is so messy. It works, though. And like I said, I could use some tips!
« Last Edit: December 10, 2007, 10:58:03 AM by Moocat »

sloanja

  • Guest
Re: World of Warcraft Recruitment Block
« Reply #1 on: November 13, 2007, 09:53:52 AM »
Just to let you know, this code as written will cause many warnings in your Forum Error Log.  The cause of the problem is:

function displayTT($class,$specName1,$spec1,$specName2,$spec2,$specName3,$spec3)

I would modify the code to the following:

function displayTT($class="",$specName1="",$spec1="",$specName2="",$spec2="",$specName3="",$spec3="")

This modification makes the function's variables optional instead of mandatory.

Hakker

  • Guest
Re: World of Warcraft Recruitment Block
« Reply #2 on: November 13, 2007, 11:24:38 AM »
I believe it has been posted before but this is the snippet I use.... kudo's to the one who wrote it though... nice and simple.
Code: [Select]
// Modify these values to show our opening - "o"=open, "l"=limited, anything else = closed

$druid ="l";
$hunter ="l";
$mage ="";
$paladin ="l";
$priest ="l";
$rogue ="";
$shaman ="l";
$warlock ="o";
$warrior ="";

$address = "ADD Recruitment board/thread adress here";


echo '
<head>
<style type="text/css">
td.center
{
color: #89c9b6;
text-align: left;
vertical-align: middle
}
td.right
{
text-align: right;
vertical-align: middle
}
</style>
</head>
<body>
';

// Code START

$r = "o";
$l = "l";

if ($druid == $r){
$druid = "<b><font color='green'>Open</font></b>";
}
elseif ($druid == $l) {
$druid = "<b><font color='orange'>Limited</font></b>";
}
else{
$druid = "<b><font color='red'>Closed</font></b>";
}

if ($hunter ==$r){
$hunter = "<b><font color='green'>Open</font></b>";
}
elseif ($hunter == $l) {
$hunter = "<b><font color='orange'>Limited</font></b>";
}
else{
$hunter = "<b><font color='red'>Closed</font></b>";
}

if ($mage ==$r){
$mage = "<b><font color='green'>Open</font></b>";
}
elseif ($mage == $l) {
$mage = "<b><font color='orange'>Limited</font></b>";
}
else{
$mage = "<b><font color='red'>Closed</font></b>";
}

if ($paladin ==$r){
$paladin = "<b><font color='green'>Open</font></b>";
}
elseif ($paladin == $l) {
$paladin = "<b><font color='orange'>Limited</font></b>";
}
else{
$paladin = "<b><font color='red'>Closed</font></b>";
}

if ($priest ==$r){
$priest= "<b><font color='green'>Open</font></b>";
}
elseif ($priest == $l) {
$priest = "<b><font color='orange'>Limited</font></b>";
}
else{
$priest = "<b><font color='red'>Closed</font></b>";
}

if ($rogue ==$r){
$rogue = "<b><font color='green'>Open</font></b>";
}
elseif ($rogue == $l) {
$rogue = "<b><font color='orange'>Limited</font></b>";
}
else{
$rogue = "<b><font color='red'>Closed</font></b>";
}

if ($shaman ==$r){
$shaman = "<b><font color='green'>Open</font></b>";
}
elseif ($shaman == $l) {
$shaman = "<b><font color='orange'>Limited</font></b>";
}
else{
$shaman = "<b><font color='red'>Closed</font></b>";
}

if ($warlock ==$r){
$warlock = "<b><font color='green'>Open</font></b>";
}
elseif ($warlock == $l) {
$warlock = "<b><font color='orange'>Limited</font></b>";
}
else{
$warlock= "<b><font color='red'>Closed</font></b>";
}

if ($warrior ==$r){
$warrior = "<b><font color='green'>Open</font></b>";
}
elseif ($warrior == $l) {
$warrior = "<b><font color='orange'>Limited</font></b>";
}
else{
$warrior = "<b><font color='red'>Closed</font></b>";
}


// Code END and HTML output start

echo '


<TABLE class = "bordercolor" cellSpacing="0" cellPadding="1" width="100%" border="0">

<tr>
<td class = "center" width = "25px"><img src = "druid.jpg"></td>
<td class = "center">Druid</td>
<td class = "right">'.$druid.'</td>
</tr>

<tr>
<td class = "center" width = "25px"><img src = "hunter.jpg"></td>
<td class = "center">Hunter</td>
<td class = "right">'.$hunter.'</td>
</tr>

<tr>
<td class = "center" width = "25px"><img src = "mage.jpg"></td>
<td class = "center">Mage</td>
<td class = "right">'.$mage.'</td>
</tr>

<tr>
<td class = "center" width = "25px"><img src = "paladin.jpg"></td>
<td class = "center">Paladin</td>
<td class = "right">'.$paladin.'</td>
</tr>

<tr>
<td class = "center" width = "25px"><img src = "priest.jpg"></td>
<td class = "center">Priest</td>
<td class = "right">'.$priest.'</td>
</tr>

<tr>
<td class = "center" width = "25px"><img src = "rogue.jpg"></td>
<td class = "center">Rogue</td>
<td class = "right">'.$rogue.'</td>
</tr>

<tr>
<td class = "center" width = "25px"><img src = "shaman.jpg"></td>
<td class = "center">Shaman</td>
<td class = "right">'.$shaman.'</td>
</tr>

<tr>
<td class = "center" width = "25px"><img src = "warlock.jpg"></td>
<td class = "center">Warlock</td>
<td class = "right">'.$warlock.'</td>
</tr>

<tr>
<td class = "center" width = "25px"><img src = "warrior.jpg"></td>
<td class = "center">Warrior</td>
<td class = "right">'.$warrior.'</td>
</tr>
</table>
<p>
<div align="center"><a href = '.$address.'>Apply here</a></div>

</body>
';

The biggest difference is that it misses the hoovers, but generally looking at how people browse they aren't to much use. Most have it hard enough as it is to copy/paste something :)
The code I dropped here lacks the hoovering so it's more simplified than the above code and again I say it it's not mine.
« Last Edit: November 13, 2007, 11:31:09 AM by Hakker »

Moocat

  • Guest
Re: World of Warcraft Recruitment Block
« Reply #3 on: November 14, 2007, 09:45:42 AM »
yes, there are many similar blocks. My messy code started from seeing one of these blocks on someone's site, and writing the html so it looked the same (except I had to alphabetize the classes to soothe my OCD). Then I just got bored one day and added in the php variables, then another day added in the hover. Thought it was cool, so here it is ;)

I thought the tooltips would be a nice addition to the typical recruitment block. I run a HC raiding guild, so it's important to give our applicants as much information as possible, and really keep an eye on what we need. This allows us to do that without having a big, messy block. And I will change that code slonja, thanks for pointing that out :)
« Last Edit: November 14, 2007, 09:49:21 AM by Moocat »

ryansc

  • Guest
Re: World of Warcraft Recruitment Block
« Reply #4 on: November 21, 2007, 02:28:59 PM »
Hi, I'm sorry for asking this but I'm new to it. How do you actually add this block to the tiny portal ><

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: World of Warcraft Recruitment Block
« Reply #5 on: November 21, 2007, 03:26:17 PM »
Create a php block type. Put the code in it, and save.

Ferocity

  • Guest
Re: World of Warcraft Recruitment Block
« Reply #6 on: December 06, 2007, 06:10:10 AM »
I get an error for an unexpected T String whenver I add this to a PHPblock. Anyone else having this problem?

Ferocity

  • Guest
Re: World of Warcraft Recruitment Block
« Reply #7 on: December 07, 2007, 07:22:30 AM »
Found the problem last night. In the code above there is an 'f' missingon the line that starts with

unction displayTT($class="",$specName1="",$spec1="",$specName2="",$spec2="",$specName3="",$spec3="")

Seems to have fixed this problem.

dracon32

  • Guest
Re: World of Warcraft Recruitment Block
« Reply #8 on: December 07, 2007, 10:30:51 AM »
Here is the slightly modified code I used.  I added the specs for mages in addition to the "Needed".  This means if you wanted to do the same for warlocks, hunters, and rogues, you just have to make the tiny change for the tooltip near the bottom.

The typoed "function" is fixed as well.
Add the images as Moocat said and get the wz_tooltip (default location listed is ./wz_tooltip/wz_tooltip.js)

Demo: http://sob.dracon32.net

Code: [Select]
//***********TP: WOW RECRUITMENT BLOCK BY MOOCAT****************
//Version 0.1                                                  *
//                                                             *
//Requires wz_tooltip on your server inside folder "wz_tooltip"*
//in your forum directory.                                     *
//wz_tooltip can be found at:                                  *
//http://www.walterzorn.com/tooltip/tooltip_e.htm              *
//                                                             *
//Enjoy. Modify the code as you see fit.                       *
//**************************************************************

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)
$druid_need = 0;
$hunter_need = 0;
$mage_need = 0;
$paladin_need = 0;
$priest_need = 0;
$rogue_need = 4;
$shaman_need = 0;
$warlock_need = 0;
$warrior_need = 0;




//--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."

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

//Hunter
$needed_hunter = 0;

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


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

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

//Rogue
$needed_rogue = 2;

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

//Warlock
$needed_warlock = 0;

//Warrior
$prot_war = 0;
$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

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

$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****************************




//*************************FUCNTIONS****************************



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>\')">' . printClassStatus($class) . '</a>';

}


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





echo'
<center>Hover over the recruitment level for details</center>


<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="70%" class="tbcphp"><img alt="" src="wow/druid_icon.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="wow/hunter_icon.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="wow/mage_icon.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="wow/paladin_icon.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="wow/priest_icon.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="wow/rogue_icon.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="wow/shaman_icon.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="wow/warlock_icon.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="wow/warrior_icon.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>Insert any extra comments</center>
             </td>
        </tr>
        <tr>';
if($user_info['is_guest'])
{
echo'
            <td class="tbcphp"><br />
            <div align="center"><a href="/forum/index.php?action=register">Please Register before Applying</a><br />
            </div>
            </td>';
}
else
{
echo'

            <td> <br />
            <div align="center"><a href="http://google.com">Apply Here</a><br />
            </div>
            </td>';
}
echo'
        </tr>
    </tbody>
</table>
</font>
';

CampCounselor

  • Guest
Re: World of Warcraft Recruitment Block
« Reply #9 on: December 09, 2007, 08:26:32 PM »
I believe it has been posted before but this is the snippet I use.... kudo's to the one who wrote it though... nice and simple.
Code: [Select]
// Modify these values to show our opening - "o"=open, "l"=limited, anything else = closed

$druid ="l";
$hunter ="l";
$mage ="";
$paladin ="l";
$priest ="l";
$rogue ="";
$shaman ="l";
$warlock ="o";
$warrior ="";

$address = "ADD Recruitment board/thread adress here";


echo '
<head>
<style type="text/css">
td.center
{
color: #89c9b6;
text-align: left;
vertical-align: middle
}
td.right
{
text-align: right;
vertical-align: middle
}
</style>
</head>
<body>
';

// Code START

$r = "o";
$l = "l";

if ($druid == $r){
$druid = "<b><font color='green'>Open</font></b>";
}
elseif ($druid == $l) {
$druid = "<b><font color='orange'>Limited</font></b>";
}
else{
$druid = "<b><font color='red'>Closed</font></b>";
}

if ($hunter ==$r){
$hunter = "<b><font color='green'>Open</font></b>";
}
elseif ($hunter == $l) {
$hunter = "<b><font color='orange'>Limited</font></b>";
}
else{
$hunter = "<b><font color='red'>Closed</font></b>";
}

if ($mage ==$r){
$mage = "<b><font color='green'>Open</font></b>";
}
elseif ($mage == $l) {
$mage = "<b><font color='orange'>Limited</font></b>";
}
else{
$mage = "<b><font color='red'>Closed</font></b>";
}

if ($paladin ==$r){
$paladin = "<b><font color='green'>Open</font></b>";
}
elseif ($paladin == $l) {
$paladin = "<b><font color='orange'>Limited</font></b>";
}
else{
$paladin = "<b><font color='red'>Closed</font></b>";
}

if ($priest ==$r){
$priest= "<b><font color='green'>Open</font></b>";
}
elseif ($priest == $l) {
$priest = "<b><font color='orange'>Limited</font></b>";
}
else{
$priest = "<b><font color='red'>Closed</font></b>";
}

if ($rogue ==$r){
$rogue = "<b><font color='green'>Open</font></b>";
}
elseif ($rogue == $l) {
$rogue = "<b><font color='orange'>Limited</font></b>";
}
else{
$rogue = "<b><font color='red'>Closed</font></b>";
}

if ($shaman ==$r){
$shaman = "<b><font color='green'>Open</font></b>";
}
elseif ($shaman == $l) {
$shaman = "<b><font color='orange'>Limited</font></b>";
}
else{
$shaman = "<b><font color='red'>Closed</font></b>";
}

if ($warlock ==$r){
$warlock = "<b><font color='green'>Open</font></b>";
}
elseif ($warlock == $l) {
$warlock = "<b><font color='orange'>Limited</font></b>";
}
else{
$warlock= "<b><font color='red'>Closed</font></b>";
}

if ($warrior ==$r){
$warrior = "<b><font color='green'>Open</font></b>";
}
elseif ($warrior == $l) {
$warrior = "<b><font color='orange'>Limited</font></b>";
}
else{
$warrior = "<b><font color='red'>Closed</font></b>";
}


// Code END and HTML output start

echo '


<TABLE class = "bordercolor" cellSpacing="0" cellPadding="1" width="100%" border="0">

<tr>
<td class = "center" width = "25px"><img src = "druid.jpg"></td>
<td class = "center">Druid</td>
<td class = "right">'.$druid.'</td>
</tr>

<tr>
<td class = "center" width = "25px"><img src = "hunter.jpg"></td>
<td class = "center">Hunter</td>
<td class = "right">'.$hunter.'</td>
</tr>

<tr>
<td class = "center" width = "25px"><img src = "mage.jpg"></td>
<td class = "center">Mage</td>
<td class = "right">'.$mage.'</td>
</tr>

<tr>
<td class = "center" width = "25px"><img src = "paladin.jpg"></td>
<td class = "center">Paladin</td>
<td class = "right">'.$paladin.'</td>
</tr>

<tr>
<td class = "center" width = "25px"><img src = "priest.jpg"></td>
<td class = "center">Priest</td>
<td class = "right">'.$priest.'</td>
</tr>

<tr>
<td class = "center" width = "25px"><img src = "rogue.jpg"></td>
<td class = "center">Rogue</td>
<td class = "right">'.$rogue.'</td>
</tr>

<tr>
<td class = "center" width = "25px"><img src = "shaman.jpg"></td>
<td class = "center">Shaman</td>
<td class = "right">'.$shaman.'</td>
</tr>

<tr>
<td class = "center" width = "25px"><img src = "warlock.jpg"></td>
<td class = "center">Warlock</td>
<td class = "right">'.$warlock.'</td>
</tr>

<tr>
<td class = "center" width = "25px"><img src = "warrior.jpg"></td>
<td class = "center">Warrior</td>
<td class = "right">'.$warrior.'</td>
</tr>
</table>
<p>
<div align="center"><a href = '.$address.'>Apply here</a></div>

</body>
';

The biggest difference is that it misses the hoovers, but generally looking at how people browse they aren't to much use. Most have it hard enough as it is to copy/paste something :)
The code I dropped here lacks the hoovering so it's more simplified than the above code and again I say it it's not mine.

It goes to /add when you click to apply did you forget to add stuff ?