4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 Chat Tutorial
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
thetribe
WebHelper
WebHelper


Joined: 10 Nov 2002
Posts: 62
Location: Ashington, Northumberland. UK

PostPosted: Thu Mar 06, 2003 12:15 pm (14 years, 8 months ago) Reply with QuoteBack to Top

I read a few posts about your chat room but notice there wasn't what I would call a tutorial. Have you thought about doing a step by step tutorial on integrating a chat into phpBB?

(and when I say step by step I mean step by step, from first to last step, for us thickies Wink Laughing )

________________________________
Phil.
My Musical Preferences
Image
OfflineView User's ProfileFind all posts by thetribeSend Personal MessageVisit Poster's Website
adam
Forum Moderator & Developer



Joined: 26 Jul 2002
Posts: 704
Location: UK

PostPosted: Thu Mar 06, 2003 12:55 pm (14 years, 8 months ago) Reply with QuoteBack to Top

the 4webhelp chat room isn't integrated into phpBB, it's IRC and runs on webchat.org...as far as I know, it doesn't have anything to do with the forums.

________________________________
It's turtles all the way down...
OfflineView User's ProfileFind all posts by adamSend Personal MessageVisit Poster's Website
thetribe
WebHelper
WebHelper


Joined: 10 Nov 2002
Posts: 62
Location: Ashington, Northumberland. UK

PostPosted: Thu Mar 06, 2003 1:49 pm (14 years, 8 months ago) Reply with QuoteBack to Top

yeah, I realise that but it's easily linked from the forum where it pulls in your forum username to use when you enter, as I noticed this morning while playing around Very Happy

And as someone who can only get onto IRC with full instructions (or by the way of clicking a link) it would be handy to know how to set it up 'from scratch' Laughing

________________________________
Phil.
My Musical Preferences
Image
OfflineView User's ProfileFind all posts by thetribeSend Personal MessageVisit Poster's Website
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Thu Mar 06, 2003 4:56 pm (14 years, 8 months ago) Reply with QuoteBack to Top

As adam says, the forums aren't really linked to the chat room. All I have done is install a java interface from http://www.webmaster.com which access the webchat.org servers. In the code which calls the java applet, there is an option to set the username (although you won't be able to keep it if it is already registered on the IRC server). What I did was add a little PHP like this:

Code:
<param name="nick" value="<?php echo $username; ?>">


All that does it print out the username which is passed in the query string, like this: chat.php?username=Daniel. The applet then uses this to connect.

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
thetribe
WebHelper
WebHelper


Joined: 10 Nov 2002
Posts: 62
Location: Ashington, Northumberland. UK

PostPosted: Sun Mar 09, 2003 5:52 pm (14 years, 8 months ago) Reply with QuoteBack to Top

Quote:

All that does it print out the username which is passed in the query string, like this: chat.php?username=Daniel. The applet then uses this to connect

ah, so how does that look in the links? What is the format of the link itself in the template?
Thanks. Smile

________________________________
Phil.
My Musical Preferences
Image
OfflineView User's ProfileFind all posts by thetribeSend Personal MessageVisit Poster's Website
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Sun Mar 09, 2003 5:55 pm (14 years, 8 months ago) Reply with QuoteBack to Top

In the template:

Code:
<a href="{CHAT}">Chat Room</a>


After:

Code:
   'T_SPAN_CLASS3' => $theme['span_class3'],


In includes/page_header.php:

Code:
   'CHAT' => append_sid("chat.php?username=".$userdata['username']),

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
thetribe
WebHelper
WebHelper


Joined: 10 Nov 2002
Posts: 62
Location: Ashington, Northumberland. UK

PostPosted: Sun Mar 09, 2003 6:31 pm (14 years, 8 months ago) Reply with QuoteBack to Top

excellent thanks. I have a chat room on my site at the moment but it's actually running on my home PC at the moment until I can find another that I feel is satisfactory. I tried the Backpack one but for some reason it kept crashing my browser and twice locked up my PC so only a reboot would release it. (Although yours did neither when I looked in there)

I'll let you know how it goes Very Happy

________________________________
Phil.
My Musical Preferences
Image
OfflineView User's ProfileFind all posts by thetribeSend Personal MessageVisit Poster's Website
thetribe
WebHelper
WebHelper


Joined: 10 Nov 2002
Posts: 62
Location: Ashington, Northumberland. UK

PostPosted: Sun Mar 09, 2003 7:56 pm (14 years, 8 months ago) Reply with QuoteBack to Top

excellent! This also worked for my chat Very Happy I just changed username to login as that's what the param name is.That should keep some users happy, save them having to click 2 links to join the chat Wink

Now I just need to find out how to include the 'users online in chat' text file that I generate.

________________________________
Phil.
My Musical Preferences
Image
OfflineView User's ProfileFind all posts by thetribeSend Personal MessageVisit Poster's Website
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Sun Mar 09, 2003 8:39 pm (14 years, 8 months ago) Reply with QuoteBack to Top

Is this what you're looking for?

http://www.forums.34sp.com/viewtopic.php?t=1855

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
thetribe
WebHelper
WebHelper


Joined: 10 Nov 2002
Posts: 62
Location: Ashington, Northumberland. UK

PostPosted: Sun Mar 09, 2003 8:52 pm (14 years, 8 months ago) Reply with QuoteBack to Top

Unfortunately not. My chat isn't IRC but I can access it with mIRC with a script and mIRC generates my usernames.txt file and logs the chat. I'm basicaly just trying to find somewhere to include the file that doesn't wreck everything on the forum. The problem at the moment is that I'd like to just <?php include.... the file but this doesn't work in the templates and even when I tried the "php in templates" mod it wouldn't work. And that's as far as I've progresssed so far but am still working on it Very Happy

________________________________
Phil.
My Musical Preferences
Image
OfflineView User's ProfileFind all posts by thetribeSend Personal MessageVisit Poster's Website
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Mon Mar 10, 2003 7:04 am (14 years, 8 months ago) Reply with QuoteBack to Top

Try this in page_header.php:

Code:
        ob_start();
        include($DOCUMENT_ROOT.'/file.php');
        $online = ob_get_contents();
        ob_end_clean();


Then put this after the line I told you to insert in my second last post:

Code:
   'ONLINE' => $online,


Then just put {ONLINE} in your template. That should work..

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
thetribe
WebHelper
WebHelper


Joined: 10 Nov 2002
Posts: 62
Location: Ashington, Northumberland. UK

PostPosted: Mon Mar 10, 2003 8:02 am (14 years, 8 months ago) Reply with QuoteBack to Top

Thanks. I'll give that a try, I'll let you know how I get on Smile

________________________________
Phil.
My Musical Preferences
Image
OfflineView User's ProfileFind all posts by thetribeSend Personal MessageVisit Poster's Website
thetribe
WebHelper
WebHelper


Joined: 10 Nov 2002
Posts: 62
Location: Ashington, Northumberland. UK

PostPosted: Mon Mar 10, 2003 10:10 am (14 years, 8 months ago) Reply with QuoteBack to Top

Fantastic Very Happy All sorted now, thanks for all your help.
if you want to take a look http://www.ashington-ne.co.uk/forum/index.php I have it set so only registered members can get into the chat this way as it tried to log all unregistered in as Anonymous, first one got in fine no others could get in (found when testing), so a temp account has been created with Username: test Password: test

________________________________
Phil.
My Musical Preferences
Image
OfflineView User's ProfileFind all posts by thetribeSend Personal MessageVisit Poster's Website
thetribe
WebHelper
WebHelper


Joined: 10 Nov 2002
Posts: 62
Location: Ashington, Northumberland. UK

PostPosted: Mon Mar 10, 2003 10:35 am (14 years, 8 months ago) Reply with QuoteBack to Top

Just had to make an amendment, had to change the include statement to be
Code:

"include($phpbb_root_path . 'chatonline.php');"

as it threw up errors in posting.php
Code:

<b>Warning</b>:  open_basedir restriction in effect. File is in wrong directory in <b>/usr/local/psa/home/vhosts/ashington-ne.co.uk/httpdocs/forum/includes/page_header.php</b> on line <b>360</b><br>
<br>
<b>Warning</b>:  Failed opening '/forum/chatonline.php' for inclusion (include_path='.:') in <b>/usr/local/psa/home/vhosts/ashington-ne.co.uk/httpdocs/forum/includes/page_header.php</b> on line <b>360</b><br>

________________________________
Phil.
My Musical Preferences
Image
OfflineView User's ProfileFind all posts by thetribeSend Personal MessageVisit Poster's Website
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.06493 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme