Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Problem with IsLinked MOD

Quote Reply
Problem with IsLinked MOD
Hi All,

I'm attempting to install my IsLinked MOD into Links SQL, but have struck a few problems.

Ive added the following (Red Text) to HTML_Templates.pl as in the original
Code:
# Set new and pop to either 1 or undef for templates.
($rec->{'isNew'} eq 'Yes') ? ($rec->{'isNew'} = 1) : (delete $rec->{'isNew'});
($rec->{'isChanged'} eq 'Yes') ? ($rec->{'isChanged'} = 1) : (delete $rec->{'isChanged'});
($rec->{'isPopular'} eq 'Yes') ? ($rec->{'isPopular'} = 1) : (delete $rec->{'isPopular'});
($rec{'isLinked'} eq 'Yes') ? ($rec{'isLinked'} = 1) : (delete $rec{'isLinked'});
But im getting the following errors on Build.
Code:
HTML_Templates.pm: Global symbol "%rec" requires explicit package name at Links/HTML_Templates.pm line 82.

HTML_Templates.pm: Compilation failed in require at nph-build.cgi line 33.
BEGIN failed--compilation aborted at nph-build.cgi line 33.
Any ideas what could be causing this, The IsLinked is in the Links table and the Links.def file.

Thanks in advance.



Regards

MDJ1
http://www.isee-multimedia.co.uk
Quote Reply
Re: Problem with IsLinked MOD In reply to
You need to change the red codes to the following:

Code:

($rec->{'isLinked'} eq 'Yes') ? ($rec->{'isLinked'} = 1) : (delete $rec->{'isLinked'});


Record hashes using strict are written differen than standard Perl...do you see the similarities between the other codes in that hash?

Regards,

Eliot Lee

Quote Reply
Re: Problem with IsLinked MOD In reply to
I SEE!

I've heard references to the use of HASH here before, this is something to do with the use of MOD Perl, Am i correct.

I can see the difference where the -> is added.

Thanks eliot I'll give it a try


Regards

MDJ1
http://www.isee-multimedia.co.uk
Quote Reply
Re: Problem with IsLinked MOD In reply to
Thanks eliot, It worked a treat!



Regards

MDJ1
http://www.isee-multimedia.co.uk