[Beta] Stargate Portal 1.0.0

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Anti-Spam Guide
Locked
User avatar
yng_mastr
Registered User
Posts: 57
Joined: Wed Sep 03, 2008 9:56 am
Contact:

Re: [Beta] Stargate Portal 0.4.0b

Post by yng_mastr » Fri Sep 05, 2008 2:02 pm

Well i m a complete noob in phpbb3 form environment. Just found out that such a nice thing like portal exists for phpbb3!! :D

But now m confused. I have a live forum. Which version should i download?? from where?
cz i see only one link to download the latest version. Is it stable for live forum?

And i m confused.. again u said phpbb3 gold ? i have olympus(3.0.2) . will it work in that??
There is always a way around..

User avatar
RATT
Registered User
Posts: 734
Joined: Fri Aug 19, 2005 6:27 am

Re: [Beta] Stargate Portal 0.4.0b

Post by RATT » Fri Sep 05, 2008 2:15 pm

yng_mastr wrote:Well i m a complete noob in phpbb3 form environment. Just found out that such a nice thing like portal exists for phpbb3!! :D

But now m confused. I have a live forum. Which version should i download?? from where?
cz i see only one link to download the latest version. Is it stable for live forum?

And i m confused.. again u said phpbb3 gold ? i have olympus(3.0.2) . will it work in that??
You forgot to read the sticky. Beta mods are never to be used in a live environment. They are for testing purposes only. Mod authors could change any or all coding at any time to fix/repair bugs, security holes, new features, etc.. 3.0.2 is the same as gold. Download and test away ;)

golgoth
Registered User
Posts: 199
Joined: Tue Jul 18, 2006 11:36 pm

Re: [Beta] Stargate Portal 0.4.0b

Post by golgoth » Fri Sep 05, 2008 2:18 pm

That's an exaggeration: personally i've been running a forum with 30+ "beta" mods for 8 months now and i had no particular problems, except some minor bugs.

As for Stargate, wait for 0.40 version to come.

Don't ask when, i think only god knows :)

User avatar
michaelo
Registered User
Posts: 1292
Joined: Thu Jun 13, 2002 3:49 am
Location: Dublin, Ireland
Name: Michael O'Toole
Contact:

Re: [Beta] Stargate Portal 0.4.0b

Post by michaelo » Fri Sep 05, 2008 11:34 pm

Everyone thinking of installing Stargate Portal should wait for RC1 (0.4.0) as it contains many updates...
If you want to test it, we will have a pre-installed versions soon for phpBB 3.0.2 and Stargate Portal 0.4.0 (drop by the main site for news)... Should you want to see a demo, drop by the demo site (link in sig)
Contributions: Mods & Styles Extensions
(site is down): Kiss Portal Engine

User avatar
yng_mastr
Registered User
Posts: 57
Joined: Wed Sep 03, 2008 9:56 am
Contact:

Re: [Beta] Stargate Portal 0.4.0b

Post by yng_mastr » Sat Sep 06, 2008 2:01 pm

Tnx for the reply RATT!

I downloaded the 0.3.0b . for my forum . But when i started to install it.. In the install_section_two.txt file , it is mentioned -

Code: Select all

#-----[ OPEN ]------------------------------------------ IF MOD ADDED?
#

admin/style/acp_add_users.php
But i dont have a folder "admin" anywhere?? :!: And what does IF MOD ADDED mean here??
The installation procedure mentined here seems qt complicated.. :(
There is always a way around..

livewirestu
Registered User
Posts: 106
Joined: Mon Sep 17, 2007 9:10 am

Re: [Beta] Stargate Portal 0.4.0b

Post by livewirestu » Sat Sep 06, 2008 4:15 pm

The install procedure isn't really complicated... its just that there are a lot of edits. Granted, there are a few parts which may seem unclear in the installation documents, but if you run into problems, just say so and we can guide you in the right direction.
And the admin folder - This is a typo. It should be adm. However, the acp add user mod is not included as standard since 0.3.1.

User avatar
michaelo
Registered User
Posts: 1292
Joined: Thu Jun 13, 2002 3:49 am
Location: Dublin, Ireland
Name: Michael O'Toole
Contact:

Re: [Beta] Stargate Portal 0.4.0b

Post by michaelo » Sat Sep 06, 2008 5:10 pm

The download has not been updated in some time.. Drop by the main site and check out the posts relating to 0.3.0 installation... All your questions will be answered...

We are currently testing 0.4.0 (RC1), it will be available shortly... Mike
Contributions: Mods & Styles Extensions
(site is down): Kiss Portal Engine

User avatar
yng_mastr
Registered User
Posts: 57
Joined: Wed Sep 03, 2008 9:56 am
Contact:

Re: [Beta] Stargate Portal 0.4.0b

Post by yng_mastr » Sat Sep 06, 2008 10:03 pm

Firstly.. i juss love this forum cz people are so willing to help newbies to the phpbb environment.

Secondly,

Code: Select all

And the admin folder - This is a typo. It should be adm. However, the acp add user mod is not included as standard since 0.3.1.
well... i also thought it was a typo so i checked in adm/styles/ but still there is no file named acp_add_users.php. :!:

Further..when i was installing..

In the install_section_two.txt, Its written -

Code: Select all

#-----[ OPEN ]------------------------------------------
#

includes/acp/acp_users.php

# 
#-----[ FIND ]------------------------------------------
#

'user_birthday'	=> sprintf('%2d-%2d-%4d', $data['bday_day'], $data['bday_month'], $data['bday_year']),

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

							'user_country_flag'	=> $data['user_country_flag'],
But in my actual acp_users.php , there is no line such as the one mentioned. It is like this -

Code: Select all

$data['user_birthday']	= sprintf('%2d-%2d-%4d', $data['bday_day'], $data['bday_month'], $data['bday_year']);

And also for ucp_users.php -

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#

includes/ucp/ucp_register.php
# 
#-----[ FIND ]------------------------------------------ 
# 

			'S_TIME'			=> 1000 * ((int) $config['min_time_reg']),
			)
		);
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
		if(STARGATE)
		{
			$template->assign_vars(array(
				'USER_COUNTRY_FLAG'		=> (isset($user_country_flag)) ? $user_country_flag : '',
				'S_USER_COUNTRY_FALG'	=> $data['user_country_flag'],
				'S_USER_COUNTRY_FLAG_OPTIONS'	=> sgp_user_country_flag_select($user_country_flag))
			);
		}

But there is no such find in the php file . :(

If any1 can help me through any software like team viewer, then also i am ready. and other wise, i can reply here.. i only hope u people understand it well .. :(
There is always a way around..

User avatar
michaelo
Registered User
Posts: 1292
Joined: Thu Jun 13, 2002 3:49 am
Location: Dublin, Ireland
Name: Michael O'Toole
Contact:

Re: [Beta] Stargate Portal 0.4.0b

Post by michaelo » Sun Sep 07, 2008 12:09 am

The edits refer to a mod that we had installed... It's a pretty simple mod to install... You can ignore the edits or add the mod manually...
Mike
Contributions: Mods & Styles Extensions
(site is down): Kiss Portal Engine

User avatar
yng_mastr
Registered User
Posts: 57
Joined: Wed Sep 03, 2008 9:56 am
Contact:

Re: [Beta] Stargate Portal 0.4.0b

Post by yng_mastr » Sun Sep 07, 2008 8:12 am

ok so i will ignore these edits completly. No change. I hope that won't give me any errors?? and will the portal work normally????

And can u give me a brief explanation, as to how can i install them manually?? or a link to the topic?
i m really new, and have no idea....



I further moved on with my installation.

When i was editing style/X-static/template/overall_header.html -

Code: Select all

<!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" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
<head>

<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="copyright" content="2000, 2002, 2005, 2007 phpBB Group" />
<meta name="keywords" content="phpbb, skin, skins, x-treme, design, template, templates, phpbb skin, phpbb template, x-treme skin, phpbb3" />
<meta name="description" content="phpbb skins and designs! skin-lab.com is the best choise for your forum template" />
{META}
<title>dloadhub.com &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>

<link rel="stylesheet" href="{T_STYLESHEET_LINK}" type="text/css" />


<script type="text/javascript">
// <![CDATA[
<!-- IF S_USER_PM_POPUP -->
	if ({S_NEW_PM})
	{
		popup('{UA_POPUP_PM}', 400, 225, '_phpbbprivmsg');
	}
<!-- ENDIF -->

function popup(url, width, height, name)
{
	if (!name)
	{
		name = '_popup';
	}

	window.open(url.replace(/&/g, '&'), name, 'height=' + height + ',resizable=yes,scrollbars=yes,width=' + width);
	return false;
}

function jumpto()
{
	var page = prompt('{LA_JUMP_PAGE}:', '{ON_PAGE}');
	var perpage = '{PER_PAGE}';
	var base_url = '{A_BASE_URL}';

	if (page !== null && !isNaN(page) && page > 0)
	{
		document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * perpage);
	}
}

/**
* Find a member
*/
function find_username(url)
{
	popup(url, 760, 570, '_usersearch');
	return false;
}

/**
* Mark/unmark checklist
* id = ID of parent container, name = name prefix, state = state [true/false]
*/
function marklist(id, name, state)
{
	var parent = document.getElementById(id);
	if (!parent)
	{
		eval('parent = document.' + id);
	}

	if (!parent)
	{
		return;
	}

	var rb = parent.getElementsByTagName('input');
	
	for (var r = 0; r < rb.length; r++)
	{
		if (rb[r].name.substr(0, name.length) == name)
		{
			rb[r].checked = state;
		}
	}
}

<!-- IF ._file -->

	/**
	* Play quicktime file by determining it's width/height
	* from the displayed rectangle area
	*
	* Only defined if there is a file block present.
	*/
	function play_qt_file(obj)
	{
		var rectangle = obj.GetRectangle();

		if (rectangle)
		{
			rectangle = rectangle.split(',')
			var x1 = parseInt(rectangle[0]);
			var x2 = parseInt(rectangle[2]);
			var y1 = parseInt(rectangle[1]);
			var y2 = parseInt(rectangle[3]);

			var width = (x1 < 0) ? (x1 * -1) + x2 : x2 - x1;
			var height = (y1 < 0) ? (y1 * -1) + y2 : y2 - y1;
		}
		else
		{
			var width = 200;
			var height = 0;
		}

		obj.width = width;
		obj.height = height + 16;

		obj.SetControllerVisible(true);

		obj.Play();
	}
<!-- ENDIF -->

// ]]>
</script>
<script type="text/javascript">
// <![CDATA[
/***********************************************
* AnyLink Drop Down Menu- Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
//Contents for Poster Options
<!-- BEGIN postrow -->
var menu{postrow.POSTER_ID}=new Array()
menu{postrow.POSTER_ID}[0]='<!-- IF postrow.U_PROFILE --><a href="{postrow.U_POST_AUTHOR}"><img src="{T_THEME_PATH}/images/prof.png" style="vertical-align: top;">&nbsp;&nbsp;{L_READ_PROFILE}</a><!-- ENDIF -->'
menu{postrow.POSTER_ID}[1]='<!-- IF postrow.U_PM --><a href="{postrow.U_PM}"><img src="{T_THEME_PATH}/images/send_pm_small.png" style="vertical-align: top;">&nbsp;&nbsp;{L_PM}</a><!-- ENDIF -->'
menu{postrow.POSTER_ID}[2]='<!-- IF postrow.U_EMAIL --><a href="{postrow.U_EMAIL}"><img src="{T_THEME_PATH}/images/email.png" style="vertical-align: top;">&nbsp;&nbsp;{L_EMAIL}</a><!-- ENDIF -->'
menu{postrow.POSTER_ID}[3]='<!-- IF postrow.U_WWW --><a href="{postrow.U_WWW}"><img src="{T_THEME_PATH}/images/www.png" style="vertical-align: top;">&nbsp;&nbsp;{L_WEBSITE}</a><!-- ENDIF -->'
menu{postrow.POSTER_ID}[4]='<!-- IF postrow.U_WARN --><a href="{postrow.U_WARN}"><img src="{T_THEME_PATH}/images/warn.png" style="vertical-align: top;">&nbsp;&nbsp;{L_WARN_USER}</a><!-- ENDIF -->'
<!-- END postrow -->
//Contents for Forum Options
var menu_forum_menu=new Array()
menu_forum_menu[0]='<!-- IF S_WATCH_FORUM_LINK and not S_IS_BOT --><a href="{S_WATCH_FORUM_LINK}"><img src="{T_THEME_PATH}/images/script_add.png" style="vertical-align: top;">&nbsp;&nbsp;{S_WATCH_FORUM_TITLE}</a><!-- ENDIF -->'
menu_forum_menu[1]='<!-- IF not S_IS_BOT and U_MARK_TOPICS --><a href="{U_MARK_TOPICS}"><img src="{T_THEME_PATH}/images/tick.png" style="vertical-align: top;">&nbsp;&nbsp;{L_MARK_TOPICS_READ}</a><!-- ENDIF -->'
//Contents for Topic Options
var menu_topic_menu=new Array()
menu_topic_menu[0]='<!-- IF U_WATCH_TOPIC --><a href="{U_WATCH_TOPIC}" title="{L_WATCH_TOPIC}"><img src="{T_THEME_PATH}/images/sub.png" style="vertical-align: top;">&nbsp;&nbsp;{L_WATCH_TOPIC}</a><!-- ENDIF -->'
menu_topic_menu[1]='<!-- IF U_BOOKMARK_TOPIC --><a href="{U_BOOKMARK_TOPIC}" title="{L_BOOKMARK_TOPIC}"><img src="{T_THEME_PATH}/images/book.png" style="vertical-align: top;">&nbsp;&nbsp;{L_BOOKMARK_TOPIC}</a><!-- ENDIF -->'
menu_topic_menu[2]='<!-- IF U_PRINT_TOPIC --><a href="{U_PRINT_TOPIC}" title="{L_PRINT_TOPIC}"><img src="{T_THEME_PATH}/images/printer.png" style="vertical-align: top;">&nbsp;&nbsp;{L_PRINT_TOPIC}</a><!-- ENDIF -->'
menu_topic_menu[3]='<!-- IF U_EMAIL_TOPIC --><a href="{U_EMAIL_TOPIC}" title="{L_EMAIL_TOPIC}"><img src="{T_THEME_PATH}/images/email_friend.png" style="vertical-align: top;">&nbsp;&nbsp;{L_EMAIL_TOPIC}</a><!-- ENDIF -->'
menu_topic_menu[4]='<!-- IF U_BUMP_TOPIC --><div id="border-bottom"><a href="{U_BUMP_TOPIC}" title="{L_BUMP_TOPIC}"><img src="{T_THEME_PATH}/images/bump.png" style="vertical-align: top;">&nbsp;&nbsp;{L_BUMP_TOPIC}</a></div><!-- ENDIF -->'
//Contents for View Menu
var menu_view_menu=new Array()
menu_view_menu[0]='<!-- IF S_DISPLAY_SEARCH --><a href="{U_SEARCH_UNANSWERED}" title="{L_SEARCH_UNANSWERED}"><img src="{T_THEME_PATH}/images/arrow_right.png" style="vertical-align: top;">&nbsp;&nbsp;{L_SEARCH_UNANSWERED}</a><!-- ENDIF -->'
menu_view_menu[1]='<!-- IF S_DISPLAY_SEARCH --><a href="{U_SEARCH_ACTIVE_TOPICS}" title="{L_SEARCH_ACTIVE_TOPICS}"><img src="{T_THEME_PATH}/images/arrow_right.png" style="vertical-align: top;">&nbsp;&nbsp;{L_SEARCH_ACTIVE_TOPICS}</a><!-- ENDIF -->'
menu_view_menu[2]='<!-- IF S_DISPLAY_SEARCH --><!-- IF S_USER_LOGGED_IN --><a href="{U_SEARCH_NEW}" title="{L_SEARCH_NEW}"><img src="{T_THEME_PATH}/images/arrow_right.png" style="vertical-align: top;">&nbsp;&nbsp;{L_SEARCH_NEW}</a><!-- ENDIF --><!-- ENDIF -->'
menu_view_menu[3]='<!-- IF S_DISPLAY_SEARCH --><!-- IF S_USER_LOGGED_IN --><a href="{U_SEARCH_SELF}" title="{L_SEARCH_SELF}"><img src="{T_THEME_PATH}/images/arrow_right.png" style="vertical-align: top;">&nbsp;&nbsp;{L_SEARCH_SELF}</a><!-- ENDIF --><!-- ENDIF -->'
var menuwidth='200px' //default menu width
var menubgcolor='#F2F2F3'  //menu bgcolor
var hidemenu_onclick="yes" //hide menu when user clicks within menu?
/////No further editting needed
var ie4=document.all
var ns6=document.getElementById && !document.all
var defaultwidth=menuwidth
if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onmouseover="clearhidemenu()" onmouseout="dynamichide(event)"></div>')
function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}
function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
dropmenuobj.widthobj=dropmenuobj.style
if (typeof menuwidth=='undefined'||menuwidth=='selfc'){
tmpspan.style.display='inline'
dropmenuobj.widthobj.width=tmpspan.offsetWidth+'px'
tmpspan.style.display='none'
}
else if (menuwidth!='')
dropmenuobj.widthobj.width=menuwidth
else
dropmenuobj.widthobj.width=defaultwidth
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}
function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}
function populatemenu(what){
if (ie4||ns6){
var appendit=0
if (typeof tmpspan=='undefined'){
tmpspan=document.createElement('span')
appendit=1
}
if(appendit){
tmpspan.style.position="absolute"
tmpspan.style.left="-1000px"
tmpspan.id='tspan'
document.body.appendChild(tmpspan)
tmpspan.style.display='none'
}
tmpspan.innerHTML=dropmenuobj.innerHTML=what.join("")
}
}
function dropdownmenu(obj, e, menucontents, menuwidth){
obj.onmouseout=delayhidemenu;
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)
if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}
return clickreturnvalue()
}
function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}
function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}
function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}
function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}
function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}
function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}
if (hidemenu_onclick=="yes")
document.onclick=hidemenu
// ]]>
</script>

<!-- INCLUDE portal_header.html -->

</head>
<body class="{S_CONTENT_DIRECTION}">
<a name="top"></a>
	<div id="wrapheader">
		<div class="top_center">
		<div class="top_title">
			<h5 style="margin-top:0px;margin-right:0px;cursor:pointer;">
				<a class="top_bar_button_left" href="{U_INDEX}" >{L_HOME}</a>
			</h5>
			<h5 style="margin-top:0px;margin-right:0px;cursor:pointer;">
				<a class="top_bar_button_cl" href="{U_FAQ}" >{L_FAQ}</a>
			</h5>	
			<!-- IF not S_IS_BOT -->
				<!-- IF S_DISPLAY_MEMBERLIST -->
					<h5 style="margin-top:0px;margin-right:0px;cursor:pointer;">
						<a class="top_bar_button_cl" href="{U_MEMBERLIST}" >{L_MEMBERLIST}</a>
					</h5>
				<!-- ENDIF -->
			<!-- ENDIF -->	
			<!-- IF S_DISPLAY_SEARCH -->
				<h5 style="margin-top:0px;margin-right:0px;cursor:pointer;">
					<a class="top_bar_button_right" href="{U_SEARCH}" >{L_SEARCH}</a>
				</h5>	
			<!-- ENDIF -->
			<!-- IF U_ACP -->
			<h5 style="margin-top:0px;margin-right:0px;cursor:pointer;">
				<a class="top_bar_button_cr_red" href="{U_ACP}">{L_ACP}</a>
			</h5>
		<!-- ENDIF -->
		</div>
		</div>
	<div id="top_logo">
		<table  width="100%" cellspacing="0" cellpadding="0" border="0">
			<tr>
				<td height="100" align="left" valign="middle" rowspan="2"><a href="{U_INDEX}">{SITE_LOGO_IMG}</a></td>
				<td align="center" valign="top" height="50">
					<p class="gensmallclock">
						<script language="javascript" src="{T_TEMPLATE_PATH}/liveclock.js" type="text/javascript"></script>
					</p>
				</td>
				<td align="right" valign="bottom" rowspan="2">&nbsp;</td>
			</tr>
			<tr>
				<td align="center" valign="top"><h1><span lang="en-us">
				<font face="High Tower Text" size="4">Reviews | Downloads</font></span></h1>
				<b><span class="gen"><span lang="en-us">
				<font face="High Tower Text" size="2">Games | Music | Movies | 
				More</font></span></span></b></td>
			</tr>
		</table>
	</div>
	<div class="cp_center">
	<div class="cp_title">
		<!-- IF not S_IS_BOT -->
			<h5 style="margin-top:0px;margin-right:0px;cursor:pointer;">
				<a class="cp_left" href="{U_LOGIN_LOGOUT}" >{L_LOGIN_LOGOUT}</a>
			</h5>
		<!-- ENDIF -->
		<!-- IF U_RESTORE_PERMISSIONS -->
			<h5 style="margin-top:0px;margin-right:0px;cursor:pointer;">
				<a class="cp_cl" href="{U_RESTORE_PERMISSIONS}" >{L_RESTORE_PERMISSIONS}</a>
			</h5>	
		<!-- ENDIF -->
		<!-- IF not S_IS_BOT -->
			<!-- IF S_USER_LOGGED_IN -->
				<!-- ELSEIF S_REGISTER_ENABLED -->
					<h5 style="margin-top:0px;margin-right:0px;cursor:pointer;">
						<a class="cp_cl" href="{U_REGISTER}" >{L_REGISTER}</a>
					</h5>
				<!-- ENDIF -->
			<!-- ENDIF -->
			<h5 style="margin-top:0px;margin-right:0px;cursor:pointer;">
				<a class="cp_cl_drop" href="#" onclick="return dropdownmenu(this, event, menu_view_menu, '200px')">{L_OPTIONS}</a>
			</h5>
			<!-- IF not S_IS_BOT -->
				<!-- IF S_USER_LOGGED_IN -->
					<!-- IF S_DISPLAY_PM -->
						<h5 style="margin-top:0px;margin-right:0px;cursor:pointer;">
							<a class="cp_right" href="{U_PRIVATEMSGS}" >
								<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->
									<font color="#ff3636">{PRIVATE_MESSAGE_INFO} - {PRIVATE_MESSAGE_INFO_UNREAD}</font></a>
								<!-- ELSE -->
									{PRIVATE_MESSAGE_INFO} </a>
								<!-- ENDIF -->
						</h5>
					<!-- ENDIF -->
				<!-- ELSE -->
				<h5 style="margin-top:0px;margin-right:0px;">
					<span class="cp_right_null" >&nbsp;</span>
				</h5>
			<!-- ENDIF -->
		<!-- ENDIF -->
		<!-- IF not S_IS_BOT -->
			<!-- IF S_USER_LOGGED_IN -->
				<h5 style="margin-top:0px;margin-right:0px;cursor:pointer;">
					<a class="cp_cr" href="{U_PROFILE}">{L_PROFILE}</a>
				</h5>
			<!-- ENDIF -->
		<!-- ENDIF -->
		<!-- IF U_MCP -->
			<h5 style="margin-top:0px;margin-right:0px;cursor:pointer;">
				<a class="cp_mod" href="{U_MCP}">{L_MCP}</a>
			</h5>
		<!-- ENDIF -->
		
	</div>
	</div>
	<table width="100%" cellspacing="0" cellpadding="0" border="0">
		<tr>
			<td class="h-pag-l" colspan="3" width="46"><img src="{T_THEME_PATH}/images/pag_arrow.png" alt="" /></td>
			<td class="h-pag-r" colspan="3" width="100%"><!-- INCLUDE breadcrumbs.html --></td>
		</tr>
	</table>
	<div class="c-f-l"><div class="c-f-r"><div class="c-f-c">&nbsp;</div></div></div>
	<!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN --><span style="color:#CC3333;">{L_BOARD_DISABLED}</span><!-- ENDIF -->
	<div id="wrapcentre">
	<br style="clear: both;" />
	<br />

It is mentioned-

Code: Select all

#-----[ FIND ]------------------------------------------
#

				<li class="icon-home"><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a> <!-- BEGIN navlinks --> <strong>&#8249;</strong> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></li>

#
#-----[ Replace with:----------------------------------
#

			<!-- IF STARGATE -->
				<li class="icon-home"><a href="{U_PORTAL}" accesskey="h">{L_PORTAL}</a> &bull; <a href="{U_INDEX}" accesskey="h">{L_INDEX}</a><!-- BEGIN navlinks --> <strong>&#8249;</strong> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></li>
			<!-- ELSE -->
				<li class="icon-home"><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a> <!-- BEGIN navlinks --> <strong>&#8249;</strong> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></li>
			<!-- ENDIF -->
But again there is no such code in the file. It differs a lot than the one mentioned.

So shud i conclude, that this mod can be installed only in prosilver and subsilver? I cannot install in my custom style?? :|
There is always a way around..

User avatar
michaelo
Registered User
Posts: 1292
Joined: Thu Jun 13, 2002 3:49 am
Location: Dublin, Ireland
Name: Michael O'Toole
Contact:

Re: [Beta] Stargate Portal 0.4.0b

Post by michaelo » Sun Sep 07, 2008 10:13 pm

Send me the style or a link to it and I will port it...
Mike
Contributions: Mods & Styles Extensions
(site is down): Kiss Portal Engine

User avatar
Demon of Darkness
Registered User
Posts: 136
Joined: Fri Jul 04, 2008 4:53 am
Location: In a house
Contact:

Re: [Beta] Stargate Portal 0.4.0b

Post by Demon of Darkness » Sun Sep 07, 2008 10:38 pm

Very nice!

User avatar
yng_mastr
Registered User
Posts: 57
Joined: Wed Sep 03, 2008 9:56 am
Contact:

Re: [Beta] Stargate Portal 0.4.0b

Post by yng_mastr » Mon Sep 08, 2008 3:37 am

Thanx a lot mike! Thanx a ZILLION times! :)

here is the link to the style-

Code: Select all

http://demo.phpbb3styles.net/X-Static

Well..until you port the style and send, i tried to port the prosilver style(though i wont put it on my board), on a test board. I got a few errors which i corrected but couldn't get past this one.

I got this error after i completed editing all files and copied all files to the root of my forum.
When i go to mysite.com/forumroot -

Code: Select all

Warning: require(./../includes/functions.php) [function.require]: failed to open stream: No such file or directory in C:\Inetpub\vhosts\dloadhub.com\httpdocs\index.php on line 159

Fatal error: require() [function.require]: Failed opening required './../includes/functions.php' (include_path='.;./includes;./pear') in C:\Inetpub\vhosts\dloadhub.com\httpdocs\index.php on line 159

Error in my_thread_global_end(): 1 threads didn't exit

I guess some problem in defining path?? :?:

My index.php(that came along with portal package, i replaced old one) -

Code: Select all

<?php
/**
*
* @package install
* @version $Id: index.php,v 1.68 2007/09/23 11:10:17 acydburn Exp $
* @copyright (c) 2005 phpBB Group 
* @license http://opensource.org/licenses/gpl-license.php GNU Public License 
*
*/
/**
*
* @package portal install (based on the above file (c) 2005 phpBB Group )
* @version $Id: install_install.php,v 0.001 25/09/2007 15:05:00 Michaelo Exp $
* @copyright Sections (c) 2007 phpbireland
* @license http://opensource.org/licenses/gpl-license.php GNU Public License 
*
*/

/**#@+
* @ignore
*/
define('IN_PHPBB', true);
define('IN_INSTALL', true);
/**#@-*/

$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);

// Report all errors, except notices
error_reporting(E_ALL ^ E_NOTICE);

// @todo Review this test and see if we can find out what it is which prevents PHP 4.2.x from even displaying the page with requirements on it
if (version_compare(PHP_VERSION, '5.1.0') < 0)
{
	die('You are running an unsupported PHP version. Please upgrade to PHP 5.1.0 or higher before trying to install phpBB 3.0');
}

/*
* Remove variables created by register_globals from the global scope
* Thanks to Matt Kavanagh
*/
function deregister_globals()
{
	$not_unset = array(
		'GLOBALS'	=> true,
		'_GET'		=> true,
		'_POST'		=> true,
		'_COOKIE'	=> true,
		'_REQUEST'	=> true,
		'_SERVER'	=> true,
		'_SESSION'	=> true,
		'_ENV'		=> true,
		'_FILES'	=> true,
		'phpEx'		=> true,
		'phpbb_root_path'	=> true
	);

	// Not only will array_merge and array_keys give a warning if
	// a parameter is not an array, array_merge will actually fail.
	// So we check if _SESSION has been initialised.
	if (!isset($_SESSION) || !is_array($_SESSION))
	{
		$_SESSION = array();
	}

	// Merge all into one extremely huge array; unset this later
	$input = array_merge(
		array_keys($_GET),
		array_keys($_POST),
		array_keys($_COOKIE),
		array_keys($_SERVER),
		array_keys($_SESSION),
		array_keys($_ENV),
		array_keys($_FILES)
	);

	foreach ($input as $varname)
	{
		if (isset($not_unset[$varname]))
		{
			// Hacking attempt. No point in continuing unless it's a COOKIE
			if ($varname !== 'GLOBALS' || isset($_GET['GLOBALS']) || isset($_POST['GLOBALS']) || isset($_SERVER['GLOBALS']) || isset($_SESSION['GLOBALS']) || isset($_ENV['GLOBALS']) || isset($_FILES['GLOBALS']))
			{
				exit;
			}
			else
			{
				$cookie = &$_COOKIE;
				while (isset($cookie['GLOBALS']))
				{
					foreach ($cookie['GLOBALS'] as $registered_var => $value)
					{
						if (!isset($not_unset[$registered_var]))
						{
							unset($GLOBALS[$registered_var]);
						}
					}
					$cookie = &$cookie['GLOBALS'];
				}
			}
		}

		unset($GLOBALS[$varname]);
	}

	unset($input);
}

// If we are on PHP >= 6.0.0 we do not need some code
if (version_compare(PHP_VERSION, '6.0.0-dev', '>='))
{
	/**
	* @ignore
	*/
	define('STRIP', false);
}
else
{
	set_magic_quotes_runtime(0);

	// Be paranoid with passed vars
	if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
	{
		deregister_globals();
	}

	define('STRIP', (get_magic_quotes_gpc()) ? true : false);
}

// Try to override some limits - maybe it helps some...
@set_time_limit(0);
$mem_limit = @ini_get('memory_limit');
if (!empty($mem_limit))
{
	$unit = strtolower(substr($mem_limit, -1, 1));
	$mem_limit = (int) $mem_limit;

	if ($unit == 'k')
	{
		$mem_limit = floor($mem_limit / 1024);
	}
	else if ($unit == 'g')
	{
		$mem_limit *= 1024;
	}
	else if (is_numeric($unit))
	{
		$mem_limit = floor((int) ($mem_limit . $unit) / 1048576);
	}
	$mem_limit = max(128, $mem_limit) . 'M';
}
else
{
	$mem_limit = '128M';
}
@ini_set('memory_limit', $mem_limit);

// Include essential scripts
require($phpbb_root_path . 'includes/functions.' . $phpEx);

if (file_exists($phpbb_root_path . 'includes/functions_content.' . $phpEx))
{
	require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
}

include($phpbb_root_path . 'includes/auth.' . $phpEx);
include($phpbb_root_path . 'includes/session.' . $phpEx);
include($phpbb_root_path . 'includes/template.' . $phpEx);
include($phpbb_root_path . 'includes/acm/acm_file.' . $phpEx);
include($phpbb_root_path . 'includes/cache.' . $phpEx);
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
include($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
require($phpbb_root_path . 'includes/functions_portal_install.' . $phpEx);

// Try and load an appropriate language if required
$language = basename(request_var('language', ''));

if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !$language)
{
	$accept_lang_ary = explode(',', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']));
	foreach ($accept_lang_ary as $accept_lang)
	{
		// Set correct format ... guess full xx_yy form
		$accept_lang = substr($accept_lang, 0, 2) . '_' . substr($accept_lang, 3, 2);

		if (file_exists($phpbb_root_path . 'language/' . $accept_lang))
		{
			$language = $accept_lang;
			break;
		}
		else
		{
			// No match on xx_yy so try xx
			$accept_lang = substr($accept_lang, 0, 2);
			if (file_exists($phpbb_root_path . 'language/' . $accept_lang))
			{
				$language = $accept_lang;
				break;
			}
		}
	}
}

// No appropriate language found ... so let's use the first one in the language
// dir, this may or may not be English
if (!$language)
{
	$dir = @opendir($phpbb_root_path . 'language');

	if (!$dir)
	{
		die('Unable to access the language directory');
		exit;
	}

	while (($file = readdir($dir)) !== false)
	{
		$path = $phpbb_root_path . 'language/' . $file;

		if (!is_file($path) && !is_link($path) && file_exists($path . '/iso.txt'))
		{
			$language = $file;
			break;
		}
	}
	closedir($dir);
}

if (!file_exists($phpbb_root_path . 'language/' . $language))
{
	die('No language found!');
}

// And finally, load the relevant language files
include($phpbb_root_path . 'language/' . $language . '/common.' . $phpEx);
include($phpbb_root_path . 'language/' . $language . '/acp/common.' . $phpEx);
include($phpbb_root_path . 'language/' . $language . '/acp/board.' . $phpEx);
include($phpbb_root_path . 'language/' . $language . '/install.' . $phpEx);
include($phpbb_root_path . 'language/' . $language . '/portal_install.' . $phpEx);
include($phpbb_root_path . 'language/' . $language . '/posting.' . $phpEx);

$mode = request_var('mode', 'overview');
$sub = request_var('sub', '');

// Set PHP error handler to ours
set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');

$user = new user();
$auth = new auth();
//$cache = new acm();
$cache = new cache();
$template = new template();

// Add own hook handler, if present. :o
if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx))
{
	require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
	$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));

	foreach ($cache->obtain_hooks() as $hook)
	//foreach (cache::obtain_hooks() as $hook)
	{
		@include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
	}
}
else
{
	$phpbb_hook = false;
}

// Set some standard variables we want to force
$config = array(
	'load_tplcompile'	=> '1'
);

$template->set_custom_template('../adm/style', 'admin');
$template->assign_var('T_TEMPLATE_PATH', '../adm/style');

// the acp template is never stored in the database
$user->theme['template_storedb'] = false;

$install = new module();

$install->create('install', "index.$phpEx", $mode, $sub);
$install->load();

// Generate the page
$install->page_header();
$install->generate_navigation();

$template->set_filenames(array(
	'body' => $install->get_tpl_name())
);

$install->page_footer();

/**
* @package install
*/
class module
{
	var $id = 0;
	var $type = 'install';
	var $module_ary = array();
	var $filename;
	var $module_url = '';
	var $tpl_name = '';
	var $mode;
	var $sub;

	/**
	* Private methods, should not be overwritten
	*/
	function create($module_type, $module_url, $selected_mod = false, $selected_submod = false)
	{
		global $db, $config, $phpEx, $phpbb_root_path;

		$module = array();

		// Grab module information using Bart's "neat-o-module" system (tm)
		$dir = @opendir('.');

		if (!$dir)
		{
			$this->error('Unable to access the installation directory', __LINE__, __FILE__);
		}

		$setmodules = 1;
		while (($file = readdir($dir)) !== false)
		{
			if (preg_match('#^install_(.*?)\.' . $phpEx . '$#', $file))
			{
				include($file);
			}
		}
		closedir($dir);

		unset($setmodules);

		if (!sizeof($module))
		{
			$this->error('No installation modules found', __LINE__, __FILE__);
		}

		// Order to use and count further if modules get assigned to the same position or not having an order
		$max_module_order = 1000;

		foreach ($module as $row)
		{
			// Check any module pre-reqs
			if ($row['module_reqs'] != '')
			{
			}

			// Module order not specified or module already assigned at this position?
			if (!isset($row['module_order']) || isset($this->module_ary[$row['module_order']]))
			{
				$row['module_order'] = $max_module_order;
				$max_module_order++;
			}

			$this->module_ary[$row['module_order']]['name'] = $row['module_title'];
			$this->module_ary[$row['module_order']]['filename'] = $row['module_filename'];
			$this->module_ary[$row['module_order']]['subs'] = $row['module_subs'];
			$this->module_ary[$row['module_order']]['stages'] = $row['module_stages'];

			if (strtolower($selected_mod) == strtolower($row['module_title']))
			{
				$this->id = (int) $row['module_order'];
				$this->filename = (string) $row['module_filename'];
				$this->module_url = (string) $module_url;
				$this->mode = (string) $selected_mod;
				// Check that the sub-mode specified is valid or set a default if not
				if (is_array($row['module_subs']))
				{
					$this->sub = strtolower((in_array(strtoupper($selected_submod), $row['module_subs'])) ? $selected_submod : $row['module_subs'][0]);
				}
				else if (is_array($row['module_stages']))
				{
					$this->sub = strtolower((in_array(strtoupper($selected_submod), $row['module_stages'])) ? $selected_submod : $row['module_stages'][0]);
				}
				else
				{
					$this->sub = '';
				}
			}
		} // END foreach
	} // END create

	/**
	* Load and run the relevant module if applicable
	*/
	function load($mode = false, $run = true)
	{
		global $phpbb_root_path, $phpEx;

		if ($run)
		{
			if (!empty($mode))
			{
				$this->mode = $mode;
			}

			$module = $this->filename;
			if (!class_exists($module))
			{
				$this->error('Module "' . htmlspecialchars($module) . '" not accessible.', __LINE__, __FILE__);
			}
			$this->module = new $module($this);

			if (method_exists($this->module, 'main'))
			{
				$this->module->main($this->mode, $this->sub);
			}
		}
	}

	/**
	* Output the standard page header
	*/
	function page_header()
	{
		if (defined('HEADER_INC'))
		{
			return;
		}

		define('HEADER_INC', true);
		global $template, $lang, $stage, $phpbb_root_path;

		$template->assign_vars(array(
			'L_CHANGE'				=> $lang['CHANGE'],
			'L_INSTALL_PANEL'		=> $lang['INSTALL_PANEL'],
			'L_SELECT_LANG'			=> $lang['SELECT_LANG'],
			'L_SKIP'				=> $lang['SKIP'],
			'PAGE_TITLE'			=> $this->get_page_title(),
			'T_IMAGE_PATH'			=> $phpbb_root_path . 'adm/images/',

			'S_CONTENT_DIRECTION' 	=> $lang['DIRECTION'],
			'S_CONTENT_FLOW_BEGIN'	=> ($lang['DIRECTION'] == 'ltr') ? 'left' : 'right',
			'S_CONTENT_FLOW_END'	=> ($lang['DIRECTION'] == 'ltr') ? 'right' : 'left',
			'S_CONTENT_ENCODING' 	=> 'UTF-8',

			'S_USER_LANG'			=> $lang['USER_LANG'],
			'INSTALL_PORTAL'		=> true,
			'INS_LOGO'				=> '<a href="portal.php" title="Portal"><img src="./portal/portal_install.png" alt="" border="none">xxx</a>',
			)
		);

		header('Content-type: text/html; charset=UTF-8');
		header('Cache-Control: private, no-cache="set-cookie"');
		header('Expires: 0');
		header('Pragma: no-cache');

		return;
	}

	/**
	* Output the standard page footer
	*/
	function page_footer()
	{
		global $db, $template;

		$template->display('body');
	
		// Close our DB connection.
		if (!empty($db) && is_object($db))
		{
			$db->sql_close();
		}

		if (function_exists('exit_handler'))
		{
			exit_handler();
		}
	}

	/**
	* Returns desired template name
	*/
	function get_tpl_name()
	{
		return $this->module->tpl_name . '.html';
	}

	/**
	* Returns the desired page title
	*/
	function get_page_title()
	{
		global $lang;

		if (!isset($this->module->page_title))
		{
			return '';
		}

		return (isset($lang[$this->module->page_title])) ? $lang[$this->module->page_title] : $this->module->page_title;
	}

	/**
	* Generate an HTTP/1.1 header to redirect the user to another page
	* This is used during the installation when we do not have a database available to call the normal redirect function
	* @param string $page The page to redirect to relative to the installer root path
	*/
	function redirect($page)
	{
		$server_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME');
		$server_port = (!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT');
		$secure = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 1 : 0;

		$script_name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF');
		if (!$script_name)
		{
			$script_name = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI');
		}

		// Replace backslashes and doubled slashes (could happen on some proxy setups)
		$script_name = str_replace(array('\\', '//'), '/', $script_name);
		$script_path = trim(dirname($script_name));

		$url = (($secure) ? 'https://' : 'http://') . $server_name;

		if ($server_port && (($secure && $server_port <> 443) || (!$secure && $server_port <> 80)))
		{
			$url .= ':' . $server_port;
		}

		$url .= $script_path . '/' . $page;
		header('Location: ' . $url);
		exit;
	}

	/**
	* Generate the navigation tabs
	*/
	function generate_navigation()
	{
		global $lang, $template, $phpEx, $language;

		if (is_array($this->module_ary))
		{
			@ksort($this->module_ary);
			foreach ($this->module_ary as $cat_ary)
			{
				$cat = $cat_ary['name'];
				$l_cat = (!empty($lang['CAT_' . $cat])) ? $lang['CAT_' . $cat] : preg_replace('#_#', ' ', $cat);
				$cat = strtolower($cat);
				$url = $this->module_url . "?mode=$cat&language=$language";
				
				if ($this->mode == $cat)
				{
					$template->assign_block_vars('t_block1', array(
						'L_TITLE'		=> $l_cat,
						'S_SELECTED'	=> true,
						'U_TITLE'		=> $url,
					));

					if (is_array($this->module_ary[$this->id]['subs']))
					{
						$subs = $this->module_ary[$this->id]['subs'];
						foreach ($subs as $option)
						{
							$l_option = (!empty($lang['SUB_' . $option])) ? $lang['SUB_' . $option] : preg_replace('#_#', ' ', $option);
							$option = strtolower($option);
							$url = $this->module_url . '?mode=' . $this->mode . "&sub=$option&language=$language";

							$template->assign_block_vars('l_block1', array(
								'L_TITLE'		=> $l_option,
								'S_SELECTED'	=> ($this->sub == $option),
								'U_TITLE'		=> $url,
							));
						}
					}

					if (is_array($this->module_ary[$this->id]['stages']))
					{
						$subs = $this->module_ary[$this->id]['stages'];
						$matched = false;
						foreach ($subs as $option)
						{
							$l_option = (!empty($lang['STAGE_' . $option])) ? $lang['STAGE_' . $option] : preg_replace('#_#', ' ', $option);
							$option = strtolower($option);
							$matched = ($this->sub == $option) ? true : $matched;

							$template->assign_block_vars('l_block2', array(
								'L_TITLE'		=> $l_option,
								'S_SELECTED'	=> ($this->sub == $option),
								'S_COMPLETE'	=> !$matched,
							));
						}
					}
				}
				else
				{
					$template->assign_block_vars('t_block1', array(
						'L_TITLE'		=> $l_cat,
						'S_SELECTED'	=> false,
						'U_TITLE'		=> $url,
					));
				}
			}
		}
	}

	/**
	* Output an error message
	* If skip is true, return and continue execution, else exit
	*/
	function error($error, $line, $file, $skip = false)
	{
		global $lang, $db, $template;

		if ($skip)
		{
			$template->assign_block_vars('checks', array(
				'S_LEGEND'	=> true,
				'LEGEND'	=> $lang['INST_ERR'],
			));

			$template->assign_block_vars('checks', array(
				'TITLE'		=> basename($file) . ' [ ' . $line . ' ]',
				'RESULT'	=> '<b style="color:red">' . $error . '</b>',
			));

			return;
		}

		echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
		echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">';
		echo '<head>';
		echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
		echo '<title>' . $lang['INST_ERR_FATAL'] . '</title>';
		echo '<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />';
		echo '</head>';
		echo '<body id="errorpage">';
		echo '<div id="wrap">';
		echo '	<div id="page-header">';
		echo '	</div>';
		echo '	<div id="page-body">';
		echo '		<div id="acp">';
		echo '		<div class="panel">';
		echo '			<span class="corners-top"><span></span></span>';
		echo '			<div id="content">';
		echo '				<h1>' . $lang['INST_ERR_FATAL'] . '</h1>';
		echo '		<p>' . $lang['INST_ERR_FATAL'] . "</p>\n";
		echo '		<p>' . basename($file) . ' [ ' . $line . " ]</p>\n";
		echo '		<p><b>' . $error . "</b></p>\n";
		echo '			</div>';
		echo '			<span class="corners-bottom"><span></span></span>';
		echo '		</div>';
		echo '		</div>';
		echo '	</div>';
		echo '	<div id="page-footer">';
		echo '		Powered by phpBB &copy; 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>';
		echo '	</div>';
		echo '</div>';
		echo '</body>';
		echo '</html>';

		if (!empty($db) && is_object($db))
		{
			$db->sql_close();
		}

		exit_handler();
	}

	/**
	* Output an error message for a database related problem
	* If skip is true, return and continue execution, else exit
	*/
	function db_error($error, $sql, $line, $file, $skip = false)
	{
		global $lang, $db, $template;

		if ($skip)
		{
			$template->assign_block_vars('checks', array(
				'S_LEGEND'	=> true,
				'LEGEND'	=> $lang['INST_ERR_FATAL'],
			));

			$template->assign_block_vars('checks', array(
				'TITLE'		=> basename($file) . ' [ ' . $line . ' ]',
				'RESULT'	=> '<b style="color:red">' . $error . '</b><br />&#187; SQL:' . $sql,
			));

			return;
		}

		$template->set_filenames(array(
			'body' => 'install_error.html')
		);
		$this->page_header();
		$this->generate_navigation();

		$template->assign_vars(array(
			'MESSAGE_TITLE'		=> $lang['INST_ERR_FATAL_DB'],
			'MESSAGE_TEXT'		=> '<p>' . basename($file) . ' [ ' . $line . ' ]</p><p>SQL : ' . $sql . '</p><p><b>' . $error . '</b></p>',
		));

		// Rollback if in transaction
		if ($db->transaction)
		{
			$db->sql_transaction('rollback');
		}

		$this->page_footer();
	}

	/**
	* Generate the relevant HTML for an input field and the associated label and explanatory text
	*/
	function input_field($name, $type, $value='', $options='')
	{
		global $lang;
		$tpl_type = explode(':', $type);
		$tpl = '';

		switch ($tpl_type[0])
		{
			case 'text':
			case 'password':
				$size = (int) $tpl_type[1];
				$maxlength = (int) $tpl_type[2];

				$tpl = '<input id="' . $name . '" type="' . $tpl_type[0] . '"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="' . $name . '" value="' . $value . '" />';
			break;

			case 'textarea':
				$rows = (int) $tpl_type[1];
				$cols = (int) $tpl_type[2];

				$tpl = '<textarea id="' . $name . '" name="' . $name . '" rows="' . $rows . '" cols="' . $cols . '">' . $value . '</textarea>';
			break;

			case 'radio':
				$key_yes	= ($value) ? ' checked="checked" id="' . $name . '"' : '';
				$key_no		= (!$value) ? ' checked="checked" id="' . $name . '"' : '';

				$tpl_type_cond = explode('_', $tpl_type[1]);
				$type_no = ($tpl_type_cond[0] == 'disabled' || $tpl_type_cond[0] == 'enabled') ? false : true;

				$tpl_no = '<label><input type="radio" name="' . $name . '" value="0"' . $key_no . ' class="radio" /> ' . (($type_no) ? $lang['NO'] : $lang['DISABLED']) . '</label>';
				$tpl_yes = '<label><input type="radio" name="' . $name . '" value="1"' . $key_yes . ' class="radio" /> ' . (($type_no) ? $lang['YES'] : $lang['ENABLED']) . '</label>';

				$tpl = ($tpl_type_cond[0] == 'yes' || $tpl_type_cond[0] == 'enabled') ? $tpl_yes . '&nbsp;&nbsp;' . $tpl_no : $tpl_no . '&nbsp;&nbsp;' . $tpl_yes;
			break;

			case 'select':
				eval('$s_options = ' . str_replace('{VALUE}', $value, $options) . ';');
				$tpl = '<select id="' . $name . '" name="' . $name . '">' . $s_options . '</select>';
			break;

			case 'custom':
				eval('$tpl = ' . str_replace('{VALUE}', $value, $options) . ';');
			break;

			default:
			break;
		}

		return $tpl;
	}

	/**
	* Generate the drop down of available language packs
	*/
	function inst_language_select($default = '')
	{
		global $phpbb_root_path, $phpEx;

		$dir = @opendir($phpbb_root_path . 'language');

		if (!$dir)
		{
			$this->error('Unable to access the language directory', __LINE__, __FILE__);
		}

		while ($file = readdir($dir))
		{
			$path = $phpbb_root_path . 'language/' . $file;

			if ($file == '.' || $file == '..' || is_link($path) || is_file($path) || $file == 'CVS')
			{
				continue;
			}

			if (file_exists($path . '/iso.txt'))
			{
				list($displayname, $localname) = @file($path . '/iso.txt');
				$lang[$localname] = $file;
			}
		}
		closedir($dir);

		@asort($lang);
		@reset($lang);

		$user_select = '';
		foreach ($lang as $displayname => $filename)
		{
			$selected = (strtolower($default) == strtolower($filename)) ? ' selected="selected"' : '';
			$user_select .= '<option value="' . $filename . '"' . $selected . '>' . ucwords($displayname) . '</option>';
		}

		return $user_select;
	}
}

?>
After i copied this index file in place of my old one, i got an error to upgrade my php version to 5.1 or above . I did so. Then the error i mentioned above came.
There is always a way around..

User avatar
yng_mastr
Registered User
Posts: 57
Joined: Wed Sep 03, 2008 9:56 am
Contact:

Re: [Beta] Stargate Portal 0.4.0b

Post by yng_mastr » Mon Sep 08, 2008 9:48 am

For Reference,a portion of my functions.php - ( located in /includes/functions.php)

Code: Select all

// some mods may change the root path so look in one deeper //
	// Stargate Portal
	if(file_exists($phpbb_root_path . 'includes/sgp_functions.' . $phpEx))
	{
		include_once($phpbb_root_path . 'includes/sgp_functions.' . $phpEx);
	}
	else
	{
		include_once('./../' . 'includes/sgp_functions.' . $phpEx);
	}
	stargate_init();
	// Stargate Portal


Thanx again, for giving your time to my problems.
There is always a way around..

craigwh
Registered User
Posts: 19
Joined: Fri Jun 27, 2008 12:28 pm

Re: [Beta] Stargate Portal 0.4.0b

Post by craigwh » Mon Sep 08, 2008 10:21 am

does this portal mod require its own style? or does it just use the same template + css scheme as the forums.

Locked

Return to “[3.0.x] MODs in Development”