Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[Solved] Plugin Development: Name in User.php

edited June 2011 in Vanilla 2.0 - 2.8
Hey all.

I'm new to Vanilla and like it a lot so far. I'm currently developing a plugin.

One of the things that I want to do is to remove the user-name from showing up in the user profile.

I've been looking & searching through the Vanilla code and found out that I can accomplish my goal by doing the following:

1) Open VanillaForum/applications/dashboard/views/profile/user.php

2) Change the code from
<?php if (!defined('APPLICATION')) exit(); $Session = Gdn::Session(); ?> <div class="User"> <h1><?php echo $this->User->Name; ?></h1> <?php ...

to

<?php if (!defined('APPLICATION')) exit(); $Session = Gdn::Session(); ?> <div class="User"> <!-- <h1><?php echo $this->User->Name; ?></h1>--> <?php ...

(commenting 1 line of HTML)

Of course, that's no proper solution for a plugin. I can't ask the users to start hacking the Vanilla core code. Do you have any advice on how to accomplish this task from my plugin?

Any help would be greatly appreciated.

David
Tagged:

Comments

  • SS ✭✭
    edited May 2011
    What will do your plugin? Are you trying to hide [h1]Username[/h1] from page profile?
  • Thanks for your reply.

    Yes, I'm trying to hide [h1]Username[/h1] from page profile.

    The reason for that is that I add my own custom HTLM to the Content area of the profile.

    $Sender->AddAsset('Content', $HtmlOut, 'MyProfileContent');

    $HtmlOut contains some custom data as well as the Username, thus my need to get rid of the Username that Vanilla outputs.

  • SS ✭✭
    You can hide it by css: #dashboard_profile_index h1 {display:none}
  • What a simple and clean solution. Exactly what I was looking for.
    Thank you so much.
Sign In or Register to comment.