Update of /cvsroot/openfirst/emoticon
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25250/emoticon
Modified Files:
Tag: REL1_1_BRANCH
emoticonf.php index.php
Log Message:
All modules install (under MySQL).
Emoticon known to work.
-install.php updated to current method
-problems with auth.php fixed? (Watch auth.php, it's a tricky one)
-ofirst_dbfetch_array() added (Need to port to HEAD)
-var name mismatch fixed in globals.php
-serious updates to logger (no longer tracks total and pagetotal)
-issues with poll removed
Index: emoticonf.php
===================================================================
RCS file: /cvsroot/openfirst/emoticon/emoticonf.php,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -C2 -d -r1.14 -r1.14.2.1
*** emoticonf.php 7 Apr 2004 11:45:12 -0000 1.14
--- emoticonf.php 28 Aug 2005 03:43:29 -0000 1.14.2.1
***************
*** 48,59 ****
// or have as reference page.
! function emoticon_preview ($limit = 5, $start = 0) {
global $basepath;
! $query = ofirst_dbquery("SELECT * FROM ofirst_emoticon LIMIT $start OFFSET $limit");
! echo "<table><th>Emoticons</th><th></th>";
! while ($emot = ofirst_dbfetch_object($query)) {
! echo "<tr><td>".$emot->substitution."</td><td>".$emot->emoticon."</td></tr>";
}
- echo "<td><a href='$basepath/emoticon/'>Show more...</a></td></table>";
}
--- 48,90 ----
// or have as reference page.
! function emoticon_preview ($limit = 5, $start = 0, $showfoot = true) {
global $basepath;
! $query = ofirst_dbquery("SELECT * FROM `ofirst_emoticon` LIMIT $limit OFFSET $start");
! if ($query && ofirst_dberrno() == 0) {
! echo "<table>";
! echo "<thead><tr><th colspan=\"2\">Emoticons</th></tr></thead>";
! echo "<tbody>";
! while ($emot = ofirst_dbfetch_object($query)) {
! echo "<tr><td>".$emot->substitution."</td><td>".$emot->emoticon."</td></tr>";
! }
! echo "</tbody>";
! if ($showfoot) {
! echo "<tfoot><tr><td colspan=\"2\"><a href='$basepath/emoticon/'>Show more...</a></td></tr></tfoot>";
! }
! echo "</table>";
! } else {
! echo '<div class="error"><p>A database error occured!</p><pre>';
! echo '('.$err.') ';
! echo htmlentities(ofirst_dberror());
! echo '</pre></div>';
! }
! }
!
! /** Returns an array of emoticons
! * Replacement for above if you want custom display.
! */
!
! function emoticon_array($limit = 5, $start = 0) {
! global $basepath;
! $query = ofirst_dbquery("SELECT * FROM ofirst_emoticon LIMIT $limit OFFSET $start");
! $rtn = array();
! if ($query && ofirst_dberrno() == 0) {
! while ($emot = ofirst_dbfetch_object($query)) {
! $rtn[$emot->emoticon] = $emot->substitution;
! }
! return $rtn;
! } else {
! return false;
}
}
***************
*** 72,74 ****
}
! ?>
--- 103,105 ----
}
! ?>
\ No newline at end of file
Index: index.php
===================================================================
RCS file: /cvsroot/openfirst/emoticon/index.php,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -C2 -d -r1.8 -r1.8.2.1
*** index.php 24 Dec 2003 18:05:50 -0000 1.8
--- index.php 28 Aug 2005 03:43:29 -0000 1.8.2.1
***************
*** 26,45 ****
*
*/
! include_once("../config/globals.php");
include_once($header);
if(function_exists("emoticon_preview")) {
! if(! isset($_GET["perpage"])) { $_GET["perpage"] = 25; }
! if(! isset($_GET["start"])) { $_GET["start"] = 0; }
! echo("<h2>Emoticon Preview</h2><form action='./' method='get'>
! <br>Start at emoticon <input type='text' name='start' value='" . $_GET["start"] ."' size='3'> show
! <input type='text' name='perpage' value='" . $_GET["perpage"] ."' size='3'> emoticons per page.
! <input type='submit' value='Show Emoticons'>
</form>");
! emoticon_preview($_GET["perpage"], $_GET["start"]);
! echo "<br>";
} else {
echo("Emoticon functions are not enabled");
}
! include_once($footer); ?>
--- 26,48 ----
*
*/
! include_once("../includes/globals.php");
include_once($header);
if(function_exists("emoticon_preview")) {
! $perpage = 25;
! $start = 0;
! if( isset($_GET["perpage"])) { $perpage = $_GET["perpage"]; }
! if( isset($_GET["start"])) { $start = $_GET["start"]; }
! echo("<h2>Emoticon Preview</h2>
! <form action='".htmlentities($_SERVER['REQUEST_URI'])."' method='get'>
! <p>Start at emoticon <input type='text' name='start' value='" . ($start+$perpage) ."' size='3'><br />
! show <input type='text' name='perpage' value='" . $perpage ."' size='3'> emoticons per page.</p>
! <p><input type='submit' value='Show Emoticons'></p>
</form>");
! emoticon_preview($perpage, $start, false);
} else {
echo("Emoticon functions are not enabled");
}
! include_once($footer);
! ?>
\ No newline at end of file
|