WordPress.org

Ready to get started?Download WordPress

Forums

e-mail this post (20 posts)

  1. soltikoff
    Member
    Posted 9 years ago #

    Hi everyone,
    I am trying to implement an "e-mail this post" feature in my site. I want the exact same functionality as the one Alex King has in his site. I have been trying with javascript but I cannot find the way to send the variables to the new window.
    As far as I understand I need the post id, the name of the post and most importantly the permalink available in the new window.
    I believe I can achieve this just by sending the variables in the URI when the user clicks on the link BUT then I cannot control the size of the window. Does that make sense or am I confused beyond repair?
    Thank you all
    Sol

  2. Rhetti
    Member
    Posted 9 years ago #

    I do believe you could do a Javascipt/PHP combo.
    use the javascript to open the new window, but then you get to the URL part of the Javascript type in:
    (Example: http://example.com/blog/index.php?id=<?PHP echo $id; ?>&name=<?PHP echo $post_name; ?>)
    I realize that none of those are the right variables and it isn't everything you need. But I think it gets the point across as long as YOU know what variables you need....
    If you don't give a more detailed explination and when I wake up in the morning I'll try to get you a better solution then the vague one I just put above.

  3. soltikoff
    Member
    Posted 9 years ago #

    Thank you Rhetti.
    I found a way to do it.
    What this thing does is add a "send this post to a friend" link somewhere in your post. If your readers click on that link, a small pop-up window is opened where the user can specify to whom he or she wants to send the link to that post. Using php mail() function, an email is sent to the specified recipient with the link to your post AND a copy is sent to an address you specify so you can keep track of who is sending what to whom.
    You can see it working at http://gacetacerouno.com/archives/2004/09/27/test-tell-a-friend/
    The site is in spanish though and the post I am directing you to is a dummy post just to test this thing (my site is not finished). However, the link you are interested in is the only green link in the page so you can't miss it.
    If someone is interested in adding this thing to their site, I am more than happy to tanslate everythig to english and make it available somewhere. Just let me know.

  4. zygosis
    Member
    Posted 9 years ago #

    Nice addition - I'd be interested in the translated script if you can find the time.
    Cheers
    David

  5. thejoker101
    Member
    Posted 9 years ago #

    I'm also interested in the translated script.

  6. soltikoff
    Member
    Posted 9 years ago #

    There were 2 tiny mistakes with the files I uploaded that might have caused some confusion.
    The problem has been fixed.
    If you downloaded these files prior to the publication of this post and cannot make the script work, please download the files again.
    My apologies.
    Juan

  7. delavoice
    Member
    Posted 9 years ago #

    Where can I download this? It's exactly what I'm looking for!

  8. Jack
    Member
    Posted 9 years ago #

    Something is wrong (perhaps). When I use this on one the nightlies I get the mail twice on the address of the receiver, ánd once on the address of the sender. So on each sending I get three responses.

  9. puzder
    Member
    Posted 9 years ago #

    Please dicrect me to the code, this is exactly what I am looking for.

    thanks

  10. Jack
    Member
    Posted 9 years ago #

    This is the link. But like I said, there seems to be something wrong when used with 1.5. At least in my case.

    http://www.gacetacerouno.com/hack/email_post.zip

  11. bloodylamer
    Member
    Posted 9 years ago #

    plugin works beautifully! Thank you.

  12. nrtechguy
    Member
    Posted 9 years ago #

    Can't seem to make this work. The $visitor and all the other variables are not being populated in the enviado.php file. I'm getting e-mail notification but it's not going to $friend and the subject and text is not being filled in.

    Any help appreciated!

  13. c0c0c0
    Member
    Posted 9 years ago #

    Gamerz has an e-mail drop in here: http://www.lesterchan.net/portfolio/programming.php

    It is incompatible with 1.5 currently.

    If anyone has his e-mail drop in, and has made it work with 1.5 please share.

  14. nrtechguy
    Member
    Posted 9 years ago #

    I saw this cococo, but was unsure how to implement. I'm new to WordPress and PHP. If it's a standalone and not a plugin, how do you get it to work? BTW, I'm still on 1.2.

  15. c0c0c0
    Member
    Posted 9 years ago #

    All you need to do is upload the file to your root then create a link in the loop (In index.php) to point to the file.

    Here is how I have mine set up (I also have his print this drop in which works great in 1.5)

    <?php endif; ?><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h3>
    <div class="meta"><?php _e("Filed under:"); ?> <?php the_category() ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?> - <a href="<?php bloginfo('url');?>/wp-print.php?p=<?=the_ID()?>"> Print This</a> - <a href="wp-email.php?p=<?=the_ID()?>">E-Mail This</a> </div>

  16. indi
    Member
    Posted 9 years ago #

    Also getting the same problem, variables aren't populating in enviado.php

  17. angsuman
    Member
    Posted 9 years ago #

    Works for me, check my site - http://blog.taragana.com/
    The changes to htaccess was not done by me as I was happy with a ?p= format for this page. If you do decide to make .htaccess changes, make sure they correspond to your permalink format. His instructions only work when you have permalinks like him.

  18. farhada
    Member
    Posted 8 years ago #

    Hi,
    It seems that all the files are out of rich for me. I am trying to help a friend of mine with her weblog at:
    http://www.noquestionsasked.org/blog
    To be able to add "mail this", or send this to your friend or something like that.
    I am very new with PHP and would like to find a drop in solution to this problem.

    TIA,
    /FA

  19. farhada
    Member
    Posted 8 years ago #

    Hi,
    It seems that all the files are out of rich for me. I am trying to help a friend of mine with her weblog at:
    http://www.noquestionsasked.org/blog
    To be able to add "mail this", or send this to your friend or something like that.
    I am very new with PHP and would like to find a drop in solution to this problem.

    TIA,
    /FA

  20. thepete
    Member
    Posted 8 years ago #

    I can't get any of Lester's plugins to work on my WP install and soltifoff's zip file has been moved. Are there any other options?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags