FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Modificate your phpnuke theme, minimize blocks





eugenioclrc
Hello, first of all, i wanna apologize for my bad englis, it has passed like 4 years since last time i write/speake english. My name is Eugene, i am from Argentina, and i have just finish a "script", its in java, and its for minimize your blocks in the php nuke. When you minimize a block, the scripts saves the name of the block, so the next time you open the page the block its minimized.

Modification number 1, open the file theme.php, and search the next thing, remeber to change fisubsilversh for the name of your theme.
********************************************
function themesidebox($title, $content, $side=0) {

if($side=="l"){
$tmpl_file = "themes/fisubsilversh/blocks.html";
}else{
$tmpl_file = "themes/fisubsilversh/blocks2.html";
}
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
********************************************
at the end of that, add the next line:
$thefile = str_replace ( "*comi*", "'", $thefile);



Modification number 2, open the file header.html , and at the end of the file put the next code:
********************************************
<SCRIPT language=JavaScript type=text/javascript>
function getCookie(name){
var cname = name + "=";
var dc = document.cookie;
if (dc.length > 0) {
begin = dc.indexOf(cname);
if (begin != -1) {
begin += cname.length;
end = dc.indexOf(";", begin);
if (end == -1) end = dc.length;
return unescape(dc.substring(begin, end));
}
}
return null;
}

function setCookie(name, value, expires, path, domain, secure) {
document.cookie = name + "=" + escape(value) +
((expires == null) ? "" : "; expires=" + expires.toGMTString()) +
((path == null) ? "" : "; path=" + path) +
((domain == null) ? "" : "; domain=" + domain) +
((secure == null) ? "" : "; secure");
}

function expand(Menu,opc) {
var objeto = document.getElementById(Menu)
if (Menu.style.display=="none")
{ Menu.style.display="";
setCookie(opc,0,null,null,null,null);
}
else {
Menu.style.display="none";
setCookie(opc,1,null,null,null,null);
}
window.event.cancel=true;
}
</script>
********************************************

Modification number 3, open the file blocks.html, search " <td><font class="content"> $content ", and replace it for the next code;
********************************************
<IMG style="CURSOR: hand" onclick="expand($title,*comi*$title*comi*);" height=10 alt=Cerrar align="right" src="images/minus.gif" width=10 border=0>
<td><font class="content">
<DIV id=$title>
$content
</div>
<SCRIPT language=JavaScript type=text/javascript>
if (getCookie("$title")==true) { expand($title, "nada") }
</script>
********************************************

Modification number 4, open the file blocks2.html and do the same that you do in the file blocks.

i`ve hope it work for you, and i`ve hope you could understand me... to see this working goto my web, www.el9vive.tk


Greetings, Eugene!!!
Related topics
Need a great graphic designer...with php knowledge.
Will install PHPNuke Site
phpnuke themes
Anyone want to join this PHPnuke project?
Two PhpNuke sites sharing a database
[man]reacion de theme en phpnuke
[man]Full Screen Modules ne phpnuke
Online Gaming Clan Site
Votre avi sur mon site !!!!!
Nuke-Evolution
PhpNuke Installation Tutorial
How to Install PhpNuke Themes
Lego
Question regarding phpnuke and phpbb3 in ftp
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.