Public links to user profiles

Laz75

Joined: 2013-09-16
Posts: 3
Posted: Mon, 2013-09-23 10:09

Hello, I've been trying to find out if there's a way to link a username, wherever it appears, to their user profile page (like "http://[domain]/index.php/user_profile/show/30"), but found nothing.

Those pages are public (well, not exactly public but they're visible to registered users) so I guess there should be a way to actually have them linked somewhere. They're a nice way to see all the photos uploaded by a certain user.

Any help?

Thanks!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2013-09-23 15:20
Quote:
They're a nice way to see all the photos uploaded by a certain user.

I don't see that as a way but perhaps I'm missing something.
Anyway if using the info module you could see if this is waht your after.
Edit modules/info/helpers/info_block.php

            $info["owner"] = array(
              "label" => t("Owner:"),
              "value" => html::clean($display_name)
            );

to

            $info["owner"] = array(
              "label" => t("Owner:"),
              "value" => html::anchor(
                user_profile::url($theme->item->owner->url),
                html::clean($display_name))
            );

Not tested but should work.
It will not show the profile page if the user added their own url.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Laz75

Joined: 2013-09-16
Posts: 3
Posted: Tue, 2013-09-24 09:23

Thank you!

Unfortunately it doesn't work, it creates a link to "http://[domain]/index.php/user_profile/show" without their id at the end of the URL.

(Why do you think it's not a nice way to see a user's photos? Is there a better way I'm missing?)

Thanks anyway.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2013-09-24 13:47

try
$theme->item->owner->url
to
$theme->item()->owner->url

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Laz75

Joined: 2013-09-16
Posts: 3
Posted: Tue, 2013-09-24 14:29

I found the answer in an old post, sorry! Now it works.

Thanks.