Forum Replies Created

Viewing 15 replies - 226 through 240 (of 245 total)
  • Forum: Plugins
    In reply to: ShortStat

    You said you tried trackme…but trackme should plant *one* entry to your database.

    I’ve had problems with shortstat in the past, but I’ve always gotten it up and running again.

    I put my shortstat tracking code in wp-blog-header.php, that worked fine

    Thread Starter jalenack

    (@jalenack)

    It appears you are using an older version, maybe 0.5? Try upgrading to the latest version 0.61

    https://blog.jalenack.com/index.php?static=ajax

    That was a bug in older versions that is now fixed

    Thread Starter jalenack

    (@jalenack)

    I think I’ve got a stable version here (0.6). It’s installed without a hitch for most people. And it’s now got an admin panel. Also, doesn’t clash with Dunstan’s Time Since anymore..

    I’ve been using dreamhost for awhile now, they are very competant and cheap. They also have a very handy “1 click install” of wordpress available.

    Thread Starter jalenack

    (@jalenack)

    Sigh, another day, another update. 0.52 fixes problems with 0.5: one incredibly critical one where www subdomains would render it non-functional…

    nah…you can just run a filter through it…it’s a bit hacky but you can probably handle it: try this:

    function fix_code($buffer) {
    $str = (str_replace(" />", ">", $buffer));
    return (str_replace("xml:lang", "lang", $str));
    }

    and

    ob_start("fix_code"); where you want it to start.
    ob_end_flush(); where it should stop

    Thread Starter jalenack

    (@jalenack)

    New version 0.5 released…many fixes and a new feature!

    The Ajax Shoutbox

    Thread Starter jalenack

    (@jalenack)

    Yea, it’s in the plans…for now I’ve run into some problems with the AJAX stuff…there’ll be a new version soon, similar to the one actually in my blog as opposed to the one available for download. Also, it is fully fixed for safari

    Thread Starter jalenack

    (@jalenack)

    well in the latest version there is a css.php file in the plugin…that is where you can style it. It’s better that way so that if you deactivate the plugin you won’t be loading the css for it too.

    I think there are a few problems with css specificity in the current version vs. some templates…

    Forum: Plugins
    In reply to: Hooking the sidebar
    Thread Starter jalenack

    (@jalenack)

    [ edit ] ^^ that’s how I have it now… [/ edit ]
    macmanx, I searched the codex extensively before posting this…none of those current hooks are any good for this. And strange, I didn’t find the forum topic when I searched the forums…Still didn’t help me though.

    Do you think I could filter through wp_list_pages ();. It’s certainly hacky, but it may be the only way. I could also write it into the searchform.php part of the template…that would probably be fairly easy..

    Maybe I should just forget it and require that the users add the display-my-plugin function manually..heh

    Thread Starter jalenack

    (@jalenack)

    oh, thats understandable…

    this script checks every 4 seconds by default,

    you can change this by finding this line in fatAjax.php:

    setTimeout(‘receiveChatText();’,4000); //executes the next data query in 4 seconds

    Change 4000 to a greater length and it will place less stress on the server.

    I think future versions will have an admin screen to set this and many other things..

    Thread Starter jalenack

    (@jalenack)

    Thread Starter jalenack

    (@jalenack)

    Well, I’m glad to see everyone likes it so much…

    I’ve made a couple of fixes which are part of the download now…

    So, has anyone actually gotten it up and running? Or are you just admiring its beauty :-p ?

    Forum: Plugins
    In reply to: Including wp-config.php
    Thread Starter jalenack

    (@jalenack)

    Muahaha, I have completed it. I took a break to go outside and get some fresh city air when it came the solution came to me. See, I hadn’t realized that when the javascript file called the plugin, it was directly including it, and not going through wordpress. This had the effect of rendering $wpdb useless. So I managed to include wp-config.php after all. So, all systems are go now. I will definitely be releasing it this week, if not tomorrow. Thanks!

    Well now, the only thing I have left to work out is the hardcoded “wp_liveshoutbox”. So when I create the table, I have to create $wpdb->liveshoutbox , right? And then call it with the same thing. Is there anything I’ve missed?

    Right now if I try to call it with $wpdb->liveshoutbox nothing happens. I’m using the default table prefix and all, any ideas?

    Forum: Plugins
    In reply to: Including wp-config.php
    Thread Starter jalenack

    (@jalenack)

    Thank you alphaoide, that worked well with a couple touchups. Yes, I hardcoded the database name on creation of the DB…but I will correct that in the real release.

    The really weird thing is it still doesn’t work. I tried both the old way and the new (with $wpdb) way without enclosing them in functions (making them print to the top of the page), and both outputted EXACTLY the same text.

    Here is the old function:

    function getData($lastID) {
    $sql = "SELECT * FROM wp_liveshoutbox WHERE id > ".$lastID." ORDER BY id ASC LIMIT 60";
    $conn = getDBConnection();
    $results = mysql_query($sql, $conn);
    while ($row = mysql_fetch_array($results)) {
    $chat_user_name = $row[2];
    $chat_user_text = $row[3];
    $chat_user_id = $row[0];
    echo $chat_user_id." ---".$chat_user_name." ---".$chat_user_text." ---"; // --- is being used to separate the fields in the output
    }

    }

    And here is the new one.


    function getData($lastID) {
    global $wpdb;
    $sql = "SELECT * FROM wp_liveshoutbox ORDER BY id ASC LIMIT 60";
    $results = $wpdb->get_results( $sql);

    foreach( $results as $r ) {
    $chat_user_name = $r->name;
    $chat_user_text = $r->text;
    $chat_user_id = $r->id;
    echo $chat_user_id." ---".$chat_user_name." ---".$chat_user_text." ---"; // --- is being used to separate the fields in the output
    }
    }

    So it shouldn’t be a problem with that part of it.

    Here’s the other part of the script that deals with this function:

    if ($javascript == "yes") { getData($lastID); }

    and part of the javascript file:

    var GetChaturl = "/wp-content/plugins/live-shoutbox/live-shoutbox.php?javascript=yes";

    function receiveChatText() {
    if (httpReceiveChat.readyState == 4 || httpReceiveChat.readyState == 0) {
    httpReceiveChat.open("GET",GetChaturl + '&lastID=' + lastID + '&rand='+Math.floor(Math.random() * 1000000), true);
    httpReceiveChat.onreadystatechange = handlehHttpReceiveChat;
    httpReceiveChat.send(null);
    }
    }

    It’s very strange considering both functions print the same thing, but when you switch the old for the new, it doesn’t work. Any ideas?

Viewing 15 replies - 226 through 240 (of 245 total)