and i wish to take a small of bit of it and add it as a widget and block for the side bar
is this posable?
PHP Code:
<?php
/*
* Name: Home Page
* Author: Bzchan <bzchan@animemahou.com>
* License: GPLv2
* Visibility: admin
* Description: Displays a front page with logo, search box and image count
* Documentation:
* Once enabled, the page will show up at the URL "home", so if you want
* this to be the front page of your site, you should go to "Board Config"
* and set "Front Page" to "home".
* <p>The images used for the numbers can be changed from the board config
* page. If you want to use your own numbers, upload them into a new folder
* in <code>/ext/home/counters</code>, and they'll become available
* alongside the default choices.
*/
class Home extends SimpleExtension {
public function onInitExt(InitExtEvent $event) {
global $config;
$config->set_default_string("home_links", '[$base/post/list|Posts]
[$base/comment/list|Comments]
[$base/tags|Tags]
[$base/wiki|Wiki]
[$base/wiki/more|»]');
}
public function onPageRequest(PageRequestEvent $event) {
global $config, $page;
if($event->page_matches("home")) {
$base_href = $config->get_string('base_href');
$data_href = get_base_href();
$sitename = $config->get_string('title');
$theme_name = $config->get_string('theme');
private function get_body() {
// returns just the contents of the body
global $database;
global $config;
$base_href = $config->get_string('base_href');
$data_href = get_base_href();
$sitename = $config->get_string('title');
$contact_link = $config->get_string('contact_link');
$counter_dir = $config->get_string('home_counter', 'default');