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,911
  • Total Topics: 21,307
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 401
  • Total: 401

World of Warcraft Recruitment Block

Started by Moocat, October 31, 2007, 08:36:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Moocat

woopsies. typo fixed. Sorry about that. I was in a hurry when i edited the code and missed it!

BRFR... read the code you are using more carefully. In that code, you are asked to "ADD Recruitment board/thread adress here". So, where it says that, by the $address variable, add your recruitment board address. Or you can use my code and *carefully read the comments* before using it.

Bardofyouth

http://wowaffliction.com/index.php

This is squished together on my right block, cant figure out why.. the picture isnt syncing up with the text.  Suggestions?

Bardofyouth

i answered my own question.. just increased the panel size.


Reprobate

#14
I know this is an old thread, but I recently set up my own guild site and found the code. Works great except that the little java window that pops up to show the specific class specs, stays on the mouse cursor on the whole site, not just in the block. Was wondering if there is anyway around this.

This is the code (values changed for my needs) that I am using:


//***********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 = 4;
$hunter_need = 4;
$mage_need = 4;
$paladin_need = 4;
$priest_need = 4;
$rogue_need = 2;
$shaman_need = 4;
$warlock_need = 4;
$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 = 3;
$resto_druid = 2;
$balance_druid = 0;
//Hunter
$needed_hunter = 1;
//Mage
$needed_mage = 3;
$arcane_mage = any;
$fire_mage = any;
$frost_mage = any;

//Paladin
$holy_paladin = 2;
$prot_paladin = 1;
$ret_paladin =  1;
//Priest
$holy_priest = 2;
$shad_priest = 2;
//Rogue
$needed_rogue = 1;
//Shaman
$resto_sham = 2;
$enhance_sham = 1;
$elemental_sham = 2;
//Warlock
$needed_warlock = 4;
//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
$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%" border="0" height="8">
    <tbody>
        <tr>
            <td width="10%" class="tbcphp"><img alt="" src="wow/druid_icon.gif" /></td>
     <td class="tbcphp">Druid</font></td>
            <td align ="right" valign="center"><strong>' . displayTT($druid_need,$resto_spec,$resto_druid,$feral_spec,$feral_druid,$balance_spec,$balance_druid) . '</strong></td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="10%" class="tbcphp"><img alt="" src="wow/hunter_icon.gif" /></td>
      <td class="tbcphp">Hunter</td>
            <td align ="right" valign="center"><strong>' . displayTT($hunter_need,$hunter_spec,$needed_hunter) . '</strong></td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="10%" class="tbcphp"><img alt="" src="wow/mage_icon.gif" /></td>
     <td class="tbcphp">Mage</td>
            <td align ="right" valign="center"><strong>' . displayTT($mage_need,$mage_spec,$needed_mage,$arcane_spec,$arcane_mage,$fire_spec,$fire_mage,$frost_spec,$frost_mage) . '</strong></td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="10%" class="tbcphp"><img alt="" src="wow/paladin_icon.gif" /></td>
     <td class="tbcphp">Paladin</td>
            <td align ="right" valign="center"><strong>' . displayTT($paladin_need,$holy_spec,$holy_paladin,$prot_spec,$prot_paladin,$ret_spec,$ret_paladin) . '</a></strong></td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="10%" class="tbcphp"><img alt="" src="wow/priest_icon.gif" /></td>
     <td class="tbcphp">Priest</td>
            <td align ="right" valign="center"><strong>' . displayTT($priest_need,$holy_spec,$holy_priest,$shadow_spec,$shad_priest) . '</strong></td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="10%" class="tbcphp"><img alt="" src="wow/rogue_icon.gif" /></td>
     <td class="tbcphp">Rogue</td>
            <td align ="right" valign="center"><strong>' . displayTT($rogue_need,$rogue_spec,$needed_rogue) . '</strong></td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="10%" class="tbcphp"><img alt="" src="wow/shaman_icon.gif" /></td>
     <td class="tbcphp">Shaman</td>
            <td align ="right" valign="center"><strong>' . displayTT($shaman_need,$resto_spec,$resto_sham,$elemental_spec,$elemental_sham,$enhance_spec,$enhance_sham) . '</strong></td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="10%" class="tbcphp"><img alt="" src="wow/warlock_icon.gif" /></td>
     <td class="tbcphp">Warlock</td>
            <td align ="right" valign="center"><strong>' . displayTT($warlock_need,$warlock_spec,$needed_warlock) . '</strong></td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="10%" class="tbcphp"><img alt="" src="wow/warrior_icon.gif" /></td>
     <td class="tbcphp">Warrior</td>
            <td align ="right" valign="center"><strong>' . displayTT($warrior_need,$prot_spec,$prot_war,$arms_spec,$arms_war,$fury_spec,$fury_war) . '</strong></td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
             <td class="tbcphp"><center>Please register on the forums before applying.</center>
             </td>
        </tr>
        <tr>';
if($user_info['is_guest'])
{
echo'
            <td class="tbcphp"><br />
            <div align="center"><a href="/index.php?action=register">Please Register before Applying</a><br />
            </div>
            </td>';
}
else
{
echo'
            <td> <br />
            <div align="center"><a href="http://*********">Apply Here</a><br />
            </div>
            </td>';
}
echo'
        </tr>
    </tbody>
</table>
</font>
';

Ken.

Reprobate, your code would be lots easier to read and will render more accurately if it was enclosed within the code tags, please edit your post to do so. (you can highlight the code and then use the "#" icon showing above your edit window.)

" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

IchBin

This line of javascript needs a mouseout event. The onmouseover event does not stop unless you have an onmouseout event as well. I'm not sure of the code, so you should probably do some googling to see how you can get it to shop. Maybe just onmouseout="" will work.

<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>';

Reprobate

That onmouseout helped point me in the right direction, Thanks! Apparently in the new version of wz_tooltip, it now requires the onmouseout code which it didn't need in the previous versions. Which is why the code was working for everyone else, but I just recently downloaded it and hence the newer version.

If you are having the same issue; search for:
$spec4 . '</font></td></tr></table>\')">' . printClassStatus($class) . '</a>';

and replace it with:

$spec4 . '</font></td></tr></table>\')" onmouseout="UnTip()">' . printClassStatus($class) . '</a>';

darthmactis

ok this is the one that works for me but is there a way to get the tooltip to not follow the mouse? i try to use the tooltip.js site to do it but i cant get it to work. help Please!!

Quote from: dracon32 on December 07, 2007, 05:30:51 PM
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

//***********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>
';


Reprobate

That was the same problem I had, look at my post right above yours.

This website is proudly hosted on Crocweb Cloud Website Hosting.