Thread: questions regarding the current website framework
Hi Dave,
I a sure this is brought up before, Bu I have lost this one in the pile of mailings we have been sending,
Assuming the raw kb content is rendered to file from drupal’s database:
- The contents of these files can be injected into a template using the current framework.
- In order to have the ability to inject the kb content using various page templates: Do we want to create a php file for every kb content file which will contain the code to inject the kb content or we can use a file with get requests.
Example:
- article1.php --> reads common-sometemplate.html --> injects myarticle1.htm and article1.php is added to treeview for users.
Or
- some_template.php?article=kb12345 --> reads and injects the kb12345.htm and some_template.php?article=kb12345 is added to treeview for users.
Which one do you think is best fit into the current framework and CVS replication?
Regards,
Gevik.
From: Gevik babakhani [mailto:gevik@xs4all.nl]
Sent: 23 June 2005 21:09
To: Dave Page; pgsql-www@postgresql.org
Subject: questions regarding the current website frameworkHi Dave,
I a sure this is brought up before, Bu I have lost this one in the pile of mailings we have been sending,
Assuming the raw kb content is rendered to file from drupal’s database:
- The contents of these files can be injected into a template using the current framework.
- In order to have the ability to inject the kb content using various page templates: Do we want to create a php file for every kb content file which will contain the code to inject the kb content or we can use a file with get requests.
Example:
- article1.php --> reads common-sometemplate.html --> injects myarticle1.htm and article1.php is added to treeview for users.
Or
- some_template.php?article=kb12345 --> reads and injects the kb12345.htm and some_template.php?article=kb12345 is added to treeview for users.
Which one do you think is best fit into the current framework and CVS replication?
If I understand correctly, then 2) is what is required. Consider the .htaccess file in the root of the website.
RewriteRule ^(.*)$ /system/handler.php?page=$1 [QSA,L]
The majority of hits get caught by this rule. It takes a path such as:
/foo/bar.html
and rewrites it to:
/system/handler.php?page=/foo/bar.html
handler.php then inspects $_GET['page'] and launches the correct page formatter - for example, if it begins with 'ftp', then it will hand off to ftp.php. If is begins with 'docs', it will hand off to docs.php. I would add a newformatter there, probably pgdn.php, to handle all 'pgdn' paths.
Regards, Dave
Hi Dave,
Okay, after I wrote you the email yesterday, I went to look at the framework. Indeed. I have made minor changes to handler.php in order to recognize the pgdn content
And added the pgdn.php (like doc.php) which is going to handle all pgdn stuff.
You can check this on the dev site you created for me.
Regards,
Gevik.
If I understand correctly, then 2) is what is required. Consider the .htaccess file in the root of the website.
RewriteRule ^(.*)$ /system/handler.php?page=$1 [QSA,L]
The majority of hits get caught by this rule. It takes a path such as:
/foo/bar.html
and rewrites it to:
/system/handler.php?page=/foo/bar.html
handler.php then inspects $_GET['page'] and launches the correctpage formatter - for example, if it begins with 'ftp', then it will hand off to ftp.php. If is begins with 'docs', it will hand off to docs.php. I would add a newformatter there, probably pgdn.php, to handle all 'pgdn' paths.
Regards, Dave