Zoek
January 2010
M T W T F S S
« Dec   Feb »
 123
45678910
11121314151617
18192021222324
25262728293031

PostHeaderIcon Sendtoafriend tool

I could not paste code in the other blog. So i’ll post it here:

Below I put down in 4 steps a way to use this ‘bookmark’ tool for wordpress on index pages as well as single blog entry pages. Sorry for those who have absolutely no idea what i am talking about…

But those looking for the tool will know :-)

1. add a parameter to the call.
instead of <?php StaF_html() ?>
you ad this to your template:
<?php $permalink = get_permalink(); StaF_html($permalink); ?>

2. find this in sendtoafriend.php:
<form method="post" action="<?php echo $_SERVER[PHP_SELF]; ?>" id="stafForm" onSubmit="return staf_Submit();">
and replace with
<form method="post" action="<?php echo $_SERVER[PHP_SELF]; ?>" id="stafForm" onSubmit="return staf_Submit('<?php echo $permalink; ?>');">

3. find this in js.php
function staf_Submit() {
and replace with
function staf_Submit(permalink) {

4. find this a couple of lines below
params = 'url='+document.getElementById('stafUrl').value;
replace with
params = 'url='+permalink;

Enjoy !

Leave a Reply