Advertisement:

Author Topic: WoW - World of Warcraft Tooltips  (Read 74778 times)

Offline Daehoidar

  • Newbie
  • *
  • Posts: 2
Re: WoW - World of Warcraft Tooltips
« Reply #20 on: April 17, 2009, 11:47:42 AM »
Daehoidar, I haven't tested any other languages but it should work.

In wowhead_wrapper.php find...
Code: [Select]
header("Content-type: text/xml");
$url = "http://www.wowhead.com/?item=".urlencode(addslashes($_GET['item']))."&xml";

And replace with...
Code: [Select]
header("Content-type: text/xml");
$url = "http://es.wowhead.com/?item=".urlencode(addslashes($_GET['item']))."&xml";

This should also work for other languages hxxp:static.wowhead.com/widgets/power/demo.html? [nonactive] supports as well. However they say
Quote
Localized links (requires your site to use UTF-8 encoding)

My site use UTF-8 and it doesn't work your mod changing the line to put into spanish.

Do you know why?

Thanks.

Offline tattooedpierre

  • Semi-Newbie
  • *
  • Posts: 38
Re: WoW - World of Warcraft Tooltips
« Reply #21 on: April 17, 2009, 01:09:52 PM »
I tested with and with out SP and it works fine.

The mod runs on my test server, which has fopen enabled but not libcurl. I've instaled on another server that has libcurl but not fopen and it runs fine.  It also ran the SMF tested it on before they approved it.

That said I'm currently working on another server that also has libcurl and fopen enabled but the mod isn't working. I'm looking into it and I'm convinced that there are other server settings required that I have on my test server that some servers do not. Once I figure it out ill include the instructions here and in the mod.

In the meantime all I can say is that this mod may not work on all servers. I wish I had a better answer but I haven't found it yet.

Thanks for checking this out. I think it might be a PHP setting too, as I've really nothing I can think of installed that could interfere. Thanks for your perseverance ;)

Offline Garou

  • Sr. Member
  • ****
  • Posts: 759
  • Gender: Male
  • On Hiatus.
    • Balance Games
Re: WoW - World of Warcraft Tooltips
« Reply #22 on: April 19, 2009, 08:00:33 AM »
Daehoidar, from reading the message boards at Wowhead many people are having issues with alternate languages and Wowhead tooltips even without this type of script.

tattooedpierre, What I'm learning is that some of the web hosts out there don't like this kind of script. As far as they are concerned its an injection script, their security software is seeing this and effectively shutting it down. Even though this script is not harmful to your site, allowing this type of script will open the doors for other ones that are. That is what one host told me anyway.

Now I'm really frustrated and confused on how to proceed with this mod because re-writing it to account for this type of security software will remove most of the functionality of it and essentially you wouldn't really need a mod anyway, You would just need to add the power.js to index template to get tooltips using regular links.

Offline Garou

  • Sr. Member
  • ****
  • Posts: 759
  • Gender: Male
  • On Hiatus.
    • Balance Games
Re: WoW - World of Warcraft Tooltips
« Reply #23 on: April 20, 2009, 10:32:17 PM »
Thanks to Bluto of Bluto's Hosting a fix has been found. :)

Sites using ModSecurity Version 2.1 and higher will need to make sure that the wow folder in SMF's Root directory and the files inside are set with permissions 644. That should solve the issues where libcurl and/or fopen is enabled and the mod still isnt working.

Thanks again Bluto you rock man.   :D

I should also point out that if you are still having problems talk to your web host about false positives with System Command Injection. Apparently this rule as updated in 2.1 of mod_security causes many issues with scripts for SMF, WordPress, and others. There are a couple different workarounds for this, just let your host know they should know what to do as its a common issue.
« Last Edit: April 20, 2009, 11:12:44 PM by Garou »

Offline GreenX

  • Semi-Newbie
  • *
  • Posts: 15
Re: WoW - World of Warcraft Tooltips
« Reply #24 on: April 21, 2009, 03:12:50 PM »
Installed everything as stated.

fopen and clib both open for my host.

when I make a item link example:

"Blackguard"

I get no tooltip and the link is my theme default color instead of purple. I click the link and get the following error:

Quote
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@mysite.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at mysite.com Port 80

Offline Garou

  • Sr. Member
  • ****
  • Posts: 759
  • Gender: Male
  • On Hiatus.
    • Balance Games
Re: WoW - World of Warcraft Tooltips
« Reply #25 on: April 22, 2009, 07:22:38 AM »
This is exactly what I posted about in the post above yours. Your host is using ModSecurity and it gives the wowhead_wrapper.php a false positive as an injection script.

First make sure that the files in the wow folder have permissions set to 644. If that doesn't fix it contact your web host about bypassing the System Command Injection rule.

Since its been brought to my attention I have found several ways your host can get around this on the net but it up to them to decide which will work best for their particular set up. One that I have found is at http://blog.modsecurity.org/2007/02/handling-false.html

Offline ltdeta

  • Jr. Member
  • **
  • Posts: 141
  • Gender: Male
    • WoW - KoS
Re: WoW - World of Warcraft Tooltips
« Reply #26 on: April 23, 2009, 10:44:01 AM »
feature request:
- multilanguage support for wowhead. (user can deside the language)

german: http://de.wowhead.com/?item=34432
englisch: http://www.wowhead.com/?item=34432]
france: http://fr.wowhead.com/?item=34432]
......




Offline tattooedpierre

  • Semi-Newbie
  • *
  • Posts: 38
Re: WoW - World of Warcraft Tooltips
« Reply #27 on: April 23, 2009, 01:55:05 PM »
Thanks for all your efforts Garou. I run my own server on a dedicated ubunutu server box. I dont have SELinux or mod_security installed (I actually thought it was installed on the stock apache2 ubuntu, shame on me). The only glimmer of hope I can see is that in my logs, I see an Access is Denied error for the wow/ directory. I tried chmod 644 and chown the files but nothing for the minute is working out. I'll look into it further but if you have any other thoughts let me know ;)

Offline Garou

  • Sr. Member
  • ****
  • Posts: 759
  • Gender: Male
  • On Hiatus.
    • Balance Games
Re: WoW - World of Warcraft Tooltips
« Reply #28 on: April 23, 2009, 10:31:22 PM »
Interesting. I installed ubunutu in VM on my windows machine for a time and while I think its great for people that are new to computers or converting from windows, I still prefer to do it all old school with fedora.

With the latest headaches I'm seeing with mod_security I'm beginning to think its over kill. Being safe is one thing but when it comes to the point that its hampering productivity, I just cant see using it, especially on a small private server.  It may be useful for on a larger server where your hosting a bunch of other people but I haven't gotten into that end of it yet.

Currently I'm building a demo site for my mods over at Bluto's hosting and we went through hell tracking down why it wouldn't work. In the end Bluto found the fix for it after I pretty much snapped and gave up. I even was ready to take the mod off SMF, I was so frustrated.

It could be something with .htaccess or your httpd.conf file that is blocking it.

It could also be something as simple as dropping an index.html or php in the folder. I planned on doing this in an update anyway to prevent people from getting into the directory from the outside easily.

The only other thing I can think of is that I changed part of the wowhead_wrapper.php on a suggestion from The SMF Customize Team when they were checking out the mod for approval...
Code: [Select]
$wowhead_use_fopen = !function_exists('curl_init');You can try to change that to...
Code: [Select]
$wowhead_use_fopen = 1;To force the mod to use fopen or
Code: [Select]
$wowhead_use_fopen = 0;Will force it to use curl.

That's the way Matt Mayers originally coded the script but the way I have it now should actually look to see if libcurl is installed and if not then try to use fopen functions instead.

ltdeta, to change to a different language you can edit the wowhead_wrapper.php.
Find...
Code: [Select]
$url = "http://www.wowhead.com/?item=".urlencode(addslashes($_GET['item']))."&xml";and change the "www.wowhead.com/?item=" to your preferred language.


Offline stfox100

  • Jr. Member
  • **
  • Posts: 157
    • Bluto's Hosting
Re: WoW - World of Warcraft Tooltips
« Reply #29 on: April 25, 2009, 01:46:27 AM »
Here's what I found out with my server settings.
First:
Internal server error usually means the following:

1. invalid permissions (anything higher than 755 will show internal server error)
2. invalid .htaccess or php.ini file
3. corrupted file archive

Second:
Server would not allow to open / execute scripts outside user directory (phpsuexec).

Third. You cannot disable any mod_security rules via .htaccess with version 2.1 of mod_security.

@Tatoo. I would suggest first to make sure all your directories are chmod to 755 or 644.
Also, instead of using .htaccess to try and change php.ini settings in the root, try installing another instance of php.ini in your public_html directory with fopen and libcurl rues. Although it shouldn't matter if you don't have mod_security installed. There must be something else blocking it.

Offline nckswt

  • Newbie
  • *
  • Posts: 8
Re: WoW - World of Warcraft Tooltips
« Reply #30 on: April 30, 2009, 07:03:02 AM »
I've been having problems with the [wow] BBCode with my theme, but when I switch to my default theme, the [wow] BBCode works perfectly. Every other part of this addon works, but the [wow] BBCode doesn't seem to have been installed properly into my custom theme.

There's no Modifications.english.php file in my custom theme's /languages folder, so I tried adding one in (with the
Code: [Select]
$txt['wow'] = 'WoW Tooltip'; string), but that didn't work.

I'm running SMF 2.0 RC1 and WoW Tooltips 1.1. Please help me fix this!

Offline Garou

  • Sr. Member
  • ****
  • Posts: 759
  • Gender: Male
  • On Hiatus.
    • Balance Games
Re: WoW - World of Warcraft Tooltips
« Reply #31 on: April 30, 2009, 11:14:31 AM »
If there isn't a Modifications.english.php file then typically SMF should read the one from your default theme. Really all that part of the mod does is display the text "WoW Tooltip" when you hover over the button that inserts the [wow][/wow] code into the post.

If that is important to you, rather then creating a new Modifications.english.php you will want to copy the one from your default theme to your custom theme as you will need the codes that your other mods have entered in there as well. If not you could break your other mods.

That said I don't thing that's where your problem lies. Due to the way some custom themes are written they will re-arrange things in the index.template.php and you may have to put that code someplace else.

For instance in the IronWoW and the Overview themes we found that you have to change the code to look like...

Code: [Select]
// ]]></script>

 <script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script> ';

echo '
</head>

What theme are you using and if you could attach your index.template.php Ill take a look at it.

Offline nckswt

  • Newbie
  • *
  • Posts: 8
Re: WoW - World of Warcraft Tooltips
« Reply #32 on: April 30, 2009, 05:40:05 PM »
If there isn't a Modifications.english.php file then typically SMF should read the one from your default theme. Really all that part of the mod does is display the text "WoW Tooltip" when you hover over the button that inserts the [wow][/wow] code into the post.

If that is important to you, rather then creating a new Modifications.english.php you will want to copy the one from your default theme to your custom theme as you will need the codes that your other mods have entered in there as well. If not you could break your other mods.

That said I don't thing that's where your problem lies. Due to the way some custom themes are written they will re-arrange things in the index.template.php and you may have to put that code someplace else.

For instance in the IronWoW and the Overview themes we found that you have to change the code to look like...

Code: [Select]
// ]]></script>

 <script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script> ';

echo '
</head>

What theme are you using and if you could attach your index.template.php Ill take a look at it.

Ah, that's not where the problem lies, then. I'm using the hxxp:EDSO theme [nonactive], and I've attached my index.template.php, but I'm not sure that's where the issue lies, either. I can see the tooltips perfectly if I use a direct link like hxxp:www.wowhead.com/?item=46017 [nonactive] but not if I put the [wow]Val'anyr, Hammer of Ancient Kings[/wow] BBcode.

I've attatched my subs.php and subs-editor.php in case the problem lies in either one, but I don't think that's the problem as they're not theme-specific, and my problem is theme-specific. Let me know if you want any other files, and thanks for the quick response!

Offline Garou

  • Sr. Member
  • ****
  • Posts: 759
  • Gender: Male
  • On Hiatus.
    • Balance Games
Re: WoW - World of Warcraft Tooltips
« Reply #33 on: May 01, 2009, 10:29:34 AM »
Nope you have everything in there right. There has to be a setting on your server someplace. Its discussed several posts back, there seems to be a variety of server settings that can be causing the mod to foul up.

The original code was written for phpBB a couple years ago by a guy that goes by Horis/Matt Mayers on the Wowhead forums. I'm beginning to wonder if this isn't why he dropped all support for it and ripped down the Download.

All the mod requires to work is libcurl or fopen however many professional hosting services have implemented some security settings that will treat this as an injection script. Which in a way it is but its not malicious nor is it exploitable, short of someone hacking into Wowhead and messing with their codes.

That said all I can really offer is that you try chmodding the wow folder and the files within, differently. If that doesn't work you'll have to check with your host. They should be getting a warning in their logs every time there is a hit on the wowhead_wrapper.php and should be able to figure out what the conflict is there.

Offline Springer

  • Jr. Member
  • **
  • Posts: 326
  • Gender: Male
Re: WoW - World of Warcraft Tooltips
« Reply #34 on: May 01, 2009, 01:17:58 PM »
the wow BBS dont work fine at my page

Click here

Color dont work right and no tool tip shown

I am getting the same problem.  SMF 2.0 rc1

Using:
Code: [Select]
[url=http://www.wowhead.com/?item=30987]Lightbringer Faceguard[/url]It works properly. 


Quote
Your site must have libcurl or fopen in order for this mod to work.

How can we check this and would it effect the bbc code but not the other?

Offline GreenX

  • Semi-Newbie
  • *
  • Posts: 15
Re: WoW - World of Warcraft Tooltips
« Reply #35 on: May 01, 2009, 06:23:52 PM »
Same problem as above, url /url works fine and I can hover but using wow /wow its doesnt work at all.

Offline stfox100

  • Jr. Member
  • **
  • Posts: 157
    • Bluto's Hosting
Re: WoW - World of Warcraft Tooltips
« Reply #36 on: May 01, 2009, 07:20:20 PM »
Upload the attached file to your site, in the public_html folder or similar.
Browse to it in your browser. Now you can see all your php info.
Rename or delete the file at some point so no-one else can see your server config.
If all is ok with your php.ini settings,(fopen and libcurl) then ask your host if they have  mod_security version 2.1 or higher installed. If they do, send me or Garou a pm, and I'll tell you what rule they need to disable for it to work. Or just tell them the problem, and the exact error that shows when you click the link. They should know what to do, I won't post it publicly. They may or may not do it for you.
Thanks,
B-Lute

Offline Springer

  • Jr. Member
  • **
  • Posts: 326
  • Gender: Male
Re: WoW - World of Warcraft Tooltips
« Reply #37 on: May 08, 2009, 05:18:54 PM »
server has libcurl
fopen is disabled


I have not heard back yet about mod security

Offline Garou

  • Sr. Member
  • ****
  • Posts: 759
  • Gender: Male
  • On Hiatus.
    • Balance Games
Re: WoW - World of Warcraft Tooltips
« Reply #38 on: May 08, 2009, 09:49:27 PM »
Yeah it can be frustrating. I had used this code for a while on a couple other servers where it worked fine. I was shocked when reports first started coming in about the mod not working. Then I switched hosts and happened to get one where I had issues like yours.

I was literally ripping the hair out of my head trying to figure this out till Bluto explained what was happening and what he did to fix it. Apparently mod security, if not configured correctly can mess up several mods for SMF.

Offline antwigan

  • Newbie
  • *
  • Posts: 7
Re: WoW - World of Warcraft Tooltips
« Reply #39 on: May 21, 2009, 07:06:41 AM »
My site is hxxp:www.chaosinmotion.team.pro [nonactive]

If i put a link to a quest or achievement it seems fine.

But if i try [wow]item[/wow] i just get a link which then gives this error:

Code: [Select]
XML Parsing Error: junk after document element
Location: http://chosenones.comli.com/wow/wowhead_wrapper.php?item=Titansteel%20Destroyer
Line Number 3, Column 1:<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
^

This is my index.template.php

Code: [Select]
<?php

// Version: 1.1.5; index



/* This template is, perhaps, the most important template in the theme. It

contains the main template layer that displays the header and footer of

the forum, namely with main_above and main_below. It also contains the

menu sub template, which appropriately displays the menu; the init sub

template, which is there to set the theme up; (init can be missing.) and

the linktree sub template, which sorts out the link tree.



The init sub template should load any data and set any hardcoded options.



The main_above sub template is what is shown above the main content, and

should contain anything that should be shown up there.



The main_below sub template, conversely, is shown after the main content.

It should probably contain the copyright statement and some other things.



The linktree sub template should display the link tree, using the data

in the $context['linktree'] variable.



The menu sub template should display all the relevant buttons the user

wants and or needs.



For more information on the templating system, please see the site at:

http://www.simplemachines.org/

*/



// Initialize the template... mainly little settings.

function template_init()

{

global $context$settings$options$txt;



/* Use images from default theme when using templates from the default theme?

if this is 'always', images from the default theme will be used.

if this is 'defaults', images from the default theme will only be used with default templates.

if this is 'never' or isn't set at all, images from the default theme will not be used. */

$settings['use_default_images'] = 'default';



  
$settings['tp_images_url'] = 'Themes/The_Risen_WOTLK/images/tinyportal/';



/* What document type definition is being used? (for font size and other issues.)

'xhtml' for an XHTML 1.0 document type definition.

'html' for an HTML 4.01 document type definition. */

$settings['doctype'] = 'xhtml';



/* The version this template/theme is for.

This should probably be the version of SMF it was created for. */

$settings['theme_version'] = '1.1';



/* Set a setting that tells the theme that it can render the tabs. */

$settings['use_tabs'] = true;



/* Use plain buttons - as oppossed to text buttons? */

$settings['use_buttons'] = true;



/* Show sticky and lock status seperate from topic icons? */

$settings['seperate_sticky_lock'] = true;

}



// The main sub template above the content.

function template_main_above()

{

global $context$settings$options$scripturl$txt$modSettings;



// Show right to left and the character set for ease of translating.

echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>

<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />

<meta name="description" content="'
$context['page_title'], '" />', empty($context['robot_no_index']) ? '' '

<meta name="robots" content="noindex" />'
'

<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />

<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?fin11"></script>

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[

var smf_theme_url = "'
$settings['theme_url'], '";

var smf_images_url = "'
$settings['images_url'], '";

var smf_scripturl = "'
$scripturl'";

var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';

var smf_charset = "'
$context['character_set'], '";

// ]]></script>

<title>'
$context['page_title'], '</title>';



// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.

echo '

<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?fin11" />

<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/print.css?fin11" media="print" />';



/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)

Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.

Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.

Standards compliance mode happens when you use xhtml... */

if ($context['browser']['needs_size_fix'])

echo '

<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';



// Show all the relative links, such as help, search, contents, and the like.

echo '

<link rel="help" href="'
$scripturl'?action=help" target="_blank" />

<link rel="search" href="' 
$scripturl '?action=search" />

<link rel="contents" href="'
$scripturl'" />';



// If RSS feeds are enabled, advertise the presence of one.

if (!empty($modSettings['xmlnews_enable']))

echo '

<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';



// If we're viewing a topic, these should be the previous and next topics, respectively.

if (!empty($context['current_topic']))

echo '

<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />

<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';



// If we're in a board, or a topic for that matter, the index will be the board's index.

if (!empty($context['current_board']))

echo '

<link rel="index" href="' 
$scripturl '?board=' $context['current_board'] . '.0" />';



// We'll have to use the cookie to remember the header...

if ($context['user']['is_guest'])

{

$options['collapse_header'] = !empty($_COOKIE['upshrink']);

$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);

}



// Output any remaining HTML headers. (from mods, maybe?)

echo $context['html_headers'], '



<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[

var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';



function shrinkHeader(mode)

{'
;



// Guests don't have theme options!!

if ($context['user']['is_guest'])

echo '

document.cookie = "upshrink=" + (mode ? 1 : 0);'
;

else

echo '

smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
$context['session_id'], '");';



echo '

document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");



document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";

document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";



current_header = mode;

}

// ]]></script>'
;



// the routine for the info center upshrink

echo '

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[

var current_header_ic = '
, empty($options['collapse_header_ic']) ? 'false' 'true'';



function shrinkHeaderIC(mode)

{'
;



if ($context['user']['is_guest'])

echo '

document.cookie = "upshrinkIC=" + (mode ? 1 : 0);'
;

else

echo '

smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'
$context['session_id'], '");';



echo '

document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");



document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";



current_header_ic = mode;

}

      // ]]></script>

 <script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script> '
;

   echo 
'
</head>
<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script>
<body topmargin="0">



<table width="90%" cellpadding="0" cellspacing="0" border="0" align="center"><tr><td class="tr_topleft"></td><td class="tr_top"></td><td class="tr_topright"></td></tr>





<tr><td class="tr_left"></td><td>'
;

echo
'

<table width="100%" cellpadding="0" cellspacing="0" border="0">'
;



 
// Top Box BEING ******************************************************



echo'

<tr>

<td>'
;

echo '

<table width="100%" cellpadding="0" cellspacing="0" border="0" >

<tr>'
;



if($context['user']['is_logged'])

echo '

<td class="toptitle1" height="24">

<span style="font-size: 130%;"> '
$txt['hello_member_ndt'], ' <b>'$context['user']['name'] , '</b></span>

</td>'
;



if ($context['user']['is_guest'])

echo '

<td class="toptitle1" height="24">

<span style="font-size: 100%;"> '
$txt['welcome_guest'] , '</b></span>

</td>'
;



// display the time

echo '

<td class="toptitle1" height="24" align="right">

<span class="smalltext">' 
$context['current_time'], '</span>';



// this is the upshrink button for the user info section

echo '

<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="'
$settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>

</td>

</tr>

<tr id="upshrinkHeader"'
, empty($options['collapse_header']) ? '' ' style="display: none;"''>

<td valign="top" colspan="2">

<table width="100%" class="bordercolor" cellpadding="5" cellspacing="0" border="0" style="margin-top: 0px;">

<tr width="100%"><td class="toptitle2"></td></tr>

<tr>'
;



echo '

<td colspan="2" width="100%" valign="top" class="toptitlebg1"><span class="middletext">'
;





// Now, onto our second set of info, are they logged in again?

if ($context['user']['is_logged'])

{

// Is the forum in maintenance mode?

if ($context['in_maintenance'] && $context['user']['is_admin'])

echo '

<b>'
$txt[616], '</b><br />';



// Are there any members waiting for approval?

if (!empty($context['unapproved_members']))

echo '

'
$context['unapproved_members'] == $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="'$scripturl'?action=viewmembers;sa=browse;type=approve">'$context['unapproved_members'] == $txt['approve_member'] : $context['unapproved_members'] . ' ' $txt['approve_members'], '</a> '$txt['approve_members_waiting'], '<br />';



// Show the total time logged in?

if (!empty($context['user']['total_time_logged_in']))

{

echo '

'
$txt['totalTimeLogged1'];



// If days is just zero, don't bother to show it.

if ($context['user']['total_time_logged_in']['days'] > 0)

echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];



// Same with hours - only show it if it's above zero.

if ($context['user']['total_time_logged_in']['hours'] > 0)

echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];



// But, let's always show minutes - Time wasted here: 0 minutes ;).

echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'];

}



if ($context['allow_pm'])

echo '&nbsp; &nbsp; &nbsp; [<a href="'$scripturl'?action=pm">'$context['user']['messages'], '/<strong>'$context['user']['unread_messages'] , '</strong></a> PM]



---- [ <a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a> ]



---- [ <a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a> ] '

;



echo ' </span>';

}

// Otherwise they're a guest - this time ask them to either register or login - lazy bums...

else

{

echo ' </span>

<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/sha1.js"></script>



<form action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' '''>

<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />

<select name="cookielength">

<option value="60">'
$txt['smf53'], '</option>

<option value="1440">'
$txt['smf47'], '</option>

<option value="10080">'
$txt['smf48'], '</option>

<option value="43200">'
$txt['smf49'], '</option>

<option value="-1" selected="selected">'
$txt['smf50'], '</option>

</select>

<input type="submit" value="'
$txt[34], '" /><br />

<span class="middletext">'
$txt['smf52'], '</span>

<input type="hidden" name="hash_passwrd" value="" />

</form>'
;

}



echo '

</td>

<td class="toptitlebg1" align="right" valign="top">

             </td>

</tr>

<tr><td class="toptitle2"></td></tr>

</table>

</td>

</tr>

 

</table>'
;





echo '

<table id="upshrinkHeader2"'
, empty($options['collapse_header']) ? '' ' style="display: none;"'' width="100%" cellpadding="0" cellspacing="0" border="0">

<tr><td></td>

</tr>

</table>'
;



echo 
'

</td>

</tr>

<tr><td id="toplogo" valign="center">

<img src="'
$settings['images_url'], '/wrathlogo.png" align="center"><img src="'$settings['images_url'], '/toplogo.png" align="center"></td></tr></table>';

echo'

<table width="100%" height="24" cellspacing="0" cellpadding="0">

<tr height="24">

<td height="24">'
;



template_menu();



 

 echo 
'</td></tr></table>';

 

 

 
//do not remove this section at all, breaks upshrink

 












// The main content should go here.

echo '</center></center>

<table width="100%" cellpadding="0" cellspading="0" bgcolor="#1a1a1a"><tr><td id="mainarea">

<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">'
;

}



function 
template_main_below()

{

global $context$settings$options$scripturl$txt;



echo '

</div></td></tr></table>'
;



// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!

echo '



<div id="footer" style="text-align: center; padding-bottom: 1ex;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[

function smfFooterHighlight(element, value)

{

element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";

}

// ]]></script>

<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">

<tr>

<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'right' 'left''">

<a href="http://www.mysql.com/" target="_blank"><img id="powered-mysql" src="'
$settings['images_url'], '/powered-mysql.gif" alt="'$txt['powered_by_mysql'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>

<a href="http://www.php.net/" target="_blank"><img id="powered-php" src="'
$settings['images_url'], '/powered-php.gif" alt="'$txt['powered_by_php'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>

</td>

<td valign="middle" align="center" style="white-space: nowrap;">

'
theme_copyright(), '

</td>

<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'left' 'right''">

<a href="http://validator.w3.org/check/referer" target="_blank"><img id="valid-xhtml10" src="'
$settings['images_url'], '/valid-xhtml10.gif" alt="'$txt['valid_xhtml'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>

<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="'
$settings['images_url'], '/valid-css.gif" alt="'$txt['valid_css'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>

</td>

</tr>

<tr>

  <td colspan="3" align="center">

    This site was designed by <a href="mailto:admin@therisenguild.net">Dread/Exphryl</a> for <a href="http://www.therisenguild.net">The Risen Guild</a>. Images are proprieties of their respective owners (EA-Mythic/ Blizzart Entertainment).<BR>

    For any questions or concerns regarding this theme The_Risen_WOTLK please email. <BR><BR>

    <i>CSS Dropdown Menu Coding Modified from Blocs Rhino Theme. </i>

    </td>

 </tr>

</table>'
;



// Show the load time?

if ($context['show_load_time'])

echo '

<span class="smalltext">'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';



// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.

if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])

{

// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.

echo '

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA['
;



// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...

if ($context['browser']['is_safari'])

echo '

window.addEventListener("load", smf_codeFix, false);



function smf_codeFix()

{

var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");



for (var i = 0; i < codeFix.length; i++)

{

if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)

codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";

}

}'
;

elseif ($context['browser']['is_firefox'])

echo '

window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()

{

var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");



for (var i = 0; i < codeFix.length; i++)

{

if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))

codeFix[i].style.overflow = "scroll";

}

}'
;

else

echo '

var window_oldOnload = window.onload;

window.onload = smf_codeFix;



function smf_codeFix()

{

var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");



for (var i = codeFix.length - 1; i > 0; i--)

{

if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))

codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";

}



if (window_oldOnload)

{

window_oldOnload();

window_oldOnload = null;

}

}'
;



echo '

// ]]></script>'
;

}



echo '

</div>'
;



// The following will be used to let the user know that some AJAX process is running

echo '

<div id="ajax_in_progress" style="display: none;'
$context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' '''">'$txt['ajax_in_progress'], '</div>







</td><td class="tr_right"></td></tr>



<tr><td class="tr_bottomleft"></td><td class="tr_bottom"></td><td class="tr_bottomright"></td></tr></table>







</td></tr></table>



</body></html>'
;

}



// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..

function theme_linktree()

{

global $context$settings$options;



echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;">';



// Each tree item has a URL and name. Some may have extra_before and extra_after.

foreach ($context['linktree'] as $link_num => $tree)

{

// Show something before the link?

if (isset($tree['extra_before']))

echo $tree['extra_before'];



// Show the link, including a URL if it should have one.

echo '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'], '</b>';



// Show something after the link...?

if (isset($tree['extra_after']))

echo $tree['extra_after'];



// Don't show a separator for the last one.

if ($link_num != count($context['linktree']) - 1)

echo '&nbsp;>&nbsp;';

}



echo '</div>';

}



// Show the menu up top. Something like [home] [help] [profile] [logout]...

function template_menu()

{

global $context$settings$options$scripturl$txt;



// Work out where we currently are.

$current_action 'home';

if (in_array($context['current_action'], array('admin''managegames''arcadesettings''arcadecategory''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))

$current_action 'admin';

if (in_array($context['current_action'], array('gallery','search''arcade''admin''calendar''profile''mlist''register''login''help''pm''forum''tpadmin')))

$current_action $context['current_action'];

if ($context['current_action'] == 'globalAnnouncementsAdmin')

$current_action 'admin';



if ($context['current_action'] == 'search2')

$current_action 'search';

if ($context['current_action'] == 'theme')

$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';



if (isset($_GET['dl']))

$current_action 'dlmanager';



if ((isset($_GET['board']) || isset($_GET['topic'])) && empty($settings['use_tp']))

$current_action 'home';

elseif ((isset($_GET['board']) || isset($_GET['topic'])) && !empty($settings['use_tp']))

$current_action 'forum';



if ($context['current_action'] == 'theme')

$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';



// Begin SMFShop code

if ($context['current_action'] == 'shop')

$current_action 'shop';

if (in_array($context['current_action'], array('shop_general''shop_items_add''shop_items_edit''shop_cat''shop_inventory''shop_restock''shop_usergroup')))

$current_action 'admin';

// End SMFShop code





// Show the start of the tab section.

echo '

<div id="menudiv">

<div id="menuinner">'
;



// the main menu

echo '

<ul class="menubox" id="menuboxie6">

<li' 
$current_action=='home' ' class="chosen"' '' '><a href="'$scripturl'"><span>' $txt[103] , '</span></a></li>

<li' 
$current_action=='forum' ' class="chosen"' '' '><a href="'$scripturl'?action=forum"><span>' $txt['tp-forum'] , '</span></a>';



echo ' <ul>

<li' 
$current_action=='help' ' class="chosen"' '' '><a href="'$scripturl'?action=help"><span>' $txt[119] , '</span></a></li>';

if ($context['allow_search'])

echo '

<li' 
$current_action=='search' ' class="chosen"' '' '><a href="'$scripturl'?action=search"><span>Search</span></a></li>';

if ($context['allow_calendar'])

echo '

<li' 
$current_action=='calendar' ' class="chosen"' '' '><a href="'$scripturl'?action=calendar"><span>' $txt['calendar24'] , '</span></a></li>';

if ($context['allow_admin'])

echo '

<li' 
$current_action=='admin' ' class="chosen"' '' '><a href="'$scripturl'?action=admin"><span>' $txt[2] , '</span></a></li>';

if ($context['allow_edit_profile'])

echo '

<li' 
$current_action=='profile' ' class="chosen"' '' '><a href="'$scripturl'?action=profile"><span>' $txt[79] , '</span></a></li>';



if ($context['user']['is_logged'] && $context['allow_pm'])

echo '

<li' 
$current_action=='pm' ' class="chosen"' '' '><a href="'$scripturl'?action=pm"><span>' $txt['pm_short'] , ' '$context['user']['unread_messages'] > '[<strong>'$context['user']['unread_messages'] . '</strong>]' '' '</span></a></li>';

echo ' </ul>

</li>'
;





// SMF Arcade

if (!empty($settings['use_arcade']))

echo '

<li' 
$current_action=='arcade' ' class="chosen"' '' '><a href="'$scripturl'?action=arcade"><span>' $txt['arcade'] , '</span></a></li>';



// SMF Gallery

if (!empty($settings['use_smfgallery']))

echo '

<li' 
$current_action=='gallery' ' class="chosen"' '' '><a href="'$scripturl'?action=gallery"><span>' $txt['smfgallery_menu'] , '</span></a></li>';

// SMFshop 

if (!empty($settings['use_shop']))

echo '

<li' 
$current_action=='shop' ' class="chosen"' '' '><a href="'$scripturl'?action=shop"><span>Shop</span></a></li>';





if ($context['user']['is_logged'])

echo '

<li class="last"><a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '"><span>' $txt[108] , '</span></a></li>';

if ($context['user']['is_guest'])

{

echo '

<li' 
$current_action=='login' ' class="chosen"' '' '><a href="'$scripturl'?action=login"><span>' $txt[34] , '</span></a>';

echo '

<ul>

<li' 
$current_action=='register' ' class="chosen"' '' '><a href="'$scripturl'?action=register"><span>' $txt[97] , '</span></a></li>

</ul>

</li>'
;



}

// any extra buttons then?

if(!empty($settings['but1_name']) || !empty($settings['but2_name']) || !empty($settings['but3_name']) || !empty($settings['but4_name']) || !empty($settings['but5_name']))

{

echo '<li><a href="#">Extra</a>

<ul>'
;

// extra button 1

if(!empty($settings['but1_name']))

echo '

<li><a href="'
$settings['but1_link'] , '"><span>' $settings['but1_name'] , '</span></a></li>';

// extra button 2

if(!empty($settings['but2_name']))

echo '

<li><a href="'
$settings['but2_link'] , '"><span>' $settings['but2_name'] , '</span></a></li>';

// extra button 3

if(!empty($settings['but3_name']))

echo '

<li><a href="'
$settings['but3_link'] , '"><span>' $settings['but3_name'] , '</span></a></li>';

// extra button 4

if(!empty($settings['but4_name']))

echo '

<li><a href="'
$settings['but4_link'] , '"><span>' $settings['but4_name'] , '</span></a></li>';

// extra button 5

if(!empty($settings['but5_name']))

echo '

<li><a href="'
$settings['but5_link'] , '"><span>' $settings['but5_name'] , '</span></a></li>';

echo '

</ul>

</li>'
;

}

echo '

</ul>

</div>

</div>'
;

}

// Show the menu up top. Something like [home] [help] [profile] [logout]...

function template_menu_old()

{

global $context$settings$options$scripturl$txt;



// Work out where we currently are.

$current_action 'home';

if (in_array($context['current_action'], array('admin''managegames''arcadesettings''arcadecategory''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))

$current_action 'admin';

if (in_array($context['current_action'], array('gallery','search''arcade''admin''calendar''profile''mlist''register''login''help''pm''forum''tpadmin')))

$current_action $context['current_action'];

if ($context['current_action'] == 'globalAnnouncementsAdmin')

$current_action 'admin';



if ($context['current_action'] == 'search2')

$current_action 'search';

if ($context['current_action'] == 'theme')

$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';



if (isset($_GET['dl']))

$current_action 'dlmanager';



if ((isset($_GET['board']) || isset($_GET['topic'])) && empty($settings['use_tp']))

$current_action 'home';

elseif ((isset($_GET['board']) || isset($_GET['topic'])) && !empty($settings['use_tp']))

$current_action 'forum';



if ($context['current_action'] == 'theme')

$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';



// Begin SMFShop code

if ($context['current_action'] == 'shop')

$current_action 'shop';

if (in_array($context['current_action'], array('shop_general''shop_items_add''shop_items_edit''shop_cat''shop_inventory''shop_restock''shop_usergroup')))

$current_action 'admin';

// End SMFShop code





// Show the start of the tab section.

echo '

<div id="menudiv">

<div id="menuinner">'
;



echo '

<div id="myuser">'
;

if($context['user']['is_logged'])

{

echo $txt['hello_member_ndt'] , ' <strong>' $context['user']['name'] , '</strong>';



// Only tell them about their messages if they can read their messages!

if ($context['allow_pm'])

echo '<br />[<a href="'$scripturl'?action=pm">'$context['user']['messages'], '/<strong>'$context['user']['unread_messages'] , '</strong></a> PM]';



// Is the forum in maintenance mode?

if ($context['in_maintenance'] && $context['user']['is_admin'])

echo '[<strong>Maintenace</strong>]';



// Are there any members waiting for approval?

if (!empty($context['unapproved_members']))

echo '

[<a href="'
$scripturl'?action=viewmembers;sa=browse;type=approve">'$context['unapproved_members'] , ' APPROVE</a> ]';



echo '

<a href="'
$scripturl'?action=unread">Unread</a> /

<a href="'
$scripturl'?action=unreadreplies">Replies</a>';



}

else

echo $txt['welcome_guest'];



echo '</div>';



// the main menu

echo '

<ul class="menubox" id="menuboxie6">

<li' 
$current_action=='home' ' class="chosen"' '' '><a href="'$scripturl'"><span>' $txt[103] , '</span></a></li>';

// TP

if (!empty($settings['use_tp']))

echo '

<li' 
$current_action=='forum' ' class="chosen"' '' '><a href="'$scripturl'?action=forum"><span>' $txt['tp-forum'] , '</span></a></li>';



echo '

<li' 
$current_action=='help' ' class="chosen"' '' '><a href="'$scripturl'?action=help"><span>' $txt[119] , '</span></a></li>';

if ($context['allow_search'])

echo '

<li' 
$current_action=='search' ' class="chosen"' '' '><a href="'$scripturl'?action=search"><span>Search</span></a></li>';

if ($context['allow_calendar'])

echo '

<li' 
$current_action=='calendar' ' class="chosen"' '' '><a href="'$scripturl'?action=calendar"><span>' $txt['calendar24'] , '</span></a></li>';

if ($context['allow_admin'])

echo '

<li' 
$current_action=='admin' ' class="chosen"' '' '><a href="'$scripturl'?action=admin"><span>' $txt[2] , '</span></a></li>';

if ($context['allow_edit_profile'])

echo '

<li' 
$current_action=='profile' ' class="chosen"' '' '><a href="'$scripturl'?action=profile"><span>' $txt[79] , '</span></a></li>';



if ($context['user']['is_logged'] && $context['allow_pm'])

echo '

<li' 
$current_action=='pm' ' class="chosen"' '' '><a href="'$scripturl'?action=pm"><span>' $txt['pm_short'] , ' '$context['user']['unread_messages'] > '[<strong>'$context['user']['unread_messages'] . '</strong>]' '' '</span></a></li>';



// SMF Arcade

if (!empty($settings['use_arcade']))

echo '

<li' 
$current_action=='arcade' ' class="chosen"' '' '><a href="'$scripturl'?action=arcade"><span>' $txt['arcade'] , '</span></a></li>';

// SMF Gallery

if (!empty($settings['use_smfgallery']))

echo '

<li' 
$current_action=='gallery' ' class="chosen"' '' '><a href="'$scripturl'?action=gallery"><span>' $txt['smfgallery_menu'] , '</span></a></li>';

// SMFshop 

if (!empty($settings['use_shop']))

echo '

<li' 
$current_action=='shop' ' class="chosen"' '' '><a href="'$scripturl'?action=shop"><span>Shop</span></a></li>';



if ($context['user']['is_logged'])

echo '

<li class="last"><a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '"><span>' $txt[108] , '</span></a></li>';

if ($context['user']['is_guest'])

{

echo '

<li' 
$current_action=='login' ' class="chosen"' '' '><a href="'$scripturl'?action=login"><span>' $txt[34] , '</span></a></li>';

echo '

<li' 
$current_action=='register' ' class="chosen"' '' '><a href="'$scripturl'?action=register"><span>' $txt[97] , '</span></a></li>';

}

// extra button 1

if(!empty($settings['but1_name']))

echo '

<li><a href="'
$settings['but1_link'] , '"><span>' $settings['but1_name'] , '</span></a></li>';

// extra button 2

if(!empty($settings['but2_name']))

echo '

<li><a href="'
$settings['but2_link'] , '"><span>' $settings['but2_name'] , '</span></a></li>';

// extra button 3

if(!empty($settings['but3_name']))

echo '

<li><a href="'
$settings['but3_link'] , '"><span>' $settings['but3_name'] , '</span></a></li>';

// extra button 4

if(!empty($settings['but4_name']))

echo '

<li><a href="'
$settings['but4_link'] , '"><span>' $settings['but4_name'] , '</span></a></li>';

// extra button 5

if(!empty($settings['but5_name']))

echo '

<li><a href="'
$settings['but5_link'] , '"><span>' $settings['but5_name'] , '</span></a></li>';



echo '

</ul>

</div>

</div>'
;

}

// Generate a strip of buttons.

function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td ''$newstrip false)

{

global $settings$buttons$context$txt$scripturl;



if($newstrip)

echo '<table><tr>';



// Create the buttons...

foreach ($button_strip as $key => $value)

{

if (isset($value['test']) && empty($context[$value['test']]))

{

unset($button_strip[$key]);

continue;

}

elseif (!isset($buttons[$key]) || $force_reset)

$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';



$button_strip[$key] = $buttons[$key];

}



if (empty($button_strip))

return '<td>&nbsp;</td>';



echo '

<td class="maintab_back">'
implode('</td><td class="maintab_back">'$button_strip) , '</td>';



if($newstrip)

echo '</tr></table>';

}

// Generate a strip of buttons.

function template_button_strip2($button_strip$direction 'top'$force_reset false$custom_td ''$header_href '#'$header_title 'Tools menu')

{

global $settings$buttons$context$txt$scripturl;



// if ie6, turn around right here!!

if($context['browser']['is_ie6'])

{

template_button_strip($button_strip$direction$force_reset$custom_tdtrue);

return;

}



echo '<ul class="menubox" id="menubox_' $direction '">

<li><a style="width: 10em;" href="' 
$header_href '">' .$header_title '</a>

<ul>'
;

// Create the buttons...

foreach ($button_strip as $key => $value)

{

if (isset($value['test']) && empty($context[$value['test']]))

{

unset($button_strip[$key]);

continue;

}

elseif (!isset($buttons[$key]) || $force_reset)

$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';



$button_strip[$key] = $buttons[$key];

}



if (empty($button_strip))

echo ' <li></li>';

else

echo '

<li>'
implode('</li><li>'$button_strip) , '</li>';

echo '

</ul>

</li>

</ul>'
;



}

Thx  :D