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

MediaWiki integration

Post a bug fix, a new feature, a theme ...

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

Post a reply
18 posts • Page 2 of 2 • 1, 2

Postby WikiGuitarist » Fri Aug 10, 2007 4:22 am

Hi guys,

I followed the instruction but I only get:
Chat Loading...
Please wait

However the demo works fine: http://www.wikiguitarist.com/phpfreechat
The path to Special chat page: http://www.wikiguitarist.com/wikiguitarist/Special:Chat
Path of Chat: /home/wikiguit/public_html/phpfreechat
Path of Wiki: /home/wikiguit/public_html/wikiguitarist
You can access the files at:
... .com/wikiguitarist/extensions/SpecialChat.php
... .com/wikiguitarist/includes/SpecialChat.php
... .com/phpfreechat/ajax.ph
I am running MediaWiki 1.8.2.

I guess it is only a miss configuration. Any help would be really appreciated.

Thanks in advance.
Alain
Last edited by WikiGuitarist on Fri Aug 10, 2007 4:23 am, edited 1 time in total.
WikiGuitarist
New member
 
Posts: 2
Joined: Thu Aug 09, 2007 6:19 am
Top

Postby pierro78 » Tue Feb 07, 2012 11:07 am

I got this working with mediawiki 1.16 and phpFreeChat 1.3. I did some quick on dirty fixes though. See below.

My main problem was to set the "data_public_url" parameter.
Maybe I didn't understand sthg but I had to modify pfcglobalconfig.class.php to get it set. See the "IMPORTANT" note below :
Code: Select all
diff pfcglobalconfig.class.php /usr/local/wiki/wiki/chat/src/
75c75
<   var $max_nick_len = 15;
---
>   var $max_nick_len = 20; // pierro78
660c660,665
<     
---
>
>     if (isset($params["data_public_url"]))
>        $this->data_public_url=$params["data_public_url"]; // added by pierro78 (IMPORTANT !! - maybe a bug ? )
>     $this->frozen_nick=true; // added by pierro78
>     $this->max_nick_len=20; // added by pierro78
>
680d684
<       
731c735,738
<       $this->channels = array(_pfc("My room"));
---
>     {
> //       $this->channels = array(_pfc("My room"));  pierro78
>        $this->channels = array( "Canal1"); // pierro78
>     }
742a750,755
>
>     if ( isset($params['nick']) )
>     {
>        $ct =& pfcContainer::Instance($this->container_type, true);
>        $ct->removeNick(NULL, $params['nick'] );
>     }

my ajax.php :
Code: Select all
<?php

$PFCIP='/usr/local/wiki/wiki/chat';
$PFCURLPREFIX='http://my.domain.here/wiki';




  $params =  array(
                 "serverid"       => md5(__FILE__),

                 'data_private_path' =>  $PFCIP.'/data/private',
                 'data_public_path' =>  $PFCIP.'/data/public',
                 'data_public_url' => $PFCURLPREFIX.'/chat/data/public',

       'theme_path' => $PFCIP.'/themes/',
                 'theme_url' => $PFCURLPREFIX.'/chat/themes/', // adjust to your url
                 'theme_default_path' => $PFCIP.'/themes/default',
       'theme_default_url' =>' $PFCURLPREFIX./chat/themes/default', // adjust to your url

                 'server_script_path' => $PFCIP.'/ajax.php',
                 'server_script_url' =>  $PFCURLPREFIX.'/chat/ajax.php', // adjust to your url
                 );

require_once("src/phpfreechat.class.php");
 $chat = new phpFreeChat($params);
?>

here is my wiki/includes/specials/Special.php :
Code: Select all
<?php

function wfSpecialChat()
{global $wgOut,$wgUser;

$wgCachePages=false;
$wgOut->setHTMLTitle('Messagerie instantanee - Firefox uniquement !');
$wgOut->setPageTitle('Messagerie instantanee - Firefox uniquement !');

$PFCIP='/usr/local/wiki/wiki/chat';
$PFCURLPREFIX='http://my.domain.here/wiki';

$nick0=$wgUser->getName();

$nick=$nick0.date('Hi');

if ($wgUser->getId()<1) {
//  $wgOut->addHTML('Vous devez d'abord <a href="/wikibackup/index.php/Special:Connexion">vous connecter</a><br>');
  $wgOut->addHTML( "Vous devez d'abord vous connecter" );
//$useless=1;
} else {
  require_once $PFCIP."/src/phpfreechat.class.php"; // adjust to your own path
  $params =  array("title"          => "Messagerie Instantanée",
                 "max_msg"        => 21,
                 "nick"         => $nick,
                  "openlinknewwindow"         => true,
                 "showsmileys"    => false,
                 "channels"      => array("General"),
                 "nickmarker"     => true,
                 "serverid"       => md5(__FILE__),
                 "btn_sh_smileys" => true,
       "frozen_nick" => true,
       "max_nick_len" => 20,

//       'container_cfg_chat_dir' => $PFCIP.'/../../chat/data/private/chat',

                 'data_private_path' =>  $PFCIP.'/data/private',
                 'data_public_path' =>  $PFCIP.'/data/public',
                 'data_public_url' => $PFCURLPREFIX.'/chat/data/public',

       'theme_path' => $PFCIP.'/themes/',
                 'theme_url' => $PFCURLPREFIX.'/chat/themes/', // adjust to your url
                 'theme_default_path' => $PFCIP.'/themes/default',
       'theme_default_url' =>' $PFCURLPREFIX./chat/themes/default', // adjust to your url

                 'server_script_path' => $PFCIP.'/ajax.php',
                 'server_script_url' =>  $PFCURLPREFIX.'/chat/ajax.php', // adjust to your url
                 );
  $chat = new phpFreeChat($params);
  $wgOut->addScript( $chat->printJavascript(true) );
  $wgOut->addScript( $chat->printStyle(true) );
  $wgOut->addHTML( $chat->printChat(true) );
}

}
?>
Last edited by pierro78 on Tue Feb 07, 2012 11:09 am, edited 1 time in total.
pierro78
New member
 
Posts: 1
Joined: Sat Feb 04, 2012 1:30 pm
Top

Postby john06 » Thu Apr 26, 2012 11:09 am

Si, en IE8 hay que poner en modo de compatibilidad para que trabaje bien, pero los clientes no saben eso... ¿Cómo podemos hacer para que la lista de usuarios salga bien y que el contenido del chat no se desborde?

En Crome y en Firefox en incluso en IE7 funciana de maravilla.

El problema está con el odioso IE8
mcse ,mcts ,70-640 ,70-643 ,mcsa ,70-680 ,anti snoring devices
john06
New member
 
Posts: 1
Joined: Thu Apr 26, 2012 11:07 am
Top

Previous

Post a reply
18 posts • Page 2 of 2 • 1, 2

Return to Contributions (v1.x)

Who is online

Users browsing this forum: No registered users and 15 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