• 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

Viewing 15 replies - 1 through 15 (of 19 total)
  • 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.

    Thread Starter soltikoff

    (@soltikoff)

    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.

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

    I’m also interested in the translated script.

    Thread Starter soltikoff

    (@soltikoff)

    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

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

    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.

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

    thanks

    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

    plugin works beautifully! Thank you.

    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!

    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.

    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.

    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>

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

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘e-mail this post’ is closed to new replies.