Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: CSS for printing and tell-a-friend scripts

by gaal (Parson)
on Dec 07, 2004 at 15:08 UTC ( [id://412917]=note: print w/replies, xml ) Need Help??


in reply to CSS for printing and tell-a-friend scripts

Tell-a-friend can be dangerous: if a spammer finds your form, they can use *your* computer resources to send out lots of spam -- which will be traced back to you. Only allow authenticated users to use this feature, and make some provision to limit the amount of messages each user is allowed to send. You have been warned!

As for how to send the actual message, there are plenty of mail modules on CPAN. I think MIME::Lite can do what you want with a minimum of fuss.

Adding a link to your existing pages depends on how your site is designed. If you're using any kind of templating system, it's easy -- add it once to the appropriate template. If you aren't -- then you should :-) but you might, in a pinch, do a quick search and replace for <BODY> (or some other location that exists in your pages), and put <BODY><A HREF="your page">tell a friend</a>. There are perl one-liners that can do that for you.

Printer-friendly pages? The answer again depends on how your site is designed, but if the data is coming from a database and then rendered by a template, just make a "printer" version of the template that doesn't include the printer-unfriendly elements :)

Update: eieio's suggestion re: CSS is a very good one, too.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://412917]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2024-04-19 09:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found