WoW - World of Warcraft Tooltips

Started by Garou, March 28, 2009, 04:31:05 AM

Previous topic - Next topic

Garou

Did you check this post?
http://www.simplemachines.org/community/index.php?topic=301619.msg1997892#msg1997892

I have this running on my test server now just making that one change, I didn't even have to copy the other files over.

stfox100

It could be the same problem with mod_security, version 5 or higher. The host must disable a rule to allow the call of the outside .js file. Somewhere in here, someone posted how to put that .js file in your directory to make it work.

techbot

Has this mod been tested with SMF 1.1.9 and Tiny Portal?
Any help is appreciated. Scornful comments will be met with a blank stare

Garou

It was working on a TP .98 site but I haven tested it with any of the 1.0 betas. In theory it should work though. The only changes it makes to SMF is adding a button and BBC code, everything else is handled with javascript.

stfox100

I had it on a SMF 1.1.8 with TP 1.03 site I believe, and it worked. I don't see any reason it wouldn't.

grammaton

Same problem like many others.

The [wow][/wow] links are not working.
No coloured links, and the links refer to a xml file.

fopen is aktiv! (allow_url_fopen)

I am running smf 1.1.10.

Garou

Have you tried either of these two fixes.

http://www.simplemachines.org/community/index.php?topic=301619.msg2148803#msg2148803

http://www.simplemachines.org/community/index.php?topic=301619.msg1997892#msg1997892

Also is it working on the default but not a custom theme or not at all? If its not working on a custom theme, which one?

Axodious

Would you be willing to update the addon to do the following:

  • Add MMO-Champion DB support
  • Add a way to link with the ItemID but show the name of the item as the link instead of the ID (Example: [wow=#####]Name here[/wow])
  • I did this manually but, add support for [item][/item]
"You make my heart pound; my mouth water. Yeah, there's nothing like a chili dog." Sonic the Hedgehog

Garou

The majority of this mod comes from an unsupported script written by someone else for another message board system. All I did was create the BBC and button to call the script. So whether or not the current script can be tweaked to work with anything other then Wowhead, I don't really know and haven't had time to play with it to see.

As for converting the mod to use ItemIDs... Well that kinda defeats the purpose of the mod as a user only needs to know the name of the item rather then having to go hunting for the itemID. Even though I don't necessarily agree with it, because several people have asked for it, I planed to add it eventually, I just haven't had the time. If you want to post up your code I can include and credit you for it.

The reason I chose not to use [item] was twofold.

One: I didn't convert this mod to flat out replace DarkCloud's mod, its just an alternative method.

Two: In the event that someone wanted to run both mods it wouldn't cause conflicts.

The only real reason use "item" as the BBC would be if someone stopped using DarkCloud's mod and didn't want to have to convert existing links over. As far as I'm concerned, that's not my problem and if someone really wants to change the BBC code to item, warcraft, grandma, or whatever... its not that hard but I wont be including it in this mod.

To be honest I actually prefer his mod other then the fact that it stores info in the DB on your site rather then just linking to Wowhead. Also he hasn't updated his mod to 2.x yet, which is why I wound up tracking down the code this mod uses in the first place. I just thought Id be nice and share it with everyone else, especially now that I don't play the game anymore and the guild I was working with and maintaining their site, has disbanded.

grammaton

Quote from: GarouHave you tried either of these two fixes.

http://www.simplemachines.org/community/index.php?topic=301619.msg2148803#msg2148803

http://www.simplemachines.org/community/index.php?topic=301619.msg1997892#msg1997892

Also is it working on the default but not a custom theme or not at all? If its not working on a custom theme, which one?
Yes i tried both, and its not working on the default template.

Internet Explorer error message:

Meldung: 'null' ist Null oder kein Objekt
Zeile: 5
Zeichen: 2
Code: 0
URI: http://*zensur*/wow/wowhead_linker.js

\\Grammaton

Garou

Hmm That's an issue I have never encountered before.

Have you edited wowhead_linker.js?
Is your host using mod_security?
What are your file permissions on the files in the wow folder?

Axodious

Quote from: Garou on August 11, 2009, 07:45:53 AM
As for converting the mod to use ItemIDs... Well that kinda defeats the purpose of the mod as a user only needs to know the name of the item rather then having to go hunting for the itemID. Even though I don't necessarily agree with it, because several people have asked for it, I planed to add it eventually, I just haven't had the time. If you want to post up your code I can include and credit you for it.

Specifically the reason for this now, in the latest patch (3.2) there are 4 modes to the latest raid (10 man, 10 man heroic, 25 man and 25 man heroic). In the 10 man a boss drops X Y Z, in 10 man heroic the boss drops W X Y Z but the stats on X Y Z are increased to match the increased difficulty.

http://db.mmo-champion.com/search/item/blade_of_tarasque/

This is an example of 1 item, it drops from 25 man AND 25 man heroic but has different ILvls.
"You make my heart pound; my mouth water. Yeah, there's nothing like a chili dog." Sonic the Hedgehog

grammaton

Quote from: GarouHave you edited wowhead_linker.js?
Is your host using mod_security?
What are your file permissions on the files in the wow folder?
1. No
2. No
3. testet with full permissions

Garou

grammaton, try setting permissions to 655 or 755

axodious, does the code you are using display the quality color when using item numbers? I just attempted one on my test server and it does not it just shows a plain text link with tooltip in which case one could just use url=.

Axodious

Quote from: Garou on August 12, 2009, 11:42:29 AM
grammaton, try setting permissions to 655 or 755

axodious, does the code you are using display the quality color when using item numbers? I just attempted one on my test server and it does not it just shows a plain text link with tooltip in which case one could just use url=.

I'm not sure I understand, currently I don't have any custom code for item id's. Currently if I do the item id (example: [wow]12345[/wow]) it will show up the same way as a url link would. I'm looking for a way so that when you do [wow]12345[/wow] it will replace the 12345 with the name of the item and have the same formatting as [wow]item name here[/wow].
"You make my heart pound; my mouth water. Yeah, there's nothing like a chili dog." Sonic the Hedgehog

Garou

I miss understood I thought you had said you coded something for that for your site. Ill see what I can come up with.

Axodious

Quote from: Garou on August 13, 2009, 03:13:35 PM
I miss understood I thought you had said you coded something for that for your site. Ill see what I can come up with.

Just manually added the [item] BBcode for the exact reason you explained :p
"You make my heart pound; my mouth water. Yeah, there's nothing like a chili dog." Sonic the Hedgehog

krilz

Ok, so I recently installed this mod myself and it works like a charm after a few minutes of tinkering with the default theme. My concern however is that it doesn't work with the custom theme I have (DarkBreak from Dzinerstudio.com [nofollow]). I'm using SMF 1.1.10 and TP 0.9.8.

In the custom theme it makes the links in, for example, [wow]Murder[/wow] to [Murder] but the color doesn't change and when hovering above it creates a link to {forum_url}/wow/wowhead_wrapper.php?item=Murder

When clicking on above link it produces the following XML:
<wowhead>

<item id="40368">
<name>Murder</name>
<level>213</level>
<quality id="4">Epic</quality>
<class id="2">Weapons</class>
<subclass id="15">Daggers</subclass>
<icon displayId="54974">INV_Weapon_Shortblade_84</icon>
<inventorySlot id="13">One-Hand</inventorySlot>

<htmlTooltip>
<table><tr><td><b class="q4">Murder</b><br /><!--bo-->Binds when picked up<table width="100%"><tr><td>One-Hand</td><th>Dagger</th></tr></table><table width="100%"><tr><td>164 - 306 Damage</td><th>Speed 1.50</th></tr></table>(156.7 damage per second)<br /><span class="c11">(1426 feral attack power)</span><br />+25 Agility<br />+46 Stamina<!--e--><!--ps--><br />Durability 75 / 75<br />Requires Level 80<br />Item Level 213</td></tr></table><table><tr><td><span class="q2">Equip: Improves hit rating by 21&nbsp;<small>(<!--r80:31:21-->0.64%&nbsp;@&nbsp;L80)</small>.</span><br /><span class="q2">Equip: Improves haste rating by 33&nbsp;<small>(<!--r80:36:33-->1.01%&nbsp;@&nbsp;L80)</small>.</span><br /><span class="q2">Equip: Increases attack power by 86.</span><br />Sell Price: <span class="moneygold">20</span> <span class="moneysilver">19</span> <span class="moneycopper">34</span></td></tr></table>
</htmlTooltip>

<json>
id:40368,name:'3Murder',level:213,reqlevel:80,dps:156.7,speed:1.50,slot:13,source:[2],sourcemore:[{t:1,ti:15989,n:'Sapphiron',z:3456,dd:2}],classs:2,subclass:15
</json>

<jsonEquip>
slotbak:13,displayid:54974,reqlevel:80,dmgmin1:164,dmgmax1:306,dmgtype1:0,speed:1.50,feratkpwr:1426,atkpwr:86,hitrtng:21,hastertng:33,agi:25,sta:46,dura:75,dps:156.7,sellprice:201934,mledps:156.7,mledmgmin:164,mledmgmax:306,mlespeed:1.50
</jsonEquip>
<link>http://www.wowhead.com/?item=40368</link>
</item>
</wowhead>


I tried setting the wow-folder to both 644 and 755 (which was default) and didn't help. I have both fopen and curl enabled. It has something to do with the theme, I just can't figure out why.

The index.template.php
<?php
// Version: 1.1; 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'] = 'never';

/* 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.4';

/* 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']);

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
  <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
 var current_leftbar = '
, empty($options['collapse_leftbar']) ? 'false' 'true'';

 function shrinkHeaderLeftbar(mode)
 {'
;

  // Guests don't have theme options!!
  if ($context['user']['is_guest'])
 echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
  else
 echo '
smf_setThemeOption("collapse_leftbar", mode ? 1 : 0, null, "'
$context['session_id'], '");';
  echo '
document.getElementById("upshrinkLeftbar").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

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

current_leftbar = mode;
 }
 // ]]></script>
 <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
 var current_rightbar = '
, empty($options['collapse_rightbar']) ? 'false' 'true'';

 function shrinkHeaderRightbar(mode)
 {'
;

  // Guests don't have theme options!!
  if ($context['user']['is_guest'])
 echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
  else
 echo '
smf_setThemeOption("collapse_rightbar", mode ? 1 : 0, null, "'
$context['session_id'], '");';

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

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

current_rightbar = mode;
 }
  // ]]></script>

<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>


<!-- nCode Image Resizer -->
<script type="text/javascript" src="'
$settings['default_theme_url'], '/ncode_imageresizer.js"></script>
<style type="text/css">
<!--
table.ncode_imageresizer_warning, table.ncode_imageresizer_warning td
{
background-color: #fefee1; /* the bgcolor behind the text and image */
}
table.ncode_imageresizer_warning {
color: #000000; /* the font color */
border: 1px solid #CCCDCD; /* the border around the whole thing */
cursor: pointer;
}
table.ncode_imageresizer_warning td {
font-size: 10px;
vertical-align: middle;
text-decoration: none;
}

table.ncode_imageresizer_warning td.td1 {
padding: 5px;
}
-->
</style>'
;

// What is the mode?
if (isset($modSettings['ncode_imageresizer_mode']))
{
if ($modSettings['ncode_imageresizer_mode'] == 1)
$mode 'enlarge';
elseif ($modSettings['ncode_imageresizer_mode'] == 2)
$mode 'samewindow';
elseif ($modSettings['ncode_imageresizer_mode'] == 3)
$mode 'newwindow';
else
$mode 'none';
}
else
$mode 'none';

echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
NcodeImageResizer.BBURL = "'
$settings['images_url'], '";
NcodeImageResizer.MODE = "'
$mode'";
NcodeImageResizer.MAXWIDTH = "'
, empty($modSettings['ncode_imageresizer_max_width']) ? : (int) $modSettings['ncode_imageresizer_max_width'], '";
NcodeImageResizer.MAXHEIGHT = "'
, empty($modSettings['ncode_imageresizer_max_height']) ? : (int) $modSettings['ncode_imageresizer_max_height'], '";
vbphrase = new Array();
vbphrase[\'ncode_imageresizer_warning_small\'] = \''
$txt['ncode_imageresizer_warning_small'], '\';
vbphrase[\'ncode_imageresizer_warning_filesize\'] = \''
$txt['ncode_imageresizer_warning_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \''
$txt['ncode_imageresizer_warning_no_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \''
$txt['ncode_imageresizer_warning_fullsize'], '\';
// ]]></script>

  <!-- Gives a nice picture next to the adress -->
  <link rel="icon" href="images/nuke.ico" type="image/vnd.microsoft.icon" />

  <!-- Wowhead item links and such -->
  <script src="http://www.wowhead.com/widgets/power.js"></script>
  <script src="wow/jquery-1.2.1.js"></script>
  <script src="wow/wowhead_linker.js"></script></script>

</head>
<body>
 <div class="wrapper">
<div id="hdr-l">
<div id="hdr-r">
<div id="header">
<div id="time">'
$context['current_time'],'</div>
<div id="searcharea">'
;
echo '
<form action="'
$scripturl'?action=search2" method="post" accept-charset="'$context['character_set'], '">
<input type="text" name="search" value="'
$txt[182], '..." onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\''$txt[182], '...\';" /> ';

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="'
$context['current_topic'], '" />';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form>
</div>
<a href="'
.$scripturl.'" title=""><span id="logo">&nbsp;</span></a>
</div>
<div id="toolbar">
<div id="nav">
<div style="float: right; padding: 2px 15px 0 0">'
;

// TinyPortal
if($context['TPortal']['leftbar'])
echo ' <a href="javascript:void(0);" onclick="shrinkHeaderLeftbar(!current_leftbar); return false;"><img id="upshrinkLeftbar" src="'$settings['images_url'], '/', empty($options['collapse_leftbar']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" style="margin: 0;" border="0" /></a><img id="upshrinkTempLeftbar" src="'$settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" />';
if($context['TPortal']['rightbar'])
echo ' <a href="javascript:void(0);" onclick="shrinkHeaderRightbar(!current_rightbar); return false;"><img id="upshrinkRightbar" src="'$settings['images_url'], '/', empty($options['collapse_rightbar']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" style="margin: 0;" border="0" /></a><img id="upshrinkTempRightbar" src="'$settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" />';
// TinyPortal end

echo '
 </div>
'
,template_menu(),'
</div>
</div>
<div id="bnr">
<div id="userarea">'
;
if (!empty($context['user']['avatar']))
echo '<div id="db-avatar">'.$context['user']['avatar']['image'].'</div>';

if ($context['user']['is_logged'])
{
echo '
<ul>
<li><b>'
$txt['hello_member'], ' '$context['user']['name'],'</b></li>';

// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo '<li>' ,$txt[152], ' <a href="'$scripturl'?action=pm">'$context['user']['messages'], ' '$context['user']['messages'] != $txt[153] : $txt[471], '</a>'$txt['newmessages4'], ' '$context['user']['unread_messages'], ' '$context['user']['unread_messages'] == $txt['newmessages0'] : $txt['newmessages1'],'</li>';

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<li><b>'$txt[616], '</b></li>';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '<li>'$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'], '</li>';

echo '
<li><a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a></li>
<li><a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a></li>
</ul>'
;
}

// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo '
<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'], '"  style="margin: 0px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' '''>
<b>Username: </b><br />
<input class="loginput" type="text" name="user" size="17" />
<br/>
<b>Password: </b><br />
<input class="loginput" type="password" name="passwrd" size="17" />
<input class="logbutton" type="submit" value="'
$txt[34], '" /><br />
<input type="hidden" name="hash_passwrd" value="" />
</form>'
;
}
echo '
</div>
</div>
</div>
</div>
<div id="bdy-l">
<div id="bdy-r">
<div id="bdy-tl">
<div id="bdy-tr">
<div id="bodyarea">
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>'
;

// TinyPortal integrated bars
if($context['TPortal']['leftbar'])
{
echo '<td width="' ,$context['TPortal']['leftbar_width'], '" style="padding: ' , isset($context['TPortal']['padding']) ? $context['TPortal']['padding'] : '4' 'px; padding-top: 8px;padding-right: 1ex;" valign="top">
<div id="leftbarHeader"'
, empty($options['collapse_leftbar']) ? '' ' style="display: none;"'' style="padding-top: 5px; width: ' ,$context['TPortal']['leftbar_width'], 'px;">';
TPortal_sidebar('left');
echo '</div></td>';

}

echo '<td width="100%" align="left" valign="top" style="padding-top: 12px; padding-bottom: 10px;">';
if($context['TPortal']['centerbar'])
echo '<div>' TPortal_sidebar('center') , '</div>';
}

function 
template_main_below()
{
global $context$settings$options$scripturl$txt;

echo '</td>';

// TinyPortal integrated bars
if($context['TPortal']['rightbar']){
echo '<td style="padding: ' , isset($context['TPortal']['padding']) ? $context['TPortal']['padding'] : '4' 'px; padding-top: 8px; padding-left: 1ex;" valign="top" align="right">
<div id="rightbarHeader"'
, empty($options['collapse_rightbar']) ? '' ' style="display: none;"'' style="width: ' ,$context['TPortal']['rightbar_width'], 'px; text-align: left; padding-top: 5px;">';
TPortal_rightbar();
echo '</div></td>';
}
echo '</tr></table>
</div>
</div>
</div>
</div>
</div>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
<div id="ftr">
<div id="ftr-l">
<div id="ftr-r">
<div id="footerarea">
  '
theme_copyright(), '<br />'tportal_version(), ' | DarkBreak by <a href="http://www.dzinerstudio.com" target="_blank">DzinerStudio</a><br />';

// 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>
</div>
</div>
</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>
</div>
</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''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('search''admin''calendar''profile''mlist''register''login''help''pm''forum''tpadmin')))
$current_action $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action 'search';
if (isset($_GET['dl']))
$current_action 'dlmanager';
if (isset($_GET['board']) || isset($_GET['topic']))
$current_action 'forum';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first 'last';
$last 'first';
}
else
{
$first 'first';
$last 'last';
}


// Show the start of the tab section.

echo '
  <ul>'
;
  // Show the [home] button.
echo '<li><a' $current_action=='home' ' class="current"' '' ' href="'$scripturl'"><span>' $txt[103] , '</span></a></li>';

  if($settings['TPortal_front_type']!='boardindex')
  // Show the [forum] button.
echo '<li><a' $current_action=='forum' ' class="current"' '' ' href="'$scripturl'?action=forum"><span>' $txt['tp-forum'] , '</span></a></li>';

  // Show the [help] button.
echo '<li><a' $current_action=='help' ' class="current"' '' ' href="'$scripturl'?action=help"><span>' $txt[119] , '</span></a></li>';

  // How about the [search] button?
if ($context['allow_search'])
echo '<li><a' $current_action=='search' ' class="current"' '' ' href="'$scripturl'?action=search"><span>' $txt[182] , '</span></a></li>';

  // The [calendar]!
if ($context['allow_calendar'])
echo '<li><a' $current_action=='calendar' ' class="current"' '' ' href="'$scripturl'?action=calendar"><span>' $txt['calendar24'] , '</span></a></li>';

  // Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li><a' $current_action=='admin' ' class="current"' '' ' href="'$scripturl'?action=admin"><span>' $txt[2] , '</span></a></li>';

  // Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a' $current_action=='profile' ' class="current"' '' ' href="'$scripturl'?action=profile"><span>' $txt[79] , '</span></a></li>';

  // Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a' $current_action=='pm' ' class="current"' '' ' href="'$scripturl'?action=pm"><span>' $txt['pm_short'] , '</span></a></li>';

 // the [member] list button
if ($context['allow_memberlist'])
echo '<li><a ' $current_action=='mlist' ' class="current"' '' ' href="'$scripturl'?action=mlist"><span>' $txt[331] , '</span></a></li>';

 // If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li><a ' $current_action=='login' ' class="current"' '' ' href="'$scripturl'?action=login"><span>' $txt[34] , '</span></a></li>';

  // If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<li><a ' $current_action=='register' ' class="current"' '' ' href="'$scripturl'?action=register"><span>' $txt[97] , '</span></a></li>';

  // Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li><a ' $current_action=='logout' ' class="current"' '' 'href="'$scripturl'?action=logout;sesc='$context['session_id'], '"><span>' $txt[108] , '</span></a></li>';

echo '
</ul>'
;


}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$buttons$context$txt$scripturl;

// 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="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'last' 'first' '">&nbsp;</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_back">'implode(' &nbsp;|&nbsp; '$button_strip) , '</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'first' 'last' '">&nbsp;</td>';
}

?>


The Settings.english.php
<?php
// Version: 1.1.4; Settings

$txt['theme_thumbnail_href'] = $settings['images_url'] . '/thumbnail.gif';
$txt['theme_description'] = 'A dark modern looking gaming type theme for SMF.<br /><br />Theme by <a href="www.dzinerstudio.com">DzinerStudio</a>.';

// --- Begin added code - Advanced Visual Verification ---
$txt['ncode_imageresizer_warning_small'] = 'Click this bar to view the full image.';
$txt['ncode_imageresizer_warning_filesize'] = 'This image has been resized. Click this bar to view the full image. The original image is sized %1$sx%2$s and weighs %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'This image has been resized. Click this bar to view the full image. The original image is sized %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Click this bar to view the small image.';
$txt['ncode_imageresizer_mode'] = 'Resize Mode';
$txt['ncode_imageresizer_original'] = 'Keep original size';
$txt['ncode_imageresizer_enlarge_same'] = 'Enlarge in same document';
$txt['ncode_imageresizer_open_same'] = 'Open in same window';
$txt['ncode_imageresizer_open_new'] = 'Open in new window';
$txt['ncode_imageresizer_max_width'] = 'Maximum width';
$txt['ncode_imageresizer_max_height'] = 'Maximum height<br /><span class="smalltext">Leave blank for no max height.</span>';
// --- End added code ---

$txt['wow'] = 'WoW Tooltip';

?>

Garou

Hmm Looks like Ill have to update the instructions for installing on other themes....
When I wrote that bit I forgot that I had a newer jquery script in the package

In your index.template.php Change where it says...
<script src="wow/jquery-1.2.1.js"></script>
to
<script src="wow/jquery-1.3.2.min.js"></script>

krilz

Thanks for the reply, it now works like a charm! Much appreciated (and sexy) mod.

Advertisement: