[SOLVED] Avatar in module whit URL

9 years 2 months ago #136584 by Nyro
I have a community builder with the members Pages is username.domain.com ...

The question is...

is possible when visitors enter the username.domain.com you see the user's members avatar ???

There is one module with that function?

Thank you and sorry for my bad english.

Post edited by: krileon, at: 2010/06/29 21:28
9 years 2 months ago #136715 by krileon
The CB Login module will show a logged in users Avatar if configured to do so, please review its parameters. Can not advise about the sub-domain usage however, this parameter and the modules usage is designed for typical site usage.

Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
Please note I am available Monday - Friday from 8:00 AM EST to 4:00 PM EST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
9 years 2 months ago #136718 by Nyro
I have solutions... I have that funtion whit another module...

I change the code and put this...


$server = explode('.', $_SERVER);
if (count($server) == 3) {
$username =& $server[0];
$db =& JFactory::getDBO();
$db->setQuery("SELECT c.avatar,u.email FROM #__comprofiler AS c LEFT JOIN #__users AS u ON u.id=c.user_id WHERE u.username='".$username."'");
$tmp = $db->loadObject();
$avatar = '';
if ($tmp->avatar && strpos($tmp->avatar, "/default_thumb.jpg") === false && file_exists(JPATH_ROOT.DS."images".DS."comprofiler".DS."tn".$tmp->avatar))
$avatar = JURI::root()."images/comprofiler/tn".$tmp->avatar;
$avatar = ' www.gravatar.com/avatar/'.md5 ($tmp->email).'?s=140&d=wavatar';
echo '<a href="http://'.$username.'.'.$_SERVER.'"><img src="'.$avatar.'" /></a>';
echo 'No se puede mostrar el avatar. Necesitas estar en el subdominio del usuario. Por ejemplo: admin.'.$_SERVER;


Thack you.
Moderators: beatnantkrileon
Time to create page: 0.670 seconds
Facebook Twitter Google LinkedIn