NineChime forum

Furry stuff, oekaki stuff, and other stuff.

You are not logged in.

Post a reply

Write your message and submit
Options
Humanity test

What is six + six?

Go back

Topic review (newest first)

Waccoon
11-26-2008 06:01:54

It's not terribly difficult to do.  As always, I just have to get off my butt and fix it.  I admit it's been a few months since I've done any coding.  At the earliest, though, it will have to wait until the weekend.

I have a board filled with immature children. sad Everytime I blink they do something else >_>

Making people admins is never fun.  But, yes, it's pretty trivial to lock people out of changing the big things, like the banner and notice.

Rage Inflictor
11-25-2008 21:23:25

Waccoon wrote:

Yeah... I'm not familiar with that chat system, so how it gets the chat count is kinda fuzzy.

:glomp: Thank you!! I used the information you gave me, and showed it to the phpchat people, and they were able to make it work!! All I needed to do was set a serverid.

Waccoon
11-25-2008 04:49:07

Yeah... I'm not familiar with that chat system, so how it gets the chat count is kinda fuzzy.

Rage Inflictor
11-22-2008 22:05:46

Thank you for helping again!

Everything works, no parse errors, but there is no number D:

Waccoon
11-22-2008 21:57:47

OK, I thinik this is a drop-in replacement for the "header.php" file (around line 140).  You may have to check the require_once() path so the "pfcinfo.class.php" file is included properly.

As always, make a copy of your header file just to be sure

Code:

SEARCH FOR:


if (!empty ($OekakiU)) {
    // Logged in
    if ($cfg['use_chat'] == 'yes') {
        $left_menu[] = '<a href="#" onclick="openWindow(\'chatbox.php\', 700, 500); return false;">'.$langop_word_chat.'</a> ('.$chatonline.')';
    }


REPLACE WITH:


if (!empty ($OekakiU)) {
    // CUSTOM: chat
    {
        // Get chat count
        require_once("chat/src/pfcinfo.class.php");
        $chat_info  = new pfcInfo( md5("Whois online demo"));
        $chat_users = $chat_info->getOnlineNick(NULL);
        unset($chat_info);

        $chatonline = count($chat_users);
        $left_menu[] = '<a href="chat/" target="_blank">'.$langop_word_chat.'</a> ('.$chatonline.')';
    }
Rage Inflictor
11-21-2008 10:23:12

Awesome, thank you! That is what I meant ^^;.

Yes, I just wanted the number, we don't really need to see who is online, rather just someone is online. big_smile

Odd, I have a chat hmm Though, like the 'kaki chat, you have to be logged in to see it, but here is a direct link: http://moonshineoekaki.net/chat

Hmm...Was I supposed to modify that, or was it not done? It broke the header O.O...

Waccoon
11-21-2008 03:20:10

I presume by "floaty", you want the content to scroll with a locked background.  You can do that with the "background-attachment" property in your template, in the "body" section:

Code:

body {
     ...
     background-attachment: fixed;
}

As for the online list, that depends how you want the information to be displayed.  If you want a list of names, you'll need to append each name to a string and print the string in the appropriate section in the header.  I wouldn't recommend that, because the header can only be so tall.  But, let me know what content you want to put in there.  The demo you showed will make a vertical list.  What you really want is a horizontal list.

If you just want to get the number of people in the chat room, this is the relevant code:

Code:

// Get chat count
require_once dirname(__FILE__)."/../src/pfcinfo.class.php";
$info  = new pfcInfo( md5("Whois online demo") );
$users = $info->getOnlineNick(NULL);

$info = "";
$nb_users = count($users);

"$nb_users" holds the number of people in the chat room.  How this would be used depends on how your chat room works.  I don't see a chat on the oekaki at the moment, so I don't know how everything should work.

Rage Inflictor
11-20-2008 15:13:25

I'm trying to figure out how to make the templates kind of 'floaty'?
Where the comments/pics float ontop of the bg?
Does anyone know how to do that?

Also, for my phpfreechat that I have installed, there is a demo that kinda shows how to add the who's online to the index page of your site, but when I try, it just breaks/stretches the header D:

That is the script from: demo31_show_who_is_online-whoisonline. Could someone explain how to add that to the oekaki header? big_smile

Code:

<?php

require_once dirname(__FILE__)."/../src/pfcinfo.class.php";
$info  = new pfcInfo( md5("Whois online demo") );
// NULL is used to get all the connected users, but you can specify
// a channel name to get only the connected user on a specific channel
$users = $info->getOnlineNick(NULL);

echo "<h1>A demo which explains how to get the connected users list</h1>";

echo '<div style="margin: auto; width: 70%; border: 1px solid red; background-color: #FDD; padding: 1em;">';
$info = "";
$nb_users = count($users);
if ($nb_users <= 1)
  $info = "<strong>%d</strong> user is connected to the server !";
else
  $info = "<strong>%d</strong> users are connected to the server !";
echo "<p>".sprintf($info, $nb_users)."</p>";

echo "<p>Here is the online nicknames list of <a href='./demo31_show_who_is_online-chat.php'>this chat</a>:</p>";
echo "<ul>";
foreach($users as $u)
{
  echo "<li>".$u."</li>";
}
echo "</ul>";
echo "</div>";

?>

<?php
  // print the current file
  echo "<h2>The source code</h2>";

  $filename = __FILE__;
  echo "<p><code>".$filename."</code></p>";
  echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">";
  $content = file_get_contents($filename);
  highlight_string($content);
  echo "</pre>";

Board footer

Yep, still running PunBB
© Copyright 2002–2008 PunBB