Joined: Aug 27, 2002 Posts: 15057 Location: Kansas
Posted:
Fri Sep 10, 2004 10:47 pm
I think I have resolved the mystery I had noticed that Bill's Old Articles block was working so I got to snooping around in his code and tried a few things and saw that this works for me. This is v6.9 nuke, but I don't think much has changed. This should also work for NextGEN. In block-Old_Articles.php find this code
Code:
if (isset($cookie[4])) { $r_options .= "&mode=$cookie[4]"; }
if (isset($cookie[5])) { $r_options .= "&order=$cookie[5]"; }
if (isset($cookie[6])) { $r_options .= "&thold=$cookie[6]"; }
and change it to
Code:
if (!isset($cookie[4])) { $r_options .= ".html"; }
if (isset($cookie[4])) { $r_options .= "-$cookie[4]"; }
if (isset($cookie[5])) { $r_options .= "-$cookie[5]"; }
if (isset($cookie[6])) { $r_options .= "-$cookie[6].html";}
Joined: Mar 06, 2004 Posts: 1140 Location: Manchester, NH USA
Posted:
Sat Sep 11, 2004 6:18 am
Hi Raven!
Thanks for the great post. I wish I had this a couple of nights ago, as you know I've been going through all of my blocks and converting them for GoogleTap (which has been just a TON of fun... please detect the note of sarcasm!)
I only found issue with a single aspect of your code; the exclusion of the fix for the "Older Articles" button.
As for the original code included with Chatserv's 7.4 Patched 2.5, I found a bug that I have also corrected and displayed below. The problem was that (with your code) my site displayed comments next to each article as () without any numbers in the parenthesis.
In my original Chatserv patched 2.5 code, (for some reason) I didn't have either the comments, nor the (). After a review of my code I found this:
Obviously, that presented a problem, so I fixed it. To be honest, I never noticed the problem until you presented your solution above, which made the () show up without anything in them. That's when it jumped out at me.
I'm not sure that my version of this fix is any more or any less elegant than what you presented above (I know me, my version is probably less elegant), but please feel free to checkout my final version of code. The output (compared to your solution) looks identical now that both solutions are appropriately patched. I would like to know which way is the most condusive to performance and functionality.
Here's the code the way that I had re-written it.
Code:
<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* Patched by Steph http://64bit.us for GoogleTap on */
/* September 9, 2004 @ 2:24AM-EST */
/* Comments fixed, all links tested & verified */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
/* Additional security & Abstraction layer conversion */
/* 2003 chatserv */
/* http://www.nukefixes.com -- http://www.nukeresources.com */
/************************************************************************/
if (eregi("block-Old_Articles.php", $_SERVER['SCRIPT_NAME'])) {
Header("Location: index.php");
die();
}
Could you clarify what exactly happened when you had comments set to "" instead of "0" like you do now, by the way and for the record that is original code and not anything i came up with, i compared the 2.5 block for 7.4 to a "clean" block from 6.5 and the code is the same on both.
Joined: Mar 06, 2004 Posts: 1140 Location: Manchester, NH USA
Posted:
Mon Sep 13, 2004 5:50 am
chatserv wrote:
Could you clarify what exactly happened when you had comments set to "" instead of "0" like you do now, by the way and for the record that is original code and not anything i came up with, i compared the 2.5 block for 7.4 to a "clean" block from 6.5 and the code is the same on both.
Cool. I wouldn't know as I don't have any versions prior to 7.0, I was just pointing out that I based my fixes and re-write on the latest patched version (unaltered code distributed as part of the "Patched" series of solutions). It wasn't meant as a shot, but rather to point out that a large number of people probably have the code the way I have it.
I did notice that raven's (6.9?) version using "search more" archives is substantially different; in that it fails to have the monthly menu and values not showing up in the default destination; however, his "search more" results equate to the user being taken to an untapped destination of
Only registered users can see links on this board! Get registered or login to the forums!
In my version of this code, the user is taken to a GoogleTapped destination of
Only registered users can see links on this board! Get registered or login to the forums!
which still has search capabilities, but also reveals the mothly "September", "August", "July", etc..list of Archived news articles for users to choose archived articles from, RATHER THAN the user being taken to the general "search.php" page (which is the case here) which does not show the actual article archives. It thought that strange.
Contrary to Raven thinking he does not use that code in his version of 6.9, this site DOES have a valid GoogleTapped destination page of
Only registered users can see links on this board! Get registered or login to the forums!
but for some reason Raven chooses not to employ it. I'm still not clear about why.
My version of this change would simply take users there instead of to his untapped search page (which also in my case and raven's is a valid GoogleTapped destination of
Only registered users can see links on this board! Get registered or login to the forums!
Again, I'm not sure why he chooses to leave it this way.
In any case, what I was trying to say was that raven's code fails to deliver a tapped address for this final block option.
Next, when I tried raven's code it equated to the output result being ().
When I added the zero, I got (0).
With $articlecomm set to ==1, the output result was that all comments came out BLANK in my version with no () at all, except those that had 1 comment. Those would come out (I'm assuming since I don't have any 1 comment articles) (1). Setting the value to <> 0 resulted (in my case) in the articles showed up as (1), (2), (3), etc... In fact if it weren't for raven's code being tested, I would have never known that each article actually shows a value of comments in the first place as all of mine had more than 1 comment and thus, with the old code were coming out blank (Nothing showed up, no (), no nothing!).
I'm assuming that since there is no field in $prefix_comments for tracking the number of posts (but rather it is a calculation based on the number of rows of comments for each article in the database) that is why I was getting a null value for the result (instead of a Zero) until I made that change.
Joined: Mar 06, 2004 Posts: 1140 Location: Manchester, NH USA
Posted:
Mon Sep 13, 2004 6:21 am
When I said,
Quote:
I only found issue with a single aspect of your code; the exclusion of the fix for the "Older Articles" button.
Your only response was:
Quote:
I did not have that problem because I don't use that code in v6.9
I thought that is what you were talking about. Not trying to imply or alude to any motives or anything... Again, I assumed you were saying what you said that because (at the time) I thought you were saying that 6.9 didn't utilize the archive.html feature. After all, until I checked it today, I had no idea and assumed that this might have been a feature introduced at 7.0. My familiarity with anything pre-7.0 is weak at best.
as I wasn't using (nor have I seen) your version of the rest of the code, but rather using just what I have, I had no idea that this section is what you were talking about. Again, that's why I pointed out that I was using 7.x patched 2.5.
Again, please note that you didn't publish all of your code, just your noted fixed sections so when you said what you said, I had no idea you were talking about the small section of above code, bur rather, I thought you were talking about your not including a GoogleTapped link solution to the search and/or archive sections. I figured you had some good reason for doing it this way, but were deciding to just keep that under your hat.
View next topic View previous topic
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