Bug #754

avatar

how override exts main?

Added by Sein Kraft 88 days ago. Updated 64 days ago.

Status:New Start:08/25/2009
Priority:Low Due date:
Assigned to:- % Done:

0%

Category:default extensions
Target version:2.4

Description

i'm triying to remove $event->add_link("My Profile", make_link("user")); from .ext/user

<?php
class CustomUserPage extends UserPage {
    public function onUserBlockBuilding(Event $event) {
        //$event->add_link("My Profile", make_link("user"));
        $event->add_link("Log Out", make_link("user_admin/logout"), 99);
    }
}
?>

History

Updated by Shish Moom 87 days ago

avatar

Um. One way would be to customise the function that takes all those links and makes it ignore that one, shall ponder a better way...

Updated by Sein Kraft 87 days ago

avatar

Shish Moom wrote:

Um. One way would be to customise the function that takes all those links and makes it ignore that one, shall ponder a better way...

How I should do that? Can you give me an example?

Updated by Shish Moom 66 days ago

avatar
  • Target version changed from 2.3 to 2.4

in a custom UserTheme; display_user_block($page, $user, $parts); foreach($parts as $part); if($part["name"] == "blah") continue;

Updated by Sein Kraft 66 days ago

avatar

Thanks because i think that the link "My Profile" it's irrelevant, a duplicate because the user can acess through the link "My Account".

Maybe it could be removed ("My Profile")

Updated by Shish Moom 64 days ago

avatar

That link only exists in one theme though <_<

Updated by Sein Kraft 64 days ago

avatar

not, it appears on everyone.

It ext/user/main.php

public function onUserBlockBuilding(Event $event) {
$event->add_link("My Profile", make_link("user"));
$event->add_link("Log Out", make_link("user_admin/logout"), 99);
}

Updated by Shish Moom 64 days ago

avatar

Yeah, that link appears on all, the other one doesn't

Also available in: Atom PDF