Portal Block für FlashChat


witvisser
Active Member
Posts: 11
Joined: 12. March 2009 11:30
Location: Belgium
Contact:

Re: Portal Block für FlashChat

Post by witvisser »

I found it on my own :D
changed the code portal.php

Code: Select all

if ($portal_config['portal_minicalendar'])
{
   include($phpbb_root_path . 'portal/block/mini_cal.'.$phpEx);
}

if ($portal_config['portal_chatbox'])
{
   include($phpbb_root_path . 'portal/block/chatbox.'.$phpEx);
}

if ($portal_config['portal_link_us'])
{
   include($phpbb_root_path . 'portal/block/link_us.'.$phpEx);
}
in

Code: Select all

if ($portal_config['portal_minicalendar'])
{
   include($phpbb_root_path . 'portal/block/mini_cal.'.$phpEx);
}

   include($phpbb_root_path . 'portal/block/chatbox.'.$phpEx);

if ($portal_config['portal_link_us'])
{
   include($phpbb_root_path . 'portal/block/link_us.'.$phpEx);
}

Shakall
Active Member
Posts: 13
Joined: 5. March 2009 22:58
phpBB.de User: Shakall
phpBB.com User: Shakall

Re: Portal Block für FlashChat

Post by Shakall »

Komisch habe es auch so gemacht aber wird bei mir nicht angezeigt.
Hat jemand einen Rat ?
Es zeigt bei mir Ist sind zur Zeit users im Chat
Keine nummer keine namen!
Mfg
Last edited by Shakall on 2. April 2009 08:45, edited 1 time in total.

witvisser
Active Member
Posts: 11
Joined: 12. March 2009 11:30
Location: Belgium
Contact:

Re: Portal Block für FlashChat

Post by witvisser »

Give me the url to your board and I will take a look ;)

Shakall
Active Member
Posts: 13
Joined: 5. March 2009 22:58
phpBB.de User: Shakall
phpBB.com User: Shakall

Re: Portal Block für FlashChat

Post by Shakall »

My url is http://www.bhcaffe.net

When i put your chatbox.php in portal/ i become this error:
SQL ERROR [ mysqli ]

Table 'bhcaf10_bhcaffe.flashchat_connections' doesn't exist [1146]

SQL

select b.login as name from flashchat_connections as a inner join flashchat_users as b on a.userid=b.id where state=1

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: portal/block/chatbox.php
LINE: 29
CALL: dbal_mysqli->sql_query()

FILE: portal.php
LINE: 184
CALL: include('portal/block/chatbox.php')

I dont know why !
My table is not flashchat it is fc_
Perhaps because i have intergreated it whit my phpbb3 and i can change the table prefix ?
And i dont have the table fc_users only bhcaffe_users because my php is whit prefix bhcaffe

witvisser
Active Member
Posts: 11
Joined: 12. March 2009 11:30
Location: Belgium
Contact:

Re: Portal Block für FlashChat

Post by witvisser »

In your php file file /potal/block/chatbox.php search this line

Code: Select all

$sql="select b.login as name from flashchat_connections as a inner join flashchat_users as b on a.userid=b.id where state=1";
and repleace with

Code: Select all

$sql="select b.login as name from bhcaffe_connections as a inner join bhcaffe_users as b on a.userid=b.id where state=1";
If this doesn't work see in your database for the correct table names and chage it in the above line ;)

Shakall
Active Member
Posts: 13
Joined: 5. March 2009 22:58
phpBB.de User: Shakall
phpBB.com User: Shakall

Re: Portal Block für FlashChat

Post by Shakall »

i have make it so as you say but that comes !

SQL ERROR [ mysqli ]

Unknown column 'b.login' in 'field list' [1054]

SQL

select b.login as name from bhcaffe_flashchatconnections as a inner join bhcaffe_users as b on a.userid=b.id where state=1

BACKTRACE



Both tables are there in myphp!

witvisser
Active Member
Posts: 11
Joined: 12. March 2009 11:30
Location: Belgium
Contact:

Re: Portal Block für FlashChat

Post by witvisser »

Are this 2 table names correct (look in your database) :?:
bhcaffe_flashchatconnections
bhcaffe_users

Shakall
Active Member
Posts: 13
Joined: 5. March 2009 22:58
phpBB.de User: Shakall
phpBB.com User: Shakall

Re: Portal Block für FlashChat

Post by Shakall »

Yes there are booth there

bhcaffe_flashchatconnections
bhcaffe_users but they are from the phpbb3 !

Ahmmm must i make an db_update or something ?

witvisser
Active Member
Posts: 11
Joined: 12. March 2009 11:30
Location: Belgium
Contact:

Re: Portal Block für FlashChat

Post by witvisser »

You don't have nothing to change in your database :!:
I think the problem is that you are running mysqli instead mysql
So this code must be changed for mysqli

Code: Select all

// 
// Chatters online 
// 
$exptime = time()-30; 

$sql="select b.login as name from bhcaffe_flashchatconnections as a inner join bhcaffe_users as b on a.userid=b.id where state=1"; 

$result = $db->sql_query($sql); 
$teller=0; 
while($row = $db->sql_fetchrow($result)){ 
$string=$string.", ".$row['name']; 
$teller=$teller+1; 
} 
$number = $teller; 
$names=substr($string,1); 
// 
// End chatters online 
//  
//
I will have a look at the code one of these days or maybe someone else on this board can make the changes ;)

Shakall
Active Member
Posts: 13
Joined: 5. March 2009 22:58
phpBB.de User: Shakall
phpBB.com User: Shakall

Re: Portal Block für FlashChat

Post by Shakall »

# MySQL-Client-Version: 5.0.67
# Verwandte php-Erweiterungen: mysql

witvisser
Active Member
Posts: 11
Joined: 12. March 2009 11:30
Location: Belgium
Contact:

Re: Portal Block für FlashChat

Post by witvisser »

OK, can you try this:
Find this line:

Code: Select all

$sql="select b.login as name from bhcaffe_flashchatconnections as a inner join bhcaffe_users as b on a.userid=b.id where state=1";
and replace with:

Code: Select all

$sql="select b.username as name from bhcaffe_flashchatconnections as a inner join bhcaffe_users as b on a.userid=b.id where state=1";

Shakall
Active Member
Posts: 13
Joined: 5. March 2009 22:58
phpBB.de User: Shakall
phpBB.com User: Shakall

Re: Portal Block für FlashChat

Post by Shakall »

SQL ERROR [ mysqli ]

Unknown column 'b.id' in 'on clause' [1054]

SQL

select b.username as name from bhcaffe_flashchatconnections as a inner join bhcaffe_users as b on a.userid=b.id where state=1

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: portal/block/chatbox.php
LINE: 29
CALL: dbal_mysqli->sql_query()

FILE: portal.php
LINE: 184
CALL: include('portal/block/chatbox.php')

witvisser
Active Member
Posts: 11
Joined: 12. March 2009 11:30
Location: Belgium
Contact:

Re: Portal Block für FlashChat

Post by witvisser »

Try this, find:

Code: Select all

$sql="select b.username as name from bhcaffe_flashchatconnections as a inner join bhcaffe_users as b on a.userid=b.id where state=1";
and replace with:

Code: Select all

$sql="select b.username as name from bhcaffe_flashchatconnections as a inner join bhcaffe_users as b on a.userid=b.user_id where state=1";

Shakall
Active Member
Posts: 13
Joined: 5. March 2009 22:58
phpBB.de User: Shakall
phpBB.com User: Shakall

Re: Portal Block für FlashChat

Post by Shakall »

YOU ARE THE GREATEST !!!!!
Thank you now is everythink perfekt !

witvisser
Active Member
Posts: 11
Joined: 12. March 2009 11:30
Location: Belgium
Contact:

Re: Portal Block für FlashChat

Post by witvisser »

It was not easy beacuse i couldn't see your database, but I am happy for you that it's working now ;)
Post Reply

Return to “Modification Requests”