igorsa

+Clients
  • Content count

    19
  • Joined

  • Last visited


igorsa's Activity

  1. igorsa added a post in a topic: Auto Linker plugin   

    Hello,

    We are using auto linker plugin on our existing forum, but in order to switch to IPB, we would need this option.

    Basically, it's a plugin that replaces certain keywords with links contextually.
  2. igorsa added a record in IP.Board   

    Importing emoticons places them in wrong folder
    When I import emoticons via xml file, they all end up being uploaded in folder of "default" set, regardless of previously creating new set and selecting that set for target of upload. The then-created folder remains empty of any emoticon images imported this way. So, when emoticon set is removed, images remain in default folder.
    • 0 replies
    • 0 views
  3. igorsa added a record in IP.Board   

    Logging user in/out from within sso class
    While inside of sso class, I was unable to access session-related methods. Main reason for this I have discovered is the fact that sso methods are called as part of session initialization process.

    What this means is that calling methods like:

    [php]ips_MemberRegistry::updateMySession()
    ips_MemberRegistry::sessionClass()->convertGuestToMember()[/php]

    and similar, results in fatal errors.

    Since I wanted to log in users who are already logged in on another part of website, I had to modify publicSession::__construct() method:

    [php] if( is_file( IPS_ROOT_PATH . '/sources/classes/session/sso.php' ) )
    {
    $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/session/sso.php', 'ssoSessionExtension' );

    if( class_exists( $classToLoad ) )
    {
    $this->sso = new $classToLoad( $this->registry, $this ); // added $this as second argument
    }
    }[/php]

    I added $this as a second argument to sso __construct(), so that the session that's currently being initialized becomes available to other methods in that class:

    [php]public function __construct( ipsRegistry $registry, ips_MemberRegistry $this_session ) {

    // ...
    $this->session_init = $this_session;
    }

    public function checkSSOForGuest( $type='create' ) {
    // ...

    $member = IPSMember::load($object->email);

    $data = array(
    'member_id' => $member['member_id'],
    'member_name' => $member['name'],
    'member_group' => $member['member_group_id'],
    'login_type' => $member['g_hide_online_list'],
    );
    $this->session_init->convertGuestToMember($data, $member);
    ips_MemberRegistry::setMember($member['member_id']);[/php]

    As a side question: is there some better way to do this (log user in/out) from within sso than the one I'm using at the moment?
    • 0 replies
    • 0 views
  4. igorsa added a comment: Error raised when IPSMember::create() is used in SSO class   

    Thanks. I have changed that line, but I'm still getting the same error...
  5. igorsa added a comment: Error raised when IPSMember::create() is used in SSO class   

    I forgot to mention that error is raised when IPSMember::create() line is reached. If I comment it out, no error, forum loads normally (but then SSO is pointless)...
  6. igorsa added a record in IP.Board   

    Error raised when IPSMember::create() is used in SSO class
    I have a following code in sso.php file:

    [php]public function checkSSOForGuest( $type='create' )
    {
    // ...snip...
    $member = IPSMember::load($object->email);
    if (! is_array($member))
    {
    $new_member = array(
    'email' => $object->email,
    'name' => $object->username,
    'members_display_name' => $object->username,
    );
    $member = IPSMember::create($new_member, TRUE, TRUE);
    }
    [/php]


    After I login on my base site, and when user that is logged in [i]doesn't[/i] exist in IPB database, then the following error is raised:

    [b]Fatal error[/b]: Call to a member function fetchMemberData() on a non-object in [...][b]\forum\admin\sources\classes\class_localization.php[/b] on line [b]129[/b]

    IP.Board version 3.3.0, no additional modules, tweaks, just vanilla installation.
    • 0 replies
    • 0 views
  7. igorsa added a comment: The forum is gone   

    Everything is OK now, even without logging out, but I also did it to verify and it still works.

    Thanks!
  8. igorsa added a comment: The forum is gone   

    Still just empty space for me, while logged in, and when I log out, I see all public forums... ?!

About Me

Status Feed