CommentLuv - Version 1.0

Version Description

Download this release

Release Info

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

Code changes from version 2.6.5 to 1.0

ACL88x31-black.gif DELETED
Binary file
ACL88x31-white.gif DELETED
Binary file
CL91x17-black.gif DELETED
Binary file
CL91x17-white.gif DELETED
Binary file
README.txt ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === WP Twitip ID ===
2
+ Tags: twitter, tweet, integration, comment,
3
+ Contributors: @commentluv(coding), @styletime(beta testing), @problogger(inspiration), @saphod(update_options), @clearskynet(db table creation)
4
+ Requires at least: 2.6.3
5
+ Tested up to: 2.7
6
+ Stable tag: 1.0
7
+
8
+ WP Twitip ID adds a field to the comment form for a user to add their twitter username. Once published, their comment will display a link to follow them on twitter wherever you want by adding a line to your themes' comments.php
9
+
10
+ == Details ==
11
+
12
+ WP Twitip ID functionality:
13
+
14
+ * Adds an extra field to the comment form for user to enter their twitter username
15
+ * Echo out the twitter id associated with the comment being displayed
16
+ * Echo out a html link pointing to the users twitter page using "Click Here To Follow Me On Twitter"
17
+ * Display link as an image
18
+ * Ouput just the @ username
19
+ * Return the twitter id as a variable to be used by php
20
+ * Automatically display Twitter: @username
21
+ * Display html before the extra field
22
+ * Display html after the extra field
23
+ * Add a class name to the extra field
24
+ * disable javascript field addition for manual form editing
25
+
26
+
27
+ == Installation ==
28
+
29
+ 1. Download the plugin archive and expand it (you've likely already done this).
30
+ 2. Put the 'wp-twitip-id' folder and all files inside into your wp-content/plugins/ directory.
31
+ 3. Go to the Plugins page in your WordPress Administration area and click 'Activate' for WP Twitip ID.
32
+ 4. Go to the WP Twitip ID Options page (Settings > WP Twitip ID) to set where you want the field to appear (defaults to after the url field) and add your chosen anchor text or image url
33
+
34
+
35
+ == Configuration ==
36
+
37
+ Put field after object ID
38
+ Enter the ID of the field or object that you want the extra field to be displayed after
39
+ defaults to url
40
+
41
+ Labels are before fields?
42
+ If your comments.php file puts the label before the field check this box
43
+ defaults to off
44
+
45
+ Don't use Javascript
46
+ If you edit your comments.php file and add a field manually, you need to select this (manual adding requires field to have name="atf_twitter_id")
47
+ defaults to off
48
+
49
+ HTML before field
50
+ Custom html you want to add before the field is added
51
+ defaults to <br/>
52
+
53
+ HTML after Field
54
+ Custom html you want to add after the field is added
55
+ defaults to <br/><label for="atf_twitter_id">Twitter ID</label>
56
+ (if you check labels are before fields, you can enter this html into the html before field
57
+
58
+ Field class
59
+ the class you want to apply to the field
60
+ defaults to textarea
61
+
62
+ Twitter Image URI
63
+ Image url for image output
64
+
65
+ Twitter anchor text
66
+ Text to display in link for text output
67
+
68
+ == Adding to your template ==
69
+
70
+ Open your themes comments.php file and add this line
71
+ if(function_exists(wp_twitip_id_show)) {
72
+ wp_twitip_id_show("auto");
73
+ }
74
+
75
+ You can use "image" or "text" or "user"
76
+
77
+ "image" = show linked image using image url in settings page
78
+ "text" = show text link using anchor text in settings page
79
+ "user" = show just the @username
80
+ "return" = return the twitter id as a variable for use in custom php
81
+ "auto" = show Twitter: @commentluv in a span with class twitter_id
82
+
83
+ example:
84
+ within the comments loop (foreach($comments as $comment)) I put this below the date output in comments.php
85
+ <?php if(function_exists(wp_twitip_id_show)) {
86
+ wp_twitip_id_show("auto");
87
+ }?>
88
+
89
+ "return" = return the twitter id to be used as a variable
90
+ example:
91
+ <?php if(function_exists(wp_twitip_id_show)) {
92
+ $twitter=wp_twitip_id_show("return");
93
+ if($twitter){
94
+ // has a twitter id
95
+ ?>I has a <a href="http://twitter.com/<?php echo $twitter;?>">Twitter Account</a>
96
+ <?php }
97
+
98
+
99
+ == Frequently Asked Questions ==
100
+
101
+ = The added field doesn't look like the others on the form =
102
+ Inspect the html of your form and see what class has been applied to the field and use that value in the settings page under "field class"
103
+
104
+ = No field is being added =
105
+ Make sure there are no carriage returns (new line breaks) in the code for html before and after field in the settings page
106
+
107
+ = Can it work with logged on users? =
108
+ Yes, as long as they comment at least once and add their ID to the field whilst logged out.
109
+
110
+ = I was using the beta and now all the previous comments have lost their twitter link =
111
+ The beta version saved the values differently. As long as the person makes another comment and add their ID then all comments by them using that email will be updated.
112
+
113
+ = Do I have to use javascript to add the field? =
114
+ No. You can manually add the field to your comment form and select the checkbox on the settings page to not use javascript. (the field needs to have name="atf_twitter_id")
115
+
116
+ = Anything else? =
117
+
118
+ Hope you enjoy this plugin!
119
+
120
+ --Andy Bailey
121
+
122
+ http://www.fiddyp.co.uk
commentluv-manager.php DELETED
@@ -1,207 +0,0 @@
1
- <?php
2
- // fixed up to 2.6.5
3
- if ( ! defined( 'WP_PLUGIN_URL' ) )
4
- define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' );
5
- $commentluvdirectory = WP_PLUGIN_URL . '/' . dirname( plugin_basename(__FILE__) );
6
- commentluv_alter_whitelist_options("");
7
- // Add a new submenu under Options:
8
- commentluv_activation();
9
- add_options_page('CommentLuv', 'CommentLuv', 8, 'commentluv', 'cl_options_page');
10
- add_option('cl_comment_text','[name]&#8217;s last blog post..[lastpost]');
11
- add_option('cl_default_on','TRUE');
12
- add_option('cl_heart_tip','TRUE');
13
- add_option('cl_style','border:1px solid #ffffff; background-color: #eeeeee; display:block; padding:4px;');
14
- add_option('cl_author_id','author');
15
- add_option('cl_site_id','url');
16
- add_option('cl_comment_id','comment');
17
- add_option('cl_commentform_id','#commentform');
18
- add_option('cl_badge','ACL88x31-white.gif');
19
- add_option('cl_member_id','');
20
- add_option('cl_click_track','on');
21
- add_option('cl_showtext','CommentLuv Enabled');
22
- add_option('cl_badge_pos','');
23
- add_option('cl_prepend','');
24
- add_option('cl_version','265');
25
- add_option('cl_select_text','choose a different post to show');
26
- add_option('cl_intense','off');
27
- // Pre-2.6 compatibility
28
- if ( ! defined( 'WP_CONTENT_URL' ) )
29
- define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' );
30
- if ( ! defined( 'WP_CONTENT_DIR' ) )
31
- define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
32
- if ( ! defined( 'WP_PLUGIN_URL' ) )
33
- define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' );
34
- if ( ! defined( 'WP_PLUGIN_DIR' ) )
35
- define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
36
- commentluv_setup();
37
-
38
- // start functions
39
- function commentluv_activation(){
40
- // set version for future releases if they need to change a value
41
- $version=get_option('cl_version');
42
- if($version<265){
43
- update_option('cl_version','265');
44
-
45
- }
46
- }
47
- function commentluv_checkCheckbox( $theFieldname ){
48
- if( get_option( $theFieldname ) == 'on'){
49
- echo 'checked="true"';
50
- }
51
- }
52
-
53
- // start post checks for reset and update
54
- if ($_POST['submit']=='reset'){
55
- update_option('cl_comment_text','[name]&#180;s last blog post..[lastpost]');
56
- update_option('cl_default_on','TRUE');
57
- update_option('cl_heart_tip','TRUE');
58
- update_option('cl_style','border:2px solid #ffffff; display:block; padding:4px;');
59
- update_option('cl_author_id','author');
60
- update_option('cl_site_id','url');
61
- update_option('cl_comment_id','comment');
62
- update_option('cl_commentform_id','');
63
- update_option('cl_badge','ACL88x31-white.gif');
64
- update_option('cl_click_track','on');
65
- update_option('cl_showtext','CommentLuv Enabled');
66
- update_option('cl_reset','off');
67
- update_option('cl_badge_pos','');
68
- update_option('cl_prepend','');
69
- update_option('cl_select_text','Choose a different post to show');
70
- }
71
-
72
- if ($_POST['Submit']==__('Update Options')){
73
- update_option('cl_comment_text',$_POST['cl_comment_text']);
74
- update_option('cl_select_text',$_POST['cl_select_text']);
75
- update_option('cl_default_on',$_POST['cl_default_on']);
76
- update_option('cl_heart_tip',$_POST['cl_heart_tip']);
77
- update_option('cl_style',$_POST['cl_style']);
78
- update_option('cl_author_id',$_POST['cl_author_id']);
79
- update_option('cl_site_id',$_POST['cl_site_id']);
80
- update_option('cl_comment_id',$_POST['cl_comment_id']);
81
- update_option('cl_badge',$_POST['cl_badge']);
82
- update_option('cl_showtext',$_POST['cl_showtext']);
83
- update_option('cl_badge_pos',$_POST['cl_badge_pos']);
84
- update_option('cl_prepend',$_POST['cl_prepend']);
85
- update_option('cl_member_id',$_POST['cl_member_id']);
86
- update_option('cl_click_track',$_POST['cl_click_track']);
87
- }
88
-
89
-
90
- ?>
91
- <div class="wrap">
92
-
93
- <form method="post" id="options">
94
- <?php
95
- if(function_exists('wpmu_create_blog'))
96
- wp_nonce_field('commentluv-options');
97
- else
98
- wp_nonce_field('update-options');
99
- ?>
100
- <h2><?php _e('CommentLuv Wordpress Plugin','commentluv')?></h2>
101
- <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>
102
- <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>
103
- <h3><?php _e('Options','commentluv')?></h3>
104
- <p><?php _e('Enter the text you want displayed in the comment.','commentluv')?></p>
105
- <table class="form-table">
106
- <tr>
107
- <td colspan="2">
108
- <input class="form-table" name="cl_comment_text" value="<?php echo get_option('cl_comment_text');?>">
109
- </td>
110
- </tr>
111
- <tr>
112
- <td colspan="2">
113
- <?php _e('Text displayed in the select box','commentluv');?>
114
- <input class="form-table" name="cl_select_text" value="<?php echo get_option('cl_select_text');?>">
115
- </td>
116
- </tr>
117
- <tr>
118
- <td width="29%"><?php _e('Choose to have CommentLuv on by default?','commentluv')?></td>
119
- <td width="71%"><select name="cl_default_on">
120
- <option <?php if(get_option('cl_default_on')=="TRUE") {echo "selected=selected";}?> >TRUE</option>
121
- <option <?php if(get_option('cl_default_on')=="FALSE") { echo "selected=selected";}?> >FALSE</option>
122
- </select></td>
123
- </tr>
124
- <tr>
125
- <td width="29%"><?php _e('Choose to have CommentLuv Info box?','commentluv')?></td>
126
- <td width="71%"><select name="cl_heart_tip">
127
- <option <?php if(get_option('cl_heart_tip')=="TRUE") {echo "selected=selected";}?> >TRUE</option>
128
- <option <?php if(get_option('cl_heart_tip')=="FALSE") { echo "selected=selected";}?> >FALSE</option>
129
- </select></td>
130
- </tr>
131
-
132
- </table>
133
- <h3><?php _e('Styling')?></h3>
134
- <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>
135
- <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>
136
- <table class="form-table">
137
- <tr>
138
- <td valign="top" colspan="2"><input class="form-table" name="cl_style" value="<?php echo get_option('cl_style');?>"></td>
139
- </tr>
140
- </table>
141
- <h3><?php _e('Comment Form Identification','commentluv')?></h3>
142
- <p><?php _e('Enter the ID or NAME value for the input fields on your comment form.','commentluv')?></p>
143
- <p><?php _e('Check your comment form fields to see if they use ID= or NAME= and select the appropriate type below','commentluv')?><br/>
144
- <?php _e('Visit CommentLuv.com if you need instructions','commentluv')?></p>
145
- <table class="form-table">
146
- <tr ><td colspan="3">These settings shouldn't need changing unless you use a non standard form.</td></tr>
147
- <tr>
148
- <td><?php _e('Authors Name field name','commentluv')?></td>
149
- <td><input name="cl_author_id" value="<?php echo get_option('cl_author_id');?>"></td>
150
- </tr>
151
- <tr>
152
- <td><?php _e('Authors URL field name','commentluv')?></td>
153
- <td><input name="cl_site_id" value="<?php echo get_option('cl_site_id');?>"></td>
154
- </tr>
155
- <tr>
156
- <td><?php _e('Comment Text Area name','commentluv')?></td>
157
- <td><input name="cl_comment_id" value="<?php echo get_option('cl_comment_id');?>"></td>
158
- </tr>
159
- </table>
160
- <h3><?php _e('Display Badge','commentluv')?></h3>
161
- <p>Many thanks to <a href="http://byteful.com">Byteful Traveller</a> for creating these images.</p>
162
- <table class="form-table">
163
- <tr>
164
- <td><?php _e('Choose badge to display','commentluv')?> </td>
165
- <?php $badge=get_option('cl_badge');?>
166
- <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>
167
- <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>
168
- <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>
169
- <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>
170
- <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>
171
- </tr></table>
172
- <table class="form-table">
173
- <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>
174
- </table>
175
- <h3><?php _e('CommentLuv Member ID','commentluv')?></h3>
176
- <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>
177
- <table class="form-table">
178
- <tr><td><?php _e('Your CommentLuv.com member ID','commentluv')?></td>
179
- <td><input name="cl_member_id" value="<?php echo get_option('cl_member_id');?>"></td>
180
- </tr>
181
- <tr><td><?php _e('Enable click tracking?','commentluv')?></td>
182
- <td><input type="checkbox" name="cl_click_track" <?php if(get_option('cl_click_track')=="on"){echo "checked";};?> /></td>
183
- </tr>
184
- </table>
185
- <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_reset,cl_showtext,cl_badge_pos,cl_prepend,cl_select_text,cl_heart_tip" />
186
- <!-- //<input type="hidden" name="action" value="update" />
187
- //<input type="hidden" name="option_page" value="commentluv" />-->
188
- <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options') ?>" /></p>
189
- <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>
190
- </form>
191
- <p>Andy Bailey<br/>
192
- Fiddyp.co.uk
193
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
194
- <input type="hidden" name="cmd" value="_donations">
195
- <input type="hidden" name="business" value="admin@commentluv.com">
196
- <input type="hidden" name="item_name" value="CommentLuv">
197
- <input type="hidden" name="no_shipping" value="0">
198
- <input type="hidden" name="no_note" value="1">
199
- <input type="hidden" name="currency_code" value="USD">
200
- <input type="hidden" name="tax" value="0">
201
- <input type="hidden" name="lc" value="GB">
202
- <input type="hidden" name="bn" value="PP-DonationsBF">
203
- <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.">
204
- <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
205
- </form>
206
-
207
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
commentluv-pt_PT.mo DELETED
Binary file
commentluv-pt_PT.po DELETED
@@ -1,217 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: CommentLuv 2.0\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2009-01-15 13:02-0000\n"
6
- "PO-Revision-Date: \n"
7
- "Last-Translator: Andy Bailey <andy@teamplaylotto.com>\n"
8
- "Language-Team: <andy@teamplaylotto.com>\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-Language: English\n"
13
- "X-Poedit-Country: UNITED KINGDOM\n"
14
- "X-Poedit-KeywordsList: __;_e\n"
15
- "X-Poedit-Basepath: .\n"
16
- "X-Poedit-SearchPath-0: C:\\xampp\\htdocs\\wordpress\\wp-content\\plugins\\commentluv\n"
17
-
18
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:77
19
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:208
20
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:531
21
- msgid "Update Options"
22
- msgstr "Actualizar Op&ccedil;&otilde;es"
23
-
24
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:108
25
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:430
26
- msgid "CommentLuv Wordpress Plugin"
27
- msgstr "CommentLuv Wordpress Plugin"
28
-
29
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:109
30
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:431
31
- msgid "This plugin takes the url from the comment form and tries to parse the feed of the site and display the last entry made"
32
- msgstr "Este plugin insere um link para o &uacute;ltimo artigo do url inserido no formul&aacute;rio dos coment&aacute;rios"
33
-
34
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:110
35
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:432
36
- msgid "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"
37
- msgstr "Se tens alguma d&uacute;vida, coment&aacute;rios ou sugest&atilde;o, por favor visita"
38
-
39
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:110
40
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:432
41
- msgid "or"
42
- msgstr "ou"
43
-
44
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:110
45
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:432
46
- msgid "support forum"
47
- msgstr "f&oacute;rum de suporte"
48
-
49
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:110
50
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:432
51
- msgid "and let me know"
52
- msgstr "avisa-me"
53
-
54
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:111
55
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:433
56
- msgid "Options"
57
- msgstr "Op&ccedil;&otilde;es"
58
-
59
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:112
60
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:434
61
- msgid "Enter the text you want displayed in the comment."
62
- msgstr "Introduz o texto que ir&aacute; aparecer no coment&aacute;rio."
63
-
64
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:121
65
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:443
66
- msgid "Text displayed in the select box"
67
- msgstr ""
68
-
69
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:126
70
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:448
71
- msgid "Choose to have CommentLuv on by default?"
72
- msgstr "Deseja ter o CommentLuv activo por defeito?"
73
-
74
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:133
75
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:455
76
- #, fuzzy
77
- msgid "Choose to have CommentLuv Info box?"
78
- msgstr "Deseja ter o CommentLuv activo por defeito?"
79
-
80
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:141
81
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:462
82
- msgid "Styling"
83
- msgstr "Estilo"
84
-
85
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:142
86
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:463
87
- msgid "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."
88
- msgstr "O Wordpress n&atilde;o permite que a uma class seja aplicado um par&aacute;grafo no &agrave;rea dos coment&aacute;rios, ent&atilde;o &eacute; necess&aacute;rio passar o &uacute;ltimo artigo para tags e aplicar os estilo."
89
-
90
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:143
91
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:464
92
- msgid "Enter css styling to apply to comment"
93
- msgstr "Introduza o estilo css para o coment&aacute;rio"
94
-
95
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:143
96
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:464
97
- msgid "inserted as"
98
- msgstr "inserido como"
99
-
100
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:149
101
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:470
102
- msgid "Comment Form Identification"
103
- msgstr "Formul&aacute;rio de Identifica&ccedil;&atilde;o do Coment&aacute;rio"
104
-
105
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:150
106
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:471
107
- msgid "Enter the ID or NAME value for the input fields on your comment form."
108
- msgstr "Introduza o ID ou o Nome para os campos de entrada do seu formul&aacute;rio de coment&aacute;rios."
109
-
110
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:151
111
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:472
112
- #, fuzzy
113
- msgid "Check your comment form fields to see if they use ID= or NAME= and select the appropriate type below"
114
- msgstr "Verifique os campos do formul&aacute;rio de coment&aacute;rios para ter a certeza que eles usam ID= ou NAME= e seleccione o tipo apropriado abaixo"
115
-
116
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:152
117
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:473
118
- msgid "Visit CommentLuv.com if you need instructions"
119
- msgstr "Visite CommentLuv.com se necessitar de instru&ccedil;&otilde;es"
120
-
121
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:156
122
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:478
123
- msgid "Authors Name field ID"
124
- msgstr "ID do campo do Nome"
125
-
126
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:164
127
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:486
128
- msgid "Authors URL field ID"
129
- msgstr "ID do campo do URL"
130
-
131
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:172
132
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:494
133
- msgid "Comment Text Area ID"
134
- msgstr "ID da &agrave;rea de texto do coment&aacute;rio"
135
-
136
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:180
137
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:502
138
- msgid "Display Badge"
139
- msgstr "Mostrar Logo"
140
-
141
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:184
142
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:506
143
- msgid "Choose badge to display"
144
- msgstr "Escolher logo"
145
-
146
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:190
147
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:512
148
- msgid "Show nothing"
149
- msgstr ""
150
-
151
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:193
152
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:515
153
- msgid "Show text"
154
- msgstr ""
155
-
156
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:193
157
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:515
158
- msgid "Append badge to (DIV or object ID) optional"
159
- msgstr ""
160
-
161
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:193
162
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:515
163
- msgid "Prepend html before badge or text (optional)"
164
- msgstr ""
165
-
166
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:195
167
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:517
168
- msgid "CommentLuv Member ID"
169
- msgstr "ID de membro do CommentLuv"
170
-
171
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:196
172
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:518
173
- msgid "If you register your site for free at"
174
- msgstr "Se registares o teu site gratuitamente em"
175
-
176
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:196
177
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:518
178
- msgid "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"
179
- msgstr "ter&aacute;s a possibilidade de ter mais funcionalidades que s&atilde;o exclusivas a membros como rastrear os links dos coment&aacute;rios que fez em blogs que utilizam o CommentLuv. N&Atilde;O introduzas um n&uacute;mero se n&atilde;o tiveres um"
180
-
181
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:198
182
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:520
183
- msgid "Your CommentLuv.com member ID"
184
- msgstr "O teu ID de membro do CommentLuv.com"
185
-
186
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:201
187
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:523
188
- msgid "Enable click tracking?"
189
- msgstr ""
190
-
191
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:209
192
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:530
193
- msgid "Reset to Default Settings"
194
- msgstr ""
195
-
196
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:209
197
- msgid "Are you sure you want to reset your settings? Press OK to continue"
198
- msgstr ""
199
-
200
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv.php:160
201
- #, fuzzy
202
- msgid "Settings"
203
- msgstr "Estilo"
204
-
205
- #~ msgid "Do Not Show"
206
- #~ msgstr "N&atilde;o Mostrar"
207
- #~ msgid "Click to choose a different post to show"
208
- #~ msgstr "Clicar para mostrar um artigo diferente"
209
- #~ msgid "Comment Form ID"
210
- #~ msgstr "ID do Formul&aacute;rio de Coment&aacute;rios"
211
- #~ msgid "Enable click tracking? (experimental for registered members)"
212
- #~ msgstr "Activar rastreio de links? (apenas para utilizadores registados)"
213
- #~ msgid "do NOT use single quotes"
214
- #~ msgstr "N&Atilde;O usar plicas"
215
- #~ msgid "or double quotes"
216
- #~ msgstr "ou aspas"
217
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
commentluv.mo DELETED
Binary file
commentluv.php DELETED
@@ -1,379 +0,0 @@
1
- <?php /*
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.5
6
- Author: Andy Bailey
7
- Author URI: http://www.fiddyp.co.uk/
8
-
9
- *********************************************************************
10
- You can now edit the options from the dashboard
11
- *********************************************************************
12
- updates:
13
- 2.6.5 - 16 jan 09 - magic fix for updates on dashboard.
14
- 2.6.4 - 15 jan 09 - removed name/id pull down boxes. now use only name value (all fields have a name value by default)
15
- 2.6.3 - 5 jan 09 - fix for intense debate. pointed to by http://dannybrown.me
16
- 2.6.2 - 26 dec 08 minor bug with update to codex
17
- 2.6.1 - 21 Dec 08 - add intense debate
18
- 2.6 - 6 dec 08 - separate settings page. compatibility with 2.7
19
- 21 nov 08 - use new javascript so set form field values as just the names instead of [textarea[name='comment'] just use comment
20
- 2.5.5 - 31 oct 08 - add function for wp_prototype_before_jquery for added compatibility
21
- 2.5.4 - 6 oct 08 - changed included tip.php so it has curl too. added version number to url for easier remote file functions. and changed commentluv.js to prevent
22
- double firing of cl_dostuff (Marco Luthe from http://www.saphod.net/ (is a geek!))
23
- changed tip.php so it can work with curl or iframe so everyone can use it. thanks espen from http://www.espeniversen.com/ for testing
24
- 2.5.3 - fix for clicktracking off. needs quotes around the 1 too! prettied up default styling for abbr em and fixed an error with click tracking not adding member id by moving the click function to inline with commentluv.js
25
- 2.5.2 - 4 oct 08 - oh dear silly me, forgot to enclose an ==TRUE with quotes. (line 302) heart info box now can be switched off. thanks Ute from http://www.utes-dezines.de for you feedback.
26
- 2.5.1 - fix for pesky IE and Chrome
27
- 2.5 2nd oct 08 - fix for the people that can rtfm and added checkbox for traditonal users to be happy. show badge but no action for admin (again for the !rtfm's)
28
- 2.2 1st Oct 08 - the big fat update! fix all images for WP2.5 - 2.5.2 and added the luvheart info box option and made ready for luvcontests..
29
- 2.1.7 28/9/8 change defaults from ID to name as that seems to be more prevalant in themes. Added constants compatibility to admin function
30
- added sanitize function for troublesome special characters in text output
31
- 2.1.6 27/9/8 make compatible for less that wp 2.5.1
32
- 2.1.5 25/9/8 do the features ever stop?? Marco says we should had some option for html to be added before button and delete old selects if change url. done!
33
- also I am a dumbo for using wp_enqueue_script in the function called by wp_head, it should be before that. so sorry everyone! (retiredat47.com)
34
- 2.1.4 25/9/8 enqueue script and give choice to place button where someone wants it thanks Marco! http://www.saphod.net/
35
- 2.1.3 24/9/8 fix for older than 2.6 to use wp_plugin_dir and remove quick fix for imwithjoe (it was the ID's joe!)
36
- and make inline javascript valid xhtml. Validates!
37
- 2.1.2 24/9/8 Allow user to choose no image or use text instead. Try to run cl_dostuff if url field already filled (fix for imwithjoe.com)
38
- 2.11 23/9/8 Use better constant to specify image url in javascript (http://indigospot.com) and moved button to below comment text area
39
- 2.1 23/9/8 Change to final remote file location and updated readme and download pages
40
- 2.0b r13 - 22/9/8 logged on users now can get luv (missed out URL field ID doh!) www.macbrosplace.com
41
- 2.0b r12 - 21/9/8 remove onsubmit event from jquery script and leave it to wordpress to insert the value. Have to
42
- add one more filter hook for the pre-comment save and do all the fandanglery there. (issue reported by http://www.macbrosplace.com)
43
- 2.0b r11 - 20/9/8 ooh, I put in click tracking for admin if it is enabled
44
- 2.0b r11 - 20/9/8 add text to options page and apostrophe junkies fix (http://weblog.biznz.net) :-)
45
- 2.0b r10 - 16/9/8 new remote files for compatible click tracking and remote fetching
46
- 2.0b r9 - 15/9/8 adjust form so user can choose between ID or name for their comment form fields (thanks ovidiu! http://zice.ro)
47
- 2.0b r8 - 14/9/8 compatible with brians threaded comments. (override submit function so it activates addthelink()
48
- 2.0b r7 - 13/9/8 much better way for the link to be added to the textarea. Also dont add if there is an existing last blog post in the text area
49
- 2.0b r6 - 13/9/8 fixed for blank url. made click tracking optional and added warning to settings page about using ID only
50
- 2.0b r5 - 11/9/8 field for verification or site id code, tracking of links, new remote acl script, message on error
51
- 2.0b r4 - 10/9/8 Changed code slightly to allow tracking of commentluv links. Updated text output option if plugin is less than version 204
52
- 2.0b r4 - 9/9/8 added more style to head to make select box 300px and made check before comment is returned to submit so the image isn't included if no post found. Updated lastposts.click to lasposts.change to make chrome work with change of entry
53
- 2.0b r3 - 7/9/8 changed remote script address (to adapt to database writes made in remote script)
54
- 2.0b r2 - 6/9/8 changed jquery so it doesn't select all selects - jQuery('#lastposts option:selected').text();
55
- 2.0b r2 - 5/9/8 change remote script to commentluv.com so it can use the database
56
- 2.0b r2 - 4/9/8 add whitelist options filter (http://mu.wordpress.org/forums/topic.php?id=9210)
57
- 2.0b r2 - 4/9/8 specific to MU
58
- 2.0b r1 - 4/9/8 tidy up options saving (testing by Ovidiu http://pacura.ru)
59
- 2.0b r1 - 3/9/8 use text given in settings page for inserted text
60
- 2.0b r1 - 3/9/8 make compatible with logged in user
61
- 2.0b r1 - 1/9/8 convert to AJAX enabled!!
62
- 1.98 - 210808 small change to label style
63
- 1.97 - change check for link returned
64
- 1.96 - check url to make sure it isn't pointing to a single file
65
- 1.95 - add referrer to curl options for new database options for remotecl6
66
- 1.94 - fix, style in settings wouldn't save
67
- 1.93 - change styling of comment
68
- 1.92 - fix case of 1 being output for feed return value
69
- 1.91 - fix option change for character encoding (forgot to add extra option to hidden field in option page html)
70
- 1.9 - changed retrieve url to fiddyp.com site because of hosting problem with commentluv.com
71
- 1.8 - added option to specify encoding of output - thanks me
72
- 1.7 - added steroids to the feed fetching routine, now no need to do all the fandangles of trying
73
- to determine feed location and tidying up crappy characters. Now, output is in utf-8 with all
74
- special characters staying put! thanks http://blog.mukispace.com
75
- 1.6 - make under comment and style in head xhtml valid - thanks http://www.untwistedvortex.com
76
- 1.5 - stupid urlencode.. pah
77
- 1.4 - some reports of code being passed back so check for more than 250 characters in returned string (quick fix only) thanks mama druid (http://www.mamadruid.com
78
- found the problem! it was new server not executing php5 files... had to change url in plugin and upload standard php file to server
79
- 1.3 - clean returned link so it can't be used for msql injection
80
- 1.2 - add option for styling... thanks Jenny from http://thesocalledme.net
81
- 1.1 - add options page to allow for user to change displayed messages etc
82
- 1.0 - took ajax off and moved to remote find feed on commentluv.com
83
- 0.999 - need to take off internal feed parser due to excessive use of wp_options table
84
- 0.998 - gimme some AJAX! added div id "here" to below checkbox for showing the last post found by ajax
85
- 0.997 - add bit to allow user to change message by editing source code
86
- 0.996 - removed [noluv] and replaced with checkbox on form
87
- 0.995 - add option to not get feed if user enters [noluv] (thanks http://www.blogherald.com)
88
- 0.994 - added an option to read the feed output by my own routine to curl the users page
89
- 0.993 - added check for web-log: addition by Edward De Leau of http://edward.de.leau.net/
90
- 0.992 - detect trailing slash on author url and act accordingly
91
- 0.991 - move curl check to higher up the process so the plugin doesn't take longer than necessary
92
- 0.99 - allow for styles to be applied to last blog post text
93
- 0.98 - added ability to allow commenter to switch debug on within comments by putting [debugon] in the content
94
- 0.97 - add support for typepad and blogspt own domain blogs and more header alternate links and raised the priority on action so other plugins can play with the comment afterwards for nofollow
95
- 0.96 - handle the author url more efficiently
96
- 0.95 - rewrite of feed finding and parsing and added a timout increase to the magpie rss parsing function
97
- 0.94 - fix: not parsing some feedburner feeds that have an extra subdomain on the url
98
- 0.93 - use wp internal function to parse feed and improve find feed location
99
- 0.92 - update comments
100
- 0.91 - fix: compatibility with some other comment enhancing plugins so the link isn't repeated
101
- 0.9 - now wont output emptry string if no last post found (blogspot blog with own domain)
102
- 0.8 - now prevents parsing on a trackback, pingback or admin comment
103
- 0.71 - trying to prevent showing last post on trackbacks
104
- 0.7 - prevented admin from having feed parsed when replying to comments
105
- (thanks thesmocklady.com/blog/)
106
- 0.6 - fixed problem where it wouldn't find the feed if the blog was in a subdirectory
107
- (found by http://thesmocklady.com/blog/)
108
- 0.51 - fiddled with timeout. Some feeds were not showing due to it taking too long to load the
109
- commenter's page. Testing done by thedivanetwork.com and lalla-mira.com/. Thanks!
110
- 0.5 - typepad,blogspot,wordpress all working, tries to find a feedburner feed in the authors page
111
- if it's not found in a default location. pretty robust, can now work with script links to
112
- feedburner.
113
- 0.4 - try and find users feed if they don't have a default wordpress/blogger/typepad blog
114
- 0.3 - works with typepad blogs feed, default and feedburner
115
- 0.2 - works with feedburner feed for wordpress and blogger default location
116
- 0.1 - works with wordpress default feed at default location
117
-
118
-
119
- */
120
-
121
-
122
-
123
- //************ you shouldn't edit below this line!*******************************
124
-
125
- // action hooks
126
-
127
- add_action('admin_menu', 'show_cl_options');
128
- add_action('wp_head','cl_style_script');
129
- add_action('comment_form','cl_add_fields');
130
- add_filter('preprocess_comment','cl_post',0);
131
- add_filter('whitelist_options','commentluv_alter_whitelist_options');
132
- add_filter('plugin_action_links', 'commentluv_action', -10, 2);
133
- register_activation_hook(__FILE__, 'commentluv_activation');
134
-
135
- if (!function_exists('wp_prototype_before_jquery')) {
136
- function wp_prototype_before_jquery( $js_array ) {
137
- if ( false === $jquery = array_search( 'jquery', $js_array ) )
138
- return $js_array;
139
-
140
- if ( false === $prototype = array_search( 'prototype', $js_array ) )
141
- return $js_array;
142
-
143
- if ( $prototype < $jquery )
144
- return $js_array;
145
-
146
- unset($js_array[$prototype]);
147
-
148
- array_splice( $js_array, $jquery, 0, 'prototype' );
149
-
150
- return $js_array;
151
- }
152
-
153
- add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' );
154
- }
155
-
156
- wp_enqueue_script('jquery');
157
-
158
-
159
- function commentluv_action($links, $file) {
160
- // adds the link to the settings page in the plugin list page
161
- if ($file == plugin_basename(dirname(__FILE__).'/commentluv.php'))
162
- $links[] = "<a href='options-general.php?page=commentluv/commentluv.php'>" . __('Settings', 'CommentLuv') . "</a>";
163
- return $links;
164
- }
165
-
166
- // Add the administrative settings to the "Settings" menu by calling manage_page function
167
- function show_cl_options() {
168
- if ( function_exists( 'add_submenu_page' ) ) {
169
- add_options_page( 'CommentLuv', 'CommentLuv', 8, __FILE__, 'commentluv_manage_page' );
170
- }
171
- }
172
- // Include the Manager page from file in plugin directory
173
- function commentluv_manage_page() {
174
- include(dirname(__FILE__).'/commentluv-manager.php' );
175
- }
176
- // clean input string
177
- function cleanInput($input) {
178
- return htmlentities(trim($input), ENT_QUOTES);
179
- }
180
-
181
- // sanatize function
182
- function sanitize($input) {
183
- if (is_array($input)) {
184
- foreach($input as $var=>$val) {
185
- $output[$var] = sanitize($val);
186
- }
187
- }
188
- else {
189
- if (get_magic_quotes_gpc()) {
190
- $input = stripslashes($input);
191
- }
192
- $input = cleanInput($input);
193
- $output = mysql_real_escape_string($input);
194
- }
195
- return $output;
196
- }
197
-
198
- // make compatible with Mu
199
- function commentluv_alter_whitelist_options($whitelist) {
200
- if(is_array($whitelist)) {
201
- $option_array = array('commentluv' => array('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_author_type','cl_url_type','cl_textarea_type','cl_reset','cl_showtext','cl_badge_pos','cl_prepend','cl_heart_tip'));
202
- $whitelist = array_merge($whitelist,$option_array);
203
- }
204
- return $whitelist;
205
- }
206
-
207
- // localization - oo-er!
208
- $commentluv_domain = 'commentluv';
209
- $commentluv_is_setup = 0;
210
- $cl_script_added=0;
211
-
212
- function commentluv_setup()
213
- {
214
- global $commenluv_domain, $commentluv_is_setup;
215
-
216
- if($commentluv_is_setup) {
217
- return;
218
- }
219
-
220
- load_plugin_textdomain($commentluv_domain, PLUGINDIR.'/'.dirname(plugin_basename(__FILE__)), dirname(plugin_basename(__FILE__)));
221
- $commentluv_is_setup=1;
222
- }
223
-
224
- // add fields for registered user so ajaxcl will work for logged on users
225
- function cl_add_fields($id){
226
- if (is_user_logged_in()){
227
- // get options values and insert as hidden fields
228
- global $userdata;
229
- get_currentuserinfo();
230
- $author=$userdata->display_name;
231
- $userid=$userdata->ID;
232
- // check for MU blog
233
- if( function_exists( 'is_site_admin' ) ) {
234
- global $wpdb;
235
- $row = $wpdb->get_row("SELECT * FROM wp_blogs WHERE blog_id=$userid");
236
- $url = $row->domain.$row->path;
237
- }else {
238
- $url=$userdata->user_url;
239
- }
240
-
241
- $cl_author_id=get_option('cl_author_id');
242
- $cl_site_id=get_option('cl_site_id');
243
-
244
- echo "<input type='hidden' id='$cl_author_id' name='$cl_author_id' value='$author' />";
245
- echo "<input type='hidden' id='$cl_site_id' name='$cl_site_id' value='$url' />";
246
- }
247
- return $id;
248
- }
249
-
250
- function cl_post($comment_data){
251
- // insert the last link to the end of the comment and save to db by returning $comment_data
252
- $cl_post=$_POST['cl_post'];
253
- if($cl_post){
254
- // if there's something there do something with it!
255
- if(strstr($cl_post,"commentluv.com/error") || substr($cl_post,10,1)=="0"){
256
- return $comment_data;
257
- }
258
- $cl_comment_text=str_replace("'","&#180;",get_option('cl_comment_text'));
259
- // change output text to that set in the options page
260
- $search=array('[name]','[lastpost]');
261
- $replace=array($comment_data['comment_author'],$cl_post);
262
- $cl_comment_text=str_replace($search,$replace,$cl_comment_text);
263
- $comment_data['comment_content'].="\n\n<abbr><em>$cl_comment_text</abbr></em>";
264
- return $comment_data;
265
- } else {
266
- return $comment_data;
267
- }
268
- }
269
-
270
-
271
- // add style to head
272
- function cl_style_script(){
273
- // for lesser Wp than 2.6
274
- // Pre-2.6 compatibility
275
- if ( ! defined( 'WP_CONTENT_URL' ) )
276
- define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' );
277
- if ( ! defined( 'WP_CONTENT_DIR' ) )
278
- define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
279
- if ( ! defined( 'WP_PLUGIN_URL' ) )
280
- define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' );
281
- if ( ! defined( 'WP_PLUGIN_DIR' ) )
282
- define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
283
- global $cl_script_added;
284
-
285
- if ($cl_script_added) {
286
- return;
287
- }
288
-
289
- $cl_comment_id=get_option('cl_comment_id');
290
- $cl_author_id=get_option('cl_author_id');
291
- $cl_site_id=get_option('cl_site_id');
292
-
293
- $cl_version=get_option('cl_version');
294
- $cl_comment_text=get_option('cl_comment_text');
295
- $cl_default_on=get_option('cl_default_on');
296
- $cl_badge=get_option('cl_badge');
297
- $cl_member_id=get_option('cl_member_id');
298
- if(!$cl_member_id){
299
- $cl_member_id="0";
300
- }
301
- $plugin_dir = basename(dirname(__FILE__));
302
-
303
- if($cl_badge=='text'){
304
- $cl_badge_val=get_option('cl_showtext');
305
- } else {
306
- $cl_badge_val="<img src=\"".WP_PLUGIN_URL."/commentluv/$cl_badge\"/>";
307
- }
308
- // check if user has set append ID differently
309
- $append_id=get_option('cl_badge_pos');
310
-
311
- // start the javascript output
312
- if(is_single()) {
313
- echo '<!-- Styling and script added by commentluv 2.65 http://www.commentluv.com -->';
314
-
315
- echo '<style type="text/css">abbr em{'.get_option('cl_style').'} #lastposts { width: 300px; } </style>';
316
- echo "\n<script type=\"text/javascript\" src=\"".WP_PLUGIN_URL."/commentluv/js/commentluv";
317
- if(function_exists(id_menu_items)) { echo "ID";} //get_option('cl_intense')=="on")
318
- echo ".js\"></script>";
319
- if(get_option('cl_heart_tip')=="TRUE"){
320
- echo "<link rel=\"stylesheet\" href=\"".WP_PLUGIN_URL."/commentluv/include/tipstyle.css\" type=\"text/css\" />\n";
321
- echo "<script type=\"text/javascript\"><!--//--><![CDATA[//><!--\n";
322
- echo "jQuery(document).ready(function(){\n";
323
- (function_exists(id_menu_items)) ? $selector = ".idc-c-t" : $selector = "abbr";
324
- echo "jQuery(\"$selector em a\").each(function(i){\n".
325
- "jQuery(this).after(' <a class=\'jTip\' id=\'' + i + '\' name=\'My CommentLuv Profile\' href=\'".
326
- WP_PLUGIN_URL."/commentluv/include/tip.php?width=375&url=' + jQuery(this).attr('href') +'\'><img src=\'".
327
- WP_PLUGIN_URL."/commentluv/images/littleheart.png\' alt=\'#\' border=\'0\' /></a>');\n".
328
- "});\n".
329
- "JT_init();});\n";
330
- echo "//--><!]]></script>\n";
331
- echo "<script type='text/javascript' src='".WP_PLUGIN_URL."/commentluv/js/jtip.js'></script>\n";
332
- }
333
- echo "<script type=\"text/javascript\"><!--//--><![CDATA[//><!--";
334
- echo "\n var cl_settings=new Array();\n";
335
- echo "cl_settings[0]=\"$append_id\";\n";
336
- echo "cl_settings[1]=\"$cl_author_id\";\n";
337
- echo "cl_settings[2]=\"$cl_site_id\";\n";
338
- echo "cl_settings[3]=\"$cl_comment_id\";\n";
339
-
340
- // select text
341
- $cl_select_text=get_option('cl_select_text');
342
- echo "cl_settings[5]=\"$cl_select_text\";\n";
343
- echo "cl_settings[6]=\"$cl_badge\";\n";
344
- echo "cl_settings[7]=\"".addslashes($cl_badge_val)."\";\n";
345
- echo "cl_settings[8]=\"".addslashes($cl_badge_val)."\";\n";
346
- if($cl_default_on=="TRUE"){
347
- $cl_default_on="checked";
348
- } else {
349
- $cl_default_on="";
350
- }
351
- echo "cl_settings[9]=\"$cl_default_on\";\n";
352
- //click track
353
- if(get_option('cl_click_track')=="on") {
354
- $cl_click_track=1;
355
- } else {
356
- $cl_click_track=0;
357
- }
358
- echo "cl_settings[10]=\"$cl_click_track\";\n";
359
- echo "cl_settings[11]=\"$cl_heart_tip\";\n";
360
- // optional prepend
361
- $cl_prepend=addslashes(get_option('cl_prepend'));
362
- echo "cl_settings[12]=\"$cl_prepend\";\n";
363
- // switch off for admin
364
- if(current_user_can('edit_users')){
365
- echo "cl_settings[13]=\"admin\";\n";
366
- }
367
- echo "cl_settings[14]=\"$cl_member_id\";\n";
368
- echo "cl_settings[15]=\"$cl_version\";\n";
369
- echo "commentluv(cl_settings);\n";
370
-
371
- echo "//--><!]]></script>";
372
-
373
- echo '<!-- end commentluv http://www.commentluv.com -->';
374
- $cl_script_added=1;
375
- }
376
-
377
- }
378
-
379
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
commentluv.po DELETED
@@ -1,201 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: CommentLuv 2.0\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2009-01-15 13:02-0000\n"
6
- "PO-Revision-Date: \n"
7
- "Last-Translator: Andy Bailey <andy@teamplaylotto.com>\n"
8
- "Language-Team: <andy@teamplaylotto.com>\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-Language: English\n"
13
- "X-Poedit-Country: UNITED KINGDOM\n"
14
- "X-Poedit-KeywordsList: __;_e\n"
15
- "X-Poedit-Basepath: .\n"
16
- "X-Poedit-SearchPath-0: C:\\xampp\\htdocs\\wordpress\\wp-content\\plugins\\commentluv\n"
17
-
18
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:77
19
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:208
20
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:531
21
- msgid "Update Options"
22
- msgstr ""
23
-
24
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:108
25
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:430
26
- msgid "CommentLuv Wordpress Plugin"
27
- msgstr ""
28
-
29
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:109
30
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:431
31
- msgid "This plugin takes the url from the comment form and tries to parse the feed of the site and display the last entry made"
32
- msgstr ""
33
-
34
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:110
35
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:432
36
- msgid "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"
37
- msgstr ""
38
-
39
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:110
40
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:432
41
- msgid "or"
42
- msgstr ""
43
-
44
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:110
45
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:432
46
- msgid "support forum"
47
- msgstr ""
48
-
49
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:110
50
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:432
51
- msgid "and let me know"
52
- msgstr ""
53
-
54
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:111
55
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:433
56
- msgid "Options"
57
- msgstr ""
58
-
59
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:112
60
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:434
61
- msgid "Enter the text you want displayed in the comment."
62
- msgstr ""
63
-
64
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:121
65
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:443
66
- msgid "Text displayed in the select box"
67
- msgstr ""
68
-
69
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:126
70
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:448
71
- msgid "Choose to have CommentLuv on by default?"
72
- msgstr ""
73
-
74
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:133
75
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:455
76
- msgid "Choose to have CommentLuv Info box?"
77
- msgstr ""
78
-
79
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:141
80
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:462
81
- msgid "Styling"
82
- msgstr ""
83
-
84
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:142
85
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:463
86
- msgid "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."
87
- msgstr ""
88
-
89
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:143
90
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:464
91
- msgid "Enter css styling to apply to comment"
92
- msgstr ""
93
-
94
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:143
95
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:464
96
- msgid "inserted as"
97
- msgstr ""
98
-
99
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:149
100
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:470
101
- msgid "Comment Form Identification"
102
- msgstr ""
103
-
104
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:150
105
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:471
106
- msgid "Enter the ID or NAME value for the input fields on your comment form."
107
- msgstr ""
108
-
109
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:151
110
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:472
111
- msgid "Check your comment form fields to see if they use ID= or NAME= and select the appropriate type below"
112
- msgstr ""
113
-
114
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:152
115
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:473
116
- msgid "Visit CommentLuv.com if you need instructions"
117
- msgstr ""
118
-
119
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:156
120
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:478
121
- msgid "Authors Name field ID"
122
- msgstr ""
123
-
124
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:164
125
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:486
126
- msgid "Authors URL field ID"
127
- msgstr ""
128
-
129
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:172
130
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:494
131
- msgid "Comment Text Area ID"
132
- msgstr ""
133
-
134
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:180
135
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:502
136
- msgid "Display Badge"
137
- msgstr ""
138
-
139
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:184
140
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:506
141
- msgid "Choose badge to display"
142
- msgstr ""
143
-
144
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:190
145
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:512
146
- msgid "Show nothing"
147
- msgstr ""
148
-
149
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:193
150
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:515
151
- msgid "Show text"
152
- msgstr ""
153
-
154
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:193
155
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:515
156
- msgid "Append badge to (DIV or object ID) optional"
157
- msgstr ""
158
-
159
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:193
160
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:515
161
- msgid "Prepend html before badge or text (optional)"
162
- msgstr ""
163
-
164
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:195
165
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:517
166
- msgid "CommentLuv Member ID"
167
- msgstr ""
168
-
169
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:196
170
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:518
171
- msgid "If you register your site for free at"
172
- msgstr ""
173
-
174
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:196
175
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:518
176
- msgid "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"
177
- msgstr ""
178
-
179
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:198
180
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:520
181
- msgid "Your CommentLuv.com member ID"
182
- msgstr ""
183
-
184
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:201
185
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:523
186
- msgid "Enable click tracking?"
187
- msgstr ""
188
-
189
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:209
190
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluvID.php:530
191
- msgid "Reset to Default Settings"
192
- msgstr ""
193
-
194
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv-manager.php:209
195
- msgid "Are you sure you want to reset your settings? Press OK to continue"
196
- msgstr ""
197
-
198
- #: C:\xampp\htdocs\wordpress\wp-content\plugins\commentluv/commentluv.php:160
199
- msgid "Settings"
200
- msgstr ""
201
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
images/arrow_left.gif DELETED
Binary file
images/arrow_right.gif DELETED
Binary file
images/littleheart.png DELETED
Binary file
images/loader.gif DELETED
Binary file
images/stripefadeback.png DELETED
Binary file
include/tip.php DELETED
@@ -1,27 +0,0 @@
1
- <?php
2
- // include file for comemntluv to display tooltip for heart icon
3
- // 6 Oct 08 - added another function for curl if fopen and filegetcontents fail
4
- // 9 oct 08 - added last resort iframe html if fopen, file_get_contents and cURL fail
5
- if(function_exists("curl_init")){
6
- //setup curl values
7
- $url=$_GET['url'];
8
- $curl=curl_init();
9
- curl_setopt($curl,CURLOPT_URL,"http://www.commentluv.com/commentluvinc/clplus_tooltip.php?url=".$url);
10
- curl_setopt($curl,CURLOPT_HEADER,0);
11
- curl_setopt($curl,CURLOPT_RETURNTRANSFER,TRUE);
12
- curl_setopt($curl,CURLOPT_TIMEOUT,7);
13
- $content=curl_exec($curl);
14
-
15
- if(!curl_error($curl)){
16
- $data=$content;
17
- curl_close($curl);
18
- } else {
19
- // can't do curl so echo out iframe html
20
- $data="<iframe frameborder=0 width=\"360\" height=\"400\" src=\"http://www.commentluv.com/commentluvinc/clplus_tooltip.php?url=".$_GET['url']."\"></iframe>";
21
- }
22
- } else {
23
- $data="<iframe frameborder=0 width=\"360\" height=\"400\" src=\"http://www.commentluv.com/commentluvinc/clplus_tooltip.php?url=".$_GET['url']."\"></iframe>";
24
- }
25
-
26
- echo $data;
27
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
include/tipstyle.css DELETED
@@ -1,77 +0,0 @@
1
- /* ---- jtip <<<---------------------------------------------------------------*/
2
-
3
- #JT_arrow_left{
4
- background-image: url(../images/arrow_left.gif);
5
- background-repeat: no-repeat;
6
- background-position: left top;
7
- position: absolute;
8
- z-index:101;
9
- left:-12px;
10
- height:23px;
11
- width:10px;
12
- top:-3px;
13
- }
14
-
15
- #JT_arrow_right{
16
- background-image: url(../images/arrow_right.gif);
17
- background-repeat: no-repeat;
18
- background-position: left top;
19
- position: absolute;
20
- z-index:101;
21
- height:23px;
22
- width:11px;
23
- top:-2px;
24
- }
25
-
26
- #JT {
27
- position: absolute;
28
- z-index:100;
29
- border: 2px solid #CCCCCC;
30
- }
31
-
32
- #JT_copy{
33
- padding:10px 10px 10px 10px;
34
- color:#333333;
35
- background-image:url(../images/stripefadeback.png);
36
- }
37
-
38
- .JT_loader{
39
- background-image: url(../images/loader.gif);
40
- background-repeat: no-repeat;
41
- background-position: center center;
42
- width:100%;
43
- height:12px;
44
- }
45
-
46
- #JT_close_left{
47
- background-color: #CCCCCC;
48
- text-align: left;
49
- padding-left: 8px;
50
- padding-bottom: 5px;
51
- padding-top: 2px;
52
- font-weight:bold;
53
- }
54
-
55
- #JT_close_right{
56
- background-color: #CCCCCC;
57
- text-align: left;
58
- padding-left: 8px;
59
- padding-bottom: 5px;
60
- padding-top: 2px;
61
- font-weight:bold;
62
- }
63
-
64
- #JT_copy p{
65
- margin:3px 0;
66
- font-family:Arial, Helvetica, sans-serif;
67
-
68
- }
69
-
70
- #JT_copy img{
71
- padding: 1px;
72
- border: 1px solid #CCCCCC;
73
- }
74
-
75
- .jTip{
76
- cursor:help;
77
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/addtwitterfield.js ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // javascript for wp-twitip-id 1.0
2
+ function addtwitterfield (atf_afterID,atf_prehtml,atf_psthtml,atf_field_class,atf_nolabels,atf_swaplabel,atf_nojava){
3
+ // use jquery to add a field to the comment form
4
+ jQuery.noConflict();
5
+ jQuery(document).ready(function(){
6
+ if(jQuery("#" + atf_afterID).length < 1) { return }
7
+ if(atf_nojava != "on"){
8
+ // get tabindex
9
+ var tabIndex = parseInt(jQuery("#" + atf_afterID).attr("tabindex")) + 1;
10
+ // add the field
11
+ var formObj = jQuery("textarea[name='comment']").parents("form"); // get form object that is parent of textarea named "comment"
12
+ if(atf_nolabels!="on" && atf_swaplabel != "on") {
13
+ var objafter = "label[for='" + atf_afterID + "']";
14
+ } else {
15
+ var objafter = "#" + atf_afterID;
16
+ }
17
+
18
+ jQuery(objafter,formObj).after(atf_prehtml + "<input type=\"text\" name=\"atf_twitter_id\" class=\"" + atf_field_class + "\" tabindex=\"" + tabIndex + "\" ></input>" + atf_psthtml);
19
+ }
20
+ // monitor twitter field so can be added to cookie
21
+ var fieldobj = jQuery("input[name='atf_twitter_id']");
22
+ jQuery(fieldobj).blur(function(){
23
+ atf_createCookie('atf_cookie',jQuery(this).val(),60);
24
+ });
25
+ // add value if cookie exists
26
+ var x = atf_readCookie('atf_cookie');
27
+ if(x) {
28
+ jQuery(fieldobj).val(x);
29
+ }
30
+
31
+ });
32
+
33
+ // cookie stuff mmmmmm cookies....
34
+ //http://www.quirksmode.org/js/cookies.html
35
+ function atf_createCookie(name,value,days) {
36
+ if (days) {
37
+ var date = new Date();
38
+ date.setTime(date.getTime()+(days*24*60*60*1000));
39
+ var expires = "; expires="+date.toGMTString();
40
+ }
41
+ else { var expires = ""; }
42
+ document.cookie = name+"="+value+expires+"; path=/";
43
+ }
44
+
45
+ function atf_readCookie(name) {
46
+ var nameEQ = name + "=";
47
+ var ca = document.cookie.split(';');
48
+ for(var i=0;i < ca.length;i++) {
49
+ var c = ca[i];
50
+ while (c.charAt(0)==' ') {c = c.substring(1,c.length);}
51
+ if (c.indexOf(nameEQ) == 0){ return c.substring(nameEQ.length,c.length);}
52
+ }
53
+ return null;
54
+ }
55
+
56
+ function atf_eraseCookie(name) {
57
+ createCookie(name,"",-1);
58
+ }
59
+ }
js/commentluv.js DELETED
@@ -1,93 +0,0 @@
1
- jQuery.noConflict();
2
- function commentluv(cl_settings){
3
- jQuery(document).ready(function() {
4
- var formObj = jQuery("textarea[name='" + cl_settings[3] + "']").parents("form"); // get form object that is parent of textarea named "comment"
5
- if(cl_settings[0]==""){
6
- cl_settings[0]=formObj;
7
- } else {
8
- formObj = '#' + cl_settings[0];
9
- }
10
- // auto set url, comment and author field
11
-
12
- var urlObj = jQuery("input[name='" + cl_settings[2] + "']",formObj);
13
- var comObj = jQuery("textarea[name='" + cl_settings[3] + "']",formObj);
14
- var autObj = jQuery("input[name='" + cl_settings[1] + "']",formObj);
15
- var cl_badge=cl_settings[7];
16
- var checked=cl_settings[9];
17
- jQuery(formObj).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><div style="clear:both"></div>');
18
- jQuery(formObj).append('<input type="hidden" id="cl_post" name="cl_post"></input>');
19
- jQuery('#lastposts').hide();
20
- if(cl_settings[10]=="1"){
21
- var cl_member_id=cl_settings[14];
22
- var cl_version=cl_settings[15];
23
- // do click on last blog post link, store click, show click, open in new window
24
- jQuery('abbr em a').click(function(){
25
- var url=jQuery(this).attr('href');
26
- var thelinkobj=jQuery(this);
27
- jQuery(thelinkobj).attr('target','_blank');
28
- var addit=url + "&cl_member_id=" + cl_member_id + "&callback=?";
29
- var clurl="http://www.commentluv.com/commentluvinc/ajaxcl_click821.php?url=" + addit;
30
- jQuery.getJSON(clurl,function(data) {
31
- jQuery.each(data.msg,function(i,item) {
32
- jQuery(thelinkobj).text(data.msg[i].text + jQuery(thelinkobj).text());})
33
- return true;
34
- });
35
- });
36
- }
37
- jQuery(comObj).focus(function(){
38
- cl_dostuff(cl_settings);
39
- });
40
- jQuery('#lastposts').change(function(){
41
- jQuery('option').remove(":contains('"+cl_settings[5]+"'");
42
- var url = jQuery(this).val();
43
- var title = jQuery('#lastposts option:selected').text();
44
- jQuery('#mylastpost a').replaceWith('<a href="' + url + '">' + title + '</a>');
45
- jQuery('#cl_post').val('<a href="' + url + '">' + title + '</a>');
46
- });
47
- jQuery(urlObj).change(function(){
48
- if(jQuery('#luv').is(":checked") && jQuery('#cl_post').val()!=""){
49
- jQuery('#lastposts').empty();
50
- cl_dostuff(cl_settings);
51
- jQuery(comObj).unbind();
52
- //jQuery(cl_settings[3]).bind('focus',cl_dostuff(cl_settings));
53
- }
54
- });
55
- jQuery('#luv').click(function(){
56
- if(jQuery(this).is(":checked")){
57
- // was unchecked, now is checked
58
- jQuery('#cl_post').val(jQuery('#mylastpost abbr em').html());
59
- jQuery('#lastposts').attr("disabled", false);
60
- jQuery('#mylastpost abbr em').fadeTo("slow", 1);
61
-
62
- } else {
63
- // was checked, user unchecked it so empty hidden field in form
64
- jQuery('#cl_post').val("");
65
- jQuery('#lastposts').attr("disabled", true);
66
- jQuery('#mylastpost abbr em').fadeTo("slow", 0.33);
67
- }
68
- });
69
-
70
- function cl_dostuff(cl_settings){
71
- var check=jQuery(urlObj).val();
72
- // return if no url or checkbox is unticked or is admin
73
- if(!check || !jQuery('#luv').is(":checked") || cl_settings[13]) { return }
74
- var xyz=jQuery(urlObj).val();
75
- var name=jQuery(autObj).val();
76
- var url="http://www.commentluv.com/commentluvinc/ajaxcl8254.php?url="+xyz+"&version=" + cl_version +"&callback=?";
77
- jQuery.getJSON(url,function(data){
78
- jQuery.each(data.links, function(i,item){
79
- jQuery('#lastposts').append('<option value="'+data.links[i].url+'">'+data.links[i].title+'</option>');
80
- });
81
- jQuery('#lastposts').append('<option value="0" selected=selected>'+cl_settings[5]+'</option>');
82
- jQuery('#lastposts').fadeIn(1000);
83
- jQuery('#mylastpost').html('<abbr><em><a href="' + data.links[0].url + '">' + data.links[0].title + '</a></em></abbr>').fadeIn(1000);
84
- if(jQuery('#luv').is(":checked")){
85
- jQuery('#cl_post').val('<a href="' + data.links[0].url + '">' + data.links[0].title + '</a>');
86
- }
87
-
88
- });
89
- jQuery(comObj).unbind();
90
-
91
- }
92
- });
93
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/commentluvID.js DELETED
@@ -1,118 +0,0 @@
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
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jtip.js DELETED
@@ -1,102 +0,0 @@
1
- // JavaScript Document
2
- /*
3
- * JTip
4
- * By Cody Lindley (http://www.codylindley.com)
5
- * Under an Attribution, Share Alike License
6
- * JTip is built on top of the very light weight jquery library.
7
- */
8
-
9
- //on page load (as soon as its ready) call JT_init
10
-
11
-
12
- function JT_init(){
13
-
14
- jQuery("a.jTip")
15
- .hover(function(){JT_show(this.href,this.id,this.name)},function(){jQuery('#JT').remove()})
16
- .click(function(){return false});
17
- }
18
-
19
- function JT_show(url,linkId,title){
20
- if(title == false)title="&nbsp;";
21
- var de = document.documentElement;
22
- var w = self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
23
- var hasArea = w - getAbsoluteLeft(linkId);
24
- var clickElementy = getAbsoluteTop(linkId) - 3; //set y position
25
-
26
- var queryString = url.replace(/^[^\?]+\??/,'');
27
- var params = parseQuery( queryString );
28
- if(params['width'] === undefined){params['width'] = 250};
29
- if(params['link'] !== undefined){
30
- jQuery('#' + linkId).bind('click',function(){window.location = params['link']});
31
- jQuery('#' + linkId).css('cursor','pointer');
32
- }
33
-
34
- if(hasArea>((params['width']*1)+75)){
35
- jQuery("body").append("<div id='JT' style='width:"+params['width']*1+"px'><div id='JT_arrow_left'></div><div id='JT_close_left'>"+title+"</div><div id='JT_copy'><div class='JT_loader'><div></div></div>");//right side
36
- var arrowOffset = getElementWidth(linkId) + 11;
37
- var clickElementx = getAbsoluteLeft(linkId) + arrowOffset; //set x position
38
- }else{
39
- jQuery("body").append("<div id='JT' style='width:"+params['width']*1+"px'><div id='JT_arrow_right' style='left:"+((params['width']*1)+1)+"px'></div><div id='JT_close_right'>"+title+"</div><div id='JT_copy'><div class='JT_loader'><div></div></div>");//left side
40
- var clickElementx = getAbsoluteLeft(linkId) - ((params['width']*1) + 15); //set x position
41
- }
42
-
43
- jQuery('#JT').css({left: clickElementx+"px", top: clickElementy+"px"});
44
- jQuery('#JT').show();
45
- jQuery('#JT_copy').load(url);
46
-
47
- }
48
-
49
-
50
-
51
-
52
- function getElementWidth(objectId) {
53
- x = document.getElementById(objectId);
54
- return x.offsetWidth;
55
- }
56
-
57
- function getAbsoluteLeft(objectId) {
58
- // Get an object left position from the upper left viewport corner
59
- o = document.getElementById(objectId)
60
- oLeft = o.offsetLeft // Get left position from the parent object
61
- while(o.offsetParent!=null) { // Parse the parent hierarchy up to the document element
62
- oParent = o.offsetParent // Get parent object reference
63
- oLeft += oParent.offsetLeft // Add parent left position
64
- o = oParent
65
- }
66
- return oLeft
67
- }
68
-
69
- function getAbsoluteTop(objectId) {
70
- // Get an object top position from the upper left viewport corner
71
- o = document.getElementById(objectId)
72
- oTop = o.offsetTop // Get top position from the parent object
73
- while(o.offsetParent!=null) { // Parse the parent hierarchy up to the document element
74
- oParent = o.offsetParent // Get parent object reference
75
- oTop += oParent.offsetTop // Add parent top position
76
- o = oParent
77
- }
78
- return oTop
79
- }
80
-
81
- function parseQuery ( query ) {
82
- var Params = new Object ();
83
- if ( ! query ) return Params; // return empty object
84
- var Pairs = query.split(/[;&]/);
85
- for ( var i = 0; i < Pairs.length; i++ ) {
86
- var KeyVal = Pairs[i].split('=');
87
- if ( ! KeyVal || KeyVal.length != 2 ) continue;
88
- var key = unescape( KeyVal[0] );
89
- var val = unescape( KeyVal[1] );
90
- val = val.replace(/\+/g, ' ');
91
- Params[key] = val;
92
- }
93
- return Params;
94
- }
95
-
96
- function blockEvents(evt) {
97
- if(evt.target){
98
- evt.preventDefault();
99
- }else{
100
- evt.returnValue = false;
101
- }
102
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/tooltip.js DELETED
@@ -1,7 +0,0 @@
1
- // JavaScript Document
2
- // tool tips on last blog posts
3
- jQuery(document).ready(function(){
4
- jQuery("abbr em a").each(function(i){
5
- jQuery(this).after(" <a class='jTip' id='"+i+"' name='My other posts' href='http://localhost/wordpress/wp-content/plugins/commentluv/include/tip.php?width=375&url=" +jQuery(this).attr('href')+"'>#</a>");
6
- });
7
- });
 
 
 
 
 
 
 
nothing.gif DELETED
Binary file
readme.txt DELETED
@@ -1,102 +0,0 @@
1
- === CommentLuv ===
2
- Contributors: Andy Bailey
3
- Tags: comments, linkluv
4
- Requires at least: 2.5
5
- Tested up to: 2.7
6
- Stable tag: 2.6.5
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
-
10
- == Description ==
11
-
12
- Pass a bit of luv onto your commenters by providing a titled link to their last blog post. This plugin attempts to parse the feed of the comment author by visiting their site and looking for their feed while they type their comment and appends it once they submit.
13
-
14
- Entice them even more with the new info box ajax popup showing their descript, gravatar and other sites they visit.
15
-
16
- It will start to work with any new comments posted after installation (it will not add last post links to comments made before CommentLuv has been activated). You can set the plugin to track the clicks made on the links received and see the stats at commentluv.com (free registration)
17
-
18
- It will not add your own last post if you are logged in as admin. You can test it by adding a comment to one of your posts (after loggin out) and using a different URL for the author site field (use http://www.fiddyp.co.uk if you want!)
19
-
20
- This plugin now has a support site where you can specify a feed location, see who's clicked on your links and more. Registration is free and verification is simple. Registered users get to choose from their last 10 posts instead of just 1.
21
-
22
- == Installation ==
23
-
24
- 1. Upload the `commentluv` folder to the `/wp-content/plugins/` directory
25
- 2. Activate the plugin through the 'Plugins' menu in WordPress
26
- Wordpress MU users can activate it from their own blog.
27
- 3. Check for settings on the dashboard/settings/commentluv page and enter the name or ID values for your comment form. Default values will work with the default themes. View your comments.php file to see if your form uses ID or name values and enter them in the settings page.
28
-
29
- You can see if it has enabled correctly by logging out and looking for the badge displayed under the comment form. For detailed instructions with screen shots, visit CommentLuv.com
30
-
31
- You may want to test it after activation by logging out and adding a comment to one of your posts, you can use http://www.fiddyp.co.uk if you want and see if it apends my last blog post.
32
-
33
- == Frequently Asked Questions ==
34
-
35
- = I don't see the badge in the comment form =
36
- The badge will not show if your are logged in as admin. If you are not logged in but still cannot see the badge, check the settings for your comment form ID. You can see what it is set to in your themes `comments.php` file
37
-
38
- = All my comments are now being held in moderation, why? =
39
-
40
- You probably have your wordpress set to hold comments in moderation if they contain a link.
41
- Go to your wordpress dashboard and go to Options/discussion and change the comment moderation option to "Hold a comment in the queue if it contains 2 links" (or more)
42
-
43
- = I can see the settings in the dashboard but there isn't an image below the comment form, why?
44
-
45
- Check the settings page has the correct values for your form name and fields. Visit CommentLuv.com or the support forum http://www.fiddyp.co.uk/support and post a query there if you get stuck.
46
-
47
- = Why doesn't my plugin show anyone's last post? =
48
-
49
- You might be having a compatibility issue with one of your other comment plugins. This version of CommentLuv currently works with AJAX edit comments, subscribe to comments and SpamKarma 2.
50
-
51
- = Logged on users aren't getting their last blog post displayed =
52
-
53
- The url used to find the last blog post is taken from the users profile. If they have a url there then check your comments.php file for the commentform action using this code
54
- < ? php do_action('comment_form', $post->ID); ?>
55
- You need to place this (if it isn't there already) just before the &lt;/form> tag
56
-
57
- = CommentLuv is picking a post that is not the latest one =
58
-
59
- If you are not a registered member of CommentLuv.com and you are using a feedburner feed service, the plugin wont be able to use a cache for your feed so feedburner will return the feed they hold in their cache which doesn't get updated as often. Register your url at CommentLuv.com and verify it so caching is enabled. This will ensure your very latest post is always retrieved.
60
-
61
- = Does this plugin increase page load times? =
62
-
63
- The last post link is added at the time of the comment being typed, no database writes are made other than the standard comment save so it shouldn't affect the loading time of your blog at all.
64
-
65
- = Does this plugin remove nofollow tags from the links it creates if I am using a Dofollow plugin? =
66
-
67
- You will need to use a dofollow plugin such as the excellent Lucias Linky Luv (http://money.bigbucksblogger.com/lucias-linky-love-a-dofollow-plugin-to-foil-human-comment-spammers/) to remove the nofollow from the links.
68
-
69
- = I still see rel="nofollow" in the last blog post links when I am notified by Admin =
70
- Wordpress puts in the nofollow when it sends you an email about comments made, if you look at the source of the page, you should see that the nofollow isn't there. Let me know if it is!
71
-
72
- = How can a user help CommentLuv find their feed? =
73
- They can make sure that they have an entry in the blog &lt;head> section like this:
74
- &lt;link rel="alternate" type="application/rss+xml" href="http://www.fiddyp.co.uk/feed/" title="FiddyP Posts RSS feed" /&gt; or they can register at CommentLuv.com and specify their feed there.
75
-
76
- = I am having problems, what do I do? =
77
- You can visit the support forum at http://www.fiddyp.co.uk/support or you can come to CommentLuv.com and leave me a message.
78
-
79
- = I don't want my last blog post showing on my comment =
80
- Select Do Not Show or a blank entry from the pull down box
81
-
82
- == Screenshots ==
83
- 1. Settings Page
84
- 2. In the comment
85
-
86
-
87
- == Arbitrary section ==
88
-
89
-
90
- == A brief Markdown Example ==
91
-
92
-
93
- You can change the text that is output by the plugin in its settings page. use [name] to output the comment authors name and [lastpost] to output the link.
94
- ie.
95
- [name] has just posted: [lastpost]
96
-
97
- [name]'s last blog post...[lastpost]
98
-
99
- Styling
100
- Wordpress doesn't allow a class to be set for a comment paragraph so the text that is added is enclosed in <abbr><em> tags and style applied to that like this in the style settings
101
-
102
- abbr em { border:2px solid #ffffff; display:block; padding:4px; background-color: #eeffee; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
screenshot-1.jpg DELETED
Binary file
screenshot-2.jpg DELETED
Binary file
twitter_48.png ADDED
Binary file
wp-twitip-id-manager.php ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // version 1.0
3
+ if ( ! defined( 'WP_PLUGIN_URL' ) )
4
+ define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' );
5
+ $addtwitterfielddirectory = WP_PLUGIN_URL . '/' . dirname( plugin_basename(__FILE__) );
6
+
7
+ // function for dealing with a checkbox in settings. Checks if it was on in the options and sends back checked=true if it is.
8
+ function atf_checkCheckbox( $theFieldname ){
9
+ if( get_option( $theFieldname ) == 'on'){
10
+ echo 'checked="true"';
11
+ }
12
+ return;
13
+ }
14
+
15
+ // update settings from posted variables
16
+ if ($_POST['submit']=='update'){
17
+ update_option('atf_swap',$_POST['atf_swap']);
18
+ update_option('atf_afterID',$_POST['atf_afterID']);
19
+ update_option('atf_prehtml',atf_slashit($_POST['atf_prehtml']));
20
+ update_option('atf_psthtml',atf_slashit($_POST['atf_psthtml']));
21
+ update_option('atf_field_class',$_POST['atf_field_class']);
22
+ update_option('atf_image_url',$_POST['atf_image_url']);
23
+ update_option('atf_anchor_text',$_POST['atf_anchor_text']);
24
+ update_option('atf_nolabels',$_POST['atf_nolabels']);
25
+ update_option('atf_nojava',$_POST['atf_nojava']);
26
+ }
27
+ ?>
28
+ <style type="text/css">
29
+ <!--
30
+ #addtwitterfield fieldset {
31
+ margin: 0;
32
+ padding:0;
33
+ border: none;
34
+ }
35
+ #addtwitterfield form p {
36
+ background: #eaf3fa;
37
+ padding: 10px 5px;
38
+ margin: 4px 0;
39
+ border: 1px solid #eee;
40
+ }
41
+ #addtwitterfield form .error p {
42
+ background: none;
43
+ border: none;
44
+ }
45
+ .floatright {
46
+ float: right;
47
+ }
48
+ -->
49
+ </style>
50
+ <div class="wrap" id="addtwitterfield">
51
+ <h3>Usage:</h3>
52
+ <p>Put this in your comments.php file where you want to output the link<br/>
53
+ "image" : outputs image pointed to by image url field (uses anchor text as title attribute)<br/>
54
+ "text" : outputs text link using anchor text<br/>
55
+ "return": returns twitter id as variable to be used in php<br/>
56
+ "auto" : returns Twitter: @commentluv (linked username in a span with class="twitter_id")</p>
57
+ example:
58
+ <code>&lt;?php if(function_exists(wp_twitip_id_show)) {
59
+ wp_twitip_id_show("auto");
60
+ }?&gt;</code>
61
+ <p>returns:<br/> Twitter: <a href="http://twitter.com/commentluv">@CommentLuv</a></p>
62
+ For styling use
63
+ .twitter_id {
64
+ font-size: 10px;
65
+ }
66
+
67
+ <h1>WP-Twitip-ID Options</h1>
68
+ Version: <?php echo get_option($atf_db_version);?>
69
+ <form method="post">
70
+ <div>
71
+ <fieldset>
72
+
73
+ <p>
74
+ <label for="atf_afterID">Put field after object ID</label><br/>
75
+ <input type="text" name="atf_afterID" id="atf_afterID" size="20" maxlength="30" value="<?php echo get_option('atf_afterID') ?>" />
76
+ <br/><small>Enter the value of the ID attribute of the object you want the extra field to appear after.<br/>Default: url</small>
77
+ </p><p>
78
+ <input type="checkbox" name="atf_swap" id="atf_swap" <?php atf_checkCheckbox('atf_swap')?> />
79
+ <label for="atf_swap">Labels are before fields?</label>
80
+ <br/><small>If your form uses the &lt;label tag before the &lt;input tag select this<br/>Default: off</small>
81
+ <br/><input type="checkbox" name="atf_nolabels" id="atf_nolabels" <?php atf_checkCheckbox('atf_nolabels')?> />
82
+ <label for="atf_nolabels">No Labels</label>
83
+ <br/><small>If your form doesn't use labels check here<br/>Default: off</small>
84
+ <br/><input type="checkbox" name="atf_nojava" id="atf_nojava" <?php atf_checkCheckbox('atf_nojava')?> />
85
+ <label for="atf_nojava">Do not use javascript to add the field</label>
86
+ <br/><small>If you have edited your comments.php file to manually add a field with name="atf_twitter_id" then select this box<br/>Default: off</small>
87
+ </p>
88
+ <p>
89
+ <label for="atf_prehtml">HTML before Field</label><br />
90
+ <textarea name="atf_prehtml" id="atf_prehtml" cols="40" rows="5"><?php echo atf_deslashit(get_option('atf_prehtml')); ?></textarea>
91
+ <br/><small>The HTML you want to put before the extra field (if you have checked the box above then you should put your label html here)<br/>Default: &lt;br/&gt;</small>
92
+ </p>
93
+ <p>
94
+ <label for="atf_psthtml">HTML after Field</label><br />
95
+ <textarea name="atf_psthtml" id="atf_psthtml" cols="40" rows="5"><?php echo atf_deslashit(get_option('atf_psthtml')); ?></textarea>
96
+ <br/><small>The HTML you want to put after the extra field (if you have checked the box above then you should not put the label html here)<br/>Default: &lt;br/&gt;&lt;label for="atf_twitter_id"&gt;Twitter ID&lt;/label&gt; </small>
97
+ </p>
98
+ <p>
99
+ <label for="atf_field_class">Field Class</label><br/>
100
+ <input type="text" name="atf_field_class" id="atf_field_class" size="20" maxlength="35" value="<?php echo get_option('atf_field_class') ?>" />
101
+ <br/><small>You can enter the class of your current fields here to match your theme<br/>Default: textarea</small>
102
+ </p>
103
+ <p>
104
+ <label for="atf_image_url">Twitter Image URI</label><br/>
105
+ <input type="text" name="atf_image_url" id="atf_image_url" size="40" maxlength="150" value="<?php echo get_option('atf_image_url') ?>" />
106
+ <br/><small>URL to the image you want displayed when using "image" as output<br/>Default: <?php echo WP_PLUGIN_URL.'/'.dirname( plugin_basename(__FILE__)).'/twitter_48.png';?></small>
107
+ </p>
108
+ <p>
109
+ <label for="atf_anchor_text">Link anchor text</label><br/>
110
+ <input type="text" name="atf_anchor_text" id="atf_anchor_text" size="40" maxlength="150" value="<?php echo get_option('atf_anchor_text') ?>" />
111
+ <br/><small>Text to use as link when using "text" as output (also is used for the title attribute of the image if using "image")<br/>Default: null</small>
112
+ </p>
113
+ <input type="submit" name="submit" value="update" />
114
+ </fieldset>
115
+
116
+ </div>
117
+ </form>
118
+ </div>
wp-twitip-id.php ADDED
@@ -0,0 +1,230 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: WP Twitip ID
4
+ Plugin URI: http://www.fiddyp.co.uk/wp-twitip-id-plugin-add-a-twitter-field-to-your-comment-form-easily/
5
+ Description: Adds another field to the comment form to allow the user to include their twitter id. Inspired by @problogger post http://tinyurl.com/6gns3f and kicked up the bum by @styletime.
6
+ Version: 1.0
7
+ Author: Andy Bailey
8
+ Author URI: http://www.fiddyp.co.uk
9
+
10
+ Copyright (C) <2009> <Andy Bailey>
11
+
12
+ This program is free software: you can redistribute it and/or modify
13
+ it under the terms of the GNU General Public License as published by
14
+ the Free Software Foundation, either version 3 of the License, or
15
+ (at your option) any later version.
16
+
17
+ This program is distributed in the hope that it will be useful,
18
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ GNU General Public License for more details.
21
+
22
+ You should have received a copy of the GNU General Public License
23
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
24
+
25
+ v0.1 21 Nov 08 - @styletime DM received, plugin idea accepted. WTH do I do now? :-)
26
+ v0.2 22 Nov 08 - changed paramters of template call, use image, text, user to output linked image or text using anchor or output @username only or return as variable type of string
27
+ v0.3 - added image for default usage (in case people don't know to go to the settings page)
28
+ v0.4 23 Nov 08 - change .js.php file to not add slashes. Added nolabel checkbox for themes without a label set for the fields
29
+ v0.5 updated way js file calls wp-load.php by sending a GET value with path from inside plugin
30
+ v0.6 24 nov 08 - added rel="nofollow" to links and used safer way of including javascript.
31
+ v0.7 27 nov 08 - update post meta (thanks @saphod), append atfemail to email key in post meta for easy removing in the future (database clean)
32
+ v0.8 28 nov 08 - added nojava option for people adding field manually to comments.php
33
+ v0.9 29 nov 08 - slight change to js for cookie field (don't comma the form obj) uses blur now instead of change. Add tab index bit
34
+ v1.0 11 feb 09 - add a new table for storing twitter id's for email address. only 1 comment needed for storing the id and it shows on all future comments
35
+ and added the atf_slashit and atf_deslashit for storing html in wp_options properly
36
+ and added "auto" as an output for displaying Twitter: @commentluv
37
+ a BIG THANKS to @clearskynet for helping me with the table creation!
38
+ */
39
+
40
+ function atf_install() {
41
+ global $wpdb;
42
+ $table_name = $wpdb->prefix . "wptwitipid";
43
+ if($wpdb->get_var("show tables like '$table_name'") != $table_name) {
44
+ $sql = "CREATE TABLE " . $table_name . " (
45
+ id mediumint(9) NOT NULL AUTO_INCREMENT,
46
+ email varchar(120) NOT NULL,
47
+ twitid varchar(120) NOT NULL,
48
+ PRIMARY KEY (id),
49
+ KEY (email)
50
+ );";
51
+ require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
52
+ dbDelta($sql);
53
+ }
54
+ }
55
+ function atfplugin_action($links, $file) {
56
+ // adds the link to the settings page in the plugin list page
57
+ if ($file == plugin_basename(dirname(__FILE__).'/wp-twitip-id.php'))
58
+ $links[] = "<a href='options-general.php?page=wp-twitip-id/wp-twitip-id.php'>" . __('Settings', 'WP-Twitip-ID') . "</a>";
59
+ return $links;
60
+ }
61
+ function addtwitterfieldadminpage() {
62
+ // Add the administrative settings to the "Settings" menu by calling manage_page function
63
+ if ( function_exists( 'add_submenu_page' ) ) {
64
+ add_options_page( 'WP Twitip ID', 'WP Twitip ID', 8, __FILE__, 'addtwitterfield_manage_page' );
65
+ }
66
+ }
67
+ function addtwitterfield_manage_page() {
68
+ // Include the Manager page from file in plugin directory
69
+ include(dirname(__FILE__).'/wp-twitip-id-manager.php' );
70
+ }
71
+ // add slashes to html if magic quotes is not on
72
+ function atf_slashit($stringvar){
73
+ if (!get_magic_quotes_gpc()){
74
+ $stringvar = addslashes($stringvar);
75
+ }
76
+ return $stringvar;
77
+ }
78
+ // remove slashes if magic quotes is on
79
+ function atf_deslashit($stringvar){
80
+ if (1 == get_magic_quotes_gpc()){
81
+ $stringvar = stripslashes($stringvar);
82
+ }
83
+ return $stringvar;
84
+ }
85
+ function addtwitterfieldscript(){
86
+ // add the script reference to the header
87
+ // Pre-2.6 compatibility
88
+ if ( ! defined( 'WP_CONTENT_URL' ) )
89
+ define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' );
90
+ if ( ! defined( 'WP_CONTENT_DIR' ) )
91
+ define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
92
+ if ( ! defined( 'WP_PLUGIN_URL' ) )
93
+ define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' );
94
+ if ( ! defined( 'WP_PLUGIN_DIR' ) )
95
+ define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
96
+ global $atf_head_done;
97
+ if(!$atf_head_done){
98
+ echo '<script type="text/javascript" src="'.WP_PLUGIN_URL.'/'.
99
+ dirname( plugin_basename(__FILE__)).'/js/addtwitterfield.js"></script>';
100
+ $afterID=str_replace("#","",get_option('atf_afterID'));
101
+ $prehtml=get_option('atf_prehtml');
102
+ $psthtml=get_option('atf_psthtml');
103
+ $field_class=get_option('atf_field_class');
104
+ $hasnolabel=get_option('atf_nolabels');
105
+ $swaplabel=get_option('atf_swap');
106
+ $atf_nojava=get_option('atf_nojava');
107
+ echo "<!-- added by wp-twitip-id by Andy Bailey -->\n";
108
+ echo "<script type=\"text/javascript\">";
109
+ echo "addtwitterfield('$afterID',\"$prehtml\",\"$psthtml\",'$field_class','$hasnolabel','$swaplabel','$atf_nojava');</script>";
110
+ $atf_head_done=1;
111
+ }
112
+ }
113
+ // plugin activate
114
+ function addtwitterfield_activation(){
115
+ add_option('atf_afterID','url');
116
+ add_option('atf_prehtml','<br/>');
117
+ add_option('atf_psthtml',atf_slashit('<label for="atf_twitter_id">Twitter ID</label><br/>'));
118
+ add_option('atf_field_class','textarea');
119
+ add_option('atf_image_url',WP_PLUGIN_URL.'/'.dirname( plugin_basename(__FILE__)).'/twitter_48.png');
120
+ add_option('atf_nolabels','off');
121
+ add_option('atf_swap','off');
122
+ add_option('atf_nojava','off');
123
+ add_option("atf_db_version", "1.0");
124
+ atf_install();
125
+ }
126
+ // save the twitter id with the author email in the post meta
127
+ function addtwitterfieldmeta($comment_data){
128
+ // get twitter id from post variables
129
+ $twitter=$_POST['atf_twitter_id'];
130
+ // access db
131
+ global $wpdb;
132
+ $table_name = $wpdb->prefix . "wptwitipid";
133
+ if($twitter){
134
+ // chop off any @ symbol or http twitter address
135
+ $find=array("@","http://twitter.com/");
136
+ $replace=array("","");
137
+ $twitterid = str_replace($find,$replace,$twitter);
138
+
139
+ // store twitter id wptiwitpid
140
+ $exists = $wpdb->get_var("SELECT twitid FROM $table_name WHERE email = '".$comment_data['comment_author_email']."'");
141
+ if(!$exists){
142
+ // none yet, insert
143
+ $wpdb->query("INSERT INTO $table_name (email, twitid) VALUES ('".mysql_real_escape_string($comment_data['comment_author_email'])."','".mysql_real_escape_string($twitterid)."');");
144
+ return $comment_data;
145
+ }
146
+ if ($twitterid != $exists){
147
+ //exists but is different so update to new value
148
+ $query="UPDATE $table_name SET twitid = '".mysql_real_escape_string($twitterid)."' WHERE email = '".mysql_real_escape_string($comment_data['comment_author_email'])."'";
149
+ $wpdb->query($query);
150
+ }
151
+
152
+ }
153
+ return $comment_data;
154
+ }
155
+
156
+ function wp_twitip_id_show ($type){
157
+ // display the twitter id associated with this comment
158
+ // get post id
159
+ global $wpdb;
160
+ $table_name = $wpdb->prefix . "wptwitipid";
161
+ // get comment
162
+ global $comment;
163
+ $email = $comment->comment_author_email;
164
+ // get data from settings
165
+ $image_url = get_option('atf_image_url');
166
+ $anchor_text = get_option('atf_anchor_text');
167
+ // construct url
168
+ $url="http://twitter.com/";
169
+ // output if twitter id asociated with users email on this post
170
+ if($twitter = $wpdb->get_var("SELECT twitid FROM $table_name WHERE email ='$email'")){
171
+ // twitter id exists for this email
172
+ if($type == "image" && $image_url){
173
+ echo '<span class="twitter_id"><a rel="nofollow" target="_blank" href="',$url,$twitter,'"><img src="',$image_url,'" alt="twitter" title="',$anchor_text,'"/></a></span>';
174
+ } elseif(!$image_url){
175
+ $type="text";
176
+ }
177
+ if($type == "text"){
178
+ if(!$anchor_text) {
179
+ $anchor_text="Click to follow me on twitter";
180
+ }
181
+ echo '<span class="twitter_id"><a rel="nofollow" target="_blank" href="',$url,$twitter,'">',$anchor_text,'</a></span>';
182
+ }
183
+ if($type == "user"){
184
+ echo "@",$twitter;
185
+ }
186
+ if($type == "return"){
187
+ return $twitter;
188
+ }
189
+ if($type == "auto") {
190
+ echo '<span class="twitter_id">Twitter: <a rel="nofollow" target="_blank" href="',$url,$twitter,'">@',$twitter,'</a></span>';
191
+ }
192
+ }
193
+
194
+ return ;
195
+ }
196
+ // it all starts here you know.
197
+ $atf_head_done=0;
198
+
199
+ // filters and actions
200
+ add_filter('plugin_action_links', 'atfplugin_action', -10, 2);
201
+ add_action( 'admin_menu', 'addtwitterfieldadminpage' );
202
+ add_action('wp_head','addtwitterfieldscript');
203
+ add_action('preprocess_comment','addtwitterfieldmeta',0);
204
+
205
+ register_activation_hook(__FILE__, 'addtwitterfield_activation');
206
+
207
+
208
+ if (!function_exists('wp_prototype_before_jquery')) {
209
+ function wp_prototype_before_jquery( $js_array ) {
210
+ if ( false === $jquery = array_search( 'jquery', $js_array ) )
211
+ return $js_array;
212
+
213
+ if ( false === $prototype = array_search( 'prototype', $js_array ) )
214
+ return $js_array;
215
+
216
+ if ( $prototype < $jquery )
217
+ return $js_array;
218
+
219
+ unset($js_array[$prototype]);
220
+
221
+ array_splice( $js_array, $jquery, 0, 'prototype' );
222
+
223
+ return $js_array;
224
+ }
225
+
226
+ add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' );
227
+ }
228
+
229
+ wp_enqueue_script('jquery');
230
+ ?>