News:

Wondering if this will always be free?  See why free is better.

Main Menu

TinyPortal

Started by lurkalot, February 12, 2005, 04:43:00 AM

Previous topic - Next topic

davo88

Quote from: ColinJM... a more image driven GUI in the meantime.

This is exactly what I am working on with TinyPortal at the moment. TinyPortal is heaps easier and a more integrated method of creating this than using an external website. You can create blocks within panels all over the landing page and fill them with images and/or text.
If you are unfamilar with HTML, just use BB code to display the images and add text. You can link either/both the image and the text to a destination in the forum or elsewhere. If you are unfamiliar with BB code, ask here and I am sure someone will write some sample code to get you started.

ColinJM

@lurkalot - Yes, I appreciate that but want to put my website as the landing page post log in until I get a chance to replicate that with Tinyportal
Kind Regards

Colin

Slava
Ukraini!

ColinJM

Quote from: davo88 on February 17, 2024, 02:52:43 AM
Quote from: ColinJM... a more image driven GUI in the meantime.

This is exactly what I am working on with TinyPortal at the moment. TinyPortal is heaps easier and a more integrated method of creating this than using an external website. You can create blocks within panels all over the landing page and fill them with images and/or text.
If you are unfamilar with HTML, just use BB code to display the images and add text. You can link either/both the image and the text to a destination in the forum or elsewhere. If you are unfamiliar with BB code, ask here and I am sure someone will write some sample code to get you started.

Not for me at the moment - but when I get time I'll look into it .
Kind Regards

Colin

Slava
Ukraini!

@rjen

Quote from: ColinJM on February 17, 2024, 03:04:07 AM@lurkalot - Yes, I appreciate that but want to put my website as the landing page post log in until I get a chance to replicate that with Tinyportal

In that case you will have to make some SMF code edit to change the redirect after the login screen
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

ColinJM

[quote author=@rjen link=msg=4170028 date=1708157410]
Quote from: ColinJM on February 17, 2024, 03:04:07 AM@lurkalot - Yes, I appreciate that but want to put my website as the landing page post log in until I get a chance to replicate that with Tinyportal

In that case you will have to make some SMF code edit to change the redirect after the login screen
[/quote]

Yes, agreed - thanks @rjen and others.
Kind Regards

Colin

Slava
Ukraini!

Sir Osis of Liver

This hack worked in 2.0, can't get it to work in 2.1.  Maybe you can play with it and have better luck -

LogInOut.php


    // Set the login_url if it's not already set (but careful not to send us to an attachment).
    //if (empty($_SESSION['login_url']) && isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'dlattach') === false && preg_match('~(board|topic)[=,]~', $_SESSION['old_url']) != 0)
    //    $_SESSION['login_url'] = $_SESSION['old_url'];

    $_SESSION['login_url'] = 'https://www.nytimes.com';

    // Been guessing a lot, haven't we?

When in Emor, do as the Snamors.
                              - D. Lister

ColinJM

Quote from: Sir Osis of Liver on February 17, 2024, 04:12:43 PMThis hack worked in 2.0, can't get it to work in 2.1.  Maybe you can play with it and have better luck -

LogInOut.php


    // Set the login_url if it's not already set (but careful not to send us to an attachment).
    //if (empty($_SESSION['login_url']) && isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'dlattach') === false && preg_match('~(board|topic)[=,]~', $_SESSION['old_url']) != 0)
    //    $_SESSION['login_url'] = $_SESSION['old_url'];

    $_SESSION['login_url'] = 'https://www.nytimes.com';

    // Been guessing a lot, haven't we?



What directory is that in SOos?
Kind Regards

Colin

Slava
Ukraini!

GL700Wing

Quote from: Sir Osis of Liver on February 17, 2024, 04:12:43 PMThis hack worked in 2.0, can't get it to work in 2.1.  Maybe you can play with it and have better luck -

LogInOut.php


    // Set the login_url if it's not already set (but careful not to send us to an attachment).
    //if (empty($_SESSION['login_url']) && isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'dlattach') === false && preg_match('~(board|topic)[=,]~', $_SESSION['old_url']) != 0)
    //    $_SESSION['login_url'] = $_SESSION['old_url'];

    $_SESSION['login_url'] = 'https://www.nytimes.com';

    // Been guessing a lot, haven't we?


I was playing with that form SMF 2.1 yesterday for logon but the browser kept appending the name of the forum directory/folder to the URL - interestingly the logout equivalent works perfectly.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

ColinJM

Thanks @GL700Wing - what folder was that in - can you giver me the breadcrumb please?
Kind Regards

Colin

Slava
Ukraini!

Arantor

Sources/LogInOut.php

But as already stated, you're doing this change for users who will likely only see it once. Seems like a lot of effort for that, because unless users go out of their way to change it, pretty sure the default is to stay logged in forever which means once they log in the first time, they're not going to see any of this work you're now doing.
Holder of controversial views, all of which my own.


Sir Osis of Liver

Quote from: GL700Wing on February 18, 2024, 01:08:25 AMinterestingly the logout equivalent works perfectly.
redirectexit() is a core function, but afaik there's no equivalent for login.
When in Emor, do as the Snamors.
                              - D. Lister

Arantor

You mean the literal same function that login uses?
Holder of controversial views, all of which my own.


ColinJM

Quote from: Arantor on February 18, 2024, 02:26:25 PMYou mean the literal same function that login uses?

Who are you directing that question to @Arantor , me or SOoL?
Kind Regards

Colin

Slava
Ukraini!

Sir Osis of Liver

If I understand correctly (probably not), $_SESSION['login_url'] is used to direct user to main index, or, if login is being done from different page to, $_SESSION['old_url'].  That would be a case where login is required when trying to access an area not available to guests.  If guests are allowed to browse forum but not post replies, they can view a topic, but not reply.  If they login from the topic, they're returned to the topic, not main index, and can then reply.  In 2.0 it was possible to set $_SESSION['login_url'] to an external url, but looks like there is additional security in 2.1 LogInOut.php that prevents this.
When in Emor, do as the Snamors.
                              - D. Lister

Arantor

Well, the code is still there to check for the login_url during the steps of login, and redirectexit is still asked to do the work, and I don't see any checks in redirectexit that would prevent it being used for an external redirect...
Holder of controversial views, all of which my own.


ColinJM

So SOoL and @Arantor - where exactly is this please? what folder and php object?
Kind Regards

Colin

Slava
Ukraini!

Sir Osis of Liver

Quote from: Arantor on February 19, 2024, 12:39:21 PMWell, the code is still there to check for the login_url during the steps of login, and redirectexit is still asked to do the work, and I don't see any checks in redirectexit that would prevent it being used for an external redirect...
redirectexit() where?  I can only get it to work for logout.

Quote from: ColinJM on February 19, 2024, 06:08:52 PMSo SOoL and @Arantor - where exactly is this please? what folder and php object?
/Sources/LogInOut.php
When in Emor, do as the Snamors.
                              - D. Lister

ColinJM

Kind Regards

Colin

Slava
Ukraini!

Arantor

Quote from: Sir Osis of Liver on February 19, 2024, 08:53:39 PM
Quote from: Arantor on February 19, 2024, 12:39:21 PMWell, the code is still there to check for the login_url during the steps of login, and redirectexit is still asked to do the work, and I don't see any checks in redirectexit that would prevent it being used for an external redirect...
redirectexit() where?  I can only get it to work for logout.

Quote from: ColinJM on February 19, 2024, 06:08:52 PMSo SOoL and @Arantor - where exactly is this please? what folder and php object?
/Sources/LogInOut.php


Look at LogInOut.php around line 211, the call is right there like it has been for a long time.
Holder of controversial views, all of which my own.


Sir Osis of Liver

Tried that (several times), has no effect -


        {
            // Best not to clutter the session data too much...
            $temp = $_SESSION['login_url'];
            unset($_SESSION['login_url']);

            redirectexit('http://thekrashsite.com');
        }


In 2.0 $_SESSION['login_url'] worked, but not in 2.1.  >:(


When in Emor, do as the Snamors.
                              - D. Lister

Advertisement: