delicious2Blogger - Categories for Blogger

Update April 11, 2007 - This methods/scripts etc described in this post are obsolete. Do Not Use Them! They relate to a category method for Blogger BEFORE Blogger introduced their labels. Use New Blogger, Use Labels. This is just up for historical reasons, or if someone using the code already needs it. Comments are now Closed. Thanx.
Update - August 18, 2006
As most are aware now, Blogger in beta has it's own built in categories and effectively makes these scripts obsolete, eventually. BUT if you migrate over to the new BETA servers these WILL NOT WORK ANYMORE!!!!! I am tracking the changes with beta and d2b at the post d2b Categories and the Beta Blogger and recommend two things.

1) If you are thinking about setting these scripts up DON'T. Just wait until you can move to beta blogger and use their labels.
2) If you are a current user of d2b and are thinking about switching hold off unless you are ready to dump d2b. They will not work on the new servers without modifications and I'm still working out whether that's even worthwhile. d2b Categories and the Beta Blogger UPDATED!- See this post d2b and Beta Part 2


The rewrite on the scripts are done, and now the category system formerly (and unofficially) called Blogger Categories with Del.icio.us are now rechristened...[cue the trumpets] delicious2Blogger. Ok. It's a lame name but I gotta call it something. I hear all the cool kids just refer to it as d2b.

As before, this is not the only method to 'fake' categories with Blogger, it's just one of many. I don't necessarily think it's better than any other. It's got it's pros and cons as most of the methods do. But it works well for me. Be sure to check out Freshblogs' Blogger Hacks - The Series for the most comprehensive list of all the different Blogger Category methods before deciding which one is for you.

Some of the new benefits/features of d2b are -
  • New Features-

  • Completely rewritten scripts - majority of code moved to an external javascript file with less muss/fuss in the body of the template
  • Customization - Virtually everything output by the scripts is now easily customizable, making it easy to convert the output into the language of your choice.
  • Use of a delicious "Common Tag" - now has the ability to add a common tag to all blog posts. What this means is you can use one delicious account to categorize your blog, but still use that same account for your normal bookmarking. Or use it to categorize mulitple blogs.
  • Option to provide an RSS feed link for each 'category', with customizable RSS image and heading
  • Added an optional and customizable 'read more' link that can be displayed in the 'notes' section.
  • Not New But still a feature

  • All links are shown in blog, visitors never have to leave.
  • OMG! A category cloud. Yes the highly desirable in blog cloud is available
  • Setup requires the creation of only one 'category post' that is dynamic. All new tags added at del.icio.us are displayed dynamically without any further setup.
  • Everything is given id's and classes for styling with CSS


I've put the new and updated instruction on my googlepage site (easier to manage large bits of code there than in a blogger post) and the setup pages are completely rewritten as well. Everything is in two parts, installation and configuration.

Installation and Configuration pages for d2b Category Scripts

d2b Category Installation

d2b Category Configuration


I've tested the new scripts/setup about as completely as I can and pretty sure that everything is correct. But if you find a problem, have a suggestion, or want to complain this is the home post for d2b and you can do it here.

During testing I set up some test blogs, so if you want to see d2b in action in a couple of different templates you can. Just remember it's pulling in the same tags as from phydeaux3, so any links in the displayed categories come back here.

d2b Test Blog in Minima Black
d2b Test Blog using Powell Street Template

Note for previous users of the older method --

Unfortunately, rewriting the scripts to clean everything up makes it a non-trivial matter to convert over from the older setup to the new one. I'm going to leave all the code/setup for the old method up without alteration for anyone using that can always get fresh copies of those scripts if needed. If everything is setup and functioning like you want, there probably isn't any reason to convert over. The only feature in the new scripts that would really be worthwhile in doing the conversion is possibly the common tag feature, but here's what you need to know. EVERYTHING in the old setup needs to be replaced by the scripts from the new setup. Everything tagged at delicious is the same, the category post url/archive urls are the same, a few of the variable setups/css are the same, but everything else has changed and you CANNONT MIX AND MATCH bits from the old and new methods. Use all of one or the other. If you want to convert over, you'll have to follow the new instructions step by step and replace all the old code (including in the category post) with the new codes...that could be a real pain and I don't recommend it for the faint of heart. The only time I would recommend converting to the new scripts is if you decide to change the template/layout of your blog, then that would be a great time to convert over since you would have to set everything back up anyway.

Post a Comment

112 comments:

Avatar said...

marvelous.

this hack is so extensive that my head is spinning K.

Dave said...

I just finished the conversion process from version 1 to version 2 at www.disciplemexico.org. Took me about a half hour to make the categories work, another half hour of tweaking. It's been great, precisely what I wanted to convey a professional, in-blog look. And with RSS feeds for each category, it's simply stupendous. Now if we could just get Technorati to discover the tags in the link field...

phydeaux3 said...

Cra..er Avatar-
Is that a good or bad head spinning??? Oh well, try to enjoy it either way.
You're getting as bad as me with the different names. :-)

Dave -

Hey, looks good. I hadn't seen your blog before, and you went throught the conversion and lived...I'm shocked! Good job.
Now if we could just get Technorati to discover the tags in the link field...
Yeah, that would be difficult. BUT, if you are a Firefox user, I'm thinking about modifying a version of the Magical S(h)eep Technorati Tag adder specially for d2b so it automatically adds in what is filled out in the link field as technorati tags also, plus you can enter in more tags if you like. Just haven't quite got around to it yet. Even without the special version, it's still pretty useful. What I use for mine. If enough people want a modified version that saves a couple of steps, I could probably work it up.

Improbulus said...

Cool, pardner, you never rest do you? You gonna do a from scratch howto for the latest version, huh? :D

And yes the modified version of the Magical Sheep tagger would be great...

phydeaux3 said...

You gonna do a from scratch howto for the latest version, huh? :D

Hmm...Maybe I didn't make the Links to the new Installation and Configuration pages large enough. :-(

Well that's taken care of. They should be a little more prominent now. They did deserve a bit more attention than a standard link. :-D

See 'em now Impy??

Saratica said...

Yes, spinning... I think it's working. I do, of course, have a question.

For my first blog (abroadincostarica) with the "old" instructions, you had given me the following to format some details:

.post-cat {
color:#330099;
font:85% "Verdana";
font-weight:650;
}
.delNote {
font-family:verdana;
}
.small-del-tags{
margin-bottom:20px;
padding-bottom:20px;
border-bottom:1px dotted #ccc;
}
.delTitle {font-size:150%;font-weight:999;}

The formatting for the .post-cat is not working. Nor is the dotted line thingie. I can't tell with the rest of it - it looks like you may have put that in another place.

I looked for the formatting instructions for the .post-cat but did not see it.

Also, I had copied and pasted another template with the old instructions, and did NOT erase that html, just added and erased the new as I went. Probably pretty bad form and I could get kicked out of blogger school for this. Is this a simple fix or do I need to start over? Thank you.

Saratica
http://fortzach.blogspot.com

phydeaux3 said...

Hey Saratica,

I could get kicked out of blogger school for this. Is this a simple fix or do I need to start over? Thank you.
Naw, we'll let you stay. No need to start over. Looks like you got everything setup properly. It's really my changes that I didn't explain very well in the CSS.

Ah, you got another blog now too. Cool.

And yeah, you ran into the few slight CSS naming changes I made. I didn't document them very well..I still got a bit of tidying up to complete the configuration for those.

In a nutshell, the code you posted here...is ALMOST correct in the new version. I made some SLIGHT naming changes on some of the CSS from the old version (I really had a reason for doing so, I wasn't trying to trick ya)

So the code you posted here, take that out of where it is in the template.

Then go down in the CSS part first to the section marked off as
Delicious Category Page Styles
There is all the stuff for the actual category page itself. If you look closely, what you have is almost the same but there is an addition to the ones labelled .delNote .small-del-tags
and .delTitle, they are all there, just with a #del-container in front of each of them. Just find the corresponding one for each, and replace those previous settings into the slightly renamed ones. I've put in a lot more default css with this one, so if there is already a setting there that you want to change, then just replace it, like with the #del-container .delTitle line has a font-size:140%, if you want it 150% then just up it, similar on each of those. Kinda confusing, but you seem to catch on quickly.

On the last .post-cat bit, I completely changed the name on that one in this new one (I really did have a reason). After the other bit scroll down to the listing marked off
Delicious Category Post Links
and you'll see two empty entries there.
span.cattags {}
span.cattags a{}

So to match what you had in the other template make that one

span.cattags {color:#330099;
font:85% "Verdana";
font-weight:650;
}
span.cattags a{}

I don't think I've explained that formatting at all on the config page yet, one of my to-do's. Hopefully this will fix you up. Again sorry for the changes, I'm evil. :-D

If you run into any probs lemme know, I'm sure we can get 'em sorted.

John said...

I'm sure there's a good reason why not, but addressing the T'rati issue... Is there a way to have the script that writes out the tags include the rel="tag" attribute, and thereby make the inserted tags live on T'rati too?

phydeaux3 said...

John,

Good question, you could have the script add the rel=tag stuff, but I believe it wouldn't help. Reason being is because those links are completely written by a script. Most crawlers won't index javascript created text, they just read what's actually on the page, so for most javascript created stuff won't fly.

I actually tested it out awhile back to make sure that technorati wouldn't pick 'em up, and they never did. Pretty much what I figured.

If anyone else has had different experience with Technorati crawling javascript created links, I'd be interested in hearing them. But I'm pretty certain they have to be hardcoded in the html.

That's why the best I can suggest is to use a tag adder for technorati if you are using d2b, I'm partial to the Magical S(h)eep version. :-)

And thanks for the links on Freshblog!

Saratica said...

Thank you, evil phydeaux!!! I found the spots and fixed all those. The new blog is almost perfect... except for one tiny thing.

I have five categories, each with two posts in them. When I click on a category, I hop to the Category page but only one of the two posts is there and the post title shows up as the blog title, not the post title.

But wait there's more. Only four of the five categories does this. One of them behaves properly, showing two posts on the Category page with the Post title, not the blog title.

I have to start over, don't I? I'm going in now and make sure all the old delicious category stuff is gone...

phydeaux3 said...

Hmm..I see. Lemme have a look before starting over. Probably something got missed in the conversion.

I'm looking it over right now and will let you know what I find.

Saratica said...

I swear on my life it was doing that. I just went there too and now it's all perfect. I have lost my mind. Time for South Park. THANK YOU! Hasta la vista.

Saratica said...

I'm sorry if I sent you off on a wild goose chase... sorry about that! I can't explain it, but I just went back and it's still fine... Thank you again!

phydeaux3 said...

Yeah, I was about to say it's looking about right to me...probably had an old cached page in your browser or something...or maybe you're jes trickin' me..bwahahaa.

I do see a minor issue only partially related to the archive hiding script..just a slight mismanage..nothing major.

But there is also another issue with your template, in IE only. I've seen it before and I know the fix..

Hey if it's ok with you, I'll send you an email to the one listed on your blog, this may involve a few bits of code and would be easier through that. But basically the categories stuff looks like it's setup about right.

Saratica said...

No tricks - but look out next year when I have html mastered (HA! Like it will take that long...) Thank you, phydeaux, I'll look forward to the email. In the am - too bleary-eyed now! 'ta luego

Bikram Gupta said...

Many many thanks. I got my categories setup working in about 10 minutes!

http://product-mgmt.blogspot.com/

Improbulus said...

Yep, they're big enough now!

Other things aren't though. In fact it's not even there at all. Nag nag nag crack crack crack... ;) :P

Greg said...

Great-looking category hack!

I've had discussions with the Technorati "spider engineers" (shudder) and I can confirm that they will only pull rel="tag" links out of flat HTML. No scripting.

phydeaux3 said...

Ah, thanks for that info Greg. I figured that was the case, but nice to confirm it. Spider engineer...would look cool on a business card.

And thanks for the compliment. Means much coming from the FreshTag creator.

Judge Jonathan said...

Looks simply awesome. One question though, before I start changing my template:

Is there any way of displaying only a limited number of categories in the sidebar?

I use del.icio.us to tag my posts, but a lot of the tags I use only have 1-2 posts. These aren't really 'categories' per se.

What I'd like to do is set my list to be ordered by frequency (I know how to do that) and display, say, the 10 categories/tags with the most posts.

Sorry if this is covered somewhere else, I've been looking around but couldn't find it.

Thanks so much...

phydeaux3 said...

Judge Jonathan-

Well, as of right this moment the answer is no, I don't have that setup.

BUT I believe I could set it so you could somewhat control the number of 'categories' that display in the sidebar.

There is another small niggle that I need to go in and fix (no one seems to have noticed it yet) and I'll look into adding that while I'm there. Hopefully I can without breaking anything else. :-)

So...if not tonight, maybe tomorrow night I'll either confirm or deny it's existence.

phydeaux3 said...

Judge Jonathon,

Well I've implemented your suggestion. I've added the var delThrottleTag variable which will control the number of 'tags' shown in the category listing.
I've updated the installation and configuration pages to reflect that.

Now this may not be exactly what you wanted, sounds like it is but did start to think they could be 'throttled' also by a more 'threshold' type approach. Meaning, instead of saying 'show me x number of tags' which is what this is, say 'show only tags with at least x number of entries'. I may do something like that in the future, but it would require a few more changes than the other.

I also set up a new page d2b Categories -Changelog and To-do to track the changes I've made and possible things for the future.

Judge Jonathan said...

That's exactly what I wanted! Great!

I'll keep an eye on your changelog to see if you get around to implement the more automated feature you mentioned. In the meantime, the 'manual' option - checking how many tags actually have x number of posts and then setting it to display that many - works fine with me.

Thanks again for doing this, I really do appreciate it. Will get to work on implementing d2b soon.

PUK said...

Nice work!
And thanks to the very detailed and easily understandeble instructions a non-native english (and non-native computer) speaking person like myself had hardly any problems installing this.
Thanks for doing this great job!
PUK

phydeaux3 said...

puk-

Thanks for the kind words. And it looks great on your site. Good job getting it going, and on the lightbox stuff too.

Saratica said...

Hi phydeaux3 - I'm at my old site doing the category upgrades and have a question on the cattags... the formatting is not working. I copied the code you gave me in the comments above:

span.cattags {color:#330099;
font:85% "Verdana";
font-weight:650;
}
span.cattags a{}

but no difference. Can you see what's out of whack? Thank you!!!

http://abroadincostarica.blogspot.com

I'm worried that I'll post this and then it will magically be fixed on my site...

Saratica said...

God put me here to annoy you. Next time I will COMPLETE the instructions, then ask questions. I was only halfway done, it turns out. It's all fixed. Thank you!!!

phydeaux3 said...

God put me here to annoy you.

Oh, so you're the one.. :-D

No prob, glad you got it sorted.

Michelin L.W.Y said...

Thank you for the easy instruction on installing d2b. I have the basic system installed and it's working like wonder. This is the easiest category system I have found so far for blogger.

phydeaux3 said...

michelin -

Thanks, glad you found it useful. Looks pretty nice in your blog too.

Aditya said...

Hey Kirk, just skimming through the comments I saw a few people raise up questions over limiting number of ta... uh, categories and/or posts. I don't know how you sorted it, but did you use ?count= to limit them, or some other way? I'm curious! :)

John said...

Thanks for making this category method, it helped me a lot to make the navigation of my site better.

phydeaux3 said...

john-

Glad you found it useful. Looks great on your site also. Nice job.

aditya

but did you use ?count= to limit them

Yeah, that's exactly how I did it. I setup a user configurable variable that when set added the ?count=X stuff on. Was the quickest/easiest way to get it.

At some point I may put in a 'threshold limit' meaning show only categories/tags that have at least x number of posts, not really hard but more than I wanted to do at that particular moment.

cool! said...

Hello phydeaux3. I'm deeply impressed by your category hack, especially when I grouped the posts into categories in delicios, these grouped posts appered immediately in blog's category page. this synchronous category output is really cool.

So I hope to request you to make similar script, which output atom (and rss) feeds synchronously and is enable to dress up the output of feed content. there are some feed2js services on the net, but these services provides asynchronous output, so inconvenient.

I believe your ability.

Andrea Flanagan said...

Hello!

Thanks for the script! But i seem to be having a problem...maybe you can take a look and help? When I click on my catagories...it goes to my catagory post that was created as you mentioned in your instructions. what did i do wrong? Thanks!!

Ryan said...

Just wanted to join the others that are thankful for this script and all the hard work you have done. I've been wanting categories for a while, and thanks to you, they are there. And with little headaches too.

crafty chica said...

oh! i think i made a mistake.. categories on the sidebar doesnt show up, categories post shows up (insipite of all the hiding scripts)..

can you look at and tell me what did i do wrong?

http://patternlady.blogspot.com

oh by the way this rocks!

phydeaux3 said...

andrea-

Well, somehow the script that is supposed to be inside the 'category post' isn't there. Follow Step#3 in the installation guide again and edit that post and put in the code again and republish. That's the only thing I see wrong.

ryan-

Thanks, glad its working for you.

patternlady-

Did you get it all sorted? I don't see any problem (although I may be overlooking something) but it looks like it's working.

谢矛 said...

This sounds like a great idea, but I cannot get anything to show up either. I have checked and re-checked my set-up but to no avail. Can someone please look and see what I have done wrong?

谢矛 said...

Please disregard my previous comment. Everything is working now. I think it was a cache problem! Thanks for a great idea!

blogonaut said...

huh my previous post didn´t appear?

What I just said was thanks so much for the scripts and well written tutorial.

Only thing... I can´t get it to work with my local language characters, Swedish that is. Unless it is a time-delay with delicious... did one post without local characters and it appeared in my categories immediately. Next with several foreign characters do not appear at all.

Blogger is set to UTF-8.

Have no clue what´s going on. Anyone who would know where to start looking?

Thanks all.
datorliv.blogspot.com

AH! Comment moderation... anyway, I´ve written it, might as well post it although I realize now my first post didn´t dissapear in a mysterious way... glad these messages reaches you and thanks again for this great system!

phydeaux3 said...

??-
I assume those are chinese characters, but all I get are question marks. :-) Anyway glad it sorted, and looks like an interesting blog you got. A Georgia boy in China. Veddy interesting.

blogonaut-

I went ahead and didn't publish your first one. :-D
But on your issue, is it sorted? Looks like it is but I'm not positive. Sometimes there is a lag between when you add something to del.icio.us and having it show up, especially if that 'tag' has been cached already. But it will usually sort itself out fairly quickly.

And I've had several users from the scandanavian countries use their local languages so it should work.

The only caveat I've found, There is one character that Blogger for some reason forks up eventually if you use it, I don't have it on my keyboard handy but it's the o with a line through it. (Not even sure if Swedish uses it, the folks in Norway do). Even tho it works at del.icio.us, for some reason that character eventually gets corrupted by blogger when entered in the Link Field (has nothing to do with the scripts) but I haven't found a reason why it and no others seem to be affected. Umulats, accent marks, even japanese/chinese characters seem to work ok, but the o with a line through it (there has to be a name for that charachter huh :-) seems to be problematic on bloggers end in the link field.

Lemme know if you're still having an issue.

blogonaut said...

Your magic worked again! :) Loads of thanks.

I think Blogger asked me (signing up) which language I would blog in, if Norweigan isn´t on that list it means they haven´t thought much about it -- I´m afraid that´s the only thing that I myself can think of, other than confirming that the character do exist :) and is pronounced just like our "ö". If I´m on a keyboard without native characters I would use "oe", most people would understand.

All best.
PS: and thanks again for the help with the greasmonkey technorati tagger!

Andrea Flanagan said...

Hello! I have another question for you. I tried pasting the script in the catagory post, republishing it and it still doesnt appear. also, when following step #4 where is says Insert post url here and Insert archive url here...I'm not sure what the difference is? Can you tell me the diff of the post url and the archive url? I think that may be the problem too.

Thanks so much, I appreciate your help!

Andrea

Andrea Flanagan said...

OMG suddenly its working.....not sure what I did right, but its working!

Thaks agian for putting this info together for all of us.

Andrea

blogonaut said...

I´m defeated, I have to admit it, I haven´t made it quite to the finish line and I doubt I´ll get there on my own since I´ve been running back and forwards now for a while... #9... almost there... just that my categories are wondering off to the right instead of replacing the post-title...

If you don´t mind, when you have a moment to spare or just want a laugh...

It´s datorliv.blogspot.com

cheers!

blogonaut said...

Question: you describe in the configuration page how to use the var del CommonTag feature (thank you!); I wonder if this has anything to do with, or may affect, the delicious tag bundle feature?

Let me also thank you for pointing me to the delicious private saving feature in another article. Love the experimental stuff, right now trying to figure out what the other stuff in that section is about!

outofcontext said...

Thank you, thank you, thank you.
I've got a scattered group of posts on my blog and this really helps me organize it very elegantly. It gives a stranger the impression that I know what I'm doing. Your instructions were methodical and clear and it works. I haven't gotten into steps 7 and 8 yet, but will do so eventually.

phydeaux3 said...

blogonaut -

Have you got everything sorted, as I don't see any problem with it. Then again all those funny characters may be throwing me off. :-D

And about the delicious tag bundles/delCommon tag...there is no relation or conflict. The bundles are only used on the delicious end (They don't provide a feed for bundles) so you can use them to organize things if you want at delicious, but won't affect anything if you using the 'common tag' for your blog posts.


outofcontext -
heh..like that name. Glad it was helpful. That's all I'm trying to do here, give the appearance that I know what I'm doing. Sometimes I'm more successful than others. ;-)

Two Write Hands said...

I installed your category thingamajiggies to my new blog "Two Write Hands." Thanks for the tutorial. I love it, love it, love it.

Special Lady said...

Thank you for your easy to follow instructions. They were so easy that somehow maybe I missed something. All the basic functions work, but I can't seem to style the categories page. could you take a look at my code. Thanks. Stacey

http://testlady.blogspot.com

phydeaux3 said...

special lady-

I see two errors in your CSS which will be keeping the category page CSS from working. It's not in the CSS for the categories themselves, but before them.

Line 129
#content td{
padding: 2px;

Is missing it's closing }

AND a few lines down

div.poster {
font: 10px georgia, times new roman, times, serif;
letter-spacing: 0.09em;
margin-top: 5px;
margin-bottom: 15px;


IS also missing it's closing }

Both of those errors are keeping any of the CSS after them from working properly, including the category stuff. Fix both of those and republish,etc and your changes on the category pages should show up.

BTW, fixing those errors may cause something else to change. In my quick test it caused the calendar to jump out of position. I'm not sure if it will do that in the final result, but if it does it's because some of the CSS wasn't rendering as coded because of those errors. The calendar container may need a 0 left/right margin instead of auto after fixing.

If that doesn't do it let me know.

Special Lady said...

That was it, thanks! I'm so loving you for this. As you can see with the beginner mistake that I am new at this.

Another question, I keep getting this error message, Error:'d2bCurrent.1' is null or not an object, what else did I do wrong?

Special Lady said...

I not sure my comment went through earlier, but thank you for your help as you can see I am new at this missing easy mistakes. Everything is working now.

One other thing is that I am getting this error message:

Error:'d2bCurrent.1' is null or not an object

Do you know how to fix that?

phydeaux3 said...

Special Lady-

That error comes from having the 'category post' listed on the main page.

It's something I probably could have fixed but haven't as in actual usuage the category post shouldn't be shown on the main page. If you change the settings to show less posts on the main page for your test blog so that it's no longer shown, i think that error will clear up.

justacountrygrl said...

Hey there!
Thanks for this lil addition to blogger - I love it!
I've gotten everything set up in the side menu bar & it works... but I seem to be having trouble getting it set up in each post... it just won't show up. Any ideas what I may be doing wrong?

justacountrygrl said...

Ohhh Nevermind... it seems to be working now *lol*
Thanks again :)

phydeaux3 said...

justacountrygrl -

Glad it sorted itself, usually it's a matter of browser cache when they magically 'fix' themselves. ;-)

And a very nice lookin' blog you got too. Nice job!

Lisa B. said...

I was all ready to ask for your help, but then I decided to try one more time on my own, starting over from scratch ... but this time it worked!

What a wonderful hack!

phydeaux3 said...

Glad it worked out this time Lisa B. !!!!!

;-)

Special Lady said...

Thanks again, you were right. No more problems. You're a genius, but I think you already knew that.

speciallady.blogspot.com

ZoobieWa said...

I love the system, finally got it working. I tried the previous version with my template and it didn't work. Then tried this, still didn't work, so I redid the whole thing from scratch and ba-boom, it does. :) Now for my question:

I really like the del.icio.us bundle 'meta-category' idea. Do you think there is ANY WAY to get this to work on the blog so you can have categories with sub-categories underneath them?

I basically have all of my postings that sit in three basic areas, Writing, Photography, or Audio. Ultimately, each of those higher order structures would then be able sub-topics. Any ideas?

Stephanie Zhong said...

You are amazing...This is exactly what I've been looking for. Please disregard my earlier message about setting up categories and then not having them direct properly I fixed this problem.

BUT, I'm having trouble getting the Category Page to show the Topic. It's still showing "Category" no matter which one I'm on. What did I do wrong?

Thanks again,
Stephanie Zhong @ http://fabulouslygreen.blogspot.com

phydeaux3 said...

ZoobieWa
Glad you got it sorted. Looks good.

As far as the delicious 'tag bundles' I don't really see a way to easily incorporate them into this...I wish I could. The biggest problem is that delicious doesn't provided the 'bundles' in their JSON feeds, only the tags.

I kinda played around in my head how one could setup 'sub-categories', but I didn't like how I came up with to do it. The only way I could see was to make a lot more setup, which would complicate an already complicated process, so I've not pursued it any further. Maybe I'll have a strike of lightning, or someone else will crack the way to do it.. :-D

phydeaux3 said...

Steph Z

Looks good, glad it's working for ya.

As far as getting the 'Category' heading to display the selected category...a very small but critical error.

In your template where you setup the id of the tag around the post title, you did it correctly but gave it the same id as for the date header. So
[h3 class="post-title" id="delpost-date"]

Should be
[h3 class="post-title" id="delpost-title"]
I've replaced the greater than less than signs with [] here because they are easier in comments, but you see what I mean. You just gave the title the same id as the date gets. Change it and republish the entire blog and it should work.

One other thing I noticed while looking at yours, you have a couple of 'Tags/Categories' setup with a plus sign in the names, like Flooring+rugs and House+home, and those two don't seem to be working.

I would recommend not using the plus sign in the category/tag names, use something else, a - or /, I think & is ok too, but not +, some characters the scripts aren't setup to handle well, the plus sign being one of them because of the way delicious normally uses it. You can rename those tags at delicious to something else. Better to do it now before there are too many of 'em.

Looks good, nice looking blog.

blogonaut said...

Couldn´t live without this system, it is great. Loads of thanks again.

About our favorite subject, the scandinavian characters... there is a little bug somewhere and I don´t know where. My category tag Webläsare, which includes the a with two dots on (if it doesn´t come out properly in this forum), is tranformed to an arabic character, also with two dots on top. I keep resetting it, but it reoccurs. Neither my system or browser is set to handle arabic.

Haven´t taken myself time to look at my topic /categ page issue, been to lazy, but I see you´ve been working hard with similar stuff and it can´t be said enough what a good doer you are who gave us this hack AND is helping us out with the implementation.

Link post for the arabic/scandinavian issue is http://datorliv.blogspot.com/2006/06/installera-dc-0691-svenska.html

phydeaux3 said...

blogonaut -

Hmmm. Well let's clarify exactly where this is occuring.
I looked at the page you gave the link to, and for the life of me can't see where Webläsare is input for a category there.

Is it in the Link Field where you enter the name of the category for each post???? And if so, if you go back to the post editor is it in the LINK FIELD itself that the character is corrupted??? If so than it's like that other one, the o with the line through it, and I'm not sure what can be done. The scripts have no effect on the actual link field (at least as it's saved in Blogger) and it appears Blogger is choking on certain ones there.

I looked at the category Webläsare as far as the scripts are concerned and it appears to be working fine, even the posts categorized that seem to be having their link field input saved correctly, so maybe I'm missing where the problem actually is. If it's not the link field area, then point me at it again.

I'm glad to know about it, but not sure what to do as it's on Blogger's end. Also not sure why it seems to pick and choose which non-english character to scramble.

phydeaux3 said...

blogonaut-
Also just noticed something else in your blog.
On some but not all of your category pages, if there is only one tag/category for a post, it seems to be putting an unneeded , before the tags/categories, as seen at
http://datorliv.blogspot.com/2001/01/d2bwritecat.html?Blogger
The two posts with only Bloggar as the category show the unneeded comma, and in a few other categories it's doing the same thing.

I'm not sure why at all. I've not seen that in anyone else's implementation.
I'll definitely look into that to see if I can find out why, it's kinda minor I guess, but I don't like knowing it's doing that.
I'm not sure when I will be able to get to that, but will probably post a comment on your blog when/if I find out.

Also be watching this space before the weekend, I got a little change in behaviour I'm gonna announce. Nothing major, just something that people like yourself who are running the d2b system need to be aware of for the future.

phydeaux3 said...

blogonaut -

I believe I fixed the minor issue I saw and talked about in my last comment, explanation of it is in the changelog post
d2bChangeLog

It seems to be working in my tests without screwing anything up, but I'm still looking. And it seems you've changed your tagging around so it wouldn't have been a problem in your case anymore..i think. But anyway, I think it is fixed.

Lisa B. said...

Hi Phydeaux3, Lisa B here again with a question:

I'm interested in the "cloaking" script that hides the Category post and archives. Is it possible to use this for another page as well? I'd like to add a page of information to my "dog blog" that is not a regular blog entry--so I don't want it to show up like an ordinary post. The cloaking script seems to work by recognizing something in the Categories entry--is there anyway to use this on another page?

I've searched the Blogger help group archives and I can't seem to find anyone else who has come up with a cloaking method.

Thanks!

phydeaux3 said...

Lisa B-

The answer is no, but yes, well kinda not really. :-)

The scripts themselves aren't setup to 'cloak' another post besides the category page...BUT their method can be extended to another post if really needed.

Here's what I suggest first, that won't need any alteration. Make the new post with a date in the same month/year as the cateogry post (jan 2001 I believe).
That will make sure that it's archive is the same as the category post, so it will be 'archive cloaked' as well.

Now it still will be visible in the Recent Posts lists WHEN someone is looking at an ItemPage within 10 posts of it (if that makes sense). It was critical (to me) to hide the category page completely since it is dynamic and without selecting a category it displays nothing. This may or may not be necessary with your other post.
It will be partially hidden (no archive shown) but IF you want it to NEVER be seen in the recent posts list, well a little extra script could be worked up to do that easily enough.

So if you want go ahead and do it that away, and if you want it completely forever hidden let me know and I can work up the little snippet that would do it for it also. Just so you know I'll be out of town most of this next week so I'll don't know how much access I'll have for bloggy stuff, but in worst case when I get back I'll have the time to whip something up.

Stalingam said...

Thank you for the great blog hack phydeaux.
You are the chosen one to deliver categories to hapless bloggers like us.

I tried to install it but was only partially successful.

So now when I click categories it shows categories but only the headlines of the post and not does not display the post

Please do look at it in your free time and let me know where do you think I went wrong ?

Regards

Stalingam

Stalingam said...

Do you want me to mail you my template in a notepad document ?

Thanks for everything

Stalingam said...

When the revolution comes you will be rewarded :)

Stephanie Zhong said...

Thanks for the suggestion Phydeaux--my category headings are now working properly.

As for your note about my tags/categories being weird, where in my code did you see this? I changed them to hyphens from +'s in del.icio.us, but I guess there's something in my template that also needs changing?

I know for example, that the following categories come up empty when clicked:
Commercial-design, Conferences, Fashion, Fair-trade and others. Weire since some of these were working fine and I haven't added entries to some of these categories in awhile. I'm sure I must have accidentally knocked something.

Link: http://fabulouslygreen.blogspot.com

Thanks! Steph Z.

phydeaux3 said...

Stalingam -

It looks like you figured it out about adding the 'notes' section at delicious. And nice to know when the revolution comes I'll get what's coming to me..or is that bad? :-)

But there is one problem that may be occuring with the code you have, it seems to be a problem in Firefox, and only sometimes. I'm looking into it, and will update you when I got it fixed, as you'll probably need to update the code you put into your template. See my next response for why I can't do more right this moment.

Steph Z-
As far as the + signs I was seeing, that isn't an issue for you anymore. This was when I looked back before you changed things at delicious (you were fixing them when I was looking I think) so that bit isn't an issue now.

As far as those few categories not showing up, I'm not totally sure. I'm seeing a little odd behaviour and it may be with a slight code change I made, although I'm not totally sure yet.

Unfortunately I'm out of town right now and time is an issue so I can't look into the problem much deeper. I'm getting back home tomorrow night and will have more time then and will hopefully get it figured out where the problem is. Right now, I don't think it's anything on your side (It looks like you have everything setup correctly) so give me a day or so to try and sort out what the deal is and check back.

phydeaux3 said...

To Steph and Stalingram -

Update on my last responses - the weirdness we are seeing with some categories may (repeat MAY) be with delicious. I'm seeing some odd and sporadic results in a previously clean copy of the code, and when the categories aren't listing, I'm getting this error message from delicious in the javascript errors..
Internal Error
Apologies, it seems something is horribly wrong with our code. etc....

So it may be a (temporary)problem with the delicious JSON feed. Like I said I'll look into it further when I get back home. Hopefully by then it will be resolved.

phydeaux3 said...

Update #2 -

It is a problem at delicious. I'm getting the same error sporadically with another category system FreshTags looking at blogs using it, so it's apparently not our d2b bit causing the issue right now (phew). I would imagine it will get fixed at delicious soon, but I'll keep my eye on it when I get back.

Update #3 - I'm back...and it looks like everything is sorted now. I'm seeing no problems loading any categories now so I believe everything is fixed at delicious.

Stacey said...

I love this idea and am trying to make it work - I think the problem is in my links to my post/archive posts. It will post to delicious but it is with a strange title, not my blog info. My archived posts don't seem to change when I click on an archived month, so I can't seem to get a permalink w/o "archive" in it. Other than that I think I have it all in and working up to step 9 - I just can't get the categories to show up in delicious....not sure if you could help at all!

Stalingam said...

Thanks
I did figure out later about the notes and
And yeah
the revolution will be a good thing as long as you are on the side of the working class.

phydeaux3 said...

Stacey -

Hmmm. It looks like you got everything setup just about right, like you said the problem seems to be getting the post in delicious correctly.

I think we can figure it out...

But the first thing I need to ask is, exactly HOW are you trying to post to delicious?? Have you created the 'post to delicious' link like in the installation setup (I can't see it if you have) or are you using some other way of posting to delicious??

That's the first thing that is puzzling me, I can't figure out how you got what you currently have at delicious, if you explain it in detail (what page, what are you clicking on, etc)then maybe the light will shine down. We can figure this out I'm sure.

blogonaut said...

Hi there,
many thanks for the look and initiated input. I haven´t been working on this since my last post but as time went on, I too concluded the ä issue in webläsare has to to with bloggers conversion of things put in the link field to URLs and nothing to do with d2b. I changed the category tags to non-native characters until I sit down and focus. Thanks to your fantastic help I have some work to do, so I better move on to do it instead of taking up so much of the space here - although grateful I´ve been welcome.

Loads of thanks again.

blogonaut said...

Hello again -- thanks for alerting me to the unneeded , I spotted it earlier on a post on the Firefox tag category page but couldn´t seen where the problem is located, reviewed the post Link field, the delicious tag, no result. Will have a look at your article now to learn more. I think this is a left over from when I started d2b and was using more than one category tag and sometimes misstakenly used commas when saving tags at delicious.
Thanks.

blogonaut said...

Ah! The June 22 change-log magic :) That gotta be it, I´ve noted that the common tag is not the last sometimes. Will change and let you know.

Now... I never intended to comment-spam you today. Sorry!

Missed in Action said...

Hello there,

I just finished to install and tune d2b, everything it's working just all right.

Let me tell ya that I've been looking for a way to create categories in Blogger, but no other is as good and automatic like yours.

Thanks for sharing your knowledge.

By the way, if sometime you would like to publish 'd2b installation & configuration' or anything else in Spanish to help non-english speakers, just let me know and I can help you (obviously the credits still be yours).

Well that's all for now. Thanks again.

Leon

phydeaux3 said...

Blogonaut-
Heh, no problem. On that common tag bit I am a little to blame if you were seeing the problem again. It WAS the placement of the common tag that was causing the extra separators that showed. I fixed it in the scripts, but then there were some problems so I was afraid it was in my changes, but turns out it was at delicious giving errors for about a day. And then it took me a few days to switch back to the fixed scripts. So anyways, at this point it shouldn't matter, the script is fixed so it whether the common tag is first, last or in the middle it should work. :-)


Leon - Glad it was helpful. Looks good on your blog too. A spanish translation, suppose that could be useful. But someone probably should fix my english first. Heh.

Sunita said...

hi phydeaux! thank you sooo much for your help with the categories. I have a question.. The categories (which i have named archives) appear on the left sidebar on the main page. However, when you go to any post page or the category page, the sidebar disappears! Is there any tag or something that will allow the sidebar content to stay on the post pages as well? Any help would be appreciated. Thanks!

phydeaux3 said...

Sunita-

Most likely that section is surrounded by the Blogger conditional [MainOrArchivePage][/MainOrArchivePage]
tags. Any content between those tags will only show up on those pages. To get it showing on all pages, find those and remove them, then republish the entire blog.

Usually the blogger templates have those around the archive section, so you probably added the categories stuff inside them.

Jenny said...

So glad I found this as I was beating my head against a wall trying to make categories for a friend's blog.


However, I have screwed something up. The Category Page and Category archive page are correctly cloaked in my sidebar, but the bullet (from it being in a bulleted list) is not. So I just have random bullets sitting out there, nothing to do, twiddling their thumbs. How can I get rid of them?

http://austinmama.com/austinmamablog/

Jenny said...

Sorry if this is a repeat: My category links are correctly cloaked, but the bullets are not. Not sure how to get rid of the bullets on the cloaked lines??

phydeaux3 said...

Jenny-

Ok, I finally see the problem. Took me several minutes before it became clear.
It's how you are setting up both the previous and archive ul lists.

You have them in a format like
[ul]
[li][div][a][/a][/div][/li]
[li][div][a][/a][/div][/li]
[/ul]

You have a div inside of each li element that contains the links. That's fine, but it screws up the cloaking script as what it does it look for the link, then it hides it's parent element (assuming the li will be the parent), in your case the div is the parent, it's hidden but the li list bullet still shows.

Try setting up those lists without the div inside- shouldn't make them display any differently and should allow the cloaking scripts to nix the bullets also.

[ul]
[li][a][/a][/li]
[li][a][/a][/li]
[/ul]

Try it out and lemme know if it works.

Jenny said...

That fixed it, thank you so much!

La Dee La said...

Thank you for such a great way to do this!

I think I followed all your excellent instructions through step5.

The "categories" title shows up, but there is no list. I also put the cloud at the bottom, same problem.

phydeaux3 said...

la dee la-

Two problems in the same area. Where you setup the urls for the category post and archive post, you've cut off the opening ' mark.

So it should be
var delTagPost= 'yoururl';
var delArchivePost = 'yourarchiveurl';

You got the ending ', just need the first one on each. Then save,republish the entire blog, make sure you're not caching the old results. Everything else looks like it's setup ok probably, but need those two fixed to know for sure.

Also, these are setup assuming the category post wouldn't be shown on the main page. You MAY get an error pop up in IE as long as it's showing on the main page, but everything should still work. Fix is to change your blogger settings so it's no longer on the main page, once you get a few more posts in you can set it to a reasonable amount so the 'category post' won't be published on the main.

If you run into more problems lemme know.

La Dee La said...

That fixed it, thanks! (duh)

And I'll make that category post invisible, I promise...

Disenchanted Dave said...

Hi, this is spectacular. It's almost exactly what I needed. I just have a few questions/requests.

1) Is there a way of making a post (similar to the "categories" post, or even the same one) that could have a giant tag cloud?

2) Is there a way to make the posted cloud have a different number of tags than the thing I put in the sidebar? I have a hundred tags, which is too many to put in the sidebar, but I'd like for them all to be accessible through D2B on a separate tag cloud page.

3) My impression is that this will only take 30 seconds for someone that knows javascript as well as you do. Because of my blog's situation, I'm interested in a simple Javascript bookmarklet that would help me take my existing tags (separated by commas) and prepare them for del.icio.us (i.e. spit out the same text, but with the commas removed). In case you don't want to start from scratch, I've included some code below that already has the right "skeleton," with inputs and outputs. If this script is at all difficult or you're busy, let me know.

Thanks in advance! Your code is amazing. I don't know if this has occurred to you or not, but you can combine your Greasemonkey technorati script (which is also amazing) with the insights that led to this bookmarklet (i.e. that technorati tags don't have to link to technorati) to make the technorati tags point to D2B categories pages by swapping in the category page URL plus a question mark instead of the technorati URL. I haven't implemented it at my real blog yet, but you can see what I'm talking about here at my test blog. I hope you like the idea.

Thanks again for the great code, and thanks in advance for your help.

Dave


Here's the code I have now:
javascript:(function()%7Bvar%20a='';var%20t=prompt('Enter%20Tags:','');var%20tr=t.split('%20');a+='%3Cspan%20class='+unescape('%22')+'technoratitag'+unescape('%22')+'%3ECategories:%20';for(var%20i=0;i%3Ctr.length;i++)%7Bif(i%20%3E%200)%7Ba+=',%20';%7Da+='%3Ca%20href='+unescape('%22')+'http://del.icio.us/didealist/'+tr%5Bi%5D+unescape('%22')+'%20rel='+unescape('%22')+'tag'+unescape('%22')+'%3E'+tr%5Bi%5D+'%3C/a%3E';%7Da+='%3C/span%3E';prompt('Copy%20this%20code,%20press%20OK,%20then%20paste%20to%20your%20blog%20entry:',a);%7D)()

phydeaux3 said...

Disenchanted-

#1 - Yes you can. Just make a post (probably backdated) and include only the code that writes out the tagcloud which is on the installation page. It will work in a post as well as in the template. At one point I had done that here, but eventually moved the cloud down to the bottom of the page, but it will work in a post.

#2 - A little more difficult the way things are setup. I do have a 'throttle tag' variable which will limit the number of tags shown, but getting it to work and limit the sidebar listing BUT also allow all of them to show in a post cloud...I don't see it off the top of my head. Of course it could be done, but I'm not sure how in relation to my scripts setup I could accomplish that. I'll think on it.

#3 Hmmm. Dunno. I'll have to take a closer look when I get the time. I'm a little busy with work at the moment but I'll take a look at it. The code you posted didn't seem to publish completely here, but I got it all in my email notification so I'll take a look.

On the category 'tag's doubling as technorati 'tags' ...well yeah I'm aware that technorati tags don't have to point to technorati, but they DO have to follow a proper format to be indexed, and the category url format won't be reliably picked up by technorati (I tried it). A greasmonkey script could be modded to make them work for both (by switching the the href dynamically-so it would get indexed and still go to the category) but I've not gotten around to it.

Thanks for you comments and input, I'll look into those things when I get the chance.

treespotter said...

man - bit OOT -,

i'm not sure what i've done, but for some reason, the buttons on my site disappear? (the delicious/edit button). i've tried switching if off and on again from the console (for the quick edit), and republish, but still not. i'm using a new computer, it worked just now, but now it doesn't.

any ideas?

phydeaux3 said...

treespotter-

Well assuming nothing's changed on your blog (and I took a quick look and everything looks in order there)
my guess is either cookie or referrer settings on your new computer.

I assume both the quick edit (pencil) and the post to delicious links aren't working as they work off the same principle.

Those 'conditional' links require two things (outside of being setup correctly) to work. They use 3rd party cookies (your login is from blogger, but your site is in another domain blogspot) and some browser settings can keep 3rd party cookies from working. Also if your new comp has some kind of 'internet' security software (firewall, etc) they can also have their own cookie blocking settings. That's my initial suspicion that the cookies are being blocked (I've known of several people who's new comps had security software that blocked them).

Also a bit less likely is your browser has to send a proper referrer heading. Most browsers don't have a setting for this, although it can be turned off in Firefox but usually with an extension installed. Also I suppose some type of firewall could block those also, but I would verify the cookies first.

If you still can't find it, lemme know what browser/any sort of internet software you have and we may be able to pinpoint it.

Aditya said...

Hey, do you have a readable version of your codes hidden away somewhere? I'd sure like to have a look! Mail me the link if you can!
Thanks! :P

Aditya said...

The third comment up there (from you) says something about modifying the Magical Sheep Technorati Tag adder script to add tags pulled in from the link field as Technorati Tags. I remember telling you about the Link Field hack I came up with 2 months ago.

That seems like a viable option to use to accomplish this! What do you think? I'd be happy to change a few things if it serves a larger number of purposes! :)

phydeaux3 said...

Sorry for taking so long to get to your comments Aditya, haven't been feeling so well.

Yeah I'll send you a readable copy. Just don't laugh at my amateur stuff.

On the tagger, yeah it's not too hard to modify the tagger to take the link field input. Matter of fact I already have a version that does it. Just haven't released it for several reasons, mainly because I have some other options I may add to the tagger in the future, and figured I'd tack it on to that. Just haven't felt well enough to tackle it.

But if you want to modify the tagger and release a version using the link field go ahead. If you can sort through the mess I've made of it. :-)

ZoobieWa said...

Phydeaux. Have you done any changes with the code? For some reason it seems that apostrophe´s are not parsing through onto my page anymore. Many of my urls have a ´06.08.06- format, and now links are dying because the ´ is not coming through. Check it out on my blog.

http://jrharper.blogspot.com

phydeaux3 said...

ZoobieWa-

No, nothings changed.

You'll have to provide me a SPECIFIC instance of WHAT isn't showing WHERE before I can hope to help. As is I can't see a problem.

And I don't mind trying, but you'll have to keep in mind my time online is extremely limited right now, so it may be several days before I moderate comments through or have a chance to look.

karla nazareth said...

I don’t speak English well, but I’ll try because this “installation” didn’t work. I used until step#6 but no category appeared in my blog. Just the space “categories” but my tag from del.icio.us, don’t. What could be wrong? I’m really confused. Thanks.

ZoobieWa said...

Sorry about that double posting, I jut wasn't sure why it didn't show up.

Ok, what is interesting is that this USED to work just fine, but about 4-5 days ago I noticed that it didn't.

Go to: http://jrharper.blogspot.com/2001/01/category.html?%5Bp%5DModeling

You'll notice that all the images are dead. If you hover the top dead link you'll notice that it is: http://john-riley.net/sets/06.08.04-sophie_natural-002/contact_sheet.jpg

Now, if you go to:

http://del.icio.us/zoobiewa

and look at the same link, you'll see that the actual url in the 'notes' is:

http://john-riley.net/sets/'06.08.04-sophie_natural-002/contact_sheet.jpg

It seems that for some reason the ' before the date in the file name is not being sent through the category code. Are you seeing this? I've tried it in a few browsers.

phydeaux3 said...

karla nazareth
Step #3 doesn't look like it's been done correctly. Edit the category post and reinsert the script from that step and republish.

If that isn't it then I'm not sure.

phydeaux3 said...

ZoobieWa-

Ok, I didn't see the issue before because I'm using Firefox and the broken images don't display like they do in IE. I just thought you were only showing the post titles.

Good news and bad news. The good news is the d2b scripts are not causing the problem. But that's also the bad news, as I can't do anything about it.

The raw feed coming from delicious is where the ' is getting stripped out. And I have no idea why. If it worked before than obviously something changed on their end, probably an unintended result of some other change. But since it's on their side and gets stripped before the d2b scripts do anything with it, there is little I can do. :-(

I will say that using an ' in a web folder is asking for trouble. I can't remember if it's actually a valid character for a url but I don't think it is, and in any case it's one that different apps will probably handle differently when in a URL.

I'm trying to think of an easy way for you to fix this, and not coming up with much.
The easiest thing I can recommend is
1) Don't use apostrophes in any future uploads, like I said it's asking for problems not just here but if any other sort of program ever does anything with it. a-z 0-9 hyphens and underscores. Anything else gets you into the twilight zone, where different apps will handle them differently.

2)I assume you have access to the folders where you are storing your images (which are very nice BTW). What about mirroring them to a non-apostrophe folder. Basically copying the folder they are in and renaming it without the ', so you'll have two version/with/without so other links you have setup will still work if they are pointed at the ' ones, but would have a mirrored without ' that will work when delicious strips things out (and they may stop doing that at some point.whoknows) And then use the non-apostrophe folders for all future uploads.
Not sure how big an issue this would be, or if it might cause any other probs as I don't know how all of your links are setup on that outside server. But a mirrored non-' copy, and uploading all future images there is the easiest thing that pops into my head. Or if worse comes to worse turn off showing the notes in the d2b variable setups until it's sorted so only the titles show.

If you sort it out, I'd be interested in knowing what track you take. But after tonight I'll definitely be out of touch for the rest of this week and probably for a bit longer.

karla nazareth said...

thanks, thanks a lot.
now it works well, and it's beautiful.

komfo,amonan said...

Thanks so much. I successfully implemented your esteemed hack about a week ago. Of course, now Blogger has finally implemented tags of its own. Still, I learned a good deal in the process. Cheers.

Ramani said...

whoa..110 comments! d2b seems to have been quite popular and you have been the king of categories :)

Mark said...

Thanks heaps!

Post a Comment

Newer Post Older Post Home