• Hello there.
    I am testing WP and I see a lot of cook hacks for the “my-hacks.php”. I was wondering in a new WP 1.2 install can you still use this feature or does it only work if you are upgrading from an old version of WP?
    Thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter Tek

    (@tek)

    Okay… well I didn’t have an upgrade, I just made it.
    So I just created an my-hacks.php file. I am trying to get that lj-hacks to work… (the one that shows and links to LJ users) and I keep getting the following message:
    Parse error: parse error in /home/tekwh0re/public_html/wp/my-hacks.php on line 2
    Everything looks okay… this is the begining of my hacks file… if I can get it to work I am hoping to use more. I am running version 1.2
    my file looks like this:
    <? php
    include_once('lj-macrofy.php');
    add_filter('the_content', 'ljmacrofy');
    ?>

    Any clue for help would be great! Thanks!

    There shouldn’t be any spaces or line breaks before <?php or after ?>. In addition, there shouldn’t be a space after <? in <?php.

    Thread Starter Tek

    (@tek)

    Thanks… I got it to stop giving me errors. Still could not get the Hack to work =(
    I really need to learn some PHP. Maybe moving over to WP will force me to learn. =)

    Tek, in miscellaneous options, select the “use legacy my-hacks support” (or some such).

    Thread Starter Tek

    (@tek)

    Thanks but I had remembered to do that. Still, nae luck.

    It should be noted you CAN decide to directly include things into your index.php file as an alternative to myhacks… myhacks keeps things ‘cleaner’ overall, but isn’t a requirement.
    -d

    Davidchait, should I do that? Do I just put it anywhere inside the index.php file? Since for some reason my checkbox next to Use legacy my-hacks.php file support won’t stay checked after I press “update options” – anyone else having this trouble in WP 1.2?
    (reposting this here since the other thread I used doesn’t seem to be visible from the main bulletin page).

    Dang, the site went down when I posted. tinuviel: you may want to try and go into the database and set the value for hack_file in wp_options to Y

    Hm. I didn’t have a hack_file row, so I inserted it copying the same attributes as option_can_override (since it’s also a N/Y option). I uploaded that, and check WP Miscellaneous options, and the Use legacy my-hacks.php file support still won’t stay checked after saving.
    The problem is that when I try to use LJ-auto update, it tells me Fatal error: Call to undefined function: ljautoupdate() in /[servername]/post.php on line 126. So I’m guessing it’s not reading the hack file… so I’ll do what Davidchait suggested and see if that works. *hopes she doesn’t screw up the post.php file*!!

    I inserted the my-hacks.php part of LJ Autoupdate into post.php, and relinked the require_once (“../wp-includes/class-xmlrpc.php”); line so that it goes to the right folder.
    However, now I’m getting the following error and I cannot for the life of me figure out why:
    Fatal error: Cannot instantiate non-existent class: xmlrpc_client in /[servername]/wp-admin/post.php on line 59
    The line it’s referring to is:
    $client = new xmlrpc_client(“/interface/xmlrpc”, “www.livejournal.com”, 80);
    There’s nothing relatively linked from there, from what I can tell… I mean, “interface/xmlrpc” mustn’t be on my server cos I don’t have any folders anywhere named that. So it’s ony LJ right? The problem is with xmlrpc_client, but I don’t know why… help please?

    Never mind the above post. I’d downlaoded the patched xmlrp file, but for some reason my browser had saved it as an HTML file instead of PHP and so had inserted loads of font tags and such.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘My-Hacks.php= Still work in new version?’ is closed to new replies.