Will you people please start sanitising your code. There isn't a $forum_db->escape in sight there, and I'm assuming from that omission that little else input sanitisation and verification is done either. Code correctly from the start.
QFT
You are not logged in. Please login or register.
PunBB Forums → Posts by User33
Will you people please start sanitising your code. There isn't a $forum_db->escape in sight there, and I'm assuming from that omission that little else input sanitisation and verification is done either. Code correctly from the start.
QFT
True.
'extensions/'.$ext_info['id'].'/your_admin_page.php';
Then, you could make the page load from a file inside your extension.
Add your link through 'ca_fn_generate_admin_menu_new_link':
$forum_page['admin_menu']['your_admin_page'] = '<li class="'.((FORUM_PAGE_SECTION == 'your_admin_page') ? 'active' : 'normal').((empty($forum_page['admin_menu'])) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['your_admin_page']).'"><span>Your Page</span></a></li>';
Add one default sublink through 'ca_fn_generate_admin_menu_new_sublink':
if (FORUM_PAGE_SECTION == 'your_admin_page')
$forum_page['admin_submenu']['default'] = '<li class="'.((FORUM_PAGE == 'default-page') ? 'active' : 'normal').((empty($forum_page['admin_submenu'])) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['your_admin_page']).'">Default Page</span></a></li>';
Add the URL scheme for your page through 'co_modify_url_scheme':
$forum_url['your_admin_page'] = $ext_info['url'].'/your_admin_page.php';
Then, on 'your_admin_page.php' inside your extension folder:
if (!defined('FORUM_ROOT'))
define('FORUM_ROOT', '../');
require FORUM_ROOT.'include/common.php';
require FORUM_ROOT.'include/common_admin.php';
if (!$forum_user['is_admmod'])
message($lang_common['No permission']);
require FORUM_ROOT.'lang/'.$forum_user['language'].'/admin_common.php';
//add your language files
$forum_page['crumbs'] = array(
array($forum_config['o_board_title'], forum_link($forum_url['index'])),
array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])),
array('Your Page', forum_link($forum_url['your_admin_page']))
);
define('FORUM_PAGE_SECTION', 'your_admin_page');
define('FORUM_PAGE', 'default-page');
require FORUM_ROOT.'header.php';
ob_start();
?>
//Your content. To get an idea of the markup, check other admin pages
<?php
$tpl_temp = forum_trim(ob_get_contents());
$tpl_main = str_replace('<!-- forum_main -->', $tpl_temp, $tpl_main);
ob_end_clean();
require FORUM_ROOT.'footer.php';
There are probably some errors there because I made it right in this text area, but I guess you get the idea.
For a new section in 'admin/settings.php', use hook='aop_new_section' and:
if($section == 'your_section_name')
{
//Code
}
Then, to show your section's link under a certain admin menu tab, use hook='ca_fn_generate_admin_menu_new_sublink' and:
if (FORUM_PAGE_SECTION == 'management') //Example
$forum_page['admin_submenu']['your_section_name'] = '<li class="'.((FORUM_PAGE == 'your_section_name') ? 'active' : 'normal').((empty($forum_page['admin_submenu'])) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['your_section_name']).'">Section Name</a></li>';
For 'forum_link($forum_url['your_section_name'])' to work, you'll need this hook='co_modify_url_scheme' and:
$forum_url['your_section_name'] = 'admin/settings.php?section=your_section_name';
And you have to define the following before including 'header.php' for your link to display as active:
define('FORUM_PAGE_SECTION', 'management'); //or whatever "parent section" you want to use
define('FORUM_PAGE', 'your_section_name');
I think that's it
(For more info on the links, check out this file: 'include/common_admin.php')
I use ESET Smart Security.
With CSS:
.item-subject .item-starter{
display: block;
margin-left: 1.5em;
}
There is a fix (made by me): http://snipplr.com/view/10983/punquote- … js--fixed/
I said Ubuntu "fan", remember?
It looked awesome... until the background image loaded =/
I'd love to try to fix this, but I'm on Windows 7 and MultipleIEs won't work.
If you want to time a hook:
<hook id="hook_name"><![CDATA[
$start = microtime(true);
//your code (try both ways)
$hook_time['hook_name'] = microtime(true) - $start;
]]></hook>
Then add this extra hook:
<hook id="ft_debug_end"><![CDATA[
if($hook_time)
foreach($hook_time as $k=>$v)
echo '<p><b>'.$k.':</b> '.rtrim(sprintf('%f', $v), '0').' seconds</p>';
]]></hook>
then compare the times, I guess.
Take a look at 'admin/reindex.php'.
I don't think PunBB can do it automatically.
Something like this?
#brd-redirect{
padding-top: 68px;
background: transparent url('redirect-header.png') top center no-repeat;
}
#brd-redirect #brd-main{
margin: -10px;
padding: 0 50px 60px 50px;
background: transparent url('footer.png') bottom center no-repeat;
}
Well, if you're making it, it's not 3rd party, right? Because you're part of the dev team.
I was expecting something more like the old one (randomize, base the whole theme on one color, invert).
KeyDog, I think there's a wiki page for that.
You can't.
Sorry, but I don't support ads.
After the '<?php'
Woah, I can't believe I forgot about this. I'll check it out immediately.
Edit: I don't see what's wrong with the redirect page. (Apart from the white corners)
Then try at the front of 'include/common.php'.
Btw, the previous code I gave was crap. Use this:
if (strstr( $_SERVER['HTTP_HOST'], 'www.' ) === false)
{
header('HTTP/1.1 302 Found');
header('Location: http://www.' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
exit;
}
Has anyone tried it?
I'm using it right now and it's really cool!
53 then 48 to me.
Well, yeah... there's not enough info about the extension and author on the manifest.
For now, I guess you should do it manually.
PunBB Forums → Posts by User33
Powered by PunBB, supported by Informer Technologies, Inc.