Sorry if this is the wrong forum, but Im wondering if anyone has created an addon to be able to do this. PostNuke has some code for this, and I found the link below that allows you to be able to collapse blocks on a page. Im going to attempt to hack this into my site, but I wanted to ask if someone hasnt done this already for phpnuke.
I'm using the collapsing block script of postnuke for phpnuke. But I can't save the configuration into a cookie.
If you need help I can help you to install the script but I need help to make the cookie working.
By the way, I'm using the DeepBlue theme.
Bye.
djmaze Captain
Joined: Nov 29, 2003
Posts: 566
Location: Netherlands
Posted:
Tue Dec 16, 2003 7:13 pm
Since i made the CPG language selector with Scott which stays on the current page and doesn't loop back to index.php here is what i wanna do:
Instead of using a cookie save the information in the nuke_users database, so it doesn't matter on which computer the member is logged.
This needs some bigtime coding and anonymous uses cookie so who would help me
abracadaver Corporal
Joined: Aug 29, 2003
Posts: 57
Location: Katy, TX
Posted:
Tue Dec 16, 2003 7:53 pm
New version of the free and commercial AutoTheme will have this built-in. Due out next week I hope.
-Shawn
_________________ Get the AutoTheme HTML Theme System HERE!
djmaze Captain
Joined: Nov 29, 2003
Posts: 566
Location: Netherlands
Posted:
Wed Dec 17, 2003 1:14 pm
abracadaver wrote:
free and commercial AutoTheme
i don't like that "commercial" part of it.
Since we all programming for free and put loads of time in it i don't think people would pay $19,95 or even more when you use code that is downloadable for free anywhere.
Let's put it freeware and if someone has a commercial site he has to pay since he is gaining money from site.
If not i keep programming untill i implemented it and free for download.
Just my donation to the Nuke community.
_________________ Famous people never give their signature http://www.cpgnuke.com <- back online thanks to dedicatednow.com
Don't ask me to be admin on your site please
abracadaver Corporal
Joined: Aug 29, 2003
Posts: 57
Location: Katy, TX
Posted:
Wed Dec 17, 2003 4:33 pm
Quote:
i don't like that "commercial" part of it.
Nobody's asking you to. That's why there is a Free GPL version.
Quote:
i don't think people would pay $19,95 or even more when you use code that is downloadable for free anywhere.
I bet the hundreds and hundreds of AutoTheme purchasers are mystified AutoTheme commercial version code is not downloadable from anywhere for free. Only the free version, and there are many more features in the commercial version than in the free one.
If you haven't used it, the Free GPL version is the premier theme solution that is multi-platform and has hundreds of themes in circulation. It's the best thing going, even for those who are familiar with PHP and PHP-Nuke themeing. It does many things that most Nuke themers don't know how to do, even with PHP, and this is all done with HTML and an admin interface.
There are so many that find the Free GPL version so great, that they purchase the commercial version. I haven't had any complaints.
Thanks!
-Shawn
_________________ Get the AutoTheme HTML Theme System HERE!
djmaze Captain
Joined: Nov 29, 2003
Posts: 566
Location: Netherlands
Posted:
Sun Dec 21, 2003 10:06 pm
Ok collapse blocks working, see it on the coppermine homepage.
Soon the info how this can be implemented will be released.
Images can be setup themedepended.
_________________ Famous people never give their signature http://www.cpgnuke.com <- back online thanks to dedicatednow.com
Don't ask me to be admin on your site please
Henrick Private
Joined: Jun 02, 2003
Posts: 35
Posted:
Tue Dec 23, 2003 2:16 pm
Excellent.. This looks great djmaze
Djtale Nuke Cadet
Joined: Aug 01, 2003
Posts: 7
Posted:
Tue Dec 23, 2003 3:04 pm
Cool but each time you refresh the page blocks are
uncollapsed. There should be a cookie somewhere to keep the configuration of the page in memory.
djmaze Captain
Joined: Nov 29, 2003
Posts: 566
Location: Netherlands
Posted:
Tue Dec 23, 2003 8:11 pm
there is a cookie saved for each collapsed block but somehow the <body onload=> javascript doesn't work on some systems.
Could you tell me which browser you use djtale ?
_________________ Famous people never give their signature http://www.cpgnuke.com <- back online thanks to dedicatednow.com
Don't ask me to be admin on your site please
Djtale Nuke Cadet
Joined: Aug 01, 2003
Posts: 7
Posted:
Wed Dec 24, 2003 4:00 am
djmaze wrote:
there is a cookie saved for each collapsed block but somehow the <body onload=> javascript doesn't work on some systems.
Could you tell me which browser you use djtale ?
I'm using Iexplorer 6.0.2800
Henrick Private
Joined: Jun 02, 2003
Posts: 35
Posted:
Wed Dec 24, 2003 6:29 am
The settings are holding for me just fine. IE 6.0.2800
djmaze Captain
Joined: Nov 29, 2003
Posts: 566
Location: Netherlands
Posted:
Wed Dec 24, 2003 9:58 am
To change your theme and use this cool feature you have to do the following:
Create file "includes/blockscript.js" and this content:
Code:
function GetCookie(name) {
var arg=name+"=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i,j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == 1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function SetCookie (name, value, expires) {
var exp = new Date();
var expiro = (exp.getTime() + (24 * 60 * 60 * 1000 * expires));
exp.setTime(expiro);
var expstr = "; expires=" + exp.toGMTString();
document.cookie = name + "=" + escape(value) + expstr;
}
function DeleteCookie(name){
if (GetCookie(name)) {
document.cookie = name + "=" + "; expires = Thu, 01-Jan-70 00:00:01 GMT";
}
}
blockarray = new Array();
var blockarrayint = -1;
var imagepath = "images/";
function doblocks(imgpath) {
if (imgpath != null) imagepath = imgpath;
for (var q = 0; q < blockarray.length; q++) {
xyzswitch(blockarray[q]);
}
}
function xswitch(listID) {
if(listID.style.display=="none") {
listID.style.display="";
} else {
listID.style.display="none";
}
}
function icoswitch(bid) {
icoID = document.getElementById('pic'+bid);
if(icoID.src.indexOf("minus") != -1) {
icoID.src = imagepath+"plus.gif";
SetCookie('block'+bid,'yes',365);
} else {
icoID.src = imagepath+"minus.gif";
DeleteCookie('block'+bid);
}
}
function xyzswitch(bid) {
xswitch(document.getElementById('ph'+bid));
xswitch(document.getElementById('pe'+bid));
icoswitch(bid);
}
Don't forget to change "themes/Anagram/" to your themepath!
Finally.... Good luck and have fun!
_________________ Famous people never give their signature http://www.cpgnuke.com <- back online thanks to dedicatednow.com
Don't ask me to be admin on your site please
Henrick Private
Joined: Jun 02, 2003
Posts: 35
Posted:
Fri Dec 26, 2003 7:50 am
This is just too cool.. Thanks for pulling this together.
cricker69 Nuke Soldier
Joined: Oct 25, 2003
Posts: 19
Location: San Diego, CA
Posted:
Wed Jan 07, 2004 11:54 pm
DJMaze-
Bravo! Now that's good! I installed this in just a few minutes and it make such a huge difference in site presentation! Now, the members don't have to look at the blocks if they don't want to...
Thanks! I look forward to seeing what you come up with next.
-Cricker
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