(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;
}
?>