Monday, May 30, 2011

Wordpress Sitemap without plugin

For all of you who've got a Wordpress blog, and if you ever wondered if you could have a site map of all of your posts without plugin.

This is a handy script that does it.
I prefer not to install plugins if I can manage things in a lighter way, so I'm less updates dependent. Because the thing about using Wordpress is that you should update the Wordpress core and plugins every now and then (too often, to me)

This morning I've tested it on my Wordpress web site, and it works like a charm, here is how to do it:

  • Open your template folder
  • Open the page.php and save it as sitemap.php
  • Replace the Replace <?php the_content(); ?> line with the code you see down here:

Copy this code inside the sitemap.php file, replace the <?php the_content(); ?> withthe following code snippet:

<ul><?php wp_list_pages("title_li=" ); ?></ul>
<li><a title="Full content" href="feed:<?php bloginfo('rss2_url'); ?>">Main RSS</a></li>
<li><a title="Comment Feed" href="feed:<?php bloginfo('comments_rss2_url'); ?>">Comment Feed</a></li>
<ul><?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0&feed=RSS'); ?></ul>
<h3>All Blog Posts:</h3>
<ul><?php $archive_query = new WP_Query('showposts=1000&cat=-8');
while ($archive_query->have_posts()) : $archive_query->the_post(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
(<?php comments_number('0', '1', '%'); ?>)
<?php endwhile; ?>
<ul><?php wp_get_archives('type=monthly&show_post_count=true'); ?></ul>

  • In Wp-admin dashboard add a new page named: sitemap
  • In the Page Attributes box, choose sitemap  template and then publish this page. That's it!

Wednesday, May 18, 2011

This accesory is not optimized for this iPhone

Are you getting the message: This accesory is not optimized for this iPhone?
Well, this message pops up every now and then and the iPhone was over heating some times.
I'm happy because I repaired two phones today! My Sony Ericsson too!

Well, the iPhone thinks it is plugged into a device and you may have sound and battery problems too so the auto protect mechanism stops the normal use of the phone.

The problem is all the dust, dirt and crap at the bottom connector. I've just cleaned the iPhone connector carefully.

Here is the SIMPLE solution:

  1. Turn off the iPhone
  2. Spray some cold air to the bottom connector
  3. Take a toothbrush and put one drop of contact cleaner on it
  4. Brush out the dirt carefully
  5. Spray some cold air again
  6. Turn it on

It works perfectly!

Replace Lcd Sony Ericsson c510

I've got my new Lcd for the Sony Ericsson C510, here you can see how to dissasemble it and replace it, step by step:

1. Unscrew the back

2. Take off the thin blue layer around the camera
3. The back of the phone is disassembled

4. Now the front side, see? put your finger in the memory card hole it is easy

5. Take out the keyboard pad

6. Remove the LCD screen: CAREFUL!

7. This is at the back of the LCD screen, unplug everything carefully

8. The Sony Ericsson C510 is fully disassembled now: ready to replace the screen

9. Assemble everything back, make sure that everything is firmly pluged back in place

It works: my Sony Ericsson is brand new now!