mirror of
https://github.com/e107inc/e107.git
synced 2025-08-21 05:41:58 +02:00
Plugin Builder: Added _menu and simple frontend file to addons list.
This commit is contained in:
@@ -9,36 +9,63 @@
|
||||
* e107 Blank Plugin
|
||||
*
|
||||
*/
|
||||
require_once("../../class2.php");
|
||||
|
||||
|
||||
e107::js('_blank','js/my.js','jquery'); // Load Plugin javascript and include jQuery framework
|
||||
e107::css('_blank','css/my.css'); // load css file
|
||||
e107::lan('_blank'); // load language file ie. e107_plugins/_blank/languages/English.php
|
||||
e107::meta('keywords','some words'); // add meta data to <HEAD>
|
||||
|
||||
require_once(HEADERF); // render the header (everything before the main content area)
|
||||
|
||||
|
||||
$sql = e107::getDB(); // mysql class object
|
||||
$tp = e107::getParser(); // parser for converting to HTML and parsing templates etc.
|
||||
$frm = e107::getForm(); // Form element class.
|
||||
$ns = e107::getRender(); // render in theme box.
|
||||
|
||||
$text = "";
|
||||
|
||||
if($rows = $sql->retrieve('blank','*',false,'',true)) // combined select and fetch function - returns an array.
|
||||
if (!defined('e107_INIT'))
|
||||
{
|
||||
// print_a($rows);
|
||||
foreach($rows as $key=>$value) // loop throug
|
||||
require_once("../../class2.php");
|
||||
}
|
||||
|
||||
|
||||
|
||||
class _blank_front
|
||||
{
|
||||
|
||||
function __construct()
|
||||
{
|
||||
$text .= $tp->toHtml($value['blank_type'])."<br />";
|
||||
e107::js('_blank','js/my.js','jquery'); // Load Plugin javascript and include jQuery framework
|
||||
e107::css('_blank','css/my.css'); // load css file
|
||||
e107::lan('_blank'); // load language file ie. e107_plugins/_blank/languages/English.php
|
||||
e107::meta('keywords','some words'); // add meta data to <HEAD>
|
||||
|
||||
}
|
||||
|
||||
$ns->tablerender("My Caption", $text);
|
||||
|
||||
|
||||
public function run()
|
||||
{
|
||||
|
||||
$sql = e107::getDB(); // mysql class object
|
||||
$tp = e107::getParser(); // parser for converting to HTML and parsing templates etc.
|
||||
$frm = e107::getForm(); // Form element class.
|
||||
$ns = e107::getRender(); // render in theme box.
|
||||
|
||||
$text = '';
|
||||
|
||||
if($rows = $sql->retrieve('blank','*',false,'',true)) // combined select and fetch function - returns an array.
|
||||
{
|
||||
// print_a($rows);
|
||||
foreach($rows as $key=>$value) // loop throug
|
||||
{
|
||||
$text .= $tp->toHtml($value['blank_type'])."<br />";
|
||||
}
|
||||
|
||||
$ns->tablerender("My Caption", $text);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
$_blankFront = new _blank_front;
|
||||
require_once(HEADERF); // render the header (everything before the main content area)
|
||||
$_blankFront->run();
|
||||
require_once(FOOTERF); // render the footer (everything after the main content area)
|
||||
exit;
|
||||
|
||||
|
Reference in New Issue
Block a user