|
Creating a Printer Version – Grab Method
Bells & Whistles
A few extra features are included to provide additional
functionality:
- Ability to exclude some text within the printable region.
- Ability to optionally cache the grabbed pages in a MySQL database to improve performance.
- Ability to extend script to accommodate multiple websites with each using its own Printer Version template.
- Optional javascript to add Printer Version button to webpages.
Set up MySQL database tables
The first table to create will hold member settings. If you
create an interface for members to manage their own data, then
username and password will be useful. Name and email may be
useful for you to contact your users or notify them with custom
email messages via an error subroutine. The "activeyn"
field should be set to "y" if you want the user’s printer
version to work. You may specify a different template file such
as "customername.html" in the "template" field.
The "subject", "logo", and "emailbody"
fields field are added in anticipation of having an "Email
This Page To A Friend" script to interact with this same data
in the future. The "domain" field is the allowed domain
name for this user. The "sitename" field should be
the name of the user’s company and will be available for
integration with templates.
CREATE TABLE `member` ( `id` tinyint(7) NOT NULL auto_increment, `username` varchar(25) NOT NULL default '', `password` varchar(25) default NULL, `name` varchar(50) default NULL, `email` varchar(50) default NULL, `activeyn` char(1) default NULL, `template` varchar(50) default NULL, `subject` varchar(100) default NULL, `domain` varchar(50) default NULL, `logo` varchar(100) default NULL, `emailbody` mediumtext, `sitename` varchar(100) default NULL, PRIMARY KEY (`id`), UNIQUE KEY `id` (`id`) ) TYPE=MyISAM AUTO_INCREMENT=1 ;
| Comments: | ||
| RE: Interesting, but too complex IMHO | Scott | 08/16/04 19:54 |
| CSS is the apropriate solution! | Fernando Wendt | 08/13/04 12:51 |
| RE: using variable | smt | 07/29/04 03:32 |
| Come on...too much work when you can use CSS | Big Mac Attack | 07/10/04 19:05 |
| using variable | BIGmrC | 06/03/04 07:49 |
| Printer version? CSS! | Chris Erik Haugli | 04/16/04 02:40 |
| RE: Interesting, but too complex IMHO | Jim Fletcher | 04/14/04 18:59 |
| Interesting, but too complex IMHO | Tom | 04/09/04 09:45 |
|
If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly. | ||


