ok.. well.. i'm not planning on use page.cgi for all of my pages (only plan to use it for dynamic categories and detailed pages) so i just made a simple script to use for the users.. it uses the cookies to get the username and all the info..
http://www.pdamania.com/ssi.txt
you'll need to to add this to HTML_Templates.pm:
# --------------------------------------------------------
# MOD: Displays USER Information via SSI.
#
my ($user) = @_;
(ref $user eq 'HASH') or croak "HTML_TEMPLATES: Argument '$user' must be hash reference";
print &load_template ('home_ssi.html', {
%$user,
%GLOBALS
}, undef, undef);
}
as well as &site_html_home_ssi to @EXPORT..
then you need to make home_ssi.html. something like this
Hi <%Username%>!
<%endif%>
<%ifnot Username%>
Welcome to our site!
<%endif%>
it also works with the category editor thingy.. you just need to make another copy and change the subroutine (yea.. that's a reason why it sucks ).. and then do the similiar for html_templates.pm and then make a different template.. with if isEditor
in the category one.. if you need the category ID.. just add $category_id to the subroutine call.. and add $category_id to the sub in html_templates.pm as well..
the most effective way to use this is adding DYNAMIC => $dynamic, to all of the template loading variables thingy.. and then in the template use
<%if Username%>
Hi <%Username%>!
<%endif%>
<%ifnot Username%>
Welcome to our site!
<%endif%>
<%endif%>
<%ifnot DYNAMIC%>
<!--#exec cgi="/ssi.cgi"-->
<%endif%>
sorry.. too lazy for more detailed instructions
jerry
http://www.pdamania.com/ssi.txt
you'll need to to add this to HTML_Templates.pm:
Code:
sub site_html_home_ssi { # --------------------------------------------------------
# MOD: Displays USER Information via SSI.
#
my ($user) = @_;
(ref $user eq 'HASH') or croak "HTML_TEMPLATES: Argument '$user' must be hash reference";
print &load_template ('home_ssi.html', {
%$user,
%GLOBALS
}, undef, undef);
}
as well as &site_html_home_ssi to @EXPORT..
then you need to make home_ssi.html. something like this
Code:
<%if Username%> Hi <%Username%>!
<%endif%>
<%ifnot Username%>
Welcome to our site!
<%endif%>
it also works with the category editor thingy.. you just need to make another copy and change the subroutine (yea.. that's a reason why it sucks ).. and then do the similiar for html_templates.pm and then make a different template.. with if isEditor
in the category one.. if you need the category ID.. just add $category_id to the subroutine call.. and add $category_id to the sub in html_templates.pm as well..
the most effective way to use this is adding DYNAMIC => $dynamic, to all of the template loading variables thingy.. and then in the template use
Code:
<%if DYNAMIC%> <%if Username%>
Hi <%Username%>!
<%endif%>
<%ifnot Username%>
Welcome to our site!
<%endif%>
<%endif%>
<%ifnot DYNAMIC%>
<!--#exec cgi="/ssi.cgi"-->
<%endif%>
sorry.. too lazy for more detailed instructions
jerry