Gossamer Forum
Home : Products : Gossamer Links : Pre Sales :

Questions need answering

Quote Reply
Questions need answering
Hi,

Ok I have quite a big project in mind and hopefully you guys can help.

These days I come from a PHP / MySQL background but I used to use Link 1.0 back in the early days (must be over 2 years ago). This filled my needs for some time.

However I have totally lost track of how things have gone.

Basically cause I know PHP and MySQL I have written quite a few scripts etc, but I need to power of Links SQL as it's tried and tested and still in my view 12 months ahead of any PHP based similar system.

What I am asking is:

Links used to be able to have the ability to get the file extension to be changed, eg .shtml
I am guessing this is still possible and therefore able to export out as .php

Does the power of Links Template allow for PHP include statements and MySQL queries to inserted, therefore I can pass over varibles and get php to talk to databases and display the data in the same cgi driven templates.

Thanks for your time

Martin

Quote Reply
Re: Questions need answering In reply to
You can't really mix types, but if you are building a "static" site, then you can embed the php tags in your html, and serve the pages as pages.php and they will be parsed by your server as expected.

THe search/add/modify forms will _not_ work that way, since they are .cgi and not parsed by the server.



PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: Questions need answering In reply to
Hi,

I've seen this done before, drop me an email and I can send you to a site doing this. Basically you tell Links SQL to build pages using index.php and .php as the page extensions. This takes care of your home, new, cool, ratings and category pages.

You can also use php on the cgi pages by linking too add.php and modify.php and doing something like:

<?php include('http://yoursite/cgi-bin/add.cgi')?>

to run and include the output into your php page. This is the opposite of what you were describing, including Links SQL into your PHP. You can do the reverse, but it requires you to write in perl. For instance, you can do:

<%some_function%>

and that will run a perl function and return the results (if it returns a hash ref, it will set other tags on the page).

Hope that helps,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Questions need answering In reply to
using something like this..
<?php include('http://yoursite/cgi-bin/add.cgi')?>
is not correct
<?
$url="http://yourserver.com/";
if($gallery){include($url."cgi-bin/add.cgi?".$QUERY_STRING);}
?>

look at the following link, and apply the hack i made..
http://www.imagefolio.com/ubb/Forum19/HTML/000037.html
altho, not the same script,.. you should get the basic idea.
-Alex B Sommerfeld - Owner
Gateway Productions - Professional Disc Jockey
41 Otis St. Danvers Ma. 01923
Phone: (978) 777-1285
E-mail: alex@djgateway.com
Website: http://djgateway.com