Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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.


In reply to Re: CSS for printing and tell-a-friend scripts by gaal
in thread CSS for printing and tell-a-friend scripts by mrtrinity3

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (1)
As of 2024-04-16 19:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found