First what I need you to do is get into your root files and go to the blocks folder and remove anything trophy king related. It may be something along the lines of blocks_imp_trophyking.php
Next go to your templates folders and remove anything similar to trophyking_block.tpl
That should get rid of your current broken Trophy King/Queen Box
Now to add your new block.
Creat file trophyking_block.tpl
Place this code
- Code: Select all
<table> <tr> <td> <span> <img><br><br> <BEGIN> {trophyking.BEST} <END> </span> </td> </tr> </table>
Save
Create file blocks_imp_trophyking.php
Place code
- Code: Select all
<php> * Description : Display current Trophy King * version : 1.0.0 (Oct 24, 2005) * ************************************************************/ /************************************************************ * For Security Purposes, Please Check: * [url=http://IntegraMOD-tw.net]http://IntegraMOD-tw.net[/url] or [url=http://IntegraMOD.com]http://IntegraMOD.com[/url] * for the latest version of this MOD. * Downloading this MOD from other sites could cause malicious * code to enter into your phpBB Forum. * ************************************************************/ /*********************************************************** * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; * either version 2 of the License, or (at your option) * any later version. * ************************************************************/ if ( !defined('IN_PHPBB') ) { die("Hacking attempt"); } if(!function_exists(imp_trophyking_block_func)) { function imp_trophyking_block_func() { global $template, $db, $theme, $phpEx, $userdata; $q = "SELECT * FROM ". USERS_TABLE ." ORDER BY user_trophies DESC"; $best = $db -> sql_query($q); $trophyking = $db -> sql_fetchrow($best); $username = $trophyking['username']; $user_id = $trophyking['user_id']; $trophies = $trophyking['user_trophies']; $link = ($trophyking['user_id'] == ANONYMOUS) ? ". ". $trophyking['username'] : "<b><a>". $username ."</a></b>"; $template -> assign_block_vars('trophyking', array( 'BEST' => $link . "<br><b>". number_format($trophies) . "</b> Trophies" ) ); } } imp_trophyking_block_func(); ?>
Save
Upload files trophyking_block.tpl to your templates/blocks directory
Upload blocks_imp_trophyking.php to you root/blocks folder
Exit and log in to your ACP go Im Portal, and choose your page you wish to creat a new block in.
Name: Trophy King
Active: Yes
Type: BBcode
Cache: no
Block File: trophy King
View By: Your Choice
All the following options are your choice. I hope this helps you and others. I have had this block for a while and was not in a hurry to get it to work. Thx for lighting a fire under my Duff. Let me know if you have any issues with this block and I'll do what I can to help. Have a great day/night Ray