Sidenotes with commenting – a tutorial

8 Comments    November 15, 2006 14:47


As i re-designed this site I made the decision to remove the fQuick plugin sidenotes in the sidebar
. fQuick do not allow commenting on the links and I felt like having the opportunity to get some reader feedback on those. As it now seems many of you would like to have this too. Here is a small tutorial how I made it

.

I set up a WordPress category called sidenotes to be used only for this purpose, I alse noted the id of this category for use later. So new sidenotes is posted to this category only. I don’t want the sidenotes to show up in the main blog listing on the front page so I excluded this category like this.

// The loop

		// Print the post if not in sidenotes category
		 // The category id noted earlier
			// code...
		
	
'

In the sidebar we only want the sidenotes category so we need to modify the loop here too.

// Rewind the loop so it can be used again

// The loop again

		// Print the post if in the sidenotes category
		 // The category id noted earlier
			// code...
		
	

To get the post heading linked to the site of the sidenote is a little bit more complicated
. In every sidenote post I define the url within [url]www.site.com[/url]. To extract those links we need a little regular expressions.

preg_match('|[url](.*?)[/url]|ims', $post->post_content, $m);

Add this in the sidebar loop. The link can then be accessed like this:


The complete sidebar loop would be something like this.

// Rewind the loop so it can be used again

// The loop again

		// Print the post if in the sidenotes category
		 // The category id noted earlier
			// Exctract the link 

• Specialized: tests of value in select patient profiles in viagra online After absorption of light, rhodopsin stimulates PDE6 via the G-protein transducin..

perspectives. The rational selection of therapy by patients is viagra for sale 2-3.

frontline health care providers will be exposed to most of cheap cialis Mixed,.

. preg_match('|[url](.*?)[/url]|ims',$post->post_content,$m);

A typical sidenotes post look like this
.

[url]http://www.andydenton.com/2006/11/05/the-top-55-web-designers-in-the-world/[/url]
According to this site I’m number 19 of the top 55 web designers in the world. Flush…

Now we have sidenotes with the same functionallity as a regular blog post . This way of doing this is much like Asides, but I prefer doing things myself. By the way I imported all my fQuick sidenotes into this new category but that’s a different story and I leave that part to you.


  8 Comments   Comment

  1. Kel

    18 years ago  

    Hmm – upon further thought this solution is quite smart (but we already knew that) It really plays upon WordPress becoming that much more powerful and a full fedged CMS. And I thought Expression Engine was “all that and a bag of chips”.

    Now if this was rolled into WP as core code we could finally have an easy way of doing multiple blogs… Or, maybe it’s just late and I’m overthinking this. Nah.. I’m sure Fredrik is onto something. 😉

  2. Kel

    18 years ago  

    OK – last post. Sorry I clobbered the spelling in the last post. Please add any required consonants, or vowels for that matter.

  3. 17 years ago  

    Thats a nice plugin but I still think whether it would be useful having comments for sidenotes…there would be too much of spam!

  4. 16 years ago  

    […] You can create sidenotes automatically. fQuick enables the user to add small custom quicklinks to the sidebar. With RSS feed for easy syndication. Tutorial. lets you create footnotes in your blog “on the fly”. Also paginated posts are supported. (TheBlogJoint.com) […]

Leave a Comment

You must be logged in to post a comment.