mirror of
https://github.com/e107inc/e107.git
synced 2025-08-26 07:44:49 +02:00
More work on the blank plugin example
This commit is contained in:
40
e107_plugins/_blank/_blank.php
Normal file
40
e107_plugins/_blank/_blank.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* e107 Blank Plugin
|
||||
*
|
||||
*/
|
||||
require_once("../../class2.php");
|
||||
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.
|
||||
{
|
||||
// print_a($rows);
|
||||
foreach($rows as $key=>$value) // loop throug
|
||||
{
|
||||
$text .= $tp->toHtml($value['blank_type'])."<br />";
|
||||
}
|
||||
|
||||
$ns->tablerender("My Caption", $text);
|
||||
|
||||
}
|
||||
|
||||
require_once(FOOTERF); // render the footer (everything after the main content area)
|
||||
exit;
|
||||
|
||||
// For a more elaborate plugin - please see e107_plugins/gallery
|
||||
|
||||
?>
|
Reference in New Issue
Block a user