Furry stuff, oekaki stuff, and other stuff.
You are not logged in.
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.
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.
Yeah... I'm not familiar with that chat system, so how it gets the chat count is kinda fuzzy.
Thank you for helping again!
Everything works, no parse errors, but there is no number D:
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
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.')'; }
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.
Odd, I have a chat 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...
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:
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:
// 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.
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?
<?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>";