Archive for wordpress

A simple lookup tool for WordPress functions, filters, actions and more – wphit.com

// March 3rd, 2010 // No Comments » // wordpress

Last weekend I got a little bored of grepping through code and jumping between various sites to look-up parameters for functions in WordPress, so I just took the various sources I check most often ( The Codex, PHPDoc and the Source ) and linked them together using, you might guess, WordPress.

My main goal was to create something that is easy to integrate in my editor of choice ( Coda ) for direct look-ups, have a clean minimalistic design and provides some indexes for easy navigation between files, functions, methods, filters, actions and such.

The result can be found at http://wphit.com/lookup

It still needs a lot of loving, but I thought, I already throw it out there so at least I can use it. Please let me know what you think about it and if you have any ideas how to make it better.

Faux Facebook Connect allows Facebook users to comment on WordPress. MU compatible

// December 21st, 2009 // 29 Comments » // wordpress

I just released an initial version of a mainly JavaScript based Facebook connect plugin for WordPress to allow Facebook users to comment on a WordPress powered blog.

The script is build in a way that it can be activated also out of a theme context and does not perform any database alterations or manipulations on user tables. It simply uses the Facebook data to prefill the comment form and hides it once a Facebook user is logged in.

The initial idea for this procedure was taken from Beau Lebens and wrapped up in an easy to use WordPress plugin.

For more information check out the plugin page at: http://wordpress.org/extend/plugins/faux-facebook-connect/

Feedback Welcome!

WordPress Exploit Scanner

// December 14th, 2009 // No Comments » // wordpress

A while ago I started to work on the WordPress exploit scanner, which aims on finding possible exploits and unwanted code fragments in your WordPress installation. I initially rewrote a lot of code to merge in parts of a project I was previously working on as I thought it would be more useful to just have one project for this topic. I was happy that Donncha, who started this project agreed and added me as contributor to this project.

Today, I pushed out version 0.92 of this plugin which adds some minor speed improvements and a new pattern to detect a JavaScript virus discovered here.

I am currently still looking for new patterns for possible exploits and unwanted code and hope that we can also improve the speed and memory usage further.

If you have any suggestions for improving this plugin or find additional exploits and unwanted code in your WordPress install feel free to leave a note in the forums.

P2 customization night, creating a snippet library

// November 27th, 2009 // 2 Comments » // wordpress

After digging into P2 last evening I just got inspired and relaunched a old domain utilizing the new version of the P2 theme.

A customized P2 used as snippet library

A customized P2 used as snippet library

With some small alterations, a little design adjustments and some custom coding this theme is a great basis to create all kind of things. At Automattic we are using it on a daily basis and we all love P2 and after seeing the first version of it, I got tons of ideas what could be done with it. Ranging from Simple status updates provided per default via a snippet library which I just created in it’s basic form now to a full blown task manager.

I guess I will be playing with it a little more. Tons of good stuff you can do with it.

Go and check it out at http://sourcebench.com and let me know if you have any suggestions or questions.

Mention-Me sidebar widget makes it easy to follow conversations.

// October 31st, 2009 // No Comments » // wordpress

I recently added a small WordPress widget that allows logged in users keeping track of replies to posts or comments they made.
Apart of this it also keeps a track of @replies which include your display_name or user_nicename value.
This widget is mainly inteded for usage with P2, but might also serve well on other blog themes.

This is how the widget looks in action.
The configuration options for the widget



To install it on your blog just login to your wp-admin and go to “plugins” -> “Add new” -> “Search for mention-me” -> hit the “Install” button. -> click “Install Now”. Then activate the plugin.

After this go to the Appearance > Widget page and place the widget in your sidebar in the Design. It allows you to configure the title, select the amount of replies you like to show, the avatar size you like to use and whether or not it should be enabled for non-@replies on comments/posts you made.

For more information and downloading the plugin visit : http://wordpress.org/extend/plugins/mention-me

30 Boxes widget

// February 25th, 2009 // No Comments » // wordpress

Yesterday I added a small plugin to the WordPress plugin directory that allows embedding calendars by 30Boxes.com into your Blog.

I would be happy for any kind of feedback.

Fix Moveable Type Export with Metatag TAGS instead of KEYWORDS

// October 26th, 2008 // 2 Comments » // linux, wordpress

Sometimes a Moveable Type export puts the tags in a Metatag field called TAGS. Sadly this kind of export file does not preserve the keywords/tags when it is imported in Wordpress. Here is a little fix to get these TAGS converted to KEYWORDS.

cat original.txt | sed '/^TAGS/s/ /,/ig' | sed '/^TAGS/s/"//ig' > converted1.txt ;let lines=`cat converted1.txt|wc -l`; let lines=`expr "$lines" : '\([0-9]*\)'`; for i in `seq 1 $lines`; do line=`head -n $i converted1.txt | tail -n 1`; istag=`echo $line|grep -E "^TAGS:"|wc -c`; if [ "$istag" -gt 0 ]; then tags=`echo $line|sed 's/TAGS: \\(.*\\)/\\1/g'`; echo $tags; fi; iskeyword=`echo $line|grep -E "^KEYWORDS:"|wc -c`; if [ "$iskeyword" -gt 0 ]; then let tagline=($i+1); fi; if [ "$i" == "$tagline" ]; then echo $tags; tags=""; tagline=0; else echo $line; fi; done > converted.txt

Getting a sandbox theme running on wordpress.com

// October 15th, 2008 // 9 Comments » // wordpress

At wordpress.com you can get a great blogging platform with very reliable and fast hosting for free. It comes with some restrictions compared to the self hosted wordpress.org version. One of them is that you can not upload your own themes.

Luckily there is the custom css upgrade which allows an easy alteration of the stylesheet of the supported themes. Together with the sandbox theme this still gives you a lot of opportunities to alter your design and get some additional themes running on your wordpress.com blog.

For my blog here I have choosen Sandpress, a winner of the Sandbox Designs Competition

Getting such a theme to run in a wordpress.com blog is quite simple although it takes a little more effort than on a wordpress.org blog.

  • First off you need to pick and download a theme and unpack it on your local machine.
  • Next thing you should do is to make sure that all the image files are in one directory. So if the theme you have choosen has multiple folders for images, take all these images and put them in one folder.
  • Now you need to upload these images to your blog as described in the  FAQ
  • Then go to your media manager (/wp-admin/upload.php) and check for the url of your images (right mouse button and copy link location on one of the thumbnails should do the job).
  • The urls should have something like this structure http://BLOGNAME.files.wordpress.com/YEAR/MONTH/FILENAME for example http://snipplr.files.wordpress.com/2008/10/sandpress.png
  • Now we need to alter the stylesheet of the sandbox theme of our choice to fit the new urls. So we just need to open it with a text editor and make sure all the paths for url() items within the stylesheet are matching the new image urls. Usually main work will be done with a simple search and replace of “images/” with “/files/YEAR/MONTH/”
  • Now it’s time to activate the Sandbox-10 theme (this should be at /wp-admin/themes.php?pa=4 on your blog)
  • Once this is done we are ready to try the altered css file. No need to purchase the css upgrade right away, you can just go to /wp-admin/themes.php?page=editcss on your blog and paste the css file into the textarea. Select the “Start from scratch and just use this” option and hit “preview”.
  • If everything looks like expected you just need to purchase the “custom css upgrade” and you will be able to save the stylesheet and store it for your site.

I hope this is of any use for the one or the other blogger out there. It should be simple enough to get a lot of extra themes running and if you need any help just leave me a comment.