HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Modification of UserPhoto Module

sahotataransahotataran ✭✭✭
edited December 2011 in Feedback

Wanted to share some code about UserPhoto module.

i have customized

\applications\dashboard\views\modules/userphoto.php

to

<?php if (!defined('APPLICATION')) exit(); if ($this->User->Photo != '') { ?>
< div class="Photo">
<?php $this->FireEvent('BeforeUserProfilePhoto'); if (StringBeginsWith($this->User->Photo, 'http')) echo Img($this->User->Photo); else echo Img(Gdn_Upload::Url(ChangeBasename($this->User->Photo, 'p%s'))); ?>
<?php $this->FireEvent('AfterUserProfilePhoto'); ?>
< /div>
<?php
}

to fire two events

UserPhotoModule_AfterUserProfilePhoto_Handler($Sender)

and

UserPhotoModule_BeforeUserProfilePhoto_Handler($Sender)

which can be helpful using hooks to display some cool stuff like you can check on page

http://community.onlineautoinsurance.com/profile/8/sahotataran/

Hope its helpful

There was an error rendering this rich post.

Tagged:
Sign In or Register to comment.