Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [colintho] Search for users that don't have links?

Quote Reply
Re: [colintho] Search for users that don't have links? In reply to
Hi,

I don't think there is a built in way of doing this - but you could do it with a script, that would work out who hasn't got any links (but is registered), and then output a list of email addresses, which you could pass into the "custom email" system that GLinks has (i.e a custom list)

Something like this should work:

Code:
#!/usr/local/bin/perl

use strict;
use lib '/path/to/your/admin';
use Links qw/$IN $DB $CFG/;
use GT::SQL::Condition;
use CGI::Carp qw(fatalsToBrowser);

local $SIG{__DIE__} = \&Links::fatal;

Links::init('/path/to/your/admin');

print $IN->header();

my $user_sth = $DB->table('Users')->select( { Status => 'Registered' } ) || die $GT::SQL::error;
while (my $hit = $user_sth->fetchrow_hashref) {
if ($DB->table('Links')->count( { LinkOwner => $hit->{Username} } ) < 1) {
print qq|$hit->{Email}<br />|;
}
}

(totally untested, but should work fine)

BTW, be sure to edit the /path/to/your/admin bit to your GLinks admin path =)

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 Search for users that don't have links? loxly 6852 Oct 12, 2002, 11:33 AM
Thread Re: [loxly] Search for users that don't have links?
OnlineMlm 6724 Oct 12, 2002, 3:43 PM
Post Re: [OnlineMlm] Search for users that don't have links?
loxly 6709 Oct 12, 2002, 5:26 PM
Thread Re: [OnlineMlm] Search for users that don't have links?
Evoir 6512 Feb 27, 2007, 7:51 AM
Thread Re: [Evoir] Search for users that don't have links?
colintho 6360 Apr 18, 2008, 12:20 AM
Thread Re: [colintho] Search for users that don't have links?
Andy 6329 Apr 18, 2008, 3:02 AM
Thread Re: [Andy] Search for users that don't have links?
colintho 6302 Apr 18, 2008, 8:07 AM
Post Re: [colintho] Search for users that don't have links?
Andy 6348 Apr 18, 2008, 9:01 AM
Thread Re: [Evoir] Search for users that don't have links?
iplay 6280 Apr 25, 2008, 2:24 AM
Thread Re: [iplay] Search for users that don't have links?
Andy 6301 Apr 25, 2008, 2:40 AM
Thread Re: [Andy] Search for users that don't have links?
iplay 6306 Apr 25, 2008, 3:16 AM
Thread Re: [iplay] Search for users that don't have links?
socrates 6277 Apr 25, 2008, 8:00 PM
Thread Re: [socrates] Search for users that don't have links?
Andy 6272 Apr 26, 2008, 12:44 AM
Post Re: [Andy] Search for users that don't have links?
socrates 6223 May 16, 2008, 6:13 PM