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,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 447
  • Total: 447

WOW Recruiting penal

Started by sharky, March 16, 2007, 08:07:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

G6Cad

I think Zetan wants it for music and not games :)

meeee

#11
I liked this a lot but being limited to open or closed was too restrictive.  Also, the blue for open didn't show up well on my black-background theme sooo... I made a small modification that allows a "l" (lower case L) to be used to indicate "Limited" recruiting.  I changed open to green, limited is yellow and closed is red.

Hope you like:

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

$address = "http://www.thefalloutguild.com/smf2/index.php?board=2.0";


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

if ($druid ==$r){
$druid = "<b><font color='green'>Open</font></b>";
}
elseif ($druid == $l) {
$druid = "<b><font color='yellow'>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='yellow'>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='yellow'>Limited</font></b>";
}
else{
$mage = "<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='yellow'>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='yellow'>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='yellow'>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='yellow'>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='yellow'>Limited</font></b>";
}
else{
$warrior = "<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='yellow'>Limited</font></b>";
}
else{
$paladin = "<b><font color='red'>Closed</font></b>";
}

echo"
<table width='100%' height='8'>
<tr>
<td width = '70%' ><img src='wow/druid_icon.gif'> Druid</td>
<td valign='bottom'>".$druid."</td>
<td width = '10%'></td>
</tr>
</table>
<table width='100%' height='8'>
<tr>
<td width = '70%' ><img src='wow/hunter_icon.gif'> Hunter</td>
<td valign='bottom'>".$hunter."</td>
<td width = '10%'></td>
</tr>
</table>
<table width='100%' height='8'>
<tr>
<td width = '70%'><img src='wow/mage_icon.gif'> Mage</td>
<td valign='bottom'>".$mage."</td>
<td width = '10%'></td>
</tr>
</table>
<table width='100%' height='8'>
<tr>
<td width = '70%' ><img src='wow/priest_icon.gif'> Priest</td>
<td valign='bottom'>".$priest."</td>
<td width = '10%'></td>
</tr>
</table>
<table width='100%' height='8'>
<tr>
<td width = '70%' ><img src='wow/rogue_icon.gif'> Rogue</td>
<td valign='bottom'>".$rogue."</td>
<td width = '10%'></td>
</tr>
</table>
<table width='100%' height='8'>
<tr>
<td width = '70%' ><img src='wow//shaman_icon.gif'> Shaman</td>
<td valign='bottom'>".$shaman."</td>
<td width = '10%'></td>
</tr>
</table>
<table width='100%' height='8'>
<tr>
<td width = '70%' ><img src='wow/warlock_icon.gif'> Warlock</td>
<td valign='bottom'>".$warlock."</td>
<td width = '10%'></td>
</tr>
</table>
<table width='100%' height='8'>
<tr>
<td width = '70%' ><img src='wow/warrior_icon.gif'> Warrior</td>
<td valign='bottom'>".$warrior."</td>
<td width = '10%'></td>
</tr>
</table>
<table width='100%' height='8'>
<tr>
<td width = '70%' ><img src='wow/paladin_icon.gif'> Paladin</td>
<td valign='bottom'>".$paladin."</td>
<td width = '10%'></td>
</tr>
</table>
<table width='100%' height='8'>
<tr>
<td>
<br><font color='red'><div align='center'><a href='".$address."'> Apply Here</a><br></div></font>
</td>
</tr>
</table>
";


you can see it in action at http://www.thefalloutguild.com

sharky

my next version will include colors number of slots if yuo want to display it and admin penal for easy use but i like waht yuo have done with it

Abeille

small modification, less tables for html output, hopes you like. Im currently using this and hopefully i didnt screw the code too much :laugh:

// Modify these values to show our opening - "o"=open, "l"=limited, anything else = closed

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

$address = "http://";


echo '
<head>
<style type="text/css">
td.center
{
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 class = "windowbg">
<td class = "center" width = "25px"><img src = "wow/druid_icon.gif"></td>
<td class = "center">Druid</td>
<td class = "right">'.$druid.'</td>
</tr>

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

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

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

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

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

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

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

<tr class = "windowbg">
<td class = "center" width = "25px"><img src = "wow/warrior_icon.gif"></td>
<td class = "center">Warrior</td>
<td class = "right">'.$warrior.'</td>
</tr>

<tr class = "windowbg2">
<td align = "center" colspan = "3"><a href = '.$address.'>Apply here</a></td>
</tr>


</table></body>
';

Bloodlvst

#14
Quote from: sharky on March 28, 2007, 02:18:06 PM
my next version will include colors number of slots if yuo want to display it and admin penal for easy use but i like waht yuo have done with it

If anyone wants it, I edited this so you can put the number of slots remaining, if you have chosen "limited" for that character class. All I did was simply modify the "limited" output to use a variable $<x>slots, where "x" is the character class. So for druid you'd use $druidslots. If you choose limited, simple change the variable that $druidslots is limited to and place the number in, and it will output as "<number> Slots Left". IT IS IMPORTANT THAT IF YOU ACTIVATE THE "LIMITED" VARIABLE THAT YOU PUT A VALUE INTO THE $<x>slots VARIABLE!

I also changed the values for open and limited to the words themselves, as I know my guild leaders aren't familiar with code and variables. Feel free to chang eback if you like.

One final question I have is that I'm trying to make it so if $<x>slots is equal to 1, that it prints "1 Slot Left" instead of "1 Slots Left", which isn't proper English. I tried that following to try and say if the class is limited, and the slots are equal to 1, to print the specified message. However it still prints the "normal" limited message. Any ideas?

Example:if ($druid == $r){
$druid = "<b><font color='green'>Open</font></b>";
}
elseif ($druid == $l) {
$druid = "<b><font color='yellow'>$druidslots Slots Left</font></b>";
}
  elseif ($druid == $l and $druidslots == 1) {     
      $druid ="<b><font color='yellow'>$druidslots Slot Left</font></b>";
      }
else{
$druid = "<b><font color='red'>Closed</font></b>";
}


Code for "Slots Left" Recruiting Panel
// Modify these values to show our opening - "open"=open, "limited"=limited, anything else = closed
// Note: IF YOU CHOOSE LIMITED YOU MUST ADD A NUMERIC VALUE TO THE CORRESPONDING SLOTS VARIABLE BELOW IT!

$druid ="limited";
$hunter ="open";
$mage ="";
$paladin ="open";
$priest ="limited";
$rogue ="";
$shaman ="";
$warlock ="limited";
$warrior ="";

$druidslots="4";
$hunterslots="";
$mageslots="";
$paladinslots="";
$priestslots="1";
$rogueslots="";
$shamanslots="";
$warlockslots="2";
$warriorslots="";

$address = "http://";


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

// Code START

$r = "open";
$l = "limited";

if ($druid == $r){
$druid = "<b><font color='green'>Open</font></b>";
}
elseif ($druid == $l) {
$druid = "<b><font color='yellow'>$druidslots Slots Left</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='yellow'>$hunterslots Slots Left</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='yellow'>$mageslots Slots Left</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='yellow'>$paladinslots Slots Left</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='yellow'>$priestslots Slots Left</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='yellow'>$rogueslots Slots Left</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='yellow'>$shamanslots Slots Left</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='yellow'>$warlockslots Slots Left</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='yellow'>$warriorslots Slots Left</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 class = "windowbg">
<td class = "center" width = "25px"><img src = "wow_rct_img/druid_icon.gif"></td>
<td class = "center">Druid</td>
<td class = "right">'.$druid.'</td>
</tr>

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

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

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

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

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

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

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

<tr class = "windowbg">
<td class = "center" width = "25px"><img src = "wow_rct_img/warrior_icon.gif"></td>
<td class = "center">Warrior</td>
<td class = "right">'.$warrior.'</td>
</tr>

<tr class = "windowbg2">
<td align = "center" colspan = "3"><a href = '.$address.'>Apply Here</a></td>
</tr>

</table></body>
';
?>


faylo

can you still get this because the link is dead?


Craig

This was actually very easy to modify, I am no coder by any means but even I managed to customise this for use on a Lord of the Rings Online site:

$guardian ="limited";
$hunter ="open";
$minstrel ="";
$champion ="open";
$captain ="limited";
$burglar ="";
$loremaster ="";

$guardianslots="4";
$hunterslots="";
$minstrelslots="";
$championslots="";
$captainslots="1";
$burglarslots="";
$loremasterslots="";

$address = "http://pk.afterthebattle.co.uk/index.php/board,2.0.html";


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

// Code START

$r = "open";
$l = "limited";

if ($guardian == $r){
$guardian = "<b><font face ='Verdana' size='1' color='green'>Open</font></b>";
}
elseif ($guardian == $l) {
$guardian = "<b><font face ='Verdana' size='1' color='blue'>$guardianslots Slots Left</font></b>";
}
else{
$guardian = "<b><font face ='Verdana' size='1' color='red'>Closed</font></b>";
}

if ($hunter ==$r){
$hunter = "<b><font face ='Verdana' size='1' color='green'>Open</font></b>";
}
elseif ($hunter == $l) {
$hunter = "<b><font face ='Verdana' size='1' color='blue'>$hunterslots Slots Left</font></b>";
}
else{
$hunter = "<b><font face ='Verdana' size='1' color='red'>Closed</font></b>";
}

if ($minstrel ==$r){
$minstrel = "<b><font face ='Verdana' size='1' color='green'>Open</font></b>";
}
elseif ($minstrel == $l) {
$minstrel = "<b><font face ='Verdana' size='1' color='blue'>$minstrelslots Slots Left</font></b>";
}
else{
$minstrel = "<b><font face ='Verdana' size='1' color='red'>Closed</font></b>";
}

if ($champion ==$r){
$champion = "<b><font face ='Verdana' size='1' color='green'>Open</font></b>";
}
elseif ($champion == $l) {
$champion = "<b><font face ='Verdana' size='1' color='blue'>$championslots Slots Left</font></b>";
}
else{
$champion = "<b><font face ='Verdana' size='1' color='red'>Closed</font></b>";
}

if ($captain ==$r){
$captain= "<b><font face ='Verdana' size='1' color='green'>Open</font></b>";
}
elseif ($captain == $l) {
$captain = "<b><font face ='Verdana' size='1' color='blue'>$captainslots Slots Left</font></b>";
}
else{
$captain = "<b><font face ='Verdana' size='1' color='red'>Closed</font></b>";
}

if ($burglar ==$r){
$burglar = "<b><font face ='Verdana' size='1' color='green'>Open</font></b>";
}
elseif ($burglar == $l) {
$burglar = "<b><font face ='Verdana' size='1' color='blue'>$burglarslots Slots Left</font></b>";
}
else{
$burglar = "<b><font face ='Verdana' size='1' color='red'>Closed</font></b>";
}

if ($loremaster ==$r){
$loremaster = "<b><font face ='Verdana' size='1' color='green'>Open</font></b>";
}
elseif ($loremaster == $l) {
$loremaster = "<b><font face ='Verdana' size='1' color='blue'>$loremasterslots Slots Left</font></b>";
}
else{
$loremaster = "<b><font face ='Verdana' size='1' color='red'>Closed</font></b>";
}

// Code END and HTML output start

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

<tr class = "windowbg">
<td class = "center"><font face="Verdana" size="1">Guardian</font></td>
<td class = "right">'.$guardian.'</td>
</tr>

<tr class = "windowbg2">
<td class = "center"><font face="Verdana" size="1">Hunter</font></td>
<td class = "right">'.$hunter.'</td>
</tr>

<tr class = "windowbg">
<td class = "center"><font face="Verdana" size="1">Minstrel</font></td>
<td class = "right">'.$minstrel.'</td>
</tr>

<tr class = "windowbg2">
<td class = "center"><font face="Verdana" size="1">Champion</font></td>
<td class = "right">'.$champion.'</td>
</tr>

<tr class = "windowbg">
<td class = "center"><font face="Verdana" size="1">Captain</font></td>
<td class = "right">'.$captain.'</td>
</tr>

<tr class = "windowbg2">
<td class = "center"><font face="Verdana" size="1">Burglar</font></td>
<td class = "right">'.$burglar.'</td>
</tr>

<tr class = "windowbg">
<td class = "center"><font face="Verdana" size="1">Lore-master</font></td>
<td class = "right">'.$loremaster.'</td>
</tr>

<tr class = "windowbg2">
<td align = "center" colspan = "2"><a href = '.$address.'><font face="Verdana" size="1">Apply Here</a></font></td>
</tr>

</table></body>
';


Nice and easy. :)

Rus

This looked too cool not to put on my site.  Looks very easily customizeable so its inactive now until I can think of a use for it.

Bloodlvst

Fixed the issue so it's "proper" English in case anyone's interested. Was a slight order or operations error I made!

if ($druid == $r){
$druid = "<b><font color='green'>Open</font></b>";
}
elseif ($druid == $l && $druidslots == 1) {
    $druid = "<b><font color='yellow'>$druidslots Slot Left</font></b>";
    }
      elseif ($druid == $l) {
  $druid = "<b><font color='yellow'>$druidslots Slots Left</font></b>";
  }
    else{
    $druid = "<b><font color='red'>Closed</font></b>";
    }

This website is proudly hosted on Crocweb Cloud Website Hosting.