I want to add the permalinks for this plugin..plz help me…the readme says this :
________________________________________________________
copy the code and paste it in the file template-functions-links.php in the wp-includes directory.
_________________________________________________________’
this is the code:
_________________________________________________________
function get_wp2pdf_permalink() {
echo get_wp2pdfpermalink();
}
function get_wp2pdfpermalink($id=false) {
global $post, $wpdb, $tableposts;
global $querystring_start, $querystring_equal;
$rewritecode = array(
‘%year%’,
‘%monthnum%’,
‘%day%’,
‘%hour%’,
‘%minute%’,
‘%second%’,
‘%postname%’,
‘%post_id%’
);
if (!$id) {
if (” != get_settings(‘permalink_structure’)) {
$unixtime = strtotime($post->post_date);
$rewritereplace = array(
date(‘Y’, $unixtime),
date(‘m’, $unixtime),
date(‘d’, $unixtime),
date(‘H’, $unixtime),
date(‘i’, $unixtime),
date(‘s’, $unixtime),
$post->post_name,
$post->ID
);
return get_settings(‘home’) . str_replace($rewritecode, $rewritereplace, get_settings(‘permalink_structure’)).’pdf/’;
} else { // if they’re not using the fancy permalink option
return get_settings(‘home’) . ‘/pdf/wp2pdf.php’.$querystring_start.’p’.$querystring_equal.$post->ID;
}
} else { // if an ID is given
$idpost = $wpdb->get_row(“SELECT post_date, post_name FROM $tableposts WHERE ID = $id”);
if (” != get_settings(‘permalink_structure’)) {
$unixtime = strtotime($idpost->post_date);
$rewritereplace = array(
date(‘Y’, $unixtime),
date(‘m’, $unixtime),
date(‘d’, $unixtime),
date(‘H’, $unixtime),
date(‘i’, $unixtime),
date(‘s’, $unixtime),
$idpost->post_name,
$id
);
return get_settings(‘home’) . str_replace($rewritecode, $rewritereplace, get_settings(‘permalink_structure’)).’pdf/’;
} else {
return get_settings(‘home’) . ‘/wp2pdf/wp2pdf.php’.$querystring_start.’p’.$querystring_equal.$id;
}
}
}
_________________________________________________________
where do i add it in template-functions-links.php ? which line exactly ? My knowledge of php is very little