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

Mylinks sql display on home page

Quote Reply
Mylinks sql display on home page
Paul,



What would it take to get the "<%total%>" tag to work on the home page (and possibly others)?



Thank you.
Quote Reply
Re: [nt6] Mylinks sql display on home page In reply to
You'd need something like:

Code:
sub {
return $DB->table('MyLinks')->count( { UserID => $_[0] } );
}

...then in your template add:

<%TagName(Username)%>
Quote Reply
Re: [Paul] Mylinks sql display on home page In reply to
Paul,



I replaced the <%total%> tag by your global and got this:



(username),
you have
Error: Variable 'TagName' is not a code reference
saved link s !


Any ideas?
Quote Reply
Re: [Paul] Mylinks sql display on home page In reply to
Could you please give this a look Paul?

I still haven't got your plug in to display on any of the "regular" pages.



Thank you.
Quote Reply
Re: [nt6] Mylinks sql display on home page In reply to
Sorry Payl, my wrong. I had messed up the sub.Crazy

Ir works fine now Angelic
Quote Reply
Re: [I.P.Daily] Mylinks sql display on home page In reply to
This global is giving me a link count that is always 0, no matter how many links I save.

Any Ideas?
Quote Reply
Re: [nt6] Mylinks sql display on home page In reply to
Try changing Username to $Username
Quote Reply
Re: [I.P.Daily] Mylinks sql display on home page In reply to
Thank you. That did it Smile
Quote Reply
Re: [Paul] Mylinks sql display on home page In reply to
Paul what is is latest version of this plug in ?
Quote Reply
Re: [nt6] Mylinks sql display on home page In reply to
Hi

What was the global that worked for you?

I was unable to get it to work .. getting: Error: Variable 'g_linkssql_t' is not a code reference even with $Username
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] Mylinks sql display on home page In reply to
That error is related to your global code formatting. What did you try? (Tag and global code)
Quote Reply
Re: [Paul] Mylinks sql display on home page In reply to
Paul what is is latest version of this plug in ?
Quote Reply
Re: [nt6] Mylinks sql display on home page In reply to
I think it is 1.0.0 ...it is 93kb
Quote Reply
Re: [Paul] Mylinks sql display on home page In reply to
Global

sub
{ return $DB->table('MyLinks')->count( { UserID => $_[0] } ); }

tag

<%TagName($Username)%>
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] Mylinks sql display on home page In reply to
The global must start exactly:

sub {

not

sub
{

or
Code:
sub {
Quote Reply
Re: [Paul] Mylinks sql display on home page In reply to
Hi Paul

The one that worked for me was:

sub {
my ($total) = $DB->table('MyLinks')->count( { UserID => $_[0] } );
return $total;
}

Thanks
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory