vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   YAPIH (Yet Another PHPMyChat Integration Hack) 1.0 (https://vborg.vbsupport.ru/showthread.php?t=37209)

rstark 01-17-2003 05:23 AM

Quote:

Originally posted by ixian
Last (guess this is 3 questions:) )

Where do you change the default text users see when they first enter a room?

Still haven't got the answer to this one....yet

Thanks!

It's in the welcome.lib.php3 file located in the \chat\lib folder

svoec 01-17-2003 12:29 PM

it's in the phpmychat docs..(probably why you didn't get a answer)

it is in the /chat/lib/welcome.lib.php3

:Judge: 01-18-2003 03:10 AM

Is this my best option to intergrate the two?

rstark 01-20-2003 08:59 PM

Quote:

Originally posted by version
ixian, the phpinclude template is always parsed, even for the front page of the site, if you include("$forumpath/global.php").

here's the chatstuff in my phpinclude template:
PHP Code:

if ($bbuserinfo[userid] != "0") {
  
$chatname str_replace(" ""%20"$bbuserinfo[username]);
  
$chatpass $bbuserinfo[password];

  
$db=mysql_connect($servername,$dbusername,$dbpassword) or die("Can't open connection to MySQL");
  
mysql_select_db($dbname) or die("Can't select database");

  
mysql_query("DELETE from chat_users where u_time < ".(time() - 240)." and u_time > 0");
  
$num_chatters_query mysql_query("SELECT DISTINCT username FROM chat_users WHERE room != \"PRIVATE_ROOM\"");
  
$num_chatters mysql_num_rows($num_chatters_query);

  if (
$num_chatters == "0") {
    
$chatextra "";
  } elseif (
$num_chatters == "1") {
    
$chatextra "(1 user)";
    
$istext "is";
    
$membertext "member";
  } else {
    
$chatextra "($num_chatters users)";
    
$istext "are";
    
$membertext "members";
  }

  
$who_chatters_query mysql_query("SELECT DISTINCT username FROM chat_users");

  while (
$chatters mysql_fetch_array($who_chatters_query)) {
    
$who_chatters .= "&nbsp;$chatters[username]&nbsp;";
  }
  
  eval(
"\$chatinfo = \"".gettemplate("forumhome_chatinfo")."\";"); 


as you can see, i pass variables to my subscripts variables in the URLs, i.e. $chatname as $username, $bbuserinfo[userid] as $userid.

here is the contents of the "menu_chat.php" script mentioned above:
PHP Code:

print "<a href=\"/chat/index.php3?U=$username&PWD_Hash=$password&Ver=H&L=english&R0=General&T=1&D=10&N=200&EN=1\">General Chat</a><br>
 <a href=\"/chat/index.php3?U=
$username&PWD_Hash=$password&Ver=H&L=english&R0=Poetry+Slam&T=1&D=10&N=200&EN=1\">Poetry Slam</a><br>"

i am also attaching the template for the forumhome_chatinfo. let me know if there is more questions, and if someone wants to add more (or better) instructions to my package, send me the changes and i will give you credit. (busy life right now, got twins on the way :))

When I try to add this, I get:
Warning: Access denied for user: 'user_com@localhost' (Using password: NO) in /home/oursite/public_html/forums/global.php(302) : eval()'d code on line 23

Warning: MySQL Connection Failed: Access denied for user: 'user_com@localhost' (Using password: NO) in /home/oursite/public_html/forums/global.php(302) : eval()'d code on line 23
Can't open connection to MySQL

svoec 01-20-2003 10:18 PM

somewhere in there, you need to include either global.php, or admin/config.php

your variables for the username and password are not getting set.

rstark 01-20-2003 10:29 PM

Quote:

Originally posted by svoec
somewhere in there, you need to include either global.php, or admin/config.php


your variables for the username and password are not getting set.

Thanks svoec, but can you be a little more specific on where to include this? In the phpinclude template?

rstark 01-20-2003 10:49 PM

Nevermind, I got it to work. Thanks!

TalkHardRandy 01-29-2003 07:06 PM

Though version hasn't been on in a while, I wanted to say that despite looking like a difficult hack to install, it went in rather smoothly.

Very cool hack!!!

speedway 02-27-2003 12:31 PM

Ummm...anyone know where I can get this hack...the download link doesn't seem to work.

Cheers

dotagious 04-27-2003 05:28 AM

Quote:

02-27-03 at 10:31 AM speedway said this in Post #39
Ummm...anyone know where I can get this hack...the download link doesn't seem to work.

Cheers


Same here. =(


All times are GMT. The time now is 04:26 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01226 seconds
  • Memory Usage 1,757KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete