CommentLuv - Version 2.6.3

Version Description

Download this release

Release Info

Developer teamplaylotto
Plugin Icon 128x128 CommentLuv
Version 2.6.3
Comparing to
See all releases

Code changes from version 2.6.1 to 2.6.3

Files changed (4) hide show
  1. commentluv-manager.php +226 -0
  2. commentluv.php +4 -2
  3. js/commentluvID.js +118 -0
  4. readme.txt +1 -1
commentluv-manager.php ADDED
@@ -0,0 +1,226 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'WP_PLUGIN_URL' ) )
3
+ define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' );
4
+ $commentluvdirectory = WP_PLUGIN_URL . '/' . dirname( plugin_basename(__FILE__) );
5
+ commentluv_alter_whitelist_options("");
6
+ // Add a new submenu under Options:
7
+ commentluv_activation();
8
+ add_options_page('CommentLuv', 'CommentLuv', 8, 'commentluv', 'cl_options_page');
9
+ add_option('cl_comment_text','[name]&#8217;s last blog post..[lastpost]');
10
+ add_option('cl_default_on','TRUE');
11
+ add_option('cl_heart_tip','TRUE');
12
+ add_option('cl_style','border:1px solid #ffffff; background-color: #eeeeee; display:block; padding:4px;');
13
+ add_option('cl_author_id','author');
14
+ add_option('cl_site_id','url');
15
+ add_option('cl_comment_id','comment');
16
+ add_option('cl_commentform_id','#commentform');
17
+ add_option('cl_badge','ACL88x31-white.gif');
18
+ add_option('cl_member_id','');
19
+ add_option('cl_author_type','name');
20
+ add_option('cl_url_type','name');
21
+ add_option('cl_textarea_type','name');
22
+ add_option('cl_click_track','on');
23
+ add_option('cl_showtext','CommentLuv Enabled');
24
+ add_option('cl_badge_pos','');
25
+ add_option('cl_prepend','');
26
+ add_option('cl_version','263');
27
+ add_option('cl_select_text','choose a different post to show');
28
+ add_option('cl_intense','off');
29
+ // Pre-2.6 compatibility
30
+ if ( ! defined( 'WP_CONTENT_URL' ) )
31
+ define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' );
32
+ if ( ! defined( 'WP_CONTENT_DIR' ) )
33
+ define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
34
+ if ( ! defined( 'WP_PLUGIN_URL' ) )
35
+ define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' );
36
+ if ( ! defined( 'WP_PLUGIN_DIR' ) )
37
+ define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
38
+ commentluv_setup();
39
+
40
+ // start functions
41
+ function commentluv_activation(){
42
+ // set version for future releases if they need to change a value
43
+ $version=get_option('cl_version');
44
+ if($version<263){
45
+ update_option('cl_version','263');
46
+
47
+ }
48
+ }
49
+ function commentluv_checkCheckbox( $theFieldname ){
50
+ if( get_option( $theFieldname ) == 'on'){
51
+ echo 'checked="true"';
52
+ }
53
+ }
54
+
55
+ // start post checks for reset and update
56
+ if ($_POST['submit']=='reset'){
57
+ update_option('cl_comment_text','[name]&#180;s last blog post..[lastpost]');
58
+ update_option('cl_default_on','TRUE');
59
+ update_option('cl_heart_tip','TRUE');
60
+ update_option('cl_style','border:2px solid #ffffff; display:block; padding:4px;');
61
+ update_option('cl_author_id','author');
62
+ update_option('cl_site_id','url');
63
+ update_option('cl_comment_id','comment');
64
+ update_option('cl_commentform_id','');
65
+ update_option('cl_badge','ACL88x31-white.gif');
66
+ update_option('cl_author_type','name');
67
+ update_option('cl_url_type','name');
68
+ update_option('cl_textarea_type','name');
69
+ update_option('cl_click_track','on');
70
+ update_option('cl_showtext','CommentLuv Enabled');
71
+ update_option('cl_reset','off');
72
+ update_option('cl_badge_pos','');
73
+ update_option('cl_prepend','');
74
+ update_option('cl_select_text','Choose a different post to show');
75
+ }
76
+
77
+ if ($_POST['Submit']==__('Update Options')){
78
+ update_option('cl_comment_text',$_POST['cl_comment_text']);
79
+ update_option('cl_select_text',$_POST['cl_select_text']);
80
+ update_option('cl_default_on',$_POST['cl_default_on']);
81
+ update_option('cl_heart_tip',$_POST['cl_heart_tip']);
82
+ update_option('cl_style',$_POST['cl_style']);
83
+ update_option('cl_author_type',$_POST['cl_author_type']);
84
+ update_option('cl_author_id',$_POST['cl_author_id']);
85
+ update_option('cl_url_type',$_POST['cl_site_id']);
86
+ update_option('cl_textarea_type',$_POST['cl_textarea_type']);
87
+ update_option('cl_comment_id',$_POST['cl_comment_id']);
88
+ update_option('cl_badge',$_POST['cl_badge']);
89
+ update_option('cl_showtext',$_POST['cl_showtext']);
90
+ update_option('cl_badge_pos',$_POST['cl_badge_pos']);
91
+ update_option('cl_prepend',$_POST['cl_prepend']);
92
+ update_option('cl_member_id',$_POST['cl_member_id']);
93
+ update_option('cl_click_track',$_POST['cl_click_track']);
94
+ }
95
+
96
+
97
+ ?>
98
+ <div class="wrap">
99
+
100
+ <form method="post" id="options">
101
+ <?php
102
+ if(function_exists('wpmu_create_blog'))
103
+ wp_nonce_field('commentluv-options');
104
+ else
105
+ wp_nonce_field('update-options');
106
+ ?>
107
+ <h2><?php _e('CommentLuv Wordpress Plugin','commentluv')?></h2>
108
+ <p><?php _e('This plugin takes the url from the comment form and tries to parse the feed of the site and display the last entry made','commentluv')?></p>
109
+ <p><?php _e('If you have any questions, comments or if you have a good idea that you would like to see in the next version of CommentLuv, please visit','commentluv')?> <a href="http://www.fiddyp.co.uk" target="_blank">FiddyP Blog</a> <?php _e('or','commentluv')?> <a href="http://www.fiddyp.co.uk/support/"><?php _e('support forum','commentluv')?></a> <?php _e('and let me know','commentluv')?>.</p>
110
+ <h3><?php _e('Options','commentluv')?></h3>
111
+ <p><?php _e('Enter the text you want displayed in the comment.','commentluv')?></p>
112
+ <table class="form-table">
113
+ <tr>
114
+ <td colspan="2">
115
+ <input class="form-table" name="cl_comment_text" value="<?php echo get_option('cl_comment_text');?>">
116
+ </td>
117
+ </tr>
118
+ <tr>
119
+ <td colspan="2">
120
+ <?php _e('Text displayed in the select box','commentluv');?>
121
+ <input class="form-table" name="cl_select_text" value="<?php echo get_option('cl_select_text');?>">
122
+ </td>
123
+ </tr>
124
+ <tr>
125
+ <td width="29%"><?php _e('Choose to have CommentLuv on by default?','commentluv')?></td>
126
+ <td width="71%"><select name="cl_default_on">
127
+ <option <?php if(get_option('cl_default_on')=="TRUE") {echo "selected=selected";}?> >TRUE</option>
128
+ <option <?php if(get_option('cl_default_on')=="FALSE") { echo "selected=selected";}?> >FALSE</option>
129
+ </select></td>
130
+ </tr>
131
+ <tr>
132
+ <td width="29%"><?php _e('Choose to have CommentLuv Info box?','commentluv')?></td>
133
+ <td width="71%"><select name="cl_heart_tip">
134
+ <option <?php if(get_option('cl_heart_tip')=="TRUE") {echo "selected=selected";}?> >TRUE</option>
135
+ <option <?php if(get_option('cl_heart_tip')=="FALSE") { echo "selected=selected";}?> >FALSE</option>
136
+ </select></td>
137
+ </tr>
138
+
139
+ </table>
140
+ <h3><?php _e('Styling')?></h3>
141
+ <p><?php _e('Wordpress doesn\'t allow a class to be applied to a paragraph in the comment area so we have to wrap the last blog post text in nested tags and apply styling to that instead.','commentluv')?></p>
142
+ <p><?php _e('Enter css styling to apply to comment','commentluv')?></strong> (<em><?php _e('inserted as','commentluv')?></em> &lt;style type="text/css"&gt;abbr em { border:2px; etc }&lt;/style&gt;)</p>
143
+ <table class="form-table">
144
+ <tr>
145
+ <td valign="top" colspan="2"><input class="form-table" name="cl_style" value="<?php echo get_option('cl_style');?>"></td>
146
+ </tr>
147
+ </table>
148
+ <h3><?php _e('Comment Form Identification','commentluv')?></h3>
149
+ <p><?php _e('Enter the ID or NAME value for the input fields on your comment form.','commentluv')?></p>
150
+ <p><?php _e('Check your comment form fields to see if they use ID= or NAME= and select the appropriate type below','commentluv')?><br/>
151
+ <?php _e('Visit CommentLuv.com if you need instructions','commentluv')?></p>
152
+ <table class="form-table">
153
+ <tr ><td colspan="3">These settings shouldn't need changing unless you use a non standard form.</td></tr>
154
+ <tr>
155
+ <td><?php _e('Authors Name field ID','commentluv')?></td>
156
+ <td><select name="cl_author_type">
157
+ <option <?php if(get_option('cl_author_type')=="ID" ){echo "selected=selected";}?> >ID</option>
158
+ <option <?php if(get_option('cl_author_type')=="name") {echo "selected=selected";}?> >name</option>
159
+ </td>
160
+ <td><input name="cl_author_id" value="<?php echo get_option('cl_author_id');?>"></td>
161
+ </tr>
162
+ <tr>
163
+ <td><?php _e('Authors URL field ID','commentluv')?></td>
164
+ <td><select name="cl_url_type">
165
+ <option <?php if(get_option('cl_url_type')=="ID") {echo "selected=selected";}?> >ID</option>
166
+ <option <?php if(get_option('cl_url_type')=="name") {echo "selected=selected";}?> >name</option>
167
+ </td>
168
+ <td><input name="cl_site_id" value="<?php echo get_option('cl_site_id');?>"></td>
169
+ </tr>
170
+ <tr>
171
+ <td><?php _e('Comment Text Area ID','commentluv')?></td>
172
+ <td><select name="cl_textarea_type">
173
+ <option <?php if(get_option('cl_textarea_type')=="ID") {echo "selected=selected";}?> >ID</option>
174
+ <option <?php if(get_option('cl_textarea_type')=="name" ){echo "selected=selected";}?> >name</option>
175
+ </td>
176
+ <td><input name="cl_comment_id" value="<?php echo get_option('cl_comment_id');?>"></td>
177
+ </tr>
178
+ </table>
179
+ <h3><?php _e('Display Badge','commentluv')?></h3>
180
+ <p>Many thanks to <a href="http://byteful.com">Byteful Traveller</a> for creating these images.</p>
181
+ <table class="form-table">
182
+ <tr>
183
+ <td><?php _e('Choose badge to display','commentluv')?> </td>
184
+ <?php $badge=get_option('cl_badge');?>
185
+ <td><label><input type="radio" <?php if($badge=="CL91x17-white.gif"){echo "checked ";}?> name="cl_badge" value="CL91x17-white.gif"><img src="<?php echo WP_PLUGIN_URL;?>/commentluv/CL91x17-white.gif"/></label></td>
186
+ <td><label><input type="radio" <?php if($badge=="CL91x17-black.gif"){echo "checked ";}?> name="cl_badge" value="CL91x17-black.gif"><img src="<?php echo WP_PLUGIN_URL;?>/commentluv/CL91x17-black.gif"/></label></td>
187
+ <td><label><input type="radio" <?php if($badge=="ACL88x31-white.gif"){echo "checked ";}?> name="cl_badge" value="ACL88x31-white.gif"><img src="<?php echo WP_PLUGIN_URL;?>/commentluv/ACL88x31-white.gif"/></label></td>
188
+ <td><label><input type="radio" <?php if($badge=="ACL88x31-black.gif"){echo "checked ";}?> name="cl_badge" value="ACL88x31-black.gif"><img src="<?php echo WP_PLUGIN_URL;?>/commentluv/ACL88x31-black.gif"/></label></td>
189
+ <td><label><input type="radio" <?php if($badge=="nothing.gif"){echo "checked ";}?> name="cl_badge" value="nothing.gif"><?php _e('Show nothing','commentluv')?></label></td>
190
+ </tr></table>
191
+ <table class="form-table">
192
+ <tr><td><label><input type="radio" <?php if($badge=="text"){echo "checked ";}?> name="cl_badge" value="text"><?php _e('Show text','commentluv')?></label> <input class="form-table" type="text" name="cl_showtext" value="<?php echo get_option('cl_showtext');?>"></input></td><td></td><td><label><?php _e('Append badge to (DIV or object ID) optional','commentluv')?><input class="form-table" type="text" name="cl_badge_pos" value="<?php echo get_option('cl_badge_pos');?>"></input></td><td></td><td><label><?php _e('Prepend html before badge or text (optional)','commentluv')?></label><input class="form-table" type="text" name="cl_prepend" value="<?php echo htmlspecialchars(get_option('cl_prepend'));?>"></input></tr>
193
+ </table>
194
+ <h3><?php _e('CommentLuv Member ID','commentluv')?></h3>
195
+ <p><?php _e('If you register your site for free at','commentluv')?> <a href="http://www.commentluv.com">CommentLuv.com</a> <?php _e('you will be able to open up lots of features that are for members only like link tracking so you can see which of the comments you make on CommentLuv blogs are getting the last blog post clicked. Do NOT enter a number if you do not have one','commentluv')?></p>
196
+ <table class="form-table">
197
+ <tr><td><?php _e('Your CommentLuv.com member ID','commentluv')?></td>
198
+ <td><input name="cl_member_id" value="<?php echo get_option('cl_member_id');?>"></td>
199
+ </tr>
200
+ <tr><td><?php _e('Enable click tracking?','commentluv')?></td>
201
+ <td><input type="checkbox" name="cl_click_track" <?php if(get_option('cl_click_track')=="on"){echo "checked";};?> /></td>
202
+ </tr>
203
+ </table>
204
+ <input type="hidden" name="page_options" value="cl_comment_text,cl_default_on,cl_style,cl_author_id,cl_site_id,cl_comment_id,cl_commentform_id,cl_badge,cl_member_id,cl_click_track,cl_form_type,cl_author_type,cl_url_type,cl_textarea_type,cl_reset,cl_showtext,cl_badge_pos,cl_prepend,cl_select_text,cl_heart_tip" />
205
+ <!-- //<input type="hidden" name="action" value="update" />
206
+ //<input type="hidden" name="option_page" value="commentluv" />-->
207
+ <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options') ?>" /></p>
208
+ <div style="float: right;"><?php _e('Reset to Default Settings','commentluv')?><input type="submit" name="submit" value="reset" onclick="if(confirm('<?php _e('Are you sure you want to reset your settings? Press OK to continue','commentluv')?>') == true) { return true; } else { return false; }"/></div>
209
+ </form>
210
+ <p>Andy Bailey<br/>
211
+ Fiddyp.co.uk
212
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
213
+ <input type="hidden" name="cmd" value="_donations">
214
+ <input type="hidden" name="business" value="admin@commentluv.com">
215
+ <input type="hidden" name="item_name" value="CommentLuv">
216
+ <input type="hidden" name="no_shipping" value="0">
217
+ <input type="hidden" name="no_note" value="1">
218
+ <input type="hidden" name="currency_code" value="USD">
219
+ <input type="hidden" name="tax" value="0">
220
+ <input type="hidden" name="lc" value="GB">
221
+ <input type="hidden" name="bn" value="PP-DonationsBF">
222
+ <input type="image" src="https://www.paypal.com/en_GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
223
+ <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
224
+ </form>
225
+
226
+ </div>
commentluv.php CHANGED
@@ -2,7 +2,7 @@
2
  Plugin Name: commentluv
3
  Plugin URI: http://www.commentluv.com/download/ajax-commentluv-installation/
4
  Description: Plugin to show a link to the last post from the commenters blog in their comment. Just activate and it's ready. Will parse a feed from most sites that have a feed location specified in its head html. See the <a href="options-general.php?page=commentluv">Settings Page</a> for styling and text output options.
5
- Version: 2.61
6
  Author: Andy Bailey
7
  Author URI: http://www.fiddyp.co.uk/
8
 
@@ -10,6 +10,8 @@ Author URI: http://www.fiddyp.co.uk/
10
  You can now edit the options from the dashboard
11
  *********************************************************************
12
  updates:
 
 
13
  2.6.1 - 21 Dec 08 - add intense debate
14
  2.6 - 6 dec 08 - separate settings page. compatibility with 2.7
15
  21 nov 08 - use new javascript so set form field values as just the names instead of [textarea[name='comment'] just use comment
@@ -306,7 +308,7 @@ function cl_style_script(){
306
 
307
  // start the javascript output
308
  if(is_single()) {
309
- echo '<!-- Styling and script added by commentluv 2.61 http://www.commentluv.com -->';
310
 
311
  echo '<style type="text/css">abbr em{'.get_option('cl_style').'} #lastposts { width: 300px; } </style>';
312
  echo "\n<script type=\"text/javascript\" src=\"".WP_PLUGIN_URL."/commentluv/js/commentluv";
2
  Plugin Name: commentluv
3
  Plugin URI: http://www.commentluv.com/download/ajax-commentluv-installation/
4
  Description: Plugin to show a link to the last post from the commenters blog in their comment. Just activate and it's ready. Will parse a feed from most sites that have a feed location specified in its head html. See the <a href="options-general.php?page=commentluv">Settings Page</a> for styling and text output options.
5
+ Version: 2.6.3
6
  Author: Andy Bailey
7
  Author URI: http://www.fiddyp.co.uk/
8
 
10
  You can now edit the options from the dashboard
11
  *********************************************************************
12
  updates:
13
+ 2.6.3 - 5 jan 09 - fix for intense debate. pointed to by http://dannybrown.me
14
+ 2.6.2 - 26 dec 08 minor bug with update to codex
15
  2.6.1 - 21 Dec 08 - add intense debate
16
  2.6 - 6 dec 08 - separate settings page. compatibility with 2.7
17
  21 nov 08 - use new javascript so set form field values as just the names instead of [textarea[name='comment'] just use comment
308
 
309
  // start the javascript output
310
  if(is_single()) {
311
+ echo '<!-- Styling and script added by commentluv 2.63 http://www.commentluv.com -->';
312
 
313
  echo '<style type="text/css">abbr em{'.get_option('cl_style').'} #lastposts { width: 300px; } </style>';
314
  echo "\n<script type=\"text/javascript\" src=\"".WP_PLUGIN_URL."/commentluv/js/commentluv";
js/commentluvID.js ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery.noConflict();
2
+ function commentluv(cl_settings){
3
+ jQuery(document).ready(function() {
4
+ if(jQuery('.idc-c-m').is(":visible")){
5
+ parentformname = jQuery('#IDCommentNewThreadText').parents("form").attr("id");
6
+ if(cl_settings[0]==""){
7
+ cl_settings[0]=parentformname;
8
+ }
9
+ var cl_badge=cl_settings[7];
10
+ var checked=cl_settings[9];
11
+ // put clone of text area after label for url
12
+
13
+ if(jQuery('#IDCommentsNewThreadListItem1 a').attr("href").indexOf("people/0") > 0){
14
+ jQuery('label[for="txtURLNewThread"]').after(jQuery('#IDCommentNewThreadText').clone().attr({id:"CLIDCommentNewThreadText"}));
15
+ jQuery('#IDCommentNewThreadText').hide();
16
+ }
17
+ jQuery('#IDCommentsNewThreadListLinkl a').change(function(){
18
+ jQuery('#IDCommentNewThreadText').show();
19
+ });
20
+ // add the commentluv pull down box and gubbins
21
+ jQuery('#CLIDCommentNewThreadText').after(cl_settings[12]+'<div id="mylastpostbox"><div style="float:left"><input type="checkbox" id="luv" '+cl_settings[9]+'/></div><div style="float:left"><span id="mylastpost" style="clear: both"><a href="http://www.commentluv.com">'+cl_badge+'</a></span>' + '<br/><select name="lastposts" id="lastposts"></select></div></div>');
22
+ //hide the gubbins
23
+ jQuery('#lastposts').hide();
24
+ jQuery('#CLIDCommentNewThreadText').show();
25
+ // click tracking
26
+ if(cl_settings[10]=="1"){
27
+ var cl_member_id=cl_settings[14];
28
+ var cl_version=cl_settings[15];
29
+ jQuery('.idc-c-t em a').click(function(){
30
+ var url=jQuery(this).attr('href');
31
+ var thelinkobj=jQuery(this);
32
+ jQuery(thelinkobj).attr('target','_blank');
33
+ var addit=url + "&cl_member_id=" + cl_member_id + "&callback=?";
34
+ var clurl="http://www.commentluv.com/commentluvinc/ajaxcl_click821.php?url=" + addit;
35
+ jQuery.getJSON(clurl,function(data) {
36
+ jQuery.each(data.msg,function(i,item) {
37
+ jQuery(thelinkobj).text(data.msg[i].text + jQuery(thelinkobj).text());})
38
+ return true;
39
+ });
40
+ });
41
+ }
42
+ // event to wait for to fire fetch of posts
43
+ jQuery('#CLIDCommentNewThreadText').focus(function(){
44
+ cl_dostuff(cl_settings);
45
+ });
46
+ // event for submit form
47
+ jQuery('#IDNewThreadSubmitLI').click(function(){
48
+ cl_addstuff();
49
+ });
50
+ jQuery('#lastposts').change(function(){
51
+ jQuery('option').remove(":contains('"+cl_settings[5]+"'");
52
+ var url = jQuery(this).val();
53
+ var title = jQuery('#lastposts option:selected').text();
54
+ jQuery('#mylastpost a').replaceWith('<a href="' + url + '">' + title + '</a>');
55
+ jQuery('#cl_post').val('<a href="' + url + '">' + title + '</a>');
56
+ });
57
+ jQuery('#luv').click(function(){
58
+ if(jQuery(this).is(":checked")){
59
+ // was unchecked, now is checked
60
+ jQuery('#cl_post').val(jQuery('#mylastpost abbr em').html());
61
+ jQuery('#lastposts').attr("disabled", false);
62
+ jQuery('#mylastpost abbr em').fadeTo("slow", 1);
63
+
64
+ } else {
65
+ // was checked, user unchecked it so empty hidden field in form
66
+ jQuery('#cl_post').val("");
67
+ jQuery('#lastposts').attr("disabled", true);
68
+ jQuery('#mylastpost abbr em').fadeTo("slow", 0.33);
69
+ }
70
+ });
71
+
72
+ function cl_dostuff(cl_settings){
73
+ var check=jQuery('#IDCommentsNewThreadListItem1 a').attr("href").indexOf("people/0");
74
+ if(check > 0){
75
+ // not logged in to intense debate so set check to url field
76
+ check = jQuery('#txtURLNewThread').val();
77
+ } else {
78
+ // is logged in using Intense username
79
+ check=jQuery('#IDCommentsNewThreadListItem1 a').attr("href");
80
+ }
81
+ // return if no url or checkbox is unticked or is admin
82
+ if(!check || !jQuery('#luv').is(":checked") ) { return } //|| cl_settings[13]
83
+ var xyz=check;
84
+ var name=jQuery('#IDCommentsNewThreadListItem1 a').text();
85
+ var url="http://www.commentluv.com/commentluvinc/ajaxcl8254.php?url="+xyz+"&version=" + cl_version +"&callback=?";
86
+ jQuery.getJSON(url,function(data){
87
+ jQuery('#lastposts').empty();
88
+ jQuery.each(data.links, function(i,item){
89
+ jQuery('#lastposts').append('<option value="'+data.links[i].url+'">'+data.links[i].title+'</option>');
90
+ });
91
+ jQuery('#lastposts').append('<option value="0" selected=selected>'+cl_settings[5]+'</option>');
92
+ jQuery('#lastposts').fadeIn(1000);
93
+ jQuery('#mylastpost').html('<em><a href="' + data.links[0].url + '">' + data.links[0].title + '</a></em>').fadeIn(1000);
94
+ if(jQuery('#luv').is(":checked")){
95
+ jQuery('#cl_post').val('<a href="' + data.links[0].url + '">' + data.links[0].title + '</a>');
96
+ }
97
+ });
98
+ jQuery('#txtURLNewThread').change(function(){
99
+ if(jQuery('#luv').is(":checked") && jQuery('#cl_post').val()!=""){
100
+ jQuery('#lastposts').empty();
101
+ cl_dostuff(cl_settings);
102
+ }
103
+ });
104
+ jQuery('#CLIDCommentNewThreadText').unbind();
105
+ }
106
+
107
+ function cl_addstuff(){
108
+ if(jQuery('#mylastpost a').attr("href").indexOf("commentluv.com/error") < 0 && jQuery('.idc-c-m').is(":visible")){
109
+ jQuery('#IDCommentNewThreadText').val(jQuery('#CLIDCommentNewThreadText').val() + "\n\n<em>" + jQuery('#txtNameNewThread').val() + "'s Recent post..." + jQuery('#mylastpost em').html());
110
+ } else {
111
+ jQuery('#IDCommentNewThreadText').val(jQuery('#CLIDCommentNewThreadText').val());
112
+ }
113
+ jQuery('#CLIDCommentNewThreadText').hide();
114
+ jQuery('#mylastpostbox').hide();
115
+ jQuery('#IDCommentNewThreadText').show();
116
+ }
117
+ }})
118
+ }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Andy Bailey
3
  Tags: comments, linkluv
4
  Requires at least: 2.5
5
  Tested up to: 2.7
6
- Stable tag: 2.5.4
7
 
8
  Appends a titled link using AJAX to the authors last blog post on their comment giving back some luv to the people that join your discussion. Compatible with logged on users and Wordpress MU. Visit CommentLuv.com for detailed instructions on features.
9
 
3
  Tags: comments, linkluv
4
  Requires at least: 2.5
5
  Tested up to: 2.7
6
+ Stable tag: 2.6.3
7
 
8
  Appends a titled link using AJAX to the authors last blog post on their comment giving back some luv to the people that join your discussion. Compatible with logged on users and Wordpress MU. Visit CommentLuv.com for detailed instructions on features.
9