Support » Fixing WordPress » Matt’s Acronym Script

Viewing 15 replies - 1 through 15 (of 17 total)
  • I would like it to. Started using it pretty recently. And manually is literally a PITA.

    Moderator Matt Mullenweg



    For 1.0:
    Copy that function into your my-hacks.php
    Below that put add_filter(‘the_content’, ‘acronymit’);

    Except that today I am brain-dead and it looks as though I fell off the log and missed the ground. LOL!
    Is there some option I need to set to have WP use the my-hacks.php file or some code that needs to be un-commented or something?
    Sigh. Sorry to be a pain…

    Craig, there’s an option in Options->general blog settings called hack_file. Set it to yes and that should do it.

    I would SWEAR on my goldfish’s grave that I looked at EVERY option.
    I did.
    No, seriously.

    thanks Matt.

    How come I’m the only celeb endorsing it by the way?

    Moderator Matt Mullenweg



    Good question. If you’re using it, leave a note on the script page please. 🙂

    I hate my server backend. still not allowing me to take a backup of the database…
    i m yet to become a WP1.0 noobie 🙁

    Is anyone else having a problem with this script in the my-hacks.php file?
    It works fine…it creates the tags, works like a champ. BUT, when I go to login, I get:
    Warning: Cannot modify header information – headers already sent by (output started at E:\webs\\wwwroot\movies\my-hacks.php:75) in E:\webs\\wwwroot\movies\wp-login.php on line 122
    I’ve done the fixes (acording to the Alex King post, and one other…basically commenting out a couple of lines) that supposedly gets rid of the Cannot modify header error…but I’m still getting it. If I get rid of the my-hacks.php file, I can log in again. BTW, this hack is the only thing in the my-hacks.php file.

    Tony, check for stray blank lines within your my-hacks.php file outside of the <?php ?> tags. If any exist, they’re causing the server to send headers before WP is ready, hence the errors. Get rid of them!
    I’m not sure if that’s exactly the problem you’re having, but the same thing happened to me once before in a similar situation and this is what fixed it. 🙂

    Heh. I already had one. In fact, it’s almost exactly the same. I don’t sort mine, and I put it in an external file “acronyms.php” and included it, it helps keep all my content filters separate.
    /me steals a few extra acronyms

    Well I’ll be…
    I had an extra line between the closing ?> of the function, and the line:
    <?php add_filter(‘the_content’, ‘abbrit’); ?>
    Got rid of that, and it’s fixed….

    What do you mean when you say “…my regular expression…replaces more acronyms”?
    Isn’t the number of acronyms only dependent on what you put into the array? (Sorry, I’m not a PHP guru…yet 😉

    Would you mind posting your code for your acronym thing onto the WPHacks page of the Wiki?

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Matt’s Acronym Script’ is closed to new replies.