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 (http://www.walterzorn.com/tooltip/tooltip_e.htm) 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?
//***********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!
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.
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.
// 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.
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 :)
Hi, I'm sorry for asking this but I'm new to it. How do you actually add this block to the tiny portal ><
Create a php block type. Put the code in it, and save.
I get an error for an unexpected T String whenver I add this to a PHPblock. Anyone else having this problem?
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.
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>
';
Quote from: Hakker on November 13, 2007, 06:24:38 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.
// 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 ?
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.
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?
i answered my own question.. just increased the panel size.
good to hear :)
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>
';
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.)
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>';
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>';
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>
';
That was the same problem I had, look at my post right above yours.
well i fix mine a diff. way,LOL i used a JS editer and changed the default setting, it worked,lol
woopsies. typo fixed. Sorry about that. I was in a hurry when i edited the code and missed it!
Hi there,
I have uploaded the graphics, created a new script block, pasted your code and saved it, but I just get a block on the left that is mainly code, the graphics load though, what am i missing?
It is as if TinyPortal is not recognising the code
help appreciated
EDIT: argh, PHPBOX, nevermind!
I have tried... and tried...
my forum is installed in /root/forum/
put wz_tooltip.js in
/root/forum/wz_tooltip/wz_tooltip.js
IE = Error on Page:
Object Expected
Fails in Firefox also... the tooltip just fails to load.
I'm doing it wrong... but how?
CHMOD on folder is 755
EDIT:
Had the wrong version installed :uglystupid2:
Did you try with the files in your root?
This coding gives "Operation Aborted" in IE7. Works fine for Firefox and Opera.
I used it in a phpbox aswell. Some links around this post load fine with IE. Any hints on fixing it?
My guild page is www.epu-wow.com
For some reason, when I install the block it just screws up the board, I really don't understand what I'm doing wrong. I have installed the .js properly.
www.nalum.no/ai2
I updated this for the new World of Warcraft expansion, Wrath of the Lich King and Death Knights.
The downside is Death Knight wont fit in a standard size block so I shortened it to D. Knight. If you want to use a wider block then default the go ahead and replace D. Knight with Death Knight.
Also attached an Icon for the Death Knight. (https://www.tinyportal.net/index.php?action=dlattach;topic=19751.0;attach=17848;image)
//***********TP: WOW RECRUITMENT BLOCK BY MOOCAT****************
//Version 0.1 *
//***********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)
$deathknight_need = 0;
$druid_need = 0;
$hunter_need = 0;
$mage_need = 0;
$paladin_need = 0;
$priest_need = 0;
$rogue_need = 0;
$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."
//Death Knight
$blood_deathknight = 0;
$frost_deathknight = 0;
$unholy_deathknight = 0;
//Druid
$feral_druid = 0;
$resto_druid = 0;
$balance_druid = 0;
//Hunter
$needed_hunter = 0;
//Mage
$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 = 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
$blood_spec = 'Blood:';
$frostdk_spec = 'Frost:';
$unholy_spec = 'Unholy:';
$feral_spec = 'Feral:';
$resto_spec = 'Restoration:';
$balance_spec = 'Balance:';
$hunter_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="/scripts/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 details</center>
<table width="100%" height="8">
<tbody>
<tr>
<td width="70%" class="tbcphp"><img alt="" src="/images/wow_class_icons/deathknight_icon.gif" />D. Knight</td>
<td valign="bottom"><strong>' . displayTT($deathknight_need,$blood_spec,$blood_deathknight,$frostdk_spec,$frost_deathknight,$unholy_spec,$unholy_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/wow_class_icons/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="/images/wow_class_icons/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="/images/wow_class_icons/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="/images/wow_class_icons/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="/images/wow_class_icons/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="/images/wow_class_icons/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="/images/wow_class_icons/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="/images/wow_class_icons/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="/images/wow_class_icons/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="/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>
';
Hello,
I changed the code for german users:
//***********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 = 1;
$mage_need = 2;
$paladin_need = 3;
$priest_need = 4;
$rogue_need = 0;
$shaman_need = 1;
$warlock_need = 2;
$warrior_need =3;
$deathknight_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."
//Druid
$needed_druid = 0;
$feral_druid = 0;
$resto_druid = 0;
$balance_druid = 0;
//Hunter
$needed_hunter = 0;
$tier_hunter = 0;
$treff_hunter = 0;
$leben_hunter = 0;
//Mage
$needed_mage = 0;
$frost_mage = 0;
$fire_mage = 0 ;
$arcan_mage = 0;
//Paladin
$needed_paladin = 0;
$holy_paladin = 0;
$prot_paladin = 0;
$ret_paladin = 0;
//Priest
$needed_priest = 0;
$holy_priest = 0;
$shad_priest = 0;
$disc_priest = 0;
//Rogue
$needed_rogue = 0;
$meuch_rogue = 0;
$kampf_rogue = 0;
$taeusch_rogue = 0;
//Shaman
$needed_sham = 0;
$resto_sham = 0;
$enhance_sham = 0;
$elemental_sham = 0;
//Warlock
$needed_warlock = 0;
$gebr_warlock = 0;
$daem_warlock = 0;
$zerst_warlock = 0;
//Warrior
$needed_war = 0;
$prot_war = 0;
$arms_war = 0;
$fury_war = 0;
//Death Knight
$needed_deathknight = 0;
$blood_deathknight = 0;
$frost_deathknight = 0;
$unholy_deathknight = 0;
//--COLORS--//
/*
$closed_color = 'grey';
$low_color = 'red';
$medium_color = 'orange';
$high_color = 'yellow';
$open_color = 'green';
*/
//--LOCALIZATION--//
//LANGUAGE VARIABLES FOR EACH SPEC
$druid_spec = 'Gesamt:';
$feral_spec = 'Wilder Kampf:';
$resto_spec = 'Wiederherstellung:';
$balance_spec = 'Gleichgewicht:';
$hunter_spec = 'Gesamt:';
$tier_spec = 'Tierherrschaft:';
$treff_spec = 'Treffsicherheit:';
$leben_spec = 'ÃÅ"berleben:';
$mage_spec = 'Gesamt:';
$frost_spec = 'Frost:';
$fire_spec = 'Feuer:';
$arcane_spec = 'Arkan:';
$paladin_spec = 'Gesamt:';
$holy_spec = 'Heilig:';
$prot_spec = 'Schutz:';
$ret_spec = 'Vergeltung:';
$priest_spec = 'Gesamt:';
$heil_spec = 'Heilig:';
$disz_spec = 'Heilig:';
$shadow_spec = 'Schatten:';
$rogue_spec = 'Gesamt:';
$meuch_spec = 'Meucheln:';
$kampf_spec = 'Kampf:';
$taeusch_spec = 'Täuschung:';
$sham_spec = 'Gesamt:';
$elemental_spec = 'Elementar:';
$enhance_spec = 'Verstärkung:';
$resto_spec = 'Wiederherstellung:';
$warlock_spec = 'Gesamt:';
$gebr_spec = 'Gebrechen:';
$daem_spec = 'Dämonologie:';
$zerst_spec = 'Zerstörung:';
$warior_spec = 'Gesamt:';
$arms_spec = 'Waffen:';
$fury_spec = 'Furor:';
$rot_spec = 'Schutz:';
$death_spec = 'Gesamt:';
$blood_spec = 'Blut:';
$frostdk_spec = 'Frost:';
$unholy_spec = 'Unheilig:';
//************************END CONFIG****************************
//*************************FUCNTIONS****************************
function printClassStatus($className)
{
switch($className)
{
case 0: return '<font color="grey">unnötig</font>';
case 1: return '<font color="red">wenig</font>';
case 2: return '<font color="orange">mittel</font>';
case 3: return '<font color="yellow">dringend</font>';
case 4: return '<font color="green">sehr dringend</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'
<script type="text/javascript" src="./wz_tooltip/wz_tooltip.js"></script>
<center>Geh über den Dringlichkeitsgrad für Details</center>
<table width="100%" height="8">
<tbody>
<tr>
<td width="70%" class="tbcphp"><img alt="" src="wow/druid_icon.gif" />Druide</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" />Jäger</td>
<td valign="bottom"><strong>' . displayTT($hunter_need,$tier_spec,$tier_hunter,$treff_spec,$treff_hunter,$leben_spec,$leben_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" />Magier</td>
<td valign="bottom"><strong>' . displayTT($mage_need,$frost_spec,$frost_mage,$fire_spec,$fire_mage,$arcane_spec,$arcan_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" />Priester</td>
<td valign="bottom"><strong>' . displayTT($priest_need,$holy_spec,$holy_priest,$disz_spec,$disc_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" />Schurke</td>
<td valign="bottom"><strong>' . displayTT($rogue_need,$meuch_spec,$meuch_rogue,$kampf_spec,$kampf_rogue,$taeusch_spec,$taeusch_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" />Schamane</td>
<td valign="bottom"><strong>' . displayTT($shaman_need,$resto_spec,$resto_sham,$enhance_spec,$enhance_sham,$elemental_spec,$elemental_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" />Hexer</td>
<td valign="bottom"><strong>' . displayTT($warlock_need,$gebr_spec,$gebr_warlock,$daem_spec,$daem_warlock,$zerst_spec,$zerst_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" />Krieger</td>
<td valign="bottom"><strong>' . displayTT($warrior_need,$arms_spec,$arms_war,$fury_spec,$fury_war,$prot_spec,$prot_war) . '</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/deathknight_icon.gif" />Todesritter</td>
<td valign="bottom"><strong>' . displayTT($deathknight_need,$blood_spec,$blood_deathknight,$frostdk_spec,$frost_deathknight,$unholy_spec,$unholy_deathknight) . '</strong></td>
<td width="10%"> </td>
</tr>
</tbody>
</table>
<table width="100%" height="8">
<tbody>
<tr>
<td class="tbcphp"><center><i>Natürlich darfst Du dich unabhängig von dem was wir gerade suchen, immer bewerben.</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">Bitte registriere Dich zuerst!</a><br />
</div>
</td>';
}
else
{
echo'
<td> <br />
<div align="center"><a href="/forum/index.php?board=3.0">Bewirb dich hier</a><br />
</div>
</td>';
}
echo'
</tr>
</tbody>
</table>
</font>
';
Preview: preview on my homepage (http://www.cimmeria.de)
PS. onmouse event is fixed (next post) thanks a lot Inny ;)
German code translation is missing the onmouseout event.
Fix can be found Here (http://www.tinyportal.net/index.php/topic,19751.msg185107.html#msg185107)
I've never written much PHP so I decided to try this with arrays and foreach loops rather than a function, mostly just to see if I could. So, if anyone is interested in it (or has any advice or critiques) I thought I would share:
// SMF-TinyPortal WoW Recruitment Block - ver. 0.5
// Author: Raugturi (Raugturi@gmail.com)
// Created: April 01, 2009
// Last Update: April 02, 2009
// Code to display list of classes for WoW along with current
// recruitment status (Closed, Low, Medium and High) and gives
// specific specs/number needed in Tooltip.
//
// Requires wz_tooltip to be loaded in the page
// http://www.walterzorn.com/tooltip/tooltip_e.htm
// ******************
// * Config Section *
// ******************
// Recruitment Page: Path to Recruitment page
$recruitment_page = 'index.php?board=2.0';
// Image Directory: Path to icon folder
// Note: Must contain trailing '/'
$icon_dir = 'images/';
// Status Colors: Set the color for each status here.
$closed_color = '#8B0000';
$low_color = '#FF4500';
$medium_color = '#FF8C00';
$high_color = '#006400';
// Class Arrays
// Variables:
// Name - Type: Text, Value: Class name
// Status - Type: Integer, Value: 0=closed, 1=low, 2=medium, 3=high
// Icon - Type: Text, Value: Name of class icon image
// Specs - Type: Array, Element Format: Key = Spec, Value = Number Need (ex. 'DPS' => 1)
$classlist = array(
array(
'name' => 'Emo Noobs',
'status' => 0,
'icon' => 'emo_noob.gif',
'specs' => array('\/wrists' => '<<u>^^^</u>\}==\]...\[==\{<u>^^^</u>> (sword-chuks)')),
array(
'name' => 'Death Knight',
'status' => 1,
'icon' => 'dk_icon.gif',
'specs' => array('DPS' => 1,'Tank' => 0)),
array(
'name' => 'Druid',
'status' => 2,
'icon' => 'druid_icon.gif',
'specs' => array('Balance' => 1, 'Feral' => 0, 'Resto' => 1)),
array(
'name' => 'Hunter',
'status' => 1,
'icon' => 'hunter_icon.gif',
'specs' => array('Any' => 1)),
array(
'name' => 'Mage',
'status' => 1,
'icon' => 'mage_icon.gif',
'specs' => array('Any' => 1)),
array(
'name' => 'Paladin',
'status' => 3,
'icon' => 'paladin_icon.gif',
'specs' => array('Holy' => 2, 'Prot' => 1, 'Ret' => 1)),
array(
'name' => 'Priest',
'status' => 2,
'icon' => 'priest_icon.gif',
'specs' => array('Disc' => 1, 'Holy' => 1, 'Shadow' => 0)),
array(
'name' => 'Rogue',
'status' => 1,
'icon' => 'rogue_icon.gif',
'specs' => array('Any' => 1)),
array(
'name' => 'Shaman',
'status' => 3,
'icon' => 'shaman_icon.gif',
'specs' => array('Enhancement' => 1, 'Elemental' => 1, 'Restoration' => 1)),
array(
'name' => 'Warlock',
'status' => 2,
'icon' => 'warlock_icon.gif',
'specs' => array('Any' => 2)),
array(
'name' => 'Warrior',
'status' => 2,
'icon' => 'warrior_icon.gif',
'specs' => array('DPS' => 1, 'Prot' => 1)
));
//**********************
//* END Config Section *
//**********************
//*********************************
//* Do not edit below here unless *
//* you know what you are doing!! *
//*********************************
echo '
<table width="100%">';
foreach ($classlist as $class) {
switch ($class['status']) {
case 0:
$status = '<font color="' . $closed_color . '">Closed</font>';
break;
case 1:
$status = '<font color="' . $low_color . '">Low</font>';
break;
case 2:
$status = '<font color="' . $medium_color . '">Medium</font>';
break;
case 3:
$status = '<font color="' . $high_color . '">High</font>';
break;
}
$tooltip = '<table width=100% cellpadding=0 cellspacing=0>';
foreach ($class['specs'] as $key => $value) {
$tooltip = $tooltip . '<tr><td>' . $key . ': </td><td width=5px> </td><td align=right>' . $value . '</td></tr>';
}
$tooltip = $tooltip . '</table>';
echo '
<tr>
<td><img src="' . $icon_dir . $class['icon'] . '"> ' . $class['name'] . '</td>
<td align="right"><a style="text-decoration: none;" href="javascript:void(0);" onmouseover="Tip(\'' . $tooltip . '\')" onmouseout="UnTip()">' . $status . '</a></td>
</tr>';
}
echo '
<tr>
<td align="center" colspan=2>
<a href="' . $recruitment_page . '">Apply Here</a>
<hr />
<font size="-2">Mouseover status<br />for details.</font>
</td>
</tr>
</table>
';
Welcome to TinyPortal Raugturi.
Thanks for sharing. :up:
i like your emo noobs idea :P
Gonna give it a try when i get home and get back to you.
Thank you Ken.
Quote from: Inny on April 02, 2009, 01:33:12 PM
i like your emo noobs idea :P
Gonna give it a try when i get home and get back to you.
I completely forgot that I left that in there. Glad you like it. :)
I like it, it cleans the original idea up a bit. Something Moocat asked to be done originally anyway.
I might change
href="#"
back to
href="javascript:void(0);"
It's just a personal preference.
None the less it works well and the emo noobs is a nice touch. :laugh:
Yeah, I copied that part from another section and didn't even think about it, but I agree that the javascript:void(0); is better. Updated script to use it instead. Thanks.
Okay so i can't make the wz_tooltip work.. exactly where shall i put the files, and what line in what shall i put the loading script?
So far i tried putting the wz_tooltip folder inside theme folders, then the root forum directory..
Both times with the loading script here in the index.template.php file:
</head>
<body>
<script type="text/javascript" src="wz_tooltip.js"></script>
Since it said on the website, to put it there.. but i am clearly messing up something since the tooltip ain't working :)
Drop I had to do was drop the scripts in \forum\scripts\wz_tooltip and popped the code in a block. I didn't modify the template at all.
That said Im also using nitebree's WoW Character Profiles that uses overlib.js so it could be possible its using that instead. *shrug*
If nothing else works for you I usually put javascript calls like that before the end header tag. Try...
<script type="text/javascript" src="wz_tooltip.js"></script>
</head>
<body>
Quote from: garou on April 13, 2009, 03:59:59 PM
Drop I had to do was drop the scripts in \forum\scripts\wz_tooltip and popped the code in a block. I didn't modify the template at all.
That said Im also using nitebree's WoW Character Profiles that uses overlib.js so it could be possible its using that instead. *shrug*
If nothing else works for you I usually put javascript calls like that before the end header tag. Try...
<script type="text/javascript" src="wz_tooltip.js"></script>
</head>
<body>
I don't have any scripts folder :s should i just make it manually or is it something your other stuff made for you?
That is something I made as I have a few other scripts on my site and that way I can keep them together.
How do I go about changing the color of the text and bg in the tooltips?
Quote from: shadrach on April 21, 2009, 04:57:31 PM
How do I go about changing the color of the text and bg in the tooltips?
The place to change these is in the wz tooltip js file.
Background color is on line 59.
Font color is on line 79.
I like this script and would really like to be able to use it in my wordpress sidebar. Does anyone know how to change the code so it could work in wordpress?
This forum is not about WP, therefor we do not support your request. You have to seek help from WP forum for the content you want to have
okay i really code dumb i got the code to work but i figure out where to put the wz_tooltip at.Any help would be great.I also uploaded the images and they aren't working as well lol please help :P
http://acfew.com/Forum/index.php
Which version of the code are you using ?
I am not familiar with this block, but in the original code it says this about wz_tooltip :
QuoteRequires wz_tooltip on your server inside folder "wz_tooltip"
It also tells you where to put the images.
the latest one posted on page 3 english one
i did put the images inside the wow folder where it said too
also do i just create a folder on the website and name it wz_tooltip
soory about allthis but i'm lost
You should be able to put the wz_tooltip.js anywhere you like by editing this part...
<script type="text/javascript" src="/scripts/wz_tooltip/wz_tooltip.js"></script>
Quotei did put the images inside the wow folder where it said too
Yes, but unfortunately the person that wrote the bit of code you were working from decided to move the images into a different place.
I have attached a zip file with the correct folder structure. Unzip it as it is and upload it to your forum folder, by which I mean the folder that contains the main
index.php. So that you have a folder called 'images' in with the 'sources' and 'Themes' folders etc.
Let me know if that works. You can remove the other folder you put there.
Garou is correct, that line specifies where it will look for the javascript.
I love the script! even though the images were a bit to compressed, so i made new ones with a png extension.
Just change the .gif in the script to .png, upload the pngs in the same folder where the gifs are and your new ones are up!
See attachment for the icons.
I know that this is old as hell, but im trying to find the ws_tootip file and its no where to be found. Anyone have an idea?
Thanks for the help ahead of time.
HaX
Never mind im an idiot.
Thanks anyways.
I've run into a problem with the code. There is too much space in some of the mouseovers (the ones with few rows).
Example: Fine (http://img291.imageshack.us/i/31765857.jpg/) vs Too Much Space (http://img443.imageshack.us/i/42856147.jpg/).
The code is here:
http://www.furious-resurrection.com/frtest/wz_tooltip/wz_tooltip.js (http://www.furious-resurrection.com/frtest/wz_tooltip/wz_tooltip.js)
//***********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)
$dk_need = 0;
$druid_need = 0;
$hunter_need = 0;
$mage_need = 0;
$paladin_need = 0;
$priest_need = 0;
$rogue_need = 0;
$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."
//Death Knight
$tank_dk = Closed;
$dps_dk = Closed;
//Druid
$balance_druid = Closed;
$feraltank_druid = Closed;
$feraldps_druid = Closed;
$resto_druid = Closed;
//Hunter one spec
$any_hunter = Closed;
//Mage one spec
$any_mage = Closed;
//Paladin
$holy_paladin = Closed;
$prot_paladin = Closed;
$ret_paladin = Closed;
//Priest
$disc_priest = Closed;
$holy_priest = Closed;
$shadow_priest = Closed;
//Rogue one spec
$any_rogue = Closed;
//Shaman
$elemental_sham = Closed;
$enhance_sham = Closed;
$resto_sham = Closed;
//Warlock one spec
$any_warlock = Closed;
//Warrior
$furyarms_war = Closed;
$prot_war = Closed;
//--COLORS--//
/*
$closed_color = 'red';
$low_color = 'green';
$medium_color = 'orange';
$high_color = 'red';
$open_color = 'green';
*/
//--LOCALIZATION--//
//LANGUAGE VARIABLES FOR EACH SPEC
$blood_spec = 'Blood (Tank):';
$dps_spec = 'Unholy/Frost (DPS):';
$balance_spec = 'Balance:';
$feraltank_spec = 'Feral (Tank):';
$feraldps_spec = 'Feral (DPS):';
$resto_spec = 'Restoration:';
$anyhunter_spec = 'Any Spec:';
$anymage_spec = 'Any Spec:';
// holy taken from priest
$prot_spec = 'Protection:';
$ret_spec = 'Retribution:';
$disc_spec = 'Discipline:';
$holy_spec = 'Holy:';
$shadow_spec = 'Shadow:';
$anyrogue_spec = 'Any Spec:';
// resto taken from druid
$enhance_spec = 'Enhancement:';
$elemental_spec = 'Elemental:';
$anywarlock_spec = 'Any Spec:';
$furyarms_spec = 'Fury/Arms:';
$prot_spec = 'Protection:';
//************************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>\')" onmouseout="UnTip()">' . printClassStatus($class) . '</a>';
}
//**********************END FUNCTIONS****************************
// add <td width="10%"> </td> last if needed
echo'
<center><a href="http://www.furious-resurrection.com/"<img src="http://www.furious-resurrection.com/frtest/Themes/inferno_20rc3/images/RecruitmentDetails.png"></a><br><br>
<a href="http://www.furious-resurrection.com/"<img src="http://www.furious-resurrection.com/frtest/Themes/inferno_20rc3/images/ApplyNow.png"></a></center><br>
<table width="100%">
<tbody>
<tr>
<td width="70%" class="tbcphp"><img alt="" src="wow/dk_icon.gif" />Death Knights</font></td>
<td valign="bottom"><strong>' . displayTT($dk_need,$blood_spec,$tank_dk,$dps_spec,$dps_dk) . '</strong></td>
</tr>
</tbody>
</table>
<table width="100%">
<tbody>
<tr>
<td width="70%" class="tbcphp"><img alt="" src="wow/druid_icon.gif" />Druid</font></td>
<td valign="bottom"><strong>' . displayTT($druid_need,$balance_spec,$balance_druid,$feraltank_spec,$feraltank_druid,$feraldps_spec,$feraldps_druid,$resto_spec,$resto_druid) . '</strong></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,$anyhunter_spec,$any_hunter) . '</strong></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,$anymage_spec,$any_mage) . '</strong></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>
</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,$disc_spec,$disc_priest,$holy_spec,$holy_priest,$shadow_spec,$shadow_priest) . '</strong></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,$anyrogue_spec,$any_rogue) . '</strong></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,$elemental_spec,$elemental_sham,$enhance_spec,$enhance_sham,$resto_spec,$resto_sham) . '</strong></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,$anywarlock_spec,$any_warlock) . '</strong></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,$furyarms_spec,$furyarms_war,$prot_spec,$prot_war) . '</strong></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="/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>
';
I need to get rid of the space so that all the tooltips look like the "fine" one :) Any help is appreciated! Thanks <3
ecofish
Please Read and Follow the Posting Guidelines and be sure to use the posting template at the bottom of that post (http://www.tinyportal.net/index.php/topic,581), specifically we need to know what versions of SMF and TinyPortal you are using in order to help you.
ZarPrime
Thanks ZarPrime,
I doubt the problem is related to neither my portal software (SimplePortal) nor SMF. But rather the block code or the tooltip code itself -- which I've found in this very thread.
But I'll post the details anyways :)
Link to my site: http://www.furious-resurrection.com/frtest
SMF version: SMF 2.0 RC3
TP version: Using SimplePortal 2.3.2. The reason I am addressing my question here is that the specific block code is found here; and I don't think it's a bug more than just a tweak.
Theme name and version: Dzinerstudio - Inferno
Browser Name and Version: Firefox/3.6.3
Mods installed: Only SimplePortal.
Related Error messages: None; I am asking for a tweak to the block code found in this thread :)
Sorry I don't know javavscript so can't help here.
ecofish,
If you are seeking help for a block code snippet that was written to work with TinyPortal but you are not even using TinyPortal, why would you seek support here on TinyPortal to make it work right on your site? Does anyone else see a problem with this picture? :o :buck2:
In any case, the code has standard php calls and no database calls to TP functions so it should work fine whether you are using TinyPortal or not. I looked at your site, and it looks fine to me even though there is a little bit of a larger gap under a couple of the tooltips. I don't think this has anything to do with the code. It seems to be the way the wz_tooltips was written but I can't be sure. However, even if I was a javascript guru and thought I had the knowledge to troubleshoot it, it seems that the site that has (or had) wz-tooltips.js on it is no longer available. For this reason, I can't even test your code on one of my test sites.
If it is a problem for you, I would suggest seeking out Walter Zorn for his advice on fixing the issue.
ZarPrime
Quote from: ZarPrime on May 20, 2010, 10:45:53 PM
ecofish,
If you are seeking help for a block code snippet that was written to work with TinyPortal but you are not even using TinyPortal, why would you seek support here on TinyPortal to make it work right on your site? Does anyone else see a problem with this picture? :o :buck2:
As I stated above, I posted my question here as the code comes from this very thread and because there are no conflicts with the portal software in the issue. I appreciated you helping me anyways :)
Quote from: ZarPrime on May 20, 2010, 10:45:53 PMIn any case, the code has standard php calls and no database calls to TP functions so it should work fine whether you are using TinyPortal or not. I looked at your site, and it looks fine to me even though there is a little bit of a larger gap under a couple of the tooltips. I don't think this has anything to do with the code. It seems to be the way the wz_tooltips was written but I can't be sure. However, even if I was a javascript guru and thought I had the knowledge to troubleshoot it, it seems that the site that has (or had) wz-tooltips.js on it is no longer available. For this reason, I can't even test your code on one of my test sites.
If you wish to test the script all you have to do is save the text file from my first post in notepad and save it as a ".js-file".
Quote from: ZarPrime on May 20, 2010, 10:45:53 PMIf it is a problem for you, I would suggest seeking out Walter Zorn for his advice on fixing the issue.
ZarPrime
Sadly his site is down.
Thanks for all your help anyhow, I really appreciate it :) I'll try to post this on an expert site; I'll make sure to post back here if I find a solution!
Thanks in advance!
Quote from: ecofish on May 24, 2010, 05:42:02 PM
Thanks for all your help anyhow, I really appreciate it :) I'll try to post this on an expert site; I'll make sure to post back here if I find a solution!
Please do. As I said, that small gap wouldn't be a concern for me but to each his own.
ZarPrime
For those that still use this script, Walter Zorn passed away in 2009. His family has resurrected his sites, unfortunately help is not available through the site any more but the WZ tooltip script is available at... walterzorn.de/en/tooltip/tooltip_e.htm (you may have to add the www but I can not post links).
Sorry to hear that. Thanks for the update garou.