scriptygoddess

17 Apr, 2002

How to set up next/previous links specific to categories in MT…

Posted by: Jennifer In: How to's

There's quite a bit of upfront work, but if you really want this… then maybe it'd be worth it to you. You'll also need to understand a *little* php. I'll try to explain it the best I can, if you have any questions, let me know, be as specfic as you possibly can, and hopefully I (or one of the other scriptygoddesses) can help…

(MAJOR MAJOR Thanks to goddessLynda for her help on this one!)

(UPDATE: She just doesn't give up either! LOL! Follow along – but DO look at the comments – Lynda posted a comment with a better/easier way than mine…)

(MORE UPDATE: Lynda and I are still working on this… we're trying to make it as automated as possible so it's not so difficult to implement… and also make it as more friendly to the server.. less work – you might want to wait for version 2 of this tutorial – after we've had a chance to get this working…)

LAST AND FINAL UPDATE: I'm leaving this post here more for my own information – but Lynda wrote up the tutorial for the revised way to do this – which summarizes all the commenting back and forth. It's almost completely plug-n-play. Go HERE for the best method.

First you'll need to create a new index template in MT. I named my categoryArrays.php This file will contain an array of all your posts (one array per category). Here's what mine looks like:

<?
$i = 0;
$j = 0;
$k =0;
$l = 0;
$m = 0;
?>
<MTArchiveList>
<MTEntries>
<?
if ("<$MTEntryCategory$>"=="how to's") {
$howtoidarraytemp[$i] = "<$MTEntryID encode_php="qq"$>";
$howtolinkarraytemp[$i] = "<$MTEntryLink encode_php="qq"$>";
$i++;
} else if ("<$MTEntryCategory$>"=="MT hacks") {
$mthacksidarraytemp[$j] = "<$MTEntryID encode_php="qq"$>";
$mthackslinkarraytemp[$j] = "<$MTEntryLink encode_php="qq"$>";
$j++;
} else if ("<$MTEntryCategory$>"=="bookmarks") {
$bookmarksidarraytemp[$k] = "<$MTEntryID encode_php="qq"$>";
$bookmarkslinkarraytemp[$k] = "<$MTEntryLink encode_php="qq"$>";
$k++;
} else if ("<$MTEntryCategory$>"=="lessons learned") {
$lessonsidarraytemp[$l] = "<$MTEntryID encode_php="qq"$>";
$lessonslinkarraytemp[$l] = "<$MTEntryLink encode_php="qq"$>";
$l++;
} else if ("<$MTEntryCategory$>"=="suggested reading") {
$readingidarraytemp[$m] = "<$MTEntryID encode_php="qq"$>";
$readinglinkarraytemp[$m] = "<$MTEntryLink encode_php="qq"$>";
$m++;
}
?>
</MTEntries>
</MTArchiveList>

ok – don't panic… let's break that down.

$i = 0;
$j = 0;
$k =0;

etc.

$i that's how you declare a variable in php. I'm initializing them ("= 0") to zero. I declare and initialize a different variable. One for each of my categories.

if ("<$MTEntryCategory$>"=="how to's") {
"how to's" is the name of one of my categories. So you need to set an if (or else if) block to check the name for each of your categories.

$howtoidarraytemp[$i] = "<$MTEntryID encode_php="qq"$>";
$howtolinkarraytemp[$i] = "<$MTEntryLink encode_php="qq"$>";

I'm setting up an array for this category – one for the ID's and one for the links.

$i++;
not a big thing going on here… just adding 1 to that "$i" variable. Just remember to change this to a different letter (matching the letters you declared and initialized above) for each category.

you'll need to repeat that whole mess with each category.

Make sure you:
1) have different names for the id array and the link array in each category
2) change the variable you're using in the [ ] for each category. (in my file, I'm using $i for the how to's, $j for the mt hacks, $k for the bookmarks, etc. etc.)

—————
With me so far? No? HA! Just wait… the fun has only begun! Now lets move on to the individual entries archive…
—————

Here's what I have there:

<?

include("/home/youraccount/public_html/PathToYourFile/categoryArrays.php");

if ("<$MTEntryCategory$>"=="how to's") {

for ($i =0; $i < count($howtoidarraytemp); $i++) {
$idarraytemp[$i] = $howtoidarraytemp[$i];
$linkarraytemp[$i] = $howtolinkarraytemp[$i];
}

} else if ("<$MTEntryCategory$>"=="MT hacks") {

for ($i =0; $i < count($mthacksidarraytemp); $i++) {
$idarraytemp[$i] = $mthacksidarraytemp[$i];
$linkarraytemp[$i] = $mthackslinkarraytemp[$i];
}

} else if ("<$MTEntryCategory$>"=="bookmarks") {

for ($i =0; $i < count($bookmarksidarraytemp); $i++) {
$idarraytemp[$i] = $bookmarksidarraytemp[$i];
$linkarraytemp[$i] = $bookmarkslinkarraytemp[$i];
}

} else if ("<$MTEntryCategory$>"=="lessons learned") {

for ($i =0; $i < count($lessonsidarraytemp); $i++) {
$idarraytemp[$i] = $lessonsidarraytemp[$i];
$linkarraytemp[$i] = $lessonslinkarraytemp[$i];
}

} else if ("<$MTEntryCategory$>"=="suggested reading") {

for ($i =0; $i < count($readingidarraytemp); $i++) {
$idarraytemp[$i] = $readingidarraytemp[$i];
$linkarraytemp[$i] = $readinglinkarraytemp[$i];
}

} else {
$abort = "true";
}

if (!$abort=="true") {

$idarray = array_reverse($idarraytemp);
$linkarray = array_reverse($linkarraytemp);
print("<p>");

$thisKey = array_search("<$MTEntryID$>", $idarray);
$thisKeyNext = $thisKey + 1;
$thisKeyPrevious = $thisKey – 1;

if ($thisKeyPrevious < 0) {
//nothing
} else {
print('<a href="');
print($linkarray[$thisKeyPrevious]);
print('">see the previous post in this category</a>');
$previouslinkshown = "true";
}

if ($thisKeyNext >= count($linkarray)) {
//nothing
} else {
if ($previouslinkshown == "true") {
print(" || ");
}
print('<a href="');
print($linkarray[$thisKeyNext]);
print('">see the next post in this category</a>');
}
print("<br>");
print("This current category is: ");
print("<$MTEntryCategory$>");
print("</p>");
}
?>

Ok! Calm down! Breathe… we can do this! (LOL!)

include("/home/youraccount/public_html/PathToYourFile/categoryArrays.php");
That's just to pull in that index file we created up above. Just make sure you have the right SERVER path there…

if ("<$MTEntryCategory$>"=="how to's") {
yup, here we go again… gotta do these blocks for each category

for ($i =0; $i < count($howtoidarraytemp); $i++) {
$idarraytemp[$i] = $howtoidarraytemp[$i];
$linkarraytemp[$i] = $howtolinkarraytemp[$i];
}

ok, what I'm doing here is transfering the contents into another array. For each category – these names are the same ($idarraytemp, and $linkarraytemp) – believe it or not, this is to make things easier later… the $howtoidarraytemp, and the $howtolinkarraytemp – get the names of these arrays from your category array file… the one you created above. The "$i" here doesn't matter… you can just use "$i" in all the [ ].

} else {
$abort = "true";
}

end that block just like that… don't need to change anything there.

believe it or not.. you're basically done… the rest is copy and paste exactly as what I have. (See! Told you I was trying to make things easy on you)

so copy and paste this part as is:
if (!$abort=="true") {

$idarray = array_reverse($idarraytemp);
$linkarray = array_reverse($linkarraytemp);
print("<p>");

$thisKey = array_search("<$MTEntryID$>", $idarray);
$thisKeyNext = $thisKey + 1;
$thisKeyPrevious = $thisKey – 1;

if ($thisKeyPrevious < 0) {
//nothing
} else {
print('<a href="');
print($linkarray[$thisKeyPrevious]);
print('">see the previous post in this category</a>');
$previouslinkshown = "true";
}

if ($thisKeyNext >= count($linkarray)) {
//nothing
} else {
if ($previouslinkshown == "true") {
print(" || ");
}
print('<a href="');
print($linkarray[$thisKeyNext]);
print('">see the next post in this category</a>');
}
print("<br>");
print("This current category is: ");
print("<$MTEntryCategory$>");
print("</p>");
}

somewhat a pain in the butt, I know… but no pain, no gain, right?

40 Responses to "How to set up next/previous links specific to categories in MT…"

1 | Lynda

April 17th, 2002 at 12:49 pm

Avatar

I have to admit, getting everything exactly right was confusing the heck out of me. I have 13 categories and it was beginning to be a LOT of trouble.

Here is an alternate solution to the one above. The only catch is I don't believe it works when you don't have a category assigned and EVERY category must be included here. But there probably aren't too many who don't want that.

It's a little more automated (and I'm SURE with a little know-how we can get it so it's FULLY automated) and you only need to edit a few lines when you add a new category.

Check it out:

For the new index template Jenn called categoryArrays.php, place the following code:

<?

$currcat = "<MTArchiveList archive_type="Category"><$MTArchiveTitle dirify="1"$>|</MTArchiveList>";

$thisCat = explode('|', $currcat);

$a = 0;
$b = 0;
$c = 0;
$d = 0;
$e = 0;
$f = 0;
$g = 0;
$i = 0;
$j = 0;
$k =0;
$l = 0;
$m = 0;

?>
<MTArchiveList><MTEntries>
<?
if ("<$MTEntryCategory dirify="1"$>"=="$thisCat[0]") {
$<$MTEntryCategory dirify="1"$>idarraytemp[$a] = "<$MTEntryID encode_php="qq"$>";
$<$MTEntryCategory dirify="1"$>linkarraytemp[$a] = "<$MTEntryLink encode_php="qq"$>";
$a++;
} else if ("<$MTEntryCategory dirify="1"$>"=="$thisCat[1]") {
$<$MTEntryCategory dirify="1"$>idarraytemp[$b] = "<$MTEntryID encode_php="qq"$>";
$<$MTEntryCategory dirify="1"$>linkarraytemp[$b] = "<$MTEntryLink encode_php="qq"$>";
$b++;
} else if ("<$MTEntryCategory dirify="1"$>"=="$thisCat[2]") {
$<$MTEntryCategory dirify="1"$>idarraytemp[$c] = "<$MTEntryID encode_php="qq"$>";
$<$MTEntryCategory dirify="1"$>linkarraytemp[$c] = "<$MTEntryLink encode_php="qq"$>";
$c++;
} else if ("<$MTEntryCategory dirify="1"$>"=="$thisCat[3]") {
$<$MTEntryCategory dirify="1"$>idarraytemp[$d] = "<$MTEntryID encode_php="qq"$>";
$<$MTEntryCategory dirify="1"$>linkarraytemp[$d] = "<$MTEntryLink encode_php="qq"$>";
$d++;
} else if ("<$MTEntryCategory dirify="1"$>"=="$thisCat[4]") {
$<$MTEntryCategory dirify="1"$>idarraytemp[$e] = "<$MTEntryID encode_php="qq"$>";
$<$MTEntryCategory dirify="1"$>linkarraytemp[$e] = "<$MTEntryLink encode_php="qq"$>";
$e++;
} else if ("<$MTEntryCategory dirify="1"$>"=="$thisCat[5]") {
$<$MTEntryCategory dirify="1"$>idarraytemp[$f] = "<$MTEntryID encode_php="qq"$>";
$<$MTEntryCategory dirify="1"$>linkarraytemp[$f] = "<$MTEntryLink encode_php="qq"$>";
$f++;
} else if ("<$MTEntryCategory dirify="1"$>"=="$thisCat[6]") {
$<$MTEntryCategory dirify="1"$>idarraytemp[$g] = "<$MTEntryID encode_php="qq"$>";
$<$MTEntryCategory dirify="1"$>linkarraytemp[$g] = "<$MTEntryLink encode_php="qq"$>";
$g++;
} else if ("<$MTEntryCategory dirify="1"$>"=="$thisCat[7]") {
$<$MTEntryCategory dirify="1"$>idarraytemp[$h] = "<$MTEntryID encode_php="qq"$>";
$<$MTEntryCategory dirify="1"$>linkarraytemp[$h] = "<$MTEntryLink encode_php="qq"$>";
$h++;
} else if ("<$MTEntryCategory dirify="1"$>"=="$thisCat[8]") {
$<$MTEntryCategory dirify="1"$>idarraytemp[$i] = "<$MTEntryID encode_php="qq"$>";
$<$MTEntryCategory dirify="1"$>linkarraytemp[$i] = "<$MTEntryLink encode_php="qq"$>";
$i++;
} else if ("<$MTEntryCategory dirify="1"$>"=="$thisCat[9]") {
$<$MTEntryCategory dirify="1"$>idarraytemp[$j] = "<$MTEntryID encode_php="qq"$>";
$<$MTEntryCategory dirify="1"$>linkarraytemp[$j] = "<$MTEntryLink encode_php="qq"$>";
$j++;
} else if ("<$MTEntryCategory dirify="1"$>"=="$thisCat[10]") {
$<$MTEntryCategory dirify="1"$>idarraytemp[$k] = "<$MTEntryID encode_php="qq"$>";
$<$MTEntryCategory dirify="1"$>linkarraytemp[$k] = "<$MTEntryLink encode_php="qq"$>";
$k++;
} else if ("<$MTEntryCategory dirify="1"$>"=="$thisCat[11]") {
$<$MTEntryCategory dirify="1"$>idarraytemp[$l] = "<$MTEntryID encode_php="qq"$>";
$<$MTEntryCategory dirify="1"$>linkarraytemp[$l] = "<$MTEntryLink encode_php="qq"$>";
$l++;
} else if ("<$MTEntryCategory dirify="1"$>"=="$thisCat[12]") {
$<$MTEntryCategory dirify="1"$>idarraytemp[$m] = "<$MTEntryID encode_php="qq"$>";
$<$MTEntryCategory dirify="1"$>linkarraytemp[$m] = "<$MTEntryLink encode_php="qq"$>";
$m++;
}
?>
</MTEntries></MTArchiveList>

There should be one letter (a, b, c, etc) for each category you have and you'll end up with one less $thisCat[xx] than you have categories because it starts with zero, not one. If you have less than 13 categories, just remove the extra. If you have more than 13, add extras and be sure to create an additional $x = 0; and change $thisCat[xx] to the next number up as well as changing all the the three identifying letters.

Warning: If you have a lot of entries, like me, this file will be HUGE!!!

The rest is the same as Jenn's except now we only need one identifier. So INSTEAD OF this:

if (""=="how to's") {

for ($i =0; $i "=="MT hacks") {

for ($i =0; $i "=="bookmarks") {

for ($i =0; $i "=="lessons learned") {

for ($i =0; $i "=="suggested reading") {

for ($i =0; $i

We can now simply place this:

if (""=="") {
for ($i =0; $i idarraytemp); $i++) {
$idarraytemp[$i] = $idarraytemp[$i];
$linkarraytemp[$i] = $linkarraytemp[$i];
}

} else {
$abort = "true";
}

Again, whichever is easier for you. This way was personally easier for me.

:)

2 | Jennifer

April 17th, 2002 at 12:53 pm

Avatar

that does look quite a bit easier! YEAH!!

3 | Jennifer

April 17th, 2002 at 12:59 pm

Avatar

Yup! Just implemented it here.. works like a charm! Great job!

In fact, I didn't even have to do very much – because I just copied and pasted your code (and just deleted the extra stuff – because I only have 6 categories here)

MUCH easier!!

4 | Lynda

April 17th, 2002 at 1:07 pm

Avatar

If we could just find a way to assign the $thisCat[x] variable and the $x variables automatically, it would be a completely plug-and-play script.

I'm sure there's a way, but heck if I know. :)

5 | Lynda

April 17th, 2002 at 3:17 pm

Avatar

Jenn, just curious, I don't know that much about looping, which it seems is what this script is doing. Does it STOP looping once it's cycled the file, or does it keep looping the file over and over and over again, wasting CPU time?

If it's doing that, is there any way to stop it?

I've heard of scripts like this eating up CPU time. Not sure if that would happen here.

6 | Lynda

April 17th, 2002 at 3:24 pm

Avatar

Okay, nevermind (I think). I went to this site and I think I understand that this line to makes sure endless looping doesn't happen:

for ($i =0; $i idarraytemp); $i++) {

Let me know if I'm wrong, but I think this is what's happening here. That middle part counts up all the idarrays and loops until the end of them, and no more.

Is that right?

Just trying to learn a little more about PHP here. :)

7 | Jennifer

April 17th, 2002 at 3:37 pm

Avatar

Yes that's right – however, I'd imagine if that categoryArchive page gets really big – it's going to be a bit of a drag on download time…

Another way to approach this is to write each array to its own file – then import JUST the array you need…

does that make sense?

8 | Jennifer

April 17th, 2002 at 3:41 pm

Avatar

but that would mean needing to run the script that writes the file when you post something new to your site… kind of like indexing your pages…

9 | Lynda

April 17th, 2002 at 3:55 pm

Avatar

Uh-oh Jenn. I think you just gave me an idea.

10 | Lynda

April 17th, 2002 at 4:14 pm

Avatar

Okay, it isn't working, but I'm not sure why.

Jenn, maybe you can get this to work. If so, the whole thing would be FULLY automated and plug-n-play.

1.) Create a new Archive-Related Template

2.) Paste something similar to this code in there. I don't think we'd need the "if category == category" thing at all anymore at this point:

<?
$a = 0;
?>
<MTArchiveList><MTEntries>
<?
if ("<$MTEntryCategory dirify="1"$>"=="<$MTEntryCategory dirify="1"$>") {
$<$MTEntryCategory dirify="1"$>idarraytemp[$a] = "<$MTEntryID encode_php="qq"$>";
$<$MTEntryCategory dirify="1"$>linkarraytemp[$a] = "<$MTEntryLink encode_php="qq"$>";
$a++;
} else {
//do nothing
}
?>
</MTEntries></MTArchiveList>

3.) Go to Blog Config > Archiving > Add New.
4.) Add new Category Archive. Use the Archive Template you just created.
5.) Where you can specify the file format, enter the following:

arrays/<$MTArchiveCategory dirify="1"$>.php

That will create a new folder in your archive directory named "arrays" and stick the individual category files from there.

6.) Paste the last bit of your code into Individual Templates, simply changing the file that's called up to the following:

include("/home/youraccount/public_html/pathtoarchives/<$MTEntryCategory dirify="1"$>.php");

Seems that should work to me, but I can't get it to. Any ideas? This would be better for me as that main array is just HUGE HUGE HUGE (1.5 MB).

11 | Jennifer

April 17th, 2002 at 4:28 pm

Avatar

it's what its writing in those archive files… take a look at what's there…

I've gotta run – but I'll play with it more tonight…

12 | Lynda

April 17th, 2002 at 4:30 pm

Avatar

Ohhh! I got it to work. Just remove the container and it works. :)

13 | Lynda

April 17th, 2002 at 4:34 pm

Avatar

And it makes my site load SOOOO much faster.

14 | Jennifer

April 17th, 2002 at 4:37 pm

Avatar

does this mean the category archives aren't being created anymore?

15 | Lynda

April 17th, 2002 at 4:39 pm

Avatar

No. They are. You just don't need that container tag when you're INSIDE an ARCHIVE template. :)

This makes the *WHOLE* process automated and quick.

::does happy dance::

16 | Jennifer

April 17th, 2002 at 4:40 pm

Avatar

then what does that radio button do? is that what you select as your category archive LINK?

17 | Lynda

April 17th, 2002 at 4:42 pm

Avatar

Just change step two above to this and everything should work peachy. It's working just fine on my site. Again, the MTArchives container isn't needed because it's inside of a new category archive template.

2.) Paste something similar to this code in there. I don't think we'd need the "if category == category" thing at all anymore at this point:

<?
$a = 0;
?>
<MTArchiveList><MTEntries>
<?
if ("<$MTEntryCategory dirify="1"$>"=="<$MTEntryCategory dirify="1"$>") {
$<$MTEntryCategory dirify="1"$>idarraytemp[$a] = "<$MTEntryID encode_php="qq"$>";
$<$MTEntryCategory dirify="1"$>linkarraytemp[$a] = "<$MTEntryLink encode_php="qq"$>";
$a++;
} else {
//do nothing
}
?>
</MTEntries></MTArchiveList>

18 | Lynda

April 17th, 2002 at 4:43 pm

Avatar

Oh, bah, delete the post above. I forgot to take out the mtarchivelist container tag.

The radio button is for your DEFAULT. That's what the archives are linked to. Don't change the default unless you don't have category archives!

19 | Lynda

April 17th, 2002 at 4:46 pm

Avatar

The first time I did it, I accidentally put the file configuration into the DEFAULT template (Category Archive Template)

You should be putting it next to the CategoryArray template (or whatever you call it) and make sure that radio box is not selected (unless it's your only category archive template period)

20 | Lynda

April 17th, 2002 at 4:49 pm

Avatar

Heh. Sorry. Had to fix the template. It was pointing to include ("home/etc.."); instead of include ("/home/etc..");

21 | Lynda

April 17th, 2002 at 4:51 pm

Avatar

Seems to be working now, except there are some posts without categories set.

22 | Jennifer

April 17th, 2002 at 4:57 pm

Avatar

yeah, the fix for that is this:
I put this above the include call on the individual entry archive template:

$thisCat = "<$MTEntryCategory dirify="1"$>";

if (!$thisCat == "") {

and of course added the "}" at the very end of all our code…

HOWEVER – I'm still running into a problem… try clicking through all the cat archives on the individual page… it gets to one point and then dies out… not sure why…

23 | Jennifer

April 17th, 2002 at 5:01 pm

Avatar

sepcifically the how to's… it doesn't seem like those…

24 | Lynda

April 17th, 2002 at 5:02 pm

Avatar

I'll have to look at that when I get home from work. I *think* everything is working fine on my blog. . .

Hrmmmm.

25 | Jennifer

April 17th, 2002 at 5:10 pm

Avatar

oooh… I know why… that damned mutliple category thing…

where it dies out… that one is a MT Hack (primary category) and a how to (secondary category)

looking at the how_to.php (array file) it actually has the "mt_hacksarray" thingy in there… (IN the HOW_TO php file!)

How do we get that category template just to show the first category?

26 | Lynda

April 17th, 2002 at 6:27 pm

Avatar

Blah. (blah blah blah!)

I don't think we can get it to just show the first category, but would something like this in the category template work?

<?
$a = 0;
$MTCategory = "<$MTEntryCategory dirify="1"$>";
?>
<MTEntries>
<?

if ($MtCategory =="<$MTEntryCategory dirify="1"$>") {
$<$MTEntryCategory dirify="1"$>idarraytemp[$a] = "<$MTEntryID encode_php="qq"$>";
$<$MTEntryCategory dirify="1"$>linkarraytemp[$a] = "<$MTEntryLink encode_php="qq"$>";
$a++;
} else {
//do nothing
}

?>
</MTEntries>

Testing it out now.

27 | Lynda

April 17th, 2002 at 6:28 pm

Avatar

oops. move that $MTCategory down into the MTEntries tag. . . let me see if it works. hehe

28 | Lynda

April 17th, 2002 at 6:30 pm

Avatar

I wish I could go back and delete all my stupid comments. Try the first one, but change MTEntryCategory to MTCategory

29 | Lynda

April 17th, 2002 at 6:41 pm

Avatar

Okay. I'll try to stop posting every 2 minutes.

I just did this and tested it (I have very few multiple entries, but I do have a few) and it seemed to work:

<?
$a = 0;
?>
<MTEntries>
<?
if ("<$MTArchiveCategory dirify="1"$>"=="<$MTArchiveCategory dirify="1"$>") {
$<$MTArchiveCategory dirify="1"$>idarraytemp[$a] = "<$MTEntryID encode_php="qq"$>";
$<$MTArchiveCategory dirify="1"$>linkarraytemp[$a] = "<$MTEntryLink encode_php="qq"$>";
$a++;
} else {
//do nothing
}
?>
</MTEntries>

30 | Lynda

April 17th, 2002 at 6:51 pm

Avatar

Grrrrrrrrrrrrrrrrr! I went to try it on these templates (woo! Look at that, you don't need the whole first line I was doing) and I'm still getting an error on some entries, although it's a different error.

This isn't doing this on my blog (I don't believe) so I wonder why it's doing it here?

31 | Charles

April 17th, 2002 at 6:52 pm

Avatar

You can eliminate a few lines by not flipflopping the array orders and changing:

$thisKeyNext = $thisKey + 1;
$thisKeyPrevious = $thisKey – 1;

to

$thisKeyNext = $thisKey – 1;
$thisKeyPrevious = $thisKey + 1;

Excellent hack though. I spent a good hour fooling with this and adapting it, Loving every minute 😉

32 | Lynda

April 17th, 2002 at 6:57 pm

Avatar

Charles, not flipflopping develops some weird behavior around the first and last post of the category. I tried that myself.

33 | Lynda

April 17th, 2002 at 7:08 pm

Avatar

This is really weird. It works everywhere on this blog except for this link.

Since I wrote that entry, I'm just going to make it one category…

It works for other multiple category posts, such as bookmarks and all. Not really sure what's wrong with that one.

34 | Lynda

April 17th, 2002 at 7:12 pm

Avatar

Okay, for some reason, when MT Hacks was the main category, it wasn't working at all.

I'm thinking perhaps it doesn't work when there's only one entry in a category.

Is there anything to put in (similar to the abort thing above) that will eliminate that problem if there isn't an actual array (just one singular entry) to do?

That make sense?

35 | Jennifer

April 17th, 2002 at 7:17 pm

Avatar

I'm becoming not such a big fan of the whole multiple category thing. I'm thinking to simplify things, we should go through and remove them from any of the posts. I'm SURE this would work otherwise!

Lynda, wanna do the tutorial for ver. 2?

36 | Jennifer

April 17th, 2002 at 7:18 pm

Avatar

P.S. This was SO cool being able to work on this collaboratively! 😀 This is exactly what I wanted this blog for! YAY!!!

37 | Lynda

April 17th, 2002 at 7:19 pm

Avatar

Jennifer, the multiple category isn't the problem. It's the fact that MT Hacks was only the MAIN category for ONE post. That's the problem

I think I have the solution (worked on my blog) if I could mess with the templates for one second.

:)

38 | Lynda

April 17th, 2002 at 7:25 pm

Avatar

Okay, Jenn – I'm almost positive that was the problem. I added the following to the code (you can take a look and tell me if there's a problem). It seems to work:

Above the $idarray = line:

if ($idarraytemp >= 1) {

Then at the bottom, before the closing } :

} else {
// do nothing
}

Can we find any more kinks? If not I'd love to write up the tutorial for ver.2 !

:)

How fun! Of course I didn't get much work done today, but oh well. :)

39 | Lynda

April 17th, 2002 at 8:26 pm

Avatar

Okay, version 2.0 is up! HERE

40 | Row

April 18th, 2002 at 6:53 pm

Avatar

You two are amazing. I wish I had even a quarter of the knowledge of you two!

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements