[UseBook-Checkins] UseBook changelog.txt,1.5,1.6 config.php,1.5,1.6 index.php,1.5,1.6
Status: Inactive
Brought to you by:
pc_freak
From: Vandamme S. <kid...@us...> - 2005-07-07 16:38:17
|
Update of /cvsroot/usebook/UseBook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7275 Modified Files: changelog.txt config.php index.php Log Message: - Implented posts per page - Added New posts on top or bottom of pages - Fixed posts id bug - Added friendly url's Index: changelog.txt =================================================================== RCS file: /cvsroot/usebook/UseBook/changelog.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** changelog.txt 22 Jun 2005 07:13:15 -0000 1.5 --- changelog.txt 7 Jul 2005 16:38:09 -0000 1.6 *************** *** 7,13 **** - 1st Anti spam feature added - Implented posts per page - Some small adjustments - UseBook 0.2 Changelog ------------------------------ --- 7,15 ---- - 1st Anti spam feature added - Implented posts per page + - Added New posts on top or bottom of pages + - Fixed posts id bug + - Added friendly url's - Some small adjustments UseBook 0.2 Changelog ------------------------------ Index: config.php =================================================================== RCS file: /cvsroot/usebook/UseBook/config.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** config.php 22 Jun 2005 07:13:15 -0000 1.5 --- config.php 7 Jul 2005 16:38:09 -0000 1.6 *************** *** 65,68 **** --- 65,69 ---- $config['needed_website'] = 0; $config['antispam'] = 900; + $config['post_order'] = 1; // *************** *** 78,81 **** --- 79,83 ---- $config['rel_nofollow'] = 0; $config['auto_free_sql_results'] = 1; + $config['friendly_urls'] = 0; // Index: index.php =================================================================== RCS file: /cvsroot/usebook/UseBook/index.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** index.php 22 Jun 2005 07:13:15 -0000 1.5 --- index.php 7 Jul 2005 16:38:09 -0000 1.6 *************** *** 51,63 **** $posts = $db->num_rows($data); ! $pages = '<p>'; for ( $i = 0; $i != ceil($posts/$functions->get_config('posts_page')); $i++ ) { if ( $i == $page ) ! $pages .= '['.$i.'] '; else $pages .= '<a href="index.php?page='.$i.'">'.$i.'</a> '; } ! $data = $db->query('SELECT * FROM '.TABLE_PREFIX.'posts ORDER BY id DESC LIMIT '.$functions->get_config('posts_page')*$page.', '.$functions->get_config('posts_page')); if ( $db->num_rows($data) == 0 ) --- 51,65 ---- $posts = $db->num_rows($data); ! $pages = ''; for ( $i = 0; $i != ceil($posts/$functions->get_config('posts_page')); $i++ ) { if ( $i == $page ) ! $pages .= '<b>'.$i.'</b> '; else $pages .= '<a href="index.php?page='.$i.'">'.$i.'</a> '; } ! $order = ( $functions->get_config('post_order') == 1 ) ? 'DESC': 'ASC'; ! ! $data = $db->query('SELECT * FROM '.TABLE_PREFIX.'posts ORDER BY id '.$order.' LIMIT '.$functions->get_config('posts_page')*$page.', '.$functions->get_config('posts_page')); if ( $db->num_rows($data) == 0 ) *************** *** 72,76 **** $template->parse('post', 'posts', array ( 'color' => $post_color, ! 'id' => $posts['id'], 'name' => $posts['name'], 'mail' => ( !empty($posts['mail']) ) ? $lang['Email'].': '.$functions->show_email($posts['mail']) : '', --- 74,78 ---- $template->parse('post', 'posts', array ( 'color' => $post_color, ! 'id' => ( $admin->login ) ? '<a href="'.$functions->make_url('stats.php', array('id' => $posts['id'])).'">'.$posts['id'].'</a>' : '#'.$posts['id'], 'name' => $posts['name'], 'mail' => ( !empty($posts['mail']) ) ? $lang['Email'].': '.$functions->show_email($posts['mail']) : '', *************** *** 99,103 **** 'message' => '<textarea rows="10" cols="60" name="post_message">'.$message.'</textarea>', 'website' => '<input type="text" name="post_website" size="25" maxlength="255" value="'.$website.'"/>', ! 'form_start' => '<form method="POST" action="index.php">', 'form_end' => '</form>' )); --- 101,105 ---- 'message' => '<textarea rows="10" cols="60" name="post_message">'.$message.'</textarea>', 'website' => '<input type="text" name="post_website" size="25" maxlength="255" value="'.$website.'"/>', ! 'form_start' => '<form method="POST" action="'.$functions->make_url('index.php').'">', 'form_end' => '</form>' )); |