Hi,
I wish you had $USER in GComm - would make it a lot easier to write stand alone scripts :P
I currently have the following code:
# ==================================================================
# Gossamer Community
#
# Website : http://gossamer-threads.com/
# Support : http://gossamer-threads.com/scripts/support/
# CVS Info :
# NAme : birthdays.cgi
#
# Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
# Redistribution in part or in whole strictly prohibited. Please
# see LICENSE file for full details.
# ==================================================================
use strict;
use CGI::Carp qw(fatalsToBrowser);
use lib '/home/user/site.com/secure_data/lib';
use Community qw/comm_init comm_config comm_fatal $DB $IN $CFG/;
use GT::CGI;
use GT::Date;
use CGI::Carp qw(fatalsToBrowser);
use Carp;
require Community::Web::User;
local $SIG{__DIE__} = \&fatal;
Community::init('/home/user/site.com/secure_data');
print $IN->header();
GT::Template->parse_print("$CFG->{path_private}/templates/$CFG->{system_template_set}/message_home.html", { %$CFG }, { compress => 0 });
However, if someone is logged in - I want to have their details too (i.e username, etc).
It seems that using:
..doesn't work , as I get an error about $USER not being an exportable variable.
TIA for any suggestions.
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!
I wish you had $USER in GComm - would make it a lot easier to write stand alone scripts :P
I currently have the following code:
Code:
#!/usr/bin/perl5 # ==================================================================
# Gossamer Community
#
# Website : http://gossamer-threads.com/
# Support : http://gossamer-threads.com/scripts/support/
# CVS Info :
# NAme : birthdays.cgi
#
# Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
# Redistribution in part or in whole strictly prohibited. Please
# see LICENSE file for full details.
# ==================================================================
use strict;
use CGI::Carp qw(fatalsToBrowser);
use lib '/home/user/site.com/secure_data/lib';
use Community qw/comm_init comm_config comm_fatal $DB $IN $CFG/;
use GT::CGI;
use GT::Date;
use CGI::Carp qw(fatalsToBrowser);
use Carp;
require Community::Web::User;
local $SIG{__DIE__} = \&fatal;
Community::init('/home/user/site.com/secure_data');
print $IN->header();
GT::Template->parse_print("$CFG->{path_private}/templates/$CFG->{system_template_set}/message_home.html", { %$CFG }, { compress => 0 });
However, if someone is logged in - I want to have their details too (i.e username, etc).
It seems that using:
Code:
use Community qw/comm_init comm_config comm_fatal $DB $IN $CFG $USER/;..doesn't work , as I get an error about $USER not being an exportable variable.
TIA for any suggestions.
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!