• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ Joomla, Drupal, and Wordpress (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Succesful chat integration in Wordpress!! :)

Integration help for Joomla, Drupal, and Wordpress

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
9 posts • Page 1 of 1

Postby Burn » Tue Mar 31, 2009 1:41 pm

There is one person who succeeded!!
Please read how he did it there:
http://frumph.webcomicplanet.com/code-s ... into-wpmu/

I'm currently in the process of integrating myself and I'm not done yet... so dont contact me for support... I 'm facing my own issues ;) But that guy Frumph did it!
Burn
New member
 
Posts: 2
Joined: Tue Mar 31, 2009 1:38 pm
Top

Postby agreda » Thu Jul 02, 2009 5:45 am

Yes, Frumph makes it sound so simple ... but alas, it is not successful for all apparently. I've followed the instructions for incorporating phpFreeChat into WordPress MU, but I get the following error upon loading the chat page:

Parse error: syntax error, unexpected T_STRING in /home/myusername/public_html/chatroom/chat.php on line 2

Line 2 reads: require_once dirname(__FILE__)”/src/phpfreechat.class.php”;

Anyone have any ideas about how to resolve this? Thanks in advance for any help!
agreda
Member
 
Posts: 13
Joined: Thu Jul 02, 2009 5:37 am
Top

Postby agreda » Fri Jul 03, 2009 3:29 am

FYI: I got this to work after confirming all directory paths are correct for my server configuration and converting all the quote marks in the code provided to straight quotes. Also, the closing tag needs to be ?> not ?>
agreda
Member
 
Posts: 13
Joined: Thu Jul 02, 2009 5:37 am
Top

Postby amyt76 » Mon Jul 13, 2009 10:29 pm

I've been trying to work out how to do this for awhile, finally found the answer here, thanks! :)
Amy Taylor
My dog training blog.
Dogs have owners, cats have staff.
amyt76
New member
 
Posts: 1
Joined: Mon Jul 13, 2009 10:26 pm
  • Website
Top

Postby Frumph » Wed Aug 05, 2009 10:50 am

agreda wrote:Yes, Frumph makes it sound so simple ... but alas, it is not successful for all apparently. I've followed the instructions for incorporating phpFreeChat into WordPress MU, but I get the following error upon loading the chat page:

Parse error: syntax error, unexpected T_STRING in /home/myusername/public_html/chatroom/chat.php on line 2

Line 2 reads: require_once dirname(__FILE__)”/src/phpfreechat.class.php”;

Anyone have any ideas about how to resolve this? Thanks in advance for any help!

That's because your cut and pasting the slanted quotes .. replace all slanted " 's with regular " quotes.

That happens when you cut and paste from wordpress unfortunately sometimes.
Frumph
Member
 
Posts: 38
Joined: Wed Aug 05, 2009 10:47 am
Top

Postby agreda » Wed Aug 05, 2009 6:36 pm

Thanks! But read post #3 and you'll see how I caught that shortly after posting. D'oh! Our chat is up and running great thanks to you! Now if only we could figure out why the alert sound is so tempermental. :-/
agreda
Member
 
Posts: 13
Joined: Thu Jul 02, 2009 5:37 am
Top

Postby chgeorge » Thu Aug 06, 2009 9:40 am

I managed to integrate phpfreechat into wordpress. But when a registered user is joining, it asks for a nickname. How do I set it so as to use the same username?
chgeorge
New member
 
Posts: 2
Joined: Thu Aug 06, 2009 9:38 am
Top

Postby chgeorge » Wed Aug 26, 2009 3:11 pm

Any answer? Anyone?
chgeorge
New member
 
Posts: 2
Joined: Thu Aug 06, 2009 9:38 am
Top

Postby agreda » Wed Aug 26, 2009 11:30 pm

Check your chat.php code and parameters, especially the $current_user, $user_name and [nick] parameters. I've never had the issue you describe and here's my code in its entirety. Your dir. paths and title will also likely be different. Don't forget to wrap in php open/close tags! Hope this helps ...

require_once dirname(__FILE__)."/src/phpfreechat.class.php";
require_once('/home/tripawds/public_html/wp-config.php');
$current_user = wp_get_current_user();
$user_name = addslashes($current_user->display_name);
$params = array();
$params["title"] = "Live Chat";
$params["nick"] = $user_name;
$params["isadmin"] = false; // do not use it on production servers ;)
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
// setup urls
$params["data_public_url"] = "/chatroom/data/public";
$params["server_script_url"] = "/chatroom/chat.php";
$params["theme_default_url"] = "/chatroom/themes";
$params["timeout"] = 180000;
$params["theme"] = "default";
// setup paths
$params["container_type"] = "File";
$params["container_cfg_chat_dir"] = dirname(__FILE__)."/data/private/chat";
// Channels
$params["channels"] = array("Public");
$params["max_msg"] = 12;
$params["max_displayed_lines"] = 50;
$params["short_url"] = true;
$params["short_url_width"] = 25;
$params["quit_on_closedwindow"] = true;
$params["display_ping"] = false;
$params['skip_proxies'] = array('noflood');
//$params["debug"] = true;
$chat = new phpFreeChat( $params );
echo '
';
$chat->printChat();
echo '

';
agreda
Member
 
Posts: 13
Joined: Thu Jul 02, 2009 5:37 am
Top


Post a reply
9 posts • Page 1 of 1

Return to Joomla, Drupal, and Wordpress (v1.x)

Who is online

Users browsing this forum: No registered users and 3 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub