alex

alex

Hello, I am Alex a software developer currently established in the north of Spain. At the moment I am studying communications engineering here in Spain, a career centered in software development and communications signals. I have been working on website development for many years now, you can see my portfolio in my main website.

Home page: http://urbanoalvarez.es

Posts by alex

Display previous/next posts in single, category… in WordPress

0

This is a really good option in WordPress, yet very few know how to do it. Well the code is relatively simple, and it gives a good navigation point for users that, if they liked your article, might want to keep reading your stuff.

If you want to plainly display the next post after the one the user is reading, use the following function:

 
< ?php next_post_link(); ?>
 

Now this function has several (very useful) parameters, which are:

 
 < ?php next_post_link('format', 'link', in_same_cat,
                         'excluded_categories'); ?>
 

Format: For example bold ('%link'), italics ('%link')... And so on, you can add here divs, p, span or anything you want to apply css classes or ids.

Link: To display a custom text instead of the post title, for example if you want "Next post" use:

 
< ?php next_post_link('%link', 'Next post in category', TRUE); ?>
 

in_same_cat: A very handy parameter if you want to display only the next post of the same category. Set to TRUE if you want it that way, or FALSE if you simply want the next post.

You can use one more parameter to exclude categories, for example:

 
< ?php next_post_link('%link', 'Next post in category', TRUE, '13'); ?>
 

And now the next post will be from the same category, unless that category is 13 (The id, check in the administration panel)

If you want to exclude multiple categories you'll have to use the "and" separator. It will work like this:
'1 and 5 and 15'
Note: If you are using WordPress 2.2, the concatenation method was a comma (','). So you would use:
'1,5,15'

Of course to display previous posts substitute next by previous, with everything else being the same.

Enjoy,

Use Firefox to spell check your website

15

If you maintain a website, you will surely know how important it is to never have any spelling errors in your copy. And if you really care you will always run for sure a spell checker on all your text, but isn't that quite over work? Wouldn't it be much simpler if your browser did all the spell checking without you having to worry about anything?

Well, there is a very simple way of doing so, simply copy the following javascript code and paste it into the address bar:

 
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0
 

If you find it useful, I recommend that you store that code as a bookmark, I call it Spell Check for example.

Note: I'm not sure whether this will work or not on all browsers, I have only used it on Firefox. And by the way, if you want to change the language right click over some text (Once the spell check was applied) and in Languages select another one, remember that you can download any dictionary that you might need.

This system basically makes all the text editable, and since Firefox automatically spells checks all user input (If you set the options to do so) it will spell check the whole page ;)

Cheers,

Bypass/Flash BIOS password:

0

Have you ever tried to access a computer's BIOS settings to find they are protected? Or maybe it was you and forgot the password. Either way don't worry since bypassing this simple password is as simple as following the following solutions:

Solution 1

The simplest solution, although it may not work on some computers. This solution is called a keystroke backdoor, and it bypasses the password check (Meaning that you won't change it or get to know it)

When prompted with the auth box, press:

Control+Shift+F8
Control+Shift+F8
Backspace
Enter

And if this worked you will enter normally the BIOS settings page. If you can't enter try a couple times to make sure or switch to the next method.

Solution 2

Flashing the BIOS, this might be dangerous if it is the first time you do it, but it shouldn't be a problem if you follow this steps carefully.
The easiest method of doing this is by removing the battery and waiting a couple minutes to ensure that it has completely turned off. Since the memory is ROM (usually flash memory), in the moment you take the battery off the data will disappear. Now put the battery back in place and switch the computer ON again.

There shouldn't be any problem, except for the time and date (You'll have to set it again).

You can flash the BIOS using the jumper you'll find nearby, but it depends on the manufacturer so I won't go into detail.

For other types of passwords you can check ScratchDrive for some good information and free programs, although I won't go into detail here.
Any comments or problems you find ask them below.

Cheers,

Easily assign an image to a post in WordPress

1

Have you ever wondered how to assign an image to a certain post using WordPress? Surely there are some plugins that try to do this, and maybe they accomplish it, but probably slowing down your blog.

Well, here is a way of doing it without slowing the blog or installing any sort of additional plugins. When you are done writing your post, upload an image to a directory that you will use for this, for example: "www.yoursite.com/post_images/". And I recommned that you name the image something that has to do with the post, it will help you if you need to edit it.

Now in the writing are scroll down until you see the tab "Custom fields":

Assigning images to posts

And fill in the following information:

Key: post_image
Value: image_name.jpg

The key must be always the same, in this example it will be post_image. And the value will be the name of the image that we uploaded. In the example it is assigning_images.jpg

And that's it for now. The next step is including this images into our template.

Add the image to the template:

As you can see under the tab Custom Fields there is a link to the WordPress codex, where they explain the functions we'll use for this, so consult that if you have any doubts.

So here is the code to display the image (It must be inserted inside the Loop):

 
if(get_post_meta($post->ID, 'post_image',true)){
	//There is an image assigned:
	echo '<img src="http://yourblog.com/post_images/'.get_post_meta($post-/>ID, 'post_image',true).'" />';
}
 

Note that if you copy and paste the code before you'll have to delete a / in $post->ID because WordPress is adding it automatically.
Of course this is the most basic approach, but hopefully you will understand the method and will be able to work on it.
At the moment I am using it to display thumbnails on the archive excerpts (They are not live yet, I'm still testing) and it is a very easy and fast way of doing it.

If you ever need to edit either the image or the meta-data simply re-upload the picture or edit the post.

Cheers,

Finally released the new design!

0

As you will notice if you knew this blog, I just changed the design, I am not quite done testing, but I don't care, I like the new design too much to keep it "in the lab" :)

This is not really an article, it's just me, happy, announcing it... :S

If you have any feedback I would love to hear some, bad/good, I don't care. Well, I do, but i want both so I can improve and feel good all together...

Thanks to all,
Alex

alex's RSS Feed
Go to Top