2006-04-26, 10:59 AM
Hi.
I create a plugin to folder inc/plugin folder/ads.php.
Code is this :
but after active this plugin . to show First page and show forum not problem(show me advertising) but if show a thread view me a white page .
can be help me.
I create a plugin to folder inc/plugin folder/ads.php.
Code is this :
PHP Code:
<?php
/**
* MyBB 1.0
* Copyright � 2005 MyBulletinBoard Group, All Rights Reserved
*
* Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html
*
* $Id: hello.php 661 2005-08-31 06:25:20Z k776 $
*/
$plugins->add_hook("pre_output_page", "ads");
function ads_info()
{
return array(
"name" => "Advertising",
"description" => "A Plugin for Advertising!",
"website" => "http://www.mybboard.com",
"author" => "Ashkan",
"authorsite" => "http://www.iranvig.com",
"version" => "1.0",
);
}
function ads_activate()
{
}
function ads_deactivate()
{
}
function ads($page)
{
$ads��= "";
$ads .= "<table border=\"0\" cellpadding=\"0\" cellspasing=\"0\" width=\"100%\"><tr dir=\"ltr\" align=\"left\">\n";
$ads .= "<td align=center width=25%><DIV dir=rtl style=\"BORDER-RIGHT: #000000 1px solid; PADDING-RIGHT: 3px; BORDER-TOP: #000000 1px solid; PADDING-LEFT: 3px; FONT-SIZE: 8pt; PADDING-BOTTOM: 3px; BORDER-LEFT: #000000 4px solid; PADDING-TOP: 3px; BORDER-BOTTOM: #000000 1px solid; FONT-FAMILY: tahoma; FONT-SIZE:8pt; FONT-COLOR:#000000 ; BACKGROUND-COLOR: #e8f0d8; TEXT-ALIGN: justify ; HEIGHT:100px ;WIDTH:95%e\">\n"
.��"<B><FONT color=#000000>Frinds</FONT></B><BR>"
.��"<a href=\"http://www.iranvig.com\" target=\"_blank\">Iranvig</a><br>\n"
. "</DIV>\n</td>\n";
$ads .= "<td align=center width=25%><DIV dir=rtl style=\"BORDER-RIGHT: #000000 1px solid; PADDING-RIGHT: 3px; BORDER-TOP: #000000 1px solid; PADDING-LEFT: 3px; FONT-SIZE: 8pt; PADDING-BOTTOM: 3px; BORDER-LEFT: #000000 4px solid; PADDING-TOP: 3px; BORDER-BOTTOM: #000000 1px solid; FONT-FAMILY: tahoma; FONT-SIZE:8pt; FONT-COLOR:#000000 ; BACKGROUND-COLOR: #e8f0d8; TEXT-ALIGN: justify ; HEIGHT:100px ;WIDTH:95%e\">\n"
.��"<B><FONT color=#000000>Frinds</FONT></B><BR>"
.��"<a href=\"http://www.iranvig.com\" target=\"_blank\">Iranvig</a><br>\n"
. "</DIV>\n</td>\n";
$ads .= "<td align=center width=25%><DIV dir=rtl style=\"BORDER-RIGHT: #000000 1px solid; PADDING-RIGHT: 3px; BORDER-TOP: #000000 1px solid; PADDING-LEFT: 3px; FONT-SIZE: 8pt; PADDING-BOTTOM: 3px; BORDER-LEFT: #000000 4px solid; PADDING-TOP: 3px; BORDER-BOTTOM: #000000 1px solid; FONT-FAMILY: tahoma; FONT-SIZE:8pt; FONT-COLOR:#000000 ; BACKGROUND-COLOR: #e8f0d8; TEXT-ALIGN: justify ; HEIGHT:100px ;WIDTH:95%e\">\n"
.��"<B><FONT color=#000000>Frinds</FONT></B><BR>"
.��"<a href=\"http://www.iranvig.com\" target=\"_blank\">Iranvig</a><br>\n"
. "</DIV>\n</td>\n";
$ads .= "<td align=center width=25%><DIV dir=rtl style=\"BORDER-RIGHT: #000000 1px solid; PADDING-RIGHT: 3px; BORDER-TOP: #000000 1px solid; PADDING-LEFT: 3px; FONT-SIZE: 8pt; PADDING-BOTTOM: 3px; BORDER-LEFT: #000000 4px solid; PADDING-TOP: 3px; BORDER-BOTTOM: #000000 1px solid; FONT-FAMILY: tahoma; FONT-SIZE:8pt; FONT-COLOR:#000000 ; BACKGROUND-COLOR: #e8f0d8; TEXT-ALIGN: justify ; HEIGHT:100px ;WIDTH:95%e\">\n"
.��"<B><FONT color=#000000>Frinds</FONT></B><BR>"
.��"<a href=\"http://www.iranvig.com\" target=\"_blank\">Iranvig</a><br>\n"
. "</DIV>\n</td>\n";
$ads .= "</tr></table>";
$page = str_replace("<div id=\"content\">", "<div id=\"content\">$ads<br />", $page);
return $page;
}
?>
can be help me.