Tip: , ,

Do you know how can I have a different sidebars for each page?
I use Custom Sidebars Plugin.

Custom Sidebars 1.0

Posted on 8-5-2012 | 7 Comments

Finally a mayor release, Custom Sidebars 1.0 is out! It has a lot of improvements, specially AJAX management. But AJAX relies on javascript, and becouse of that only WP3.3 installations could run the new version of Custom Sidebars.

So if your WordPress is older than 3.3 DO NOT UPGRADE YOUR PLUGIN.

If you already did, just downloading the version 0.8.2 everything should return to normal.

I really would like to explain all the improvements slowly, so I will take my time to update this post, until then, feel free to leave a message.

 

Get your captcha personalized

Posted on 19-4-2012 | , , , ,

Get your captcha personalized

This is my last dumb project which allows to trolling everybody, everywhere, writing whatever you want to say in a captcha:

Your Captcha Creator: yourcaptcha.com

I tried to make it as simple as possible, just write down your worst feelings in the input bar and press enter. If you like your creation press the down key to download your captcha.

Create your own captcha…

Front page on Carrington theme

Posted on 10-7-2011 | , , ,

Front page on Carrington theme

I have decided to improve my skills creating WordPress themes, and the only thing I was sure is that I would need a theme framework in order to be organized and have a solid structure. After having a look at the main frameworks, the chosen one was Carrington. The reason, you can get a quick idea of what it does, it acts like a proxy for template parts, so if you want your home page to have a different header, you just add a new file in the headers folder called home.php and Carrington pick it for you. You can almost forget about WordPress conditional tags and if statements and focus in developing.

But that does not always work. In my case, I wanted to have a static page as home of my site, to do so I went to “Settings” > “Reading” on my WP backend and chose the page I wanted to be the home page. I also wanted a new header for this new home page, so I added the “home.php” file to my headers folder, but Carrington just ignored it.

A useful WordPress hack if you continue reading…

Custom Sidebars Updated: Version 0.8.1

Posted on 5-7-2011 | , , , | 3 Comments

Custom Sidebars Updated: Version 0.8.1

Since yesterday we have a new stable version of our beloved WordPress, version 3.2 nicknamed Gershwin after a great jazz musician. It comes with a lot of nice features, a new brand administration area, huge performance improvements, security patches and bugs solved.

I’ve been trying the betas and RCs to be sure that Custom Sidebars is compatible but unfortunatelly the official version broke the sidebars selection on pages, because it fixed a misuse of the property “publicly_queriable” on custom post types that makes the pages be not “publicly_queriable” anymore. Since Custom Sidebars checked if the post type was publicly queriable to add the selection box to the edit form, it was completely dissapeared for much of you.

Anyway, everything can be fixed but death, so here you have a new version of the plugin that behaves as expected. Enjoy it.
To get the last version of the plugin, read the post…

Tip: New Eclipse Indigo

Posted on 24-6-2011 | , , ,

My favourite IDE has a new version and Git native support is in its features. Why don’t try Eclipse Indigo?

Easy pagination with Opencms

Posted on 15-6-2011 | , , ,

Easy pagination with Opencms

There is a famous rule out there called DRY (Don’t repeat yourself), and if there is one thing I have to code once and again in Opencms is Structured Content lists and their pagination.I will postpone the DRY way explanation of making structured contents lists for any other day and I will explain how to write a reusable robust pagination mechanism for Opencms.

The whole explanation is in the second page…

Custom Sidebars Plugin v0.8

Posted on 1-6-2011 | , , , | 98 Comments

There have been a lot of people contacting me about the Custom Sidebars plugin, it has reached +20000 downloads already. Some of them have told me about a bug, others about some possible improvements… Thanks to you all, I will try to listen to everybody to make a useful plugin.

In case you don’t know what this plugin does, Custom Sidebars allows a WordPress administrator to create all the sidebars that he or she may need and assigns them to a post or page individually. It also permits you to assign custom sidebars to the home page, category archives, custom post types, author pages… Long story short, Custom Sidebars gives you the control over your site’s sidebars.

Download Custom Sidebars plugin

Want to know what’s new? Continue

@font-face and Opencms

Posted on 18-5-2011 | , , ,

@font-face and Opencms

I’ve started to develop a new site in Opencms and this time I have free way to design it however I want, so I wanted to do something good looking.

The use of the CSS rule @font-face is not difficult, specially using the @font-face generator from fontsquirrel.com. You upload the font you want to use, and the generator transforms it in all the font formats that browsers use, and create a CSS code that you just to paste in your style file.

That way is how this blog is showing this beautiful typografy in its titles – WC Roughtrad by WCFonts.

All this is very easy, but when I tried to do the same in the new Opencms site I realized that It wasn’t working.

Discover my Opencms-fontface problem

Overflow hidden: Chrome against the rest of browsers

Posted on 15-4-2011 | , , | 3 Comments

Overflow hidden: Chrome against the rest of browsers

This is a problem that I have to deal with everyday at my job. We have some templates “ready” to display a 3 columns fluid layout and they were perfect until Google Chrome arrived, which displays the layout in a different way.

The idea is easy, we have two divs, one floating to the right and the other one, called container, makes the fluid part of the page. We don’t want the elements of the fluid div to wrap the right column, so the container has a right margin with the same or higher width than the right column. Inside the container, we use the same tactics to get a left column.

Why Chrome? Why? Continue reading…

Adding a select box to WordPress tinyMCE editor

Posted on 5-4-2011 | , , , , | 14 Comments

Adding a select box to WordPress tinyMCE editor

The process of adding a button to the wordpress editor is straight enough if you follow the instructions that there is in the WordPress Codex and in the the tinyMCE editor documentation. The first one explain how to hook into WordPress to define the name of your tinyMCE plugin and the path to the javascript that the editor calls. The second one define how to build that javascript.

Adding custom buttons to your editor is very useful when you are installing WordPress for a client and he asks about some functionality inside the posts, that would be very easy if the client knew something about HTML, like add a class to a div. If you put a button that create a div with that class you don’t have to explain any HTML to him, you just have to tell him “push the button”, anyway he won’t do it and he will call you asking “how can I….?” – Push the damn button!

But when I searched for adding a select box it wasn’t easy to find the info in the tinyMCE documentation, so I decide to write a tutorial to never forget it.

U always wanted to know this, keep reading.

Openmcs cms:info tag explained

Posted on 31-3-2011 | , , ,

<cms:info> is one of the most useful tags of the OpenCms taglib, but when I have a look at other’s code I can see that people prefer other ways to get the same results that this tag offers just writing one line.I think that happens because a lack of documentation and examples about it. Googleing a little about this tag you can find two main sources of documentation:

  • Opencms cms:info tag docs
  • Opencms cms:info tag tests

That is the original documentation packed with opencms, a really short explanation of some of the possible properties and a test for these properties where some of them returns the same result, so you can’t see the differences between them.

I think I made a better example where I explain a little bit how the cms:info tag works and where you can see those differences.

Some source code inside this post.

Opencms useful paths and urls

Posted on 28-3-2011 | , , , ,

Opencms useful paths and urls

This is the first post in my new brand site about technology and I hope you can enjoy it or at least you get something useful.

As a person who likes programming and technology, I like to read and write about the newest stuff, but nowadays I am working as a OpenCms programmer, and since there is not a great documentation and tutorials on the internet about it, I want to share the solutions I found to the thousand problems i found myself in with OpenCms.

One of those problems is related with the paths used to get some data in a jsp. The next list will make your life easier when you want to load some content, display an image, or link some url with opencms.

Interested abouts paths? Keep reading…

Tip: Eclipse for PHP

Posted on 26-3-2011 | , ,

It is really nice to use the Eclipse IDE for develop PHP apps. It features debugging, autocompletion, repositories handling… A professional way of developing PHP.

Tip: Try Firefox 5

Posted on | , ,

Firefox is releasing versions really fast and there are new features in every one: because it is fast and has nice plugins, Get FF5

Tip: Widget Entries

Posted on 12-3-2011 | , ,

The best way of handling dozens of HTML widgets is using the Widget Entry Plugin.

Subscribe to javimarque

Follow me on Facebook

RSS Delicious recommendations

  • HTML2PDF a easy html to pdf library for php
    This is an outstanding work that makes people working with php generate pdf files, and the only thing you got to know to format the pdf is knowing how to use HTML. […]
  • Scrolling Parallax: A jQuery Plugin | Jon Raasch's Blog
    Parallax is the best way of give depth to your web site. Background elements scroll at different speeds so they seems to be nearer and further. […]
  • Spritebox -
    A new webapp to create css easisly for your sprites image. Just upload or give the url of the image and select what parts of the sprites are individuals by an intuitive interface. You must try it. […]
  • 20 Tools for for Easier CSS Development
    Collection of tools to make your css life easier. Featuring button generation, animation helpers, sprites creator, font comparison... This post contains a lot of good stuff. […]
  • Illustrator and InDesign tools explained
    A compilation of tutorials that cover the most important tools for Adobe Illustrator and InDesign. Everything it's explained in a very visual way. […]