"expansion" is this:
Open Administration → Extensions
look Installed extensions
You are not logged in. Please login or register.
PunBB Forums → Posts by Visman
"expansion" is this:
Open Administration → Extensions
look Installed extensions
Update your expansions for PunBB v.1.4.4.
Remove all the banned users.
Clean the bans table in the database.
Delete the bans.php file in the cache folder.
Use the expansion forbidding registration of bots.
How many records contained in the bans table?
You want to ban people based on their ip? If yes, that ban their ip through the .htaccess file.
If I write about the hook, then you need to create an extension containing this hook.
se_start hook.
if (!empty($_GET['q']))
{
$_GET['action'] = 'search';
$_GET['keywords'] = $_GET['q'];
}
Punbb 1.4.4,
PHP 5.6.13,
Extensions:
BBCode buttons 1.4.18
Media.js 1.1.0
Spoiler BBcode 1.0.3
Stop spam from bots 0.3.3
Registration runs. The question is visible. If gave not the correct answer, again asks an accidental question.
1. Where the link to this extension which causes an error?
2. Where log of server errors (error.log)? Show errors here.
Small change (v 1.0.3): https://github.com/MioVisman/punbb_exte … 399adcd492
>in access logs ?
No, see error.log file.
BBCode buttons 1.4.18 - work in 1.4.4
fancy_video_tag - not work - see post http://punbb.ru/post44974.html#p44974 for work
fancy_user_activity - there are no data.
Look in a log of errors of the server (error.log).
Possibly, one of extensions adding a new bb-code isn't adapted for punbb 1.4.3/1.4.4.
v 1.1.0
For youtube:
1. Supports playlists (options: list, index, loop);
2. Support for separate video settings: start(t), end, list, rel, loop.
Test topic: ---
Show error log of server (usually error.log file).
Up to v 1.0.4
Disable all extensions with new bb-codes.
bb-codes work only if
if ($forum_config['p_message_bbcode'] == '1' && strpos($text, '[') !== false && strpos($text, ']') !== false)
Use ps_parse_message_bbcode hook
$text = preg_replace('#(?<=^|\s)(?:\#(\w+))(?=\s|$)#u', '<a href="http://search.twitter.com/search?q=$1" target="_blank">#$1</a>', $text);
>- why use % insted # ?
For #
$pattern[] = '#(?<=^|\s)(?:\#(\w+))(?=\s|$)#u';
one symbol more.
>- why use u instead ms ?
u -> Unicode
In this regular expression modifiers m and s don't make sense as search goes only on letters and figures.
this code work if any link on post,
if dont have link the hashtags wont be able sad
please ur help
Show links to messages where the code works incorrectly.
Return back $base_url variable, only specify right value (on the end there shouldn't be a slash).
>Would this have something to do with the passwords in the db?
Compare the tables users, the columns "password" and "salt" for versions 1.4.2 and 1.4.4. You have a backup 1.4.2?
In authorization of changes isn't present for version 1.4.4
1.4.2 == 1.4.4
// Login
if (isset($_POST['form_sent']) && empty($action))
{
$form_username = forum_trim($_POST['req_username']);
$form_password = forum_trim($_POST['req_password']);
$save_pass = isset($_POST['save_pass']);
($hook = get_hook('li_login_form_submitted')) ? eval($hook) : null;
// Get user info matching login attempt
$query = array(
'SELECT' => 'u.id, u.group_id, u.password, u.salt',
'FROM' => 'users AS u'
);
if (in_array($db_type, array('mysql', 'mysqli', 'mysql_innodb', 'mysqli_innodb')))
$query['WHERE'] = 'username=\''.$forum_db->escape($form_username).'\'';
else
$query['WHERE'] = 'LOWER(username)=LOWER(\''.$forum_db->escape($form_username).'\')';
($hook = get_hook('li_login_qr_get_login_data')) ? eval($hook) : null;
$result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
list($user_id, $group_id, $db_password_hash, $salt) = $forum_db->fetch_row($result);
$authorized = false;
if (!empty($db_password_hash))
{
$sha1_in_db = (strlen($db_password_hash) == 40) ? true : false;
$form_password_hash = forum_hash($form_password, $salt);
if ($sha1_in_db && $db_password_hash == $form_password_hash)
$authorized = true;
else if ((!$sha1_in_db && $db_password_hash == md5($form_password)) || ($sha1_in_db && $db_password_hash == sha1($form_password)))
{
$authorized = true;
$salt = random_key(12);
$form_password_hash = forum_hash($form_password, $salt);
// There's an old MD5 hash or an unsalted SHA1 hash in the database, so we replace it
// with a randomly generated salt and a new, salted SHA1 hash
$query = array(
'UPDATE' => 'users',
'SET' => 'password=\''.$form_password_hash.'\', salt=\''.$forum_db->escape($salt).'\'',
'WHERE' => 'id='.$user_id
);
($hook = get_hook('li_login_qr_update_user_hash')) ? eval($hook) : null;
$forum_db->query_build($query) or error(__FILE__, __LINE__);
}
}
($hook = get_hook('li_login_pre_auth_message')) ? eval($hook) : null;
if (!$authorized)
$errors[] = sprintf($lang_login['Wrong user/pass']);
// Did everything go according to plan?
if (empty($errors))
{
// Update the status if this is the first time the user logged in
if ($group_id == FORUM_UNVERIFIED)
{
$query = array(
'UPDATE' => 'users',
'SET' => 'group_id='.$forum_config['o_default_user_group'],
'WHERE' => 'id='.$user_id
);
($hook = get_hook('li_login_qr_update_user_group')) ? eval($hook) : null;
$forum_db->query_build($query) or error(__FILE__, __LINE__);
// Remove cache file with forum stats
if (!defined('FORUM_CACHE_FUNCTIONS_LOADED'))
{
require FORUM_ROOT.'include/cache.php';
}
clean_stats_cache();
}
// Remove this user's guest entry from the online list
$query = array(
'DELETE' => 'online',
'WHERE' => 'ident=\''.$forum_db->escape(get_remote_address()).'\''
);
($hook = get_hook('li_login_qr_delete_online_user')) ? eval($hook) : null;
$forum_db->query_build($query) or error(__FILE__, __LINE__);
$expire = ($save_pass) ? time() + 1209600 : time() + $forum_config['o_timeout_visit'];
forum_setcookie($cookie_name, base64_encode($user_id.'|'.$form_password_hash.'|'.$expire.'|'.sha1($salt.$form_password_hash.forum_hash($expire, $salt))), $expire);
($hook = get_hook('li_login_pre_redirect')) ? eval($hook) : null;
redirect(forum_htmlencode($_POST['redirect_url']).((substr_count($_POST['redirect_url'], '?') == 1) ? '&' : '?').'login=1', $lang_login['Login redirect']);
}
}
Check forum_hash() function for 1.4.2 and 1.4.4
// Generates a salted, SHA-1 hash of $str
function forum_hash($str, $salt)
{
$return = ($hook = get_hook('fn_forum_hash_start')) ? eval($hook) : null;
if ($return != null)
return $return;
return sha1($salt.sha1($str));
}
Check 'fn_forum_hash_start' Hook.
P.S. If that doesn't help, let all use recovery of the password.
Login works, but
You see the same message?
$pattern[] = '%(?<=^|\s)(?:#(\w+))(?=\s|$)%u';
$replace[] = '<a href=\"http://search.twitter.com/search?q=$matches[1]\" target=\"_blank\">#$matches[1]</a>';
let me learn
First post http://php.net/manual/en/reserved.varia … .php#94584
PunBB Forums → Posts by Visman
Powered by PunBB, supported by Informer Technologies, Inc.