Gossamer Forum
Quote Reply
New Mods
Hope this isn't a prob Bobsie, I just want feedback before I atempt this.

I have created 2 mods for Links 2.0 that are itegral to eachother. I made a mod to allow the creation of extra templates for use in other programs that get parsed for Links commands. I found this useful for integrating third party CGI's that used templates also.

I then extended this and made a Guestbook that completely integrates into Links. I didn't like the way others looked or the hacking I had to do to make them fit. For an example of what is looks like visit http://www.madlinux.cx/lolug/guestbook.html. PLEASE do not post crap on this. I don not have an admin script yet so I have to hand edit the DB file.

If anyone is interested post a message. If I get any interest I will post them where ever I'm suposed to, once I figure that out.

Thanks to everyone who has made posts and replys in this forum. You ALL have helped me out very much.

Lorance Stinson

[This message has been edited by lorance (edited July 06, 1999).]

[This message has been edited by lorance (edited July 06, 1999).]
Quote Reply
Re: New Mods In reply to
go to
http://www.gossamer-threads.com/...um3/HTML/002169.html
love
klaus

------------------
Quote Reply
Re: New Mods In reply to
Lorance,

I don't see any problem with your message. That's what this forum is for, discussion of mods for Links, whether they be basic or advanced.

I'd like to hear more about that first mod you made. Can you go into more detail?
Quote Reply
Re: New Mods In reply to
In the nph-buil.cgi after the HOME page is closed I added:
# Build the extra templates in db_exttmpl, Lorance Stinson
print "\tBuilding the extra templates.\n";
open (EXTTMPLCFG, "<$db_exttmpl") or &cgierr ("unable to open template page:
$build_root_path/menu.shtml Reason: $!");
# process each of the templates
while (<EXTTMPLCFG> ) {
chop $_;
($exttmplfil,$exttmplout) = split(/:/,$_);
print "\tBuilding the template $exttmplfil.\n";
# Open the output file
open (EXTTMPLOUTFIL, ">$build_root_path/$exttmplout") or &cgierr ("unable to open template page: $build_root_path/$exttmplout Reason: $!");
# Write the template
print EXTTMPLOUTFIL &site_html_ext_tmpl;
close EXTTMPLOUTFIL;
}
close EXTTMPLCFG;

And in links.cfg I added:

$db_exttmpl = "$db_script_path/extratmpls.cfg"; # the config file for the extra templates

and in site_html_templates.cgi I added:

sub site_html_ext_tmpl {
# --------------------------------------------------------
# This routine will build the extra tempates. Lorance Stinson


return &load_template ($exttmplfil, {
message => $message,
%globals
});
}

the the config file looks like:

menu.html:ssi/menu.shtml
template.html:templates/template.html
archive.html:templates/archive.html
portnews.html:templates/portnews.html

This works perfectomondo. It parses the template files for any Links commands and creates them in the specified directory. This allowed me to take 3 3rd pary scripts and integrate them. One of which was replaced buy my guestbook mod.
Quote Reply
Re: New Mods In reply to
Lorance,

Do these standalone scripts have seperate databases or is the data stored in the links database? Do you use the links database for your guestbook. When I click on add, the links form shows up.

What other scripts have you integrated and I would like to see them working, if they have been setup. I am not a programmer and actually I am still not able to understand what you have done.

Thanks
Quote Reply
Re: New Mods In reply to
The templates are actually just html files I placed in the templates dir and put links commands in them. The links commands being the <%command%> tags. The config file has the format template:where_it_goes. My mod reads the file and parses the template and puts it where the file specifies. The cgi's and forms I used are actually the add and subscribe cgis and templates. The guestbook actually uses a plain text file. I didn't need the fancy database stuff for it.

IF you go to my main page and scroll down to the bottom you will see some news. This is a third party script I moded to produce an html file that I include into the home page via ssi. I am going to replace this with my own news mod once I get the time.

Hope this helps you. If not let me know. And if anyone wants I will make an instruction page for the guestbook and extra templates mode. The first needs the latter to work.
Quote Reply
Re: New Mods In reply to
Very nice, I have been looking for a way to integrate scripts, including surveys, news updates, etc.

Good work! I will test your mod to see if it works!

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: New Mods In reply to
So, in otherwords your guestbook does use an external database. Does this mean you can use the data from another database to be displayed?

===========
Hope this helps you. If not let me know. And if anyone wants I will make an instruction
page for the guestbook and extra templates mode. The first needs the latter to work.
===========

If that is the case, I would like it if you can provide instructions on how to do this (whenever you have time).

I am not necessarily interested in the guestbook as such. But I am thinking that I can store a lot additional data on a stand alone database and then parse them for a directory I am creating which includes, business profiles (over 50 fields).

Thank you for your feedback.