tdw
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Bizarre problem!Using ems is the most reliable method for sizing fonts, keywords are the worst, and pixels don’t resize in IE . the css-d article points to Richard Rutters article, which IMHO is the best example of font-sizing using ems http://clagnut.com/blog/348/
The problem you are having is you have a number of
smallelements which are not closed (missing</small>), and your css includes:
small {
font-family: Arial, Helvetica, Sans-Serif;
font-size: 1.1em; <-- increases font size
line-height: 1.4em;
}So, every time your code hits a
smallelement it increases the font size.Forum: Installing WordPress
In reply to: Word-file (.doc) from wordpress?word documents are binary documents last time I looked… that’s why when you open them up in a text editor they contain gibberish characters everywhere. Here one lead:
http://www.webmasterworld.com/forum47/2732.htm
Your best bet is probably creating an RTF document from your post which word will open. I think there is not a plugin for that, so I might make one, give me a few days.
Forum: Plugins
In reply to: Wht does running PHP as CGI really mean?I don’t know what plugins won’t work with Dreamhost, but when trying out new plugins just search for fopen() in the code and check if they try opening remote files… if so, you will know that it won’t work.
curlworks and if you’re after a delicous plugin this one looks like a good choice:http://linuxbrit.co.uk/blog/2004/10/01/wordpress-delicious-plugin-10/
Also looks like a plugin manager using curl is a good project for someone to write =)
Forum: Plugins
In reply to: Plugin: Fuzzy recent postsI’d imagine quite a few =)
Forum: Fixing WordPress
In reply to: seems like css isn’t working in ie 5 for mac, formatting wrong…A link to the site you want to compare the screengrab to would be helpful.
CSS is what controls the how your web site looks, not PHP. IE5 for the mac has a number of problems rendering modern designs, and unless you have a lot of users in your target audience using it, you are probably best to not worry about it…. unless you want a crash course in CSS. I recommend you google for positioniseverything and css-d as a couple of places to get started.
Forum: Plugins
In reply to: WP RSS DFirefoxHere’s some code that works with dreamhost…
<?php
/*
Plugin Name: Firefox download counter
Description: Shows the download counter of Mozilla Firefox.
use: <?php echo ff_counter(); ?> anywhere on your page. your can also pass a sprintf str .
*/
function get_ff_count() {
$ch = curl_init('http://www.spreadfirefox.com/download_counter.php?ff=1');
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
$xml = curl_exec($ch);
curl_close($ch);
if($xml) {
preg_match( '@(?:<description>)([0-9,]+)(?:</description>)@', $xml,$match);
return $match[0];
}
return false;
}function ff_counter($outputstr = null){
if(is_null($outputstr))
$outputstr = '%s people have downloaded Firefox.';
if($count = get_ff_count())
return sprintf($outputstr, $count);
return false;
}
?>Forum: Plugins
In reply to: WP RSS DFirefoxyour server (dreamhost?) doesn’t allow fopen() to open remote urls, so you will probably need to find something that uses curl instead.
Forum: Fixing WordPress
In reply to: how to reduce queries?Running lots of queries is not neccessarily a bad thing – if you need to run them. It depends on the query. What is bad is repeating the same (or similar) queries when you don’t need to.
I’d be concerned with a plugin that needs more queries than the rest of my installation to run — chances are that WP has most of the info on hand already. What is the plugin?
Forum: Fixing WordPress
In reply to: Bad Request pageit looks like your permalink is not being parsed properly. Hover over the link and check your status bar – you’ll see what I mean – %post-id% is in the url.
Forum: Fixing WordPress
In reply to: posts by titledo you mean you want them sorted alphabetically?
Forum: Plugins
In reply to: Plugin: Smart linkPerhaps a the link title is metadata held by the target of the link… Should be easy enough to achieve with wp’s postmeta table. You then get the best of both worlds: an auto link based on natural language and additional link scent in the title attribute provided by metadata from the target.
Forum: Plugins
In reply to: Season instead of numeric date – ?depends on what audience your blog has, but don’t forget the seasons are not the same in the northern and southern hemispheres 😉
Forum: Plugins
In reply to: Live Preview Live Word CountI also note that
live-comment-preview.phpgenerates a php error that prevents the script from working. Comment out line 24:$livePreviewDivAdded == false;(evaluates to false by default) and it works fine.Forum: Plugins
In reply to: Live Preview Live Word CountThis is tested… you need to use the addEvent function so you’re not stomping over the existing preview event. Replace
function initWordCountwith:function initWordCount() {
if(!document.getElementById)
return false;var cmnt = document.getElementById('comment');
var cnt = document.getElementById('wordcount');if ( cnt && cmnt)
addEvent(cmnt, 'keyup',wordcount);
}function wordcount( )
{
var cnt = document.getElementById('wordcount');
cnt.innerHTML = numWords(this.value);
}Forum: Plugins
In reply to: Live Preview Live Word Countyou’ll need to edit
live-comment-preview.php, and the comment form for your theme — probably calledcomments.php.In comments.php add the code for your counter… it can be code of your choosing so long as it has an id:
word count <span id="wordcount">n/a</span>In
live-comment-preview.phpadd the following functions just above the event listener (about line 144) :function initWordCount() {
if(!document.getElementById)
return false;
var cmnt = document.getElementById('comment');
var cnt = document.getElementById('wordcount');
if ( cnt && cmnt)
cmnt.onkeyup = function() {
cnt.innerHTML = numWords(this.value);
}
}
function numWords(string)
{
string = string + ' ';
string = string.replace(/^[^A-Za-z0-9]+/gi, "");
string = string.replace(/[^A-Za-z0-9]+/gi, " ");
var items = string.split(" ");
return items.length -1;
}
add an event listener (about line 184):
addEvent(window, "load", initWordCount);This is untested, but it should work…