Hi, when copy and pasting from a text editor into a page, there's no line breaks. The page is published as one big block of text
Any ideas how I can sort it sp the formatting is correct? Thanks
Lurker, first time posting after running into a problem I can't find the answer to.
I've made a custom page that basically adds a full-page editor for the 'Bio' (FID2) field in userfields. It works, but I'd like to add the sceditor to it and the $codebuttons template doesn't display.
$codebuttons = build_mycode_inserter();
This doesn't seem to do anything, either.
How can I add the editor into a custom page?
What format would you use to import websites, I've tried to import it as a zip, but keep getting this error:
http://prntscr.com/oi4gnp
(2019-07-21, 08:08 PM)zackcx11 Wrote: [ -> ]What format would you use to import websites, I've tried to import it as a zip, but keep getting this error: http://prntscr.com/oi4gnp
You'll need a matching XML file to import.
Hi SvePu
Thank for your work.
I'm creating for the first time a MyBB forum and I installed your MyBB-PageManager plugin
- I installed the plug-in
- Created a page with PageManager following the instructions
But I can find the way to add this page on the main menu.
Maybe I'm doing something wrong. Your help is really appreciated.
Thank you
Rodrigo Cerqueira
@atomdel - you need to add those links manually in the templates
<?php
// Copyright 2012 Paul Hedman
define('IN_MYBB',1);
require_once('global.php');
define("PAGINATION",20);
$lang->load("modcp");
if($mybb->user['uid'] == 0)
{
error_no_permission();
}
add_breadcrumb("Yasaklanmış Kullanıcı Listesi");
if(isset($mybb->input['asc']))
{
$options['order_dir'] = 'asc';
$ascdesc = '&asc';
$ascdesci = '&desc';
} else {
$options['order_dir'] = 'desc';
$ascdesc = '&desc';
$ascdesci = '&asc';
}
switch($mybb->input['sortby'])
{
case 'issued':
$options['order_by'] = 'dateline';
break;
case 'lifted':
$options['order_by'] = 'lifted';
break;
default:
$options['order_by'] = 'dateline';
}
if(isset($mybb->input['page']))
{
$page = (int)$mybb->input['page'];
} else {
$page = 1;
}
$extra = "&orderby={$options['order_by']}{$ascdesc}";
$query = $db->simple_select("banned", "COUNT(uid) AS count");
$bannum = $db->fetch_field($query, "count");
$multipage = multipage($bannum,PAGINATION,$page,'bans.php?page={page}'.$extra);
$options['limit'] = PAGINATION;
$options['limit_start'] = ($page - 1) * PAGINATION;
$query = $db->simple_select('banned','*',null,$options);
$bans = '<tr>
<td class="tcat" align="center"><span class="smalltext"><strong>'.$lang->username.'</strong></span></td>
<td class="tcat" align="center"><span class="smalltext"><strong>'.$lang->reason.'</strong></span></td>
<td class="tcat" align="center"><span class="smalltext"><strong>'.$lang->ban_bannedby.'</strong></span></td>
<td class="tcat" align="center"><span class="smalltext"><strong><a href="bans.php?sortby=issued'.$ascdesci.'">Yasaklanma Tarihi</a></strong></span></td>
<td class="tcat" align="center"><span class="smalltext"><strong><a href="bans.php?sortby=lifted'.$ascdesci.'">Yasaklama Bitiş</a></strong></span></td>
</tr>';
$banlist = '';
$bantimes = fetch_ban_times();
while($banned = $db->fetch_array($query))
{
$user = get_user($banned['uid']);
$bannedby = get_user($banned['admin']);
if($banned['lifted'] == 'perm' || $banned['lifted'] == '' || $banned['bantime'] == 'perm' || $banned['bantime'] == '---')
{
$banlength = $lang->permanent;
$timeremaining = $lang->na;
}
else
{
$banlength = $bantimes[$banned['bantime']];
$remaining = $banned['lifted']-TIME_NOW;
$timeremaining = nice_time($remaining, array('short' => 1, 'seconds' => false))."";
if($remaining < 3600)
{
$timeremaining = "<span style=\"color: red;\">({$timeremaining} {$lang->ban_remaining})</span>";
}
else if($remaining < 86400)
{
$timeremaining = "<span style=\"color: maroon;\">({$timeremaining} {$lang->ban_remaining})</span>";
}
else if($remaining < 604800)
{
$timeremaining = "<span style=\"color: green;\">({$timeremaining} {$lang->ban_remaining})</span>";
}
else
{
$timeremaining = "({$timeremaining} {$lang->ban_remaining})";
}
$timeremaining = my_date($mybb->settings['dateformat'],$banned['lifted'])." <br/ ><span class=\"smalltext\">{$timeremaining}</span>";
}
// Sanitize all user inputs.
$user['username'] = htmlspecialchars_uni($user['username']);
$bannedby['username'] = htmlspecialchars_uni($bannedby['username']);
$banned['reason'] = htmlspecialchars_uni($banned['reason']);
$banlist .= "<tr>
<td class=\"trow1\" align=\"center\">".build_profile_link($user['username'], $user['uid'])."</td>
<td class=\"trow1\" align=\"center\">{$banned['reason']}</td>
<td class=\"trow1\" align=\"center\">".build_profile_link($bannedby['username'], $bannedby['uid'])."</td>
<td class=\"trow1\" align=\"center\">".my_date($mybb->settings['dateformat'],$banned['dateline'])."</td>
<td class=\"trow1\" align=\"center\">{$timeremaining}</td>
</tr>";
}
if($banlist == '')
{
$banlist = '<tr><td colspan="5">'.$lang->no_banned.'</td></tr>';
}
$bans .= $banlist;
$page = "<html>
<head>
<title>Yasaklanmış Kullanıcı Listesi</title>
{$headerinclude}
</head>
<body>
{$header}
<br />
<table border=\"0\" cellspacing=\"{$theme['borderwidth']}\" cellpadding=\"{$theme['tablespace']}\" class=\"tborder\">
<tr>
<td class=\"thead\" colspan=\"5\"><span class=\"smalltext\"><strong>Yasaklanmış Kullanıcı Listesi</strong></span></td>
</tr>
{$bans}
</table>
{$multipage}
{$footer}
</body>
</html>";
output_page($page);
?>
When you add the above code, such an error occurs. (User ban list code)
![[Image: ae6ab33a443.png]](https://camo.mybb.com/4f213fba1f01540dbc47432aa977dc2a94675402/68747470733a2f2f726573696d61672e636f6d2f70312f61653661623333613434332e706e67)
Is there a way to make the Advanced Side Box plugin appear on all custom pages made by this plugin?
Edit: This was solved here.
I'm using the below code to compile the list of users from a specific group:
<?php
global $headerinclude, $header, $theme, $footer, $db, $xtpf, $userfields;
$altbg = alt_trow();
$userlist = '';
$query = $db->simple_select("users", "*", "usergroup IN ('8')", array("order_by" => 'username', "order_dir" => 'ASC'));
while($users = $db->fetch_array($query))
{
$username = build_profile_link(format_name(htmlspecialchars_uni($users['username']), $users['usergroup'], $users['displaygroup']), $users['uid']);
$userlist .= '<tr><td class="'.$altbg.'">'.$username.', '.$users["usertitle"].' '.$userfields["fid4"].'</td></tr>';
$altbg = alt_trow();
}
$template='<html>
<head>
<title>'.$pages['name'].'</title>
{$headerinclude}
</head>
<body>
{$header}
<table border="0" cellspacing="'.$theme['borderwidth'].'" cellpadding="'.$theme['tablespace'].'" class="tborder">
<thead>
<tr>
<td class="thead">
<strong>'.$pages['name'].'</strong>
</td>
</tr>
</thead>
<tbody>
{$userlist}
</tbody>
</table>
<br />
{$footer}
</body>
</html>';
$template=str_replace("\'", "'", addslashes($template));
add_breadcrumb($pages['name']);
eval("\$page=\"".$template."\";");
output_page($page);
?>
What is the correct way to display a specific custom profile field next to the user title? " '.$userfields["fid4"].'" This variable does not work.