WordPress: Adding stuff to your RSS feed

Categories blog, code

So you want to add stuff to your RSS feed? And by stuff I mean ads, links, text, dead cats etc.

Well it’s another add_filter() function based solution. Quick and easy by editing functions.php.

There is another more dirty way to do this but I wont get in to it now.

[cc lang=”php”]


Have you taken your picture?


‘;

return $content; }

add_filter(‘the_excerpt_rss’, ‘addStuff’);

add_filter(‘the_content_rss’, ‘addStuff’);

?>

[/cc]

Posting stuff that helped me and so I don’t forget :-)

WordPress: Adding delay between post and rss

Categories blog

The case here when you have a wordpress website and you’ve made a post and immediately realized that there is an error or some sort of mistake. The default setting here is not forgiving and the RSS feed has been pushed to all your readers. There is a hack to override this and add a custom delay.

Open functions.php on your theme editor

[cc lang=”php”]

function delay_post_on_feed($where) {
	global $wpdb;

	if ( is_feed() ) {
		// timestamp in WP-format
		$now = gmdate('Y-m-d H:i:s');

		// value for wait; + device
		$wait = '5'; // integer, this refers to minutes for the delay

		$device = 'MINUTE'; //MINUTE, HOUR, DAY, WEEK, MONTH, YEAR

		// add SQL-sytax to default $where
		$where .= " AND TIMESTAMPDIFF($device, $wpdb->posts.post_date_gmt, '$now') > $wait ";
	}
	return $where;
}

add_filter('posts_where', 'delay_post_on_feed');

[/cc]

Posting stuff that helped me and so I don’t forget :-)

glfx.js

Categories blog, code

glfx.js provides realtime image effects using WebGL

pure awesomeness check out their website, demo and source code

The moment our browsers acquire camera functionality, I can see flash going bye bye and app’s like photobooth for the mac having strong competition.

 

 

An end to negativity in our Community

Categories blog

I enjoyed Chris Williams presentation at JSconf, a call to action for ending negativity. I have to admit that I have been through that path myself resulting in sharp debates and heated arguments and wasn’t worth it most of the times. I agree on the part that tools will always be nothing else but tools  and not religions etc, but what about a little passion? I mean the reason we argue so much and slap each other on the face occasionally is because we love what we do. Then again doing it in the open always results in “chest pounding” and “mines better ” mentalities and that’s why I give the speaker “social-awareness” points. If you are going to argue you should do it over pints in the pub(or IM whatever is more suitable). I find this way far more constructive than flaming someone (fake)anonymously. I find that constructive feedback from peers is always welcome within the community; hence it about how you express yourself and the means you use to do so.
 
Also the logo beats the rhino and the silly cup of coffee so why not ;)
 

 

 

Augmented Reality

Categories blog, code

This is an old but fun application of augmented reality. Instead of a printed marker it identifies the human face as a marker and applies a 2D object. It was all written in flex so be patient, if you happen to want the source code let me know and I’ll mail it to you. I am just too lazy to post it online and start doing software support via the comments (for something I did for fun!)

funface

Does the name “Pavlov” ring a bell?

Categories blog

A philosophical assumption when it comes to the human personality is, quoting Dr. C. George Boeree

Uniqueness vs. universality. Is each person unique, or will we eventually discover universal laws which will explain all of human behavior? Again, more moderate positions are available: Perhaps there are broad rules of human nature with room for individual variation within them; Or perhaps our individuality outweighs our commonalities.

quoting wikipedia:

Uniqueness versus Universality

The argument over whether we are all unique individuals (Uniqueness) or if humans are basically similar in their nature (Universality). Gordon AllportAbraham Maslow, and Carl Rogers were all advocates of the uniqueness of individuals. Behaviorists and cognitive theorists, in contrast, emphasized the importance of universal principles such as reinforcement and self-efficacy.

Interestingly I witness universality dominant around me, even from a behavior point of view the deviations are thin or a are they getting thinner?!!!

…might come back to this topic some other time.