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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 702
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 103
  • Total: 103

Script Conversion. Phpp->Tp/Smf

Started by mongey, October 07, 2007, 06:57:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mongey

Hello,
We are looking to add league and tournament management capabilities to our website, www.gamezbox.com.  As we couldnt find any specific SMF/Tinyportal mods to buy, we bought a php script called nukeladder which claimed to work on "PhpNuke, CPGNuke, PlatinumNuke, IPBNuke , PhpBB , vbulletin, e107 and possibly others".

I can also obtain the script for vbulletinif it is of any help.

We did this thinking we could modify slightly to work with SMF/Tiny Portal but it seems the code is specifically written for phpbb and we are looking for help in converting it to smf/tp.  We believe that this will be a valuable addon and others will use it also.

We appreciate any help in this regard.

I have attached the code to the main NukeLadder file.
<?php
###############################################################
# X1plugin Competition Management
# File::index.php
# File Version::2.5.5 
# Homepage::http://www.projectxnetwork.com
# Copyright:: Shane Andrusiak
###############################################################
define('X1plugin_include'true);
# PHPBB StartUp
define('IN_PHPBB'true);  
$phpbb_root_path './'
include(
$_root_path 'extension.inc');  
include(
$phpbb_root_path 'common.'.$phpEx);  
$userdata session_pagestart($user_ip0);  
init_userprefs($userdata);    
$page_title 'NukeLadder'

# Load X1 Config
require_once("NukeLadder/config.php");

# Load AdodbLite if Requested
if(X1_useadodblite) require_once(X1_plugpath.'/adodb/adodb.inc.php');

# Load  Language Definitions
require_once(X1_langpath."/".X1_adminlang."/admin_lang.php");
require_once(
X1_langpath."/".X1_corelang."/core_lang.php");

# Load Integration Functions
require_once(X1_plugpath."/integrate.php");

# Load System Functions
require_once(X1_plugpath."/core/system/system_selectboxes.php");
require_once(
X1_plugpath."/core/system/system_functions.php");
require_once(
X1_plugpath."/core/system/system_paginate.php");

# Load Admin Functions
function X1_require_admin(){
if(check_admin()){
require_once(X1_plugpath."/core/admin/admin_disputes.php");
require_once(X1_plugpath."/core/admin/admin_config.php");
require_once(X1_plugpath."/core/admin/admin_index.php");
require_once(X1_plugpath."/core/admin/admin_games.php");
require_once(X1_plugpath."/core/admin/admin_events.php");
require_once(X1_plugpath."/core/admin/admin_matches.php");
require_once(X1_plugpath."/core/admin/admin_teams.php");
require_once(X1_plugpath."/core/admin/admin_maps.php");
require_once(X1_plugpath."/core/admin/admin_mapgroups.php");
require_once(X1_plugpath."/core/admin/admin_config.php");
require_once(X1_plugpath."/core/admin/admin_challenges.php");
}else{
die("Go Away");
}
}

#pseudo cron
expire_challenges();
$op $_REQUEST[X1_actionoperator];
if(!
defined('X1_cookiename'))define('X1_cookiename'"team");
# Header
include($phpbb_root_path 'includes/page_header.'.$phpEx); 
opentable();
# Menu
# Custom Menu
if(X1_custommenu)require_once(X1_plugpath."/core/system/".X1_custommenu_inc);
# Load Switch
require_once(X1_plugpath."/core/system/system_cases.php");
closetable();
# LinkBack
echo X1plugin_linkback();
# Footer
include($phpbb_root_path 'includes/page_tail.'.$phpEx); 
?>


Below is the config.php <?php
###########################################
# SCRIPT CONFIG FOR PHP-NUKE
###########################################
# ERROR REPORTING OPTIONS
#error_reporting(2047);
###########################################
# PATH OPTIONS
# Path options define directorys where files should exsist and what to insert 
# into certain links to trigger certain actions within a cms.
###########################################

#Sets site name
define('X1_sitename'"NukeLadder Powered Gaming Site");
#Return url, loggin out ect
define('X1_url''http://www.pxn.ca/Forum/');  
#Path to Plugin directory
define('X1_plugpath'"NukeLadder");
#Path to css directory
define('X1_csspath'X1_plugpath."/css");
#Path to images directory
define('X1_imgpath'X1_plugpath."/images");
#Path to javascripts
define('X1_jspath'X1_plugpath."/jscript");
#Path to plugin mod files
define('X1_modpath',X1_plugpath."/mods");
#Path to language files
define('X1_langpath'X1_plugpath."/language");
#Path to email files
define('X1_emailpath'X1_plugpath."/emails");

#File to use in POST requests in admin
define('X1_adminpostfile''nukeladder.php');
#File to use in GET requests in admin
define('X1_admingetfile''nukeladder.php');

#File to use in POST requests in core
define('X1_publicpostfile''nukeladder.php');
#File to use in GET requests in core
define('X1_publicgetfile''nukeladder.php');
#Action operators

define('X1_linkactionoperator''op');
define('X1_actionoperator''op');


#Which cms the plugin is running in
define('X1_parent''phpbb');
#Output format of the plugin
define('X1_output'"echo");

###########################################
# LOCALE OPTIONS
# Locale options define which lanaguage files to use in core and admin areas.
# (only english, spanish so far, tanslators needed.)
###########################################

#Admin Lang 
define('X1_adminlang''english');
#Core Lang
define('X1_corelang''english');

#Normal dateformat
define('X1_dateformat''M:d:Y');
#Extended dateformat with time
define('X1_extendeddateformat''M:d:Y H:i');

###########################################
# DATABASE MAPPING OPTIONS
# The following tables define which prefixes and which database tables to use.
# If you have a default setup, most of these should remain as is.
# Some nuke users may need to change the prefix options
###########################################

#Use external adodb abstraction layer, NukeEvo 2.0.0+ set to false as it has built-in adodb
define('X1_useadodblite'true);

#main tables prefix
define('X1_prefix''nuke_'); 
#user table prefix
define('X1_userprefix''phpbb_');

#Users Main
#CMS Database table containing users
define('X1_DB_userstable''users');
#Key name which contains user's id
define('X1_DB_usersidkey''user_id');
#Key name which contains user's name
define('X1_DB_usersnamekey''username');
#Key name which contains user's email
define('X1_DB_usersemailkey''user_email');
#Key name which contains user's fake email
define('X1_DB_usersfakeemailkey''femail');
#Key name which contains user's public email flag
define('X1_DB_usersviewemailkey''user_viewemail');
#User extras
#Key name which contains user's icq
define('X1_DB_userseicqkey''user_icq');
#Key name which contains user's aim
define('X1_DB_userseaimkey''user_aim');
#Key name which contains user's msn
define('X1_DB_usersemsnkey''user_msn');
#Key name which contains user's yim
define('X1_DB_userseyimkey''user_yim');
#Key name which contains user's homepage
define('X1_DB_usersewebkey''user_website');
#Key name which contains user's avatar
define('X1_DB_userseavatarkey''user_avatar');
#Key name which contains user's country
define('X1_DB_userslocationkey''user_from');
#Key name which contains user's registration date
define('X1_DB_usersregdatekey''user_regdate');


#Table Mapping
#Plugin Maps Table
define('X1_DB_maps''laddermaplist');
#Plugin Games Table
define('X1_DB_games''games');
#Plugin Teams Table
define('X1_DB_teams''teams');
#Plugin Events Table
define('X1_DB_events''ladders');
#Plugin Challenges Table
define('X1_DB_teamchallenges''challengeteam');
#Plugin Temp Challenges Table
define('X1_DB_teamtempchallenges''challengeteamtemp');
#Plugin Invites Table
define('X1_DB_teaminvites''confirminvites');
#Plugin Disputes Table
define('X1_DB_teamdisputes''ladderdisputes');
#Plugin Team's Events Table
define('X1_DB_teamsevents''ladderteams');
#Plugin Matches Table
define('X1_DB_teamhistory''playedgames');
#Plugin Joined Teams Table
define('X1_DB_teamroster''userteams');
#Plugin Mapgroups Table
define('X1_DB_mapgroups','mapgroups');



###########################################
# LINKBACK OPTIONS
# Linking back is nice.
###########################################

#Show linkback, true or false
define('X1_showlinkback'true);
#Show text version info under image, true or false
define('X1_showversion'true);
#Version Number
define('X1_release''2.5.5');
#Alignment , right, center, left
define('X1_lbalign''right');
#black, blue, green, grey, orange, red, violet, white, yellow (.png)
define('X1_lbimage''blue.png');
#Linkback url
define('X1_lblink''http://www.nukeladder.com');



###########################################
# COOKIE AND LOGIN/OUT OPTIONS
# Define cookie name and time, and refreshtime when logging in and out.
###########################################

#Cookie mode (0=php) (1=javascript) (0 is default, 1 for phpbb)
define('X1_cookiemode','1');
#Cookie name (default works fine)
define('X1_cookiename''team');
#Time for cookie to last
define('X1_cookietime''32000');
#Time to wait to fresh when logging in and out
define('X1_refreshtime'"2");
#Page to goto when logging out
define('X1_logoutpage'X1_url.'index.php');


###########################################
# EMAIL OPTIONS
# Options for sending emails
###########################################

#Turn sending on and off
define('X1_emailon',false);
#Return mail address
define('X1_returnmail''noreply@yourdomain.com');
#Timestamp format used when creating dates in emails
define('X1_emailtimestamp''M:d:Y H:i');
#Show text when emails are sent, for debugging use.
define('X1_emaildebug',false);


###########################################
# TEAMS OPTIONS
# Options related to teams and team profiles
###########################################

#How many teams to display per page on the team list
define('X1_teamlistlimit',5);
#How many teams one user is allowed to create
define('X1_maxcreate'"2");
#How many teams one user is allowed to join
define('X1_maxjoin'"5");
#Team image width
define('X1_teamimagew',"100");
#Team image height
define('X1_teamimageh',"100");
#Extra option on roster
define('X1_extraroster1'"Extra1");
define('X1_extraroster2'"Extra2");
define('X1_extraroster3'"Extra3");
#Mysql Orderby for sortinng rosters
define('X1_rostersort'"name ASC");
#Default Logo
define('X1_team_image'X1_imgpath.'/deflogo.gif');

###########################################
# LADDER HOME LIMIT OPTIONS
###########################################

#Number of teams to show in top standings table
define('X1_topteamlimit'"5");
#Number of new matches to show
define('X1_newmatchlimit',"5");
#number of past matches to show
define('X1_resultslimit'"5");

###########################################
# PLAYER OPTIONS - BROKEN!!!!!
###########################################

define('X1_newplayerdays'"3");
define('X1_newplayercolor'"#CCCCCC");
define('X1_showavatars'false );


###########################################
# MOD SETTINGS OPTIONS
###########################################

#Show settings when challenging
define('X1_showsettingschall'true );
#Show Rules when challenging
define('X1_showruleschall'true );
#Show settings when reporting
define('X1_showsettingsreport'true );
#Show rules when reporting
define('X1_showrulesreport'true );


###########################################
# CHALLENGE EXTRA OPTIONS - Marked for workover
###########################################

#Turn on Extras in challenges 1
define('X1_extraoneon'true );
#Turn on Extras in challenges 2
define('X1_extratwoon'true );
#Extra field 1's name
define('X1_extraonename''Server IP' );
#Extra field 2's name
define('X1_extratwoname''Server Port' );
# False =  shows field on send challenge form
# True  = shows field on accept challenge form
#Page to show field 1
define('X1_extraonepage'false );
#Page to show field 2
define('X1_extratwopage'false );


###########################################
# Css Options and Menu 
# Some systems may have conflicting or conforming css style classes, 
# define them here or leave as is for main style.
###########################################
define('X1_custommenu'false);
define('X1_custommenu_inc'"system_menu.php");

#Use a custom stylesheet found in Plugin Css directory
define('X1_customstyle'true);
define('X1plugin_title''title');
define('X1_formstyle''margin:0;');
define('X1_teamlistclass''tborder');
define('X1_teamreportclass''tborder');
define('X1plugin_gamecontainer''tborder');
define('X1plugin_newmatchestable''tborder');
define('X1plugin_pastmatchestable''tborder');
define('X1plugin_matchdetailstable''tborder');
define('X1plugin_standingstable''tborder');
define('X1plugin_mapslist''tborder');
define('X1plugin_teamprofiletable''tborder');
define('X1plugin_createteamtable''tborder');
define('X1plugin_quitteamtable''tborder');
define('X1plugin_jointeamtable''tborder');
define('X1plugin_teamadmintable''tborder');
define('X1plugin_playerprofiletable''tborder');
define('X1plugin_challengeteamtable''tborder');
define('X1plugin_admintable''tborder');
define('X1plugin_disputestable''tborder');
define('X1plugin_rulestable''tborder');
define('X1plugin_ladderhometable''tborder');
define('X1plugin_tablehead''thead');
define('X1plugin_tablebody''tbody');
define('X1plugin_tablefoot''tfoot');


###########################################
# Admin Options
###########################################

#help file, liad in admin panel 
define('X1_helpfile''http://www.projectxnetwork.com/help.htm');
#Icon Images
define('X1_addimage''/submit/add.gif');
define('X1_delimage''/submit/close_red.gif');
define('X1_saveimage''/submit/disk.gif');
define('X1_editimage''/submit/edit.gif');
define('X1_tab_image''/folder.gif');
#Show or hide the config panel in the admin
define('X1_useconfigpanel'false);

#How many lines to show per panel page
define('X1_adminquerylimit'10);

###########################################
# More
###########################################

#defualt image preview image
define('X1_defpreviewimage''/games/default.png');
#Tab Size
define('X1_tab_width''10');
define('X1_tab_height''10');
#Tab Border
define('X1_tab_border''0');
#Yes and no colors
define('X1_Yescolor''#00FF00');
define('X1_Nocolor''#FF0000');
?>


Crip

I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



Zetan

And I wonder who recommended that ;)

If anybody can help Mongey, I'd be grateful too, I know it's probably a tall order.
But it's way beyond my knowledge of scripts.

IchBin

I can't look at it and test it if I don't have the script. All I see in those files is a bunch of constants that are defined and included files. Without being able to test this on my own I couldn't get it to work.

mongey

Thanks for the replies everyone.

I haven't included all the files as it is a paid script.
IchBin
Shall i send you the files in a pm? Thanks for the help

IchBin

I'll give it a shot if you'd like and see if I can get it to work. ichbin at tinyportal dot net.


mongey

Just wondering if there have been any updates? Is it possible to do ?

Thanks

IchBin

Haven't had any success yet. Also haven't had much time to work on it. Will let you know ASAP.

mongey

Just wondering if you have had any luck with it? If not thanks for having a look at it.

Anyone else upto the task?

This website is proudly hosted on Crocweb Cloud Website Hosting.