• 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

cannot log it to admin

Integration help for Joomla, Drupal, and Wordpress

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

Post a reply
5 posts • Page 1 of 1

Postby Dezi » Sun Dec 19, 2010 6:28 pm

hello,
I've installed the phpfreechat script in my wordpress website www.manipurtv.com/chat but i try my best but cannot log in as an admin, can anyone please guide me how to get oper access
Dezi
New member
 
Posts: 4
Joined: Sun Dec 19, 2010 6:26 pm
Top

Postby Dezi » Sun Dec 19, 2010 7:17 pm

Code: Select all
<?php

require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"] = "Welcome To MANIPURTV CHAT ROOM";
$params["nick"] = "guest".rand(1,1000);  // setup the intitial nickname
$params['firstisadmin'] = true;
//$params["isadmin"] = true; // makes everybody admin: do not use it on production servers ;)
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["debug"] = false;
$chat = new phpFreeChat( $params );

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title>MANIPURTV NEWS - CHAT ROOM</title>
  <link rel="stylesheet" title="classic" type="text/css" href="style/generic.css" />
  <link rel="stylesheet" title="classic" type="text/css" href="style/header.css" />
  <link rel="stylesheet" title="classic" type="text/css" href="style/footer.css" />
  <link rel="stylesheet" title="classic" type="text/css" href="style/menu.css" />
  <link rel="stylesheet" title="classic" type="text/css" href="style/content.css" /> 
 </head>
 <body>

<div class="header">
      <img alt="phpFreeChat" src="http://manipurtv.com/wp-content/uploads/2010/12/mtvlogo3.png" class="logo2" />
</div>

<div class="menu">
      <ul>
        <li class="sub title">MANIPURTV</li>
        <li>
          <ul class="sub">
            <li class="item">
              <a href="http://www.manipurtv.com">HOME</a>
            </li>
            <?php if (file_exists(dirname(__FILE__)."/checkmd5.php")) { ?>
            <li>
              <a href="http://manipurtv.com/category/istv-news/">ISTV NEWS</a>
            </li>
            <?php } ?>
            <!--
            <li class="item">
              <a href="admin/">Administration</a>
            </li>
            -->
          </ul>
        </li>
        <li class="sub title">MENU</li>
        <li>
          <ul>
            <li class="item">
              <a href="http://manipurtv.com/category/celebrities/">CELEBRITIES</a>
            </li>
            <li class="item">
              <a href="http://http://www.manipurtv.net/videos/all/latest">VIDEOS</a>
            </li>
            <li class="item">
              <a href="http://http://www.manipurtv.net/audios/all/latest">SONGS</a>
            </li>
            <li class="item">
              <a href="http://http://manipurtv.com/category/breaking-news/">BREAKING NEWS</a>
            </li>
            <li class="item">
              <a href="http://www.http://manipurtv.com/games/">GAMES</a>
            </li>
            <li class="item">
              <a href="http://http://www.manipurtv.net/photos/all/latest">PHOTOS</a>
            </li>
          </ul>
        </li>
      </ul>
      <p class="partner">
        <a href="http://www.manipurtv.net/static_page/12_Advertise"><img alt="http://www.manipurtv.net/static_page/12_Advertise" src="http://manipurtv.com/wp-content/uploads/2010/11/nongad.jpg" /></a><br/>
      </p>
</div>

<div class="content">
  <?php $chat->printChat(); ?>
  <?php if (isset($params["isadmin"]) && $params["isadmin"]) { ?>
    <p style="color:red;font-weight:bold;">Warning: because of "isadmin" parameter, everybody is admin. Please modify this script before using it on production servers !</p>
  <?php } ?>
</div>

<div class="footer">
  <span class=" 2010 MANIPUR NEWS TV – :. All Rights Reserved.">2010 MANIPUR NEWS TV – :. All Rights Reserved. :</span>
 
</div>
   
</body></html>
Dezi
New member
 
Posts: 4
Joined: Sun Dec 19, 2010 6:26 pm
Top

Postby re*s.t.a.r.s.*2 » Sun Dec 19, 2010 8:20 pm

Well without much information about how is sitting your blog folder and the like I came up with this.

Code: Select all
<?php
require_once('./wp-config.php');
$current_user = wp_get_current_user();
$user_name = addslashes($current_user->display_name);
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"] = "Welcome To MANIPURTV CHAT ROOM";
// this test if the user is registered and gives propper nick to the chat
if (!empty($user_name)){$params["nick"] = $user_name;
}
else
{
$ip = $_SERVER['REMOTE_ADDR'];
$desc = md5($ip);
$preview = substr($desc, 3, 6);
$preview = preg_replace("/[^0-9]/", '', $preview);
$params["nick"] =  "guess".$preview;
}
if( current_user_can('delete_posts')){$params['isadmin'] = TRUE;}else{$params["isadmin"] = FALSE;}
$params["frozen_nick"] = TRUE;
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["debug"] = false;
$chat = new phpFreeChat( $params );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title>MANIPURTV NEWS - CHAT ROOM</title>
  <link rel="stylesheet" title="classic" type="text/css" href="style/generic.css" />
  <link rel="stylesheet" title="classic" type="text/css" href="style/header.css" />
  <link rel="stylesheet" title="classic" type="text/css" href="style/footer.css" />
  <link rel="stylesheet" title="classic" type="text/css" href="style/menu.css" />
  <link rel="stylesheet" title="classic" type="text/css" href="style/content.css" /> 
 </head>
 <body>

<div class="header">
      <img alt="phpFreeChat" src="http://manipurtv.com/wp-content/uploads/2010/12/mtvlogo3.png" class="logo2" />
</div>

<div class="menu">
      <ul>
        <li class="sub title">MANIPURTV</li>
        <li>
          <ul class="sub">
            <li class="item">
              <a href="http://www.manipurtv.com">HOME</a>
            </li>
            <?php if (file_exists(dirname(__FILE__)."/checkmd5.php")) { ?>
            <li>
              <a href="http://manipurtv.com/category/istv-news/">ISTV NEWS</a>
            </li>
            <?php } ?>
            <!--
            <li class="item">
              <a href="admin/">Administration</a>
            </li>
            -->
          </ul>
        </li>
        <li class="sub title">MENU</li>
        <li>
          <ul>
            <li class="item">
              <a href="http://manipurtv.com/category/celebrities/">CELEBRITIES</a>
            </li>
            <li class="item">
              <a href="http://http://www.manipurtv.net/videos/all/latest">VIDEOS</a>
            </li>
            <li class="item">
              <a href="http://http://www.manipurtv.net/audios/all/latest">SONGS</a>
            </li>
            <li class="item">
              <a href="http://http://manipurtv.com/category/breaking-news/">BREAKING NEWS</a>
            </li>
            <li class="item">
              <a href="http://www.http://manipurtv.com/games/">GAMES</a>
            </li>
            <li class="item">
              <a href="http://http://www.manipurtv.net/photos/all/latest">PHOTOS</a>
            </li>
          </ul>
        </li>
      </ul>
      <p class="partner">
        <a href="http://www.manipurtv.net/static_page/12_Advertise"><img alt="http://www.manipurtv.net/static_page/12_Advertise" src="http://manipurtv.com/wp-content/uploads/2010/11/nongad.jpg" /></a><br/>
      </p>
</div>

<div class="content">
  <?php $chat->printChat(); ?>
</div>

<div class="footer">
  <span class=" 2010 MANIPUR NEWS TV – :. All Rights Reserved.">2010 MANIPUR NEWS TV – :. All Rights Reserved. :</span>
 
</div>
   
</body></html>

The username that is going to be admin must at minimum be able to delete post in order to get the admin flag..
Last edited by re*s.t.a.r.s.*2 on Sun Dec 19, 2010 9:40 pm, edited 1 time in total.
Search gas prices in Los Angeles at tankUpLA
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby Dezi » Sun Dec 19, 2010 8:48 pm

Warning: require_once(../blog/wp-config.php) [function.require-once]: failed to open stream: No such file or directory in /home/manipurt/public_html/manipurtv.net/chat/index.php on line 2

Fatal error: require_once() [function.require]: Failed opening required '../blog/wp-config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/manipurt/php') in /home/manipurt/public_html/manipurtv.net/chat/index.php on line 2
Dezi
New member
 
Posts: 4
Joined: Sun Dec 19, 2010 6:26 pm
Top

Postby re*s.t.a.r.s.*2 » Sun Dec 19, 2010 8:53 pm

can you put the require once like this,
I have updated the previous whole code, please copy paste in your index.php.

./wp-config.php

or

/wp-config.php

Matter of fact its that I don't know how you set up your wordpress...

I use /blog and some just trow the files in the root folder...
Without this info I am afraid I cant help you out.. please respond..
Last edited by re*s.t.a.r.s.*2 on Sun Dec 19, 2010 9:43 pm, edited 1 time in total.
Search gas prices in Los Angeles at tankUpLA
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top


Post a reply
5 posts • Page 1 of 1

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

Who is online

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