cvs: pear /Forum/docs TODO phorum4.mysql /Forum/lib/plugins plugin.php /Forum/lib/skins/simple footer.tpl.php form.tpl.php header.tpl.php
index.tpl.php list.tpl.php read.tpl.php

From: Date: Sat, 06 Oct 2001 22:08:22 +0000
Subject: cvs: pear /Forum/docs TODO phorum4.mysql /Forum/lib/plugins plugin.php /Forum/lib/skins/simple footer.tpl.php form.tpl.php header.tpl.php
index.tpl.php list.tpl.php read.tpl.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-941@lists.php.net to get a copy of this message
mog Sat Oct 6 18:08:22 2001 EDT Added files: /pear/Forum/docs TODO phorum4.mysql /pear/Forum/lib/plugins plugin.php /pear/Forum/lib/skins/simple footer.tpl.php form.tpl.php header.tpl.php index.tpl.php list.tpl.php read.tpl.php Log: PEAR Forum checkin.

Index: pear/Forum/docs/phorum4.mysql +++ pear/Forum/docs/phorum4.mysql # MySQL dump 8.13 # # Host: localhost Database: phorum #-------------------------------------------------------- # Server version 3.23.36 # # Table structure for table 'phorum4' # CREATE TABLE phorum4 ( forum_id int(11) NOT NULL auto_increment, name char(50) NOT NULL default '', active enum('Y','N') NOT NULL default 'N', description char(255) NOT NULL default '', parent_id smallint(6) NOT NULL default '0', table_name char(50) NOT NULL default 'phorum4', html enum('N','Y') NOT NULL default 'N', default_skin char(100) NOT NULL default 'simple', is_folder enum('Y','N') NOT NULL default 'N', count int(10) unsigned NOT NULL default '0', max_id int(10) unsigned NOT NULL default '0', last_post int(10) unsigned NOT NULL default '0', PRIMARY KEY (forum_id), KEY name (name), KEY active (active) ) TYPE=MyISAM; # # Dumping data for table 'phorum4' # INSERT INTO phorum4 VALUES (2,'Phorum 4 Installation','Y','Post any questions regarding installing here.',1,'phorum4','N','phorum3','N',124,1555,991161283); INSERT INTO phorum4 VALUES (3,'Phorum 4 Development','Y','Wan\'t to do something with your site or you found a bug?',1,'phorum4','N','phorum3','N',111,1599,991264935); INSERT INTO phorum4 VALUES (1,'Phorum4 default installation','N','',1,'phorum4','N','phorum3','Y',1,154,987416155); INSERT INTO phorum4 VALUES (4,'Phorum 4 Demo','Y','Use this forum for testing.',1,'phorum4','N','phorum3','N',1308,1601,991267398); INSERT INTO phorum4 VALUES (5,'Phorum 4 Skins','Y','Want to make a skin? Ask questions here!',1,'phorum4','N','phorum3','N',58,1602,991267549); # MySQL dump 8.13 # # Host: localhost Database: phorum #-------------------------------------------------------- # Server version 3.23.36 # # Table structure for table 'phorum4_user' # CREATE TABLE phorum4_user ( user_id int(10) unsigned NOT NULL auto_increment, user char(15) NOT NULL default '', author char(30) NOT NULL default '', pass char(32) NOT NULL default '', homepage char(100) NOT NULL default '', email char(50) NOT NULL default '', image char(1) NOT NULL default '', signature char(255) NOT NULL default '', PRIMARY KEY (user_id) ) TYPE=MyISAM; # # Table structure for table 'phorum4_headers' # CREATE TABLE phorum4_headers ( message_id bigint(20) unsigned NOT NULL auto_increment, forum_id tinyint(4) unsigned NOT NULL default '0', thread_id bigint(20) unsigned NOT NULL default '0', parent_id bigint(20) unsigned NOT NULL default '0', thread_updated int(11) unsigned NOT NULL default '0', timestamp int(11) unsigned NOT NULL default '0', author char(37) NOT NULL default '', user_id int(11) unsigned NOT NULL default '0', subject char(50) NOT NULL default '', email char(50) NOT NULL default '', host char(50) NOT NULL default '', email_reply enum('N','Y') NOT NULL default 'N', approved enum('N','Y') NOT NULL default 'Y', PRIMARY KEY (message_id), KEY author (author), KEY user_id (user_id), KEY datestamp (timestamp), KEY thread_id (thread_id), KEY parent_id (parent_id), KEY approved (approved), KEY thread_updated (thread_updated) ) TYPE=MyISAM; # # Table structure for table 'phorum4_bodies' # CREATE TABLE phorum4_bodies ( message_id bigint(20) unsigned NOT NULL auto_increment, body text NOT NULL, PRIMARY KEY (message_id) ) TYPE=MyISAM; # # Table structure for table 'phorum4_settings' # CREATE TABLE phorum4_settings ( name varchar(50) NOT NULL default '', module varchar(50) NOT NULL default '', description varchar(255) NOT NULL default '', type enum('text','select') NOT NULL default 'text', content varchar(255) default NULL, def varchar(255) default NULL, PRIMARY KEY (name) ) TYPE=MyISAM; Index: pear/Forum/lib/plugins/plugin.php +++ pear/Forum/lib/plugins/plugin.php <?PHP $FORUM["PLUGINS"] = FALSE; $FORUM["PLUGIN_HOOKS"] = FALSE; function plugin_register($plugin) { global $FORUM; $FORUM["PLUGINS"][get_class($plugin)] = $plugin; } function plugin_exec($hook,&$param) { global $FORUM; plugin_load_all(); foreach($FORUM["PLUGINS"] as $plugin) { if(method_exists(&$plugin,&$hook)) { /* Two ways to call plugins */ call_user_method(&$hook,&$plugin,&$param); // $plugin->$hook(&$param); } } } function plugin_load_hook($hook) { if(!is_array($FORUM["PLUGINS"])) { plugin_load_all(); } } function plugin_load_all() { global $FORUM; if(is_array($FORUM["PLUGINS"])) return TRUE; $FORUM["PLUGINS"] = array(); $dir = opendir("$FORUM[LIB]/plugins"); if(!$dir) { trigger_error("Failed to list $FORUM[LIB]",E_USER_WARNING); return FALSE; } while($plugin = readdir(&$dir)) { if(strpos($plugin,".")) continue; if(isset($FORUM["PLUGINS"][$plugin])) continue; if(file_exists("$FORUM[LIB]/plugins/$plugin/$plugin.php")) { include_once("$FORUM[LIB]/plugins/$plugin/$plugin.php"); } } } ?> Index: pear/Forum/lib/skins/simple/footer.tpl.php +++ pear/Forum/lib/skins/simple/footer.tpl.php </center> </body> </html> Index: pear/Forum/lib/skins/simple/form.tpl.php +++ pear/Forum/lib/skins/simple/form.tpl.php <form action="<?PHP echo $TPL["POST_URL"]?>" method="post"> <input type="hidden" name="FORUM_ID" value="<?PHP echo $TPL["FORUM_ID"]?>"> <input type="hidden" name="PARENT_ID" value="<?PHP echo $TPL["PARENT_ID"]?>"> <input type="hidden" name="ATTEMPT" value="true"> <table cellspacing="1" cellpadding="4" border="0" width=550> <tr> <td CLASS="phorumtablehead">Post A New Message</td> </tr> <tr> <td CLASS="phorumtd1"> <table cellspacing="0" cellpadding="2" border="0" width="100%"> <tr> <td nowrap CLASS="phorumlabel">Name:&nbsp;&nbsp;</td> <td width="100%"> <?PHP if($TPL["user"]): ?> <INPUT TYPE="hidden" NAME="AUTHOR" VALUE="<?PHP echo $TPL["user"]["nick"] ?>"><B><?PHP echo $TPL["user"]["nick"] ?></B> <?PHP else: ?> <input type="text" name="AUTHOR" value="<?PHP echo $TPL["AUTHOR"]?>" CLASS="phorumtext"> <?PHP endif; ?> </td> </tr> <tr> <td nowrap CLASS="phorumlabel">Email:&nbsp;&nbsp;</td> <td width="100%"> <?PHP if($TPL["user"]): ?> <INPUT TYPE="hidden" VALUE="<?PHP echo $TPL["user"]["email"]?>"><B><?PHP echo $TPL["user"]["email"]; ?></B> <?PHP else: ?> <input type="text" name="EMAIL" value="<?PHP echo $TPL["EMAIL"]?>" CLASS="phorumtext"> <?PHP endif; ?> </td> </tr> <tr> <td nowrap CLASS="phorumlabel">Subject:&nbsp;&nbsp;</td> <td width="100%"> <input type="text" name="SUBJECT" value="<?PHP echo $TPL["SUBJECT"]?>" CLASS="phorumtext"></td> </tr> </table> </td> </tr> <tr> <td align=right CLASS="phorumtd2"> <table cellspacing="0" cellpadding="2" border="0" width="100%"> <tr> <td width="100%"><textarea cols="50" rows="20" name="BODY" CLASS="phorumtextarea"><?PHP echo $TPL["BODY"]?></textarea></td> </tr> <tr> <td align=right width="100%"><input type="submit" value="Post" class="phorumbutton"></td> </tr> </table> </td> </tr> </table> </form> Index: pear/Forum/lib/skins/simple/header.tpl.php +++ pear/Forum/lib/skins/simple/header.tpl.php <html> <head> <title>Phorum 4</title> <style> BODY{ font-family : Arial, Helvetica, sans-serif; font-size : 12px; } .phorumlabel{ font-family : Arial, Helvetica, sans-serif; font-weight : none; color : White; font-size : 12px; } .phorumtd{ font-family : Arial, Helvetica, sans-serif; font-size : 12px; } .phorumtablehead, .phorumtablehead A{ font-family : Arial, Helvetica, sans-serif; color : White; background-color : Navy; font-size : 16px; font-weight : bold; } .phorumtd1{ font-family : Arial, Helvetica, sans-serif; color : White; background-color : Gray; font-size : 12px; } .phorumtd2{ font-family : Arial, Helvetica, sans-serif; color : Black; background-color : Silver; font-size : 12px; } .phorumtext { font-family : Arial, Helvetica, sans-serif; width : 100%; font-size : 12px; } .phorumbutton{ font-family : Arial, Helvetica, sans-serif; font-weight : none; color : White; background-color : Gray; border-color : Gray; font-size : 12px; } .phorumtextarea{ font-family : "Courier New", Courier, monospace; width : 100%; font-size : 12px; } new { color: Red; font-size: 8px; } </style> </head> <body> <center> Index: pear/Forum/lib/skins/simple/index.tpl.php +++ pear/Forum/lib/skins/simple/index.tpl.php <table width="80%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class=phorumtd1>Forum</td> <td class=phorumtd1>Description</td> </tr> <?PHP while($this->next()): ?> <tr> <td class=phorumtd2><A HREF="<?PHP echo $TPL["FORUM_URL"]?>"><?PHP echo $TPL["NAME"]?></A><br>Posts: <?PHP echo $TPL["COUNT"]?></td> <td><?PHP echo $TPL["DESCRIPTION"]?></td> </tr> <?PHP endwhile; ?> </table> Index: pear/Forum/lib/skins/simple/list.tpl.php +++ pear/Forum/lib/skins/simple/list.tpl.php <table width="80%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><A HREF="<?PHP echo forum_get_url(FORUM_LOGIN); ?>">Login</A> | <a href="<?PHP echo forum_get_url(FORUM_POST,$this->forum_id)?>">Post new topic</a> | <a href="<?PHP echo forum_get_url(FORUM_INDEX,$this->forum_id)?>">Folder</A></td> <td align="right" colspan="2">Older / Newer messages ???</td> <tr> <td class=phorumtd1>Subject</td> <td class=phorumtd1>Author</td> <td class=phorumtd1>Date</td> </tr> <?PHP while($this->next()): ?> <tr> <td width="100%" class=phorumtd2><table border="0" cellspacing="0" cellpadding="0"><tr><td nowrap><?PHP echo $ARR["IMAGE"]?><IMG SRC="images/trans.gif" WIDTH=12 HEIGHT=21 BORDER=0></td><td width="100%"><a href="<?PHP echo $ARR["URL"]?>"><?PHP echo $ARR["SUBJECT"]?></a><?PHP $TPL["NEW"]?></td></tr></table></td> <td nowrap class=phorumtd2><?PHP if($TPL["REGISTERED"]) echo "[R]"; ?><?PHP echo $TPL["AUTHOR"]?>&nbsp;&nbsp;</td> <td nowrap class=phorumtd2><?PHP echo $TPL["SHORT_DATE"]?>&nbsp;&nbsp;</td> </tr> <?PHP endwhile; ?> </table> Index: pear/Forum/lib/skins/simple/read.tpl.php +++ pear/Forum/lib/skins/simple/read.tpl.php <A HREF="<?PHP echo $TPL["PARENT_URL"]?>">Up</A> <?PHP /* Display a little threaded view on top. */ $list = forum_start(FORUM_LIST); $list->forum_id = $this->forum_id; $list->thread_id = $this->thread_id; $list->rows = $this->rows; $list->display(); ?> </CENTER> <?PHP while($this->next()): ?> <?PHP print str_repeat("<UL>",$TPL["level"]); ?> <table width="80%" border="1" cellspacing="0" cellpadding="2"> <tr> <td class=phorumtablehead><A NAME="<?PHP echo $TPL["MESSAGE_ID"]?>"><?PHP echo $TPL["SUBJECT"]?></A></td><td align="right" class="phorumtablehead"><A HREF="<?PHP echo $TPL["URL"]?>">Reply to THIS message</A></td> </tr> <tr> <td colspan="2" class=phorumtd2> Author: <?PHP echo $TPL["AUTHOR"]?><br> Date: <?PHP echo $TPL["LONG_DATE"]?><br> <br> <tt><?PHP echo nl2br($TPL["BODY"])?></tt> <br><br> </td> </tr> </table> <?PHP print str_repeat("</UL>",$TPL["level"]); ?> <?PHP endwhile; ?> <CENTER>
« previous php.pear.cvs (#941) next »