MyBB Community Forums

Full Version: NEED help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have installed 2 plugin 1 is just a php file in /inc/plugins and the other is a plugins in /inc/plugins and /inc/languages/english

i refresh the page after have put the file in the correct folder i have the time only to enabled 1 plugin in admin control panel and Refresh the page and i have Now A white page .. i have Uninstalled all of the file of my root now is like Never Existed but the White page continue How i can Solve This
Quote:for white page errors,
recent entries of server error log should be checked to trace the cause.
in general, web host control panel should be having link to the error log
plugins are changed manualy to 18*

access forum by Reputation 16*
3019-1314479961-kapsForumAccessByRep.zip

add forum option 16*
1788-1382624006-AddForumOptions.zip

(2020-08-05, 01:53 PM).m. Wrote: [ -> ]
Quote:for white page errors,
recent entries of server error log should be checked to trace the cause.
in general, web host control panel should be having link to the error log


hi i use ubuntu 18.04 and nginx ,mysql where i can find the error log i am wrong or is in /var/log/nginx ? if is not made any error File does i need in the server config /etc/nginx in 1 of these file inside the folder to enabled the log for continue to see after what is the error ? What i need to do ? Sad omg i dont have loose all for a plugin

etc/nginx/nginx.config


# Logging Settings
##

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;


and when i go See the error.log is blank 0 byte

I have a Backups Past 5 day ago i have made Some change on template and new plugins install , Is possible To dont lost all by making A copy of the actual Folder of mybb and take the old backups and converge or i dont know

Maybe is can help to Determinate the error there is the first plugins installed before the error

<?php
/**
* Add Forum Options
* Copyright 2010 Starpaul20
*/

// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

// Tell MyBB when to run the hooks
$plugins->add_hook("postbit", "addforumoptions_post");
$plugins->add_hook("postbit_prev", "addforumoptions_post");
$plugins->add_hook("showthread_end", "addforumoptions_showthread");
$plugins->add_hook("reputation_add_start", "addforumoptions_reputation");
$plugins->add_hook("reputation_do_add_start", "addforumoptions_reputation");

$plugins->add_hook("admin_formcontainer_output_row", "addforumoptions_forum");
$plugins->add_hook("admin_forum_management_add", "addforumoptions_forum_add");
$plugins->add_hook("admin_forum_management_edit_commit", "addforumoptions_forum_commit");
$plugins->add_hook("admin_forum_management_add_commit", "addforumoptions_forum_commit");

// The information that shows up on the plugin manager
function addforumoptions_info()
{
return array(
"name" => "Add Forum Options",
"description" => "Adds four additional forum options for control over avatar, signature, quick reply display and post reputation.",
"website" => "http://galaxiesrealm.com/index.php",
"author" => "Starpaul20",
"authorsite" => "http://galaxiesrealm.com/index.php",
"version" => "2.2.3",
"guid" => "c83be3129f4d2ee537f294ee24216495",
"compatibility" => "16*"
);
}

// This function runs when the plugin is installed.
function addforumoptions_install()
{
global $db, $cache;
addforumoptions_uninstall();

$db->add_column("forums", "usequickreply", "int(1) NOT NULL default '1'");
$db->add_column("forums", "allowavatars", "int(1) NOT NULL default '1'");
$db->add_column("forums", "allowsignatures", "int(1) NOT NULL default '1'");
$db->add_column("forums", "allowpostreps", "int(1) NOT NULL default '1'");

$cache->update_forums();
}

// Checks to make sure plugin is installed
function addforumoptions_is_installed()
{
global $db;
if($db->field_exists("usequickreply", "forums"))
{
return true;
}
return false;
}

// This function runs when the plugin is uninstalled.
function addforumoptions_uninstall()
{
global $db, $cache;
if($db->field_exists("usequickreply", "forums"))
{
$db->drop_column("forums", "usequickreply");
}

if($db->field_exists("allowavatars", "forums"))
{
$db->drop_column("forums", "allowavatars");
}

if($db->field_exists("allowsignatures", "forums"))
{
$db->drop_column("forums", "allowsignatures");
}

if($db->field_exists("allowpostreps", "forums"))
{
$db->drop_column("forums", "allowpostreps");
}

$cache->update_forums();
}

// This function runs when the plugin is activated.
function addforumoptions_activate()
{
}

// This function runs when the plugin is deactivated.
function addforumoptions_deactivate()
{
}

// Add to forum management page
function addforumoptions_forum($above)
{
global $mybb, $lang, $form, $forum_data;
$lang->load("add_forum_options", true);

if($above['title'] == $lang->misc_options && $lang->misc_options)
{
$above['content'] .="<div class=\"forum_settings_bit\">".$form->generate_check_box('usequickreply', 1, $lang->use_quick_reply, array('checked' => $forum_data['usequickreply'], 'id' => 'usequickreply'))."</div>";
$above['content'] .="<div class=\"forum_settings_bit\">".$form->generate_check_box('allowavatars', 1, $lang->allow_avatars, array('checked' => $forum_data['allowavatars'], 'id' => 'allowavatars'))."</div>";
$above['content'] .="<div class=\"forum_settings_bit\">".$form->generate_check_box('allowsignatures', 1, $lang->allow_signatures, array('checked' => $forum_data['allowsignatures'], 'id' => 'allowsignatures'))."</div>";
$above['content'] .="<div class=\"forum_settings_bit\">".$form->generate_check_box('allowpostreps', 1, $lang->allow_post_reps, array('checked' => $forum_data['allowpostreps'], 'id' => 'allowpostreps'))."</div>";
}

return $above;
}

function addforumoptions_forum_add()
{
global $forum_data;
$forum_data['usequickreply'] = 1;
$forum_data['allowavatars'] = 1;
$forum_data['allowsignatures'] = 1;
$forum_data['allowpostreps'] = 1;
}

function addforumoptions_forum_commit()
{
global $db, $mybb, $cache, $fid;
$update_array = array(
"usequickreply" => intval($mybb->input['usequickreply']),
"allowavatars" => intval($mybb->input['allowavatars']),
"allowsignatures" => intval($mybb->input['allowsignatures']),
"allowpostreps" => intval($mybb->input['allowpostreps']),
);

$db->update_query("forums", $update_array, "fid='{$fid}'");

$cache->update_forums();
}

// Remove avatar/signature/post rep on postbit (main and preview postbits only)
function addforumoptions_post($post)
{
global $forum;
if($forum['allowsignatures'] != 1)
{
$post['signature'] = "";
}

if($forum['allowavatars'] != 1)
{
$post['useravatar'] = "";
}

if($forum['allowpostreps'] != 1)
{
$post['button_rep'] = "";
}

return $post;
}

// Remove quick reply box on showthread
function addforumoptions_showthread()
{
global $forum, $quickreply;
if($forum['usequickreply'] != 1)
{
$quickreply = "";
}
}

// Disallow post reputations
function addforumoptions_reputation()
{
global $db, $mybb, $lang, $templates, $theme, $headerinclude, $show_back;
$lang->load("add_forum_options");

$pid = intval($mybb->input['pid']);
if($pid)
{
$query = $db->query("
SELECT f.allowpostreps
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=p.fid)
WHERE p.pid='{$pid}'
");
$forum = $db->fetch_array($query);
if($forum['allowpostreps'] != 1)
{
$message = $lang->post_add_disabled;
eval("\$error = \"".$templates->get("reputation_add_error")."\";");
output_page($error);
exit;
}
}
}

?>

second plugins and + an inc/language/english file Not Added here..



<?php
/***************************************************************************
*
* Author: Dennis 'Kapsonfire' Kaspar
* Website: http://www.pokecom.eu
* Mail: kapsonfire-at-gmx-dot-de
*
***************************************************************************/

/****************************************************************************
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
$plugins->add_hook('admin_forum_management_begin','kaps_FABR_admin_forum_management_begin');
$plugins->add_hook('forum_permissions_start','kaps_FABR_forum_pemissions_start'); //deny access to forums/threads

if(!defined("IN_MYBB"))
{
die("Outside of MyBB");
}

if(!defined("PLUGINLIBRARY"))
{
define("PLUGINLIBRARY", MYBB_ROOT."inc/plugins/pluginlibrary.php");
}


function kapsForumAccessByRep_info()
{
return array(
"name" => "Forum Access by Reputation",
"description" => "Restrict access to forum by reputation",
"website" => "http://mods.mybb.com",
"author" => "Kapsonfire",
"authorsite" => "http://www.pokecom.eu",
"version" => "0.1",
"guid" => "a897a335d61251cc8ca742259265a6c1",
"compatibility" => "16*"
);
}



function kapsForumAccessByRep_is_installed()
{
global $db;
return $db->field_exists('kaps_accessbyrep','forums');
}

function kapsForumAccessByRep_install()
{

if(!file_exists(PLUGINLIBRARY))
{
flash_message('Pluginlibrary must be installed', "error");
admin_redirect("index.php?module=config-plugins");
}

global $PL;
$PL or require_once(PLUGINLIBRARY);

if($PL->version < 4)
{
flash_message('Pluginlibrary is to old. Need v4 or higher', "error");
admin_redirect("index.php?module=config-plugins");
}

$news = '
if($fid != 0)
{
global $plugins;
$back = $fid;
$plugins->run_hooks("forum_permissions_start",&$back);
if($back=="false")
{
$perm[\'canview\']=0;
return $perm;
}
}
';
// forums
$edits[] = array(
'search' => array('function fetch_forum_permissions(','{'),
'after' => array($news)
);
$PL->edit_core('kaps_farb', 'inc/functions.php', $edits, true);





global $db;
$db->query("ALTER TABLE ".TABLE_PREFIX."forums ADD kaps_accessbyrep INT NOT NULL");
}

function kapsForumAccessByRep_uninstall()
{
global $db;
global $PL;
$PL or require_once PLUGINLIBRARY;

$PL->edit_core('kaps_farb', 'inc/functions.php', array(), true);
$db->query("ALTER TABLE ".TABLE_PREFIX."forums DROP kaps_accessbyrep");
}


function kaps_FABR_forum_pemissions_start($fid)
{
global $db,$mybb;
$uid = $mybb->user['uid'];
if($fid==0)return;
$query = $db->simple_select("forums", '*', "fid='".$fid."'");//kaps_accessbyrep
$forum_data = $db->fetch_array($query);
$query = $db->simple_select("users", '*', "uid='".$uid."'");//reputation
$fuser= $db->fetch_array($query);
if($forum_data['kaps_accessbyrep']>$fuser['reputation'])
return 'false';
return 'true';




}

function kaps_FABR_admin_forum_management_begin()
{
global $sub_tabs,$mybb;
if(isset($mybb->input['fid']))
{
global $lang;
$sub_tabs['view_forum'] = array(
'title' => $lang->view_forum,
'link' => "index.php?module=forum-management&amp;fid=".$mybb->input['fid'],
'description' => $lang->view_forum_desc
);

$sub_tabs['add_child_forum'] = array(
'title' => $lang->add_child_forum,
'link' => "index.php?module=forum-management&amp;action=add&amp;pid=".$mybb->input['fid'],
'description' => $lang->add_child_forum_desc
);

$sub_tabs['edit_forum_settings'] = array(
'title' => $lang->edit_forum_settings,
'link' => "index.php?module=forum-management&amp;action=edit&amp;fid=".$mybb->input['fid'],
'description' => $lang->edit_forum_settings_desc
);

$sub_tabs['copy_forum'] = array(
'title' => $lang->copy_forum,
'link' => "index.php?module=forum-management&amp;action=copy&amp;fid=".$mybb->input['fid'],
'description' => $lang->copy_forum_desc
);

$sub_tabs['kaps_fabr'] = array(
'title' => 'Access by reputation',
'link' => "index.php?module=forum-management&amp;action=kaps_fabr&amp;fid=".$mybb->input['fid'],
'description' => ''
);


global $page,$db;


if($mybb->input['action'] == "kaps_fabr")
{

if(isset($_POST['kaps_fabr']))
{
if(is_numeric($_POST['kaps_fabr']))
{
$minifabr = (int)$_POST['kaps_fabr'];
$fid = (int)$mybb->input['fid'];
flash_message('Reputation settings saved.', 'success');
$db->query("UPDATE ".TABLE_PREFIX."forums SET kaps_accessbyrep = {$minifabr} WHERE fid = {$fid}");
}
else
{
flash_message('Reputation minimum must be digit.', 'error');
}
//admin_redirect("index.php?module=forum-management&amp;action=kaps_fabr&amp;fid=".$mybb->input['fid']);
}
$query = $db->simple_select("forums", '*', "fid='".intval($mybb->input['fid'])."'");
$forum_data = $db->fetch_array($query);
$page->add_breadcrumb_item('Access by reputation');
$page->output_header('Access by reputation');
$page->output_nav_tabs($sub_tabs, 'kaps_fabr');
$form = new Form("index.php?module=forum-management&amp;action=kaps_fabr&amp;fid=".$mybb->input['fid'], "post");
$form_container = new FormContainer('Access by reputation');
$form_container->output_row('Access by reputation', "Define the minimum reputation to access a forum", $form->generate_text_box('kaps_fabr', $forum_data['kaps_accessbyrep'], array('id' => 'kaps_fabr')), 'kaps_fabr');
$form_container->end();
$buttons[] = $form->generate_submit_button('save');
$form->output_submit_wrapper($buttons);
$form->end();
$page->output_footer();







}
}
}

i can provide the file If any can test in A demo board and see where is the error of the white page and After help me to recover my Board Sad for the moment i try in a second computer to Recover the backups 5 day i have made a Lot of work Without sleep a lot .. Sad