diff -Naur flattr/flattr.php flattr-customurl/flattr.php
--- flattr/flattr.php 2012-02-16 08:51:23.000000000 +0100
+++ flattr-customurl/flattr.php 2012-02-18 16:15:41.282770252 +0100
@@ -454,11 +454,14 @@
if ($hidden == '') {
$hidden = get_option('flattr_hide', false);
}
+
+ $custom = get_post_meta($post->ID, '_flattr_post_customurl', true);
+ $buttonUrl = (empty($custom) ? get_permalink() : $custom);
$buttonData = array(
'user_id' => $flattr_uid,
- 'url' => get_permalink(),
+ 'url' => $buttonUrl,
'compact' => (get_option('flattr_compact', false) ? true : false ),
'hidden' => $hidden,
'language' => $selectedLanguage,
diff -Naur flattr/postmeta.php flattr-customurl/postmeta.php
--- flattr/postmeta.php 2012-02-16 08:51:23.000000000 +0100
+++ flattr-customurl/postmeta.php 2012-02-18 16:17:41.390775232 +0100
@@ -32,6 +32,9 @@
if ( isset($_POST['flattr_btn_disabled']) ) {
add_post_meta($id, '_flattr_btn_disabled', $_POST['flattr_btn_disabled'], true) or update_post_meta($id, '_flattr_btn_disabled', $_POST['flattr_btn_disabled']);
}
+ if ( isset($_POST['flattr_post_customurl']) ) {
+ add_post_meta($id, '_flattr_post_customurl', $_POST['flattr_post_customurl'], true) or update_post_meta($id, '_flattr_post_customurl', $_POST['flattr_post_customurl']);
+ }
return true;
}
@@ -93,6 +96,8 @@
{
$btnDisabled = get_option('flattr_disable', 0);
}
+
+ $customUrl = get_post_meta($post->ID, '_flattr_post_customurl', true);
include('postmeta-template.php');
}
diff -Naur flattr/postmeta-template.php flattr-customurl/postmeta-template.php
--- flattr/postmeta-template.php 2012-02-16 08:51:23.000000000 +0100
+++ flattr-customurl/postmeta-template.php 2012-02-18 16:19:25.842779561 +0100
@@ -1,5 +1,5 @@
- />
- Disable the Flattr button on this post?
+ />
+
@@ -35,7 +35,9 @@
- />
- Hide post from listings on flattr.com
-
+ />
+
+
+
+