Git Product home page Git Product logo

Comments (4)

liomj avatar liomj commented on July 17, 2024 1

i found it. It is in profile/preloads/core.php..we should implement this in yogurt


class ProfileCorePreload extends XoopsPreloadItem
{
    /**
     * @param $args
     */
    public static function eventCoreUserStart($args)
    {
        $op = 'main';
        if (isset($_POST['op'])) {
            $op = trim($_POST['op']);
        } elseif (isset($_GET['op'])) {
            $op = trim($_GET['op']);
        }
        if ($op !== 'login' && (empty($_GET['from']) || 'profile' !== $_GET['from'])) {
            header('location: ./modules/profile/user.php' . (empty($_SERVER['QUERY_STRING']) ? '' : '?' . $_SERVER['QUERY_STRING']));
            exit();
        }
    }

    /**
     * @param $args
     */
    public static function eventCoreEdituserStart($args)
    {
        header('location: ./modules/profile/edituser.php' . (empty($_SERVER['QUERY_STRING']) ? '' : '?' . $_SERVER['QUERY_STRING']));
        exit();
    }

    /**
     * @param $args
     */
    public static function eventCoreLostpassStart($args)
    {
        $email = isset($_GET['email']) ? trim($_GET['email']) : '';
        $email = isset($_POST['email']) ? trim($_POST['email']) : $email;
        header("location: ./modules/profile/lostpass.php?email={$email}" . (empty($_GET['code']) ? '' : '&' . $_GET['code']));
        exit();
    }

    /**
     * @param $args
     */
    public static function eventCoreRegisterStart($args)
    {
        header('location: ./modules/profile/register.php' . (empty($_SERVER['QUERY_STRING']) ? '' : '?' . $_SERVER['QUERY_STRING']));
        exit();
    }

    /**
     * @param $args
     */
    public static function eventCoreUserinfoStart($args)
    {
        header('location: ./modules/profile/userinfo.php' . (empty($_SERVER['QUERY_STRING']) ? '' : '?' . $_SERVER['QUERY_STRING']));
        exit();
    }
}

from suico.

mambax7 avatar mambax7 commented on July 17, 2024

We don't want to hack the Core, as it will introduce an extra commitment for us.
I don't know if this will address your idea, but take a look at eProfile. Alfred tried to use Yogurt to extend the regular Profile. I just tried to update it to make it compatible with PHP 7. Take a look and see if there is maybe a code that you could utilize, without touching the Core.

from suico.

liomj avatar liomj commented on July 17, 2024

Awesome, we can use eprofile module as example how to add custom field in yogurt in future release :-)

Yes we need to remove the current step to hack core userinfo.php for yogurt to be the main userpage

Im trying to figure out in profile and eprofile module which code that makes them the default userpage automatically when installing the modules.

from suico.

mambax7 avatar mambax7 commented on July 17, 2024

You can also look at SmartProfile to see if there is anything interesting for us for future versions of Yogurt

from suico.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.