Welcome, Guest. Please Login or Register.
May 02, 2025, 12:29:42 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Chat Mod « previous next »
Pages: 1 [2] Reply Ignore Print
Author Topic: Chat Mod  (Read 900 times)
Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:Chat Mod
« Reply #15 on: April 22, 2002, 05:51:34 PM »
Reply with quote

Sorry! I forgot about the is_admin bit. I just copied some of my code! lol.
To check if someone is not a guest do this:
if ($username == "Guest") { die("Guests are not allowed enter this area! :P"); }

Place that at the top of the code.

I can't remember the name of the file offhand to put chat.gif in.. I'm not on my comp at the moment. I can find out later if ya like.  ;)
Logged

PHPNews has been released!!! Download it now!!!
goosemoose
Sr. Member
****
Posts: 256


I'm a llama!

Re:Chat Mod
« Reply #16 on: April 22, 2002, 06:31:51 PM »
Reply with quote

Okay, chat.php looks like this:

<? function ChatRoom() {

if ($username == "Guest") { die("Guests are not allowed to enter this area!"); }

$yytitle = "Chat Room Mod";
template_header();

print<<<EOT

<center>
<script language="JavaScript" src="http://irc.everywherechat.com:8000/Java/embed.js?room=rfc&width=500&height=520"></script>
</center>

EOT;

footer();
obExit();


}
?>


but it still isn't blocking guests.
« Last Edit: April 22, 2002, 06:34:08 PM by goosemoose » Logged

MobileYaBB v.3 [75% done]
All in One MemberList 1.0
Integrated Chat v 2.0
goosemoose
Sr. Member
****
Posts: 256


I'm a llama!

Re:Chat Mod
« Reply #17 on: April 23, 2002, 06:34:22 AM »
Reply with quote

Anyone??? How do I add the chat button?
Logged

MobileYaBB v.3 [75% done]
All in One MemberList 1.0
Integrated Chat v 2.0
Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:Chat Mod
« Reply #18 on: April 23, 2002, 07:10:44 PM »
Reply with quote

sigh, firstly place the guest code after the header bit. And at the top of the script add:
global $username;

Thought you knew about that.. :P lol
Logged

PHPNews has been released!!! Download it now!!!
goosemoose
Sr. Member
****
Posts: 256


I'm a llama!

Re:Chat Mod
« Reply #19 on: April 23, 2002, 07:32:59 PM »
Reply with quote

Sorry, PHP is new to me. I know about 8 different programming languages, and I don't have time right now(hopefully soon) to get into it. I will try that out. Any luck on how to add the button up top? I couldn't figure out which php file it was in. Thanks again!
Logged

MobileYaBB v.3 [75% done]
All in One MemberList 1.0
Integrated Chat v 2.0
Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:Chat Mod
« Reply #20 on: April 23, 2002, 07:48:40 PM »
Reply with quote

search for: $img[profile] in subs.php.  ;)
Logged

PHPNews has been released!!! Download it now!!!
goosemoose
Sr. Member
****
Posts: 256


I'm a llama!

Re:Chat Mod
« Reply #21 on: April 23, 2002, 09:44:16 PM »
Reply with quote

Okay. I added
 $menusep<a href=\"$cgi;action=chat\" target=_blank>$img[chat]</a>

next to the search icon but it never appears in the forum. I looked at the forums html code and I see the link to the action=chat but the img tag never appears. I put chat.gif in the YaBB images dir. What am I missing here?
Logged

MobileYaBB v.3 [75% done]
All in One MemberList 1.0
Integrated Chat v 2.0
goosemoose
Sr. Member
****
Posts: 256


I'm a llama!

Re:Chat Mod
« Reply #22 on: April 24, 2002, 05:33:35 PM »
Reply with quote

Help?
Logged

MobileYaBB v.3 [75% done]
All in One MemberList 1.0
Integrated Chat v 2.0
Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:Chat Mod
« Reply #23 on: April 24, 2002, 08:33:33 PM »
Reply with quote

Thats up to your html coding by the look of it. I dunno unless I see what you have added or edited.
Post some code of before and after ;)
Logged

PHPNews has been released!!! Download it now!!!
goosemoose
Sr. Member
****
Posts: 256


I'm a llama!

Re:Chat Mod
« Reply #24 on: April 24, 2002, 09:01:41 PM »
Reply with quote

All I added was $menusep<a href=\"$cgi;action=chat\" target=_blank>$img[chat]</a>

Before
$yymenu = "<a href=\"$scripturl\">$img[home]</a>$menusep<a href=\"$helpfile\" target=_blank>$img[help]</a>$menusep<a href=\"$cgi;action=search\">$img[search]</a>";
   if($settings[7] == 'Administrator') { $yymenu = $yymenu.$menusep."<a href=\"$cgi;action=admin\">$img[admin]</a>"; }
   if($username == "Guest") { $yymenu .= $menusep."<a href=\"$cgi;action=login\">$img[login]</a>$menusep<a href=\"$cgi;action=register\">$img[register]</a>";
   } else {
      $euser = urlencode($username);
      $yymenu .= "$menusep<a href=\"$cgi;action=profile;user=$euser\">$img[profile]</a>";
      if($enable_notification) { $yymenu .= "$menusep<a href=\"$cgi;action=shownotify\">$img[notification]</a>"; }
      $yymenu .= "$menusep<a href=\"$cgi;action=logout\">$img[logout]</a>";
   }

After:
$yymenu = "<a href=\"$scripturl\">$img[home]</a>$menusep<a href=\"$helpfile\" target=_blank>$img[help]</a>$menusep<a href=\"$cgi;action=chat\" target=_blank>$img[chat]</a>$menusep<a href=\"$cgi;action=search\">$img[search]</a>";
   if($settings[7] == 'Administrator') { $yymenu = $yymenu.$menusep."<a href=\"$cgi;action=admin\">$img[admin]</a>"; }
   if($username == "Guest") { $yymenu .= $menusep."<a href=\"$cgi;action=login\">$img[login]</a>$menusep<a href=\"$cgi;action=register\">$img[register]</a>";
   } else {
      $euser = urlencode($username);
      $yymenu .= "$menusep<a href=\"$cgi;action=profile;user=$euser\">$img[profile]</a>";
      if($enable_notification) { $yymenu .= "$menusep<a href=\"$cgi;action=shownotify\">$img[notification]</a>"; }
      $yymenu .= "$menusep<a href=\"$cgi;action=logout\">$img[logout]</a>";
   }
Logged

MobileYaBB v.3 [75% done]
All in One MemberList 1.0
Integrated Chat v 2.0
thetaxiforums
Jr. Member
**
Posts: 54


taxi drivers do it with the meter running

WWW
Re:Chat Mod
« Reply #25 on: April 25, 2002, 03:41:00 AM »
Reply with quote

didnt shaun do a link for a chat button in top menu bar  i used this for 1.0 but lost it when upgraded to 1.3.1 and you can use jirc with no problem i did!
Logged

goosemoose
Sr. Member
****
Posts: 256


I'm a llama!

Re:Chat Mod
« Reply #26 on: April 25, 2002, 04:45:21 PM »
Reply with quote

I couldn't get it to work the way I had it set up so I hard coded it into the subs.php. I know this is unorthodox but you do what ya have to! If anyone can see what I was doing wrong in the version posted above let me know. I am guessing I have to define the $IMG[chat] in another file?
Logged

MobileYaBB v.3 [75% done]
All in One MemberList 1.0
Integrated Chat v 2.0
Pages: 1 [2] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Chat Mod « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.015 seconds with 21 queries.