91
Brad
Re: Can generated authentication graphics be added to the Registration process?
  • 2004/3/3 2:43

  • Brad

  • Not too shy to talk

  • Posts: 150

  • Since: 2003/12/4


Also keep in mind that by utilizing a visual anti-robot authentication scheme, you're limiting your web site to those people who are not visually impaired.

While that may be fine due to the nature of your site and it's intended audience, it's still something to consider.



92
Brad
Re: style.css and firefox
  • 2004/3/3 2:06

  • Brad

  • Not too shy to talk

  • Posts: 150

  • Since: 2003/12/4


FireFox draws from "styleNN.css". Look there to see if you can discover the cause of your trouble.



93
Brad
Re: Session Bug Patch
  • 2004/3/2 15:25

  • Brad

  • Not too shy to talk

  • Posts: 150

  • Since: 2003/12/4


I'm not a PHP coder either. However, I do have a number of years of other programming experience and that helps.

Having said that, I didn't have to use any of my programming experience to make the changes I did. All I did was review the diff file between 2.0.5.2 and 2.0.6 for session.php to see what changes were actually made and then I applied the code you and Predator provided in the same spots that it was in 2.0.5.x. Just some of the signposts were missing.



94
Brad
Re: Session Bug Patch
  • 2004/3/2 4:23

  • Brad

  • Not too shy to talk

  • Posts: 150

  • Since: 2003/12/4


For XOOPS v2.0.6 the changes are as follows (in red):

<?php
// $Id: session.php,v 1.3 2004/01/02 19:15:13 okazu Exp $
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                       <https://xoops.org/>                             //
//  ------------------------------------------------------------------------ //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //
// Author: Kazumi Ono (AKA onokazu)                                          //
// URL: http://www.myweb.ne.jp/, https://xoops.org/, http://www.xoopscube.jp/ //
// Project: The XOOPS Project                                                //
// ------------------------------------------------------------------------- //
/**
 * @package     kernel
 * 
 * @author        Kazumi Ono    <onokazu@xoops.org>
 * @copyright    copyright (c) 2000-2003 XOOPS.org
 */


/**
 * Handler for a session
 * @package     kernel
 * 
 * @author        Kazumi Ono    <onokazu@xoops.org>
 * @copyright    copyright (c) 2000-2003 XOOPS.org
 */
class XoopsSessionHandler
{

    
/**
     * Database connection
     * 
     * @var    object
     * @access    private
     */
    
var $db;

    
/**
     * Constructor
     * 
     * @param    object  &$mf    reference to a XoopsManagerFactory
     * 
     */
    
function XoopsSessionHandler(&$db)
    {
        
$this->db =& $db;
    }

    
/**
     * Open a session
     * 
     * @param    string  $save_path
     * @param    string  $session_name
     * 
     * @return    bool
     */
    
function open($save_path$session_name)
    {
        return 
true;
    }

    
/**
     * Close a session
     * 
     * @return    bool
     */
    
function close()
    {
        return 
true;
    }

    
/**
     * Read a session from the database
     * 
     * @param    string  &sess_id    ID of the session
     * 
     * @return    array   Session data
     */
    
function read($sess_id)
    {
        
$sql sprintf('SELECT sess_data FROM %s WHERE sess_id = %s'$this->db->prefix('session'), $this->db->quoteString($sess_id));
        if (
false != $result $this->db->query($sql)) {
            if (list(
$sess_data) = $this->db->fetchRow($result)) {
                return 
$sess_data;
            }
        }
        return 
'';
    }

    
/**
     * Write a session to the database
     * 
     * @param   string  $sess_id
     * @param   string  $sess_data
     * 
     * @return  bool    
     **/
    
function write($sess_id$sess_data)
    {
[
color=cc0000][b]        global $xoopsConfig;
        
        
$expiretime $xoopsConfig['session_expire'] * 60;[/color][/b]

        
$sess_id $this->db->quoteString($sess_id);
        list(
$count) = $this->db->fetchRow($this->db->query("SELECT COUNT(*) FROM ".$this->db->prefix('session')." WHERE sess_id=".$sess_id));
        if ( 
$count ) {
            
$sql sprintf('UPDATE %s SET sess_updated = %u, sess_data = %s WHERE sess_id = %s'$this->db->prefix('session'), time(), $this->db->quoteString($sess_data), $sess_id);

        } else {
            
$sql sprintf('INSERT INTO %s (sess_id, sess_updated, sess_ip, sess_data) VALUES (%s, %u, %s, %s)'$this->db->prefix('session'), $sess_idtime(), $this->db->quoteString($_SERVER['REMOTE_ADDR']), $this->db->quoteString($sess_data));
        }
        if (!
$this->db->queryF($sql)) {
            return 
false;
        }

[
color=cc0000][b]        // MonDarse Hack//
        
$this->gc($expiretime);
        
// MonDarse Hack//[/color][/b]
        
        
return true;
    }

    
/**
     * Destroy a session
     * 
     * @param   string  $sess_id
     * 
     * @return  bool
     **/
    
function destroy($sess_id)
    {
[
color=cc0000][b]        global $xoopsConfig;
        
        
$expiretime $xoopsConfig['session_expire'] * 60;[/color][/b]

        
$sql sprintf('DELETE FROM %s WHERE sess_id = %s'$this->db->prefix('session'), $this->db->quoteString($sess_id));
        if ( !
$result $this->db->queryF($sql) ) {
            return 
false;
        }

[
color=cc0000][b]        // MonDarse Hack//
        
$this->gc($expiretime);
        
// MonDarse Hack//[/color][/b]

        
return true;
    }

    
/**
     * Garbage Collector
     * 
     * @param   int $expire Time in seconds until a session expires
     * @return  bool
     **/
    
function gc($expire)
    {
        
$mintime time() - intval($expire);
        
$sql sprintf('DELETE FROM %s WHERE sess_updated < %u'$this->db->prefix('session'), $mintime);
        return 
$this->db->queryF($sql);
    }
}
?>



95
Brad
Re: Weblog Spacing between weblogs HELP!
  • 2004/3/1 5:30

  • Brad

  • Not too shy to talk

  • Posts: 150

  • Since: 2003/12/4


Sorry about that. I must've editted my post while you were responding to what I originally posted.

Anyway, if you want more spacing where I indicated, just add another <br \> or two



96
Brad
Re: Weblog Spacing between weblogs HELP!
  • 2004/3/1 5:16

  • Brad

  • Not too shy to talk

  • Posts: 150

  • Since: 2003/12/4


Although I don't really know why you'd want additional spacing (i.e. my weblog spacing looks fine), you can change the spacing in .\modules\weblog\templates\weblog_entries.html.

At the end of the file, there is the following code (single new of additional spacing indicated in red):

<{/if}>
<{
$entry.read_users_blog}>
<{if 
$entry.provide_edit_link eq 1}>
 | <
a href="post.php?blog_id=<{$entry.blog_id}>&edit=1"><{$lang_edit}></a>
<{/if}>
 | <
a href="<{$entry.comlink}>"><{$entry.lang_comments}> (<{$entry.comments}>)</a>
 | <{
$entry.lang_reads}> (<{$entry.reads}>)
</
div>
</
div>
<{/foreach}>
[
b][color=CC0000]<br />[/color][/b]
<!-- 
end loop -->

<
p>
<{
$pagination}>
</
p>

<{include 
file='db:system_notification_select.html'}>



97
Brad
Re: Tutorial: Highlight the active module in your mainmenu
  • 2004/2/26 15:12

  • Brad

  • Not too shy to talk

  • Posts: 150

  • Since: 2003/12/4


Thanks for your response. Darn real life, always muddling up the best of our plans.



98
Brad
Re: Session Bug Patch
  • 2004/2/25 13:31

  • Brad

  • Not too shy to talk

  • Posts: 150

  • Since: 2003/12/4


<bump>



99
Brad
Re: auto-login hacked files for XOOPS 2.0.6 full?
  • 2004/2/25 13:15

  • Brad

  • Not too shy to talk

  • Posts: 150

  • Since: 2003/12/4


http://wiki.xoops.org/wakka.php?wakka=XoopsAutoLoginHack/

That link will give you the steps to do it yourself. It's easy, painless, and oh so satisfying.



100
Brad
Re: Help: Extending Center to full Viewport
  • 2004/2/22 2:07

  • Brad

  • Not too shy to talk

  • Posts: 150

  • Since: 2003/12/4


I used to work in Detroit, now I'm working in Ann Arbor. I live a bit far away but used to love going to the Pistons' games when I lived closer.

Hopefully Rasheed will work out. I'm not too confident that he'll actually stay past this season. We'll have to wait and see. I'm just having flashbacks to when Joe Smith came around for one season.




TopTop
« 1 ... 7 8 9 (10) 11 12 13 ... 15 »



Login

Who's Online

133 user(s) are online (74 user(s) are browsing Support Forums)


Members: 0


Guests: 133


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits