Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Modification of UserPhoto Module

sahotataransahotataran Rare Visitor ✭✭
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

Theme Charcha for great desktop and mobile experience! - drop me a message :)

Tagged:
Sign In or Register to comment.