There is a little problem (I test by your site cpg and it exist too) :
Test :
make the (module) block small and then reactualize (or change module).
it works...
make the same block big and reactualize (or change module), it will be always small..
(big=with content
small=only title)
thanks
MikieMouse Private
Joined: Aug 15, 2003
Posts: 43
Location: Colorado, USA
Posted:
Tue Feb 17, 2004 1:43 pm
Okay, trying to piece together the various aspects of this hack from the forum but am unsuccessful. Is there a mod, or a set of instructions that I can download somewhere to implement this? I know I missed a key step or screwed something up cuz the test site I tried it on (www.ehpdesigns.com) now how no blocks listed...lol.
Any help would be great.
_________________ I suffer from Janet Reno penis envy
djmaze Captain
Joined: Nov 29, 2003
Posts: 566
Location: Netherlands
Posted:
Tue Feb 17, 2004 2:05 pm
Since to much peeps have problems i will create a ZIP with all the parts and instructions.
_________________ 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
MikieMouse Private
Joined: Aug 15, 2003
Posts: 43
Location: Colorado, USA
Posted:
Tue Feb 17, 2004 2:25 pm
Just downloaded the BETA for CPG Nuke from your site (which includes the instructions for the collapsable blocks...but you knew that...its your site...lol). Am in the process of uploading that over what was there to see how its working.
Then I'll see if I can incorporate it into other themes. Will also check out the zip file you make available just in case I screw up and miss a step (and that's bound to happen as I'm doing all this while at work).
I thank you for all the help you provide us.
_________________ I suffer from Janet Reno penis envy
Seventys Sergeant
Joined: Aug 11, 2003
Posts: 78
Posted:
Tue Feb 17, 2004 2:34 pm
Here here ! Just love the option, love to be able to get it to work right......
MikieMouse Private
Joined: Aug 15, 2003
Posts: 43
Location: Colorado, USA
Posted:
Wed Feb 18, 2004 8:41 am
Any update on when that zip file will be available?
_________________ I suffer from Janet Reno penis envy
shedrock Nuke Soldier
Joined: Aug 14, 2003
Posts: 19
Location: Canada
Posted:
Sat Mar 06, 2004 5:31 pm
Now that I have this block feature working on php-nuke. Can someone tell me why I had to make modifications to the blocks.php file, the news index file and soforth. Before I did all of it, I just changed 2 areas in the mainfile.php file, modified the theme.php file and added the script to the header.php file and it worked great. It is just driving me crazy not knowing what the results would be if I didn't add all the rest of changes to the other files as per the instructions in this thread.
Shedrock, can you post the simple steps that you took that worked? I've attempted to sift through and run the steps in this thread and its just not taking. Any advise/hints/etc would be awesome!
_________________ I suffer from Janet Reno penis envy
shedrock Nuke Soldier
Joined: Aug 14, 2003
Posts: 19
Location: Canada
Posted:
Sat Mar 06, 2004 6:44 pm
ok, all I did was the following:
First Step:
header.php file where i added this just below the favico.ico line:
NOTE: You have to add the rest of the changes to the other files, such as the News article.php file, the blocks.php file as the threads in here discussed. I however did not add anything else but what I have shown you here, at least not yet. But I have not run in to a problem yet.
Make sure you have the blockscript.js file located in your /includes/ directory. If you want to have a look at my local site. You can check it at:
http://mmon.no-ip.com:8081
Went to your site (awesome by the way). But I did find that when I tested your blocks, that once I collapsed them and moved on to another page that there were numerous javascript errors and the blocks no longer expanded until I deleted my cookies. I use IE 6.0, not sure which browsers you've test it with.
_________________ I suffer from Janet Reno penis envy
shedrock Nuke Soldier
Joined: Aug 14, 2003
Posts: 19
Location: Canada
Posted:
Sun Mar 07, 2004 7:24 am
That could have been because I was working on it probably while you were checking it out. I was trying to get it to work on another theme. I am currently using IE6 as well and checked it all of this morning and had no problems so far. I was also trying to get it to work with the postnuke method but the blocks don't stay close on a screen change. It woul dbe nice if we didn't have to modify the core files of php-nuke. This way anyone can apply this feature without any problems. Anyway, I'll keep trying to get it to function without the core modifications and if I do get it to work I'll post it in here.
If i add: function adminblock($bid)
on my local site, it works great. If I add this function on my hosted site, it does not work and I get an error in the adminblock section. I memoved the $bid so it now looks like:
function adminblock() - Any ideas as to why this was a problem?
Last edited by shedrock on Thu May 27, 2004 5:06 pm; edited 1 time in total
macros14 Nuke Soldier
Joined: Feb 16, 2004
Posts: 28
Posted:
Wed Mar 10, 2004 11:50 am
For auto theme, like the theme AT-PMS, for the forums, how do you turn off the right blocks?? I am not exactly sure using auto theme
Corduroy Nuke Cadet
Joined: Jan 17, 2004
Posts: 3
Posted:
Mon Mar 22, 2004 3:53 pm
*bump*
I do need help with this one... I'll wait for the zip file.
Kinetix Corporal
Joined: Aug 16, 2003
Posts: 52
Posted:
Sun May 30, 2004 5:19 pm
Hey DJMaze, hope you don't mind, but I took the liberty of updating your javascript. If you're setting those cookies, why not use them? This will actually SAVE the cookie and every visit to the site, the blocks will remain like they were the last time the user changed them. Enjoy
blockscript.js:
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,Days) {
var today = new Date();
var expire = new Date();
if (Days==null || Days==0) Days=1;
expire.setTime(today.getTime() + 3600000*24*Days);
document.cookie = Name+"="+escape(Value) + ";expires="+expire.toGMTString();
}
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++) {
abcswitch(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("blockdown") != -1) {
icoID.src = imagepath+"blockup.gif";
SetCookie('block'+bid,'yes',365);
} else {
icoID.src = imagepath+"blockdown.gif";
DeleteCookie('block'+bid);
}
}
function abcswitch(bid) {
var blockopen=GetCookie('block'+bid);
var bpe=document.getElementById('ph'+bid);
var bph=document.getElementById('pe'+bid);
var bico=document.getElementById('pic'+bid);
if (blockopen != null) {
bph.style.display="none";
bpe.style.display="none";
bico.src = imagepath+"blockup.gif";
} else {
bph.style.display="";
bpe.style.display="";
bico.src = imagepath+"blockdown.gif";
}
}
function xyzswitch(bid) {
xswitch(document.getElementById('ph'+bid));
xswitch(document.getElementById('pe'+bid));
icoswitch(bid);
}
function addblock(bid) {
var blockopen=GetCookie('block'+bid);
if (blockopen != null) {
blockarrayint += 1;
blockarray[blockarrayint] = bid;
}
}
PS: Wow, I was so blind I didn't notice this thread had 8 pages. I figured it was only one page, so... Sorry if this code has already been made and posted by someone.
PPS: Isn't there an easier way? Instead of using all the BIDs, you could use something like this in your script:
Code:
global $blockids;
if (!isset($blockids)) {
$blockids = 1;
}
else {
$blockids++;
}
And instead of using $bid in your script, you'd use $blockids and you wouldn't need to edit all those other files.
_________________ http://www.ikrontik.tk/
Ikrontik Server & Web Developer
So maybe I like posting my website in my sig, maybe google likes to cache it.
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