MyBB Community Forums

Full Version: [Websocket] Miuna Shoutbox 9.0.0
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2015-06-17, 11:51 AM)propilot Wrote: [ -> ]Hey,

I saw you online, I was wondering if you figured out why it didn't work?

Also could it be because of my chatroom.php?

<?php

define('IN_MYBB', 1);
define('THIS_SCRIPT', 'chatroom.php');

require_once './global.php';
require_once MYBB_ROOT.'inc/functions_forumlist.php';
require_once MYBB_ROOT.'inc/class_parser.php';

add_breadcrumb("LGBTeens Chat Room", "chatroom.php");

if (in_array($mybb->user['usergroup'] , array(1,2,3,4,5,6,7,8,9,10))) {

    eval("\$html = \"".$templates->get("chatroom")."\";"); 

output_page($html);
}

else {
    error_no_permission(); 
}

?>

i see here...
and i don't know but $theme variable not loaded...
you can check for me after 'function MiunaShout() {' is samethig below
global $settings, $mybb, $theme, $templates, $miunashout, $codebutmiuna, $lang, $collapsed; ?
(2015-06-17, 12:50 PM)martec Wrote: [ -> ]
(2015-06-17, 11:51 AM)propilot Wrote: [ -> ]Hey,

I saw you online, I was wondering if you figured out why it didn't work?

Also could it be because of my chatroom.php?

<?php

define('IN_MYBB', 1);
define('THIS_SCRIPT', 'chatroom.php');

require_once './global.php';
require_once MYBB_ROOT.'inc/functions_forumlist.php';
require_once MYBB_ROOT.'inc/class_parser.php';

add_breadcrumb("LGBTeens Chat Room", "chatroom.php");

if (in_array($mybb->user['usergroup'] , array(1,2,3,4,5,6,7,8,9,10))) {

    eval("\$html = \"".$templates->get("chatroom")."\";"); 

output_page($html);
}

else {
    error_no_permission(); 
}

?>

i see here...
and i don't know but $theme variable not loaded...
you can check for me after 'function MiunaShout() {' is samethig below
global $settings, $mybb, $theme, $templates, $miunashout, $codebutmiuna, $lang, $collapsed; ?

Yeah that is only the .php file, the theme one is this:

<html>
<head>
<title>{$mybb->settings['bbname']} - Chat Room</title>
{$headerinclude}
</head>
<body>
{$header}

{$miunashout}


{$footer}
</body>
</html>
Also I put this code in:
function MiunaShout() { 

global $settings, $mybb, $theme, $templates, $miunashout, $codebutmiuna, $lang, $collapsed;

}
I got this output:

Fatal error: Cannot redeclare MiunaShout() (previously declared in /var/www/clients/client9/web20/web/chatroom.php:16) in /var/www/clients/client9/web20/web/inc/plugins/miunashoutbox.php on line 872


Edit:

Query list:

Quote:Template Statistics
Templates Used (Loaded for this Page) - 58 Total
smilie, bam_announcement_container, codebutmiuna, templateShoutBox, miunanewstemplate, miunanewsfootertemplate, debug_summary, error, error_inline, error_nopermission, error_nopermission_loggedin, footer, footer_contactus, footer_languageselect, footer_languageselect_option, footer_themeselect, footer_themeselector, global_awaiting_activation, global_bannedwarning, global_boardclosed_warning, global_board_offline_modal, global_pending_joinrequests, global_pm_alert, global_unreadreports, gobutton, header, headerinclude, header_menu_calendar, header_menu_memberlist, header_menu_portal, header_menu_search, header_quicksearch, header_welcomeblock_guest, header_welcomeblock_member, header_welcomeblock_member_admin, header_welcomeblock_member_moderator, htmldoctype, nav, nav_bit, nav_bit_active, nav_dropdown, nav_sep, nav_sep_active, redirect, task_image, usercp_themeselector_option, video_dailymotion_embed, video_facebook_embed, video_liveleak_embed, video_metacafe_embed, video_myspacetv_embed, video_veoh_embed, video_vimeo_embed, video_yahoo_embed, video_youtube_embed, global_usernameapproval, templateShoutBoxGuest, chatroom


Templates Requiring Additional Calls (Not Cached at Startup) - 7 Total
smilie, bam_announcement_container, codebutmiuna, templateShoutBox, miunanewstemplate, miunanewsfootertemplate, chatroom
(2015-06-17, 01:13 PM)propilot Wrote: [ -> ]Also I put this code in:
function MiunaShout() { 

global $settings, $mybb, $theme, $templates, $miunashout, $codebutmiuna, $lang, $collapsed;

}
I got this output:

Fatal error: Cannot redeclare MiunaShout() (previously declared in /var/www/clients/client9/web20/web/chatroom.php:16) in /var/www/clients/client9/web20/web/inc/plugins/miunashoutbox.php on line 872

no...
i ask to you check inc/plugins/miunashoutbox.php if $theme variable is declared in global in MiunaShout function
(2015-06-17, 06:56 PM)martec Wrote: [ -> ]
(2015-06-17, 01:13 PM)propilot Wrote: [ -> ]Also I put this code in:
function MiunaShout() { 

global $settings, $mybb, $theme, $templates, $miunashout, $codebutmiuna, $lang, $collapsed;

}
I got this output:

Fatal error: Cannot redeclare MiunaShout() (previously declared in /var/www/clients/client9/web20/web/chatroom.php:16) in /var/www/clients/client9/web20/web/inc/plugins/miunashoutbox.php on line 872

no...
i ask to you check inc/plugins/miunashoutbox.php if $theme variable is declared in global in MiunaShout function

Yes it is.

function MiunaShout() {

global $settings, $mybb, $theme, $templates, $miunashout, $codebutmiuna, $lang, $collapsed;

$codebutmiuna = miuna_bbcode_func();

if (!$lang->miunashoutbox) {
$lang->load('miunashoutbox');
}

if(!in_array((int)$mybb->user['usergroup'],explode(',',$mybb->settings['miunashout_grups_acc'])) && $mybb->user['uid']!=0) {
eval("\$miunashout = \"".$templates->get("templateShoutBox")."\";");
}
elseif ($mybb->user['uid']==0 && $settings['miunashout_guest']==1) {
eval("\$miunashout = \"".$templates->get("templateShoutBoxGuest")."\";");
}

}
(2015-06-17, 06:57 PM)propilot Wrote: [ -> ]
(2015-06-17, 06:56 PM)martec Wrote: [ -> ]
(2015-06-17, 01:13 PM)propilot Wrote: [ -> ]Also I put this code in:
function MiunaShout() { 

global $settings, $mybb, $theme, $templates, $miunashout, $codebutmiuna, $lang, $collapsed;

}
I got this output:

Fatal error: Cannot redeclare MiunaShout() (previously declared in /var/www/clients/client9/web20/web/chatroom.php:16) in /var/www/clients/client9/web20/web/inc/plugins/miunashoutbox.php on line 872

no...
i ask to you check inc/plugins/miunashoutbox.php if $theme variable is declared in global in MiunaShout function

Yes it is.

function MiunaShout() {

global $settings, $mybb, $theme, $templates, $miunashout, $codebutmiuna, $lang, $collapsed;

$codebutmiuna = miuna_bbcode_func();

if (!$lang->miunashoutbox) {
$lang->load('miunashoutbox');
}

if(!in_array((int)$mybb->user['usergroup'],explode(',',$mybb->settings['miunashout_grups_acc'])) && $mybb->user['uid']!=0) {
eval("\$miunashout = \"".$templates->get("templateShoutBox")."\";");
}
elseif ($mybb->user['uid']==0 && $settings['miunashout_guest']==1) {
eval("\$miunashout = \"".$templates->get("templateShoutBoxGuest")."\";");
}

}

very strange...
i will try reproduce the situation in my test forum. but you ned wait because i working now...
when i returned in my home i will try reproduce...
(2015-06-17, 07:12 PM)martec Wrote: [ -> ]
(2015-06-17, 06:57 PM)propilot Wrote: [ -> ]
(2015-06-17, 06:56 PM)martec Wrote: [ -> ]
(2015-06-17, 01:13 PM)propilot Wrote: [ -> ]Also I put this code in:
function MiunaShout() { 

global $settings, $mybb, $theme, $templates, $miunashout, $codebutmiuna, $lang, $collapsed;

}
I got this output:

Fatal error: Cannot redeclare MiunaShout() (previously declared in /var/www/clients/client9/web20/web/chatroom.php:16) in /var/www/clients/client9/web20/web/inc/plugins/miunashoutbox.php on line 872

no...
i ask to you check inc/plugins/miunashoutbox.php if $theme variable is declared in global in MiunaShout function

Yes it is.

function MiunaShout() {

global $settings, $mybb, $theme, $templates, $miunashout, $codebutmiuna, $lang, $collapsed;

$codebutmiuna = miuna_bbcode_func();

if (!$lang->miunashoutbox) {
$lang->load('miunashoutbox');
}

if(!in_array((int)$mybb->user['usergroup'],explode(',',$mybb->settings['miunashout_grups_acc'])) && $mybb->user['uid']!=0) {
eval("\$miunashout = \"".$templates->get("templateShoutBox")."\";");
}
elseif ($mybb->user['uid']==0 && $settings['miunashout_guest']==1) {
eval("\$miunashout = \"".$templates->get("templateShoutBoxGuest")."\";");
}

}

very strange...
i will try reproduce the situation in my test forum. but you ned wait because i working now...
when i returned in my home i will try reproduce...

Okay, thank you very much!

Also I edited the chatroom.php file, it didn't work:

<?php

define("IN_MYBB", 1);
define('THIS_SCRIPT', 'chatroom.php');

require_once './global.php';
require_once MYBB_ROOT.'inc/functions_forumlist.php';
require_once MYBB_ROOT.'inc/class_parser.php';
require_once MYBB_ROOT.'inc/plugins/miunashoutbox.php';
$templatelist = "index,ungrouped_chatbox,chatbox,headerinclude,ungrouped_headerinclude,codebutmiuna,templateShoutBox,templateShoutBoxGuest";
$templatelist = "index,index_whosonline,index_whosonline_memberbit,forumbit_depth1_cat,forumbit_depth2_cat,forumbit_depth2_forum,forumbit_depth1_forum_lastpost,forumbit_depth2_forum_lastpost,forumbit_moderators";
$templatelist .= ",index_birthdays_birthday,index_birthdays,index_logoutlink,index_statspage,index_stats,forumbit_depth3,forumbit_depth3_statusicon,index_boardstats,forumbit_depth2_forum_lastpost_never,forumbit_depth2_forum_viewers";
$templatelist .= ",forumbit_moderators_group,forumbit_moderators_user,forumbit_depth2_forum_lastpost_hidden,forumbit_subforums,forumbit_depth2_forum_unapproved_posts,forumbit_depth2_forum_unapproved_threads";

add_breadcrumb("LGBTeens Chat Room", "chatroom.php");


$message = $mybb->settings['dp_message'];

if ( $mybb->user['username'] == '' ) {
$username = 'Guest';
} else {
$username = $mybb->user['username'];
}

if (in_array($mybb->user['usergroup'] , array(1,2,3,4,5,6,7,8,9,10))) {

    eval("\$html = \"".$templates->get("chatroom")."\";"); 

output_page($html);
}

else {
    error_no_permission(); 
}

function my_plugin_wol($user_activity)
{
  global $parameters;
  if(strpos($user_activity['location'], "chatroom.php"))
  {
    $user_activity['activity'] = "ChatRoom";
    $user_activity['chat_room'] = $parameters['chat_room'];
  }
  return $user_activity;
} 

function my_plugin_friendly_loc($array)
{
  global $user_activity; 
  if($array['user_activity']['activity'] == "ChatRoom") /* Replace my_file with whatever you called the activity in the previous function. */
  {
    $array['location_name'] = "Chatting in <a href='http://lgbteens.net/chatroom.php'>Chat Room</a>";
  }
  return $array;
} 

?>
(2015-06-17, 02:20 AM)martec Wrote: [ -> ]v 3.3.0 released:

Quote:This version not work with Miuna Shoutbox Server 1.0, 2.0 and 3.0, you need upgrade Miuna Shoutbox Server to 3.5. You need delete application in openshift and create again with 3.2 or 3.5.
Quote:Installation of Miuna Shoutbox Server 3.5 is different of 1.0, 2.0, 3.0 and 3.2. So you need read first post again before install Miuna Shoutbox Server 3.5

New features:
- Added Logoff button

Upgrade from 3.2.1:

Unistall old version, upload new version and install.
Before unistall copy (save) configuration information in some place (txt file etc.), you will need again miuna shoutbox server information again after install new version.

Demo of new version:

https://martec.ml/test/

User: test
pass: test123

(2015-06-17, 01:18 AM)Dragonexsperm Wrote: [ -> ]"Error in register. Admin password not match, contact forum owner." Invalid Token. Why did this happen?

password that you puted in step 12 not match with password that you puted in ACP.

but it was working fine, then just did this.
(2015-06-18, 02:00 AM)Dragonexsperm Wrote: [ -> ]but it was working fine, then just did this.

strange
this happen too with my test forum?

(2015-06-17, 07:13 PM)propilot Wrote: [ -> ]Okay, thank you very much!

Also I edited the chatroom.php file, it didn't work:

revert all changes that you made here http://community.mybb.com/thread-166773-...pid1163881 or replace with fresh install files.

in inc/plugins/miunashoutbox.php

find:
	if (THIS_SCRIPT == 'portal.php' && $mybb->settings['miunashout_act_port']) {
		$templatelist .= 'codebutmiuna,templateShoutBox,templateShoutBoxGuest';
	}

add below:

	if (THIS_SCRIPT == 'chatroom.php') {
		$templatelist .= 'codebutmiuna,templateShoutBox,templateShoutBoxGuest';
	}

find:
if ($settings['miunashout_online'] && !$settings['miunashout_des_index']) {
	$plugins->add_hook('index_start', 'MiunaShout');
}

add above:

if ($settings['miunashout_online']) {
	$plugins->add_hook('shoutbox_start', 'MiunaShout');
}

in your chatroom.php replace with:

<?php

define('IN_MYBB', 1);
require "./global.php";

$plugins->run_hooks('shoutbox_start');

add_breadcrumb("LGBTeens Chat Room", "chatroom.php");

eval("\$chatroom = \"".$templates->get("chatroom")."\";");
output_page($chatroom);
?>

you can customize chatroom.php, but not remove '$plugins->run_hooks('shoutbox_start');' if not will not work.
Quote:Parse error: syntax error, unexpected end of file in /var/www/clients/client9/web20/web/inc/plugins/miunashoutbox.php on line 1012

Line 1012: ?>



Nvm! I get it fixed. Thank you very much!!! :-)
Would it be possible to make the shoutbox registration occur automatically when the user registers on the forum?
It's a tad bit confusing as is.