Thread: [Phpslash-commit] CVS: phpslash-ft/class Block_i.class,1.7,1.8
Brought to you by:
joestewart,
nhruby
From: Joe S. <joe...@us...> - 2001-11-07 19:39:59
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv10051 Modified Files: Block_i.class Log Message: housekeeping Index: Block_i.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_i.class,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Block_i.class 2001/10/09 23:21:45 1.7 --- Block_i.class 2001/11/07 19:39:56 1.8 *************** *** 7,19 **** require($_PSL[classdir] . '/Block.class'); class Block_i extends Block { /* Decare properties for class Block_i*/ ! var $templ, $debug; /* * class Block also defines the following properties: ! * slash, db, block_info, parser, parsedData */ ! function Block_i() { /* Constructor: Create sub-objects here, etc... */ --- 7,30 ---- require($_PSL[classdir] . '/Block.class'); + /** + * Interface Level access to the PHPSlash Block Engine. + * + * This object is how we display block data. It also + * provides the interface for block management. + * + */ class Block_i extends Block { /* Decare properties for class Block_i*/ ! var $psl, $templ, $debug; /* * class Block also defines the following properties: ! * psl, db, block_info, parser, parsedData */ ! ! /** ! * Block_i - constructor for the Block_i class ! * ! */ function Block_i() { /* Constructor: Create sub-objects here, etc... */ *************** *** 30,34 **** /* Start Template Object */ ! $this->templ = new Template($this->psl[templatedir]); $this->templ->debug = 0; --- 41,45 ---- /* Start Template Object */ ! $this->templ = new Template($this->psl['templatedir']); $this->templ->debug = 0; *************** *** 43,52 **** $this->templ->set_var( array( ROOTDIR => $this->psl[rooturl], ! IMAGEDIR => $this->psl[imageurl] )); } ! function newBlock() { - global $PHP_SELF; titlebar("100%", "Create a New Block"); --- 54,70 ---- $this->templ->set_var( array( ROOTDIR => $this->psl[rooturl], ! IMAGEDIR => $this->psl[imageurl] )); } ! ! ! /** ! * newBlock - Create a New Block ! * ! * Displays the form for entry of block info ! * ! * @access private ! */ function newBlock() { titlebar("100%", "Create a New Block"); *************** *** 90,94 **** /* display a blank form */ $this->templ->set_var(array( ! ACTION_URL => $PHP_SELF, BLOCK_TITLE => "", LOCATION => "", --- 108,112 ---- /* display a blank form */ $this->templ->set_var(array( ! ACTION_URL => $this->psl['phpself'], BLOCK_TITLE => "", LOCATION => "", *************** *** 103,109 **** $this->templ->p(OUT); } ! function editBlock($id) { - global $PHP_SELF; titlebar("100%", "Update a Block"); --- 121,134 ---- $this->templ->p(OUT); } ! ! /** ! * editBlock - Update a New Block ! * ! * displays the form for block edits ! * ! * @param integer id ! * @access private ! */ function editBlock($id) { titlebar("100%", "Update a Block"); *************** *** 201,205 **** $this->templ->set_var(array( ! ACTION_URL => $PHP_SELF, BLOCK_TITLE => $this->block_info["title"], LOCATION => $this->block_info["location"], --- 226,230 ---- $this->templ->set_var(array( ! ACTION_URL => $this->psl['phpself'], BLOCK_TITLE => $this->block_info["title"], LOCATION => $this->block_info["location"], *************** *** 216,224 **** } ! function listBlock() { - global $PHP_SELF,$_PSL; - $query = "SELECT block.id, title, --- 241,254 ---- } ! ! /** ! * listBlock - list all blocks ! * ! * displays the complete list of blocks ! * ! * @access private ! */ function listBlock() { $query = "SELECT block.id, title, *************** *** 236,242 **** $block_id = $this->db->f("id"); ! $modifyurl = "$_PSL[adminurl]/blockAdmin.php3?submit=edit&id=$block_id"; ! $delurl = "$_PSL[adminurl]/blockAdmin.php3?submit=delete&id=$block_id"; ! $viewurl = "$_PSL[adminurl]/blockAdmin.php3?submit=view&id=$block_id"; $this->templ->set_var(array( --- 266,272 ---- $block_id = $this->db->f("id"); ! $modifyurl = $this->psl['adminurl'] ."/blockAdmin.php3?submit=edit&id=". $block_id; ! $delurl = $this->psl['adminurl'] ."/blockAdmin.php3?submit=delete&id=". $block_id; ! $viewurl = $this->psl['adminurl'] ."/blockAdmin.php3?submit=view&id=". $block_id; $this->templ->set_var(array( *************** *** 258,261 **** --- 288,299 ---- } + /** + * getAllBlocksForIndex - wrapper to getBlocks + * + * Should use getBlocks instead, include for historical + * compatibility. + * + * @access public + */ function getAllBlocksForIndex($section, $column="") { $ary[section] = $section; *************** *** 294,298 **** } ! /* Takes an id and does stuff to return a html formatted block */ function parseBlock($ary, $column="") { --- 332,349 ---- } ! /** ! * parseBlock - Takes an id and does stuff to return a html formatted block ! * ! * @param array ary ! * ! * ary[section] = return html formatted blocks assigned to this section ! * ary[section_id] = return html formatted blocks assigned to this section_id ! * ! * @param string column ! * ! * @access private ! * ! * @return string output ! */ function parseBlock($ary, $column="") { |