This is one of those routine web development things which you assume is inbuilt, but actually proves quite tedious to find a nice solution to.
Specifically, I am talking about converting something like ' to ‘ or & to & directly in Javscript.
This function does exactly that! Note how it adds a function to the prototype for String, so is called in the following way:
"Hello José".unescapeHtml()
Find the code here: paul schreiber » Blog Archive » JavaScript: how to unescape HTML entities.
I use Wordpress with qTranslate, but I needed to have multilingual META tags which qTranslate doesn’t support – so I wrote a plugin to do the job myself. It’s pretty basic, but I thought I would share in case anyone else needs something similar.
Plugin can be found on Wordpress’ Plugin site here: qTranslate Meta at WP Plugin Directory.
The name says it all, if you use NextGen Gallery and have problems with GD thumnbnail generation, you might want to consider upping the PHP memory limit. You probably already suspected it, and it can be done by simply uncommenting one line of code.
Link here: Thumbnail Generation PHP Memory Limit NextGEN Gallery » Visser Labs.
So this is just a small site I built as part of my undergrad coursework. The basic idea was to build any sort of publically “useful” mashup using Ruby on Rails.
My idea is a simple site which aggregates a bunch of feed URLs, picks the most popular keywords among them all and them displays them in a cloud. Also, user interaction alters the scoring so that things keep updating themselves as people use the site.
Anyway I know it’s not much, but having this link here might help it’s ranking ever so slightly.. plus if you randomly stumble across this page, please do click so I can register some website hits
Thanks… What’s Buzzing Malta
So I was having this problem where WordPress would display a blank editor for large posts when viewing visual mode. I could get it to work by using the HTML view and refreshing the page, but never in visual mode.
Anyway turns out to be the result of some modest PHP pcre regex defaults. Thankfully all it took was changing a few setting in PHP.ini. A bit thanks to the following blog post, which turned a nightmare of a bug to find into a quick and easy fix.
Sudden empty / blank page for large posts with WordPress | Under My Hat.
So I’ve been building my first Ruby on Rails site for an assignment. For hosting, I’ve found Heroku which seems absolutely lovely. They have a free service but if things keep going well I would gladly pay for an account there.
Anyway, I tried following the upload instructions on Windows through Aptana RadRails, and had nothing but problems.. mostly I blame RadRails, it’s letting me down more and more.
But I finally did find this great guide, which goes about things through Cygwin. I still use RadRails for development, then just run a few shell commands in Cygwin to get it uploaded. Anyway the link is below, and deserves major “props”.
Getting Started with Heroku on Windows : b#.
Enjoy!
So after upgrading to qTranslate version 2.5 I am not longer getting the validation error I used to get, ie meaning the small plugin is no longer needed.
Can anyone else confirm this?
A great effort to get people to switch from IE6: Let’s Kill IE6.
I couldn’t find the CSS for this anywhere, so here’s what I’m using.
Note: you will probably also want this image.
/* ============== */
/* Let's Kill IE6 */
/* ============== */
#letskillie6 {
width:400px;
background:#2A2A2A;
color:#CCCCCC;
font-size:14px;
line-height:18px;
position:absolute;
left:34%;
}
#letskillie6 #letskillie6_close {
background:url(images/letskillie6.gif) no-repeat 0 0;
float:right;
height:15px;
width:0;
overflow:hidden;
padding-left:15px;
margin:5px;
}
#letskillie6 #letskillie6_close:hover {
background:url(images/letskillie6.gif) no-repeat 0 -15px;
}
#letskillie6 .content {
width:100%;
margin:0;
float:none;
}
#letskillie6 .content .pic {
background:url(images/letskillie6.gif) no-repeat -15px 0;
height:73px;
width:55px;
display:block;
float:left;
margin:10px;
}
#letskillie6 .content p {
margin-top:10px;
padding-right:10px;
}
#letskillie6 .content p.browsers {
padding:0 10px 15px 10px;
}
#letskillie6 .content p.meta {
display:none;
}
#letskillie6 .content p.browsers a {
display:block;
float:left;
height:16px;
padding-left:20px;
margin-left:11px;
color:#A8C634;
}
#letskillie6 .content p.browsers a.ie8 { background:url(images/letskillie6.gif) no-repeat -70px 0; }
#letskillie6 .content p.browsers a.firefox { background:url(images/letskillie6.gif) no-repeat -70px -16px; }
#letskillie6 .content p.browsers a.opera { background:url(images/letskillie6.gif) no-repeat -70px -32px; }
#letskillie6 .content p.browsers a.chrome { background:url(images/letskillie6.gif) no-repeat -70px -48px; }
#letskillie6 .content p.browsers a.safari { background:url(images/letskillie6.gif) no-repeat -70px -64px; }
A great, cut-to-the-chase article I found about vertical centering with CSS.. enjoy
In the Woods – Vertical Centering With CSS.
So I wrote this code for allowing multilingual editing of the META fields when using Theme Hybrid (the “Hybrid Settings” panel on any add/edit post/page.
Here is the functions.php file, this should of course be combined with whatever else you’re using..
This is still an early version, so if anyone tries it out let me know if you have any issues/feature suggestions!
Download: functions-example.zip