- Readme First! - Read and follow the rules, otherwise your posts will be closed
There are currently, 63 guest(s) and 1 member(s) that are online. You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Different block at right side [ ]
Author
Message
XenoMorpH
Lieutenant
Joined: Aug 24, 2003
Posts: 187
Location: Coevorden, Netherlands
Posted:
Sat Oct 04, 2003 12:33 pm
Hi, I have created a new skin for my site. But I want the right-side blocks to be different than the left blocks, Is this possible within phpnuke?!?
like noiw there is 1 block.html.....can I set phpnuke to load a different block say: block2.html for the right side?!?
http://www.dkc-hq.com
Can any1 help?
_________________http://www.tdi-hq.com
MSN- status:
disgruntledtech
Site Admin
Joined: Apr 14, 2003
Posts: 994
Location: Tulsa, OK
Posted:
Sat Oct 04, 2003 4:29 pm
In theme.php
find:
change to:
Code:
global $swapleftright;
$swapleftright = "1";
blocks(left);
$swapleftright = "0";
and replace your themesidebox function with this one (edit to match your theme name)
Code:
function themesidebox($title, $content) {
global $swapleftright, $bgcolor1, $bgcolor2;
if ($swapleftright=="0") {
$tmpl_file = "themes/themename/blockR.html";
} else {
$tmpl_file = "themes/themename/blockL.html";
}
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
both of these themes use a similiar method(doesn't use external html files though):
http://www.voicesinmyhead.net/modules.php?name=Downloads&d_op=viewdownload&cid=9
Last edited by disgruntledtech on Mon Oct 06, 2003 12:25 pm; edited 1 time in total
disgruntledtech
Site Admin
Joined: Apr 14, 2003
Posts: 994
Location: Tulsa, OK
Posted:
Sat Oct 04, 2003 4:33 pm
oh BTW, thats an awesome design you have there
XenoMorpH
Lieutenant
Joined: Aug 24, 2003
Posts: 187
Location: Coevorden, Netherlands
Posted:
Sat Oct 04, 2003 5:12 pm
Hey tnx alot, I will try that one!!!BTW, do I have to change this in the theme.php oply? Or which file do I have to change.
Thank you, took me 2 weeks to make it, LOL. U got some nice php coding (right blocks on/off) on ur site.
_________________http://www.tdi-hq.com
MSN- status:
disgruntledtech
Site Admin
Joined: Apr 14, 2003
Posts: 994
Location: Tulsa, OK
Posted:
Sat Oct 04, 2003 7:12 pm
yeah the 'shade' series were me just trying to do all those things "you can't do" in nuke
yeah just the theme.php should be edited
chris-au
Elite Nuker
Joined: Jan 31, 2003
Posts: 717
Posted:
Sat Oct 04, 2003 11:12 pm
You could try Blocks_Mod.zip from here.
Added with the add-on for the right-blocks zip file, you can control many things apart from left and right blocks.
_________________Chris
XenoMorpH
Lieutenant
Joined: Aug 24, 2003
Posts: 187
Location: Coevorden, Netherlands
Posted:
Sun Oct 05, 2003 4:48 am
I'm not that good at php, I know where to look for sometimes, but things like this R a little over my head. Thnx for the support.
_________________http://www.tdi-hq.com
MSN- status:
strato
Corporal
Joined: Sep 17, 2003
Posts: 59
Posted:
Mon Oct 06, 2003 5:24 am
Hey whats up.... i see this is interesting if you want to add different Blocks..... But what if you are using them.php ??????? as a reference for you blocks..... exp....... www.clanbss.com i have my nuke page wrapped around with theme.php and the blocks are called by theme.php is there anyway i can change my theme.php ???????? i will post the code of my theme.php here so you can take a look....
Code:
/************************************************************/
/* Function themeheader() */
/************************************************************/
function themeheader() {
global $user, $cookie, $msg1, $msg2, $msg3, $link1, $link2, $link3, $link4, $link5, $link1url, $link2url, $link3url, $link4url, $link5url;
cookiedecode($user);
echo "<body background=\"/bss_files/back.gif\" text=\"#ffffff\" link=\"#ffffff\" vlink=\"#ffffff\" alink=\"#ffffff\" topmargin=\"0\">\n"
."<br>\n";
$username = $cookie[1];
if ($username == "") {
$username = "Anonymous";
}
$public_msg = public_message();
echo "$public_msg";
if ($username == "Anonymous") {
$theuser = "<font color=\"#000000\">Welcome anonymous » <a href=\"modules.php?name=Your_Account&op=new_user\" class=\"navlink\">Register</a> » <a href=\"modules.php?name=Your_Account\" class=\"navlink\">Login</a></font>\n";
} else {
$theuser = "<font color=\"#000000\">Welcome $username » <a href=\"modules.php?name=Your_Account&op=logout\" class=\"navlink\">Logout</a></font>";
}
echo "<body topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">";
include("themes/BlackStrato/header.html");
//LEFT SIDE BACKGROUND
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">\n"
."<tr valign=\"top\">\n"
."<td width=\"10\" valign=\"top\" background=\"themes/BlackStrato/images/nav_links_back.gif\"><img src=\"themes/BlackStrato/images/nav_links_back.gif\" width=\"10\" height=\"0\" border=\"0\"></td>\n"
."<td width=\"165\" background=\"themes/BlackStrato/images/l.gif\" valign=\"top\">\n";
blocks(left);
echo "</td>\n"
."<td width=\"5\" valign=\"top\" background=\"themes/BlackStrato/images/l.gif\"><img src=\"themes/BlackStrato/images/lspace.gif\" width=\"5\" height=\"1\" border=\"0\"></td>\n"
."<td width=\"100%\">\n";
}
/************************************************************/
/* Function themefooter() */
/************************************************************/
function themefooter() {
global $index, $user, $banners, $cookie, $prefix, $dbi, $db, $admin, $adminmail, $nukeurl;
if ($banners == 1) {
$numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_banner WHERE type='0' AND active='1'"));
/* Get a random banner if exist any. */
/* More efficient random stuff, thanks to Cristian Arroyo from http://www.planetalinux.com.ar */
if ($numrows>1) {
$numrows = $numrows-1;
mt_srand((double)microtime()*1000000);
$bannum = mt_rand(0, $numrows);
} else {
$bannum = 0;
}
$sql = "SELECT bid, imageurl, clickurl, alttext FROM ".$prefix."_banner WHERE type='0' AND active='1' LIMIT $bannum,1";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$bid = $row[bid];
$imageurl = $row[imageurl];
$clickurl = $row[clickurl];
$alttext = $row[alttext];
if (!is_admin($admin)) {
$db->sql_query("UPDATE ".$prefix."_banner SET impmade=impmade+1 WHERE bid='$bid'");
}
if($numrows>0) {
$sql2 = "SELECT cid, imptotal, impmade, clicks, date FROM ".$prefix."_banner WHERE bid='$bid'";
$result2 = $db->sql_query($sql2);
$row2 = $db->sql_fetchrow($result2);
$cid = $row2[cid];
$imptotal = $row2[imptotal];
$impmade = $row2[impmade];
$clicks = $row2[clicks];
$date = $row2[date];
/* Check if this impression is the last one and print the banner */
if (($imptotal <= $impmade) AND ($imptotal != 0)) {
$db->sql_query("UPDATE ".$prefix."_banner SET active='0' WHERE bid='$bid'");
$sql3 = "SELECT name, contact, email FROM ".$prefix."_bannerclient WHERE cid='$cid'";
$result3 = $db->sql_query($sql3);
$row3 = $db->sql_fetchrow($result3);
$c_name = $row3[name];
$c_contact = $row3[contact];
$c_email = $row3[email];
if ($c_email != "") {
$from = "$sitename <$adminmail>";
$to = "$c_contact <$c_email>";
$message = ""._HELLO." $c_contact:\n\n";
$message .= ""._THISISAUTOMATED."\n\n";
$message .= ""._THERESULTS."\n\n";
$message .= ""._TOTALIMPRESSIONS." $imptotal\n";
$message .= ""._CLICKSRECEIVED." $clicks\n";
$message .= ""._IMAGEURL." $imageurl\n";
$message .= ""._CLICKURL." $clickurl\n";
$message .= ""._ALTERNATETEXT." $alttext\n\n";
$message .= ""._HOPEYOULIKED."\n\n";
$message .= ""._THANKSUPPORT."\n\n";
$message .= "- $sitename "._TEAM."\n";
$message .= "$nukeurl";
$subject = "$sitename: "._BANNERSFINNISHED."";
mail($to, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion());
}
}
$showbanners = "<a href=\"banners.php?op=click&bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" border=\"0\" alt='$alttext' title='$alttext'></a>";
}
}
if ($index == 1) {
echo "</td>\n"
."<td width=\"5\" valign=\"top\" background=\"themes/BlackStrato/images/rs.gif\"><img src=\"themes/BlackStrato/images/rs.gif\" width=\"5\" height=\"1\" border=\"0\"></td>\n"
."<td width=\"165\" background=\"themes/BlackStrato/images/n.gif\" valign=\"top\">\n";
blocks(right);
}
echo "</td>\n"
."<td width=\"10\" valign=\"top\" background=\"themes/BlackStrato/images/nav_links_backRight2.gif\"><img src=\"themes/BlackStrato/images/nav_links_backRight2.gif\" width=\"10\" height=\"0\" border=\"0\"></td>\n"
."</tr>\n"
."</table>\n\n\n";
include("themes/BlackStrato/footer.html");
}
/************************************************************/
/* Function themeindex() */
/* This function format the stories on the Homepage */
/************************************************************/
function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
global $anonymous, $tipath;
$ThemeSel = get_theme();
if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
$t_image = "themes/$ThemeSel/images/topics/$topicimage";
} else {
$t_image = "$tipath$topicimage";
}
if ($notes != "") {
$notes = "<br><br><b>"._NOTE."</b> $notes\n";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
$content = "$thetext$notes\n";
} else {
if($informant != "") {
$content = "<a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a> ";
} else {
$content = "$anonymous ";
}
$content .= ""._WRITES." \"$thetext\"$notes\n";
}
//Code Changed - just show posted by
$posted1 = get_author($aid);
$posted = " $time $timezone";
//End Code Change
$tmpl_file = "themes/BlackStrato/story_home.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
/************************************************************/
/* Function themeindex() */
/************************************************************/
function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
global $admin, $sid, $tipath;
$ThemeSel = get_theme();
if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
$t_image = "themes/$ThemeSel/images/topics/$topicimage";
} else {
$t_image = "$tipath$topicimage";
}
$posted = ""._POSTEDON." $datetime "._BY." ";
$posted .= get_author($aid);
if ($notes != "") {
$notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
$content = "$thetext$notes\n";
} else {
if($informant != "") {
$content = "<a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a> ";
} else {
$content = "$anonymous ";
}
$content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
}
$tmpl_file = "themes/BlackStrato/story_page.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
/************************************************************/
/* Function themesidebox() */
/************************************************************/
function themesidebox($title, $content) {
$tmpl_file = "themes/BlackStrato/blocks.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
The call for blocks is diff here i think @@
disgruntledtech
Site Admin
Joined: Apr 14, 2003
Posts: 994
Location: Tulsa, OK
Posted:
Mon Oct 06, 2003 12:28 pm
strato the changes i mentioned should be made in the theme.php
you'll also have to edit your blocks.htm file to make the right side block
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum