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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 468
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 450
  • Total: 450

[Block]WoW Mist of Pandaria Recruitment

Started by wareZ[xv], August 16, 2012, 07:25:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wareZ[xv]

Name of Block: Mist of Pandaria recruitment block
SMF/TP versions tested: SMF 2.0.2 / TinyPortal 1.0
Block Type: php
Author: wareZ[xv]
Originally created by Moocat . I have taken his code and cleaned it up, updated it for Mists of Pandaria and added class colors to make it a bit more pretty.

Other Requirements: Requires WZ_tooltip and a few class images which I have attached.
Download: https://www.dropbox.com/s/6m533zwu5vg5i6y/moprecruitment.zip
Description: This is a nice simple block to show  your recruitment needs. At the bottom of the block it will display an apply link if you are logged in and if you are not logged in it will direct you to register first.

All original credit goes to MOOCAT, he did all the real work, all I did was update it and make it a little cleaner.



//**********TP: WOW RECRUITMENT BLOCK BY wareZ[xv]**************
//Version 2.0                                                  *
//                                                             *
//Requires wz_tooltip on your server inside folder "wz_tooltip"*
//in your forum directory.                                     *
//wz_tooltip can be found at:                                  *
//http://www.walterzorn.de/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 = 2;
$druid_need = 2;
$hunter_need = 2;
$mage_need = 2;
$monk_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."

//Death Knight
$blood_dk = 0;
$frost_dk = 0;
$unholy_dk = 0;

//Druid
$feralbear_druid = 0;
$feralcat_druid = 0;
$resto_druid = 0;
$balance_druid = 0;

//Hunter
$needed_hunter = 0;

//Mage
$needed_mage = 0;

//Monk
$brew_monk = 0;
$mist_monk = 0;
$wind_monk = 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

//Death Knight
$blood_spec = 'Blood:';
$frost_spec = 'Frost:';
$unholy_spec = 'Unholy:';

//Monk
$brew_spec = 'Brewmaster:';
$mist_spec = 'Mistweaver:';
$wind_spec = 'Windwalker:';

//Druid
$feralbear_spec = 'Feral(Bear):';
$feralcat_spec = 'Feral(Cat):';
$resto_spec = 'Restoration:';
$balance_spec = 'Balance:';

//Hunter
$hunter_spec = 'Needed:';

//Mage - Frost covered under dk
$mage_spec = 'Needed:';

//Paladin
$holy_spec = 'Holy:';
$prot_spec = 'Protection:';
$ret_spec = 'Retribution:';

//Priest - holy covered under pally
$shadow_spec = 'Shadow:';

//rogue
$rogue_spec = 'Needed:';

//Shaman - Resto covered under druid
$enhance_spec = 'Enhancement:';
$elemental_spec = 'Elemental:';

//Warlock
$warlock_spec = 'Needed:';

//Warrior - Prot covered under pally
$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 '
<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>Hover over the recruitment level for details</center>


<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="70%"><img alt="" style="vertical-align:middle" src="classicons/smalldk.png" /><font color="#C41F3B"><b>Death Knight</b></font></td>
            <td valign="middle"><strong>' . displayTT($dk_need,$blood_spec,$blood_dk,$frost_spec,$frost_dk,$unholy_spec,$unholy_dk) . '</strong></td>
            <td width="10%"> </td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="70%"><img alt="" style="vertical-align:middle" src="classicons/smalldruid.png" /><font color="#FF7D0A"><b>Druid</b></font></td>
            <td valign="middle"><strong>' . displayTT($druid_need,$feralbear_spec,$feralbear_druid,$feralcat_spec,$feralcat_druid,$resto_spec,$resto_druid,$balance_spec,$balance_druid) . '</strong></td>
            <td width="10%"> </td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="70%"><img alt="" style="vertical-align:middle" src="classicons/smallhunter.png" /><font color="#ABD473"><b>Hunter</b></font></td>
            <td valign="middle"><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%"><img alt="" style="vertical-align:middle" src="classicons/smallmage.png" /><font color="#69CCF0"><b>Mage</b></font></td>
            <td valign="middle"><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%"><img alt="" style="vertical-align:middle" src="classicons/smallmonk.png" /><font color="#558A84"><b>Monk</b></font></td>
            <td valign="middle"><strong>' . displayTT($monk_need,$brew_spec,$brew_monk,$mist_spec,$mist_monk,$wind_spec,$wind_monk) . '</strong></td>
            <td width="10%"> </td>
        </tr>
    </tbody>
</table>
<table width="100%" height="8">
    <tbody>
        <tr>
            <td width="70%"><img alt="" style="vertical-align:middle" src="classicons/smallpaladin.png" /><font color="#F58CBA"><b>Paladin</b></font></td>
            <td valign="middle"><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%"><img alt="" style="vertical-align:middle" src="classicons/smallpriest.png" /><font color="#FFFFFF"><b>Priest</b></font></td>
            <td valign="middle"><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%"><img alt="" style="vertical-align:middle" src="classicons/smallrogue.png" /><font color="#FFF569"><b>Rogue</b></font></td>
            <td valign="middle"><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%"><img alt="" style="vertical-align:middle" src="classicons/smallshaman.png" /><font color="#0070DE"><b>Shaman</b></font></td>
            <td valign="middle"><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%"><img alt="" style="vertical-align:middle" src="classicons/smallwarlock.png" /><font color="#9482C9"><b>Warlock</b></font></td>
            <td valign="middle"><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%"><img alt="" style="vertical-align:middle" src="classicons/smallwarrior.png" /><font color="#C79C6E"><b>Warrior</b></font></td>
            <td valign="middle"><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><center><i>Exceptional applicants of any class will be considered.</center></i>
             </td>
        </tr>
        <tr>';
if($user_info['is_guest'])
{
echo'
            <td><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>
';

wareZ[xv]


Freddy


Bondurant

Hello there and thank you for your work, it's really helpful. I have a question though, can you provide another download link for the package ? This one doesn't seem to work and I badly need the icons pack for the classes.
:)

ZarPrime

Bondurant,

Welcome to the TinyPortal Support Site.

I don't know what to tell you on this because I am not familiar with this download site.  I'm guessing that you might have to sign up to filedropper.com and then login in order to see the actual file to download but I don't know.  In any case, I have sent wareZ[xv] a PM and asked him to come back and respond to your question.

Quote from: ZarPrime on November 21, 2012, 06:19:20 AM
wareZ[xv],

The download link in your topic here on TinyPortal does not seem to be a valid link --> http://www.filedropper.com/moprecruitment

Someone is asking for the link and I don't know what to tell them.  The small icons on your live preview site seem to be .gif files rather than .png files or I would just tell the guy to save them from your site.  The code you are using specifies .png files and thus the confusion.  Anyway, here is a link to the topic.  Could you come back in and respond to the guy.  The topic is at --> http://www.tinyportal.net/index.php?topic=34999.0

Thanks in advance,
ZarPrime

wareZ[xv]

I'll take care of this later today when I get home. Sorry for the delay guys.

ZarPrime

wareZ[xv],

Did you forget us?  :-\

Quote from: wareZxv] link=topic=34999.msg279668#msg279668 date=1345141509]
Name of Block: Mist of Pandaria recruitment block
SMF/TP versions tested: SMF 2.0.2 / TinyPortal 1.0
Block Type: php
Author: wareZ[xv]
Originally created by Moocat . I have taken his code and cleaned it up, updated it for Mists of Pandaria and added class colors to make it a bit more pretty.

Other Requirements: Requires WZ_tooltip and a few class images which I have attached.
Download: http://www.filedropper.com/moprecruitment

Since your direct link for the file at http://www.filedropper.com/moprecruitment
doesn't seem to work, you can attach the file, if it's a zip file, to your next post and I will edit your first post above to point to the download.

ZarPrime

wareZ[xv]

Sorry, Ive been busy with the holidays and overwhelmed at work. I've located the zip file. Ill PM the link to ZarPrime to see if he can attach it to my original post.

Ok well for some reason I am not allowed to PM or even reply to Zarprimes PM. So I created a dropbox account for this and added it there. Try the link below (also updated the original post) and let me know if you have any issues with it.

https://www.dropbox.com/s/6m533zwu5vg5i6y/moprecruitment.zip

ZarPrime

Quote from: wareZxv] link=topic=34999.msg280182#msg280182 date=1354215989]
Ok well for some reason I am not allowed to PM or even reply to Zarprimes PM. So I created a dropbox account for this and added it there. Try the link below (also updated the original post) and let me know if you have any issues with it.

Ah, yeah, 4 posts is the reason.  One more post and you can use the PM system.  Sorry about that.

I just downloaded the file so I will add it to your first post at the top a little later.  Thanks wareZ[xv]. O0

ZarPrime

wareZ[xv]

Makes sense. Thanks for the quick response.

I did want to ask one thing. The live preview site has always had the images in PNG format, I am really unsure how you were getting GIF files.

Very odd to me. If I go to the site and right click the icon it gives me the option to download PNG files.

This website is proudly hosted on Crocweb Cloud Website Hosting.