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

Recent

Welcome to TinyPortal. Please login or sign up.

March 29, 2024, 10:34:27 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,106
  • Total Topics: 21,213
  • Online today: 358
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 114
  • Total: 114

[Block] WoW Ulduar Progress block

Started by maddogie, April 15, 2009, 11:19:30 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

maddogie

Hi all I've made an Progress block for my guild and I thought you guys might also want that code. So here it is.

Basicly it shows your guilds progress (for one specific instance) in a graphical manner. In our case the new Ulduar Instance.
You can easily adapt it for other instances. 
It shows a greenlight if a boss is down or a redlight if he's still alive.
Read the readme.txt in the zipped file for further instructions. 

You'll need the images included in the zipped file attached to this post in order to make this script work.

See it in action here.   


// SMF-TinyPortal WoW BossCounter Block - ver. 1.0

// Author: Moktarr of Eredar (maddogie@gmx.de)
// Created: April 10, 2009
// Last Update: April 14, 2009
// Tested on SMF 1.1.8 and TP 0.9.8

// Shows the progress in a single instance for both versions 10 and 25 players.
// greenlight = boss down | redlight = boss alive | cautionsign = false value check status
// You'll need to set the path to the required images
// Settings
// Find Settings start below to set bosses and status
// 'up' = not killed in any version
// '10' = killed in 10 player version
// '25' = killed in 25 player version
// 'all' = killed in 10 player and 25 player version
// edit value inside the first single quote to change the name of the Boss
// edit value inside the second single quote to change the status
// e.g. 'Bossname'=>'status'

// Setting start
$instance='Ulduar'; //Name of instance

$ar_bosse=array(
'Flame Leviathan'=>'up',
'Ignis'=>'up',
'Razorscale'=>'up',
'XT-002'=>'up',
'Iron Council'=>'up',
'Kologarn'=>'up',
'Auriaya'=>'up',
'Mimiron'=>'up',
'Freya'=>'up',
'Thorim'=>'up',
'Hodir'=>'up',
'General Vezax'=>'up',
'Algalon the observer'=>'up',
'Yogg-Saron'=>'up'
);
// Settings end
// Paths
  // Images
    $path_img_up = '<img src="img/redlight.png" />';
    $path_img_down = '<img src="img/greenlight.png" />';
    $path_img_error ='<img src="img/error.png" />';

// Do not change anything below this line unless you know what you're doing
echo '
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=windows-1250">
            <style type="text/css">
            <!--
                     
            .OneColFix #container {
                width:160px;
                border:1px solid #000000;
                text-align:left;
                margin-top:0;
                margin-right:auto;
                margin-bottom:0;
                margin-left:auto;
            }
            .OneColFix #content {
                padding-top:0;
                padding-right:1px;
                padding-bottom:0;
                padding-left:1px;
            }
            .bosses  {
                font-size:small;
            }
            #instance {
                padding-top:5px;
                padding-bottom:2px;
                font-size:large;
                text-align:center;
               
            }
            #footer {
                border: solid 1px #252525;
                padding: 5px;
                text-align: center;
                font-size: xx-small;
                color: #b2b2b2;
                background: #1d1d1d url(img/footer-bg.png);
            }
           
           
        -->
        </style>
    <title></title>
  </head>
    <body class="OneColFix">
        <div id="container">
            <div id="content">';
  echo '
        <div id="instance">' . $instance .'</div>
        <div id = "vericon"><img src="img/10.png" /><img src="img/25.png" /></div>';   

foreach ($ar_bosse as $boss=>$status) {
switch ($status) {
case 'up':
echo  '<div class="bosses">' . ' ' . $path_img_up . ' ' . $path_img_up . ' ' . $boss . "</div>\n";
break;
case '10':
  echo  '<div class="bosses">' . ' ' . $path_img_down . ' ' . $path_img_up . ' ' . $boss . "</div>\n";
  break;
  case '25':
    echo  '<div class="bosses">' . ' ' . $path_img_up . ' ' . $path_img_down . ' ' . $boss . "</div>\n";
  break;
  case 'all':
    echo  '<div class="bosses">' . ' ' . $path_img_down . ' ' . $path_img_down . ' ' . $boss . "</div>\n";
  break; 
default:
  echo  '<div class="bosses">' . ' ' . $path_img_error . $path_img_error . ' ' . $boss . "</div>\n";
break;
}
}
echo '
<div id="footer"><a href="http://greenskins.de">Black Legends</a> BossCounter V1<br />
Moktarr of Eredar</div>
            </div><!-- end #Content -->
        </div><!-- end #Container -->
    </body>
</html>';


Ken.

Hi maddogie, welcome to TinyPortal.

Thanks for the code, I'm sure it will be useful. :up:
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.


Inny

Able to add in the 10/25 columns a new option (tick/X icon) if its killed in hard-mode or not?  :buck2:

maddogie

Well everything is possible, it just depends how much time I have. ;)

To make a long story short. I'm already working on it.  8)

braucki

Hello,

works for me but blows my design of the forum. Using Tiny Portal 0.9.8 , SMF 1.1.8 and the IronWow template by Crip. Makes the Portal very small so you can't see everything correct. Any ideas?

maddogie

Quote from: braucki on May 02, 2009, 02:38:45 PM
Hello,

works for me but blows my design of the forum. Using Tiny Portal 0.9.8 , SMF 1.1.8 and the IronWow template by Crip. Makes the Portal very small so you can't see everything correct. Any ideas?


Well it looks like Crip is using the same tags/labels for CSS. No big deal.

You just need to edit a few lines.

find .OneColFix #container {


and add BC at the end
.OneColFix #containerBC {


find <div id="container">

change it to

<div id="containerBC">

It dosen't really matter what you add we just need a different name





braucki

Hello again,

thank you for the fast answer. Works now like a charm^^

Thanks alot

maddogie

#8
Ok folks today I had a few minutes to finish version 2 of the script.

I've added support for 10 and 25 Player hardmode.
If You've killed a boss in hardmode it will show a star instead of the normal image.

Again you need to upload all images inside the zipped file attached to this post.

Version 2.1 can be found on page 2


Deleted because it flooded the errorlog with error messages.

New Version 2.1 can be found below

Starrbuck

#9
This block is throwing off tons of errors in my SMF error log:

8: Use of undefined constant boss_name - assumed 'boss_name'
File: /home/public_html/legionofdarkness/smf/Themes/default/TPortal.template.php (tp_below sub template - eval?)
Line: 96


8: Use of undefined constant status - assumed 'status'
File: /home/public_html/legionofdarkness/smf/Themes/default/TPortal.template.php (tp_below sub template - eval?)
Line: 94


8: Use of undefined constant hardmode - assumed 'hardmode'
File: /home/legionofdarkness/smf/Themes/default/TPortal.template.php (tp_below sub template - eval?)
Line: 99


Any ideas?