Forum Replies Created

Viewing 15 replies - 1 through 15 (of 28 total)
  • 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 small elements 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 small element it increases the font size.

    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.

    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.

    curl works 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 posts

    I’d imagine quite a few =)

    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 DFirefox

    Here’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 DFirefox

    your server (dreamhost?) doesn’t allow fopen() to open remote urls, so you will probably need to find something that uses curl instead.

    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 page

    it 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 title

    do you mean you want them sorted alphabetically?

    Forum: Plugins
    In reply to: Plugin: Smart link

    Perhaps 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.

    depends on what audience your blog has, but don’t forget the seasons are not the same in the northern and southern hemispheres 😉

    I also note that live-comment-preview.php generates a php error that prevents the script from working. Comment out line 24:$livePreviewDivAdded == false; (evaluates to false by default) and it works fine.

    This is tested… you need to use the addEvent function so you’re not stomping over the existing preview event. Replace function initWordCount with:

    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);
    }

    you’ll need to edit live-comment-preview.php, and the comment form for your theme — probably called comments.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.php add 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…

Viewing 15 replies - 1 through 15 (of 28 total)