From dhaun at qs1489.pair.com Sat Nov 8 09:30:51 2008 From: dhaun at qs1489.pair.com (dhaun at qs1489.pair.com) Date: 8 Nov 2008 14:30:51 -0000 Subject: [geeklog-cvs] Test, please ignore Message-ID: <20081108143051.80866.qmail@qs1489.pair.com> Test From geeklog-cvs at lists.geeklog.net Sun Nov 9 03:53:53 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 09 Nov 2008 03:53:53 -0500 Subject: [geeklog-cvs] geeklog: Minor spelling correction for consitency Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/2767873fc9c3 changeset: 6461:2767873fc9c3 user: Dirk Haun date: Sun Nov 09 09:53:39 2008 +0100 description: Minor spelling correction for consitency diffstat: 4 files changed, 4 insertions(+), 4 deletions(-) language/german.php | 2 +- language/german_formal.php | 2 +- language/german_formal_utf-8.php | 2 +- language/german_utf-8.php | 2 +- diffs (48 lines): diff -r 86df0b89245c -r 2767873fc9c3 language/german.php --- a/language/german.php Sun Nov 09 09:38:26 2008 +0100 +++ b/language/german.php Sun Nov 09 09:53:39 2008 +0100 @@ -1514,7 +1514,7 @@ 'records_found' => 'Eintr?ge', 'addchild' => 'Add child', 'list' => 'auflisten', - 'list_all' => 'alle auflisten' + 'list_all' => 'Alle auflisten' ); # Localisation of the texts for the various drop-down menus that are actually diff -r 86df0b89245c -r 2767873fc9c3 language/german_formal.php --- a/language/german_formal.php Sun Nov 09 09:38:26 2008 +0100 +++ b/language/german_formal.php Sun Nov 09 09:53:39 2008 +0100 @@ -1515,7 +1515,7 @@ 'records_found' => 'Eintr?ge', 'addchild' => 'Add child', 'list' => 'auflisten', - 'list_all' => 'alle auflisten' + 'list_all' => 'Alle auflisten' ); # Localisation of the texts for the various drop-down menus that are actually diff -r 86df0b89245c -r 2767873fc9c3 language/german_formal_utf-8.php --- a/language/german_formal_utf-8.php Sun Nov 09 09:38:26 2008 +0100 +++ b/language/german_formal_utf-8.php Sun Nov 09 09:53:39 2008 +0100 @@ -1515,7 +1515,7 @@ 'records_found' => 'Eintr??ge', 'addchild' => 'Add child', 'list' => 'auflisten', - 'list_all' => 'alle auflisten' + 'list_all' => 'Alle auflisten' ); # Localisation of the texts for the various drop-down menus that are actually diff -r 86df0b89245c -r 2767873fc9c3 language/german_utf-8.php --- a/language/german_utf-8.php Sun Nov 09 09:38:26 2008 +0100 +++ b/language/german_utf-8.php Sun Nov 09 09:53:39 2008 +0100 @@ -1514,7 +1514,7 @@ 'records_found' => 'Eintr??ge', 'addchild' => 'Add child', 'list' => 'auflisten', - 'list_all' => 'alle auflisten' + 'list_all' => 'Alle auflisten' ); # Localisation of the texts for the various drop-down menus that are actually From geeklog-cvs at lists.geeklog.net Tue Nov 11 13:45:55 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Tue, 11 Nov 2008 13:45:55 -0500 Subject: [geeklog-cvs] geeklog: Make {event_url} available in eventdetails.thtml Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/f904f6d0e5ed changeset: 6462:f904f6d0e5ed user: Dirk Haun date: Tue Nov 11 19:45:40 2008 +0100 description: Make {event_url} available in eventdetails.thtml diffstat: 2 files changed, 5 insertions(+) public_html/calendar/event.php | 1 + public_html/docs/history | 4 ++++ diffs (25 lines): diff -r 2767873fc9c3 -r f904f6d0e5ed public_html/calendar/event.php --- a/public_html/calendar/event.php Sun Nov 09 09:53:39 2008 +0100 +++ b/public_html/calendar/event.php Tue Nov 11 19:45:40 2008 +0100 @@ -553,6 +553,7 @@ $event_title = stripslashes($A['title']); if (!empty($A['url'])) { $event_title = COM_createLink($event_title, $A['url']); + $cal_templates->set_var('event_url', $A['url']); } $cal_templates->set_var('event_title', $event_title); if (($_CA_CONF['personalcalendars'] == 1) diff -r 2767873fc9c3 -r f904f6d0e5ed public_html/docs/history --- a/public_html/docs/history Sun Nov 09 09:53:39 2008 +0100 +++ b/public_html/docs/history Tue Nov 11 19:45:40 2008 +0100 @@ -45,6 +45,10 @@ - Updated Polish language files, provided by Robert Stadnik - Updated Slovenian language file for the Links plugin, provided by gape + +Calendar plugin +--------------- +- Make {event_url} available in eventdetails.thtml [Dirk] Links plugin ------------ From geeklog-cvs at lists.geeklog.net Fri Nov 14 09:18:54 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 14 Nov 2008 09:18:54 -0500 Subject: [geeklog-cvs] geeklog: New Data Filtering Class - replaces my previous version... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/fc94f3a10e6a changeset: 6464:fc94f3a10e6a user: blaine date: Thu Nov 13 10:04:36 2008 -0500 description: New Data Filtering Class - replaces my previous version as it has not yet been used anywhere. diffstat: 1 file changed, 1 insertion(+) system/classes/sanitize.class.php | 1 + diffs (10 lines): diff -r 985c98d9bb0e -r fc94f3a10e6a system/classes/sanitize.class.php --- a/system/classes/sanitize.class.php Thu Nov 13 09:52:43 2008 -0500 +++ b/system/classes/sanitize.class.php Thu Nov 13 10:04:36 2008 -0500 @@ -488,4 +488,5 @@ } // End of class + ?> \ No newline at end of file From geeklog-cvs at lists.geeklog.net Fri Nov 14 09:18:54 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 14 Nov 2008 09:18:54 -0500 Subject: [geeklog-cvs] geeklog: New Data Filtering Class - replaces my previous version... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/985c98d9bb0e changeset: 6463:985c98d9bb0e user: blaine date: Thu Nov 13 09:52:43 2008 -0500 description: New Data Filtering Class - replaces my previous version as it has not yet been used anywhere. diffstat: 1 file changed, 491 insertions(+), 324 deletions(-) system/classes/sanitize.class.php | 815 ++++++++++++++++++++++--------------- diffs (truncated from 820 to 300 lines): diff -r f904f6d0e5ed -r 985c98d9bb0e system/classes/sanitize.class.php --- a/system/classes/sanitize.class.php Tue Nov 11 19:45:40 2008 +0100 +++ b/system/classes/sanitize.class.php Thu Nov 13 09:52:43 2008 -0500 @@ -1,324 +1,491 @@ -Parse( $parm ); - - if( $this->_isnumeric ) - { - // Note: PHP's is_numeric() accepts values like 4e4 as numeric - if( !is_numeric( $p ) || ( preg_match( '/^([0-9]+)$/', $p ) == 0 )) - { - $p = 0; - } - } - else - { - $p = preg_replace( '/\/\*.*/', '', $p ); - $pa = explode( "'", $p ); - $pa = explode( '"', $pa[0] ); - $pa = explode( '`', $pa[0] ); - $pa = explode( ';', $pa[0] ); - $pa = explode( '\\', $pa[0] ); - $p = $pa[0]; - } - - if( $this->logging ) - { - if( strcmp( $p, $parm ) != 0 ) - { - COM_errorLog( "Filter applied: >> $parm << filtered to $p [IP {$_SERVER['REMOTE_ADDR']}]", 1); - } - } - - return $p; - - } - - /* Prepare data for SQL insert and apply filtering - * Supports passing a single parm or array of parms - */ - function prepareForDB($data) { - if (is_array($data)) { - # loop through array and apply the filters - foreach($data as $var) { - $return_data[] = addslashes($this->filterHTML($var)); - } - return $return_data; - } - else - { - $data = $this->filterHTML($data); - $data = addslashes($data); - return $data; - } - } - - function filterHTML ($message) { - global $_CONF; - - // strip_tags() gets confused by HTML comments ... - $message = preg_replace( '//', '', $message ); - - if( isset( $_CONF['allowed_protocols'] ) && is_array( $_CONF['allowed_protocols'] ) && ( sizeof( $_CONF['allowed_protocols'] ) > 0 )) - { - $this->Protocols( $_CONF['allowed_protocols'] ); - } - else - { - $this->Protocols( array( 'http:', 'https:', 'ftp:' )); - } - - if( empty( $this->permissions) || !SEC_hasRights( $this->permissions ) || - empty( $_CONF['admin_html'] )) - { - $html = $_CONF['user_html']; - } - else - { - $html = array_merge_recursive( $_CONF['user_html'], - $_CONF['admin_html'] ); - } - - foreach( $html as $tag => $attr ) - { - $this->AddHTML( $tag, $attr ); - } - - $message = $this->Parse( $message ); - $message = $this->formatCode($message); - $message = $this->censor($message); - return $message; - - } - - - /* Apply filtering to a single parm or array of parms - * Parms may be in either $_POST or $_GET input parms array - * If type (GET or POST) is not set then POST is checked first - * Optionally Parms can be made global - */ - function sanitizeParms($vars,$type='') { - $return_data = array(); - - #setup common reference to SuperGlobals depending which array is needed - if ($type == "GET" OR $type == "POST") { - if ($type =="GET") { $SG_Array =& $_GET; } - if ($type =="POST") { $SG_Array =& $_POST; } - - # loop through SuperGlobal data array and grab out data for allowed fields if found - foreach($vars as $key) { - if (array_key_exists($key,$SG_Array)) { $return_data[$key]=$SG_Array[$key]; } - } - - } - else - { - foreach ($vars as $key) { - if (array_key_exists($key, $_POST)) { - $return_data[$key] = $_POST[$key]; - } - elseif (array_key_exists($key, $_GET)) - { - $return_data[$key] = $_GET[$key]; - } - } - } - - # loop through $vars array and apply the filter - foreach($vars as $value) { - $return_data[$value] = $this->filterparm($return_data[$value]); - } - - // Optionally set $GLOBALS or return the array - if ($this->_setglobal) { - # loop through final data and define all the variables using the $GLOBALS array - foreach ($return_data as $key=>$value) { - $GLOBALS[$key]=$value; - } - } - else - { - return $return_data; - } - - } - - - function formatCode($message) { - - // Get rid of any newline characters - $message = preg_replace( "/\n/", '', $message ); - - // Replace any $ with $ (HTML equiv) - $message = str_replace( '$', '$', $message ); - - // handle [code] ... [/code] - do - { - $start_pos = MBYTE_substr( MBYTE_strtolower( $message ), '[code]' ); - if( $start_pos !== false ) - { - $end_pos = MBYTE_substr( MBYTE_strtolower( $message ), '[/code]' ); - if( $end_pos !== false ) - { - $encoded = $this->_handleCode( MBYTE_substr( $message, $start_pos + 6, - $end_pos - ( $start_pos + 6 ))); - $encoded = '
' . $encoded . '
'; - $message = MBYTE_substr( $message, 0, $start_pos ) . $encoded - . MBYTE_substr( $message, $end_pos + 7 ); - } - else // missing [/code] - { - // Treat the rest of the text as code (so as not to lose any - // special characters). However, the calling entity should - // better be checking for missing [/code] before calling this - // function ... - $encoded = $this->_handleCode( MBYTE_substr( $message, $start_pos + 6 )); - $encoded = '
' . $encoded . '
'; - $message = MBYTE_substr( $message, 0, $start_pos ) . $encoded; - } - } - } - while( $start_pos !== false ); - - return $message; - - } - - /** - * Handles the part within a [code] ... [/code] section, i.e. escapes all - * special characters. - * - * @param string $str the code section to encode - * @return string $str with the special characters encoded - * - */ - function _handleCode( $str ) - { - $search = array( '&', '\\', '<', '>', '[', ']' ); - $replace = array( '&', '\', '<', '>', '[', ']' ); - - $str = str_replace( $search, $replace, $str ); - - return( $str ); - } - - - /** - * This censors inappropriate content - * - * This will replace 'bad words' with something more appropriate - * - * @param string $message String to check - * @return string Edited $Message - * - */ - - function censor ($message) - { - global $_CONF; - - $editedMessage = $message; - - if( $this->_censordata ) - { - if( is_array( $_CONF['censorlist'] )) - { - $replacement = $_CONF['censorreplace']; - - switch( $_CONF['censormode']) - { - case 1: # Exact match - $regExPrefix = '(\s*)'; - $regExSuffix = '(\W*)'; - break; - - case 2: # Word beginning - $regExPrefix = '(\s*)'; - $regExSuffix = '(\w*)'; - break; - From geeklog-cvs at lists.geeklog.net Sat Nov 15 15:12:59 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 15 Nov 2008 15:12:59 -0500 Subject: [geeklog-cvs] geeklog: When using gdlib, use imagecopyresampled instead or ima... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/309c2727ccb5 changeset: 6466:309c2727ccb5 user: Dirk Haun date: Sat Nov 15 16:21:23 2008 +0100 description: When using gdlib, use imagecopyresampled instead or imagecopyresized to scale images diffstat: 1 file changed, 3 insertions(+), 3 deletions(-) system/classes/upload.class.php | 6 +++--- diffs (16 lines): diff -r 5aca9b24800f -r 309c2727ccb5 system/classes/upload.class.php --- a/system/classes/upload.class.php Sat Nov 15 13:27:09 2008 +0100 +++ b/system/classes/upload.class.php Sat Nov 15 16:21:23 2008 +0100 @@ -665,9 +665,9 @@ unlink ($filename); } - imagecopyresized ($image_dest, $image_source, 0, 0, 0, 0, - $newwidth, $newheight, $imageInfo['width'], - $imageInfo['height']); + imagecopyresampled($image_dest, $image_source, 0, 0, 0, 0, + $newwidth, $newheight, $imageInfo['width'], + $imageInfo['height']); if (($this->_currentFile['type'] == 'image/png') OR ($this->_currentFile['type'] == 'image/x-png')) { if (!imagepng ($image_dest, $filename)) { From geeklog-cvs at lists.geeklog.net Sat Nov 15 15:12:59 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 15 Nov 2008 15:12:59 -0500 Subject: [geeklog-cvs] geeklog: Added a check to see if gdlib is enabled/included to av... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/5aca9b24800f changeset: 6465:5aca9b24800f user: Dirk Haun date: Sat Nov 15 13:27:09 2008 +0100 description: Added a check to see if gdlib is enabled/included to avoid possibly confusing messages about missing suport for a specific format. diffstat: 1 file changed, 6 insertions(+) system/classes/upload.class.php | 6 ++++++ diffs (16 lines): diff -r fc94f3a10e6a -r 5aca9b24800f system/classes/upload.class.php --- a/system/classes/upload.class.php Thu Nov 13 10:04:36 2008 -0500 +++ b/system/classes/upload.class.php Sat Nov 15 13:27:09 2008 +0100 @@ -590,6 +590,12 @@ . $this->_getDestinationName(); if (!$this->_keepOriginalFile ($filename)) { + exit; + } + + if (!function_exists('gd_info')) { + $this->_addError('GD library does not seem to be enabled.'); + $this->printErrors(); exit; } From geeklog-cvs at lists.geeklog.net Sat Nov 15 15:13:01 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 15 Nov 2008 15:13:01 -0500 Subject: [geeklog-cvs] geeklog: Check the MIME type, not the file extension Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/3df6765ee4fa changeset: 6468:3df6765ee4fa user: Dirk Haun date: Sat Nov 15 18:59:54 2008 +0100 description: Check the MIME type, not the file extension diffstat: 1 file changed, 7 insertions(+), 3 deletions(-) system/classes/upload.class.php | 10 +++++++--- diffs (42 lines): diff -r 4b8a2444f299 -r 3df6765ee4fa system/classes/upload.class.php --- a/system/classes/upload.class.php Sat Nov 15 17:44:44 2008 +0100 +++ b/system/classes/upload.class.php Sat Nov 15 18:59:54 2008 +0100 @@ -534,6 +534,7 @@ . $newheight . ' using ' . $this->_imageLib); if ($this->_imageLib == 'imagemagick') { + $newsize = $newwidth . 'x' . $newheight; $quality = ''; if ($this->_jpegQuality > 0) { @@ -556,17 +557,19 @@ $filename = $this->_fileUploadDirectory . '/' . $this->_getDestinationName(); $cmd_end = " '" . $filename . "' | " . $this->_pathToNetPBM . 'pnmscale -xsize=' . $newwidth . ' -ysize=' . $newheight . ' | ' . $this->_pathToNetPBM; // convert to pnm, resize, convert back - if (eregi ('\.png', $filename)) { + if (($this->_currentFile['type'] == 'image/png') || + ($this->_currentFile['type'] == 'image/x-png')) { $tmpfile = $this->_fileUploadDirectory . '/tmp.png'; $cmd .= 'pngtopnm ' . $cmd_end . 'pnmtopng > ' . $tmpfile; - } else if (eregi ('\.(jpg|jpeg)', $filename)) { + } elseif (($this->_currentFile['type'] == 'image/jpeg') || + ($this->_currentFile['type'] == 'image/pjpeg')) { $tmpfile = $this->_fileUploadDirectory . '/tmp.jpg'; $quality = ''; if ($this->_jpegQuality > 0) { $quality = sprintf(' -quality=%d', $this->_jpegQuality); } $cmd .= 'jpegtopnm ' . $cmd_end . 'pnmtojpeg' . $quality . ' > ' . $tmpfile; - } else if (eregi ('\.gif', $filename)) { + } elseif ($this->_currentFile['type'] == 'image/gif') { $tmpfile = $this->_fileUploadDirectory . '/tmp.gif'; $cmd .= 'giftopnm ' . $cmd_end . 'ppmquant 256 | ' . $this->_pathToNetPBM . 'ppmtogif > ' . $tmpfile; @@ -711,6 +714,7 @@ exit; } } + } if ($retval > 0) { From geeklog-cvs at lists.geeklog.net Sat Nov 15 15:13:00 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 15 Nov 2008 15:13:00 -0500 Subject: [geeklog-cvs] geeklog: Allow setting the JPEG quality (Feature request #0000720) Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/4b8a2444f299 changeset: 6467:4b8a2444f299 user: Dirk Haun date: Sat Nov 15 17:44:44 2008 +0100 description: Allow setting the JPEG quality (Feature request #0000720) diffstat: 1 file changed, 47 insertions(+), 5 deletions(-) system/classes/upload.class.php | 52 +++++++++++++++++++++++++++++++++++---- diffs (104 lines): diff -r 309c2727ccb5 -r 4b8a2444f299 system/classes/upload.class.php --- a/system/classes/upload.class.php Sat Nov 15 16:21:23 2008 +0100 +++ b/system/classes/upload.class.php Sat Nov 15 17:44:44 2008 +0100 @@ -37,7 +37,7 @@ * submitted via POST method. Please read documentation as there are a number of * security related features that will come in handy for you. * -* @author Tony Bibbs +* @author Tony Bibbs * */ class upload @@ -90,6 +90,10 @@ * @access private */ var $_maxFileSize = 1048576; // Long, in bytes + /** + * @access private + */ + var $_jpegQuality = 0; // int (0-100) /** * @access private */ @@ -531,7 +535,11 @@ if ($this->_imageLib == 'imagemagick') { $newsize = $newwidth . 'x' . $newheight; - $cmd = $this->_pathToMogrify . ' -resize '. $newsize . ' "' . $this->_fileUploadDirectory . '/' . $this->_getDestinationName() . '" 2>&1'; + $quality = ''; + if ($this->_jpegQuality > 0) { + $quality = sprintf(' -quality %d', $this->_jpegQuality); + } + $cmd = $this->_pathToMogrify . $quality . ' -resize '. $newsize . ' "' . $this->_fileUploadDirectory . '/' . $this->_getDestinationName() . '" 2>&1'; $this->_addDebugMsg('Attempting to resize with this command (imagemagick): ' . $cmd); $filename = $this->_fileUploadDirectory . '/' @@ -553,7 +561,11 @@ $cmd .= 'pngtopnm ' . $cmd_end . 'pnmtopng > ' . $tmpfile; } else if (eregi ('\.(jpg|jpeg)', $filename)) { $tmpfile = $this->_fileUploadDirectory . '/tmp.jpg'; - $cmd .= 'jpegtopnm ' . $cmd_end . 'pnmtojpeg > ' . $tmpfile; + $quality = ''; + if ($this->_jpegQuality > 0) { + $quality = sprintf(' -quality=%d', $this->_jpegQuality); + } + $cmd .= 'jpegtopnm ' . $cmd_end . 'pnmtojpeg' . $quality . ' > ' . $tmpfile; } else if (eregi ('\.gif', $filename)) { $tmpfile = $this->_fileUploadDirectory . '/tmp.gif'; $cmd .= 'giftopnm ' . $cmd_end . 'ppmquant 256 | ' @@ -659,7 +671,11 @@ $image_dest = @ImageCreateTrueColor($newwidth, $newheight); if (!$image_dest) { $thumb = imagecreate ($newwidth, $newheight); - imageJPEG ($thumb, $filename); + if ($this->_jpegQuality > 0) { + imagejpeg($thumb, $filename, $this->_jpegQuality); + } else { + imagejpeg($thumb, $filename); + } imagedestroy ($thumb); $image_dest = @imagecreatefromjpeg ($filename); unlink ($filename); @@ -677,7 +693,13 @@ } } elseif (($this->_currentFile['type'] == 'image/jpeg') OR ($this->_currentFile['type'] == 'image/pjpeg')) { - if (!imagejpeg ($image_dest, $filename)) { + if ($this->_jpegQuality > 0) { + $jpsuccess = imagejpeg($image_dest, $filename, + $this->_jpegQuality); + } else { + $jpsuccess = imagejpeg($image_dest, $filename); + } + if (!$jpsuccess) { $this->_addError ('Could not create JPEG: '. $filename); $this->printErrors (); exit; @@ -837,6 +859,26 @@ function keepOriginalImage ($keepit) { $this->_keepOriginalImage = $keepit; + + return true; + } + + /** + * Set JPEG quality + * + * @param int $quality JPEG quality (0-100) + * @return boolean true if we set values OK, otherwise false + * @note The 'quality' is an arbitrary value used by the IJG library. + * It is not a percent value! The default (and a good value) is 75. + * + */ + function setJpegQuality($quality) + { + if (($quality < 0) || ($quality > 100)) { + return false; + } + + $this->_jpegQuality = $quality; return true; } From geeklog-cvs at lists.geeklog.net Sun Nov 16 04:30:17 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 16 Nov 2008 04:30:17 -0500 Subject: [geeklog-cvs] geeklog: Set JPEG quality for image upload Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/fac2f37acc57 changeset: 6469:fac2f37acc57 user: Dirk Haun date: Sat Nov 15 23:08:35 2008 +0100 description: Set JPEG quality for image upload diffstat: 3 files changed, 9 insertions(+) public_html/admin/topic.php | 3 +++ public_html/usersettings.php | 3 +++ system/lib-story.php | 3 +++ diffs (39 lines): diff -r 3df6765ee4fa -r fac2f37acc57 public_html/admin/topic.php --- a/public_html/admin/topic.php Sat Nov 15 18:59:54 2008 +0100 +++ b/public_html/admin/topic.php Sat Nov 15 23:08:35 2008 +0100 @@ -476,6 +476,9 @@ $upload->setLogFile ($_CONF['path'] . 'logs/error.log'); $upload->setDebug (true); } + if (isset($_CONF['jpeg_quality'])) { + $upload->setJpegQuality($_CONF['jpeg_quality']); + } } $upload->setAllowedMimeTypes (array ('image/gif' => '.gif', 'image/jpeg' => '.jpg,.jpeg', diff -r 3df6765ee4fa -r fac2f37acc57 public_html/usersettings.php --- a/public_html/usersettings.php Sat Nov 15 18:59:54 2008 +0100 +++ b/public_html/usersettings.php Sat Nov 15 23:08:35 2008 +0100 @@ -749,6 +749,9 @@ $_CONF['debug_image_upload']) { $upload->setLogFile ($_CONF['path'] . 'logs/error.log'); $upload->setDebug (true); + } + if (isset($_CONF['jpeg_quality'])) { + $upload->setJpegQuality($_CONF['jpeg_quality']); } } $upload->setAllowedMimeTypes (array ('image/gif' => '.gif', diff -r 3df6765ee4fa -r fac2f37acc57 system/lib-story.php --- a/system/lib-story.php Sat Nov 15 18:59:54 2008 +0100 +++ b/system/lib-story.php Sat Nov 15 23:08:35 2008 +0100 @@ -1112,6 +1112,9 @@ } else { $upload->keepOriginalImage (false); } + if (isset($_CONF['jpeg_quality'])) { + $upload->setJpegQuality($_CONF['jpeg_quality']); + } } $upload->setAllowedMimeTypes (array ( 'image/gif' => '.gif', From geeklog-cvs at lists.geeklog.net Sun Nov 16 04:30:18 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 16 Nov 2008 04:30:18 -0500 Subject: [geeklog-cvs] geeklog: Added a configuration option to control the JPEG qualit... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/1ffedc7146eb changeset: 6470:1ffedc7146eb user: Dirk Haun date: Sun Nov 16 10:30:00 2008 +0100 description: Added a configuration option to control the JPEG quality (Feature request #0000720) diffstat: 12 files changed, 79 insertions(+), 19 deletions(-) language/english.php | 1 language/english_utf-8.php | 1 language/german.php | 1 language/german_formal.php | 1 language/german_formal_utf-8.php | 1 language/german_utf-8.php | 1 public_html/admin/install/config-install.php | 1 public_html/admin/install/index.php | 4 ++ public_html/docs/config.html | 50 ++++++++++++++++---------- public_html/docs/history | 3 + sql/updates/mssql_1.5.1_to_1.5.2.php | 17 ++++++++ sql/updates/mysql_1.5.1_to_1.5.2.php | 17 ++++++++ diffs (274 lines): diff -r fac2f37acc57 -r 1ffedc7146eb language/english.php --- a/language/english.php Sat Nov 15 23:08:35 2008 +0100 +++ b/language/english.php Sun Nov 16 10:30:00 2008 +0100 @@ -1757,6 +1757,7 @@ 'debug_image_upload' => "Debug Image Uploading?", 'keep_unscaled_image' => "Keep Unscaled Image?", 'allow_user_scaling' => "Allow User Scaling?", + 'jpeg_quality' => 'JPEG Quality?', 'max_image_width' => "Max Image Width?", 'max_image_height' => "Max Image Height?", 'max_image_size' => "Max Image Size?", diff -r fac2f37acc57 -r 1ffedc7146eb language/english_utf-8.php --- a/language/english_utf-8.php Sat Nov 15 23:08:35 2008 +0100 +++ b/language/english_utf-8.php Sun Nov 16 10:30:00 2008 +0100 @@ -1757,6 +1757,7 @@ 'debug_image_upload' => "Debug Image Uploading?", 'keep_unscaled_image' => "Keep Unscaled Image?", 'allow_user_scaling' => "Allow User Scaling?", + 'jpeg_quality' => 'JPEG Quality?', 'max_image_width' => "Max Image Width?", 'max_image_height' => "Max Image Height?", 'max_image_size' => "Max Image Size?", diff -r fac2f37acc57 -r 1ffedc7146eb language/german.php --- a/language/german.php Sat Nov 15 23:08:35 2008 +0100 +++ b/language/german.php Sun Nov 16 10:30:00 2008 +0100 @@ -1746,6 +1746,7 @@ 'debug_image_upload' => 'Debug Image-Upload?', 'keep_unscaled_image' => 'Bild in Originalgr??e behalten?', 'allow_user_scaling' => 'User darf skalieren?', + 'jpeg_quality' => 'JPEG-Qualit?t?', 'max_image_width' => 'Max. Bildbreite?', 'max_image_height' => 'Max. Bildh?he?', 'max_image_size' => 'Max. Bildgr??e?', diff -r fac2f37acc57 -r 1ffedc7146eb language/german_formal.php --- a/language/german_formal.php Sat Nov 15 23:08:35 2008 +0100 +++ b/language/german_formal.php Sun Nov 16 10:30:00 2008 +0100 @@ -1747,6 +1747,7 @@ 'debug_image_upload' => 'Debug Image-Upload?', 'keep_unscaled_image' => 'Bild in Originalgr??e behalten?', 'allow_user_scaling' => 'User darf skalieren?', + 'jpeg_quality' => 'JPEG-Qualit?t?', 'max_image_width' => 'Max. Bildbreite?', 'max_image_height' => 'Max. Bildh?he?', 'max_image_size' => 'Max. Bildgr??e?', diff -r fac2f37acc57 -r 1ffedc7146eb language/german_formal_utf-8.php --- a/language/german_formal_utf-8.php Sat Nov 15 23:08:35 2008 +0100 +++ b/language/german_formal_utf-8.php Sun Nov 16 10:30:00 2008 +0100 @@ -1747,6 +1747,7 @@ 'debug_image_upload' => 'Debug Image-Upload?', 'keep_unscaled_image' => 'Bild in Originalgr????e behalten?', 'allow_user_scaling' => 'User darf skalieren?', + 'jpeg_quality' => 'JPEG-Qualit??t?', 'max_image_width' => 'Max. Bildbreite?', 'max_image_height' => 'Max. Bildh??he?', 'max_image_size' => 'Max. Bildgr????e?', diff -r fac2f37acc57 -r 1ffedc7146eb language/german_utf-8.php --- a/language/german_utf-8.php Sat Nov 15 23:08:35 2008 +0100 +++ b/language/german_utf-8.php Sun Nov 16 10:30:00 2008 +0100 @@ -1746,6 +1746,7 @@ 'debug_image_upload' => 'Debug Image-Upload?', 'keep_unscaled_image' => 'Bild in Originalgr????e behalten?', 'allow_user_scaling' => 'User darf skalieren?', + 'jpeg_quality' => 'JPEG-Qualit??t?', 'max_image_width' => 'Max. Bildbreite?', 'max_image_height' => 'Max. Bildh??he?', 'max_image_size' => 'Max. Bildgr????e?', diff -r fac2f37acc57 -r 1ffedc7146eb public_html/admin/install/config-install.php --- a/public_html/admin/install/config-install.php Sat Nov 15 23:08:35 2008 +0100 +++ b/public_html/admin/install/config-install.php Sun Nov 16 10:30:00 2008 +0100 @@ -228,6 +228,7 @@ $c->add('fs_upload', NULL, 'fieldset', 5, 23, NULL, 0, TRUE); $c->add('keep_unscaled_image',0,'select',5,23,0,1480,TRUE); $c->add('allow_user_scaling',1,'select',5,23,0,1490,TRUE); + $c->add('jpeg_quality',75,'text',5,23,NULL,1495,FALSE); $c->add('debug_image_upload',FALSE,'select',5,23,1,1500,TRUE); $c->add('fs_articleimg', NULL, 'fieldset', 5, 24, NULL, 0, TRUE); diff -r fac2f37acc57 -r 1ffedc7146eb public_html/admin/install/index.php --- a/public_html/admin/install/index.php Sat Nov 15 23:08:35 2008 +0100 +++ b/public_html/admin/install/index.php Sun Nov 16 10:30:00 2008 +0100 @@ -1369,6 +1369,10 @@ break; case '1.5.1': + require_once $_CONF['path'] . 'sql/updates/' . $_DB_dbms . '_1.5.1_to_1.5.2.php'; + + update_ConfValues(); + $current_gl_version = '1.5.2'; $_SQL = ''; break; diff -r fac2f37acc57 -r 1ffedc7146eb public_html/docs/config.html --- a/public_html/docs/config.html Sat Nov 15 23:08:35 2008 +0100 +++ b/public_html/docs/config.html Sun Nov 16 10:30:00 2008 +0100 @@ -85,7 +85,7 @@ in the siteconfig.php file. copyrightyear - (commented out) + (disabled) Set this to the year you want to appear in the copyright notice of your site's footer. If not set, Geeklog will use the current year. @@ -882,13 +882,13 @@ Description image_lib - '' (empty string) + None Set this to either 'imagemagick', 'netpbm', or 'gdlib' if - images should be resized during upload. Leave as '' if you don't want + images should be resized during upload. Leave as 'None' if you don't want images to be resized or if you don't have those packages available. path_to_mogrify - (commented out) + (disabled) If you chose 'imagemagick' for $_CONF['image_lib'] above, then this should hold the complete path to the mogrify executable (from the @@ -898,15 +898,13 @@ (version 5.4.9 or newer is recommended). path_to_netpbm - (commented out) + (disabled) If you chose 'netpbm' for $_CONF['image_lib'] above, then this should hold the complete path to the directory - where the binaries from the netpbm package are kept, e.g. + where the binaries from the Netpbm package are kept, e.g. '/usr/bin/netpbm/'. Note that the path must end in a slash.
- Precompiled binaries of the netpbm package for various platforms can be - downloaded from the Homepage of the Gallery - project. + Precompiled binaries for various platforms can be downloaded from the Netpbm homepage.

Images: Upload

@@ -927,10 +925,24 @@ enables the [unscaledX] image tag (in addition to the [imageX] tag). + jpeg_quality + (disabled) + Control the image quality when resizing JPEGs. All the image + libraries supported by Geeklog are based on the IJG JPEG library which uses + an arbitrary range of 0-100 to specify the "quality" (note that this is + not a percent value). The default, when not set, is 75 which + provides good quality in most cases. In some cases, higher values may + provide better results.
+ Rules of thumb: Values above 90 usually don't improve the image quality any + more but only produce larger files. Values below 50 will result in poor + image quality. Values of 25 and below will produce distorted + images. + debug_image_upload - (commented out) - When not commented out(!) and set to true, this - option enables debugging output to be written into Geeklog's error.log file during the upload of an image. This is useful to track down problems + (disabled) + When enabled and set to true, this option + enables debugging output to be written into Geeklog's error.log + file during the upload of an image. This is useful to track down problems with the image upload. @@ -1009,7 +1021,7 @@ is rejected (even if you're using a graphics package to resize images). force_photo_width - (commented out) + (disabled) This option, when enabled, will only apply when displaying a user photo. The <img> tag for the user photo will be emitted with a max. width, as specified by this option. @@ -1018,7 +1030,7 @@ shaped user photos to break your page's layout (e.g. in a forum). default_photo - (commented out) + (disabled) When enabled, this option should point to an image (full URL required!) that should be displayed for users without a user photo. When this option is not set and a user does not have a user photo (or an avatar) @@ -1042,7 +1054,7 @@ a lot of userphotos for different users (e.g. forum threads). gravatar_rating - (commented out) + (disabled) Avatars submitted to gravatar.com are rated with the rating system used for movies (in the U.S.), i.e. the letters G, PG, R, or X. This option will @@ -1069,12 +1081,12 @@ href="#Localization">Localization below. language_files - (commented out) + (disabled) For multi-lingual setups only: A list mapping language shortcuts ('en', 'de', etc.) to the Geeklog language files to use. languages - (commented out) + (disabled) For multi-lingual setups only: A list mapping language shortcuts ('en', 'de', etc.) to the language's native name ("English", "Deutsch", etc.). @@ -1145,7 +1157,7 @@ How many decimal places to display. timezone - (commented out) + (disabled) If your server is located in a different timezone, use this option to set your local (i.e. your own) timezone, so that the time and date on the site match your own.
diff -r fac2f37acc57 -r 1ffedc7146eb public_html/docs/history --- a/public_html/docs/history Sat Nov 15 23:08:35 2008 +0100 +++ b/public_html/docs/history Sun Nov 16 10:30:00 2008 +0100 @@ -3,6 +3,9 @@ ??? ??, 2008 (1.5.2) ------------ +- Improved image quality when using gdlib to rescale images. Also added a + configuration option to control the JPEG quality (Feature request #0000720) + [Dirk] - Check if COM_errorLog exists before using it in the config class (for possible problems during installation, bug #0000768) [Dirk] - Fixed filling out the Site Email / No-Reply Email fields in the install diff -r fac2f37acc57 -r 1ffedc7146eb sql/updates/mssql_1.5.1_to_1.5.2.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sql/updates/mssql_1.5.1_to_1.5.2.php Sun Nov 16 10:30:00 2008 +0100 @@ -0,0 +1,17 @@ +add('jpeg_quality',75,'text',5,23,NULL,1495,FALSE); + + return true; +} + +?> diff -r fac2f37acc57 -r 1ffedc7146eb sql/updates/mysql_1.5.1_to_1.5.2.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sql/updates/mysql_1.5.1_to_1.5.2.php Sun Nov 16 10:30:00 2008 +0100 @@ -0,0 +1,17 @@ +add('jpeg_quality',75,'text',5,23,NULL,1495,FALSE); + + return true; +} + +?> From geeklog-cvs at lists.geeklog.net Sun Nov 16 07:18:41 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 16 Nov 2008 07:18:41 -0500 Subject: [geeklog-cvs] geeklog: Extended length of poll IDs to 40 characters (feature r... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/035dfc00117c changeset: 6471:035dfc00117c user: Dirk Haun date: Sun Nov 16 13:12:09 2008 +0100 description: Extended length of poll IDs to 40 characters (feature request #0000754) diffstat: 8 files changed, 75 insertions(+), 13 deletions(-) plugins/polls/sql/mssql_install.php | 8 ++++---- plugins/polls/sql/mysql_install.php | 14 +++++++------- plugins/polls/templates/admin/polleditor.thtml | 2 +- public_html/admin/install/index.php | 8 ++++++++ public_html/docs/history | 1 + public_html/docs/theme.html | 12 +++++++++++- sql/updates/mssql_1.5.1_to_1.5.2.php | 21 +++++++++++++++++++++ sql/updates/mysql_1.5.1_to_1.5.2.php | 22 ++++++++++++++++++++++ diffs (203 lines): diff -r 1ffedc7146eb -r 035dfc00117c plugins/polls/sql/mssql_install.php --- a/plugins/polls/sql/mssql_install.php Sun Nov 16 10:30:00 2008 +0100 +++ b/plugins/polls/sql/mssql_install.php Sun Nov 16 13:12:09 2008 +0100 @@ -35,7 +35,7 @@ $_SQL[] = " CREATE TABLE [dbo].[{$_TABLES['pollanswers']}] ( - [pid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , + [pid] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [qid] [int] NOT NULL , [aid] [tinyint] NOT NULL , [answer] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , @@ -47,14 +47,14 @@ $_SQL[] = " CREATE TABLE [dbo].[{$_TABLES['pollquestions']}] ( [qid] [int] NOT NULL , - [pid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , + [pid] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [question] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , ) ON [PRIMARY] "; $_SQL[] = " CREATE TABLE [dbo].[{$_TABLES['polltopics']}] ( - [pid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , + [pid] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [topic] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [voters] [numeric](8, 0) NULL , [questions] [int] NOT NULL , @@ -76,7 +76,7 @@ $_SQL[] = " CREATE TABLE [dbo].[{$_TABLES['pollvoters']}] ( [id] [numeric](10, 0) IDENTITY (1, 1) NOT NULL , - [pid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , + [pid] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [ipaddress] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [date] [numeric](10, 0) NULL ) ON [PRIMARY] diff -r 1ffedc7146eb -r 035dfc00117c plugins/polls/sql/mysql_install.php --- a/plugins/polls/sql/mysql_install.php Sun Nov 16 10:30:00 2008 +0100 +++ b/plugins/polls/sql/mysql_install.php Sun Nov 16 13:12:09 2008 +0100 @@ -34,7 +34,7 @@ $_SQL[] = " CREATE TABLE {$_TABLES['pollanswers']} ( - pid varchar(20) NOT NULL default '', + pid varchar(40) NOT NULL default '', qid mediumint(9) NOT NULL default 0, aid tinyint(3) unsigned NOT NULL default '0', answer varchar(255) default NULL, @@ -46,16 +46,16 @@ $_SQL[] = " CREATE TABLE {$_TABLES['pollquestions']} ( - qid mediumint(9) NOT NULL DEFAULT '0', - pid varchar(20) NOT NULL, - question varchar(255) NOT NULL, - PRIMARY KEY (qid, pid) + qid mediumint(9) NOT NULL DEFAULT '0', + pid varchar(40) NOT NULL default '', + question varchar(255) NOT NULL, + PRIMARY KEY (qid, pid) ) TYPE=MyISAM "; $_SQL[] = " CREATE TABLE {$_TABLES['polltopics']} ( - pid varchar(20) NOT NULL, + pid varchar(40) NOT NULL default '', topic varchar(255) default NULL, voters mediumint(8) unsigned default NULL, questions int(11) NOT NULL default '0', @@ -83,7 +83,7 @@ $_SQL[] = " CREATE TABLE {$_TABLES['pollvoters']} ( id int(10) unsigned NOT NULL auto_increment, - pid varchar(20) NOT NULL default '', + pid varchar(20) NOT NULL, ipaddress varchar(15) NOT NULL default '', date int(10) unsigned default NULL, PRIMARY KEY (id) diff -r 1ffedc7146eb -r 035dfc00117c plugins/polls/templates/admin/polleditor.thtml --- a/plugins/polls/templates/admin/polleditor.thtml Sun Nov 16 10:30:00 2008 +0100 +++ b/plugins/polls/templates/admin/polleditor.thtml Sun Nov 16 13:12:09 2008 +0100 @@ -4,7 +4,7 @@ - + diff -r 1ffedc7146eb -r 035dfc00117c public_html/admin/install/index.php --- a/public_html/admin/install/index.php Sun Nov 16 10:30:00 2008 +0100 +++ b/public_html/admin/install/index.php Sun Nov 16 13:12:09 2008 +0100 @@ -1373,6 +1373,14 @@ update_ConfValues(); + if (INST_pluginExists('polls')) { + $check = upgrade_PollsPluginId(); + if (!$check) { + echo "Error updating the polls"; + return false; + } + } + $current_gl_version = '1.5.2'; $_SQL = ''; break; diff -r 1ffedc7146eb -r 035dfc00117c public_html/docs/history --- a/public_html/docs/history Sun Nov 16 10:30:00 2008 +0100 +++ b/public_html/docs/history Sun Nov 16 13:12:09 2008 +0100 @@ -59,6 +59,7 @@ Polls plugin ------------ +- Extended length of poll IDs to 40 characters (feature request #0000754) [Dirk] - Fixed SQL error when poll questions contained single quotes (bug #0000756) [Dirk] - Fixed handling of poll IDs in Polls editor (bug #0000753) [Dirk] diff -r 1ffedc7146eb -r 035dfc00117c public_html/docs/theme.html --- a/public_html/docs/theme.html Sun Nov 16 10:30:00 2008 +0100 +++ b/public_html/docs/theme.html Sun Nov 16 13:12:09 2008 +0100 @@ -195,7 +195,17 @@ -

Theme changes in Geeklog 1.5.1

+

Theme changes in Geeklog 1.5.2

+ +

Plugins

+ +
    +
  • The template file for the Polls editor has been changed to allow up to 40 + characters for the poll id (pid): + plugins/polls/templates/admin/polleditor.thtml
  • +
+ +

Theme changes in Geeklog 1.5.1

Note: Themes made for Geeklog 1.5.0 are mostly compatible with Geeklog 1.5.1. We only made one mandatory change (for the Configuration admin panel) - all the other changes listed below are optional or adjustments for special setups (e.g. multi-language sites, right-to-left languages). See details below.

diff -r 1ffedc7146eb -r 035dfc00117c sql/updates/mssql_1.5.1_to_1.5.2.php --- a/sql/updates/mssql_1.5.1_to_1.5.2.php Sun Nov 16 10:30:00 2008 +0100 +++ b/sql/updates/mssql_1.5.1_to_1.5.2.php Sun Nov 16 13:12:09 2008 +0100 @@ -14,4 +14,25 @@ return true; } +function upgrade_PollsPluginId() +{ + global $_TABLES; + + $P_SQL = array(); + $P_SQL[] = "ALTER TABLE {$_TABLES['pollanswers']} ALTER COLUMN [pid] VARCHARS(40)"; + $P_SQL[] = "ALTER TABLE {$_TABLES['pollquestions']} ALTER COLUMN [pid] VARCHARS(40)"; + $P_SQL[] = "ALTER TABLE {$_TABLES['polltopics']} ALTER COLUMN [pid] VARCHARS(40)"; + $P_SQL[] = "ALTER TABLE {$_TABLES['pollvoters']} ALTER COLUMN [pid] VARCHARS(40)"; + + foreach ($P_SQL as $sql) { + $rst = DB_query($sql); + if (DB_error()) { + echo "There was an error upgrading the polls, SQL: $sql
"; + return false; + } + } + + return true; +} + ?> diff -r 1ffedc7146eb -r 035dfc00117c sql/updates/mysql_1.5.1_to_1.5.2.php --- a/sql/updates/mysql_1.5.1_to_1.5.2.php Sun Nov 16 10:30:00 2008 +0100 +++ b/sql/updates/mysql_1.5.1_to_1.5.2.php Sun Nov 16 13:12:09 2008 +0100 @@ -14,4 +14,26 @@ return true; } +function upgrade_PollsPluginId() +{ + global $_TABLES; + + $P_SQL = array(); + $P_SQL[] = "ALTER TABLE {$_TABLES['pollanswers']} CHANGE pid pid varchar(40) NOT NULL default ''"; + $P_SQL[] = "ALTER TABLE {$_TABLES['pollquestions']} CHANGE pid pid varchar(40) NOT NULL default ''"; + $P_SQL[] = "ALTER TABLE {$_TABLES['polltopics']} CHANGE pid pid varchar(40) NOT NULL default ''"; + $P_SQL[] = "ALTER TABLE {$_TABLES['pollvoters']} CHANGE pid pid varchar(40) NOT NULL default ''"; + + $P_SQL = INST_checkInnodbUpgrade($P_SQL); + foreach ($P_SQL as $sql) { + $rst = DB_query($sql); + if (DB_error()) { + echo "There was an error upgrading the polls, SQL: $sql
"; + return false; + } + } + + return true; +} + ?> From geeklog-cvs at lists.geeklog.net Sun Nov 16 11:40:07 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 16 Nov 2008 11:40:07 -0500 Subject: [geeklog-cvs] geeklog: Removed commented-out code Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/b89f8ccd00fe changeset: 6472:b89f8ccd00fe user: Dirk Haun date: Sun Nov 16 17:17:28 2008 +0100 description: Removed commented-out code diffstat: 1 file changed, 5 insertions(+), 13 deletions(-) public_html/admin/story.php | 18 +++++------------- diffs (29 lines): diff -r 035dfc00117c -r b89f8ccd00fe public_html/admin/story.php --- a/public_html/admin/story.php Sun Nov 16 13:12:09 2008 +0100 +++ b/public_html/admin/story.php Sun Nov 16 17:17:28 2008 +0100 @@ -509,20 +509,12 @@ $story_templates->set_var('lang_optionarchive', $LANG24[61]); $story_templates->set_var('lang_optiondelete', $LANG24[62]); $story_templates->set_var('lang_title', $LANG_ADMIN['title']); -// if ($A['postmode'] == 'plaintext') { -// $A['title'] = str_replace ('$', '$', $A['title']); -// } -// -// $A['title'] = str_replace('{','{',$A['title']); -// $A['title'] = str_replace('}','}',$A['title']); -// $A['title'] = str_replace('"','"',$A['title']); - $story_templates->set_var('story_title', $story->EditElements('title'));//stripslashes ($A['title'])); + $story_templates->set_var('story_title', $story->EditElements('title')); $story_templates->set_var('lang_topic', $LANG_ADMIN['topic']); - if(empty($currenttopic) && ($story->EditElements('tid') == '')) - { - $story->setTid( DB_getItem ($_TABLES['topics'], 'tid', - 'is_default = 1' . COM_getPermSQL ('AND'))); - } else if ($story->EditElements('tid') == '') { + if(empty($currenttopic) && ($story->EditElements('tid') == '')) { + $story->setTid(DB_getItem($_TABLES['topics'], 'tid', + 'is_default = 1' . COM_getPermSQL('AND'))); + } elseif ($story->EditElements('tid') == '') { $story->setTid($currenttopic); } $story_templates->set_var ('topic_options', From geeklog-cvs at lists.geeklog.net Sun Nov 16 11:40:08 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 16 Nov 2008 11:40:08 -0500 Subject: [geeklog-cvs] geeklog: Display a message when no topics exist and don't let th... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/c81141899488 changeset: 6473:c81141899488 user: Dirk Haun date: Sun Nov 16 17:39:54 2008 +0100 description: Display a message when no topics exist and don't let the user enter the story editors (bug #0000738) diffstat: 9 files changed, 55 insertions(+), 16 deletions(-) language/english.php | 3 ++- language/english_utf-8.php | 3 ++- language/german.php | 6 +++++- language/german_formal.php | 6 +++++- language/german_formal_utf-8.php | 6 +++++- language/german_utf-8.php | 6 +++++- public_html/admin/story.php | 21 +++++++++++++++++---- public_html/docs/history | 2 ++ public_html/submit.php | 18 ++++++++++++------ diffs (205 lines): diff -r b89f8ccd00fe -r c81141899488 language/english.php --- a/language/english.php Sun Nov 16 17:17:28 2008 +0100 +++ b/language/english.php Sun Nov 16 17:39:54 2008 +0100 @@ -1202,7 +1202,8 @@ 97 => 'Not all required fields have been passed validation - default custom membership message', 98 => 'The plugin was successfully uploaded.', 99 => 'The plugin already exists.', - 100 => 'The plugin file you uploaded was not a GZip or Zip compressed archive.' + 100 => 'The plugin file you uploaded was not a GZip or Zip compressed archive.', + 101 => 'There are no topics (that you have access to). You need at least one topic to be able to submit stories.' ); ############################################################################### diff -r b89f8ccd00fe -r c81141899488 language/english_utf-8.php --- a/language/english_utf-8.php Sun Nov 16 17:17:28 2008 +0100 +++ b/language/english_utf-8.php Sun Nov 16 17:39:54 2008 +0100 @@ -1202,7 +1202,8 @@ 97 => 'Not all required fields have been passed validation - default custom membership message', 98 => 'The plugin was successfully uploaded.', 99 => 'The plugin already exists.', - 100 => 'The plugin file you uploaded was not a GZip or Zip compressed archive.' + 100 => 'The plugin file you uploaded was not a GZip or Zip compressed archive.', + 101 => 'There are no topics (that you have access to). You need at least one topic to be able to submit stories.' ); ############################################################################### diff -r b89f8ccd00fe -r c81141899488 language/german.php --- a/language/german.php Sun Nov 16 17:17:28 2008 +0100 +++ b/language/german.php Sun Nov 16 17:39:54 2008 +0100 @@ -1184,7 +1184,11 @@ 94 => 'Backup Failed: Dateigr??e unter 1kb', 95 => 'Es gab einen Fehler.', 96 => 'Sorry, kein Zugang zur Admin-Seite. Unzul?ssige Zugangsversuche werden gelogged.', - 97 => 'Not all required fields have been passed validation - default custom membership message' + 97 => 'Not all required fields have been passed validation - default custom membership message', + 98 => 'The plugin was successfully uploaded.', + 99 => 'The plugin already exists.', + 100 => 'The plugin file you uploaded was not a GZip or Zip compressed archive.', + 101 => 'There are no topics (that you have access to). You need at least one topic to be able to submit stories.' ); ############################################################################### diff -r b89f8ccd00fe -r c81141899488 language/german_formal.php --- a/language/german_formal.php Sun Nov 16 17:17:28 2008 +0100 +++ b/language/german_formal.php Sun Nov 16 17:39:54 2008 +0100 @@ -1185,7 +1185,11 @@ 94 => 'Backup Failed: Dateigr??e unter 1kb', 95 => 'Es gab einen Fehler.', 96 => 'Sorry, kein Zugang zur Admin-Seite. Unzul?ssige Zugangsversuche werden gelogged.', - 97 => 'Not all required fields have been passed validation - default custom membership message' + 97 => 'Not all required fields have been passed validation - default custom membership message', + 98 => 'The plugin was successfully uploaded.', + 99 => 'The plugin already exists.', + 100 => 'The plugin file you uploaded was not a GZip or Zip compressed archive.', + 101 => 'There are no topics (that you have access to). You need at least one topic to be able to submit stories.' ); ############################################################################### diff -r b89f8ccd00fe -r c81141899488 language/german_formal_utf-8.php --- a/language/german_formal_utf-8.php Sun Nov 16 17:17:28 2008 +0100 +++ b/language/german_formal_utf-8.php Sun Nov 16 17:39:54 2008 +0100 @@ -1185,7 +1185,11 @@ 94 => 'Backup Failed: Dateigr????e unter 1kb', 95 => 'Es gab einen Fehler.', 96 => 'Sorry, kein Zugang zur Admin-Seite. Unzul??ssige Zugangsversuche werden gelogged.', - 97 => 'Not all required fields have been passed validation - default custom membership message' + 97 => 'Not all required fields have been passed validation - default custom membership message', + 98 => 'The plugin was successfully uploaded.', + 99 => 'The plugin already exists.', + 100 => 'The plugin file you uploaded was not a GZip or Zip compressed archive.', + 101 => 'There are no topics (that you have access to). You need at least one topic to be able to submit stories.' ); ############################################################################### diff -r b89f8ccd00fe -r c81141899488 language/german_utf-8.php --- a/language/german_utf-8.php Sun Nov 16 17:17:28 2008 +0100 +++ b/language/german_utf-8.php Sun Nov 16 17:39:54 2008 +0100 @@ -1184,7 +1184,11 @@ 94 => 'Backup Failed: Dateigr????e unter 1kb', 95 => 'Es gab einen Fehler.', 96 => 'Sorry, kein Zugang zur Admin-Seite. Unzul??ssige Zugangsversuche werden gelogged.', - 97 => 'Not all required fields have been passed validation - default custom membership message' + 97 => 'Not all required fields have been passed validation - default custom membership message', + 98 => 'The plugin was successfully uploaded.', + 99 => 'The plugin already exists.', + 100 => 'The plugin file you uploaded was not a GZip or Zip compressed archive.', + 101 => 'There are no topics (that you have access to). You need at least one topic to be able to submit stories.' ); ############################################################################### diff -r b89f8ccd00fe -r c81141899488 public_html/admin/story.php --- a/public_html/admin/story.php Sun Nov 16 17:17:28 2008 +0100 +++ b/public_html/admin/story.php Sun Nov 16 17:39:54 2008 +0100 @@ -143,10 +143,17 @@ $seltopics .= '>' . $T['topic'] . '' . LB; } $excludetopics .= ') '; + } else { + $retval .= COM_showMessage(101); + return $retval; } } else { $excludetopics = " tid = '$current_topic' "; $seltopics = COM_topicList ('tid,topic', $current_topic, 1, true); + if (empty($seltopics)) { + $retval .= COM_showMessage(101); + return $retval; + } } $alltopics = ' - + diff -r 8ce15670c6c3 -r b6bdc9fd122a public_html/usersettings.php --- a/public_html/usersettings.php Sun Nov 16 18:59:26 2008 +0100 +++ b/public_html/usersettings.php Sun Nov 16 19:59:29 2008 +0100 @@ -194,6 +194,15 @@ } $preferences->set_var ('display_photo', $photo); } + if (empty($_CONF['image_lib'])) { + $scaling = $LANG04[162]; + } else { + $scaling = $LANG04[161]; + } + $preferences->set_var('photo_max_dimensions', + sprintf($LANG04[160], + $_CONF['max_photo_width'], $_CONF['max_photo_height'], + $_CONF['max_photo_size'], $scaling)); $preferences->parse ('userphoto_option', 'photo', true); } else { $preferences->set_var ('userphoto_option', ''); From geeklog-cvs at lists.geeklog.net Fri Nov 21 07:11:32 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 21 Nov 2008 07:11:32 -0500 Subject: [geeklog-cvs] bad_behavior2: Upgraded to Bad Behavior 2.0.25 Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/f3d741c1b860 changeset: 6:f3d741c1b860 user: Dirk Haun date: Fri Nov 21 13:11:20 2008 +0100 description: Upgraded to Bad Behavior 2.0.25 diffstat: 5 files changed, 7 insertions(+), 7 deletions(-) INSTALL.txt | 6 +++--- public_html/README.txt | 2 +- public_html/bad-behavior-wordpress.php | 2 +- public_html/bad-behavior/blackhole.inc.php | 2 +- public_html/bad-behavior/version.inc.php | 2 +- diffs (71 lines): diff -r 12b0c8697063 -r f3d741c1b860 INSTALL.txt --- a/INSTALL.txt Mon Sep 29 13:51:36 2008 +0200 +++ b/INSTALL.txt Fri Nov 21 13:11:20 2008 +0100 @@ -1,4 +1,4 @@ -Bad Behavior2 Plugin v2.0.24 for Geeklog v1.4.1 and later +Bad Behavior2 Plugin v2.0.25 for Geeklog v1.4.1 and later - Bad Behavior 2 is Copyright (c) 2005-2008 Michael Hampton. All rights reserved. Original Geeklog Plugin by Dirk Haun @@ -18,7 +18,7 @@ With one exception (see step 5), this plugin installs like any other Geeklog plugin: -1) Unpack bad_behavior2_2.0.24-1.4.1.tar.gz +1) Unpack bad_behavior2_2.0.25-1.4.1.tar.gz 2) Upload the contents of the public_html directory into /path/to/geeklog/public_html/bad_behavior2 3) Upload the contents of the admin directory into @@ -47,7 +47,7 @@ UPGRADING If you are upgrading from v1.2.4-1 you must first uninstall the existing -plugin before you install v2.0.24. +plugin before you install v2.0.25. - Perform a standard plugin uninstall - Plugins -> Bad Behavior - Delete - Do not forget to remove the Bad Behavior 1 lib-common.php entry diff -r 12b0c8697063 -r f3d741c1b860 public_html/README.txt --- a/public_html/README.txt Mon Sep 29 13:51:36 2008 +0200 +++ b/public_html/README.txt Fri Nov 21 13:11:20 2008 +0100 @@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=error%40ioerror%2eus&item_name=Bad%20Behavior%20%28From%20WordPress%20Page%29&no_shipping=1&cn=Comments%20about%20Bad%20Behavior&tax=0¤cy_code=USD&bn=PP%2dDonationsBF&charset=UTF%2d8 Requires at least: 1.2 Tested up to: 2.7 -Stable tag: 2.0.24 +Stable tag: 2.0.25 Welcome to a whole new way of keeping your blog, forum, guestbook, wiki or content management system free of link spam. Bad Behavior is a PHP-based diff -r 12b0c8697063 -r f3d741c1b860 public_html/bad-behavior-wordpress.php --- a/public_html/bad-behavior-wordpress.php Mon Sep 29 13:51:36 2008 +0200 +++ b/public_html/bad-behavior-wordpress.php Fri Nov 21 13:11:20 2008 +0100 @@ -1,7 +1,7 @@ = $settings['httpbl_threat'] && $ip[1] >= $settings['httpbl_maxage']) { + if ($ip[0] == 127 && ($ip[3] & 7) && $ip[2] >= $settings['httpbl_threat'] && $ip[1] <= $settings['httpbl_maxage']) { return '2b021b1f'; } } diff -r 12b0c8697063 -r f3d741c1b860 public_html/bad-behavior/version.inc.php --- a/public_html/bad-behavior/version.inc.php Mon Sep 29 13:51:36 2008 +0200 +++ b/public_html/bad-behavior/version.inc.php Fri Nov 21 13:11:20 2008 +0100 @@ -1,3 +1,3 @@ From geeklog-cvs at lists.geeklog.net Sat Nov 22 15:31:08 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 22 Nov 2008 15:31:08 -0500 Subject: [geeklog-cvs] geeklog: In the Professional theme, the last menu entry isn't an... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/0aebc29b9f54 changeset: 6476:0aebc29b9f54 user: Dirk Haun date: Sat Nov 22 19:51:40 2008 +0100 description: In the Professional theme, the last menu entry isn't any different from the others so we don't need a .last rule. diffstat: 1 file changed, 5 deletions(-) public_html/layout/professional/style.css | 5 ----- diffs (15 lines): diff -r b6bdc9fd122a -r 0aebc29b9f54 public_html/layout/professional/style.css --- a/public_html/layout/professional/style.css Sun Nov 16 19:59:29 2008 +0100 +++ b/public_html/layout/professional/style.css Sat Nov 22 19:51:40 2008 +0100 @@ -530,11 +530,6 @@ font-size:.9em; border-left: 1px dotted #FFFFFF; } - -.header-navigation-container li.last { - border:none; -} - .header-navigation-container a:link { color:#0000FF; } From geeklog-cvs at lists.geeklog.net Sat Nov 22 16:08:31 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 22 Nov 2008 16:08:31 -0500 Subject: [geeklog-cvs] geeklog: Re-introduced the path hints in the install script when... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/8d94805f4047 changeset: 6477:8d94805f4047 user: Dirk Haun date: Sat Nov 22 22:08:19 2008 +0100 description: Re-introduced the path hints in the install script when it can't find db-config.php diffstat: 4 files changed, 19 insertions(+), 3 deletions(-) public_html/admin/install/index.php | 7 +++++++ public_html/admin/install/language/english.php | 5 ++++- public_html/admin/install/language/german.php | 8 ++++++-- public_html/docs/history | 2 ++ diffs (69 lines): diff -r 0aebc29b9f54 -r 8d94805f4047 public_html/admin/install/index.php --- a/public_html/admin/install/index.php Sat Nov 22 19:51:40 2008 +0100 +++ b/public_html/admin/install/index.php Sat Nov 22 22:08:19 2008 +0100 @@ -1613,6 +1613,13 @@ ' . $form_fields . ' ' . LB; + $display .= '

' . $LANG_INSTALL[94] . '

' . LB + . '

  • ' . $LANG_INSTALL[95] . '' . LB + . '' . strtr(__FILE__, '\\', '/') . '
  • ' + . '
  • ' . sprintf($LANG_INSTALL[96], + 'db-config.php') + . '' . LB . '' . $gl_path + . '
' . LB; } break; diff -r 0aebc29b9f54 -r 8d94805f4047 public_html/admin/install/language/english.php --- a/public_html/admin/install/language/english.php Sat Nov 22 19:51:40 2008 +0100 +++ b/public_html/admin/install/language/english.php Sat Nov 22 22:08:19 2008 +0100 @@ -143,7 +143,10 @@ 90 => 'Empty database?', 91 => 'It appears that either your database is empty or the database credentials you entered are incorrect. Or maybe you wanted to perform a New Install (instead of an Upgrade)? Please go back and try again.', 92 => 'Use UTF-8', - 93 => 'Success' + 93 => 'Success', + 94 => 'Here are some hints to find the correct path:', + 95 => 'The complete path to this file (the install script) is:', + 96 => 'The installer was looking for %s in:' ); // +---------------------------------------------------------------------------+ diff -r 0aebc29b9f54 -r 8d94805f4047 public_html/admin/install/language/german.php --- a/public_html/admin/install/language/german.php Sat Nov 22 19:51:40 2008 +0100 +++ b/public_html/admin/install/language/german.php Sat Nov 22 22:08:19 2008 +0100 @@ -133,7 +133,7 @@ 80 => '?ndern', 81 => 'Stop!', 82 => 'Es ist unbedingt n?tig, die Zugriffsrechte der unten aufgef?hrten Dateien zu ?ndern. Andernfalls wirst Du Geeklog nicht installieren k?nnen.', - 83 => 'Installation Error', + 83 => 'Fehler bei der Installation', 84 => 'The path "', 85 => '" does not appear to be correct. Please go back and try again.', 86 => 'Sprache', @@ -142,7 +142,11 @@ 89 => 'Aktuelle Version:', 90 => 'Leere Datenbank?', 91 => 'It appears that either your database is empty or the database credentials you entered are incorrect. Or maybe you wanted to perform a New Install (instead of an Upgrade)? Please go back and try again.', - 92 => 'Benutze UTF-8' + 92 => 'Benutze UTF-8', + 93 => 'Success', + 94 => 'Hier sind einige Hinweise, um den richtigen Pfad zu ermitteln:', + 95 => 'Der komplette Pfad zu dieser Datei (dem Installations-Skript) ist:', + 96 => 'Das Installations-Skript hat nach %s in diesem Verzeichnis gesucht:' ); // +---------------------------------------------------------------------------+ diff -r 0aebc29b9f54 -r 8d94805f4047 public_html/docs/history --- a/public_html/docs/history Sat Nov 22 19:51:40 2008 +0100 +++ b/public_html/docs/history Sat Nov 22 22:08:19 2008 +0100 @@ -3,6 +3,8 @@ ??? ??, 2008 (1.5.2) ------------ +- Re-introduced the path hints in the install script when it can't find + db-config.php [Dirk] - Added a note about the max. dimensions of a userphoto in the About You pane of a user's My Account page (feature request #0000629) [Dirk] - Don't include X-Originating-IP header in emails sent from the site's admin From geeklog-cvs at lists.geeklog.net Sat Nov 22 17:23:44 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 22 Nov 2008 17:23:44 -0500 Subject: [geeklog-cvs] geeklog: Added urlencoded versions of {link_actual_url} and {lin... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/9bca73bddd43 changeset: 6478:9bca73bddd43 user: Dirk Haun date: Sat Nov 22 23:23:34 2008 +0100 description: Added urlencoded versions of {link_actual_url} and {link_name} diffstat: 2 files changed, 13 insertions(+), 9 deletions(-) public_html/docs/history | 1 + public_html/links/index.php | 21 ++++++++++++--------- diffs (42 lines): diff -r 8d94805f4047 -r 9bca73bddd43 public_html/docs/history --- a/public_html/docs/history Sat Nov 22 22:08:19 2008 +0100 +++ b/public_html/docs/history Sat Nov 22 23:23:34 2008 +0100 @@ -63,6 +63,7 @@ Links plugin ------------ +- Added urlencoded versions of {link_actual_url} and {link_name} [Dirk] - Prevent overwriting existing links when changing the link ID [Dirk] Polls plugin diff -r 8d94805f4047 -r 9bca73bddd43 public_html/links/index.php --- a/public_html/links/index.php Sat Nov 22 22:08:19 2008 +0100 +++ b/public_html/links/index.php Sat Nov 22 23:23:34 2008 +0100 @@ -344,15 +344,18 @@ { global $_CONF, $_USER, $LANG_ADMIN, $LANG_LINKS, $_IMAGE_TYPE, $LANG_DIRECTION; - $url = COM_buildUrl ($_CONF['site_url'] - . '/links/portal.php?what=link&item=' . $A['lid']); - $template->set_var ('link_url', $url); - $template->set_var ('link_actual_url', $A['url']); - $template->set_var ('link_name', stripslashes ($A['title'])); - $template->set_var ('link_hits', COM_numberFormat ($A['hits'])); - $template->set_var ('link_description', - nl2br (stripslashes ($A['description']))); - $content = stripslashes ($A['title']); + $url = COM_buildUrl($_CONF['site_url'] + . '/links/portal.php?what=link&item=' . $A['lid']); + $template->set_var('link_url', $url); + $template->set_var('link_actual_url', $A['url']); + $template->set_var('link_actual_url_encoded', urlencode($A['url'])); + $template->set_var('link_name', stripslashes($A['title'])); + $template->set_var('link_name_encoded', + urlencode(stripslashes($A['title']))); + $template->set_var('link_hits', COM_numberFormat ($A['hits'])); + $template->set_var('link_description', + nl2br(stripslashes($A['description']))); + $content = stripslashes($A['title']); $class = 'ext-link'; if ((!empty($LANG_DIRECTION)) && ($LANG_DIRECTION == 'rtl')) { $class .= '-rtl'; From geeklog-cvs at lists.geeklog.net Sun Nov 23 04:57:40 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 23 Nov 2008 04:57:40 -0500 Subject: [geeklog-cvs] geeklog: By popular deman: Added an option to allow opening exte... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/209629e9999f changeset: 6479:209629e9999f user: Dirk Haun date: Sun Nov 23 10:47:30 2008 +0100 description: By popular deman: Added an option to allow opening external links in a new window (feature request #0000693) diffstat: 12 files changed, 71 insertions(+), 30 deletions(-) plugins/links/install_defaults.php | 8 +++ plugins/links/language/english.php | 1 plugins/links/language/english_utf-8.php | 1 plugins/links/language/german.php | 3 - plugins/links/language/german_formal.php | 3 - plugins/links/language/german_formal_utf-8.php | 3 - plugins/links/language/german_utf-8.php | 3 - public_html/docs/history | 3 + public_html/docs/links.html | 7 ++ public_html/links/index.php | 61 +++++++++++++----------- sql/updates/mssql_1.5.1_to_1.5.2.php | 4 + sql/updates/mysql_1.5.1_to_1.5.2.php | 4 + diffs (271 lines): diff -r 9bca73bddd43 -r 209629e9999f plugins/links/install_defaults.php --- a/plugins/links/install_defaults.php Sat Nov 22 23:23:34 2008 +0100 +++ b/plugins/links/install_defaults.php Sun Nov 23 10:47:30 2008 +0100 @@ -134,6 +134,12 @@ $_LI_DEFAULT['show_category_descriptions'] = true; /** + * open links in new window + * Whether to open external links in a new window or not. + */ +$_LI_DEFAULT['new_window'] = false; + +/** * Links root category id */ $_LI_DEFAULT['root'] = 'site'; @@ -182,6 +188,8 @@ $c->add('show_top10', $_LI_DEFAULT['show_top10'], 'select', 0, 0, 1, 40, true, 'links'); $c->add('show_category_descriptions', $_LI_DEFAULT['show_category_descriptions'], 'select', 0, 0, 1, 50, true, 'links'); + $c->add('new_window', $_LI_DEFAULT['new_window'], 'select', + 0, 0, 1, 55, true, 'links'); $c->add('fs_admin', NULL, 'fieldset', 0, 1, NULL, 0, true, 'links'); $c->add('hidenewlinks', $_LI_DEFAULT['hidenewlinks'], 'select', diff -r 9bca73bddd43 -r 209629e9999f plugins/links/language/english.php --- a/plugins/links/language/english.php Sat Nov 22 23:23:34 2008 +0100 +++ b/plugins/links/language/english.php Sun Nov 23 10:47:30 2008 +0100 @@ -274,6 +274,7 @@ 'delete_links' => 'Delete Links with Owner?', 'aftersave' => 'After Saving Link', 'show_category_descriptions' => 'Show Category Description?', + 'new_window' => 'Open external links in new window?', 'root' => 'ID of Root Category', 'default_permissions' => 'Link Default Permissions' ); diff -r 9bca73bddd43 -r 209629e9999f plugins/links/language/english_utf-8.php --- a/plugins/links/language/english_utf-8.php Sat Nov 22 23:23:34 2008 +0100 +++ b/plugins/links/language/english_utf-8.php Sun Nov 23 10:47:30 2008 +0100 @@ -274,6 +274,7 @@ 'delete_links' => 'Delete Links with Owner?', 'aftersave' => 'After Saving Link', 'show_category_descriptions' => 'Show Category Description?', + 'new_window' => 'Open external links in new window?', 'root' => 'ID of Root Category', 'default_permissions' => 'Link Default Permissions' ); diff -r 9bca73bddd43 -r 209629e9999f plugins/links/language/german.php --- a/plugins/links/language/german.php Sat Nov 22 23:23:34 2008 +0100 +++ b/plugins/links/language/german.php Sun Nov 23 10:47:30 2008 +0100 @@ -234,6 +234,7 @@ 'delete_links' => 'Links l?schen mit User?', 'aftersave' => 'Nach Abspeichern des Links', 'show_category_descriptions' => 'Kategoriebeschreibung anzeigen?', + 'new_window' => 'Externe Links in neuem Fenster ?ffnen?', 'root' => 'ID der Oberkategorie', 'default_permissions' => 'Grundeinstellung Rechte' ); @@ -256,4 +257,4 @@ 12 => array('Kein Zugang' => 0, 'Nur lesen' => 2, 'Lesen-Schreiben' => 3) ); -?> \ No newline at end of file +?> diff -r 9bca73bddd43 -r 209629e9999f plugins/links/language/german_formal.php --- a/plugins/links/language/german_formal.php Sat Nov 22 23:23:34 2008 +0100 +++ b/plugins/links/language/german_formal.php Sun Nov 23 10:47:30 2008 +0100 @@ -234,6 +234,7 @@ 'delete_links' => 'Links l?schen mit User?', 'aftersave' => 'Nach Abspeichern des Links', 'show_category_descriptions' => 'Kategoriebeschreibung anzeigen?', + 'new_window' => 'Externe Links in neuem Fenster ?ffnen?', 'root' => 'ID der Oberkategorie', 'default_permissions' => 'Grundeinstellung Rechte' ); @@ -256,4 +257,4 @@ 12 => array('Kein Zugang' => 0, 'Nur lesen' => 2, 'Lesen-Schreiben' => 3) ); -?> \ No newline at end of file +?> diff -r 9bca73bddd43 -r 209629e9999f plugins/links/language/german_formal_utf-8.php --- a/plugins/links/language/german_formal_utf-8.php Sat Nov 22 23:23:34 2008 +0100 +++ b/plugins/links/language/german_formal_utf-8.php Sun Nov 23 10:47:30 2008 +0100 @@ -234,6 +234,7 @@ 'delete_links' => 'Links l??schen mit User?', 'aftersave' => 'Nach Abspeichern des Links', 'show_category_descriptions' => 'Kategoriebeschreibung anzeigen?', + 'new_window' => 'Externe Links in neuem Fenster ??ffnen?', 'root' => 'ID der Oberkategorie', 'default_permissions' => 'Grundeinstellung Rechte' ); @@ -256,4 +257,4 @@ 12 => array('Kein Zugang' => 0, 'Nur lesen' => 2, 'Lesen-Schreiben' => 3) ); -?> \ No newline at end of file +?> diff -r 9bca73bddd43 -r 209629e9999f plugins/links/language/german_utf-8.php --- a/plugins/links/language/german_utf-8.php Sat Nov 22 23:23:34 2008 +0100 +++ b/plugins/links/language/german_utf-8.php Sun Nov 23 10:47:30 2008 +0100 @@ -234,6 +234,7 @@ 'delete_links' => 'Links l??schen mit User?', 'aftersave' => 'Nach Abspeichern des Links', 'show_category_descriptions' => 'Kategoriebeschreibung anzeigen?', + 'new_window' => 'Externe Links in neuem Fenster ??ffnen?', 'root' => 'ID der Oberkategorie', 'default_permissions' => 'Grundeinstellung Rechte' ); @@ -256,4 +257,4 @@ 12 => array('Kein Zugang' => 0, 'Nur lesen' => 2, 'Lesen-Schreiben' => 3) ); -?> \ No newline at end of file +?> diff -r 9bca73bddd43 -r 209629e9999f public_html/docs/history --- a/public_html/docs/history Sat Nov 22 23:23:34 2008 +0100 +++ b/public_html/docs/history Sun Nov 23 10:47:30 2008 +0100 @@ -63,6 +63,9 @@ Links plugin ------------ +- Added an option to allow opening external links in a new window (feature + request #0000693). Use with care, please [Dirk] +- Only external links are marked with class="ext-link" [Dirk] - Added urlencoded versions of {link_actual_url} and {link_name} [Dirk] - Prevent overwriting existing links when changing the link ID [Dirk] diff -r 9bca73bddd43 -r 209629e9999f public_html/docs/links.html --- a/public_html/docs/links.html Sat Nov 22 23:23:34 2008 +0100 +++ b/public_html/docs/links.html Sun Nov 23 10:47:30 2008 +0100 @@ -58,6 +58,13 @@
+ + + + +
{lang_pollid}: {lang_donotusespaces} {lang_donotusespaces}
{lang_topic}:
{display_photo}{display_photo}{photo_max_dimensions}
show_category_descriptions true Whether to show subcategory descriptions when viewing a category or not.
new_windowfalseWhether to open external links in a new window or not.
+ Note: Use this option with care. It takes control away from your users and may confuse or annoy them.
diff -r 9bca73bddd43 -r 209629e9999f public_html/links/index.php --- a/public_html/links/index.php Sat Nov 22 23:23:34 2008 +0100 +++ b/public_html/links/index.php Sun Nov 23 10:47:30 2008 +0100 @@ -340,55 +340,64 @@ * @param ref $template reference of the links template * */ -function prepare_link_item ($A, &$template) +function prepare_link_item($A, &$template) { - global $_CONF, $_USER, $LANG_ADMIN, $LANG_LINKS, $_IMAGE_TYPE, $LANG_DIRECTION; + global $_CONF, $_USER, $_LI_CONF, $LANG_ADMIN, $LANG_LINKS, $LANG_DIRECTION, + $_IMAGE_TYPE; $url = COM_buildUrl($_CONF['site_url'] . '/links/portal.php?what=link&item=' . $A['lid']); + $actualUrl = stripslashes($A['url']); + $title = stripslashes($A['title']); + $template->set_var('link_url', $url); - $template->set_var('link_actual_url', $A['url']); - $template->set_var('link_actual_url_encoded', urlencode($A['url'])); - $template->set_var('link_name', stripslashes($A['title'])); - $template->set_var('link_name_encoded', - urlencode(stripslashes($A['title']))); - $template->set_var('link_hits', COM_numberFormat ($A['hits'])); + $template->set_var('link_actual_url', $actualUrl); + $template->set_var('link_actual_url_encoded', urlencode($actualUrl)); + $template->set_var('link_name', $title); + $template->set_var('link_name_encoded', urlencode($title)); + $template->set_var('link_hits', COM_numberFormat($A['hits'])); $template->set_var('link_description', nl2br(stripslashes($A['description']))); - $content = stripslashes($A['title']); - $class = 'ext-link'; - if ((!empty($LANG_DIRECTION)) && ($LANG_DIRECTION == 'rtl')) { - $class .= '-rtl'; + + $attr = array('title' => $actualUrl); + if (substr($actualUrl, 0, strlen($_CONF['site_url'])) != $_CONF['site_url']) { + $class = 'ext-link'; + if ((!empty($LANG_DIRECTION)) && ($LANG_DIRECTION == 'rtl')) { + $class .= '-rtl'; + } + $attr['class'] = $class; + if ($_LI_CONF['new_window']) { + $attr['target'] = '_blank'; + } } - $attr = array( - 'title' => stripslashes ($A['url']), - 'class' => $class); - $html = COM_createLink($content, $url, $attr); - $template->set_var ('link_html', $html); + $html = COM_createLink($title, $url, $attr); + $template->set_var('link_html', $html); + if (!COM_isAnonUser() && !SEC_hasRights('links.edit')) { $reporturl = $_CONF['site_url'] - . '/links/index.php?mode=report&lid=' . $A['lid']; - $template->set_var ('link_broken', + . '/links/index.php?mode=report&lid=' . $A['lid']; + $template->set_var('link_broken', COM_createLink($LANG_LINKS[117], $reporturl, array('class' => 'pluginSmallText', 'rel' => 'nofollow')) ); } else { - $template->set_var ('link_broken', ''); + $template->set_var('link_broken', ''); } - if ((SEC_hasAccess ($A['owner_id'], $A['group_id'], $A['perm_owner'], + if ((SEC_hasAccess($A['owner_id'], $A['group_id'], $A['perm_owner'], $A['perm_group'], $A['perm_members'], $A['perm_anon']) == 3) && - SEC_hasRights ('links.edit')) { + SEC_hasRights('links.edit')) { $editurl = $_CONF['site_admin_url'] . '/plugins/links/index.php?mode=edit&lid=' . $A['lid']; - $template->set_var ('link_edit', COM_createLink($LANG_ADMIN['edit'],$editurl)); + $template->set_var('link_edit', + COM_createLink($LANG_ADMIN['edit'], $editurl)); $edit_icon = ""; - $template->set_var ('edit_icon', COM_createLink($edit_icon, $editurl)); + $template->set_var('edit_icon', COM_createLink($edit_icon, $editurl)); } else { - $template->set_var ('link_edit', ''); - $template->set_var ('edit_icon', ''); + $template->set_var('link_edit', ''); + $template->set_var('edit_icon', ''); } } diff -r 9bca73bddd43 -r 209629e9999f sql/updates/mssql_1.5.1_to_1.5.2.php --- a/sql/updates/mssql_1.5.1_to_1.5.2.php Sat Nov 22 23:23:34 2008 +0100 +++ b/sql/updates/mssql_1.5.1_to_1.5.2.php Sun Nov 23 10:47:30 2008 +0100 @@ -10,6 +10,10 @@ // new option $c->add('jpeg_quality',75,'text',5,23,NULL,1495,FALSE); + + if (INST_pluginExists('links')) { + $c->add('new_window',false,'select',0,0,1,55,TRUE,'links'); + } return true; } diff -r 9bca73bddd43 -r 209629e9999f sql/updates/mysql_1.5.1_to_1.5.2.php --- a/sql/updates/mysql_1.5.1_to_1.5.2.php Sat Nov 22 23:23:34 2008 +0100 +++ b/sql/updates/mysql_1.5.1_to_1.5.2.php Sun Nov 23 10:47:30 2008 +0100 @@ -10,6 +10,10 @@ // new option $c->add('jpeg_quality',75,'text',5,23,NULL,1495,FALSE); + + if (INST_pluginExists('links')) { + $c->add('new_window',false,'select',0,0,1,55,TRUE,'links'); + } return true; } From geeklog-cvs at lists.geeklog.net Sun Nov 23 06:21:04 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 23 Nov 2008 06:21:04 -0500 Subject: [geeklog-cvs] geeklog: Added a print.css stylesheet to be used by the printabl... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/371058dec30a changeset: 6480:371058dec30a user: Dirk Haun date: Sun Nov 23 12:20:53 2008 +0100 description: Added a print.css stylesheet to be used by the printable template files (feature request #0000766) diffstat: 6 files changed, 32 insertions(+), 5 deletions(-) plugins/staticpages/functions.inc | 2 ++ plugins/staticpages/templates/printable.thtml | 10 ++++++---- public_html/docs/history | 4 ++++ public_html/docs/theme.html | 6 ++++++ public_html/layout/professional/article/printable.thtml | 4 +++- public_html/layout/professional/print.css | 11 +++++++++++ diffs (109 lines): diff -r 209629e9999f -r 371058dec30a plugins/staticpages/functions.inc --- a/plugins/staticpages/functions.inc Sun Nov 23 10:47:30 2008 +0100 +++ b/plugins/staticpages/functions.inc Sun Nov 23 12:20:53 2008 +0100 @@ -409,6 +409,8 @@ $print->set_var('site_slogan', $_CONF['site_slogan']); $print->set_var('direction', $LANG_DIRECTION); + $print->set_var('lang_id', ''); // TBD + $print->set_var('lang_attribute', ''); // TBD $print->set_var('xhtml', XHTML); $print->set_var('page_title', $_CONF['site_name'] . ' - ' . stripslashes($A['sp_title'])); diff -r 209629e9999f -r 371058dec30a plugins/staticpages/templates/printable.thtml --- a/plugins/staticpages/templates/printable.thtml Sun Nov 23 10:47:30 2008 +0100 +++ b/plugins/staticpages/templates/printable.thtml Sun Nov 23 12:20:53 2008 +0100 @@ -1,7 +1,9 @@ - - + + - {page_title} + {page_title} + +

{sp_title}

@@ -13,6 +15,6 @@

{site_name} {sp_url}

-({comments_text}) +

({comments_text})

diff -r 209629e9999f -r 371058dec30a public_html/docs/history --- a/public_html/docs/history Sun Nov 23 10:47:30 2008 +0100 +++ b/public_html/docs/history Sun Nov 23 12:20:53 2008 +0100 @@ -3,6 +3,8 @@ ??? ??, 2008 (1.5.2) ------------ +- Added a print.css stylesheet to be used by the printable template files + (feature request #0000766) [Dirk] - Re-introduced the path hints in the install script when it can't find db-config.php [Dirk] - Added a note about the max. dimensions of a userphoto in the About You pane @@ -78,6 +80,8 @@ Static Pages plugin ------------------- +- The printable.thtml template file uses the HTML Strict doctype and print.css + now [Dirk] - Fixed call to WS_makeId when sp_id was longer than STATICPAGE_MAX_ID_LENGTH (found by Marc Maier) [Dirk] - Display "successfully saved" and "successfully deleted" messages, just like diff -r 209629e9999f -r 371058dec30a public_html/docs/theme.html --- a/public_html/docs/theme.html Sun Nov 23 10:47:30 2008 +0100 +++ b/public_html/docs/theme.html Sun Nov 23 12:20:53 2008 +0100 @@ -200,6 +200,9 @@
  • New variable {photo_max_dimensions} to inform users about the max. dimensions of a userphoto: preferences/userphoto.thtml
  • +
  • Added a print.css stylesheet to be used by the + printable.thtml template files for articles and the static pages + plugin.

Plugins

@@ -208,6 +211,9 @@
  • The template file for the Polls editor has been changed to allow up to 40 characters for the poll id (pid): plugins/polls/templates/admin/polleditor.thtml
  • +
  • The printable.thtml template file for the static pages plugin now + uses print.css (see above). It also uses the HTML Strict doctype + now.
  • Theme changes in Geeklog 1.5.1

    diff -r 209629e9999f -r 371058dec30a public_html/layout/professional/article/printable.thtml --- a/public_html/layout/professional/article/printable.thtml Sun Nov 23 10:47:30 2008 +0100 +++ b/public_html/layout/professional/article/printable.thtml Sun Nov 23 12:20:53 2008 +0100 @@ -1,7 +1,9 @@ - {page_title} + {page_title} + +

    {story_title}

    diff -r 209629e9999f -r 371058dec30a public_html/layout/professional/print.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/public_html/layout/professional/print.css Sun Nov 23 12:20:53 2008 +0100 @@ -0,0 +1,11 @@ +/* STYLESHEET FOR PRINTOUTS *************************************************** + + Minimal stylesheet for printable templates. + +*/ + +body { + background:#FFFFFF; + color:#000000; + font-family: arial,verdana,tahoma,helvetica,sans-serif; +} From geeklog-cvs at lists.geeklog.net Sun Nov 23 12:29:21 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 23 Nov 2008 12:29:21 -0500 Subject: [geeklog-cvs] geeklog: Fixed E_ALL error Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/daf8ec875097 changeset: 6481:daf8ec875097 user: Dirk Haun date: Sun Nov 23 18:02:28 2008 +0100 description: Fixed E_ALL error diffstat: 1 file changed, 1 insertion(+), 1 deletion(-) public_html/users.php | 2 +- diffs (12 lines): diff -r 371058dec30a -r daf8ec875097 public_html/users.php --- a/public_html/users.php Sun Nov 23 12:20:53 2008 +0100 +++ b/public_html/users.php Sun Nov 23 18:02:28 2008 +0100 @@ -872,7 +872,7 @@ $msg = COM_applyFilter($_GET['msg'], true); } $plugin = ''; - if ($msg > 0) { + if (($msg > 0) && isset($_GET['plugin'])) { $plugin = COM_applyFilter($_GET['plugin']); } $display .= userprofile($uid, $msg, $plugin); From geeklog-cvs at lists.geeklog.net Sun Nov 23 12:29:22 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 23 Nov 2008 12:29:22 -0500 Subject: [geeklog-cvs] geeklog: Fixed inconsistencies and various small mistakes when d... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/1af9f9a87ef2 changeset: 6482:1af9f9a87ef2 user: Dirk Haun date: Sun Nov 23 18:24:58 2008 +0100 description: Fixed inconsistencies and various small mistakes when displaying "Access denied" messages on the admin pages diffstat: 26 files changed, 161 insertions(+), 226 deletions(-) language/english.php | 24 ++++++++-------- language/english_utf-8.php | 20 ++++++------- language/german.php | 2 - language/german_formal.php | 2 - language/german_formal_utf-8.php | 2 - language/german_utf-8.php | 2 - public_html/admin/block.php | 27 +++++++----------- public_html/admin/database.php | 33 ++++++++++------------- public_html/admin/group.php | 15 ++++------ public_html/admin/mail.php | 15 ++++------ public_html/admin/plugins.php | 13 +++------ public_html/admin/plugins/calendar/index.php | 18 ++++-------- public_html/admin/plugins/links/category.php | 11 ++----- public_html/admin/plugins/links/index.php | 25 ++++++----------- public_html/admin/plugins/polls/index.php | 26 ++++++------------ public_html/admin/plugins/spamx/index.php | 18 ++++++------ public_html/admin/plugins/staticpages/index.php | 16 +++++------ public_html/admin/sectest.php | 16 +++++------ public_html/admin/story.php | 9 ++---- public_html/admin/syndication.php | 13 ++++----- public_html/admin/topic.php | 22 ++++++--------- public_html/admin/trackback.php | 11 ++----- public_html/admin/user.php | 11 ++----- public_html/docs/history | 2 + system/classes/config.class.php | 7 +--- system/lib-story.php | 27 ++++++------------ diffs (truncated from 767 to 300 lines): diff -r daf8ec875097 -r 1af9f9a87ef2 language/english.php --- a/language/english.php Sun Nov 23 18:02:28 2008 +0100 +++ b/language/english.php Sun Nov 23 18:24:58 2008 +0100 @@ -1134,24 +1134,24 @@ 26 => '', 27 => 'Message successfully sent.', 28 => 'The plugin has been successfully saved', - 29 => '', + 29 => 'Sorry, you do not have access to this administration page. Please note that all attempts to access unauthorized features are logged', 30 => 'Access Denied', - 31 => 'Sorry, you do not have access to the story administration page. Please note that all attempts to access unauthorized features are logged', - 32 => 'Sorry, you do not have access to the topic administration page. Please note that all attempts to access unauthorized features are logged', - 33 => 'Sorry, you do not have access to the block administration page. Please note that all attempts to access unauthorized features are logged', + 31 => '', + 32 => '', + 33 => '', 34 => '', 35 => '', 36 => '', - 37 => 'Sorry, you do not have access to the user administration page. Please note that all attempts to access unauthorized features are logged', - 38 => 'Sorry, you do not have access to the plugin administration page. Please note that all attempts to access unauthorized features are logged', - 39 => 'Sorry, you do not have access to the mail administration page. Please note that all attempts to access unauthorized features are logged', + 37 => '', + 38 => '', + 39 => '', 40 => 'System Message', - 41 => 'Sorry, you do not have access to the word replacement page. Please note that all attempts to access unauthorized features are logged', - 42 => 'Your word has been successfully saved.', - 43 => 'The word has been successfully deleted.', + 41 => '', + 42 => '', + 43 => '', 44 => 'The plugin was successfully installed!', 45 => 'The plugin was successfully deleted.', - 46 => 'Sorry, you do not have access to the database backup utility. Please note that all attempts to access unauthorized features are logged', + 46 => '', 47 => 'This functionality only works under *nix. If you are running *nix as your operating system then your cache has been successfully cleared. If you are on Windows, you will need to search for files name adodb_*.php and remove them manually.', 48 => "Thank you for applying for a membership with {$_CONF['site_name']}. Our team will review your application. If approved, your password will be emailed to you at the email address you just entered.", 49 => 'Your group has been successfully saved.', @@ -1201,7 +1201,7 @@ 93 => 'Database back up was successful.', 94 => 'Backup Failed: Filesize less than 1kb', 95 => 'There was an error.', - 96 => 'Sorry, you do not have access to the configuration administration page. Please note that all attempts to access unauthorized features are logged.', + 96 => '', 97 => 'Not all required fields have been passed validation - default custom membership message', 98 => 'The plugin was successfully uploaded.', 99 => 'The plugin already exists.', diff -r daf8ec875097 -r 1af9f9a87ef2 language/english_utf-8.php --- a/language/english_utf-8.php Sun Nov 23 18:02:28 2008 +0100 +++ b/language/english_utf-8.php Sun Nov 23 18:24:58 2008 +0100 @@ -1134,24 +1134,24 @@ 26 => '', 27 => 'Message successfully sent.', 28 => 'The plugin has been successfully saved', - 29 => '', + 29 => 'Sorry, you do not have access to this administration page. Please note that all attempts to access unauthorized features are logged', 30 => 'Access Denied', - 31 => 'Sorry, you do not have access to the story administration page. Please note that all attempts to access unauthorized features are logged', - 32 => 'Sorry, you do not have access to the topic administration page. Please note that all attempts to access unauthorized features are logged', - 33 => 'Sorry, you do not have access to the block administration page. Please note that all attempts to access unauthorized features are logged', + 31 => '', + 32 => '', + 33 => '', 34 => '', 35 => '', 36 => '', - 37 => 'Sorry, you do not have access to the user administration page. Please note that all attempts to access unauthorized features are logged', - 38 => 'Sorry, you do not have access to the plugin administration page. Please note that all attempts to access unauthorized features are logged', - 39 => 'Sorry, you do not have access to the mail administration page. Please note that all attempts to access unauthorized features are logged', + 37 => '', + 38 => '', + 39 => '', 40 => 'System Message', - 41 => 'Sorry, you do not have access to the word replacement page. Please note that all attempts to access unauthorized features are logged', + 41 => '', 42 => 'Your word has been successfully saved.', 43 => 'The word has been successfully deleted.', 44 => 'The plugin was successfully installed!', 45 => 'The plugin was successfully deleted.', - 46 => 'Sorry, you do not have access to the database backup utility. Please note that all attempts to access unauthorized features are logged', + 46 => '', 47 => 'This functionality only works under *nix. If you are running *nix as your operating system then your cache has been successfully cleared. If you are on Windows, you will need to search for files name adodb_*.php and remove them manually.', 48 => "Thank you for applying for a membership with {$_CONF['site_name']}. Our team will review your application. If approved, your password will be emailed to you at the email address you just entered.", 49 => 'Your group has been successfully saved.', @@ -1201,7 +1201,7 @@ 93 => 'Database back up was successful.', 94 => 'Backup Failed: Filesize less than 1kb', 95 => 'There was an error.', - 96 => 'Sorry, you do not have access to the configuration administration page. Please note that all attempts to access unauthorized features are logged.', + 96 => '', 97 => 'Not all required fields have been passed validation - default custom membership message', 98 => 'The plugin was successfully uploaded.', 99 => 'The plugin already exists.', diff -r daf8ec875097 -r 1af9f9a87ef2 language/german.php --- a/language/german.php Sun Nov 23 18:02:28 2008 +0100 +++ b/language/german.php Sun Nov 23 18:24:58 2008 +0100 @@ -1119,7 +1119,7 @@ 26 => '', 27 => 'Nachricht wurde verschickt.', 28 => 'Das Plugin wurde gespeichert.', - 29 => '', + 29 => 'Du hast keinen Zugriff auf diese Administrationsseite. Alle Versuche, auf Bereiche ohne entsprechende Berechtigung zuzugreifen, werden protokolliert.', 30 => 'Zugriff verweigert', 31 => 'Du hast keinen Zugriff auf die Artikel-Administrationsseite. Alle Versuche, auf Bereiche ohne entsprechende Berechtigung zuzugreifen, werden protokolliert.', 32 => 'Du hast keinen Zugriff auf die Kategorie-Administrationsseite. Alle Versuche, auf Bereiche ohne entsprechende Berechtigung zuzugreifen, werden protokolliert.', diff -r daf8ec875097 -r 1af9f9a87ef2 language/german_formal.php --- a/language/german_formal.php Sun Nov 23 18:02:28 2008 +0100 +++ b/language/german_formal.php Sun Nov 23 18:24:58 2008 +0100 @@ -1120,7 +1120,7 @@ 26 => '', 27 => 'Nachricht wurde verschickt.', 28 => 'Das Plugin wurde gespeichert.', - 29 => '', + 29 => 'Sie haben keinen Zugriff auf diese Administrationsseite. Alle Versuche, auf Bereiche ohne entsprechende Berechtigung zuzugreifen, werden protokolliert.', 30 => 'Zugriff verweigert', 31 => 'Sie haben keinen Zugriff auf die Artikel-Administrationsseite. Alle Versuche, auf Bereiche ohne entsprechende Berechtigung zuzugreifen, werden protokolliert.', 32 => 'Sie haben keinen Zugriff auf die Kategorie-Administrationsseite. Alle Versuche, auf Bereiche ohne entsprechende Berechtigung zuzugreifen, werdenprotokolliert.', diff -r daf8ec875097 -r 1af9f9a87ef2 language/german_formal_utf-8.php --- a/language/german_formal_utf-8.php Sun Nov 23 18:02:28 2008 +0100 +++ b/language/german_formal_utf-8.php Sun Nov 23 18:24:58 2008 +0100 @@ -1120,7 +1120,7 @@ 26 => '', 27 => 'Nachricht wurde verschickt.', 28 => 'Das Plugin wurde gespeichert.', - 29 => '', + 29 => 'Sie haben keinen Zugriff auf diese Administrationsseite. Alle Versuche, auf Bereiche ohne entsprechende Berechtigung zuzugreifen, werden protokolliert.', 30 => 'Zugriff verweigert', 31 => 'Sie haben keinen Zugriff auf die Artikel-Administrationsseite. Alle Versuche, auf Bereiche ohne entsprechende Berechtigung zuzugreifen, werden protokolliert.', 32 => 'Sie haben keinen Zugriff auf die Kategorie-Administrationsseite. Alle Versuche, auf Bereiche ohne entsprechende Berechtigung zuzugreifen, werdenprotokolliert.', diff -r daf8ec875097 -r 1af9f9a87ef2 language/german_utf-8.php --- a/language/german_utf-8.php Sun Nov 23 18:02:28 2008 +0100 +++ b/language/german_utf-8.php Sun Nov 23 18:24:58 2008 +0100 @@ -1119,7 +1119,7 @@ 26 => '', 27 => 'Nachricht wurde verschickt.', 28 => 'Das Plugin wurde gespeichert.', - 29 => '', + 29 => 'Du hast keinen Zugriff auf diese Administrationsseite. Alle Versuche, auf Bereiche ohne entsprechende Berechtigung zuzugreifen, werden protokolliert.', 30 => 'Zugriff verweigert', 31 => 'Du hast keinen Zugriff auf die Artikel-Administrationsseite. Alle Versuche, auf Bereiche ohne entsprechende Berechtigung zuzugreifen, werden protokolliert.', 32 => 'Du hast keinen Zugriff auf die Kategorie-Administrationsseite. Alle Versuche, auf Bereiche ohne entsprechende Berechtigung zuzugreifen, werden protokolliert.', diff -r daf8ec875097 -r 1af9f9a87ef2 public_html/admin/block.php --- a/public_html/admin/block.php Sun Nov 23 18:02:28 2008 +0100 +++ b/public_html/admin/block.php Sun Nov 23 18:24:58 2008 +0100 @@ -37,21 +37,19 @@ require_once '../lib-common.php'; require_once 'auth.inc.php'; -require_once $_CONF['path_system'] . 'lib-security.php'; // Uncomment the line below if you need to debug the HTTP variables being passed // to the script. This will sometimes cause errors but it will allow you to see // the data being passed in a POST operation // echo COM_debug($_POST); -if (!SEC_hasRights ('block.edit')) { - $display .= COM_siteHeader ('menu', $MESSAGE[30]) - . COM_startBlock ($MESSAGE[30], '', - COM_getBlockTemplate ('_msg_block', 'header')) - . $MESSAGE[33] - . COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer')) - . COM_siteFooter (); - COM_accessLog ("User {$_USER['username']} tried to illegally access the block administration screen"); +$display = ''; + +if (!SEC_hasRights('block.edit')) { + $display .= COM_siteHeader('menu', $MESSAGE[30]) + . COM_showMessageText($MESSAGE[29], $MESSAGE[30]) + . COM_siteFooter(); + COM_accessLog("User {$_USER['username']} tried to illegally access the block administration screen"); echo $display; exit; } @@ -513,13 +511,10 @@ $access = SEC_hasAccess ($owner_id, $group_id, $perm_owner, $perm_group, $perm_members, $perm_anon); } - if (($access < 3) || !hasBlockTopicAccess ($tid) || !SEC_inGroup ($group_id)) { - $retval .= COM_siteHeader('menu', $MESSAGE[30]); - $retval .= COM_startBlock ($MESSAGE[30], '', - COM_getBlockTemplate ('_msg_block', 'header')); - $retval .= $MESSAGE[33]; - $retval .= COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer')); - $retval .= COM_siteFooter(); + if (($access < 3) || !hasBlockTopicAccess($tid) || !SEC_inGroup($group_id)) { + $retval .= COM_siteHeader('menu', $MESSAGE[30]) + . COM_showMessageText($MESSAGE[29], $MESSAGE[30]) + . COM_siteFooter(); COM_accessLog("User {$_USER['username']} tried to illegally create or edit block $bid."); return $retval; diff -r daf8ec875097 -r 1af9f9a87ef2 public_html/admin/database.php --- a/public_html/admin/database.php Sun Nov 23 18:02:28 2008 +0100 +++ b/public_html/admin/database.php Sun Nov 23 18:24:58 2008 +0100 @@ -36,13 +36,23 @@ require_once '../lib-common.php'; require_once 'auth.inc.php'; -require_once $_CONF['path_system'] . 'lib-security.php'; + +$display = ''; + +// If user isn't a Root user or if the backup feature is disabled, bail. +if (!SEC_inGroup('Root') OR ($_CONF['allow_mysqldump'] == 0)) { + $display .= COM_siteHeader('menu', $LANG_DB_BACKUP['last_ten_backups']) + . COM_showMessageText($MESSAGE[29], $MESSAGE[30]) + . COM_siteFooter(); + COM_accessLog("User {$_USER['username']} tried to illegally access the database backup screen."); + echo $display; + exit; +} /** -* This page allows all Root admins to create a database backup. This will not -* allow the removal of past backups. It's pretty simple actually. The admin -* clicks a button, we do a mysqldump to a file in the following format: -* geeklog_db_backup_YYYY_MM_DD.sql That's it. +* This page allows all Root admins to create a database backup. It's pretty +* simple actually. The admin clicks a button, we do a mysqldump to a file in +* the following format: geeklog_db_backup_YYYY_MM_DD_hh_mm_ss.sql That's it. */ /** @@ -253,19 +263,6 @@ // MAIN $display = ''; -// If user isn't a root user or if the backup feature is disabled, bail. -if (!SEC_inGroup('Root') OR $_CONF['allow_mysqldump'] == 0) { - $display .= COM_siteHeader('menu', $LANG_DB_BACKUP['last_ten_backups']); - $display .= COM_startBlock($MESSAGE[30], '', - COM_getBlockTemplate('_msg_block', 'header')); - $display .= $MESSAGE[46]; - $display .= COM_endBlock(COM_getBlockTemplate('_msg_block', 'footer')); - $display .= COM_siteFooter(); - COM_accessLog("User {$_USER['username']} tried to illegally access the database backup screen."); - echo $display; - exit; -} - $mode = ''; if (isset($_GET['mode'])) { if ($_GET['mode'] == 'backup') { diff -r daf8ec875097 -r 1af9f9a87ef2 public_html/admin/group.php --- a/public_html/admin/group.php Sun Nov 23 18:02:28 2008 +0100 +++ b/public_html/admin/group.php Sun Nov 23 18:24:58 2008 +0100 @@ -37,7 +37,7 @@ /** * This file is the Geeklog Group administration page * -* @author Tony Bibbs +* @author Tony Bibbs * */ @@ -59,14 +59,11 @@ $display = ''; // Make sure user has rights to access this page -if (!SEC_hasRights ('group.edit')) { - $display .= COM_siteHeader ('menu', $MESSAGE[30]); - $display .= COM_startBlock ($MESSAGE[30], '', - COM_getBlockTemplate ('_msg_block', 'header')); - $display .= $MESSAGE[37]; - $display .= COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer')); - $display .= COM_siteFooter (); - COM_accessLog ("User {$_USER['username']} tried to illegally access the group administration screen."); +if (!SEC_hasRights('group.edit')) { + $display .= COM_siteHeader('menu', $MESSAGE[30]) + . COM_showMessageText($MESSAGE[29], $MESSAGE[30]) + . COM_siteFooter(); + COM_accessLog("User {$_USER['username']} tried to illegally access the group administration screen."); echo $display; exit; } diff -r daf8ec875097 -r 1af9f9a87ef2 public_html/admin/mail.php --- a/public_html/admin/mail.php Sun Nov 23 18:02:28 2008 +0100 +++ b/public_html/admin/mail.php Sun Nov 23 18:24:58 2008 +0100 @@ -38,15 +38,12 @@ $display = ''; // Make sure user has access to this page -if (!SEC_inGroup ('Mail Admin') && !SEC_hasrights ('user.mail')) { - $retval .= COM_siteHeader ('menu', $MESSAGE[30]); - $retval .= COM_startBlock ($MESSAGE[30], '', - COM_getBlockTemplate ('_msg_block', 'header')); - $retval .= $MESSAGE[39]; - $retval .= COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer')); - $retval .= COM_siteFooter (); - COM_accessLog ("User {$_USER['username']} tried to illegally access the mail administration screen."); - echo $retval; +if (!SEC_inGroup('Mail Admin') && !SEC_hasrights('user.mail')) { + $display .= COM_siteHeader('menu', $MESSAGE[30]) + . COM_showMessageText($MESSAGE[29], $MESSAGE[30]) + . COM_siteFooter(); + COM_accessLog("User {$_USER['username']} tried to illegally access the mail administration screen."); + echo $display; exit; } From geeklog-cvs at lists.geeklog.net Sun Nov 23 12:29:23 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 23 Nov 2008 12:29:23 -0500 Subject: [geeklog-cvs] geeklog: Missing global declaration of $_USER Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/41007a8ec884 changeset: 6483:41007a8ec884 user: Dirk Haun date: Sun Nov 23 18:27:55 2008 +0100 description: Missing global declaration of $_USER diffstat: 1 file changed, 1 insertion(+), 1 deletion(-) system/classes/config.class.php | 2 +- diffs (12 lines): diff -r 1af9f9a87ef2 -r 41007a8ec884 system/classes/config.class.php --- a/system/classes/config.class.php Sun Nov 23 18:24:58 2008 +0100 +++ b/system/classes/config.class.php Sun Nov 23 18:27:55 2008 +0100 @@ -576,7 +576,7 @@ function _UI_perm_denied() { - global $MESSAGE; + global $_USER, $MESSAGE; $display = COM_siteHeader('menu', $MESSAGE[30]) . COM_showMessageText($MESSAGE[29], $MESSAGE[30]) From geeklog-cvs at lists.geeklog.net Sun Nov 23 13:41:54 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 23 Nov 2008 13:41:54 -0500 Subject: [geeklog-cvs] geeklog: All the bundled plugins require COM_showMessageText now Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/b2c3c0b8dbe1 changeset: 6484:b2c3c0b8dbe1 user: Dirk Haun date: Sun Nov 23 19:36:30 2008 +0100 description: All the bundled plugins require COM_showMessageText now diffstat: 5 files changed, 20 insertions(+) public_html/admin/plugins/calendar/install.php | 4 ++++ public_html/admin/plugins/links/install.php | 4 ++++ public_html/admin/plugins/polls/install.php | 4 ++++ public_html/admin/plugins/spamx/install.php | 4 ++++ public_html/admin/plugins/staticpages/install.php | 4 ++++ diffs (70 lines): diff -r 41007a8ec884 -r b2c3c0b8dbe1 public_html/admin/plugins/calendar/install.php --- a/public_html/admin/plugins/calendar/install.php Sun Nov 23 18:27:55 2008 +0100 +++ b/public_html/admin/plugins/calendar/install.php Sun Nov 23 19:36:30 2008 +0100 @@ -95,6 +95,10 @@ } if (!function_exists('SEC_createToken')) { + return false; + } + + if (!function_exists('COM_showMessageText')) { return false; } diff -r 41007a8ec884 -r b2c3c0b8dbe1 public_html/admin/plugins/links/install.php --- a/public_html/admin/plugins/links/install.php Sun Nov 23 18:27:55 2008 +0100 +++ b/public_html/admin/plugins/links/install.php Sun Nov 23 19:36:30 2008 +0100 @@ -91,6 +91,10 @@ } if (!function_exists('SEC_createToken')) { + return false; + } + + if (!function_exists('COM_showMessageText')) { return false; } diff -r 41007a8ec884 -r b2c3c0b8dbe1 public_html/admin/plugins/polls/install.php --- a/public_html/admin/plugins/polls/install.php Sun Nov 23 18:27:55 2008 +0100 +++ b/public_html/admin/plugins/polls/install.php Sun Nov 23 19:36:30 2008 +0100 @@ -93,6 +93,10 @@ } if (!function_exists('SEC_createToken')) { + return false; + } + + if (!function_exists('COM_showMessageText')) { return false; } diff -r 41007a8ec884 -r b2c3c0b8dbe1 public_html/admin/plugins/spamx/install.php --- a/public_html/admin/plugins/spamx/install.php Sun Nov 23 18:27:55 2008 +0100 +++ b/public_html/admin/plugins/spamx/install.php Sun Nov 23 19:36:30 2008 +0100 @@ -85,6 +85,10 @@ } if (function_exists('SEC_createToken')) { + return true; + } + + if (function_exists('COM_showMessageText')) { return true; } diff -r 41007a8ec884 -r b2c3c0b8dbe1 public_html/admin/plugins/staticpages/install.php --- a/public_html/admin/plugins/staticpages/install.php Sun Nov 23 18:27:55 2008 +0100 +++ b/public_html/admin/plugins/staticpages/install.php Sun Nov 23 19:36:30 2008 +0100 @@ -90,6 +90,10 @@ } if (!function_exists('SEC_createToken')) { + return false; + } + + if (!function_exists('COM_showMessageText')) { return false; } From geeklog-cvs at lists.geeklog.net Sun Nov 23 13:41:55 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 23 Nov 2008 13:41:55 -0500 Subject: [geeklog-cvs] geeklog: For consistency: Make all plugins display the "Access d... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/5c18a221429d changeset: 6485:5c18a221429d user: Dirk Haun date: Sun Nov 23 19:40:33 2008 +0100 description: For consistency: Make all plugins display the "Access denied" message in the same way diffstat: 2 files changed, 5 insertions(+), 7 deletions(-) public_html/admin/plugins/spamx/index.php | 7 +++---- public_html/admin/plugins/staticpages/index.php | 5 ++--- diffs (32 lines): diff -r b2c3c0b8dbe1 -r 5c18a221429d public_html/admin/plugins/spamx/index.php --- a/public_html/admin/plugins/spamx/index.php Sun Nov 23 19:36:30 2008 +0100 +++ b/public_html/admin/plugins/spamx/index.php Sun Nov 23 19:40:33 2008 +0100 @@ -42,10 +42,9 @@ // Only let admin users access this page if (!SEC_hasRights('spamx.admin')) { // Someone is trying to illegally access this page - $display .= COM_siteHeader('menu', $LANG_SX00['access_denied']) - . COM_showMessageText($LANG_SX00['access_denied_msg'], - $LANG_SX00['access_denied']) - . COM_siteFooter(true); + $display .= COM_siteHeader('menu', $MESSAGE[30]) + . COM_showMessageText($MESSAGE[29], $MESSAGE[30]) + . COM_siteFooter(); COM_accessLog("Someone has tried to illegally access the Spam-X Admin page. User id: {$_USER['uid']}, Username: {$_USER['username']}, IP: {$_SERVER['REMOTE_ADDR']}", 1); echo $display; exit; diff -r b2c3c0b8dbe1 -r 5c18a221429d public_html/admin/plugins/staticpages/index.php --- a/public_html/admin/plugins/staticpages/index.php Sun Nov 23 19:36:30 2008 +0100 +++ b/public_html/admin/plugins/staticpages/index.php Sun Nov 23 19:40:33 2008 +0100 @@ -40,9 +40,8 @@ $display = ''; if (!SEC_hasRights('staticpages.edit')) { - $display .= COM_siteHeader('menu', $LANG_STATIC['access_denied']) - . COM_showMessageText($LANG_STATIC['access_denied_msg'], - $LANG_STATIC['access_denied']) + $display .= COM_siteHeader('menu', $MESSAGE[30]) + . COM_showMessageText($MESSAGE[29], $MESSAGE[30]) . COM_siteFooter(); COM_accessLog("User {$_USER['username']} tried to illegally access the static pages administration screen."); echo $display; From geeklog-cvs at lists.geeklog.net Mon Nov 24 15:24:54 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 24 Nov 2008 15:24:54 -0500 Subject: [geeklog-cvs] geeklog: Updated Japanese language files, provided by the Geeklo... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/66c097dcf51d changeset: 6486:66c097dcf51d user: Dirk Haun date: Mon Nov 24 15:40:56 2008 +0100 description: Updated Japanese language files, provided by the Geeklog.jp group diffstat: 7 files changed, 76 insertions(+), 67 deletions(-) language/japanese_utf-8.php | 111 +++++++++++------------ plugins/calendar/language/japanese_utf-8.php | 3 plugins/links/language/japanese_utf-8.php | 3 plugins/polls/language/japanese_utf-8.php | 3 plugins/spamx/language/japanese_utf-8.php | 3 plugins/staticpages/language/japanese_utf-8.php | 19 ++- public_html/docs/history | 1 diffs (truncated from 486 to 300 lines): diff -r 5c18a221429d -r 66c097dcf51d language/japanese_utf-8.php --- a/language/japanese_utf-8.php Sun Nov 23 19:40:33 2008 +0100 +++ b/language/japanese_utf-8.php Mon Nov 24 15:40:56 2008 +0100 @@ -14,6 +14,8 @@ # taca AT back-street DOT net # Copyright (C) 2006,2007,2008 Tetsuko Komma # ivy AT geeklog DOT jp +# Copyright (C) 2006,2007,2008 Geeklog.jp group +# info AT geeklog DOT jp # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -30,7 +32,6 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ################################################################################ -# Last Update 2008/09/21 by Geeklog.jp group - info AT geeklog DOT jp $LANG_CHARSET = 'utf-8'; @@ -102,8 +103,8 @@ 51 => '?????????', 52 => '??????', 53 => '????????????', - 54 => '??????????????????????????????', - 55 => '?????????????????????????????????', + 54 => '?????????????????????????????????', + 55 => '??????????????????', 56 => '??????', 57 => '???????????????', 58 => '????????????', @@ -192,7 +193,7 @@ 5 => '????????????', 6 => '???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????', 7 => '????????????', - 8 => " ??????????????????????????????????????????????????????????????? {$_CONF['commentspeedlimit']} ??????????????????????????????", + 8 => " ??????????????????????????????????????????????????????????????? {$_CONF['commentspeedlimit']} ?????????????????????????????????", 9 => '????????????', 10 => '?????????????????????', 11 => '?????????????????????', @@ -203,14 +204,14 @@ 16 => '????????????', 17 => '???????????????', 18 => '????????????', - 19 => '???????????????????????????????????????????????????', - 20 => '??????????????????????????????????????????????????????????????????????????????????????????', - 21 => '??????????????????????????????????????????????????????????????????????????????????????????????????????????????????', - 22 => '????????????????????????????????????????????????????????????', + 19 => '??????????????????????????????????????????????????????', + 20 => '?????????????????????????????????????????????????????????????????????????????????????????????', + 21 => '?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????', + 22 => '???????????????????????????????????????????????????????????????', 23 => '?????????????????????????????????????????????????????????!??????????????????????????????', 24 => '??????????????????', 25 => '??????????????????????????????????????????????????????????', - 26 => '%s ???????????????????????????????????????????????????????????????', + 26 => '%s ????????????????????????????????????????????????????????????:', 27 => '????????????' ); @@ -315,7 +316,7 @@ 95 => '????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????', 96 => '?????????????????????', 97 => '??????????????????????????????', - 98 => '?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????', + 98 => '????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????', 99 => '????????????????????????????????????', 100 => '???????????????????????????', 101 => '???????????????????????????????????????????????????', @@ -357,7 +358,7 @@ 137 => '??????????????????????????????', 138 => '??????????????????', 139 => '????????????????????????', - 140 => '
  • ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
  • ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
  • 1?????????????????????????????????????????????????????????????????????
  • ????????????????????????????????????????????????????????????????????????
  • ', + 140 => '
  • ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
  • ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
  • 1????????????????????????????????????????????????????????????????????????
  • ???????????????????????????????????????????????????????????????????????????
  • ', 141 => '???????????????????????????', 142 => '??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????', 143 => '????????????????????????????????????', @@ -406,11 +407,11 @@ $LANG08 = array( 1 => '?????????????????????????????????????????????????????????????????????????????????????????????????????????', - 2 => '???????????????????????????????????????', - 3 => '?????????????????????????????????????????????????????????????', + 2 => '??????????????????????????????????????????', + 3 => '???????????????????????????????????????????????????????????????', 4 => '????????????????????????????????????????????????????????????????????????????????????', - 5 => '??????????????????????????????', - 6 => '??????????????????????????????', + 5 => '?????????: ?????????????????????????????????', + 6 => '?????????????????????????????????', 7 => '???????????????', 8 => '??????', 9 => 'URL', @@ -419,7 +420,7 @@ 12 => '?????????????????????:', 13 => '??????:', 14 => '??????:', - 15 => 'HTML??????????????????', + 15 => 'HTML???????????????????????????', 16 => '??????', 17 => '?????????????????????????????????', 18 => '????????????', @@ -460,7 +461,7 @@ 12 => '????????????', 13 => '????????????????????????????????????', 14 => '?????????????????????????????????????????????', - 15 => '????????????????????????????????????????????????', + 15 => '???????????????????????????????????????????????????', 16 => '????????????', 17 => '??????', 18 => '?????????', @@ -486,8 +487,8 @@ 38 => '', 39 => '', 40 => '', - 41 => '??????????????????3????????????????????????', - 42 => '?????????????????????YYYY-MM-DD??????-???-???????????????????????????', + 41 => '??????????????????3???????????????????????????', + 42 => '?????????????????????YYYY-MM-DD??????-???-??????????????????????????????', 43 => '??????????????????', 44 => '???????????????', 45 => '??????????????????', @@ -562,7 +563,7 @@ # submit.php $LANG12 = array( - 1 => ' %s ???????????????????????????????????????????????????', + 1 => ' %s ??????????????????????????????????????????????????????', 2 => '????????????', 3 => '????????????', 4 => '', @@ -570,7 +571,7 @@ 6 => '???????????????', 7 => '???????????????????????????', 8 => '??????', - 9 => '?????????????????????????????????????????????????????????????????????????????????????????????
    • ??????????????????????????????????????????????????????????????????
    • ????????????????????????????????????????????????????????????
    • URL?????????????????????????????????????????????????????????
    ', + 9 => '?????????????????????????????????????????????????????????????????????????????????????????????
    • ??????????????????????????????????????????????????????????????????
    • ???????????????????????????????????????????????????????????????
    • URL????????????????????????????????????????????????????????????
    ', 10 => '????????????', 11 => '', 12 => '?????????', @@ -586,7 +587,7 @@ 22 => '??????????????????????????????', 23 => '?????????????????????????????????????????????????????????', 24 => '??????????????????????????????', - 25 => '%s ??????????????????????????????????????????', + 25 => '%s ?????????????????????????????????????????????', 26 => '?????????????????????', 27 => '????????????', 28 => '??????', @@ -641,7 +642,7 @@ $LANG21 = array( 1 => '????????????????????????????????????', - 2 => '????????????????????????????????????????????????', + 2 => '????????????????????????????????????????????????????????????', 3 => '?????????????????????', 4 => '??????????????????????????????????????????????????????????????????error.log?????????????????????????????????', 5 => '', @@ -664,24 +665,24 @@ 22 => '', 23 => '??????', 24 => '', - 25 => '??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????', + 25 => '????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????[???][???][R][L]???????????????????????????????????? ', 26 => '??????????????????????????????', 27 => 'PHP????????????', 28 => 'PHP??????????????????????????????', 29 => '??????', 30 => 'PHP?????????????????????????????????????????????????????????phpblock_????????? phpblock_themetester??????PHP????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????PHP????????????????????????/path/to/geeklog/system/lib-custom.php??????????????????????????????????????????????????????Geeklog???????????????????????????????????????????????????????????????????????????', - 31 => 'PHP??????????????????????????????????????????%s?????????????????????', + 31 => 'PHP??????????????????????????????????????????%s????????????????????????', 32 => '?????????????????????????????????????????????', 33 => '???????????????????????????????????????URL???????????????????????????', 34 => 'PHP?????????????????????????????????????????????????????????????????????', 35 => '???????????????????????????????????????????????????????????????????????????', 36 => '?????????????????????????????????????????????????????????????????????', 37 => 'PHP??????????????????????????????????????????', - 38 => 'PHP???????????????????????????????????????\'phpblock_\' (??? phpblock_themetester)??????????????????????????????????????????????????????????????????????????????', + 38 => 'PHP???????????????????????????????????????\'phpblock_\' (??? phpblock_themetester)?????????????????????????????????????????????????????????????????????????????????', 39 => '????????????', 40 => '???', 41 => '???', - 42 => '?????????????????????????????????????????????????????????????????????', + 42 => '????????????????????????????????????????????????????????????????????????', 43 => '????????????????????????', 44 => '', 45 => "????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????.", @@ -817,7 +818,7 @@ 6 => '??????????????????????????????????????????????????????????????????????????????????????????', 7 => '??????ID???????????????????????????????????????', 8 => '????????????', - 9 => '???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????*??????????????????????????????????????????????????????', + 9 => '?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????(*)???????????????????????????????????????????????????????????????', 10 => '???????????????', 11 => '1??????????????????????????????', 12 => '????????????????????????????????????', @@ -834,7 +835,7 @@ 23 => '????????????????????????????????????????????????????????????????????????', 24 => '(*)', 25 => '???????????????', - 26 => '???????????????????????????????????????', + 26 => '??????????????????????????????????????????????????????????????????????????????????????????????????????', 27 => '????????????????????????????????????', 28 => '??????', 29 => '?????????????????????????????????????????????' @@ -864,7 +865,7 @@ 18 => '', 19 => '', 20 => '??????', - 21 => '???????????????????????????????????????????????????????????????', + 21 => '??????????????????????????????????????????????????????????????????', 22 => '?????????', 23 => '????????????', 24 => '????????????????????????', @@ -877,7 +878,7 @@ 31 => '???????????????', 32 => '??????????????????????????????%d ?????????????????????????????????%d ????????????????????????????????????', 33 => '??????', - 34 => '???????????????????????????????????????????????????????????????', + 34 => '??????????????????????????????????????????????????????????????????', 35 => '???????????????????????????', 36 => '???', 37 => '?????????ID', @@ -1097,24 +1098,24 @@ 2 => "{$_CONF['site_name']} ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????", 3 => '', 4 => '', - 5 => '???????????????????????????????????????????????????', - 6 => '????????????????????????????????????', - 7 => '?????????????????????????????????', - 8 => '???????????????????????????????????????', - 9 => '???????????????????????????????????????', - 10 => '???????????????????????????????????????', - 11 => '?????????????????????????????????????????????', - 12 => '?????????????????????????????????????????????', - 13 => '???????????????????????????????????????', - 14 => '????????????????????????????????????????????????????????????????????????????????????', + 5 => '?????????????????????????????????????????????', + 6 => '??????????????????????????????', + 7 => '????????????????????????????????????', + 8 => '??????????????????????????????', + 9 => '??????????????????????????????', + 10 => '??????????????????????????????', + 11 => '????????????????????????????????????', + 12 => '????????????????????????????????????', + 13 => '??????????????????????????????', + 14 => '???????????????????????????????????????????????????????????????????????????????????????', 15 => '', 16 => '', 17 => '', 18 => '', 19 => '', 20 => '', - 21 => '??????????????????????????????????????????', - 22 => '?????????????????????????????????', + 21 => '???????????????????????????????????????', + 22 => '???????????????????????????????????????', 23 => '', 24 => '', 25 => '', @@ -1135,9 +1136,9 @@ 40 => '????????????????????????????????????', 41 => '?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????', 42 => '?????????????????????????????????', - 43 => '???????????????????????????', - 44 => '????????????????????????????????????????????????', - 45 => '????????????????????????????????????', + 43 => '??????????????????????????????', + 44 => '????????????????????????????????????????????????!', + 45 => '???????????????????????????????????????', 46 => '?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????', 47 => '??????????????????*nix???????????????????????????????????????*nix???????????????????????????????????????????????????????????????????????????????????????Windows????????????????????????????????????adodb_*.php???????????????????????????????????????????????????????????????????????????', 48 => "{$_CONF['site_name']}???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????", @@ -1189,7 +1190,7 @@ 94 => '????????????????????????: ????????????????????????1KByte???????????????', 95 => '?????????????????????????????????', 96 => '?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????', - 97 => 'Not all required fields have been passed validation - default custom membership message' + 97 => '????????????????????????????????????????????????????????????????????? - ??????????????????????????????????????????????????????' ); ############################################################################### @@ -1266,8 +1267,8 @@ $LANG_DB_BACKUP = array( 'last_ten_backups' => '????????????????????????????????????', 'do_backup' => '???????????????????????????', - 'backup_successful' => '????????????????????????????????????????????????????????????', - 'db_explanation' => 'Geeklog?????????????????????????????????????????????????????????????????????????????????', + 'backup_successful' => '???????????????????????????????????????????????????????????????', + 'db_explanation' => 'Geeklog???????????????????????????????????????????????????????????????????????????????????????', 'not_found' => "??????????????????????????????????????????mysqldump??????????????????????????????????????????PHP???open_basedir??????????????????????????????????????????mysqldump_path??????????????????????????????????????????????????????????????????????????????????????????????????????\n{$_DB_mysqldump_path}?????????", 'zero_size' => '?????????????????????????????????????????????????????????????????????0??????????????????', 'path_not_found' => "{$_CONF['backup_path']} ??????????????????????????????????????????????????????????????????", @@ -1377,13 +1378,13 @@ 'resend' => '??????', 'ping_all_explain' => '????????????????????????????????????????????????????????????????????????(??????????????????)?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????', 'pingback_button' => '????????????????????????', - 'pingback_short' => '????????????????????????????????????????????????????????????', + 'pingback_short' => '???????????????????????????????????????????????????????????????????????????', From geeklog-cvs at lists.geeklog.net Sun Nov 30 03:40:18 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 30 Nov 2008 03:40:18 -0500 Subject: [geeklog-cvs] geeklog: Removed rel="tag" from topic links in lib-story.php as ... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/63901185e583 changeset: 6487:63901185e583 user: Dirk Haun date: Sun Nov 30 09:23:40 2008 +0100 description: Removed rel="tag" from topic links in lib-story.php as that would indicate a Microformat with a slightly different meaning diffstat: 2 files changed, 4 insertions(+), 2 deletions(-) public_html/docs/history | 2 ++ system/lib-story.php | 4 ++-- diffs (33 lines): diff -r 66c097dcf51d -r 63901185e583 public_html/docs/history --- a/public_html/docs/history Mon Nov 24 15:40:56 2008 +0100 +++ b/public_html/docs/history Sun Nov 30 09:23:40 2008 +0100 @@ -3,6 +3,8 @@ ??? ??, 2008 (1.5.2) ------------ +- Removed rel="tag" from topic links in lib-story.php as that would indicate a + Microformat with a slightly different meaning [Dirk] - Fixed inconsistencies and various small mistakes when displaying "Access denied" messages on the admin pages [Dirk] - Added a print.css stylesheet to be used by the printable template files diff -r 66c097dcf51d -r 63901185e583 system/lib-story.php --- a/system/lib-story.php Mon Nov 24 15:40:56 2008 +0100 +++ b/system/lib-story.php Sun Nov 30 09:23:40 2008 +0100 @@ -184,7 +184,7 @@ COM_createLink( $topicimage, $topicurl, - array('rel'=>"category tag") + array('rel'=>"category") ) ); $article->set_var( 'story_topic_image', $topicimage ); @@ -194,7 +194,7 @@ COM_createLink( $topicimage_noalign, $topicurl, - array('rel'=>"category tag") + array('rel'=>"category") ) ); $article->set_var( 'story_topic_image_no_align', From geeklog-cvs at lists.geeklog.net Sun Nov 30 07:20:51 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 30 Nov 2008 07:20:51 -0500 Subject: [geeklog-cvs] geeklog: New function COM_setLangIdAndAttribute to avoid code du... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/8dfc96e19331 changeset: 6488:8dfc96e19331 user: Dirk Haun date: Sun Nov 30 13:04:17 2008 +0100 description: New function COM_setLangIdAndAttribute to avoid code duplication setting the {lang_id} and {lang_attribute} variables diffstat: 4 files changed, 66 insertions(+), 97 deletions(-) plugins/staticpages/functions.inc | 3 public_html/admin/plugins/staticpages/install.php | 4 public_html/article.php | 47 --------- public_html/lib-common.php | 109 +++++++++++---------- diffs (216 lines): diff -r 63901185e583 -r 8dfc96e19331 plugins/staticpages/functions.inc --- a/plugins/staticpages/functions.inc Sun Nov 30 09:23:40 2008 +0100 +++ b/plugins/staticpages/functions.inc Sun Nov 30 13:04:17 2008 +0100 @@ -409,8 +409,7 @@ $print->set_var('site_slogan', $_CONF['site_slogan']); $print->set_var('direction', $LANG_DIRECTION); - $print->set_var('lang_id', ''); // TBD - $print->set_var('lang_attribute', ''); // TBD + COM_setLangIdAndAttribute($print); $print->set_var('xhtml', XHTML); $print->set_var('page_title', $_CONF['site_name'] . ' - ' . stripslashes($A['sp_title'])); diff -r 63901185e583 -r 8dfc96e19331 public_html/admin/plugins/staticpages/install.php --- a/public_html/admin/plugins/staticpages/install.php Sun Nov 30 09:23:40 2008 +0100 +++ b/public_html/admin/plugins/staticpages/install.php Sun Nov 30 13:04:17 2008 +0100 @@ -94,6 +94,10 @@ } if (!function_exists('COM_showMessageText')) { + return false; + } + + if (!function_exists('COM_setLangIdAndAttribute')) { return false; } diff -r 63901185e583 -r 8dfc96e19331 public_html/article.php --- a/public_html/article.php Sun Nov 30 09:23:40 2008 +0100 +++ b/public_html/article.php Sun Nov 30 13:04:17 2008 +0100 @@ -191,51 +191,10 @@ $story_template->set_var ('lang_full_article', $LANG08[33]); $story_template->set_var ('article_url', $articleUrl); - $langAttr = ''; - if( !empty( $_CONF['languages'] ) && !empty( $_CONF['language_files'] )) - { - $langId = COM_getLanguageId(); - } - else - { - // try to derive the language id from the locale - $l = explode( '.', $_CONF['locale'] ); - $langId = $l[0]; - } - if( !empty( $langId )) - { - $l = explode( '-', str_replace( '_', '-', $langId )); - if(( count( $l ) == 1 ) && ( strlen( $langId ) == 2 )) - { - $langAttr = 'lang="' . $langId . '"'; - } - else if( count( $l ) == 2 ) - { - if(( $l[0] == 'i' ) || ( $l[0] == 'x' )) - { - $langId = implode( '-', $l ); - $langAttr = 'lang="' . $langId . '"'; - } - else if( strlen( $l[0] ) == 2 ) - { - $langId = implode( '-', $l ); - $langAttr = 'lang="' . $langId . '"'; - } - else - { - $langId = $l[0]; - } - } - } - $story_template->set_var('lang_id', $langId); - if (!empty($_CONF['languages']) && !empty($_CONF['language_files'])) { - $story_template->set_var('lang_attribute', $langAttr); - } else { - $story_template->set_var('lang_attribute', ''); - } + COM_setLangIdAndAttribute($story_template); - $story_template->parse ('output', 'article'); - $display = $story_template->finish ($story_template->get_var('output')); + $story_template->parse('output', 'article'); + $display = $story_template->finish($story_template->get_var('output')); } else { // Set page title $pagetitle = $story->DisplayElements('title'); diff -r 63901185e583 -r 8dfc96e19331 public_html/lib-common.php --- a/public_html/lib-common.php Sun Nov 30 09:23:40 2008 +0100 +++ b/public_html/lib-common.php Sun Nov 30 13:04:17 2008 +0100 @@ -1016,48 +1016,7 @@ } $header->set_var('page_title_and_site_name', $title_and_name); - $langAttr = ''; - if( !empty( $_CONF['languages'] ) && !empty( $_CONF['language_files'] )) - { - $langId = COM_getLanguageId(); - } - else - { - // try to derive the language id from the locale - $l = explode( '.', $_CONF['locale'] ); - $langId = $l[0]; - } - if( !empty( $langId )) - { - $l = explode( '-', str_replace( '_', '-', $langId )); - if(( count( $l ) == 1 ) && ( strlen( $langId ) == 2 )) - { - $langAttr = 'lang="' . $langId . '"'; - } - else if( count( $l ) == 2 ) - { - if(( $l[0] == 'i' ) || ( $l[0] == 'x' )) - { - $langId = implode( '-', $l ); - $langAttr = 'lang="' . $langId . '"'; - } - else if( strlen( $l[0] ) == 2 ) - { - $langId = implode( '-', $l ); - $langAttr = 'lang="' . $langId . '"'; - } - else - { - $langId = $l[0]; - } - } - } - $header->set_var('lang_id', $langId); - if (!empty($_CONF['languages']) && !empty($_CONF['language_files'])) { - $header->set_var('lang_attribute', $langAttr); - } else { - $header->set_var('lang_attribute', ''); - } + COM_setLangIdAndAttribute($header); $header->set_var( 'background_image', $_CONF['layout_url'] . '/images/bg.' . $_IMAGE_TYPE ); @@ -6782,20 +6741,68 @@ return $wiki->transform($wikitext, 'Xhtml'); } +/** +* Set the {lang_id} and {lang_attribute} variables for a template +* +* @param ref $template template to use +* @return void +* @note {lang_attribute} is only set in multi-language environments. +* +*/ +function COM_setLangIdAndAttribute(&$template) +{ + global $_CONF; + + $langAttr = ''; + $langId = ''; + + if (!empty($_CONF['languages']) && !empty($_CONF['language_files'])) { + $langId = COM_getLanguageId(); + } else { + // try to derive the language id from the locale + $l = explode('.', $_CONF['locale']); // get rid of character set + $langId = $l[0]; + $l = explode('@', $langId); // get rid of '@euro', etc. + $langId = $l[0]; + } + + if (!empty($langId)) { + $l = explode('-', str_replace('_', '-', $langId)); + if ((count($l) == 1) && (strlen($langId) == 2)) { + $langAttr = 'lang="' . $langId . '"'; + } else if (count($l) == 2) { + if (($l[0] == 'i') || ($l[0] == 'x')) { + $langId = implode('-', $l); + $langAttr = 'lang="' . $langId . '"'; + } else if (strlen($l[0]) == 2) { + $langId = implode('-', $l); + $langAttr = 'lang="' . $langId . '"'; + } else { + $langId = $l[0]; + // this isn't a valid lang attribute, so don't set $langAttr + } + } + } + $template->set_var('lang_id', $langId); + + if (!empty($_CONF['languages']) && !empty($_CONF['language_files'])) { + $template->set_var('lang_attribute', $langAttr); + } else { + $template->set_var('lang_attribute', ''); + } +} + // Now include all plugin functions -foreach( $_PLUGINS as $pi_name ) -{ - require_once( $_CONF['path'] . 'plugins/' . $pi_name . '/functions.inc' ); +foreach ($_PLUGINS as $pi_name) { + require_once $_CONF['path'] . 'plugins/' . $pi_name . '/functions.inc'; } // Check and see if any plugins (or custom functions) // have scheduled tasks to perform -if( $_CONF['cron_schedule_interval'] > 0 ) -{ - if(( DB_getItem( $_TABLES['vars'], 'value', "name='last_scheduled_run'" ) - + $_CONF['cron_schedule_interval'] ) <= time()) - { - DB_query( "UPDATE {$_TABLES['vars']} SET value=UNIX_TIMESTAMP() WHERE name='last_scheduled_run'" ); +if ($_CONF['cron_schedule_interval'] > 0) { + if ((DB_getItem($_TABLES['vars'], 'value', "name='last_scheduled_run'") + + $_CONF['cron_schedule_interval']) <= time()) { + DB_query("UPDATE {$_TABLES['vars']} SET value=UNIX_TIMESTAMP() WHERE name='last_scheduled_run'"); PLG_runScheduledTask(); } }