Gossamer Forum
Quote Reply
SSI in CGI
If I want to target a banner to certain keywords using SSI can I add the code to the header.txt file and call it in the add.html template?

Will that work?...Is that why the new header.txt/footer.txt files have been introduced..to allow this?

Paul Wilson. Shocked
(Dont blame me if I'm wrong!)
Quote Reply
Re: SSI in CGI In reply to
Search the Links 2.0 Customization forum for Webadverts...using that Mod and porting it to Links SQL v.2.0 by using strict Perl, you will be able to parse cgi scripts within other cgi scripts.

Regards,

Eliot Lee
Quote Reply
Re: SSI in CGI In reply to
Ugh....I realise that this has been talked about many times but Im having a nightmare.

Ive tried using the webadverts mod and I just cant get it to work with NG.

Do I add my sub including the SSI code to search.cgi?...or do I create a global with it?

If you could just give me a few quick instructions as to how to show a banner on the search results page using this code it would be much appreciated..

!--#include virtual="/cgi-bin/bms/adcycle.cgi?group=1&media=1&delivery=ssi&keywords=$query"--

(I realise that the start < and end > are missing...I had to do that because this forum turns the code into a blank space if you add the full tag.)

Thankyou.



Paul Wilson. Shocked
(Dont blame me if I'm wrong!)
Quote Reply
Re: SSI in CGI In reply to
In Reply To:
Do I add my sub including the SSI code to search.cgi?...
No, you should add it in your SiteHTML.pm or in your Links.pm file.

In Reply To:
or do I create a global with it?
Yes...you create a global tag....

I am not sure how it is done in the most recent version of LINKS SQL, but the logic is that you would define the <%banner%> tag as &insertadverts in the globals interface script.

In previous versions of LINKS SQL, the global definition tag would look like the following:

Code:

banner => &Links::Links::insertadverts



Regards,

Eliot Lee
Quote Reply
Re: SSI in CGI In reply to
Thanks for the help...

So I'd add...

sub insertbanner {

print "!--# exec cgi="/cgi-bin/bms/adcycle.cgi?group=1&keywords=$query --";
}

into the SiteHTML.pm file and then create the global called banner with the code &Links::Links::insertbanner?

Paul Wilson. Shocked
(Dont blame me if I'm wrong!)
Quote Reply
Re: SSI in CGI In reply to
Sorry...that should be..

sub insertbanner {

$output .= qq|!--# exec cgi="/cgi-bin/bms/adcycle.cgi?group=1&keywords=$query -->|;
return $output;

}

Shouldnt it?

Paul Wilson. Shocked
(Dont blame me if I'm wrong!)
Quote Reply
Re: SSI in CGI In reply to
Shouldnt it also be...

banner => &Links::Links::SiteHTML::insertadverts

or actually

banner => &Links::Link::insertadverts

Ok...I havnt got a clue what Im on about so Im gonna keep quiet!

Paul Wilson. Shocked
(Dont blame me if I'm wrong!)
Quote Reply
Re: SSI in CGI In reply to
No...you are not using the correct "sub" codes...look again at the WebAdverts code hack....

Regards,

Eliot Lee
Quote Reply
Re: SSI in CGI In reply to
No, again...

Regards,

Eliot Lee
Quote Reply
Re: SSI in CGI In reply to
If you put the SUB in the SiteHTML.pm module, then it should be:

Code:

banner => &Links::SiteHTML::insertadverts


If you put it in the Links.pm, then the global tag definition should be:

Code:

banner => &Links::Links::insertadverts


Regards,

Eliot Lee
Quote Reply
Re: SSI in CGI In reply to
Im getting an internal error after putting the sub in SiteHTML.pm and adding the global.

Paul Wilson. Shocked
(Dont blame me if I'm wrong!)
Quote Reply
Re: SSI in CGI In reply to
Could you please tell me how to sort search results using a field called Expire which is in the format Month-Day-Year (10-01-2000)

I changed the search sort variable in links.def to the Expire field number but that doesnt work so I assume I have to add something to sub build_sortit in db_utils.pl

I can copy the existing code to change the results listing for fields using Yes|No like isNew/isPopular but I dont know how to do it for a date field.

Thanks...(This is for Links2)

Paul Wilson. Shocked
(Dont blame me if I'm wrong!)
Quote Reply
Re: SSI in CGI In reply to
In Reply To:
Could you please tell me how to sort search results using a field called Expire which is in the format Month-Day-Year (10-01-2000)
Sure...if you are willing to share some of the money you are getting from that user. I have a real problem helping people for free when they are getting paid to do Mods...This is for lotto, correct? Wink If you are unwilling to share your contract fees, then I have a real ethical problem with supplying you with the codes while you get paid and I don't.

And there is a reason why I ignored your ORIGINAL Thread in the Links 2.0 Customization Forum. Wink

Good luck!

Regards,

Eliot Lee
Quote Reply
Re: SSI in CGI In reply to
You are probably using the incorrect syntax...I know that the syntax has dramatically changed in the current BETA of LINKS SQL, but the logic I provided you so far and the other discussions related to plug-ins, tags, etc. in this Forum should get you going.

Good luck!

Regards,

Eliot Lee
Quote Reply
Re: SSI in CGI In reply to
lotto?....No...at least I dont think so.

But I have no problem at all sharing the money I am making!
I want to help this user accomplish their goal and if that means asking for help from you then that is fine and I am more than willing to pay you for your time.

I was asked to add some fields to links.def and alter the templates and then get the results to list in the order for the new field and I did the first two parts and didnt realise that getting the results to list differently would be such a task...which it probably isnt for you :)

Paul Wilson. Shocked
(Dont blame me if I'm wrong!)
Quote Reply
Re: SSI in CGI In reply to
So do I assume that you are unwilling to help?

Paul Wilson. Shocked
(Dont blame me if I'm wrong!)
Quote Reply
Re: SSI in CGI In reply to
Paul, this is definitely getting off topic, so I have privately sent you a message.

Good luck!

Regards,

Eliot Lee
Quote Reply
Re: SSI in CGI In reply to
I continued a different thread in the Links 2 Customization forum but had to reply to your here because there was no post of yours to reply to in the Links2 forum.

Paul Wilson. Shocked
(Dont blame me if I'm wrong!)
Quote Reply
Re: SSI in CGI In reply to
Sorry...I just re-read that last private message I sent and it wasnt meant to sound that horrible!

I was just a bit shocked that you got so angry about something not important!

I would have sent this as a PM but as you dont allow them I couldnt!

Paul Wilson. Shocked
(Dont blame me if I'm wrong!)