Where magic lives

Tuesday, July 11, 2006

Very Easy Blogger Categories [Update]

As pointed out in the comments by Jenny my Very Easy Blogger Categories didn't seem to work.

The problem was an AJAX 'security' feature that prevents accessing URLs on a different server using an XMLHttpRequest object. In my opinion the restriction is not implemented very well; in this case the XMLHttpRequest object was forbidden from accessing URLs on a server that the creating script was actually retrieved from.

I have made a work around (the categories menu doesn't actually use AJAX any more but appears the same). Follow the instructions as before, but use this script tag instead: <script language="JavaScript" src="http://da.vidnicholson.com/blogtags.php?dom=1"></script>.

Labels:

30 Comments:

  • Hello David, thank you for your suggestions (sorry for my bad english, I write you from Spain). I want to ask you one question (I am not a programmer), you suggest to ad a code in which your URL "http://da.vidnicholson.com" appears. May I understand that I should replace your URL's name with mine's? Thank you.

    By Blogger Joaquín, At 9:07 am  

  • No, you should leave the code exactly as it is.

    By Blogger David Nicholson, At 10:55 am  

  • O.k., understood.

    By Blogger Joaquín, At 12:50 pm  

  • Hello David! I am dimitris from Greece and i have the http://siteseein.blogspot.com blog. I tried to use your categories but as you will probably see at the down left corner no categories are appeared. I used the updated code.

    Can you help?

    By Blogger Dimitris, At 2:27 pm  

  • I found out what I was doing wrong. Thank you very much!

    But I have a problem. Is there anyway for the greek to be displayed properly?

    In my blog I use ISO-8859-7 encoding. Is there any work around, please?

    By Blogger Dimitris, At 4:32 pm  

  • Hi, i´m starting a new blog now on daybyday.ezin.cz . I´ve tried many ways to make categories but your method find i best. But i have some problems. First: language encoding (czech language, utf-8). There is no way to avoid this (i must use czech chars) - maybe if u´ll provide source files for editing and i´ll publish "czech" version for me on my server. Second problem: Format of generated picture with category name. As you see in my first posts - title category name (under post title) is align more on the right (just because of shape of image). Third: Please, tell my how it´s possible that you have frame around photo but not around "category picture" in post. I´ve must to set ".post img->border-top/left/bottom/right: none;"... Finally: I´ve made some changes in my template and now it´s possible to write down CATEGORY in LINK line in CREATE POST. First i´ve deleted all parts of code that used <$BlogItemUrl$>. Then i´ve add in Post body (after Begin .post) in Item title (after <$BlogItemTitle$>) this line "< dt>< img src="http://da.vidnicholson.com/blogtags.php?tag=<$BlogItemUrl$>&r=204&g=204&b=204&font=3" />< /dt>" (without quote marks of course, maybe it will be better use something else then < dt>). But you can probably add this line everywhere in post body... So if you want contact me on ondrej.hrdy@gmail.com and sorry for my english.

    By Blogger TobiasRieper, At 7:37 pm  

  • hi david, thanks for the code. i tried it and while it successfully creates categories, i get a white (not transparent) square on every post. my blog has a blue background, so perhaps that is the problem?

    By Anonymous Anonymous, At 9:21 am  

  • No, it is definitely transparent; your style sheet is probably causing the problem. Try using the following code: <img src="http://da.vidnicholson.com/blogtags.php?tag=XXXXXXXXXXXX" style="border: 0px none ;" />

    By Blogger David Nicholson, At 8:57 pm  

  • hi david, i tried the new code but it still doesn't work. i realise that the tiny squares appear as all my posts load, but only remain if that post is categorised.

    By Blogger the merry maggot, At 9:12 pm  

  • I just went to http://themerrymaggot.blogspot.com and it seems to be working fine, you have only used one category name, but all of your posts are appearing in it. Can you tell me a bit more about what is not working how you expect?

    By Blogger David Nicholson, At 9:16 pm  

  • that's strange. when you click on the posts listed under 'beijing', do you not see a small white box above the photo (on the left)? this box does not appear in the other posts that have yet to be categorised.

    By Blogger the merry maggot, At 9:39 pm  

  • Every post that you have added the hidden image tag to seems to be categorised. Can you post a link to an article where you have hadded the img tag but it has not been listed in the category?

    By Blogger David Nicholson, At 10:35 pm  

  • i've no problems getting the posts categorised. it's just that in these categorised posts, a white square appears on the top - and i can't figure out what's causing it. if you click on one of the 04.2006 archived posts, you won't see this square. it also wasn't there before i added the category code to the beijing posts. would you know what's causing it to appear and how to remove it?

    By Blogger the merry maggot, At 3:15 am  

  • Hallo David, your script included your domain "http://da.vidnicholson.com" What happens if your site is not online? In that case the category funktion on my site will not work...?

    By Blogger ploppi, At 10:18 am  

  • Ok, now I see the problem (it only happens in Internet Explorer which I do not normally use). You can prevent it by modifying the style you use in your images you have only turned the border off, you may need to add padding: 0 to your style.

    By Blogger David Nicholson, At 11:46 am  

  • Jankanoo, you are correct, although I do intend for my site to stay online :)

    By Blogger David Nicholson, At 11:47 am  

  • Hi David,
    This is very cool, but (alas) I can't get it to work on my site.
    Help! What am I doing wrong?

    http://lifewithaspouse.blogspot.com/

    By Blogger AnnaQ, At 6:28 pm  

  • Hi David,
    I just sent you a comment saying that it doesn't work on my site, but now it does! I'm not sure what I did (didn't change any of the code). Maybe it had to do with refreshing/republishing?!

    Thanks for this great utility!

    By Blogger AnnaQ, At 7:19 pm  

  • This comment has been removed by a blog administrator.

    By Blogger Nicole, At 11:09 pm  

  • To delete a category you must go to every post in that category, and delete the hidden image, then wait 24 hours for the changes to take effect. If only the first word is showing try sperating your words with the + symbol, e.g. Shannon+in+School. Your individual posts will only be listed with their titles after they have been viewed through their permalink (click the time under each post). Hope this helps.

    By Blogger David Nicholson, At 11:16 pm  

  • Hi! I have some questions. I created some test categories, but how can I delete them if I don't want them anymore? Besides, I don't know why the categories just show the first word I given. And, when I click on the categories, the lists always include the blog title.

    Hope you can help me! Thanks!!

    By Blogger Nicole, At 11:16 pm  

  • I deleted the posts in the test categories. I think I have to wait until tomorrow. Thanks for you instant help!

    best!

    By Blogger Nicole, At 11:28 pm  

  • What if you rename or delete a post? Is that too covered by the 24 hour rule? At the moment I'm getting duplicate entries in the list for categories with renamed posts.

    By Blogger solanum, At 1:22 am  

  • Yes, your duplicates will be deleted within 24 hours - let me know if they are not.

    By Blogger David Nicholson, At 8:43 am  

  • I guess they should've been deleted by now, still there though.
    On a side note, would it be too much work to let us change the font type on the category-images? Verdana, Arial etc.
    Thanks.

    By Blogger solanum, At 3:54 am  

  • Double check that your posts that you have duplicate entries have actually been deleted. As long as my crawler gets a 404 error when it tries to access your URL (which happens about once per 24 hours) the entry will be deleted from your category list.

    As for the fonts, it can be done but it is a bit harder than the existing (ugly!) fonts. I'll look into implementing it soon...

    By Blogger David Nicholson, At 7:57 pm  

  • Solanum, true type fonts are now supported, see my original post for details.

    By Blogger David Nicholson, At 12:29 am  

  • Hi David.. Thanx for your Script I use it and I think it's the best!!
    But now I'd like to add to my blog the LightBox2.0 but if I do that your categories doesn't work..
    Can you tell me if there's a way to use it?
    Thanx a lot!!

    By Blogger Mabataki, At 5:08 pm  

  • Hi david, thanks a lot for your script, but i have a strange problem. (sorry about my english, i´m spanish)
    Yesterday i could see the categories, but only when i open one post and back again to the main page (with internet explorer). But today, using firefox, i can´t see anything.... the post is categorized but the box doesn´t appears... maybe i have to wait a few days ....??

    By Blogger zaebos, At 4:03 pm  

  • Hi David, yesterday i tried to use your script in my blog... after 2 o 3 tries i could see the post categorized and the box with the categories (but only when i open a permmalink and back again to the main page... ¿?... usin internet explorer ). now, today, i went to my page and the box doesn´t appears (using firefox). I have not made changes on the template but still cannot see the box with the categories.... maybe i have to wait a few days..??

    what do you think about??

    Thanks a lot for the script anyway and please, sorry about my english (i´m spanish and i have to impove a lot... ;) )

    that is the structure in my page:


    ... a lot of things...
    ... sidebar.....
    "here the tagbox code line"
    ...
    links
    ...
    "here the script code line"
    "the end of body tag"
    "the end of html tag"

    ... end¡¡

    By Blogger zaebos, At 4:25 pm  

Post a Comment

Subscribe to Post Comments [Atom]



<$I18N$LinksToThisPost>:

Create a Link

<< Home