Oct 21 2009

Search the wordpress content management system database

WordPress is by far the most popular content management system for blog hosting. The wordpress content management system uses the mysql database. If you have a big site with a large number of posts then it can be handy to search the content of every post to find certain text. Sometimes you may even need to replace certain keywords with other keywords. As with most content management setups there is probably a plugin that will do just that, but it is far easier to just use basic sql if you know the structure of the wordpress database.
Within either phpmyadmin or mysqlyog (depending on what you are using) you can use this sql query to find the text that you are looking for:


select * from wp_posts where post_content 
like '%content management system%';

The ID that you get back is basically the page id. For example, if I query my database and get back an id of 13449 then that content will reside at http://codytaylor.org/?p=13449. Other useful columns are the post_content which is the content text of the post, post_name which is the title of the post, and the guid which is the full url (before mod_rewrite changes it) so you don’t have to copy and paste the id and append it to your url.

If you need to search and replace some text in more than one post then you can use this sql :


UPDATE wp_posts SET post_content = REPLACE (
post_content, 'content management system', 'CMS');

That SQL query will replace the ‘content management system’ with ‘CMS’.

Share

Apr 20 2009

Change Iphone Boot Logo. W/O Reinstalling Firmware

It has become really easy lately to change your boot logo on the iphone. Before If you wanted to get rid of that silly apple or odd pineapple then you would have to recompile your firmware and use quickpwn to reinstall. That is because, on the iphone and I would imagine ipod touch also, this image is stored in the boot loader. So it’s not as easy as just using scp to upload a new image to a certain directory.

Luckily an app has been released that allows you to replace the boot image on the iphone with any image you like. The iphone and ipod touch seem to like png images so I would recommend exporting your image as one.

The screen on the iphone is 320 by 480 pixels and your image can use every pixel. The iphone will not play animations during boot yet though.

So how to do it. As long as your phone is jailbroken and you have cydia installed on your iphone or ipod touch then you can just load up cydia and touch the sections button at the bottom.
After the list shows up scroll down to find the LogoMe entry. Touch it and then install it.

Once the application has been installed on your iphone or ipod touch then launch it from the springboard. You will be given the option of adding an image for the boot logo from either the web by providing a url or from the pictures that you have locally on your iphone. I used the web option and provided www.codytaylor.org/iphone/grumpy_ninja_iphone.png
Which looks like this:

ninja boot logo for iphone

ninja boot logo for iphone

Check the preview to make sure it looks good before you set it as the default boot logo for your iphone or ipod touch. After you’re satisfied that it looks good then hit the install button and wait. It took a bit for it to flash my iphone with the new image and hopefully it won’t take much longer on the ipod touch.
After the install process finishes then reboot and check it out.

I also put this one together:

ninja iphone boot logo

ninja iphone boot logo

Share