Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.

Thread: 

PHP chatroom setting for mybb

Ads
Midori Offline referral

Posts: 41
Joined: Apr 2014
Reputation: 1

#1
Junior Member
Hi again !
How can I set this chatroom for mybb? this is very light and speedy chatroom that I saw . (no need any database )
h t t p://coursesweb.net/php-mysql/script-chat-simple_s2
In description said:
Quote:- If your web site has a register /login script, and you want than only the logged users to can add texts in chat, set the value of CHATADD to 0 . Then set $_SESSION['username'] with the session your script uses to keep logged users; to the following code, in "setchat.php".
In this case, you must add session_start(); to the beginning of your PHP file, as you can see in "test.php" file.

define('CHATADD', 1);
if(CHATADD !== 1) {
if(isset($_SESSION['username'])) define('CHATUSER', $_SESSION['username']);
}
I did it but no work for members (I dont know exactly about this works) Angry . please advise me that how can I set it for registered members In Mybb. Heart
seo123 Offline referral

Posts: 427
Joined: Mar 2014
Reputation: 16

#2
Senior Member
Do you want this chat to only show for registered users or what?
Midori Offline referral

Posts: 41
Joined: Apr 2014
Reputation: 1

#3
Junior Member
(04-23-2014 06:23 PM)SEO123 Wrote:  Do you want this chat to only show for registered users or what?
just registered users.
seo123 Offline referral

Posts: 427
Joined: Mar 2014
Reputation: 16

#4
Senior Member
Try wrapping chat code in your template with this conditional.

PHP Code:
<if $mybb->user['uid'then>
// Chat code goes here.
</if> 
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#5
Support Team
That will require a lot of coding to fully integrate this chat with MYBB forum so that it will show which username made a post! I have not tried it, bit is it working?
Midori Offline referral

Posts: 41
Joined: Apr 2014
Reputation: 1

#6
Junior Member
(04-23-2014 06:31 PM)SEO123 Wrote:  Try wrapping chat code in your template with this conditional.

PHP Code:
<if $mybb->user['uid'then>
// Chat code goes here.
</if> 
Thanks ,but Need More works . Must correcting inside codes.
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#7
Support Team
Please explain exactly what are you trying to do? Instead of messing around with this code that will cause only problems simply install this MYBB plugin called 'shoutbox'

This is the one everybody uses!
http://mods.mybb.com/view/myshoutbox
Midori Offline referral

Posts: 41
Joined: Apr 2014
Reputation: 1

#8
Junior Member
(04-23-2014 10:12 PM)marcus_avrelius Wrote:  Please explain exactly what are you trying to do? Instead of messing around with this code that will cause only problems simply install this MYBB plugin called 'shoutbox'

This is the one everybody uses!
http://mods.mybb.com/view/myshoutbox
I have myshoutbox 1.7 in my froum (with my special design)001_tt1 but I want this chatroom because it have clickable smilies & inserting bbcodes .
you can see in my forum in top of index i have myshoutbox 1.7 and in bottom new chatroom (for test)
h t t p://www.midorinco.ir/index.php
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#9
Support Team
I am sorry but as I have already said it requires lost of core edits and coding because MYBB doesn't use $_SESSION
apsarasisodia Offline referral

Posts: 76
Joined: Jan 2016
Reputation: 0

#10
Member
My plan is to use a programming language - PHP or ASP and make a discussion board where people can chat about internet marketing. Later I earn from that discussion board once it gets popular.





User(s) browsing this thread: 1 Guest(s)