collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 243
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Blocks speak! Do you have an interest in getting more blocks - or even making your own? The Blocks Board is for you!

Author Topic: Wow Raid Progression Code Assistance.  (Read 9297 times)

0 Members and 1 Guest are viewing this topic.

Offline Xerog

  • Newbie
  • Posts: 3
  • SMF Version: 1.1.12
  • SP Version: 2.3.3
Wow Raid Progression Code Assistance.
« on: January 07, 2011, 12:52:51 PM »
I was trying to come up with a way to post raid progression on our website and came across this code here.
http://www.tinyportal.co.uk/index.php?topic=19751.30

I am aware that this code was configured for use with tiny portal however I am able to plug the code into a custom php block and preview it but when I click add block the error I receive is... Syntax error in block code. Please check the code.

here is the code. I would just like to know if its possible for this to work in SP since I prefer it over TP and if so, what or where is the syntax error located?


/* WoW Progression Block - ver. 0.2
Author: Erik Gulliksen(progressionblock@erik-gulliksen.com) / Protarion of Pendulum  @ EU-Vek'Nilash.
Created: August 13, 2010
Last Update: August 14, 2010
Website: http://pendulum-guild.co.uk/index.php?topic=266.0

This is a code block that displays your raid progression for each individual raid and a tooltip with boss breakdowns. New raids and modes can easily be added by adding new arrays to the config section.
The script is loosely based on SMF-TinyPortal WoW Recruitment Block - ver. 0.5 by Raugturi (Raugturi@gmail.com).

This block code is released under a Creative Commons Attribution 3.0 Unported licence: http://creativecommons.org/licenses/by/3.0/

 Requires wz_tooltip to be loaded in the page
 http://www.walterzorn.com/tooltip/tooltip_e.htm (The official page appears to be down, a copy can be found at http://pendulum-guild.co.uk/wz_tooltip.js)

Changelog

0.2
* Background image for each raid
* Color seperate for each raid

0.1
* Initial release

*/

// ******************
// * Config Section *
// ******************



// Image Directory: Path to icon folder
// Note: Must contain trailing '/'
$image_dir = 'images/progress/';

// Status Colors: Set the color for each status here.
$notkilled_color = '#8B0000';
$killed_color = '#006400';




/*
== Instance arrays ==

Variables:
Name   - Type: Text,    Value: Instance shortname name (e.g ICC10HC, ICC25N, Nax25 or Nax10)
Display - Type: Integer, Value: 0=hidden, 1=visible
Bosses  - Type: Array,   Element Format: Key = Bossname, Value = Kill status (1 if killed,0 if not killed)
*/

$icc_instances = array(
array(
'name' => 'ICC10 (N)',
'display' => 1,
'bosses' => array('Lord Marrowgar' => 1,'Lady Deathwhisper' => 1,'Gunship Battle' => 1,'Deathbring Saurfang' => 1,'Festergut' => 1,'Rotface' => 1,'Professor Putricide' => 1,'Blood Prince Council' => 1,'Blood-Queen Lana\\\'thel' => 1,'Valithria Dreamwalker' => 1,'Sindragosa' => 1,'The Lich King' => 1)),
array(
'name' => 'ICC10 (HC)',
'display' => 1,
'bosses' => array('Lord Marrowgar' => 1,'Lady Deathwhisper' => 1,'Gunship Battle' => 1,'Deathbring Saurfang' => 0,'Festergut' => 1,'Rotface' => 1,'Professor Putricide' => 0,'Blood Prince Council' => 0,'Blood-Queen Lana\\\'thel' => 1,'Valithria Dreamwalker' => 1,'Sindragosa' => 0,'The Lich King' => 0)),
array(
'name' => 'ICC25 (N)',
'display' => 0,
'bosses' => array('Lord Marrowgar' => 1,'Lady Deathwhisper' => 1,'Gunship Battle' => 1,'Deathbring Saurfang' => 1,'Festergut' => 1,'Rotface' => 0,'Professor Putricide' => 0,'Blood Prince Council' => 0,'Blood-Queen Lana\\\'thel' => 0,'Valithria Dreamwalker' => 0,'Sindragosa' => 0,'The Lich King' => 0)),
array(
'name' => 'ICC25 (HC)',
'display' => 0,
'bosses' => array('Lord Marrowgar' => 0,'Lady Deathwhisper' => 0,'Gunship Battle' => 0,'Deathbring Saurfang' => 0,'Festergut' => 0,'Rotface' => 0,'Professor Putricide' => 0,'Blood Prince Council' => 0,'Blood-Queen Lana\\\'thel' => 0,'Valithria Dreamwalker' => 0,'Sindragosa' => 0,'The Lich King' => 0))
);





$rs_instances = array(
array(
'name' => 'RS10 (N)',
'display' => 1,
'bosses' => array('Saviana Ragefire' => 1,'Baltharus the Warborn' => 1,'General Zarithrian' => 1,'Halion' => 0)),
array(
'name' => 'RS10 (HC)',
'display' => 0,
'bosses' => array('Saviana Ragefire' => 0,'Baltharus the Warborn' => 0,'General Zarithrian' => 0,'Halion' => 0)),
array(
'name' => 'RS25 (N)',
'display' => 0,
'bosses' => array('Saviana Ragefire' => 0,'Baltharus the Warborn' => 0,'General Zarithrian' => 0,'Halion' => 0)),
array(
'name' => 'RS25 (HC)',
'display' => 0,
'bosses' => array('Saviana Ragefire' => 0,'Baltharus the Warborn' => 0,'General Zarithrian' => 0,'Halion' => 0))
);

/*
== Raid arrays ==

Variables:
Name   - Type: Text,    Value: Raid name
Color - Type: Text, Value: HTML color code, e.g. '#FF2B43'
Image - Type: Text, Value: Filename of the image. Will be appended to the image directory defined up top.
Instances  - Type: Instance Array, Value: Use the corresponding $variable defined above
*/
$icc = array(
'name' => 'Icecrown Citadel',
'color'  => '#BBFF00',
'image' => 'icc.jpg',
'instances' => $icc_instances
);

$rs = array(
'name' => 'Ruby Sanctum',
'color'  => '#FF8C00',
'image' => 'rs.jpg',
'instances' => $rs_instances
);


/*
== Main progress array ==

Fill the array with the Raid Arrays defined directly above in the order you want them displayed.
*/
$progress = array(
   $icc,
   $rs
);


//**********************
//* END Config Section *
//**********************

//*********************************
//* Do not edit below here unless *
//* you know what you are doing!! *
//*********************************


foreach ($progress as $raid) {
   echo '<table width="100%" style="background-image:url(\''.$image_dir.$raid['image'].'\');"><tr><td colspan="2" style="color:'.$raid['color'].';">'.$raid['name'].'</td></tr>';
   
   
   foreach($raid['instances'] as $instance) {
      if($instance['display'] == 0)
         continue;
     
     
      $killcount = 0;
      // Creation of the mouseover tooltip for each instance
      $tooltip = '<table width=100% cellpadding=0 cellspacing=0>';
      foreach ($instance['bosses'] as $key => $value) {
         //$color = $value ? $killed_color : $notkilled_color;
         $style = $value ? "color:$killed_color ;" : "text-decoration:line-through;color:$notkilled_color ;";
         $tooltip = $tooltip . '<tr><td style=\\\''.$style.' \\\'> ' . $key . ' </td></tr>';
         $killcount += $value;
      }
      $tooltip = $tooltip . '</table>';
     
      $killcount_text = ' ['.$killcount.'/'.count($instance['bosses']).']';
      echo '<tr><td></td><td align="right"><a style="text-decoration: none;color:'.$raid['color'].';" href="javascript:void(0);" onMouseover="Tip(\'' . $tooltip . '\')" onMouseout="UnTip()">' . $instance['name'] . $killcount_text . '[/url]</td></tr>';
     
   }
   echo '</table>';
}