MyBB Community Forums

Full Version: No Header
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
hi to all i install this plugin and after that my test board is broken
how to fix that
see attach pictures no header and all text goes to center
becouse this not speak english and i think he is lunatic
direct link to the plug-in & its thread would be helpful instead of giving its code..
AND
if it is a paid plugin OR if it is only for that site's members then the code should not be posted here
nope this plugin destroy my test board(Timed Splash Page) is free but admin from this forum is one lunatic
here is link to plugin http://forum.mybbz.net/showthread.php?tid=459
this plugin broken my test forum so how to fix that and where is problem i can just delete installation and install new test forum but want to know how to fix that without delete all forum from Cpannel

<?php
/**
* Author: Shahaab
* Copyright: © 2010 Shahaab
* Website: http://www.mybbz.net
* License: http://www.mybbz.net/license.php
**/

// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
	die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

// Plugin info
function tsp_info()
{
	return array(
		"name"			=> "Timed Splash Page",
		"description"	=> "This plugin will add a splash page with an auto timer.",
		"website"		=> "http://www.mybbz.net",
		"author"		=> "Shahaab",
		"authorsite"	=> "http://www.mybbz.net",
		"version"		=> "1.0",
		"compatibility" => "1*"
	);

}

// Activate plugin
function tsp_activate()
{
	global $db, $mybb;

// Editing Template
include MYBB_ROOT."/inc/adminfunctions_templates.php";
find_replace_templatesets("header", "#".preg_quote('<navigation>')."#i", '<navigation>
<style type="text/css">
#sponsorAdDiv {position:absolute; height:1; width:1px; top:0; left:0;}
</style>
<script type="text/javascript">
adTime={$mybb->settings[\'tsp_timer\']};
chanceAd=1;
var ns=(document.layers);
var ie=(document.all);
var w3=(document.getElementById && !ie);
var calunit=ns? "" : "px"
adCount=0;
function initAd(){
	if(!ns && !ie && !w3) return;
	if(ie)		adDiv=eval(\'document.all.sponsorAdDiv.style\');
	else if(ns)	adDiv=eval(\'document.layers["sponsorAdDiv"]\');
	else if(w3)	adDiv=eval(\'document.getElementById("sponsorAdDiv").style\');
	randAd=Math.ceil(Math.random()*chanceAd);
        if (ie||w3)
        adDiv.visibility="visible";
        else
        adDiv.visibility ="show";
	if(randAd==1) showAd();
}
function showAd(){
if(adCount<adTime*10){adCount+=1;
	if (ie){documentWidth  =truebody().offsetWidth/2+truebody().scrollLeft-20;
	documentHeight =truebody().offsetHeight/2+truebody().scrollTop-20;}	
	else if (ns){documentWidth=window.innerWidth/2+window.pageXOffset-20;
	documentHeight=window.innerHeight/2+window.pageYOffset-20;} 
	else if (w3){documentWidth=self.innerWidth/2+window.pageXOffset-20;
	documentHeight=self.innerHeight/2+window.pageYOffset-20;} 
	adDiv.left=documentWidth-200+calunit;adDiv.top =documentHeight-200+calunit;
	setTimeout("showAd()",100);}else closeAd();
}
function closeAd(){
if (ie||w3)
adDiv.display="none";
else
adDiv.visibility ="hide";
}
function truebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
onload=initAd;
</script>
<div id="sponsorAdDiv" style="visibility:hidden">
<table width="450px" height="350px" bgcolor="#1CCCFF">
<tr>
<td>
<table width="445px" height="345px" bgcolor="#E8FAFF">
<tr>
<td align="center" valign="middle">
{$mybb->settings[\'tsp_content\']}
<br>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>');

	$tsp_group = array(
		"gid"			=> "NULL",
		"name"			=> "tsp",
		"title" 		=> "Timed Splash Page",
		"description"	=> "Here you can manage T.S.P. extensively.",
		"disporder"		=> "1",
		"isdefault"		=> "no",
	);
	$db->insert_query("settinggroups", $tsp_group);
	$gid = $db->insert_id();
	
	$tsp_setting_1 = array(
		"sid"			=> "NULL",
		"name"			=> "tsp_timer",
		"title"			=> "T.S.P. Timer Countdown",
		"description"	=> "Please enter a value for Auto Close Splash Page. (in seconds)",
		"optionscode"	=> "text",
		"value"			=> "5",
		"disporder"		=> "1",
		"gid"			=> intval($gid),
	);

	$db->insert_query("settings", $tsp_setting_1);

	$tsp_setting_2 = array(
		"sid"			=> "NULL",
		"name"			=> "tsp_content",
		"title"			=> "T.S.P. Content",
		"description"	=> "Please enter content you would like to show in splash page. (HTML Enabled)",
		"optionscode"	=> "textarea",
		"value"			=> "",
		"disporder"		=> "2",
		"gid"			=> intval($gid),
	);
	
	$db->insert_query("settings", $tsp_setting_2);
	
	// Rebuilding settings
    rebuildsettings();
}

// Deactivate plugin
function tsp_deactivate()
{
	global $db, $mybb;

include MYBB_ROOT."/inc/adminfunctions_templates.php";
find_replace_templatesets("header", "#".preg_quote('<style type="text/css">
#sponsorAdDiv {position:absolute; height:1; width:1px; top:0; left:0;}
</style>
<script type="text/javascript">
adTime={$mybb->settings[\'tsp_timer\']};
chanceAd=1;
var ns=(document.layers);
var ie=(document.all);
var w3=(document.getElementById && !ie);
var calunit=ns? "" : "px"
adCount=0;
function initAd(){
	if(!ns && !ie && !w3) return;
	if(ie)		adDiv=eval(\'document.all.sponsorAdDiv.style\');
	else if(ns)	adDiv=eval(\'document.layers["sponsorAdDiv"]\');
	else if(w3)	adDiv=eval(\'document.getElementById("sponsorAdDiv").style\');
	randAd=Math.ceil(Math.random()*chanceAd);
        if (ie||w3)
        adDiv.visibility="visible";
        else
        adDiv.visibility ="show";
	if(randAd==1) showAd();
}
function showAd(){
if(adCount<adTime*10){adCount+=1;
	if (ie){documentWidth  =truebody().offsetWidth/2+truebody().scrollLeft-20;
	documentHeight =truebody().offsetHeight/2+truebody().scrollTop-20;}	
	else if (ns){documentWidth=window.innerWidth/2+window.pageXOffset-20;
	documentHeight=window.innerHeight/2+window.pageYOffset-20;} 
	else if (w3){documentWidth=self.innerWidth/2+window.pageXOffset-20;
	documentHeight=self.innerHeight/2+window.pageYOffset-20;} 
	adDiv.left=documentWidth-200+calunit;adDiv.top =documentHeight-200+calunit;
	setTimeout("showAd()",100);}else closeAd();
}
function closeAd(){
if (ie||w3)
adDiv.display="none";
else
adDiv.visibility ="hide";
}
function truebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
onload=initAd;
</script>
<div id="sponsorAdDiv" style="visibility:hidden">
<table width="450px" height="350px" bgcolor="#1CCCFF">
<tr>
<td>
<table width="445px" height="345px" bgcolor="#E8FAFF">
<tr>
<td align="center" valign="middle">
{$mybb->settings[\'tsp_content\']}
<br>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>')."#i", '', 0);

	$db->query("DELETE FROM ".TABLE_PREFIX."settinggroups WHERE name='tsp'");
	$db->query("DELETE FROM ".TABLE_PREFIX."settings WHERE name='tsp_timer'");
	$db->query("DELETE FROM ".TABLE_PREFIX."settings WHERE name='tsp_content'");
	
	// Rebuilding settings
    rebuildsettings();
}

?>

Any advice how to resolve this
User Groups Exempted 3.4 admin can not see that plugin setting.
(2011-08-02, 08:19 AM)SeNCeR Wrote: [ -> ]User Groups Exempted 3.4 admin can not see that plugin setting.

what???
I have tested the referred plugin AND it is working without any issue !!

there is a setting which has entries to disable the slideshow for admins & super moderators
that's what SeNCeR said in above response. that setting entries can be removed ..
try disable plugin and after that your forum will be broken
^ disabled it - could not reproduce any problem ...
look man i have only one plugin in my test forum (Timed Splash Page) http://forum.mybbz.net/showthread.php?tid=459
after install it and activate plugin works but when you disable it and refresh index page your forum wiil be brocken
^ hmm., if you need direct help then you may PM me with temporary admin privileges ...
Pages: 1 2