Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter razorharrison

    (@razorharrison)

    In testing it seemed to work ok, but my main concern was the impact such a change might have on potential upgrades or other plugins.

    In the end I used a timestamp(time) . $userip to create a unique user_login

    Beyond this I used the display_name as the occupation field and update it on the fly. The issue with this entire model is that once registered/created, the user_login name is a numerical value. However, I dont really use these user names as regular log-in name anyway, so should be all good.

    Any significant problems, crashes, etc, etc, I’ll update.

    Forum: Fixing WordPress
    In reply to: WP_Query Problem?
    Thread Starter razorharrison

    (@razorharrison)

    Again this issue was not a coding issue but a server memory error.

    Please change to resolved.

    Thread Starter razorharrison

    (@razorharrison)

    $numposts = $wpdb->get_results(“SELECT * FROM $wpdb->posts WHERE post_author = $user_id ORDER BY post_date DESC”); ?>

    Just in case anyone was wondering ! ??

    Forum: Fixing WordPress
    In reply to: sortby=modified
    Thread Starter razorharrison

    (@razorharrison)

    Sorry – I did know it was orderby.

    I’ve sorted out the issue. The actual problem was that the server host upgraded hardware over the weekend and reduced the amount of available ram to each client session. Thus, if you happen to do an orderby=and posts_per_page etc, I am restricted to only a max of 500 in anyone sql query. Any more than 500 and the thing bombs out ! ??

    Thread Starter razorharrison

    (@razorharrison)

    *bump*
    Come on guys – I know a couple of you here could answer both of these questions in two seconds.

    Thread Starter razorharrison

    (@razorharrison)

    Ok – in accordance with the precedent thus far of communicating with myself, I have managed to solve the issue.

    In this theme I am using Arjuna-x and I am very confident that for some reason this seems to mess up the comments.

    As such, the only solution in the comments.php file was the extract the user_id via e-mail and use that as the identifier to get the info I needed.
    The solution follows – for those who may be interested;

    <?php $user2get = $comment->comment_author_email ; ?>
    <?php //echo $user2get; ?>
    <?php $userid = get_user_by_email($user2get); ?>
    <?php $thenewid = $userid->ID; ?>
    <?php //echo $thenewid; ?>

    <?php
    global $wpdb;
    $user_id = $thenewid; //change this if not in a std post loop
    $where = ‘WHERE comment_approved = 1 AND user_id = ‘ . $user_id ;
    $comment_count = $wpdb->get_var(
    “SELECT COUNT( * ) AS total
    FROM {$wpdb->comments}
    {$where}
    “);
    $user = get_userdata($user_id);
    $post_count = get_usernumposts($user->ID);

    ?>

    <?php echo $comment_count + $post_count; ?>

    Love to all !

    Forum: Fixing WordPress
    In reply to: WP_Query Problem?
    Thread Starter razorharrison

    (@razorharrison)

    Thanks Zeo. I know that both methods should work but believe one of my plugins must be messing up the global variables.

    To resolve this issue, I filtered the results where they spit them out by fetching the parent category and not displaying them if they fall into any other cat.

    If anyone is interested, the code is;

    <?php $category = get_the_category(); ?>
    <?php $parent = get_cat_name($category[0]->category_parent); ?>

    <?php if ($parent == “FOO”) { ?>

    @ The Living Legend,

    One of the points is that if you are to put – ob_start(); AFTER the <?php = so it would be the second line, then you SHOULD get a heap of errors. Once you have identified what those errors are, you should be able to fix the problem. Or at least post them here and we can have a look at it.

    As for wordpress letting you down, I find you comment interesting. I’ve worked with heaps of different solutions and honestly I doubt you’d find a better, more powerful solution in the OS community. And I’ve worked with HEAPS.

    The_date is only for THE FIRST post in a loop, and ignores all the rest. That’s why you must use the_time.

    This is applicable in single.php or any customised loop.

    Hey. Im pretty confident I can help you resolve this issue.

    IMO it’s a header issue. I had the same problem months ago.

    Firstly, check your functions.php for spaces at the begining and the end of the file. Any white noise could be causing this error. IF you find any, delete it.

    But if this dosn’t work, try inserting;

    ob_start();

    into the top of the functions.php file.

    Hope that works.

    Forum: Fixing WordPress
    In reply to: WP_Query Problem?
    Thread Starter razorharrison

    (@razorharrison)

    Nope. That actually returns posts from ALL categories, including others outside of 3.

    Thread Starter razorharrison

    (@razorharrison)

    LOL. No it wasn’t a css error at all. Was actually faulty php. Sorry, mark this as resolved, or delete it. Was my stupidity.

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