Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [shrirch] Need help converting some PHP code

Quote Reply
Re: [shrirch] Need help converting some PHP code In reply to
Hi,

Ok, try this:

get_vb_details
Code:
sub {

use Digest::Perl::MD5 'md5_hex';
my $rec = $DB->table('Links')->do_query(qq|select userid, salt from vb_user where username = "$_[0]"|)->fetchrow_hashref;

$rec->{logout_hash} = md5_hex($rec->{userid} . $rec->{salt} . '12345678');

return $rec;

}

Call in GLinks, with:

<%get_vb_details($Username)%>

..then, you should have <%logout_hash%>, and all the other details from the SELECT query.

Hopefully that'll do the job for you :) (untested, as I don't have vB =))

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Subject Author Views Date
Thread Need help converting some PHP code shrirch 5853 Sep 3, 2008, 1:50 AM
Thread Re: [shrirch] Need help converting some PHP code
Andy 5676 Sep 3, 2008, 2:02 AM
Thread Re: [Andy] Need help converting some PHP code
shrirch 5652 Sep 3, 2008, 2:21 AM
Thread Re: [shrirch] Need help converting some PHP code
Andy 5701 Sep 3, 2008, 2:30 AM
Thread Re: [Andy] Need help converting some PHP code
shrirch 5674 Sep 3, 2008, 2:32 AM
Thread Re: [shrirch] Need help converting some PHP code
shrirch 5676 Sep 3, 2008, 2:34 AM
Thread Re: [shrirch] Need help converting some PHP code
Andy 5654 Sep 3, 2008, 2:46 AM
Post Re: [Andy] Need help converting some PHP code
shrirch 5624 Sep 3, 2008, 2:47 AM