Viewing 14 replies - 1 through 14 (of 14 total)
  • Jeremy,
    Is there something in your list of ABBRs that is the same as in the link?

    That link had “IE” in it, which the acronym replacer replaced with an acronym… you can take IE out of the acronym replacer as a workaround for the moment…

    Thread Starter scooter

    (@scooter)

    Yes, but my question is if there is a way to make sure it stops using it when // or / are somewhere near the ABBR.
    I know I could just remove it, but I would like to avoid that for now.
    Thanks,
    Jeremy

    Another problem with that code is that it breaks on recursive acronyms, like “GNU” (GNU’s Not Unix) or “PHP” (PHP Hypertext Processor). This can generally be worked around by changing the case of the definition. e.g. “Php Hypertext Processor”.
    Getting it to stop molesting links is a more interesting problem. You could take the approach I used (which I borrowed from Simon Willison) in my WordPress Text filters.

    Thread Starter scooter

    (@scooter)

    I’m still not sure how to attack this problem, I’m not really a PHP guru, so I can’t get around the code very easily. If anyone could help I would be very happy.

    scooter,
    It is likely that someone who can write a decent regular expression formula to parse out those characters will solve this problem.
    Colour me clueless in this department.

    To keep it from messing up links, just change your search expression so it requires a space (or other punctuation) around the acronym. It ought to be done that way to start with, I’d think (that’s how mine is done)

    Joel,
    Since I am a PHP noghead, can I assume that your definitions include the double quotes? So in the post you would have to write it as “HTTP” and then the function would acronym hack it?
    Sometimes the easiest way is not the first one thought of, eh? ??
    Craig.

    Not a space, but do a word boundry, \w.

    Matt,
    Could you expand on that, please?
    Craig.

    BUMPING a way old post that didn’t seem resolved:

    I’m using Matt’s acronymit function on myhacks.php (Running WP 1.2) Over the past two days I have encountered situations where acronym tags were triggered in URL’s. Having RSS and XML in the URL is something I can’t control. These are the addresses to other sites.

    As a quick fix, I deleted these two from myhacks.php, but I really would like to have them auto acronym these in regular text. Is there a hack, or plugin that differentiates acronyms from wrapping inside of URL’s???

    Thanks for any help.

    BUMP Anybody???

    https://www.huddledmasses.org/2004/04/19/wordpress-plugin-acronym-replacer/
    sorted out most of these problems with his version.

    elfin…THANKS!!! That works great!

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Photomatt’s ABBR Hack’ is closed to new replies.