• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ phpBB, Simple Machines Forum (SMF), and Forum Software (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Same admin in both scripts

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

Post a reply
6 posts • Page 1 of 1

Postby azzam » Tue Feb 17, 2009 11:51 am

How to apply phpbb admin and mods in phpfreechat too?

I saw a thread for phpbb2 but i am using phpbb3.

Thankyou
azzam
New member
 
Posts: 4
Joined: Mon Feb 16, 2009 8:52 pm
Top

Postby OldWolf » Wed Feb 18, 2009 7:52 am

There's also a phpbb3 thread if you look down just a bit.
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby azzam » Wed Feb 18, 2009 9:41 am

Could you please give me instructions how to do it.Because i tried alot of codes.With admin variable and rank variables but sometimes it give all users admin permissions and some time to no one.

Please help

Thankyou
azzam
New member
 
Posts: 4
Joined: Mon Feb 16, 2009 8:52 pm
Top

Postby OldWolf » Wed Feb 18, 2009 4:22 pm

Here is the file, spelled out for you, in the topic directly below your topic. This does not grant admin privileges, you will have to work out that part on your own. All you'd be doing to get admin is have phpbb check to see if the user is an admin or not... if they are, set the parameter "isadmin" to true, and if not, set it to false.

http://www.phpfreechat.net/forum/viewtopic.php?id=2266
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby azzam » Thu Feb 19, 2009 10:56 am

Thankyou.
I have another question.I don't want to make another thread to disturb you.lolz.

Code: Select all
    <?php
    define('IN_PHPBB', true);
    $phpbb_root_path = '../'; // See phpbb_root_path documentation
    $phpEx = substr(strrchr(__FILE__, '.'), 1); // Set the File extension for page-wide usage.
    include($phpbb_root_path . 'common.' . $phpEx); // include the common.php file, this is important, especially for database connects.

    // Start session management
    $user->session_begin();
    $auth->acl($user->data);
    $user->setup('viewforum');

    get_username_string ;
    $oog = $user->data [username];

    // redirect to phpBB logon page if the user is not logged in
    if ($oog == "Anonymous")
        {
          header("Location: http://" . $_SERVER[SERVER_NAME] ."/ucp.php?mode=login&redirect=chat/");
        }

    $utz = $user->data['user_timezone']; // Get user's time zone information from phpBB3 account settings

    require_once dirname(__FILE__)."/src/phpfreechat.class.php";
    $params = array();
    $params["container_type"]         = "";
    $params["container_cfg_mysql_host"] = "sql113.byethost13.co";
    $params["container_cfg_mysql_port"] = 3306;
    $params["container_cfg_mysql_database"] = "";
    $params["container_cfg_mysql_table"] = "phpfreechat";
    $params["theme"] = "default";
    $params["container_cfg_mysql_username"] = "";
    $params["container_cfg_mysql_password"] = "";
    $params["nick"]              = $user->data [username];
    $params["channels"]          = array("General","Boys","Girls","Friends","Singles","Love");
    $params['admins'] = array('Azzam Malik' => '',
    'Administrator' => '');
    $params["frozen_nick"]    = true;     // do not allow to change the nickname
    $params["isadmin"] = false; // just for debug
    $params["language"] = "en_US";
    $params["serverid"] = md5(survivorsresources);
    $params["time_offset"] =  $utz*60*60; // Sets user's time_offset to their timezone

    $chat = new phpFreeChat( $params );

    // Create the Chat HTML
    $chat_html = $chat->printChat(true);

    // Store the HTML in the template variables
    $template->assign_vars(array('CHAT_HTML' => $chat_html));

    // Lets build a page ...
    page_header('Chat');

    $template->set_filenames(array(
       'body' => 'phpChat.html')
    );
    make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));

    page_footer();

    ?>

1) When ever i enter param /join Channel NAME in chat. Its show me join channel parma missing.
And when ever chat starts all these channels open by default.Is there any way so Just one channel open when chat starts and after that user can select cahnnel from lst or any parma.

Edited:

Now /ban /leave notthing working.Just rehash and idntify working..
Thankyou :)
Last edited by azzam on Thu Feb 19, 2009 11:22 am, edited 1 time in total.
azzam
New member
 
Posts: 4
Joined: Mon Feb 16, 2009 8:52 pm
Top

Postby OldWolf » Fri Feb 20, 2009 4:43 am

Using the parameters, you can set what the user's channel's start with. Check out the parameter list for all the things you can customize (it's on the left menu of this site).

As for the commands... what exactly are you typing?
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top


Post a reply
6 posts • Page 1 of 1

Return to phpBB, Simple Machines Forum (SMF), and Forum Software (v1.x)

Who is online

Users browsing this forum: No registered users and 6 guests

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