<xml><b:if cond='data:post.author == "XXX" '>
<data:top.authorlabel>
<a href="http://www.blogger.com/profile/YYYY" title="author profile">
<span class="fn">
<data:post.author></data:post.author>
</span></a><b:else>
INSERT REPEAT HERE IF NECESSARY
</b:else>
</b:if>
</xml>
"...what fools have written, what imbeciles command, what rogues teach."
Showing posts with label code. Show all posts
Showing posts with label code. Show all posts
Sunday, July 13
Blogger hack
If you haven't already activated draft.blogger.com, you should.I don't think that Blogger, or Google in general, makes errors very often. However, their "help article" on how to make an automatic link to the profile of a post's author in the post footer simply doesn't work. The XML of the link written by the script is parsed wrong. So, with the help of a forum tip, I made a custom little snippet of code to automatically display the profile of someone who posts to the Godless Columbia blog:
Wednesday, May 30
Blogger Template Hacks
I am definitely not a computer scientist, or even nearly so.
However, I spent quite a few hours learning some of the language involved in Blogger 3.0 (layouts), and I did some Google work and bastardized others' scripts to produce a website I'm proud of (given my almost-nonexistent programming background):
http://www.gatorfreethought.org/
The reason I'm posting about it is because I wanted to share the post template in order to make life easier for others. I put in a few HTML comments to make it easier to analyze.
If you find it useful, please let me know. If you have questions, though, you might want to ask someone else, since I'm a novice :-) Please comment.
Here is the template as a .txt file, and here it is as an XML file (probably want to R-click and "Save As").
However, I spent quite a few hours learning some of the language involved in Blogger 3.0 (layouts), and I did some Google work and bastardized others' scripts to produce a website I'm proud of (given my almost-nonexistent programming background):
The reason I'm posting about it is because I wanted to share the post template in order to make life easier for others. I put in a few HTML comments to make it easier to analyze.
If you find it useful, please let me know. If you have questions, though, you might want to ask someone else, since I'm a novice :-) Please comment.
Here is the template as a .txt file, and here it is as an XML file (probably want to R-click and "Save As").
Tuesday, February 13
Footer Buttons Code
I just spent a few minutes fooling around with notepad and came up with a nice template to help people install footer buttons for bookmarking and saving posts. You may notice the new buttons below each post as of today. If you aren't interested in modifying your template, ignore this post. See here for more on modifying Blogger templates.
Step 1: Copy the entire code (indented) below into Notepad
Step 2: Use the Find and Replace (CTRL-H) function to replace all "[" with "<" Step 3: Use the Find and Replace (CTRL-H) function to replace all "]" with ">"
Step 4: Use the Find and Replace (CTRL-H) function to replace YOURIMGSRCHERE with the root URL of the folder you will store all of the icon image files to.
Step 5: If you are in Blogspot, skip to step 8.
Step 6: If you use any other blogging platform besides Blogger, use the Find and Replace (CTRL-H) function to replace all "$BlogItemPermalinkURL$" with whatever tag your software (such as WordPress) uses to indicate a post permalink.
Step 7: If you use any other blogging platform besides Blogger, use the Find and Replace (CTRL-H) function to replace all "$BlogItemTitle$" with whatever tag your software (such as WordPress) uses to indicate a post title.
Step 8: (Optional) Use the Find and Replace (CTRL-H) function to replace "|" with a non-breaking space before and after the "|" -- use "& n b s p ; | & n b s p ;" without the spaces [if I try to type it out it immediately becomes a non-breaking space...]
Step 9: Use the Find and Replace (CTRL-H) function to replace "YOURSITEURLHERE" with your site's URL.
Step 10: Download all of the image files for the icons, and upload them to root URL of the folder you will store all of the icon image files to.
Don't change the filenames! If you do, you'll have to change each image file name in the code to match. Don't steal my bandwidth! If you do, the server manager will notice all the extra drag and cut off your image leeching.
I hope you found this a useful tool. If you have improvements, suggestions, or questions, comment on this post, or email me.
________________
Technorati tags: code, hack
Step 2: Use the Find and Replace (CTRL-H) function to replace all "[" with "<" Step 3: Use the Find and Replace (CTRL-H) function to replace all "]" with ">"
Step 4: Use the Find and Replace (CTRL-H) function to replace YOURIMGSRCHERE with the root URL of the folder you will store all of the icon image files to.
Step 5: If you are in Blogspot, skip to step 8.
Step 6: If you use any other blogging platform besides Blogger, use the Find and Replace (CTRL-H) function to replace all "$BlogItemPermalinkURL$" with whatever tag your software (such as WordPress) uses to indicate a post permalink.
Step 7: If you use any other blogging platform besides Blogger, use the Find and Replace (CTRL-H) function to replace all "$BlogItemTitle$" with whatever tag your software (such as WordPress) uses to indicate a post title.
Step 8: (Optional) Use the Find and Replace (CTRL-H) function to replace "|" with a non-breaking space before and after the "|" -- use "& n b s p ; | & n b s p ;" without the spaces [if I try to type it out it immediately becomes a non-breaking space...]
Step 9: Use the Find and Replace (CTRL-H) function to replace "YOURSITEURLHERE" with your site's URL.
Step 10: Download all of the image files for the icons, and upload them to root URL of the folder you will store all of the icon image files to.
Don't change the filenames! If you do, you'll have to change each image file name in the code to match. Don't steal my bandwidth! If you do, the server manager will notice all the extra drag and cut off your image leeching.
I hope you found this a useful tool. If you have improvements, suggestions, or questions, comment on this post, or email me.
[a href="http://www.blinkbits.com/bookmarklets/save.php?v=1&source_url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="blinkbits"][img src="http://YOURIMGSRCHERE/blinkbits.png" width="14px" height="14px" alt="Add to blinkbits" /][/a] |Hope you find this useful. Visit my sidebar, at the bottom, where it says, "Austausch" in order to pay me back, if you feel the urge to do so.
[a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&Description=&amp;url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="BlinkList"][img src="http://YOURIMGSRCHERE/blinklist.png" width="14px" height="14px" alt="Add to BlinkList" /][/a] |
[a href="http://blogmarks.net/my/new.php?mini=1&simple=1&url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="blogmarks"][img src="http://YOURIMGSRCHERE/blogmarks.png" width="14px" height="14px" alt="Add to blogmarks" /][/a] |
[a href="http://co.mments.com/track?url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="co.mments"][img src="http://YOURIMGSRCHERE/co.mments.gif" width="14px" height="14px" alt="Add to co.mments" /][/a] |
[a href="http://www.connotea.org/addpopup?continue=confirm&uri=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="connotea"][img src="http://YOURIMGSRCHERE/connotea.png" width="14px" height="14px" alt="Add to connotea" /][/a] |
[a href="http://del.icio.us/post?url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]"][img src="http://YOURIMGSRCHERE/add_delicious.gif" width="14px" height="14px" alt="Add to del.icio.us" /][/a] |
[a href="http://de.lirio.us/rubric/post?url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="De.lirio.us"][img src="http://YOURIMGSRCHERE/delirious.png" width="14px" height="14px" alt="Add to De.lirio.us" /][/a] |
[a href="http://digg.com/submit?phase=2&url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="post this entry to Digg"][img src="http://YOURIMGSRCHERE/digg.gif" width="14px" height="14px" alt="Add to Digg icon" /][/a] |
[a href="http://cgi.fark.com/cgi/fark/edit.pl?new_url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]&linktype=Misc" title="Fark"][img src="http://YOURIMGSRCHERE/fark.png" width="14px" height="14px" alt="Add to Fark" /][/a] |
[a href="http://feedmelinks.com/categorize?from=toolbar&op=submit&url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="feedmelinks"][img src="http://YOURIMGSRCHERE/feedmelinks.png" width="14px" height="14px" alt="Add to feedmelinks" /][/a] |
[a href="http://www.furl.net/storeIt.jsp?u=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]"][img src="http://YOURIMGSRCHERE/furl.png" width="14px" height="14px" alt="Add to Furl" /][/a] |
[a href="http://www.hugg.com/submit?url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="Add to Hugg: [$BlogItemTitle$]..."][img src="http://YOURIMGSRCHERE/hugg.gif" width="14px" height="14px" alt="Add to Hugg" /][/a] |
[a href="http://www.linkagogo.com/go/AddNoPopup?url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="LinkaGoGo"][img src="http://YOURIMGSRCHERE/linkagogo.png" width="14px" height="14px" alt="Add to LinkaGoGo" /][/a] |
[a href="http://ma.gnolia.com/beta/bookmarklet/add?url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="add this entry to Ma.gnolia"][img src="http://YOURIMGSRCHERE/magnolia.gif" width="14px" height="14px" alt="Add to Ma.gnolia icon" /][/a] |
[a href="http://www.netscape.com/submit/?U=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="Submit to Netscape: [$BlogItemTitle$]..."][img src="http://YOURIMGSRCHERE/netscape.gif.jpg" width="14px" height="14px" alt="Add to Netscape" /][/a] |
[a href="http://www.newsvine.com/_tools/seed&save?url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="Seed Newsvine: [$BlogItemTitle$]..."][img src="http://YOURIMGSRCHERE/newsvine.png" width="14px" height="14px" alt="Add to Seed Newsvine" /][/a] |
[a href="http://www.netvouz.com/action/submitBookmark?url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]&description=" title="Netvouz"][img src="http://YOURIMGSRCHERE/netvouz.png" width="14px" height="14px" alt="Add to Netvouz" /][/a] |
[a href="http://www.rawsugar.com/tagger/?url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="RawSugar"][img src="http://YOURIMGSRCHERE/rawsugar.png" width="14px" height="14px" alt="Add to RawSugar" /][/a] |
[a href="http://www.reddit.com/submit?url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="Add to Reddit: [$BlogItemTitle$]..."][img src="http://YOURIMGSRCHERE/reddit.png" width="14px" height="14px" alt="Add to Reddit" /][/a] |
[a href="http://www.searchles.com/links/add_link/?url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="post this entry to Searchles"][img src="http://YOURIMGSRCHERE/searchles.gif" width="14px" height="14px" alt="Add to Searchles icon" /][/a] |
[a href="http://www.scuttle.org/bookmarks.php/maxpower?url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="scuttle"][img src="http://YOURIMGSRCHERE/scuttle.png" width="14px" height="14px" alt="Add to scuttle" /][/a] |
[a href="http://www.shadows.com/features/tcr.htm?url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="Shadows"][img src="http://YOURIMGSRCHERE/shadows.png" width="14px" height="14px" alt="Add to Shadows" /][/a] |
[a href="http://www.simpy.com/simpy/LinkAdd.do?href=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="Simpy"][img src="http://YOURIMGSRCHERE/simpy.png" width="14px" height="14px" alt="Add to Simpy" /][/a] |
[a href="http://smarking.com/editbookmark/?url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="Smarking"][img src="http://YOURIMGSRCHERE/smarking.png" width="14px" height="14px" alt="Add to Smarking" /][/a] |
[a href="http://www.spurl.net/spurl.php?title=[$BlogItemTitle$]&url=[$BlogItemPermalinkURL$]" title="post this entry to Spurl"][img src="http://YOURIMGSRCHERE/spurl.gif" width="14px" height="14px" alt="Add to spurl icon" /][/a] |
[a href="http://tailrank.com/share/?url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="TailRank"][img src="http://YOURIMGSRCHERE/tailrank.png" width="14px" height="14px" alt="Add to TailRank" /][/a] |
[a href="http://wists.com/r.php?url=[$BlogItemPermalinkURL$]&title=[$BlogItemTitle$]" title="Wists"][img src="http://YOURIMGSRCHERE/wists.png" width="14px" height="14px" alt="Add to Wists" /][/a] |
[a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=[$BlogItemPermalinkURL$]&t=[$BlogItemTitle$]" title="Add to Yahoo: [$BlogItemTitle$]..."][img src="http://YOURIMGSRCHERE/yahoo.png" width="14px" height="14px" alt="Add to Yahoo!" /][/a] |
[a href="http://technorati.com/faves?add=http://YOURSITEURLHERE/" title="Add to Technorati Favorites"][img src="http://static.technorati.com/pix/fave/btn-fave2.png" width="80px" height="14px" alt="Add blogsite to Technorati Favorites" /][/a] |
[a href="http://www.technorati.com/cosmos/search.html?rank=&url=[$BlogItemPermalinkURL$]" title="View the Technorati Link Cosmos for this entry"][img src="http://YOURIMGSRCHERE/technorati.gif" width="14px" height="14px" alt="View the Technorati Link Cosmos for this entry" /]entry[/a] |
[a href="http://www.technorati.com/cosmos/search.html?rank=&url=http://YOURSITEURLHERE" title="View the Technorati Link Cosmos for this blogsite"][img src="http://YOURIMGSRCHERE/technorati.gif" width="14px" height="14px" alt="View the Technorati Link Cosmos for this blogsite" /]blogsite[/a]
________________
Technorati tags: code, hack
Subscribe to:
Posts (Atom)