Forum Replies Created

Viewing 15 replies - 1 through 15 (of 15 total)
  • Forum: Plugins
    In reply to: WP CMS Hack question
    Thread Starter meatberg

    (@meatberg)

    sorry, didn’t measn to post this twice, not sure how that happened. oops.

    you can do a hack like this in query.php, around line 931, just above

    // Order by
    if (empty($q[‘orderby’])) :

    // Reverse Order Hack

    if (’17’ == ($q[‘cat’])) {
    $q[‘order’]=’ASC’;
    }

    if (‘7’ == ($q[‘cat’])) {
    $q[‘order’]=’ASC’;
    }

    if (‘4’ == ($q[‘cat’])) {
    $q[‘order’]=’ASC’;
    }

    if (’21’ == ($q[‘cat’])) {
    $q[‘order’]=’ASC’;
    }

    if (‘5’ == ($q[‘cat’])) {
    $q[‘order’]=’ASC’;
    }

    if (‘2’ == ($q[‘cat’])) {
    $q[‘order’]=’ASC’;
    }

    if (’37’ == ($q[‘cat’])) {
    $q[‘order’]=’ASC’;
    }

    i’ll add that in order to do this you need to strip out any formatting from the theme template i.e. no header, no sidebar.

    well, you could try this in each TC:

    <?php
    ini_set (user_agent, “blah”);ini_set (default_socket_timeout, “5”);
    error_reporting(0);
    $theurl=”https://www.theurl.com/blog/2007/11/02/the-post-or-category-slug/&#8221;;
    $filestring=file_get_contents(“$theurl”);
    echo “$filestring”;
    ?>

    and just replace the url with the url of the post you want to appear in iach table cell. it’s what i use but it does create a bit of a load on Apache, as per my earlier post.

    Thread Starter meatberg

    (@meatberg)

    this is a hosting-related issue. as otto42 stated, it does work using the correct URL. just not on my host’s servers. i should’ve checked it on another host before posting, sorry for that.

    Thread Starter meatberg

    (@meatberg)

    ok, this is a hosting related problem. the calls above DO work when tested on another server. i had a feeling but should’ve tested before i posted.

    Thread Starter meatberg

    (@meatberg)

    ok, so maybe i wasn’t clear:

    <?php

    include “includes/snoopy.class.php”;
    $snoopy = new Snoopy;

    $snoopy->fetch(“https://www.rocheleau.co.uk/category/bob/&#8221;);
    print $snoopy->results;

    ?>

    doesn’t work either (or using CURL).

    sorry if i misinterpreted your tone on your post…but telling someone they’re wrong (repeatedly), even in a text medium is still needless and unhelpful. anyway, thanks for the effort.

    Thread Starter meatberg

    (@meatberg)

    I’m not sure where the sneering, pedantic response comes from (I wasn’t challenging your response, just indicating my results), but the fact is that I changed nothing in my code (wrong as it may be) and it worked before I upgraded to 2.3, and I’m trying to understand why. Calling /category/whatever doesn’t work either (I tested this right off the bat), regardless of permalink structure. Of course, I may be doing something else wrong. However, I haven’t changed anything other than the upgrade to 2.3. I’ve tested it using c-U-R-L and it doesn’t work, either, where it did previously.

    If you want to help, help. If you want to be insulting, then please go elsewhere.

    Thread Starter meatberg

    (@meatberg)

    nope, it still doesn’t work, even with a known good category. you can try parsing it yourself. drop this into a .php file and load it up onto your server (you have to load snoopy as well):

    <?php

    include “includes/snoopy.class.php”;
    $snoopy = new Snoopy;

    $snoopy->fetch(“https://www.rocheleau.co.uk/?cat=1&#8221;);
    print $snoopy->results;

    ?>

    https://www.rocheleau.co.uk/?cat=1 is a known good category in a functioning 2.3 install. i SHOULD be able to call it using the code above, but can’t. i can browse it, but not call it. i can only call categores by acessing the feed with a parser, like https://www.rocheleau.co.uk/feed?cat=1.

    i can’t figure this one out. 48 hours on it and so far still no joy…

    Thread Starter meatberg

    (@meatberg)

    Adding that this isn’t restricted to Snoopy, it happens using c-U-R-L as well. so it’s not snoopy, not c-U-R-L, not my theme ( i don’t even use a theme other than a stripped out ‘classic’ index.php file). i can still parse and display categories using RSS i.e. https://www.rocheleau.co.uk/feed/?cat=1, but can’t call them as above. anyone??? this has me stumped and there doesn’t seem to be any info on this anywhere – someone else must be having the same problems…?

    Thread Starter meatberg

    (@meatberg)

    sorry, for post i used

    POST

    <?php

    include “includes/snoopy.class.php”;
    $snoopy = new Snoopy;

    $snoopy->fetch(“https://www.blahblah.com/blog/?p=11&#8221;);
    print $snoopy->results;

    ?>

    i can still browse categories and posts using this method, but can’t get snoopy to recognize when i imbed the call in a site page (i use WP as a backend publishing tool, just use the above code to call the content of a category or post into a page).

    Thread Starter meatberg

    (@meatberg)

    leflo,

    that works like a charm – very useful indeed. we downloaded the class and it took a moment to work it out. have run it by my host (they’ve decided to let CURL stand for the moment) to see if they can work with this. but the utility with snoopy is great for what we’re doing, as far as re-purposing our content. many thanks : )

    Thread Starter meatberg

    (@meatberg)

    hmm. looking at https://sourceforge.net/projects/snoopy/ now, and the wp-includes/class-snoopy.php file. not sure how i’d implement this, as i’m a novice, but worth looking into. i’ll give it a try.

    all i do is include the url of the post or category i want to appear in the .php file (using first fopen, then curl when fopen was nixed by the host). do you have an example of how you might do this using snoopy?

    Thread Starter meatberg

    (@meatberg)

    they’re running 4.4.4

    HTTP/1.1 200 OK Date: Tue, 12 Sep 2006 12:08:20 GMT Server: Apache/2.0.46 (Red Hat) X-Powered-By: PHP/4.4.4 X-Pingback: https://www.naturopathy-uk.com/blog/xmlrpc.php Status: 200 OK Content-Length: 275 Content-Type: text/html; charset=UTF-8

    They’ve been fine in the past, but this time I think it’s their problem, not mine. Maybe it is time to move.

    Thread Starter meatberg

    (@meatberg)

    please don’t tell me iframes. not IFRAMES.

    here’s the host’s note:

    Hi Rob

    I am really sorry about this but you need to change the pages on your site which use c-u-r-l immediately.

    We have been subjected to repeated hacker attacks & engineers have instructed me that they need to turn off c-u-r-l immediately.

    You need to make any changes now. If we do not disable c-u-r-l then there is a very high chance that the whole server will be taken offline.

    Please get back to me asap.

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