Jeg er lige blevet færdig med min blog, hvor jeg gerne vil have der skal vises bannere øverst på siden midt i.
Scriptet som jeg skal bruge har jeg og det fungerer helt fint. Der stod i scriptet at jeg skulle indsætte denne kode:
include $_SERVER["DOCUMENT_ROOT"] . "/ad/display2.php";
Der hvor jeg gerne ville have at de forskellige bannere, så skulle vises.
Jeg har også fået det til, at virke og det hele, men kan ikke finde ud af hvordan jeg får den ovennævnte "include" øverst midt på siden. Altså så de forskellige bannere bliver vist midt på siden øverst oppe.
Lige nu virker det kun når koden bliver indsat nederst i min index.php.
Hvordan får jeg scriptet til og vises midt på siden - øverst oppe?
$page_content = $my->get_line ("select pagecontent from ".TBL_PF."custompages where path='".$rq['a']."' limit 0,1","k"); $sm->assign("page_content",$page_content); $contentfile = "mods_custompage.tpl";
}elseif(in_array($rq['a'],$links) // forums pages and $rq['a'] != $links['readmore'] and $rq['a'] != $links['viewnews'] and $rq['a'] != $links['friend'] and $rq['a'] != $links['contact'] and $rq['a'] != $links['downloads'] and !$rq['confirmmail']) {
if ($rq['a'] !="topic" and $rq['a'] != "reply" and $_SESSION['viewtopic']) unset($_SESSION['viewtopic']); if ($rq['a'] !="topic" and $_SESSION['errreply']) unset($_SESSION['errreply']); // back to topic page if attempt to post empty message
if ($_SESSION['query'] and $rq['a'] != $links['search'] ) unset($_SESSION['query']); if ($rq['a'] != $links['user']) unset($_SESSION['uposts']);
// remove member list session if ($_SESSION['memlist'] and $rq['a'] != $links['members']) unset ($_SESSION['memlist']);
define("FORUM_PAGES",true);
$page_key = array_search($rq['a'],$links); include (CORE_ROOT."inc/pages/forum_".$page_key.".inc.php");
}else{ // another pages .......
if ($rq['confirmmail']) $rq['a'] = "confirmemail";
define("CORE_PAGE",true);
$page_key = array_search($rq['a'],$links);
if (!$page_key and $rq['confirmmail']){ $page_key = "confirmemail";
}elseif (!$page_key){ $page_key = "index"; }
include (CORE_ROOT."inc/pages/core_".$page_key.".inc.php"); $sm->assign("set",$set); }
// check new private messages for logged user if ($forum_private_messages and $_SESSION['user_info']['uid']>0) $priv_mess_cnt = $my->get_line ("select count(pmid) from ".TBL_PF."frm_privmess where pmuidto='".$_SESSION['user_info']['uid']."' and pmtobox ='i'","k");
if (count($_SESSION['user_info']['priv']) and $_SESSION['user_info']['priv'][0] !="none") { $bvis [] = "adm"; $bvis [] = "reg"; }elseif ($_SESSION['user_info']['ustatus']) { $bvis [] = "reg"; }elseif (!$_SESSION['user_info']['ustatus']) { $bvis [] = "ano"; } $w_clause = " or bvisible='".join("' or bvisible='",$bvis)."' ";
$blocks = $my->get_array_a("select btype,bname,bcontent from ".TBL_PF."blocks where bstatus='1' and ( bvisible='all' $w_clause ) order by position asc");
foreach ($blocks as $blocks_info){ if ($blocks_info['bname']){ if ($blocks_info['btype'] =="t") { $blocks_list[$blocks_info['bname']] .= $blocks_info['bcontent'];
}elseif ($blocks_info['btype'] =="f" and file_exists(CORE_ROOT.FLD_MODULES.$blocks_info['bcontent']."/index.php")){
include (CORE_ROOT.FLD_MODULES.$blocks_info['bcontent']."/index.php"); $blocks_list[$blocks_info['bname']] .= $module_result; }
} } if (count($blocks)) $sm->assign($blocks_list);
$sm->display("core_body.tpl");
include $_SERVER["DOCUMENT_ROOT"] . "/ad/display2.php";
$page_content = $my->get_line ("select pagecontent from ".TBL_PF."custompages where path='".$rq['a']."' limit 0,1","k"); $sm->assign("page_content",$page_content); $contentfile = "mods_custompage.tpl";
}elseif(in_array($rq['a'],$links) // forums pages and $rq['a'] != $links['readmore'] and $rq['a'] != $links['viewnews'] and $rq['a'] != $links['friend'] and $rq['a'] != $links['contact'] and $rq['a'] != $links['downloads'] and !$rq['confirmmail']) {
if ($rq['a'] !="topic" and $rq['a'] != "reply" and $_SESSION['viewtopic']) unset($_SESSION['viewtopic']); if ($rq['a'] !="topic" and $_SESSION['errreply']) unset($_SESSION['errreply']); // back to topic page if attempt to post empty message
if ($_SESSION['query'] and $rq['a'] != $links['search'] ) unset($_SESSION['query']); if ($rq['a'] != $links['user']) unset($_SESSION['uposts']);
// remove member list session if ($_SESSION['memlist'] and $rq['a'] != $links['members']) unset ($_SESSION['memlist']);
define("FORUM_PAGES",true);
$page_key = array_search($rq['a'],$links); include (CORE_ROOT."inc/pages/forum_".$page_key.".inc.php");
}else{ // another pages .......
if ($rq['confirmmail']) $rq['a'] = "confirmemail";
define("CORE_PAGE",true);
$page_key = array_search($rq['a'],$links);
if (!$page_key and $rq['confirmmail']){ $page_key = "confirmemail";
}elseif (!$page_key){ $page_key = "index"; }
include (CORE_ROOT."inc/pages/core_".$page_key.".inc.php"); $sm->assign("set",$set); }
// check new private messages for logged user if ($forum_private_messages and $_SESSION['user_info']['uid']>0) $priv_mess_cnt = $my->get_line ("select count(pmid) from ".TBL_PF."frm_privmess where pmuidto='".$_SESSION['user_info']['uid']."' and pmtobox ='i'","k");
if (count($_SESSION['user_info']['priv']) and $_SESSION['user_info']['priv'][0] !="none") { $bvis [] = "adm"; $bvis [] = "reg"; }elseif ($_SESSION['user_info']['ustatus']) { $bvis [] = "reg"; }elseif (!$_SESSION['user_info']['ustatus']) { $bvis [] = "ano"; } $w_clause = " or bvisible='".join("' or bvisible='",$bvis)."' ";
$blocks = $my->get_array_a("select btype,bname,bcontent from ".TBL_PF."blocks where bstatus='1' and ( bvisible='all' $w_clause ) order by position asc");
foreach ($blocks as $blocks_info){ if ($blocks_info['bname']){ if ($blocks_info['btype'] =="t") { $blocks_list[$blocks_info['bname']] .= $blocks_info['bcontent'];
}elseif ($blocks_info['btype'] =="f" and file_exists(CORE_ROOT.FLD_MODULES.$blocks_info['bcontent']."/index.php")){
include (CORE_ROOT.FLD_MODULES.$blocks_info['bcontent']."/index.php"); $blocks_list[$blocks_info['bname']] .= $module_result; }
} } if (count($blocks)) $sm->assign($blocks_list);
$sm->display("core_body.tpl");
?>
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.