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

Is redirect supposed to be working in b9?

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

Post a reply
7 posts • Page 1 of 1

Postby Jensern » Sun Mar 11, 2007 5:16 pm

Hi,

At the moment, I cannot get redirect to work (or anything else which uses the same response/handler, such as locking the chat).

Is this a known issue, or am I simply doing something wrong?

Thanks.
Jensern
New member
 
Posts: 2
Joined: Sun Mar 11, 2007 5:09 pm
Top

Postby phpfreechat » Sun Mar 11, 2007 8:30 pm

What is the code that doesn't work ?
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Jensern » Mon Mar 12, 2007 3:55 pm

I tested it with the simple demo1 as well, to be sure none of the other code in my own setup is breaking anything.

Here is demo1 with 3 extra lines (debug, islocked and lockurl):
Code: Select all
<?php

require_once dirname(__FILE__)."/../src/phpfreechat.class.php";
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["debug"] = true;
$params["islocked"] = true;
$params["lockurl"] = 'http://www.google.com';
$chat = new phpFreeChat($params);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
       "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>phpFreeChat demo</title>

    <?php $chat->printJavascript(); ?>
    <?php $chat->printStyle(); ?>
  </head>
   
  <body>
    <?php $chat->printChat(); ?>

<?php
  // print the current file
  echo "<h2>The source code</h2>";
  $filename = __FILE__;
  echo "<p><code>".$filename."</code></p>";
  echo "<pre style="margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;">";
  $content = file_get_contents($filename);
  echo htmlentities($content);
  echo "</pre>";
?>
  </body>
 
</html>

If the chat is locked while you are using it, nothing happens.
If you attempt to connect to a locked chat, nothing happens.

Straight out /redirect doesn't seem to be working either, though.
Jensern
New member
 
Posts: 2
Joined: Sun Mar 11, 2007 5:09 pm
Top

Postby PeterK » Tue Jun 19, 2007 12:05 pm

My answer might be a little late, but I had the same problem and found an answer.

I'm using b10 and redirecting via 'islocked' and 'lockurl' didn't work. I got an error message which said the function xajaxResponse::addRedirect is not defined. I searched the classes functions list and found xajaxResponse::redirect.

You have to edit the file '../src/proxies/lock.class.php' line 47
Change
Code: Select all
$xml_reponse->addRedirect($c->lockurl);

to
Code: Select all
$xml_reponse->redirect($c->lockurl);

Don't know if this method has any drawbacks, but it worked for me.

Good luck,
Peter
PeterK
New member
 
Posts: 3
Joined: Tue Jun 19, 2007 11:19 am
Top

Postby phpfreechat » Sat Jun 23, 2007 11:07 am

PeterK is right, this is a bug and he fixed it the right way. It should work with this fix.
Thank you PeterK for your fix and thank you Jensern for your bug report.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby PeterK » Mon Jun 25, 2007 8:36 am

Hi Kerphi,

no problem. You did a great job in creating PHP Free Chat. Thanks for that!

Peter
PeterK
New member
 
Posts: 3
Joined: Tue Jun 19, 2007 11:19 am
Top

Postby Darklord » Tue May 05, 2009 6:41 pm

Hi there,
I cant seem to get this http redirect working also.ive read ur posts and went looking in the lock.class file,but its correct there. Instead of redirecting to the specified page filled in, it redirects me to the phpfreechat site. So I guess its working, but not the way or where I want it to go to. can anyone please help?


my code looks like this:

<?php

include('chk_ban.php');
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array("title" => "chat",
"max_msg" => 0,
"clock" => false,
"nickmarker" => false,
"startwithsound" => false,
);
$params["admins"] = array("Ops" => "xxx");
$params["channels"] = array("Cheers");
$params["frozen_channels"] = array("Cheers");
$params["refresh_delay"] = 2000; // 2000ms = 2s
$params["refresh_delay_steps"] = array("2000","20000","3000","30000","5000","60000","8000","300000","15000","600000","30000"); // 4000ms = 4s
$params["timeout"] = 35000; // 35000ms = 35s
$params["quit_on_closedwindow"] = true;
$params["skip_proxies"]= array("noflood");
$params["proxies_cfg"]["censor"]["words"] = array("fuck","neuken","geil","horny","beffen","Kut","lul","kanker","hoer","kutwijf","Hoerenloper","motjo","dikkelul","kittelaar","kietelaar",
"slet","sex","poep","bitch","kanker","neuken","tering","naaie","naaien","tollie","hoer","joemapangpang","pangpang","koulo","kouloh","sakasaka","bana","anchel","anchil","antjel","antjil","bakataka","bebal","begok","bhatiaan","Boerchatta","Boertien","chode","chodelal","choenie","diancuk","djalang","djembot","dolo","dolodiki","gaandu","gandoe","gatel","Goslaar","ietil","kasmien","kelamin","koetia","kontol","contol","Mariku","ngantjel","ngantjeng","njendot","njentot","noenie","pheler","philher","philler","potha","Tjode","Tjodeh","tjoenie","toeroh","turomentol","zakar");
$params["proxies_cfg"]["censor"]["replaceby"] = "*";
$params["proxies_cfg"]["censor"]["regex"] = false;
$params["nickmeta_private"] = array("ip");
$params["frozen_nick"] = true; // do not allow to change the nickname
$params["shownotice"] = 3; // 0 = nothing, 1 = just nickname changes, 2 = connect/quit, 3 = nick + connect/quit
$params["max_nick_len"] = 10; // nickname length could not be longer than 10 caracteres
$params["max_text_len"] = 550; // a message cannot be longer than 50 caracteres
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["theme"] = "default";
$params["islocked"] = true;
$params["lockurl"] = 'http://www.google.com';
//$params["debug"] = true;
$chat = new phpFreeChat( $params );

?>
Darklord
New member
 
Posts: 1
Joined: Tue May 05, 2009 6:27 pm
Top


Post a reply
7 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

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