Home arrow Forum Latest posts of: Stef
  Welcome, Guest. Please login or register.
Did you miss your activation email?
May 16, 2008, 03:56:24 AM
Home New Posts Search Calendar


Login with username, password and session length
  Show Posts
Pages: [1]
1  Joomla Hacks / Joomla-SMF 2.0.x / Re: Forum Direct access [solved] on: March 17, 2008, 07:05:45 PM
Ok, i fixed it.

the right code (works well without errors) i used is in the lines below:

Code:
// Redirect users who try to access /forum directly
if (strpos($_SERVER['QUERY_STRING'], 'dlattach') === false &&
    strpos($_SERVER['QUERY_STRING'], 'verificationcode') === false &&
    strpos($_SERVER['QUERY_STRING'], 'action=post2') === false &&
    strpos($_SERVER['QUERY_STRING'], 'action=spellcheck') === false &&
    strpos($_SERVER['QUERY_STRING'], 'action=splittopics') === false &&
    strpos($_SERVER['QUERY_STRING'], 'action=stats') === false)
{
    if(!defined('_VALID_MOS')){ header("Location: /index.php?option=com_smf&Itemid=(****)&".$_SERVER['QUERY_STRING']); }
}

where (****) is your item id number
Works very well for me !!! Thank you
2  Joomla Hacks / Joomla-SMF 2.0.x / [solve] Password issue when ask for a new password on: March 12, 2008, 01:31:20 PM
(J1.0.15, CB 1.1, SMF 1.1.4 and JSMF 2.0.2.1 may work with other version)

Problem : SQL error on line 1194 when users ask for new password because they forget it.

Solution : There is a syntax error (no declare and id membber field) in function updatePass in admin.smf.class.php

Find (line 1176) :
Code:
    function updatePass($id, $pass)
    {
        global $database;

        $username = $this->getUsername($id);
        if (empty($username)) {

            //what to do?
            //TODO empty username
            return false;
        }
        $smf_id = $this->getSMFid(null, $username);
        if (empty($smf_id)) {

            //what to do?
            //TODO empty uid
            return false;
        }
        $query =
            "UPDATE {$jsmfConfig->smf_prefix}members " .
            "SET passwd = '".sha1(strtolower($username).$pass)."' " .
            "WHERE id= '$smf_id' ";
        unset($username, $pass, $smf_id);
        $database->setQuery($query);
        unset($query);
        if (!$database->query()) {
            $this->err = $database->getErrorMsg().' ~~~ FROM::'.__FILE__.' || '.__FUNCTION__.' || '.__LINE__;
            return false;
        }
        return true;
    }

Replace by :
Code:
    function updatePass($id, $pass)
    {
        global $database;
        global $jsmfConfig;

        $username = $this->getUsername($id);
        if (empty($username)) {

            //what to do?
            //TODO empty username
            return false;
        }
        $smf_id = $this->getSMFid(null, $username);
        if (empty($smf_id)) {

            //what to do?
            //TODO empty uid
            return false;
        }
        $query =
            "UPDATE {$jsmfConfig->smf_prefix}members " .
            "SET passwd = '".sha1(strtolower($username).$pass)."' " .
            "WHERE ID_MEMBER = '$smf_id' ";
        unset($username, $pass, $smf_id);
        $database->setQuery($query);
        unset($query);
        if (!$database->query()) {
            $this->err = $database->getErrorMsg().' ~~~ FROM::'.__FILE__.' || '.__FUNCTION__.' || '.__LINE__;
            return false;
        }
        return true;
    }

For those don't like programming I join the class to this post
1-download
2-rename admin.smf.class.txt to admin.smf.class.php
3-FTP it to directory : /www/administrator/components/com_smf/
3  Joomla Hacks / Joomla-SMF 2.0.x / [solve] Blank page on some topics in wrapped mode on: March 12, 2008, 01:07:54 PM
Problem : When you are in Wrapped mode some of SMF topics cant be open, blank page comes.

(my config J1.0.15, CB 1.1, SMF 1.1.4 and JSMF 2.0.2.1 but should be a problem with other versions)

The problem occur only on wrapped mode and concern topic with more than 1 page to show or/and only if there is more than 11 posts per page. (number should be different in some case)

Solution : That's very strange I don't understand why (I'm not a programmer sorry) BUT I found a way to solve it, quiet easy :
On SMF Admin go to Forum/Posts and Topics > Topic Settings > Number of posts per page in a topic page:
and write 11 or less (10 is good, may be try different value if doesn't work )
4  Joomla Hacks / Joomla-SMF 2.0.x / Re: Topics Not Appearing For SMF Admin While Wrapped on: March 12, 2008, 12:59:37 PM
See also :
http://www.joomlahacks.com/component/option,com_smf/Itemid,94/topic,4174.msg20591#msg20591
To solve a problem of blank page due numers of posts per page.
5  Joomla Hacks / Joomla-SMF 2.0.x / Re: JSMF 2.0.2.1 on: March 12, 2008, 02:43:06 AM
anyone using
joomla 1.0.14
smf 1.1.4
and bridge 2.0.2.1

İf you not using wraped mode its woirng nice but;

Wrapped mode i have some problems.
some of smf topics cant be opend -blank page comes

Exactly the same problem !
J1.0.15, CB 1.1, SMF 1.1.4 and JSMF 2.0.2.1
(All fresh install)

The problem occur only on wrapped mode and concern topic with more than 1 page and only if there is more than 11 posts per page.

That's very strange I don't understand why BUT the way to solve is quiet easy :
On SMF Admin go to Forum/Posts and Topics > Topic Settings > Number of posts per page in a topic page:
and write 11 or less (10 is good)
Pages: [1]


Login with username, password and session length

Powered by MySQL Powered by PHP Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal.
None of the text or images in this public website may be copied without the expressed written consent of the authors.
Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use