Gossamer Forum
Home : Products : Gossamer Links : Discussions :

add new templates

Quote Reply
add new templates
Hello
does anybody know how to add additional templates in link-SQL2???
(for user agreement, cvopyright notices etc.)
Ok it seems to be easier as in the previous versions, but i don't know how.

Quote Reply
Re: add new templates In reply to
It depends on where and how you want to add them.

Templates are specified by passing them to the

Links::SiteHTML::dispay ('template', {hash})

It's actually very easy.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: add new templates In reply to
ok I saw your comment in a forum with ridesworld too, but If I add these in the head of the template (before html starts) no builds happen & i don't know how to access it by the browser
(the templates are in the default template directory)
I've added this:


Links::SiteHTML::dispay ('useragreement')

I think that another script should be modified but which one with which codes




Quote Reply
Re: add new templates In reply to
enricho:

I played with this, and I modded page.cgi (for dynamic) and nph-build.cgi (for an actual build); then I modded Links/Build, and finally Links/SiteHTML.

I just copied down the format already used.

One hint I have for you: make pages.cgi (as opposed to the original page.cgi- note the "s"), Build_1.pm and SiteHTML_1.pm for all your extra pages... that way, it will not get overwritten when you update the files, and all you have to do is update nph-build.cgi every time. Also makes tracking down the erors easier (and if you are anything like me, you'll have errors!). Then, once things are solidified (that is, we are out of beta AND your code is bug free) you can either make it part of the real scripts, or just keep it seperate, whatever you want!

best of luck!

dave

Quote Reply
Re: add new templates In reply to
Hello waht you give is a rather cool tip but it wil not work
I modified the scripts and modified the required field in setup.cgi but setup.cgi still gives an unknow tag
'cfg_build_useragreement_url'
and nph_build.cgi stops building with the following message:

ERROR: Unable to open '/index.html' ()

This means that the user 'ericho' is not able to create a file
in your pages directory. Please chmod the main directory
0777 so the program can create the file.

A fatal error has occured:Debug informationPlease enable debugging in setup for more details.
i set debuglevel on 1 & gets a lot of error messages
like this:

Links (10739): Links::environment called at Links.pm line 445.
Links (10739): Links::fatal called at nph-build.cgi line 760.
Links (10739): main::_cant_open called at nph-build.cgi line 399.
Links (10739): main::_build_useragreement called at GT/Plugins.pm line 66.
Links (10739): GT::Plugins::dispatch called at nph-build.cgi line 78.
Links (10739): main::build_all called at nph-build.cgi line 35.
Links (10739): main::main called at nph-build.cgi line 22.

System Information
======================================
Perl Version: 5.00404
Links SQL Version: 2.0.0-beta1
DBI.pm Version: 1.06
@INC =
/usr/lib/perl5/i386-linux/5.00404
/usr/lib/perl5
/usr/lib/perl5/site_perl/i386-linux
/usr/lib/perl5/site_perl

and below a lot of system information

Quote Reply
Re: add new templates In reply to
In Reply To:
ERROR: Unable to open '/index.html' ()

This means that the user 'ericho' is not able to create a file
in your pages directory. Please chmod the main directory
0777 so the program can create the file.
this means you probably did the first build via the web, so the directory is owned by the web server.

There are utilities you can download that will run as the webserver to let you delete/chmod the directories set up that way.

If you have root access, you can do it as root, but on a virtual server you won't have that.


PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: add new templates In reply to
oh nothing wrong with my programming, but it gives also an unknow tag error in my setup and i 've seen in the entire script where to add this.
I want that links SQL build this like:
http://www.yourhost.com/Useragreement/index.html