Gossamer Forum
Home : Products : Others : Gossamer Community :

displaying Gmail on user homepage

Quote Reply
displaying Gmail on user homepage
Hello,

I would like to display (on user home page of G community) the Gmail that the member is using.
I tried:
<%app_zmail_email_username%>@<%app_zmail_email_domain%> which is not working (Unknown Tag).

Any Hint?
Thanks
Antoine
Quote Reply
Re: [antoined] displaying Gmail on user homepage In reply to
Do I have to suppose that <%....%> won't work on user home page of G community?
Thanks
A
Quote Reply
Re: [antoined] displaying Gmail on user homepage In reply to
Hi,

We'll see about making all those variables available on each Community page that you are logged in on.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [antoined] displaying Gmail on user homepage In reply to
Hi,

Sorry, looking into this more, no, you can't get the email address as a tag, as it's not stored in Community, only their user id. You could make a global that fetches it easy enough though. The user id is in <%app_zmail_userid%>.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] displaying Gmail on user homepage In reply to
Could you gently give me some indication about this useful global?

Thanks
Antoine
Quote Reply
Re: [antoined] displaying Gmail on user homepage In reply to
I have no idea how to code, I also need this global, so i thought to jump-start this thread. Maybe one of you guru's can corect this or point me in the right direction.

sub {
my $app_gmail_userid = shift;
require GT::SQL;
my $sth = $DB->table('comm_users')->select( {
app_gmail_email_username=> $app_gmail_userid,
app_gmail_email_domain => $app_gmail_userid,
app_gmail => 2,
});
return $sth;
}

<%my($app_gmail_email_username)%>@<%my($app_gmail_email_domain)%>

This is not returning anything, not even errors.
Help Please!!!

Last edited by:

goman: Dec 21, 2005, 12:31 AM
Quote Reply
Re: [goman] displaying Gmail on user homepage In reply to
Well, yes, because you should fetch query results and go through them.

This code should work, if the original code was correct:
Code:
sub {
my $app_gmail_userid = shift;
require GT::SQL;
my $sth = $DB->table('comm_users')->select( {
app_gmail_email_username=> $app_gmail_userid,
app_gmail_email_domain => $app_gmail_userid,
app_gmail => 2,
});

while (my $row = $sth->fetchrow_hashref) {
my @cut = split /\n/, $hit->{prof_OwnedPrograms};
foreach my $field (sort keys %{$row}) {
$result .= qq|$key: $row->{$field} <br>\n|;
}
$result .= qq|Next row:<br>\n|;
}
return $result;
}

<%my($app_gmail_email_username)%>@<%my($app_gmail_email_domain)%>
It should display the key-value pairs from the result for each row. Not tested.
Modify it as you need.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...