Version Description
- Change links permissions
Download this release
Release Info
Developer | sociable |
Plugin | Sociable |
Version | 4.2.8 |
Comparing to | |
See all releases |
Code changes from version 4.2.7 to 4.2.8
- includes/class-sociable_Admin_Options.php +1885 -7
- includes/skyscraper_output.php +931 -7
- includes/sociable_output.php +363 -3
- readme.txt +518 -25
- sociable.php +1007 -18
includes/class-sociable_Admin_Options.php
CHANGED
@@ -1,1832 +1,3710 @@
|
|
1 |
<?php
|
|
|
2 |
/*
|
3 |
|
|
|
|
|
4 |
* Administration Options Class For Sociable 2
|
5 |
|
|
|
|
|
6 |
*/
|
|
|
7 |
class sociable_Admin_Options{
|
|
|
8 |
/**
|
9 |
|
|
|
|
|
10 |
* A Function To Hook To Admin Init.
|
11 |
|
|
|
|
|
12 |
*/
|
|
|
13 |
function init(){
|
|
|
14 |
register_setting( 'sociable_options_group' , 'sociable_options' );
|
|
|
15 |
//Add The Settings Sections
|
|
|
16 |
// add_settings_section( 'sociable_locations', __( 'Locations' ), array( 'sociable_Admin_Options' , 'location_options_callback' ) , 'sociable_options' );
|
|
|
17 |
// add_settings_section( 'sociable_options', __( 'General Options' ), array( 'sociable_Admin_Options' , 'general_options_callback' ) , 'sociable_options' );
|
|
|
18 |
register_setting( 'skyscraper_options_group' , 'skyscraper_options' );
|
|
|
19 |
// add_settings_section( 'sociable_locations', __( 'Locations' ), array( 'sociable_Admin_Options' , 'location_options_callback' ) , 'skyscraper_options' );
|
20 |
|
|
|
|
|
21 |
}
|
|
|
22 |
function skyscraper_init(){
|
|
|
23 |
register_setting( 'skyscraper_options_group' , 'skyscraper_options' );
|
|
|
24 |
add_settings_section( 'sociable_locations', __( 'Locations' ), array( 'sociable_Admin_Options' , 'location_options_callback' ) , 'skyscraper_options' );
|
|
|
25 |
//Add All The Settings Fields
|
|
|
26 |
//self::add_settings_fields();
|
27 |
|
|
|
|
|
28 |
}
|
|
|
29 |
function Select_Sociable_Page(){
|
|
|
30 |
global $sociable_options;
|
31 |
|
|
|
|
|
32 |
?>
|
|
|
33 |
<div class="wrap" style="margin-top:25px">
|
|
|
34 |
<div style="width: 80%; margin-left: 25px; color: rgb(147, 147, 147); font-weight: bold; font-size: 15px;">
|
|
|
35 |
Congrats! You are joining the leader in the sharing space of WordPress plugins. Started more than 2 years ago, and with over 1,5mm downloads now, here comes the latest version 4.1 <br /><br />
|
|
|
36 |
You can select Sociable Classic and/or Sociable Skyscraper to spread the World, increase your traffic and your reader's ability to share your posts! <br /> <br />
|
37 |
|
|
|
|
|
38 |
</div>
|
|
|
39 |
<div class="wrap" style="width:42%;float:left">
|
|
|
40 |
<?php //wp_nonce_field('sociable-config'); ?>
|
|
|
41 |
<TABLE class="Title-Box" cellspacing="0" cellpadding="0" id="Preview-Title" style="margin:0 0 0 25px">
|
42 |
|
|
|
|
|
43 |
<TR>
|
|
|
44 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" >Skyscraper Sociable</TD><TD class="Border-Right"></TD>
|
45 |
|
|
|
|
|
46 |
</TR>
|
47 |
|
|
|
|
|
48 |
<TR>
|
|
|
49 |
<TD colspan="3" >
|
|
|
50 |
<table>
|
|
|
51 |
<tr>
|
52 |
|
|
|
|
|
53 |
<td>
|
|
|
54 |
<img src="<?php echo SOCIABLE_HTTP_PATH ?>images/skyphoto.png" style="margin-left:-5px;margin-top:20px;" />
|
|
|
55 |
</td>
|
|
|
56 |
<td valign="top" >
|
|
|
57 |
<br/><br/>
|
|
|
58 |
<span style="font-size:18px;color:#18305e;font-weight:bold;">Skyscraper Sociable</span>
|
|
|
59 |
<p style="font-size:12px;color:#939393;font-weight:bold;" >
|
|
|
60 |
Now introducing the ultimate advanced and feature packed plugin for setting up rating system on your WordPress blog.
|
61 |
|
|
|
|
|
62 |
<br/ ><br/ >
|
|
|
63 |
Sociable Skyscraper allows you to set up different rating systems for posts, pages and comments with great degree of customization.
|
|
|
64 |
<br/ ><br/ >
|
|
|
65 |
List of features is so smart and non-stop growing:
|
|
|
66 |
<br/ ><br/ >
|
|
|
67 |
You can get more "Sociable" with Sociable Skyscraper and easily getting
|
|
|
68 |
Rating and Review of: posts, pages, comments, Facebook, G+, LinkedIN,
|
|
|
69 |
Twitter as well as multiple ratings for posts and pages. Visitor's counter,
|
|
|
70 |
visitor's from Facebook and Twitter... As a plus you get an easy way to get
|
|
|
71 |
TOP or HOME from Sociable Skyscraper.
|
|
|
72 |
<br/ ><br/ >
|
|
|
73 |
Enjoy it now!!!
|
|
|
74 |
<br/ ><br/ >
|
|
|
75 |
Be Sociable, Share!!!
|
|
|
76 |
</p>
|
|
|
77 |
|
|
|
78 |
<a href="?page=skyscraper_options" style="color:#ffffff;text-decoration:none;" ><img src="<?php echo SOCIABLE_HTTP_PATH ?>images/button_newsky.png" ></a>
|
|
|
79 |
|
|
|
80 |
</td>
|
|
|
81 |
</tr>
|
82 |
|
|
|
|
|
83 |
</table>
|
|
|
84 |
</TD>
|
|
|
85 |
|
|
|
86 |
|
|
|
87 |
</TR>
|
|
|
88 |
</TABLE>
|
|
|
89 |
<BR/>
|
|
|
90 |
|
|
|
91 |
</div>
|
|
|
92 |
<div class="wrap" style="margin-left:30px;width:48%;float:left">
|
|
|
93 |
<TABLE class="Title-Box" cellspacing="0" cellpadding="0" id="Preview-Title" style="margin:0 0 0 25px">
|
|
|
94 |
<TR>
|
95 |
|
|
|
|
|
96 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" >Classic Sociable</TD><TD class="Border-Right"></TD>
|
|
|
97 |
</TR>
|
|
|
98 |
<TR>
|
|
|
99 |
<TD colspan="3" >
|
|
|
100 |
<div style="margin-left:5px;">
|
|
|
101 |
<br /><br />
|
|
|
102 |
<span style="font-size:18px;color:#18305e;font-weight:bold;">Classic Sociable</span>
|
|
|
103 |
|
|
|
104 |
<p style="font-size:12px;color:#939393;font-weight:bold;" >
|
105 |
|
|
|
|
|
106 |
We've improved our visual interface, the default icons are now much
|
|
|
107 |
<br/ >
|
|
|
108 |
more appealing, and a touch bit larger (you do want your readers to
|
|
|
109 |
<br/ >
|
|
|
110 |
share your posts, don't you? :) Get it now!
|
|
|
111 |
</p>
|
|
|
112 |
<img src="<?php echo SOCIABLE_HTTP_PATH ?>images/socciable_old.png" ><br/>
|
|
|
113 |
<div style="height: 176px;"></div>
|
|
|
114 |
<a href="?page=sociable_options" style="color:#ffffff;text-decoration:none;" ><img src="<?php echo SOCIABLE_HTTP_PATH ?>images/button_sociabb.png" ></a>
|
|
|
115 |
</div>
|
|
|
116 |
</TD>
|
117 |
|
|
|
|
|
118 |
|
|
|
119 |
</TR>
|
|
|
120 |
</TABLE>
|
|
|
121 |
<BR/>
|
|
|
122 |
|
|
|
123 |
</div>
|
|
|
124 |
</div>
|
|
|
125 |
<?php }
|
|
|
126 |
|
|
|
127 |
function create_select_options($value){
|
|
|
128 |
|
|
|
129 |
for($i=3; $i<=9; ){
|
|
|
130 |
|
|
|
131 |
$sel = "";
|
|
|
132 |
if ($value == $i){
|
|
|
133 |
$sel = "selected";
|
|
|
134 |
}
|
|
|
135 |
echo "<option ".$sel." value='".$i."'> latest ".$i."</option>";
|
|
|
136 |
|
|
|
137 |
$i = $i+3;
|
|
|
138 |
}
|
|
|
139 |
}
|
|
|
140 |
|
|
|
141 |
|
|
|
142 |
function Create_Options_Page_Skycraper(){
|
143 |
|
|
|
|
|
144 |
global $skyscraper_options;
|
|
|
145 |
?>
|
146 |
|
|
|
|
|
147 |
<div class="wrap" style="width:48%;float:left">
|
148 |
|
|
|
|
|
149 |
<DIV style="margin:0 0 0 25px" class="Post-subTXT" id="Post-subTXT" >
|
150 |
|
|
|
|
|
151 |
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblogplay.com%2F&send=false&layout=standard&width=450&show_faces=true&action=recommend&colorscheme=light&font&height=80&appId=133479460071366" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:40px;" allowTransparency="true"></iframe>
|
152 |
|
153 |
-
|
|
|
|
|
|
|
154 |
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
|
|
|
155 |
<br />
|
|
|
156 |
</div>
|
157 |
|
|
|
|
|
158 |
<form method="post" action="options.php" id="form1" autocomplete="off">
|
|
|
159 |
<?php wp_nonce_field('sociable-config'); ?>
|
|
|
160 |
<INPUT type="hidden" class="version-INPUT" id="version" name="skyscraper_options[version]" value="<?php echo $skyscraper_options["version"];?>" />
|
|
|
161 |
<TABLE class="Title-Box" cellspacing="0" cellpadding="0" id="Preview-Title" style="margin:0 0 0 25px">
|
|
|
162 |
<TR>
|
163 |
|
|
|
|
|
164 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" ><?php _e("Style Options","sociable");?></TD><TD class="Border-Right"></TD>
|
|
|
165 |
</TR>
|
|
|
166 |
</TABLE>
|
|
|
167 |
<BR/>
|
|
|
168 |
<DIV style="margin:0 0 0 25px" class="Post-subTXT" id="Post-subTXT" >
|
|
|
169 |
<?php _e("Text Size","sociable");?>:
|
|
|
170 |
<select id="text_size" name="skyscraper_options[text_size]" style="margin-left:73px">
|
|
|
171 |
<?php
|
|
|
172 |
for($px=10; $px <= 20; $px++) {
|
|
|
173 |
$sel = "";
|
|
|
174 |
if($px== $skyscraper_options["text_size"])$sel = "selected";
|
175 |
|
|
|
|
|
176 |
?>
|
|
|
177 |
<option <?php echo $sel?> value="<?php echo $px?>"><?php echo $px?>px</option>
|
178 |
|
|
|
|
|
179 |
<?php
|
|
|
180 |
}?>
|
|
|
181 |
</select>
|
|
|
182 |
</DIV>
|
183 |
|
|
|
|
|
184 |
<DIV style="margin:0 0 0 24px" class="Post-subTXT" id="Post-subTXT" ><?php _e("Widget Width","sociable");?>:
|
|
|
185 |
<select id="text_size" id="widget_width" name="skyscraper_options[widget_width]" style="margin-left:50px">
|
186 |
|
|
|
|
|
187 |
<?php
|
|
|
188 |
for($wi=70; $wi <= 90; ) {
|
|
|
189 |
$sel = "";
|
|
|
190 |
if($wi== $skyscraper_options["widget_width"])$sel = "selected";
|
191 |
|
|
|
|
|
192 |
?>
|
193 |
|
|
|
|
|
194 |
<option <?php echo $sel?> value="<?php echo $wi?>"><?php echo $wi?>px</option>
|
195 |
|
|
|
|
|
196 |
<?php
|
|
|
197 |
$wi +=5;
|
|
|
198 |
}?>
|
|
|
199 |
</select>
|
|
|
200 |
</DIV>
|
|
|
201 |
<DIV style="margin:0 0 0 25px" class="Post-subTXT" id="Post-subTXT" ><?php _e("Background Color","sociable");?>:
|
202 |
|
|
|
|
|
203 |
<input value="<?php echo $skyscraper_options['background_color']?>" style="margin-left:22px" id="background_color" name="skyscraper_options[background_color]" type="text" /> ( #fefefe default color)
|
|
|
204 |
</DIV>
|
205 |
|
|
|
|
|
206 |
<DIV style="margin:0 0 0 25px" class="Post-subTXT" id="Post-subTXT" ><?php _e("Labels Color","sociable");?>:
|
207 |
|
|
|
|
|
208 |
<input value="<?php echo $skyscraper_options['labels_color']?>" style="margin-left:49px" id="background_color" name="skyscraper_options[labels_color]" type="text" /> ( #f7f7f7 default color)
|
209 |
|
|
|
|
|
210 |
</DIV>
|
211 |
|
|
|
|
|
212 |
<BR/>
|
213 |
|
|
|
|
|
214 |
<TABLE class="Title-Box" cellspacing="0" cellpadding="0" id="Tagline-Title">
|
|
|
215 |
<TR>
|
|
|
216 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" >
|
|
|
217 |
Social Options
|
|
|
218 |
</TD>
|
|
|
219 |
<TD class="Border-Right"></TD>
|
|
|
220 |
</TR>
|
|
|
221 |
</TABLE>
|
|
|
222 |
<BR/>
|
223 |
|
|
|
|
|
224 |
<DIV style="margin:0 0 0 25px" class="Post-subTXT">
|
|
|
225 |
<?php _e("Your Twitter username","sociable");?>:<?php
|
|
|
226 |
if (!empty($skyscraper_options["twitter_username"])){
|
|
|
227 |
$twitter_username = $skyscraper_options["twitter_username"];
|
|
|
228 |
}
|
|
|
229 |
else{
|
|
|
230 |
$twitter_username = "@";
|
|
|
231 |
}
|
232 |
|
|
|
|
|
233 |
?>
|
|
|
234 |
<input type="text" name="skyscraper_options[twitter_username]" value="<?php echo $twitter_username?>" />
|
|
|
235 |
<select name="skyscraper_options[num_tweets]" id="num_tweets">
|
|
|
236 |
<?php self:: create_select_options($skyscraper_options["num_tweets"]) ?>
|
|
|
237 |
</select>
|
|
|
238 |
</DIV>
|
|
|
239 |
<BR/>
|
|
|
240 |
<DIV style="border: 1px solid rgb(223, 223, 223); margin-left: 22px; font-size: 10px; font-style: italic; width: 327px; padding: 0px 11px;">
|
|
|
241 |
<p>This feature will read your latest tweets and mentions posted by other users and show them on skyscraper sociable.
|
|
|
242 |
<p>Sociable will save and use your twitter username only to read tweets. </p>
|
|
|
243 |
|
|
|
244 |
<p>Your visitors can read the information that you are sharing.</p>
|
|
|
245 |
<p>If you agree check here:
|
|
|
246 |
|
|
|
247 |
<?php
|
|
|
248 |
|
|
|
249 |
$sel = "";
|
|
|
250 |
if (isset($skyscraper_options["accept_read_twitter"])){
|
|
|
251 |
|
|
|
252 |
if ($skyscraper_options["accept_read_twitter"] == 1){
|
|
|
253 |
|
|
|
254 |
$sel = "checked";
|
|
|
255 |
}
|
|
|
256 |
}
|
|
|
257 |
?>
|
|
|
258 |
<input type="checkbox" <?php echo $sel?> name="skyscraper_options[accept_read_twitter]" value="1"/>
|
|
|
259 |
</p>
|
|
|
260 |
</DIV>
|
|
|
261 |
<BR/>
|
|
|
262 |
<BR/>
|
|
|
263 |
<DIV style="margin:0 0 0 25px" class="Post-subTXT">
|
264 |
|
|
|
|
|
265 |
<?php _e("Your RSS feed","sociable");?>:
|
|
|
266 |
<?php
|
|
|
267 |
|
|
|
268 |
if (!empty($skyscraper_options["rss_feed"])){
|
|
|
269 |
$rss_feed = $skyscraper_options["rss_feed"];
|
|
|
270 |
}
|
|
|
271 |
else{
|
|
|
272 |
$rss_feed = "http://";
|
|
|
273 |
}
|
|
|
274 |
?>
|
|
|
275 |
<input type="text" name="skyscraper_options[rss_feed]" style="margin-left: 46px;" value="<?php echo $rss_feed?>" />
|
|
|
276 |
<select name="skyscraper_options[num_rss]" id="num_rss">
|
|
|
277 |
<?php self:: create_select_options($skyscraper_options["num_rss"]) ?>
|
|
|
278 |
</select>
|
|
|
279 |
</DIV><BR/>
|
|
|
280 |
<DIV style="border: 1px solid rgb(223, 223, 223); margin-left: 22px; font-size: 10px; font-style: italic; width: 327px; padding: 0px 11px;">
|
|
|
281 |
<p>This feature will read your rss posts and show them on skyscraper sociable. </p>
|
|
|
282 |
<p>Sociable will save and use the rss url only to read posts.</p>
|
|
|
283 |
<p>Your visitors can read the information that you are sharing.</p>
|
|
|
284 |
<p>If you agree check here:
|
|
|
285 |
|
|
|
286 |
<?php
|
|
|
287 |
|
|
|
288 |
$sel = "";
|
|
|
289 |
if (isset($skyscraper_options["accept_read_rss"])){
|
|
|
290 |
|
|
|
291 |
if ($skyscraper_options["accept_read_rss"] == 1){
|
|
|
292 |
|
|
|
293 |
$sel = "checked";
|
|
|
294 |
}
|
|
|
295 |
}
|
|
|
296 |
?>
|
|
|
297 |
<input type="checkbox" <?php echo $sel?> name="skyscraper_options[accept_read_rss]" value="1"/></p>
|
|
|
298 |
</DIV>
|
|
|
299 |
<BR/><BR/>
|
|
|
300 |
<DIV style="margin:0 0 0 25px" class="Post-subTXT">
|
301 |
|
|
|
|
|
302 |
<?php
|
|
|
|
|
303 |
$checked = "";
|
|
|
304 |
if (isset($skyscraper_options["counters"]["check"])){
|
|
|
305 |
$checked = "checked";
|
|
|
306 |
}
|
|
|
307 |
|
|
|
308 |
$folded = "";
|
|
|
309 |
$unfolded= "";
|
|
|
310 |
if (isset($skyscraper_options["counters"]["folded"])){
|
|
|
311 |
if($skyscraper_options["counters"]["folded"] == "1"){
|
|
|
312 |
$folded = "checked";
|
|
|
313 |
$unfolded= "";
|
|
|
314 |
}else{
|
|
|
315 |
$unfolded = "checked";
|
|
|
316 |
$folded= "";
|
|
|
317 |
}
|
|
|
318 |
}
|
|
|
319 |
|
|
|
320 |
|
|
|
321 |
?>
|
|
|
322 |
<input type="checkbox" <?php echo $checked ?> name="skyscraper_options[counters][check]" id="" />
|
|
|
323 |
Counters
|
|
|
324 |
<input name="skyscraper_options[counters][folded]" <?php echo $unfolded?> value="0" type="radio">Folded
|
|
|
325 |
<input name="skyscraper_options[counters][folded]" <?php echo $folded?> value="1" type="radio">Unfolded
|
|
|
326 |
</DIV><BR/>
|
|
|
327 |
<DIV style="border: 1px solid rgb(223, 223, 223); margin-left: 22px; font-size: 10px; font-style: italic; width: 327px; padding: 0px 11px;">
|
|
|
328 |
<p>This feature load Facebook Counter, Twitter Counter and Google Plus Counter.</p>
|
|
|
329 |
<p>Will load scripts from each site and show information of yours visitors and maybe and could delay the load of the page.</p>
|
|
|
330 |
</p>
|
|
|
331 |
</DIV>
|
|
|
332 |
<BR/> <BR/>
|
|
|
333 |
<DIV style="margin:0 0 0 25px" class="Post-subTXT">
|
|
|
334 |
<?php
|
|
|
335 |
$checked = "";
|
|
|
336 |
if (isset($skyscraper_options["share"]["check"])){
|
|
|
337 |
$checked = "checked";
|
|
|
338 |
}
|
|
|
339 |
|
|
|
340 |
if (isset($skyscraper_options["share"]["folded"])){
|
|
|
341 |
if($skyscraper_options["share"]["folded"] == "1"){
|
|
|
342 |
$folded = "checked";
|
|
|
343 |
$unfolded= "";
|
|
|
344 |
}else{
|
|
|
345 |
$unfolded = "checked";
|
|
|
346 |
$folded= "";
|
|
|
347 |
}
|
|
|
348 |
}
|
|
|
349 |
|
|
|
350 |
|
|
|
351 |
?>
|
|
|
352 |
|
|
|
353 |
<input type="checkbox" <?php echo $checked ?> name="skyscraper_options[share][check]" /> Share
|
|
|
354 |
<input style="margin-left:19px" <?php echo $unfolded?> value="0" name="skyscraper_options[share][folded]" type="radio">Folded
|
|
|
355 |
<input name="skyscraper_options[share][folded]" <?php echo $folded?> value="1" type="radio">Unfolded
|
|
|
356 |
</DIV>
|
357 |
|
|
|
|
|
358 |
<DIV class="Content-Box" id="Preview-Content">
|
|
|
359 |
|
|
|
360 |
</DIV>
|
|
|
361 |
<div style="clear:both"></div>
|
|
|
362 |
|
|
|
363 |
<BR/>
|
|
|
364 |
<DIV class="Content-Box" id="Preview-Content">
|
|
|
365 |
<ul class="items_li">
|
|
|
366 |
<li>
|
|
|
367 |
<?php
|
|
|
368 |
$checked = "";
|
|
|
369 |
if (isset($skyscraper_options['follow_us_check']) && $skyscraper_options['follow_us_check'] == "on"){
|
|
|
370 |
$checked = "checked";
|
|
|
371 |
}
|
|
|
372 |
?>
|
|
|
373 |
Follow Us
|
|
|
374 |
<ul class="sub_item_li">
|
375 |
|
|
|
|
|
376 |
<li>
|
|
|
377 |
<?php
|
|
|
378 |
$checked = "";
|
|
|
379 |
if (isset($skyscraper_options['follow_us']['twitter']["active"]) && $skyscraper_options['follow_us']['twitter']["active"] == "on"){
|
|
|
380 |
$checked = "checked";
|
|
|
381 |
}
|
|
|
382 |
?>
|
|
|
383 |
<input <?php echo $checked ?> name="skyscraper_options[follow_us][twitter][active]" type="checkbox" style="padding-bottom:5px" />
|
|
|
384 |
<?php
|
|
|
385 |
$account = "http://twitter.com/";
|
|
|
386 |
if(!empty($skyscraper_options["follow_us"]["twitter"]["account"])){
|
|
|
387 |
$account = $skyscraper_options["follow_us"]["twitter"]["account"];
|
|
|
388 |
}
|
|
|
389 |
?>
|
|
|
390 |
<input type="hidden" value="t.png" name="skyscraper_options[follow_us][twitter][logo]" />
|
|
|
391 |
<img style="padding-bottom:5px" src="<?php echo SOCIABLE_HTTP_PATH ?>images/toolbar/t.png"/>
|
|
|
392 |
<input size="40" name="skyscraper_options[follow_us][twitter][account]" value="<?php echo $account?>" type="text" />
|
|
|
393 |
</li>
|
|
|
394 |
<li>
|
395 |
|
|
|
|
|
396 |
<?php
|
|
|
397 |
$checked = "";
|
|
|
398 |
if ( isset($skyscraper_options['follow_us']['feed']["active"]) && $skyscraper_options['follow_us']['feed']["active"] == "on"){
|
|
|
399 |
$checked = "checked";
|
|
|
400 |
}
|
|
|
401 |
?>
|
|
|
402 |
<input <?php echo $checked ?> name="skyscraper_options[follow_us][feed][active]" type="checkbox" style="padding-bottom:5px" />
|
|
|
403 |
<input type="hidden" value="rss.png" name="skyscraper_options[follow_us][feed][logo]" />
|
|
|
404 |
<?php
|
|
|
405 |
$rss = "http://";
|
|
|
406 |
if(!empty($skyscraper_options["follow_us"]["feed"]["account"])){
|
|
|
407 |
|
|
|
408 |
$rss = $skyscraper_options["follow_us"]["feed"]["account"];
|
|
|
409 |
}
|
|
|
410 |
?>
|
|
|
411 |
<img style="padding-bottom:5px" src="<?php echo SOCIABLE_HTTP_PATH ?>images/toolbar/rss.png"/>
|
|
|
412 |
<input size="40" value="<?php echo $rss?>" name="skyscraper_options[follow_us][feed][account]" type="text" />
|
|
|
413 |
</li>
|
|
|
414 |
<li>
|
|
|
415 |
<?php
|
|
|
416 |
$checked = "";
|
|
|
417 |
if ( isset($skyscraper_options['follow_us']['fb']["active"]) && $skyscraper_options['follow_us']['fb']["active"] == "on"){
|
|
|
418 |
$checked = "checked";
|
|
|
419 |
}
|
|
|
420 |
?>
|
421 |
|
|
|
|
|
422 |
<input <?php echo $checked ?> name="skyscraper_options[follow_us][fb][active]" type="checkbox" style="padding-bottom:5px" />
|
|
|
423 |
<input type="hidden" value="f.png" name="skyscraper_options[follow_us][fb][logo]" />
|
|
|
424 |
|
|
|
425 |
<?php
|
|
|
426 |
$fb = "http://facebook.com/";
|
|
|
427 |
if(!empty($skyscraper_options["follow_us"]["fb"]["account"])){
|
|
|
428 |
|
|
|
429 |
$fb = $skyscraper_options["follow_us"]["fb"]["account"];
|
|
|
430 |
}
|
|
|
431 |
?>
|
|
|
432 |
<img style="padding-bottom:5px" src="<?php echo SOCIABLE_HTTP_PATH ?>images/toolbar/f.png"/>
|
|
|
433 |
<input size="40" value="<?php echo $fb?>" name="skyscraper_options[follow_us][fb][account]" type="text" />
|
|
|
434 |
</li>
|
|
|
435 |
|
|
|
436 |
<li>
|
|
|
437 |
<?php
|
|
|
438 |
$checked = "";
|
|
|
439 |
if ( isset($skyscraper_options['follow_us']['li']["active"]) && $skyscraper_options['follow_us']['li']["active"] == "on"){
|
|
|
440 |
$checked = "checked";
|
|
|
441 |
}
|
|
|
442 |
?>
|
|
|
443 |
<input <?php echo $checked ?> name="skyscraper_options[follow_us][li][active]" type="checkbox" style="padding-bottom:5px" />
|
|
|
444 |
<input type="hidden" value="i.png" name="skyscraper_options[follow_us][li][logo]" />
|
445 |
|
|
|
|
|
446 |
<input type="hidden" value="linkedin.com/in/" name="skyscraper_options[follow_us][li][url]" />
|
|
|
447 |
<?php
|
|
|
448 |
$li = "http://linkedin.com/";
|
|
|
449 |
if(!empty($skyscraper_options["follow_us"]["li"]["account"])){
|
|
|
450 |
|
|
|
451 |
$li = $skyscraper_options["follow_us"]["li"]["account"];
|
|
|
452 |
}
|
|
|
453 |
?>
|
|
|
454 |
<img style="padding-bottom:5px" src="<?php echo SOCIABLE_HTTP_PATH ?>images/toolbar/i.png"/>
|
|
|
455 |
<input size="40" value="<?php echo $li?>" name="skyscraper_options[follow_us][li][account]" type="text" />
|
|
|
456 |
</li>
|
|
|
457 |
</ul>
|
|
|
458 |
</li>
|
|
|
459 |
</ul>
|
|
|
460 |
</DIV>
|
|
|
461 |
<br />
|
462 |
|
463 |
|
|
|
|
|
|
|
464 |
<div class="Content-Box" id="Active-Content" style="display: block;">
|
|
|
465 |
<br>
|
|
|
466 |
<div align="center" style="width:100%;">
|
|
|
467 |
<table align="center" cellspacing="0" cellpadding="10" border="0" class="GeneralOptions-List">
|
|
|
468 |
<tbody><tr valign="top">
|
469 |
|
|
|
|
|
470 |
<td align="right" class="Title">Active Sociable Banner</td>
|
471 |
|
|
|
|
|
472 |
<td align="left" style="width:5px;">
|
473 |
|
|
|
|
|
474 |
<?php
|
475 |
|
|
|
|
|
476 |
|
477 |
|
|
|
|
|
478 |
$sel = "";
|
479 |
|
|
|
|
|
480 |
|
481 |
|
|
|
|
|
482 |
if (isset($skyscraper_options["sociable_banner"])){
|
483 |
|
|
|
|
|
484 |
|
485 |
|
|
|
|
|
486 |
if (!empty($skyscraper_options["sociable_banner"])){
|
487 |
|
|
|
|
|
488 |
$sel = "checked";
|
489 |
|
|
|
|
|
490 |
}
|
491 |
|
|
|
|
|
492 |
|
493 |
|
|
|
|
|
494 |
}
|
495 |
|
|
|
|
|
496 |
|
497 |
|
|
|
|
|
498 |
?>
|
499 |
|
|
|
|
|
500 |
|
501 |
|
|
|
|
|
502 |
<input type="checkbox" name="skyscraper_options[sociable_banner]" id="sociable_banner" <?php echo $sel?>></td>
|
|
|
503 |
<td align="left" class="Content">
|
|
|
504 |
<span class="TXT">Active Sociable "Reminder to Share" Banner / Check if you want to remind your readers Share your content.</span>
|
|
|
505 |
<br>
|
|
|
506 |
</td>
|
|
|
507 |
</tr>
|
508 |
|
509 |
-
|
510 |
|
511 |
<tr valign="top">
|
512 |
|
513 |
-
|
514 |
|
515 |
-
<td align="right" class="Title">Banner's label (35 char Max.)</td>
|
516 |
|
517 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
518 |
|
519 |
<td align="left" style="width:5px;">
|
520 |
|
|
|
|
|
521 |
<?php
|
522 |
|
|
|
|
|
523 |
$sel = 'Please spread the word: Be Sociable, Share!';
|
524 |
|
|
|
|
|
525 |
if (isset($skyscraper_options["sociable_banner_text"])){
|
526 |
|
|
|
|
|
527 |
if (!empty($skyscraper_options["sociable_banner_text"])){
|
528 |
|
|
|
|
|
529 |
$sel = $skyscraper_options["sociable_banner_text"];
|
530 |
|
|
|
|
|
531 |
}
|
532 |
|
|
|
|
|
533 |
}
|
534 |
|
|
|
|
|
535 |
?>
|
536 |
|
|
|
|
|
537 |
</td>
|
538 |
|
|
|
|
|
539 |
<td align="left" class="Content">
|
540 |
|
|
|
|
|
541 |
|
542 |
|
|
|
|
|
543 |
<span class="TXT"> <input style="width:245px !important" type="text" name="skyscraper_options[sociable_banner_text]" value="<?php echo $sel?>"></span>
|
544 |
|
|
|
|
|
545 |
<br>
|
|
|
546 |
</td>
|
|
|
547 |
</tr>
|
548 |
|
|
|
|
|
549 |
|
550 |
|
|
|
|
|
551 |
<tr valign="top">
|
552 |
|
|
|
|
|
553 |
|
554 |
|
|
|
|
|
555 |
<td align="right" class="Title">Banners Timer (sec.)</td>
|
556 |
|
|
|
|
|
557 |
|
558 |
|
|
|
|
|
559 |
<td align="left" style="width:5px;">
|
560 |
|
|
|
|
|
561 |
|
562 |
|
|
|
|
|
563 |
</td>
|
564 |
|
|
|
|
|
565 |
<td align="left" class="Content">
|
566 |
|
|
|
|
|
567 |
<span class="TXT">
|
568 |
|
|
|
|
|
569 |
|
570 |
|
|
|
|
|
571 |
<select name="skyscraper_options[sociable_banner_timer]" id="banner_timer" >
|
572 |
|
|
|
|
|
573 |
<?php
|
574 |
|
|
|
|
|
575 |
for($timer=10; $timer <= 120; $timer++){
|
576 |
|
|
|
|
|
577 |
|
578 |
|
|
|
|
|
579 |
$sel = "";
|
580 |
|
|
|
|
|
581 |
|
582 |
|
|
|
|
|
583 |
if (!empty($skyscraper_options["sociable_banner_timer"])){
|
584 |
|
|
|
|
|
585 |
|
586 |
|
|
|
|
|
587 |
if ($skyscraper_options["sociable_banner_timer"] == $timer){
|
588 |
|
|
|
|
|
589 |
|
590 |
|
|
|
|
|
591 |
$sel = "selected";
|
592 |
|
|
|
|
|
593 |
}
|
594 |
|
|
|
|
|
595 |
}
|
596 |
|
|
|
|
|
597 |
?>
|
598 |
|
|
|
|
|
599 |
<option value="<?php echo $timer?>" <?php echo $sel ?> ><?php echo $timer?></option>
|
600 |
|
|
|
|
|
601 |
<?php
|
602 |
|
|
|
|
|
603 |
|
604 |
|
|
|
|
|
605 |
$timer = $timer + 4;
|
606 |
|
|
|
|
|
607 |
} ?>
|
608 |
|
|
|
|
|
609 |
</select>
|
610 |
|
|
|
|
|
611 |
|
612 |
|
|
|
|
|
613 |
</span>
|
|
|
614 |
<br>
|
|
|
615 |
</td>
|
|
|
616 |
</tr>
|
617 |
|
|
|
|
|
618 |
|
619 |
|
|
|
|
|
620 |
<tr valign="top">
|
621 |
|
|
|
|
|
622 |
|
623 |
|
|
|
|
|
624 |
<td align="right" class="Title">Font Color <a title="default color #6A6A6A" class="default_values">(#6A6A6A)</a></td>
|
625 |
|
|
|
|
|
626 |
|
627 |
|
|
|
|
|
628 |
<td align="left" style="width:5px;">
|
629 |
|
|
|
|
|
630 |
|
631 |
|
|
|
|
|
632 |
</td>
|
633 |
|
|
|
|
|
634 |
<td align="left" class="Content">
|
635 |
|
|
|
|
|
636 |
|
637 |
|
|
|
|
|
638 |
<span class="TXT">
|
639 |
|
|
|
|
|
640 |
|
641 |
|
|
|
|
|
642 |
<?php
|
643 |
|
|
|
|
|
644 |
$sel = '#6A6A6A';
|
645 |
|
|
|
|
|
646 |
|
647 |
|
|
|
|
|
648 |
if (isset($skyscraper_options["sociable_banner_colorFont"])){
|
649 |
|
|
|
|
|
650 |
|
651 |
|
|
|
|
|
652 |
if (!empty($skyscraper_options["sociable_banner_colorFont"])){
|
653 |
|
|
|
|
|
654 |
|
655 |
|
|
|
|
|
656 |
$sel = $skyscraper_options["sociable_banner_colorFont"];
|
657 |
|
|
|
|
|
658 |
}
|
659 |
|
|
|
|
|
660 |
}
|
661 |
|
|
|
|
|
662 |
?>
|
663 |
|
|
|
|
|
664 |
|
665 |
|
|
|
|
|
666 |
<input type="text" value="<?php echo $sel?>" name="skyscraper_options[sociable_banner_colorFont]" style="width:81px !important">
|
667 |
|
|
|
|
|
668 |
</span>
|
|
|
669 |
<br>
|
|
|
670 |
</td>
|
|
|
671 |
</tr>
|
672 |
|
|
|
|
|
673 |
<!-- Font Size -->
|
674 |
|
|
|
|
|
675 |
<tr valign="top">
|
676 |
|
|
|
|
|
677 |
|
678 |
|
|
|
|
|
679 |
<td align="right" class="Title">Font Size <a title="default size 9px" class="default_values">(9px)</a></td>
|
680 |
|
|
|
|
|
681 |
|
682 |
|
|
|
|
|
683 |
<td align="left" style="width:5px;">
|
684 |
|
|
|
|
|
685 |
|
686 |
|
|
|
|
|
687 |
</td>
|
688 |
|
|
|
|
|
689 |
<td align="left" class="Content">
|
690 |
|
|
|
|
|
691 |
<span class="TXT">
|
692 |
|
|
|
|
|
693 |
|
694 |
|
|
|
|
|
695 |
<select name="skyscraper_options[sociable_banner_fontSize]" id="banner_fontSize" >
|
696 |
|
|
|
|
|
697 |
<?php
|
698 |
|
|
|
|
|
699 |
for($fontSize=8; $fontSize <= 16; $fontSize++){
|
700 |
|
|
|
|
|
701 |
|
702 |
|
|
|
|
|
703 |
$sel = "";
|
704 |
|
|
|
|
|
705 |
|
706 |
|
|
|
|
|
707 |
if (!empty($skyscraper_options["sociable_banner_fontSize"])){
|
708 |
|
|
|
|
|
709 |
|
710 |
|
|
|
|
|
711 |
if ($skyscraper_options["sociable_banner_fontSize"] == $fontSize){
|
712 |
|
|
|
|
|
713 |
|
714 |
|
|
|
|
|
715 |
$sel = "selected";
|
716 |
|
|
|
|
|
717 |
}
|
718 |
|
|
|
|
|
719 |
}
|
720 |
|
|
|
|
|
721 |
?>
|
722 |
|
|
|
|
|
723 |
<option value="<?php echo $fontSize?>px" <?php echo $sel ?> ><?php echo $fontSize?>px</option>
|
724 |
|
|
|
|
|
725 |
<?php
|
726 |
|
|
|
|
|
727 |
} ?>
|
728 |
|
|
|
|
|
729 |
</select>
|
730 |
|
|
|
|
|
731 |
|
732 |
|
|
|
|
|
733 |
|
734 |
|
|
|
|
|
735 |
</span>
|
736 |
|
|
|
|
|
737 |
<br>
|
738 |
|
|
|
|
|
739 |
</td>
|
740 |
|
|
|
|
|
741 |
</tr>
|
742 |
|
|
|
|
|
743 |
|
744 |
|
|
|
|
|
745 |
<!-- color label -->
|
746 |
|
|
|
|
|
747 |
<tr valign="top">
|
748 |
|
|
|
|
|
749 |
|
750 |
|
|
|
|
|
751 |
<td align="right" class="Title">Label Color <a title="default color #F7F7F7" class="default_values">(#F7F7F7)</a></td>
|
752 |
|
|
|
|
|
753 |
|
754 |
|
|
|
|
|
755 |
<td align="left" style="width:5px;">
|
756 |
|
|
|
|
|
757 |
|
758 |
|
|
|
|
|
759 |
</td>
|
760 |
|
|
|
|
|
761 |
<td align="left" class="Content">
|
762 |
|
|
|
|
|
763 |
|
764 |
|
|
|
|
|
765 |
<span class="TXT">
|
766 |
|
|
|
|
|
767 |
|
768 |
|
|
|
|
|
769 |
<?php
|
770 |
|
|
|
|
|
771 |
$sel = '#F7F7F7';
|
772 |
|
|
|
|
|
773 |
|
774 |
|
|
|
|
|
775 |
if (isset($skyscraper_options["sociable_banner_colorLabel"])){
|
776 |
|
|
|
|
|
777 |
|
778 |
|
|
|
|
|
779 |
if (!empty($skyscraper_options["sociable_banner_colorLabel"])){
|
780 |
|
|
|
|
|
781 |
|
782 |
|
|
|
|
|
783 |
$sel = $skyscraper_options["sociable_banner_colorLabel"];
|
784 |
|
|
|
|
|
785 |
}
|
786 |
|
|
|
|
|
787 |
}
|
788 |
|
|
|
|
|
789 |
?>
|
790 |
|
|
|
|
|
791 |
|
792 |
|
|
|
|
|
793 |
<input type="text" value="<?php echo $sel?>" name="skyscraper_options[sociable_banner_colorLabel]" style="width:81px !important">
|
794 |
|
|
|
|
|
795 |
</span>
|
796 |
|
|
|
|
|
797 |
<br>
|
|
|
798 |
</td>
|
|
|
799 |
</tr>
|
800 |
|
|
|
|
|
801 |
<!-- color font -->
|
802 |
|
|
|
|
|
803 |
<tr valign="top">
|
804 |
|
|
|
|
|
805 |
|
806 |
|
|
|
|
|
807 |
<td align="right" class="Title">Background Color <a title="default color #F7F7F7" class="default_values">(#F7F7F7)</a></td>
|
808 |
|
|
|
|
|
809 |
|
810 |
|
|
|
|
|
811 |
<td align="left" style="width:5px;">
|
812 |
|
|
|
|
|
813 |
|
814 |
|
815 |
-
|
|
|
|
|
|
|
|
|
816 |
|
817 |
<td align="left" class="Content">
|
818 |
|
|
|
|
|
819 |
<span class="TXT">
|
820 |
|
|
|
|
|
821 |
<?php
|
822 |
|
|
|
|
|
823 |
$sel = '#F7F7F7';
|
824 |
|
|
|
|
|
825 |
|
826 |
|
|
|
|
|
827 |
if (isset($skyscraper_options["sociable_banner_colorBack"])){
|
828 |
|
|
|
|
|
829 |
|
830 |
|
|
|
|
|
831 |
if (!empty($skyscraper_options["sociable_banner_colorBack"])){
|
832 |
|
|
|
|
|
833 |
|
834 |
|
|
|
|
|
835 |
$sel = $skyscraper_options["sociable_banner_colorBack"];
|
836 |
|
|
|
|
|
837 |
}
|
838 |
|
|
|
|
|
839 |
}
|
840 |
|
|
|
|
|
841 |
?>
|
842 |
|
|
|
|
|
843 |
<input type="text" value="<?php echo $sel?>" name="skyscraper_options[sociable_banner_colorBack]" style="width:81px !important">
|
844 |
|
|
|
|
|
845 |
|
846 |
|
|
|
|
|
847 |
</span>
|
848 |
|
|
|
|
|
849 |
<br>
|
|
|
850 |
</td>
|
|
|
851 |
</tr>
|
852 |
|
|
|
|
|
853 |
|
854 |
|
|
|
|
|
855 |
</tbody></table>
|
856 |
|
|
|
|
|
857 |
<br><br>
|
|
|
858 |
</div>
|
|
|
859 |
</div>
|
|
|
860 |
<!-- general options -->
|
|
|
861 |
<TABLE class="Title-Box" style="cursor:pointer;" cellspacing="0" cellpadding="0" onclick="hideOrShow('GeneralOptions');">
|
862 |
|
|
|
|
|
863 |
<TR>
|
|
|
864 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" id="GeneralOptions-Title" ><span id="GeneralOptions-Tab"> + </span> <?php _e("General Options","sociable");?></TD><TD class="Border-Right"></TD>
|
|
|
865 |
</TR>
|
|
|
866 |
</TABLE>
|
|
|
867 |
<BR/>
|
|
|
868 |
|
|
|
869 |
<DIV class="Content-Box" id="GeneralOptions-Content" style="display:none;" >
|
|
|
870 |
|
|
|
871 |
<BR/>
|
872 |
|
|
|
|
|
873 |
<DIV align="center" style="width:100%;">
|
|
|
874 |
<TABLE align="center" class="GeneralOptions-List" cellspacing="0" border=0 cellpadding ="10" >
|
|
|
875 |
|
|
|
876 |
<TR valign="top" >
|
|
|
877 |
<TD align="right" class="Title" ><?php _e("Widget Position","sociable")?></TD>
|
|
|
878 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["widget_position"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[widget_position]" id="widget_position" /></TD>
|
|
|
879 |
<TD align="left" class="Content">
|
|
|
880 |
<SPAN class="TXT"><?php _e("Check if you want Sociable Fixed on the screen","sociable");?> </SPAN>
|
881 |
|
|
|
|
|
882 |
<BR/>
|
|
|
883 |
|
|
|
884 |
</TD>
|
|
|
885 |
</TR>
|
|
|
886 |
</TABLE>
|
|
|
887 |
<BR/><BR/>
|
|
|
888 |
</DIV>
|
|
|
889 |
</DIV>
|
|
|
890 |
<TABLE class="Title-Box" style="cursor:pointer;" cellspacing="0" cellpadding="0" onclick="hideOrShow('Locations');" >
|
|
|
891 |
<TR>
|
892 |
|
|
|
|
|
893 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" id="Locations-Title" ><span id="Locations-Tab">+ </span><?php _e("Locations","sociable");?></TD><TD class="Border-Right"></TD>
|
|
|
894 |
</TR>
|
|
|
895 |
</TABLE>
|
|
|
896 |
<BR/>
|
|
|
897 |
|
|
|
898 |
<DIV class="Content-Box" id="Locations-Content" style="display:none;" >
|
|
|
899 |
<DIV class="Locations-TXT" id="Locations-TXT" ><?php _e("Please select the locations that you wish to allow the Sociable plugin to insert itself.","sociable");?></DIV>
|
|
|
900 |
|
|
|
901 |
<BR/>
|
|
|
902 |
<DIV align="center" style="width:100%;">
|
903 |
|
|
|
|
|
904 |
<TABLE align="center" class="Locations-List" cellspacing="0" border=0 cellpadding="10">
|
|
|
905 |
<TR valign="top" >
|
|
|
906 |
<TD align="right" class="Title" ><?php _e("Home page","sociable");?></TD>
|
|
|
907 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["locations"]["is_front_page"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[locations][is_front_page]" id="HomePage" /></TD>
|
|
|
908 |
<TD align="left" class="Content">
|
|
|
909 |
<SPAN class="TXT"><?php _e("The front page of the blog (if set to a static page), or the main blog page (if set to your latest posts).","sociable");?></SPAN>
|
|
|
910 |
|
|
|
911 |
</TD>
|
|
|
912 |
</TR>
|
913 |
|
|
|
|
|
914 |
|
|
|
915 |
<TR valign="top" >
|
|
|
916 |
<TD align="right" class="Title" ><?php _e("Blog page","sociable");?></TD>
|
|
|
917 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["locations"]["is_home"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[locations][is_home]" id="BlogPage" /></TD>
|
|
|
918 |
<TD align="left" class="Content">
|
|
|
919 |
<SPAN class="TXT"><?php _e("The home page of the blog if is set to your latest posts, or the posts page if the home page is set to a static page","sociable");?></SPAN>
|
|
|
920 |
|
|
|
921 |
</TD>
|
|
|
922 |
</TR>
|
|
|
923 |
|
|
|
924 |
<TR valign="top" >
|
925 |
|
|
|
|
|
926 |
<TD align="right" class="Title" ><?php _e("Posts","sociable");?></TD>
|
|
|
927 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["locations"]["is_single"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[locations][is_single]" id="Posts" /></TD>
|
|
|
928 |
<TD align="left" class="Content">
|
|
|
929 |
<SPAN class="TXT"><?php _e("Single post pages","sociable");?></SPAN>
|
|
|
930 |
|
|
|
931 |
</TD>
|
|
|
932 |
</TR>
|
|
|
933 |
|
|
|
934 |
<TR valign="top" >
|
|
|
935 |
<TD align="right" class="Title" ><?php _e("Pages","sociable");?></TD>
|
936 |
|
|
|
|
|
937 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["locations"]["is_page"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[locations][is_page]" id="Pages" /></TD>
|
|
|
938 |
<TD align="left" class="Content">
|
|
|
939 |
<SPAN class="TXT"><?php _e("Individual Wordpress pages","sociable");?></SPAN>
|
|
|
940 |
|
|
|
941 |
</TD>
|
|
|
942 |
</TR>
|
|
|
943 |
|
|
|
944 |
<TR valign="top" >
|
|
|
945 |
<TD align="right" class="Title" ><?php _e("Category archives","sociable");?></TD>
|
|
|
946 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["locations"]["is_category"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[locations][is_category]" id="CategoryArchives" /></TD>
|
947 |
|
|
|
|
|
948 |
<TD align="left" class="Content">
|
|
|
949 |
<SPAN class="TXT"><?php _e("Category archive pages","sociable");?></SPAN>
|
|
|
950 |
|
|
|
951 |
</TD>
|
|
|
952 |
</TR>
|
|
|
953 |
|
|
|
954 |
<TR valign="top" >
|
|
|
955 |
<TD align="right" class="Title" ><?php _e("Date archives","sociable");?></TD>
|
|
|
956 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["locations"]["is_date"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[locations][is_date]" id="DateArchives" /></TD>
|
|
|
957 |
<TD align="left" class="Content">
|
958 |
|
|
|
|
|
959 |
<SPAN class="TXT"><?php _e("Date archive pages","sociable");?> </SPAN>
|
|
|
960 |
|
|
|
961 |
</TD>
|
|
|
962 |
</TR>
|
|
|
963 |
|
|
|
964 |
<TR valign="top" >
|
|
|
965 |
<TD align="right" class="Title" ><?php _e("Tag archives","sociable");?></TD>
|
|
|
966 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["locations"]["is_tag"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[locations][is_tag]" id="TagArchives" /></TD>
|
|
|
967 |
<TD align="left" class="Content">
|
968 |
|
|
|
|
|
969 |
<SPAN class="TXT"><?php _e("Tag archive pages","sociable");?> </SPAN>
|
|
|
970 |
|
|
|
971 |
</TD>
|
|
|
972 |
</TR>
|
|
|
973 |
|
|
|
974 |
<TR valign="top" >
|
|
|
975 |
<TD align="right" class="Title" ><?php _e("Author archives","sociable");?></TD>
|
|
|
976 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["locations"]["is_author"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[locations][is_author]" id="AuthorArchives" /></TD>
|
|
|
977 |
<TD align="left" class="Content">
|
978 |
|
|
|
|
|
979 |
<SPAN class="TXT"><?php _e("Author archive pages","sociable");?></SPAN>
|
|
|
980 |
|
|
|
981 |
</TD>
|
|
|
982 |
</TR>
|
|
|
983 |
|
|
|
984 |
<TR valign="top" >
|
|
|
985 |
<TD align="right" class="Title" ><?php _e("Search results","sociable");?></TD>
|
|
|
986 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["locations"]["is_search"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[locations][is_search]" id="SearchResults" /></TD>
|
|
|
987 |
<TD align="left" class="Content">
|
|
|
988 |
<SPAN class="TXT"><?php _e("Search results pages","sociable");?></SPAN>
|
989 |
|
|
|
|
|
990 |
|
|
|
991 |
</TD>
|
|
|
992 |
</TR>
|
|
|
993 |
|
|
|
994 |
<TR valign="top" >
|
|
|
995 |
<TD align="right" class="Title" ><?php _e("RSS feeds","sociable");?></TD>
|
|
|
996 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["locations"]["is_rss"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[locations][is_rss]" id="RssFeeds" /></TD>
|
|
|
997 |
<TD align="left" class="Content">
|
|
|
998 |
<SPAN class="TXT"><?php _e("RSS feeds","sociable");?></SPAN>
|
|
|
999 |
|
|
|
1000 |
</TD>
|
1001 |
|
|
|
|
|
1002 |
</TR>
|
|
|
1003 |
|
|
|
1004 |
</TABLE>
|
|
|
1005 |
<BR/><BR/>
|
|
|
1006 |
</DIV>
|
|
|
1007 |
</DIV>
|
|
|
1008 |
|
|
|
1009 |
<TABLE class="Title-Box" style="cursor:pointer;" cellspacing="0" cellpadding="0" onclick="hideOrShow('Active');" >
|
|
|
1010 |
<TR>
|
|
|
1011 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" id="Active-Title" ><span id="Active-Tab">+ </span><?php _e("Active Skyscraper","sociable");?></TD><TD class="Border-Right"></TD>
|
|
|
1012 |
</TR>
|
1013 |
|
|
|
|
|
1014 |
</TABLE>
|
|
|
1015 |
|
|
|
1016 |
<div style="display: block;" id="Active-Content" class="Content-Box">
|
|
|
1017 |
|
|
|
1018 |
<br>
|
|
|
1019 |
<div align="center" style="width:100%;">
|
|
|
1020 |
<table align="center" cellspacing="0" cellpadding="10" border="0" class="GeneralOptions-List">
|
|
|
1021 |
|
|
|
1022 |
<tbody><tr valign="top">
|
|
|
1023 |
<td align="right" class="Title">Active Skyscraper</td>
|
|
|
1024 |
<td align="left" style="width:5px;">
|
1025 |
|
|
|
|
|
1026 |
<input <?php if(isset($skyscraper_options["active"])) echo "checked='checked'"?> type="checkbox" id="active" name="skyscraper_options[active]" ></td>
|
|
|
1027 |
<td align="left" class="Content">
|
|
|
1028 |
<span class="TXT">Check if you want Sociable Skyscraper enable </span>
|
|
|
1029 |
<br>
|
|
|
1030 |
|
|
|
1031 |
</td>
|
|
|
1032 |
</tr>
|
|
|
1033 |
</tbody></table>
|
|
|
1034 |
<br><br>
|
1035 |
|
|
|
|
|
1036 |
</div>
|
|
|
1037 |
</div>
|
|
|
1038 |
<br/><br/>
|
|
|
1039 |
<?php settings_fields( 'skyscraper_options_group' ); ?>
|
|
|
1040 |
</form>
|
|
|
1041 |
<div class="Content-Box">
|
|
|
1042 |
|
|
|
1043 |
<form id="sociable_reset_form" action="" method="POST">
|
|
|
1044 |
<?php wp_nonce_field('sociable-reset'); ?>
|
|
|
1045 |
<input type="hidden" id="skyscraper_reset" name="skyscraper_reset" value="1">
|
1046 |
|
|
|
|
|
1047 |
<?php //submit_button( __( 'Reset Sociable' ) , 'primary', 'sociable_reset', false ); ?>
|
|
|
1048 |
</form>
|
|
|
1049 |
|
|
|
1050 |
<div id="ActionsBar">
|
|
|
1051 |
<div style="cursor:pointer;line-height:15px;" onclick="document.getElementById('form1').submit();" class="SaveChanges"><br>
|
|
|
1052 |
<span style="margin:30px;">Save Changes</span>
|
|
|
1053 |
</div>
|
|
|
1054 |
<div style="cursor:pointer;line-height:15px;font-size:12px;" onclick="document.getElementById('sociable_reset_form').submit();" name="sociable_reset" id="sociable_reset" class="ResetSociable"><br>
|
|
|
1055 |
<span style="margin:40px;margin-left:35px;">Reset Skyscraper</span>
|
1056 |
|
|
|
|
|
1057 |
</div>
|
|
|
1058 |
</div>
|
|
|
1059 |
</div>
|
|
|
1060 |
|
|
|
1061 |
</div>
|
|
|
1062 |
<div style="float:left;width:49%;margin-left:15px" name="skyscraper" id="skyscraper">
|
|
|
1063 |
<script type="text/javascript">
|
|
|
1064 |
var base_url_sociable = "<?php echo SOCIABLE_HTTP_PATH?>";
|
|
|
1065 |
</script>
|
|
|
1066 |
</div>
|
|
|
1067 |
<?php
|
|
|
1068 |
}
|
|
|
1069 |
|
|
|
1070 |
/**
|
|
|
1071 |
* Add The Menu Pages To The Administration Options
|
|
|
1072 |
*/
|
|
|
1073 |
|
|
|
1074 |
function add_menu_pages(){
|
|
|
1075 |
|
|
|
1076 |
global $sociable_post_types;
|
|
|
1077 |
|
|
|
1078 |
$url = $_SERVER["QUERY_STRING"];
|
|
|
1079 |
// $page[] = add_options_page( __( 'Sociable Options' ), __( 'Sociable Plugin' ), 'manage_options', 'sociable_select' , array( 'sociable_Admin_Options' , 'Select_Sociable_Page' ) );
|
|
|
1080 |
//$page[]= add_plugins_page( __( 'Sociable Options' ), __( 'Sociable Plugin' ), 'manage_options', 'Create_Options_Page_Skycraper' );
|
|
|
1081 |
//$page[]= add_plugins_page( 'sociable_options', 'sociable_options', 'read', 'Create_Options_Page' );
|
|
|
1082 |
$page[] = add_options_page( "","", 'manage_options', 'sociable_select' , array( 'sociable_Admin_Options' , 'Select_Sociable_Page' ) );
|
|
|
1083 |
$page[] = add_options_page( "","", 'manage_options', 'sociable_options' , array( 'sociable_Admin_Options' , 'Create_Options_Page' ) );
|
|
|
1084 |
$page[] = add_options_page( "","", 'manage_options', 'skyscraper_options' , array( 'sociable_Admin_Options' , 'Create_Options_Page_Skycraper' ) );
|
|
|
1085 |
// Add a new submenu under Settings:
|
|
|
1086 |
// $page[] = add_options_page(__( 'Sociable Options' ),__( 'Sociable Plugin' ), 'manage_options', 'sociable_select', 'Select_Sociable_Page');
|
|
|
1087 |
// Add a new top-level menu (ill-advised):
|
|
|
1088 |
add_menu_page(__( 'Sociable Options' ), __( 'Select Sociable Plugin' ), 'manage_options', '/options-general.php?page=sociable_select' );
|
|
|
1089 |
// Add a submenu to the custom top-level menu:
|
|
|
1090 |
add_submenu_page('options-general.php?page=sociable_select', __( 'Sociable Options' ), __( 'Sociable Options' ), 'manage_options', 'sociable_options' , array( 'sociable_Admin_Options' , 'Create_Options_Page' ) );
|
|
|
1091 |
// Add a second submenu to the custom top-level menu:
|
|
|
1092 |
add_submenu_page('options-general.php?page=sociable_select', __( 'Skyscraper Options' ), __( 'Skyscraper Options' ), 'manage_options', 'skyscraper_options' , array( 'sociable_Admin_Options' , 'Create_Options_Page_Skycraper' ) );
|
|
|
1093 |
|
|
|
1094 |
//Add CSS And Javascript Specific To This Options Pages
|
|
|
1095 |
add_action( 'admin_print_styles-' . $page[0] , array( 'sociable_Admin_Options' , 'enqueue_styles' ) );
|
|
|
1096 |
add_action( 'admin_print_scripts-' . $page[0] , array( 'sociable_Admin_Options' , 'enqueue_scripts' ) );
|
|
|
1097 |
|
|
|
1098 |
add_action( 'admin_print_styles-' . $page[1] , array( 'sociable_Admin_Options' , 'enqueue_styles' ) );
|
|
|
1099 |
add_action( 'admin_print_scripts-' . $page[1] , array( 'sociable_Admin_Options' , 'enqueue_scripts' ) );
|
|
|
1100 |
add_action( 'admin_print_styles-' . $page[2] , array( 'sociable_Admin_Options' , 'enqueue_styles' ) );
|
|
|
1101 |
add_action( 'admin_print_scripts-' . $page[2] , array( 'sociable_Admin_Options' , 'enqueue_scripts' ) );
|
|
|
1102 |
|
|
|
1103 |
if( isset( $_POST['sociable_reset'] ) ){
|
|
|
1104 |
check_admin_referer( 'sociable-reset' );
|
|
|
1105 |
|
|
|
1106 |
sociable_reset();
|
|
|
1107 |
wp_redirect( $_SERVER['HTTP_REFERER' ] );
|
|
|
1108 |
}
|
|
|
1109 |
|
|
|
1110 |
if( isset( $_POST['skyscraper_reset'] ) ){
|
|
|
1111 |
check_admin_referer( 'sociable-reset' );
|
|
|
1112 |
|
|
|
1113 |
skyscraper_reset();
|
|
|
1114 |
wp_redirect( $_SERVER['HTTP_REFERER' ] );
|
|
|
1115 |
}
|
|
|
1116 |
|
|
|
1117 |
|
|
|
1118 |
/*
|
|
|
1119 |
* We can create The Meta Boxes Here
|
|
|
1120 |
*/
|
|
|
1121 |
foreach( $sociable_post_types as $type => $data ){
|
|
|
1122 |
self::add_meta_box( $type );
|
|
|
1123 |
}
|
|
|
1124 |
//Also on posts and pages
|
|
|
1125 |
self::add_meta_box( 'post' );
|
|
|
1126 |
self::add_meta_box( 'page' );
|
|
|
1127 |
|
|
|
1128 |
}
|
|
|
1129 |
|
|
|
1130 |
/*
|
|
|
1131 |
* Function to Enqueue The Styles For The Options Page
|
|
|
1132 |
*/
|
|
|
1133 |
function enqueue_styles(){
|
|
|
1134 |
wp_enqueue_style( 'style-admin-css', SOCIABLE_HTTP_PATH . 'css/style-admin.css' );
|
|
|
1135 |
wp_enqueue_style( 'sociable-admin-css', SOCIABLE_HTTP_PATH . 'css/sociable-admin.css' );
|
|
|
1136 |
wp_enqueue_style( 'sociablecss' , SOCIABLE_HTTP_PATH . 'css/sociable.css' );
|
|
|
1137 |
}
|
|
|
1138 |
|
|
|
1139 |
/*
|
|
|
1140 |
* Function To Enqueue The Scripts For The Options Page
|
|
|
1141 |
*/
|
|
|
1142 |
function enqueue_scripts(){
|
|
|
1143 |
wp_enqueue_script('jquery');
|
|
|
1144 |
wp_enqueue_script('jquery-ui-core',false,array('jquery'));
|
|
|
1145 |
wp_enqueue_script('jquery-ui-sortable',false,array('jquery','jquery-ui-core'));
|
|
|
1146 |
wp_enqueue_script( 'sociable-admin-js', SOCIABLE_HTTP_PATH . 'js/sociable-admin.js' , array( 'jquery','jquery-ui-core' , 'jquery-ui-sortable' ) );
|
|
|
1147 |
wp_enqueue_script( 'admin-fn-js', SOCIABLE_HTTP_PATH . 'js/admin-fn.js' , array( 'jquery','jquery-ui-core' , 'jquery-ui-sortable' ) );
|
|
|
1148 |
|
|
|
1149 |
}
|
|
|
1150 |
|
|
|
1151 |
|
|
|
1152 |
|
|
|
1153 |
/*
|
|
|
1154 |
* Function To Add The Settings Fields.
|
|
|
1155 |
*/
|
|
|
1156 |
function do_site_selection_list($plugin = 'sociable'){
|
|
|
1157 |
|
|
|
1158 |
if ($plugin == 'sociable'){
|
|
|
1159 |
|
|
|
1160 |
global $sociable_options;
|
|
|
1161 |
$option_plugin = $sociable_options;
|
|
|
1162 |
$name_plugin = "sociable_options";
|
|
|
1163 |
}
|
|
|
1164 |
else{
|
|
|
1165 |
|
|
|
1166 |
global $skyscraper_options;
|
|
|
1167 |
$option_plugin = $skyscraper_options;
|
|
|
1168 |
$name_plugin = "skyscraper_options";
|
|
|
1169 |
}
|
|
|
1170 |
|
|
|
1171 |
|
|
|
1172 |
$sociable_known_sites = get_option( 'sociable_known_sites' );
|
|
|
1173 |
/*
|
|
|
1174 |
* Sort The List Based On The Active Sites So That They Display Correctly.
|
|
|
1175 |
*/
|
|
|
1176 |
$active_sites = isset( $option_plugin['active_sites'] ) && is_array( $option_plugin['active_sites'] ) ? $option_plugin['active_sites'] : array() ;
|
|
|
1177 |
|
|
|
1178 |
//Start Blank
|
|
|
1179 |
$active = Array();
|
|
|
1180 |
|
|
|
1181 |
//Disabled Untill Proven Active
|
|
|
1182 |
$disabled = $sociable_known_sites;
|
|
|
1183 |
|
|
|
1184 |
//Loop Through The Active Sites, sorting into 2 arrays
|
|
|
1185 |
foreach( $active_sites as $sitename => $value ) {
|
|
|
1186 |
$active[$sitename] = $disabled[$sitename];
|
|
|
1187 |
unset( $disabled[$sitename] );
|
|
|
1188 |
}
|
|
|
1189 |
|
|
|
1190 |
uksort($disabled, "strnatcasecmp");
|
|
|
1191 |
|
|
|
1192 |
$sites = array_merge( $active, $disabled );
|
|
|
1193 |
|
|
|
1194 |
$imagepath = isset( $option_plugin['sociable_imagedir'] ) ? $option_plugin['sociable_imagedir'] : '' ;
|
|
|
1195 |
|
|
|
1196 |
if ($imagepath == "") {
|
|
|
1197 |
$imagepath = trailingslashit( SOCIABLE_HTTP_PATH ) . 'images/';
|
|
|
1198 |
} else {
|
|
|
1199 |
$imagepath .= trailingslashit( $imagepath );
|
|
|
1200 |
}
|
|
|
1201 |
|
|
|
1202 |
$out ='<ul id="sociable_site_list" >' ;
|
|
|
1203 |
$io = 0;
|
|
|
1204 |
foreach( $sites as $sitename => $site ){
|
|
|
1205 |
|
|
|
1206 |
|
|
|
1207 |
//Set Checked And Active If Relevant
|
|
|
1208 |
if( array_key_exists( $sitename, $active_sites ) ){
|
|
|
1209 |
$checked = 'checked="checked"';
|
|
|
1210 |
$active = 'active';
|
|
|
1211 |
} else {
|
|
|
1212 |
$checked = '';
|
|
|
1213 |
$active = 'inactive';
|
|
|
1214 |
}
|
|
|
1215 |
if ( $sitename != "More"){
|
|
|
1216 |
if (isset($site["counter"])){
|
|
|
1217 |
//$image = "<img src='".SOCIABLE_HTTP_PATH."images/".$site["favicon"]."'>";
|
|
|
1218 |
$image = $site["url"];
|
|
|
1219 |
}else{
|
|
|
1220 |
$image = _get_sociable_image( $site, '' );
|
|
|
1221 |
}
|
|
|
1222 |
}else{
|
|
|
1223 |
$image = "<img src='".SOCIABLE_HTTP_PATH."images/more.png'>";
|
|
|
1224 |
}
|
|
|
1225 |
|
|
|
1226 |
// if ( ! isset( $site['spriteCoordinates']) || isset( $sociable_options['sociable_disablesprite'] ) ) {
|
|
|
1227 |
// if (strpos($site['favicon'], 'http') === 0) {
|
|
|
1228 |
// $imgsrc = $site['favicon'];
|
|
|
1229 |
// } else {
|
|
|
1230 |
// $imgsrc = $imagepath.$site['favicon'];
|
|
|
1231 |
// }
|
|
|
1232 |
// $img = '<img src="' . $imgsrc . '" width="16" height="16" />';
|
|
|
1233 |
// } else {
|
|
|
1234 |
// $imgsrc = $imagepath."services-sprite.gif";
|
|
|
1235 |
// $services_sprite_url = $imagepath . "services-sprite.png";
|
|
|
1236 |
// $spriteCoords = $site['spriteCoordinates'];
|
|
|
1237 |
// $img = '<img src="' . $imgsrc . '" width="16" height="16" style="background: transparent url(' . $services_sprite_url . ') no-repeat; background-position:-' . $spriteCoords[0] . 'px -' . $spriteCoords[1] . 'px" />';
|
|
|
1238 |
// }
|
|
|
1239 |
|
|
|
1240 |
$out .= '<li id="' . $sitename . '" class="' . $active . '">';
|
|
|
1241 |
|
|
|
1242 |
$out .= '<input type="checkbox" id="cb_' . $sitename . '" name="'.$name_plugin.'[active_sites][' . $sitename . ']" ' . $checked . ' />';
|
|
|
1243 |
|
|
|
1244 |
$out .= $image;
|
|
|
1245 |
if (!isset($site["counter"])){
|
|
|
1246 |
$out .= $sitename;
|
|
|
1247 |
}
|
|
|
1248 |
|
|
|
1249 |
$out .= '</li>';
|
|
|
1250 |
|
|
|
1251 |
}
|
|
|
1252 |
|
|
|
1253 |
|
|
|
1254 |
echo $out."</ul>";
|
|
|
1255 |
|
|
|
1256 |
}
|
|
|
1257 |
|
|
|
1258 |
/*
|
|
|
1259 |
* Create The HTML For The Options Page
|
|
|
1260 |
*/
|
|
|
1261 |
function Create_Options_Page(){
|
|
|
1262 |
global $sociable_options;
|
|
|
1263 |
?>
|
1264 |
|
|
|
|
|
1265 |
<div class="wrap">
|
1266 |
|
|
|
|
|
1267 |
<DIV style="margin:0 0 0 25px" class="Post-subTXT" id="Post-subTXT" >
|
|
|
1268 |
|
|
|
1269 |
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblogplay.com%2F&send=false&layout=standard&width=450&show_faces=true&action=recommend&colorscheme=light&font&height=80&appId=133479460071366" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:40px;" allowTransparency="true"></iframe><br />
|
1270 |
-
|
|
|
|
|
|
|
1271 |
|
1272 |
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
|
|
|
1273 |
<br />
|
|
|
1274 |
</div>
|
|
|
1275 |
<h2 style="clear:both;"><?php _e( 'Sociable Options' ); ?></h2>
|
|
|
1276 |
<form method="post" action="options.php" id="form1" autocomplete="off">
|
1277 |
|
|
|
|
|
1278 |
|
|
|
1279 |
<?php wp_nonce_field('sociable-config'); ?>
|
|
|
1280 |
<INPUT type="hidden" class="version-INPUT" id="version" name="sociable_options[version]" value="<?php echo$sociable_options["version"];?>" />
|
|
|
|
|
|
|
1281 |
<TABLE class="Title-Box" cellspacing="0" cellpadding="0" id="Preview-Title" style="margin:0 0 0 25px">
|
|
|
1282 |
<TR>
|
|
|
1283 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" >Preview</TD><TD class="Border-Right"></TD>
|
|
|
1284 |
</TR>
|
|
|
1285 |
</TABLE>
|
|
|
1286 |
<BR/>
|
|
|
1287 |
|
|
|
1288 |
<DIV class="Content-Box" id="Preview-Content">
|
1289 |
|
|
|
|
|
1290 |
<DIV style="margin:0 0 0 25px" align="left" class="Live-Preview" id="Live-Preview" ><?php _e("Live preview of how Sociable will appear on your blog.","sociable")?></DIV>
|
|
|
1291 |
|
|
|
1292 |
<BR/>
|
|
|
1293 |
|
|
|
1294 |
<DIV style="margin:0 0 0 25px" class="Post-TXT" id="Post-TXT" ><?php _e("This is your post here...","sociable")?></DIV>
|
|
|
1295 |
|
|
|
1296 |
<DIV style="margin:0 0 0 25px" class="Post-subTXT" id="Post-subTXT" >Lorem ipsum dolor sit amet, consectetur adipiscing elit.</DIV>
|
|
|
1297 |
|
|
|
1298 |
<BR/>
|
|
|
1299 |
<DIV style="margin:0 0 0 25px" id="ShareAndEnjoy" > <?php do_sociable(); ?></DIV>
|
|
|
1300 |
</DIV>
|
|
|
1301 |
<TABLE class="Title-Box" cellspacing="0" cellpadding="0" id="Tagline-Title">
|
1302 |
|
|
|
|
|
1303 |
<TR>
|
|
|
1304 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" ><?php _e("Tagline","sociable");?></TD><TD class="Border-Right"></TD>
|
|
|
1305 |
</TR>
|
|
|
1306 |
</TABLE>
|
|
|
1307 |
<BR/>
|
|
|
1308 |
|
|
|
1309 |
<DIV class="Content-Box" id="Tagline-Content">
|
|
|
1310 |
<DIV class="Tagline-TXT" id="Tagline-TXT" ><?php _e('Previously we used "Share and Enjoy", remember the good old days?',"sociable");?></DIV>
|
|
|
1311 |
|
|
|
1312 |
<BR/>
|
|
|
1313 |
<DIV style="width:100%;height:60px;">
|
1314 |
|
|
|
|
|
1315 |
<INPUT type="text" class="Tagline-INPUT" id="tagline" name="sociable_options[tagline]" value="<?php echo$sociable_options["tagline"];?>" />
|
|
|
1316 |
|
|
|
1317 |
<DIV class="ToSociable" >
|
|
|
1318 |
<INPUT type="checkbox" <?php if (!empty($sociable_options["help_grow"])) echo "checked = 'checked'";?> name="sociable_options[help_grow]" id="LinkToSociable" />
|
|
|
1319 |
<?php _e("Link to Sociable","sociable");?><BR/>
|
|
|
1320 |
<SPAN style="font-size:14px;"><?php _e("(Help us grow, please leave the link so others discover Sociable from your blog)","sociable");?></SPAN>
|
|
|
1321 |
</DIV>
|
|
|
1322 |
</DIV>
|
|
|
1323 |
</DIV>
|
|
|
1324 |
|
|
|
1325 |
|
|
|
1326 |
<TABLE class="Title-Box" cellspacing="0" cellpadding="0" id="Tagline-Title">
|
1327 |
|
|
|
|
|
1328 |
<TR>
|
|
|
1329 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" ><?php _e("Icons to Include","sociable");?></TD><TD class="Border-Right"></TD>
|
|
|
1330 |
</TR>
|
|
|
1331 |
</TABLE>
|
|
|
1332 |
<BR/>
|
|
|
1333 |
|
|
|
1334 |
<DIV class="Content-Box" id="IconsToInclude-Box" style="">
|
|
|
1335 |
<DIV class="IconsToInclude-TXT" id="IconsToInclude-TXT" >
|
|
|
1336 |
<?php _e("Check the sites you want to appear on your blog.","sociable");?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1337 |
</DIV>
|
1338 |
|
1339 |
|
|
|
1340 |
<BR/>
|
|
|
1341 |
|
|
|
1342 |
<?php self::do_site_selection_list(); ?>
|
|
|
1343 |
</DIV>
|
|
|
1344 |
|
|
|
1345 |
<div class="soc_clear"></div>
|
|
|
1346 |
|
|
|
1347 |
<TABLE class="Title-Box" cellspacing="0" cellpadding="0" id="IconSize-Title" style="margin-top:20px;">
|
|
|
1348 |
<TR>
|
|
|
1349 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" ><?php _e("Icons Size","sociable");?></TD><TD class="Border-Right"></TD>
|
|
|
1350 |
</TR>
|
|
|
1351 |
</TABLE>
|
1352 |
|
|
|
|
|
1353 |
<BR/>
|
|
|
1354 |
|
|
|
1355 |
<DIV class="Content-Box" style="margin-left:-3px" id="IconSize-Content">
|
|
|
1356 |
<?php
|
|
|
1357 |
$checked16 = "";
|
|
|
1358 |
$checked32 = "";
|
|
|
1359 |
$checked48 = "";
|
|
|
1360 |
$checked64 = "";
|
|
|
1361 |
if ($sociable_options["icon_size"] == 16) $checked16 = "checked='checked'";
|
|
|
1362 |
if ($sociable_options["icon_size"] == 32) $checked32 = "checked='checked'";
|
|
|
1363 |
if ($sociable_options["icon_size"] == 48) $checked48 = "checked='checked'";
|
|
|
1364 |
if ($sociable_options["icon_size"] == 64) $checked64 = "checked='checked'";
|
|
|
1365 |
//echo $checked16;
|
|
|
1366 |
?>
|
|
|
1367 |
<SPAN class="IconSize-Item"> <INPUT value="16" type="radio" name="sociable_options[icon_size]" <?php echo $checked16;?> />16x16 Pixels </SPAN>
|
|
|
1368 |
|
|
|
1369 |
<SPAN class="IconSize-Item"> <INPUT <?php echo$checked32;?> value="32" type="radio" name="sociable_options[icon_size]" />32x32 Pixels </SPAN>
|
|
|
1370 |
|
|
|
1371 |
<SPAN class="IconSize-Item"> <INPUT <?php echo$checked48;?> value="48" type="radio" name="sociable_options[icon_size]"/>48x48 Pixels </SPAN>
|
1372 |
|
|
|
|
|
1373 |
|
|
|
1374 |
<SPAN class="IconSize-Item"> <INPUT <?php echo$checked64;?> value="64" type="radio" name="sociable_options[icon_size]" />64x64 Pixels </SPAN>
|
|
|
1375 |
|
|
|
1376 |
|
|
|
1377 |
</DIV>
|
|
|
1378 |
|
|
|
1379 |
<TABLE class="Title-Box" cellspacing="0" cellpadding="0" id="IconSize-Title" style="margin-top:20px;">
|
|
|
1380 |
<TR>
|
|
|
1381 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" ><?php _e("Icons Style","sociable");?></TD><TD class="Border-Right"></TD>
|
|
|
1382 |
</TR>
|
|
|
1383 |
</TABLE>
|
1384 |
|
|
|
|
|
1385 |
<BR/>
|
|
|
1386 |
|
|
|
1387 |
<DIV class="Content-Box" id="IconSize-Content" style="padding:20px;">
|
|
|
1388 |
|
|
|
1389 |
<?php
|
|
|
1390 |
$checked1 = "";
|
|
|
1391 |
$checked2 = "";
|
|
|
1392 |
$checked3 = "";
|
|
|
1393 |
$checked4 = "";
|
|
|
1394 |
$checked5 = "";
|
|
|
1395 |
$checked6 = "";
|
|
|
1396 |
if ($sociable_options["icon_option"] == "option1") $checked1 = "checked='checked'";
|
|
|
1397 |
if ($sociable_options["icon_option"] == "option2") $checked2 = "checked='checked'";
|
|
|
1398 |
if ($sociable_options["icon_option"] == "option3") $checked3 = "checked='checked'";
|
|
|
1399 |
if ($sociable_options["icon_option"] == "option4") $checked4 = "checked='checked'";
|
|
|
1400 |
if ($sociable_options["icon_option"] == "option5") $checked5 = "checked='checked'";
|
|
|
1401 |
if ($sociable_options["icon_option"] == "option6") $checked6 = "checked='checked'";
|
|
|
1402 |
|
|
|
1403 |
$imagepath = isset( $sociable_options['sociable_imagedir'] ) ? $sociable_options['sociable_imagedir'] : '' ;
|
|
|
1404 |
|
|
|
1405 |
if ($imagepath == "") {
|
|
|
1406 |
$imagepath = trailingslashit( SOCIABLE_HTTP_PATH ) . 'images/';
|
|
|
1407 |
} else {
|
|
|
1408 |
$imagepath .= trailingslashit( $imagepath );
|
|
|
1409 |
}
|
|
|
1410 |
//echo $imagepath;
|
|
|
1411 |
?>
|
|
|
1412 |
|
|
|
1413 |
<SPAN class="IconStyle-Item"> <INPUT name="sociable_options[icon_option]" <?php echo$checked1?> value="option1" type="radio" /> <IMG src="<?php echo$imagepath?>icon_styles/<?php echo$sociable_options["icon_size"]?>/option1_<?php echo$sociable_options["icon_size"]?>.jpg" /> </SPAN>
|
|
|
1414 |
<BR/><BR/>
|
|
|
1415 |
<SPAN class="IconStyle-Item"> <INPUT name="sociable_options[icon_option]" <?php echo$checked2?> value="option2" type="radio" /> <IMG src="<?php echo$imagepath?>icon_styles/<?php echo$sociable_options["icon_size"]?>/option2_<?php echo$sociable_options["icon_size"]?>.jpg" /> </SPAN>
|
1416 |
|
|
|
|
|
1417 |
<BR/><BR/>
|
|
|
1418 |
<SPAN class="IconStyle-Item"> <INPUT name="sociable_options[icon_option]" <?php echo$checked3?> value="option3" type="radio" /> <IMG src="<?php echo$imagepath?>icon_styles/<?php echo$sociable_options["icon_size"]?>/option3_<?php echo$sociable_options["icon_size"]?>.jpg" /> </SPAN>
|
|
|
1419 |
<BR/><BR/>
|
|
|
1420 |
<SPAN class="IconStyle-Item"> <INPUT name="sociable_options[icon_option]" <?php echo$checked4?> value="option4" type="radio" /> <IMG src="<?php echo$imagepath?>icon_styles/<?php echo$sociable_options["icon_size"]?>/option4_<?php echo$sociable_options["icon_size"]?>.jpg" /> </SPAN>
|
1421 |
|
|
|
|
|
1422 |
<BR/><BR/>
|
|
|
1423 |
<SPAN class="IconStyle-Item"> <INPUT name="sociable_options[icon_option]" <?php echo$checked5?> value="option5" type="radio" /> <IMG src="<?php echo$imagepath?>icon_styles/<?php echo$sociable_options["icon_size"]?>/option5_<?php echo$sociable_options["icon_size"]?>.jpg" /> </SPAN>
|
|
|
1424 |
<BR/><BR/>
|
|
|
1425 |
<SPAN class="IconStyle-Item"> <INPUT name="sociable_options[icon_option]" <?php echo$checked6?> value="option6" type="radio" /> <IMG src="<?php echo$imagepath?>icon_styles/16/option_6_16.png" /> </SPAN>
|
|
|
1426 |
<BR/><BR/>
|
|
|
1427 |
</DIV>
|
|
|
1428 |
|
|
|
1429 |
<TABLE class="Title-Box" style="cursor:pointer;" cellspacing="0" cellpadding="0" onclick="hideOrShow('Locations');" >
|
1430 |
|
|
|
|
|
1431 |
<TR>
|
|
|
1432 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" id="Locations-Title" ><span id="Locations-Tab">+ </span><?php _e("Locations","sociable");?></TD><TD class="Border-Right"></TD>
|
|
|
1433 |
</TR>
|
|
|
1434 |
</TABLE>
|
|
|
1435 |
<BR/>
|
|
|
1436 |
|
|
|
1437 |
<DIV class="Content-Box" id="Locations-Content" style="display:none;" >
|
|
|
1438 |
<DIV class="Locations-TXT" id="Locations-TXT" ><?php _e("Please select the locations that you wish to allow the Sociable plugin to insert itself.","sociable");?></DIV>
|
|
|
1439 |
|
|
|
1440 |
<BR/>
|
1441 |
|
|
|
|
|
1442 |
<DIV align="center" style="width:100%;">
|
|
|
1443 |
<TABLE align="center" class="Locations-List" cellspacing="0" border=0 cellpadding="10">
|
|
|
1444 |
<TR valign="top" >
|
|
|
1445 |
<TD align="right" class="Title" ><?php _e("Home page","sociable");?></TD>
|
|
|
1446 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["locations"]["is_front_page"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[locations][is_front_page]" id="HomePage" /></TD>
|
|
|
1447 |
<TD align="left" class="Content">
|
|
|
1448 |
<SPAN class="TXT"><?php _e("The front page of the blog (if set to a static page), or the main blog page (if set to your latest posts).","sociable");?></SPAN>
|
|
|
1449 |
|
|
|
1450 |
</TD>
|
1451 |
|
|
|
|
|
1452 |
</TR>
|
|
|
1453 |
|
|
|
1454 |
<TR valign="top" >
|
|
|
1455 |
<TD align="right" class="Title" ><?php _e("Blog page","sociable");?></TD>
|
|
|
1456 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["locations"]["is_home"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[locations][is_home]" id="BlogPage" /></TD>
|
|
|
1457 |
<TD align="left" class="Content">
|
|
|
1458 |
<SPAN class="TXT"><?php _e("The home page of the blog if is set to your latest posts, or the posts page if the home page is set to a static page","sociable");?></SPAN>
|
|
|
1459 |
|
|
|
1460 |
</TD>
|
|
|
1461 |
</TR>
|
1462 |
|
|
|
|
|
1463 |
|
|
|
1464 |
<TR valign="top" >
|
|
|
1465 |
<TD align="right" class="Title" ><?php _e("Posts","sociable");?></TD>
|
|
|
1466 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["locations"]["is_single"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[locations][is_single]" id="Posts" /></TD>
|
|
|
1467 |
<TD align="left" class="Content">
|
|
|
1468 |
<SPAN class="TXT"><?php _e("Single post pages","sociable");?></SPAN>
|
|
|
1469 |
|
|
|
1470 |
</TD>
|
|
|
1471 |
</TR>
|
|
|
1472 |
|
|
|
1473 |
<TR valign="top" >
|
1474 |
|
|
|
|
|
1475 |
<TD align="right" class="Title" ><?php _e("Pages","sociable");?></TD>
|
|
|
1476 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["locations"]["is_page"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[locations][is_page]" id="Pages" /></TD>
|
|
|
1477 |
<TD align="left" class="Content">
|
|
|
1478 |
<SPAN class="TXT"><?php _e("Individual Wordpress pages","sociable");?></SPAN>
|
|
|
1479 |
|
|
|
1480 |
</TD>
|
|
|
1481 |
</TR>
|
|
|
1482 |
|
|
|
1483 |
<TR valign="top" >
|
|
|
1484 |
<TD align="right" class="Title" ><?php _e("Category archives","sociable");?></TD>
|
1485 |
|
|
|
|
|
1486 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["locations"]["is_category"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[locations][is_category]" id="CategoryArchives" /></TD>
|
|
|
1487 |
<TD align="left" class="Content">
|
|
|
1488 |
<SPAN class="TXT"><?php _e("Category archive pages","sociable");?></SPAN>
|
|
|
1489 |
|
|
|
1490 |
</TD>
|
|
|
1491 |
</TR>
|
|
|
1492 |
|
|
|
1493 |
<TR valign="top" >
|
|
|
1494 |
<TD align="right" class="Title" ><?php _e("Date archives","sociable");?></TD>
|
|
|
1495 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["locations"]["is_date"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[locations][is_date]" id="DateArchives" /></TD>
|
1496 |
|
|
|
|
|
1497 |
<TD align="left" class="Content">
|
|
|
1498 |
<SPAN class="TXT"><?php _e("Date archive pages","sociable");?> </SPAN>
|
|
|
1499 |
|
|
|
1500 |
</TD>
|
|
|
1501 |
</TR>
|
|
|
1502 |
|
|
|
1503 |
<TR valign="top" >
|
|
|
1504 |
<TD align="right" class="Title" ><?php _e("Tag archives","sociable");?></TD>
|
|
|
1505 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["locations"]["is_tag"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[locations][is_tag]" id="TagArchives" /></TD>
|
1506 |
|
|
|
|
|
1507 |
<TD align="left" class="Content">
|
|
|
1508 |
<SPAN class="TXT"><?php _e("Tag archive pages","sociable");?> </SPAN>
|
|
|
1509 |
|
|
|
1510 |
</TD>
|
|
|
1511 |
</TR>
|
|
|
1512 |
|
|
|
1513 |
<TR valign="top" >
|
|
|
1514 |
<TD align="right" class="Title" ><?php _e("Author archives","sociable");?></TD>
|
|
|
1515 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["locations"]["is_author"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[locations][is_author]" id="AuthorArchives" /></TD>
|
1516 |
|
|
|
|
|
1517 |
<TD align="left" class="Content">
|
|
|
1518 |
<SPAN class="TXT"><?php _e("Author archive pages","sociable");?></SPAN>
|
|
|
1519 |
|
|
|
1520 |
</TD>
|
|
|
1521 |
</TR>
|
|
|
1522 |
|
|
|
1523 |
<TR valign="top" >
|
|
|
1524 |
<TD align="right" class="Title" ><?php _e("Search results","sociable");?></TD>
|
|
|
1525 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["locations"]["is_search"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[locations][is_search]" id="SearchResults" /></TD>
|
|
|
1526 |
<TD align="left" class="Content">
|
1527 |
|
|
|
|
|
1528 |
<SPAN class="TXT"><?php _e("Search results pages","sociable");?></SPAN>
|
|
|
1529 |
|
|
|
1530 |
</TD>
|
|
|
1531 |
</TR>
|
|
|
1532 |
|
|
|
1533 |
<TR valign="top" >
|
|
|
1534 |
<TD align="right" class="Title" ><?php _e("RSS feeds","sociable");?></TD>
|
|
|
1535 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["locations"]["is_rss"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[locations][is_rss]" id="RssFeeds" /></TD>
|
|
|
1536 |
<TD align="left" class="Content">
|
|
|
1537 |
<SPAN class="TXT"><?php _e("RSS feeds","sociable");?></SPAN>
|
1538 |
|
|
|
|
|
1539 |
|
|
|
1540 |
</TD>
|
|
|
1541 |
</TR>
|
|
|
1542 |
|
|
|
1543 |
|
|
|
1544 |
</TABLE>
|
|
|
1545 |
<BR/><BR/>
|
|
|
1546 |
</DIV>
|
|
|
1547 |
</DIV>
|
|
|
1548 |
|
|
|
1549 |
<TABLE class="Title-Box" style="cursor:pointer;" cellspacing="0" cellpadding="0" onclick="hideOrShow('GeneralOptions');">
|
|
|
1550 |
<TR>
|
|
|
1551 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" id="GeneralOptions-Title" ><span id="GeneralOptions-Tab"> + </span> <?php _e("General Options","sociable");?></TD><TD class="Border-Right"></TD>
|
1552 |
|
|
|
|
|
1553 |
</TR>
|
|
|
1554 |
</TABLE>
|
|
|
1555 |
<BR/>
|
|
|
1556 |
|
|
|
1557 |
<DIV class="Content-Box" id="GeneralOptions-Content" style="display:none;" >
|
|
|
1558 |
|
|
|
1559 |
<BR/>
|
|
|
1560 |
<DIV align="center" style="width:100%;">
|
|
|
1561 |
<TABLE align="center" class="GeneralOptions-List" cellspacing="0" border=0 cellpadding ="10" >
|
|
|
1562 |
<TR valign="top" >
|
|
|
1563 |
<TD align="right" class="Title" ><?php _e("Automatic mode","sociable")?></TD>
|
1564 |
|
|
|
|
|
1565 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["automatic_mode"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[automatic_mode]" id="AutoMode" /></TD>
|
|
|
1566 |
<TD align="left" class="Content">
|
|
|
1567 |
<SPAN class="TXT"><?php _e("Do you want to automatically use Sociable on the locations specified?","sociable");?> </SPAN>
|
|
|
1568 |
<BR/>
|
|
|
1569 |
<SPAN class="sTXT">
|
|
|
1570 |
<?php _e("If this is unchecked, you will have to use the shortcode[sociable/] or template","sociable");?> tag ?php if( function_exists( do_sociable() ) ){ do_sociable(); }
|
|
|
1571 |
</SPAN>
|
|
|
1572 |
|
|
|
1573 |
</TD>
|
1574 |
|
|
|
|
|
1575 |
</TR>
|
|
|
1576 |
|
|
|
1577 |
|
|
|
1578 |
</TR>
|
|
|
1579 |
<TR valign="top" >
|
|
|
1580 |
<TD align="right" class="Title" ><?php _e("Use styleSheet","sociable");?></TD>
|
|
|
1581 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["use_stylesheet"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[use_stylesheet]" id="UseStyleSheets" /></TD>
|
|
|
1582 |
<TD align="left" class="Content">
|
|
|
1583 |
<SPAN class="TXT"><?php _e("Do you want to use the default stylesheet for sociable?","sociable");?></SPAN>
|
|
|
1584 |
</TD>
|
1585 |
|
|
|
|
|
1586 |
</TR>
|
|
|
1587 |
<TR valign="top" >
|
|
|
1588 |
<TD align="right" class="Title" ><?php _e("Use your own icons","sociable");?></TD>
|
|
|
1589 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["custom_icons"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[custom_icons]" id="UseStyleSheets" /></TD>
|
|
|
1590 |
<TD align="left" class="Content">
|
|
|
1591 |
<SPAN class="TXT"><?php _e("Do you want to use your own icons for sociable?","sociable");?></SPAN>
|
|
|
1592 |
</TD>
|
|
|
1593 |
</TR>
|
1594 |
|
|
|
|
|
1595 |
<TR valign="top" >
|
|
|
1596 |
<TD align="right" class="Title" ><?php _e("Use images","sociable");?></TD>
|
|
|
1597 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["use_images"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[use_images]" id="UseImages" /></TD>
|
|
|
1598 |
<TD align="left" class="Content">
|
|
|
1599 |
<SPAN class="TXT"><?php _e("Do you want to use the Sociable images? If not, the plugin will insert plain text links.","sociable");?></SPAN>
|
|
|
1600 |
</TD>
|
|
|
1601 |
</TR>
|
|
|
1602 |
|
|
|
1603 |
|
|
|
1604 |
<TR valign="top" >
|
1605 |
|
|
|
|
|
1606 |
<TD align="right" class="Title" ><?php _e("Use alpha mask","sociable");?></TD>
|
|
|
1607 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["use_alphamask"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[use_alphamask]" id="AlphaMask" /></TD>
|
|
|
1608 |
<TD align="left" class="Content">
|
|
|
1609 |
<SPAN class="TXT"><?php _e("Do you want to use alpha masks on the images (available only on the Original Sociable)?","sociable");?></SPAN>
|
|
|
1610 |
</TD>
|
|
|
1611 |
</TR>
|
|
|
1612 |
<TR valign="top" >
|
|
|
1613 |
<TD align="right" class="Title" ><?php _e("Bottom and Top","sociable");?></TD>
|
1614 |
|
|
|
|
|
1615 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["topandbottom"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[topandbottom]" id="TopAndBottom" /></TD>
|
|
|
1616 |
<TD align="left" class="Content">
|
|
|
1617 |
<SPAN class="TXT"><?php _e("Do you want to use Sociable plugin to show up at the top and bottom?","sociable");?></SPAN>
|
|
|
1618 |
</TD>
|
|
|
1619 |
</TR>
|
|
|
1620 |
<TR valign="top" >
|
|
|
1621 |
<TD align="right" class="Title" ><?php _e("Open in new window","sociable");?></TD>
|
|
|
1622 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["new_window"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[new_window]" id="OpenNewWindow" /></TD>
|
1623 |
|
|
|
|
|
1624 |
<TD align="left" class="Content">
|
|
|
1625 |
<SPAN class="TXT"><?php _e("do you want to open the links in a new window?","sociable");?></SPAN>
|
|
|
1626 |
</TD>
|
|
|
1627 |
</TR>
|
|
|
1628 |
|
|
|
1629 |
|
|
|
1630 |
|
|
|
1631 |
</TABLE>
|
|
|
1632 |
|
|
|
1633 |
<BR/><BR/>
|
|
|
1634 |
</DIV>
|
|
|
1635 |
</DIV>
|
|
|
1636 |
<TABLE class="Title-Box" style="cursor:pointer;" cellspacing="0" cellpadding="0" onclick="hideOrShow('Active');" >
|
1637 |
|
|
|
|
|
1638 |
<TR>
|
|
|
1639 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" id="Active-Title" ><span id="Active-Tab">+ </span><?php _e("Active Sociable Classic","sociable");?></TD><TD class="Border-Right"></TD>
|
|
|
1640 |
</TR>
|
|
|
1641 |
</TABLE>
|
|
|
1642 |
|
|
|
1643 |
<div style="display: block;" id="Active-Content" class="Content-Box">
|
|
|
1644 |
|
|
|
1645 |
<br>
|
|
|
1646 |
<div align="center" style="width:100%;">
|
|
|
1647 |
<table align="center" cellspacing="0" cellpadding="10" border="0" class="GeneralOptions-List">
|
1648 |
|
|
|
|
|
1649 |
|
|
|
1650 |
<tbody><tr valign="top">
|
|
|
1651 |
<td align="right" class="Title">Active Sociable Classic</td>
|
|
|
1652 |
<td align="left" style="width:5px;">
|
|
|
1653 |
<input <?php if(isset($sociable_options["active"])) echo "checked='checked'"?> type="checkbox" id="active" name="sociable_options[active]" /></td>
|
|
|
1654 |
<td align="left" class="Content">
|
|
|
1655 |
<span class="TXT">Check if you want Sociable Classic enable </span>
|
|
|
1656 |
<br>
|
1657 |
|
|
|
|
|
1658 |
|
|
|
1659 |
</td>
|
|
|
1660 |
</tr>
|
|
|
1661 |
</tbody></table>
|
|
|
1662 |
<br><br>
|
|
|
1663 |
</div>
|
|
|
1664 |
</div>
|
|
|
1665 |
<?php //<HR style="height:10px;background:#18305d;"/>?>
|
|
|
1666 |
<?php settings_fields( 'sociable_options_group' ); ?>
|
|
|
1667 |
</FORM>
|
|
|
1668 |
<DIV class="Content-Box" >
|
1669 |
|
|
|
|
|
1670 |
<DIV id="ActionsBar">
|
|
|
1671 |
<DIV class="SaveChanges" onClick="document.getElementById('form1').submit();" style="cursor:pointer;line-height:15px;"><br/>
|
|
|
1672 |
<span style="margin:30px;"><?php _e("Save Changes","sociable");?></span>
|
1673 |
|
|
|
|
|
1674 |
</DIV>
|
|
|
1675 |
<DIV class="ResetSociable" id="sociable_reset" name="sociable_reset" onClick="document.getElementById('sociable_reset_form').submit();" style="cursor:pointer;line-height:15px;font-size:12px;"><br/>
|
|
|
1676 |
<span style="margin:40px;margin-left:35px;"><?php _e("Reset Sociable","sociable");?></span>
|
|
|
1677 |
</DIV>
|
|
|
1678 |
<DIV class="UninstallSociable" onClick="document.getElementById('sociable_remove_form').submit();" style="cursor:pointer;line-height:15px;font-size:12px;"><br/>
|
1679 |
|
|
|
|
|
1680 |
<span style="margin:25px;margin-left:20px;"><?php _e("Completly Uninstall Sociable","sociable");?></span>
|
|
|
1681 |
</DIV>
|
|
|
1682 |
</DIV>
|
|
|
1683 |
</DIV>
|
|
|
1684 |
<br>
|
|
|
1685 |
<br>
|
1686 |
|
|
|
|
|
1687 |
<?php //do_settings_sections( 'sociable_options' ); ?>
|
|
|
1688 |
<form id="sociable_reset_form" action="" method="POST">
|
1689 |
|
|
|
|
|
1690 |
<?php wp_nonce_field('sociable-reset'); ?>
|
|
|
1691 |
<input type="hidden" id="sociable_reset" name="sociable_reset" value="1">
|
|
|
1692 |
<?php //submit_button( __( 'Reset Sociable' ) , 'primary', 'sociable_reset', false ); ?>
|
|
|
1693 |
</form>
|
|
|
1694 |
|
|
|
1695 |
|
|
|
1696 |
</div>
|
|
|
1697 |
<?php }
|
|
|
1698 |
|
|
|
1699 |
function add_meta_box( $page ){
|
|
|
1700 |
add_meta_box( 'sociable_off' , __( 'Disable sociable' ), array( 'sociable_Admin_Options' , 'create_meta_box' ) , $page, 'side', 'default' );
|
|
|
1701 |
}
|
|
|
1702 |
|
|
|
1703 |
function create_meta_box(){
|
|
|
1704 |
global $post;
|
|
|
1705 |
$sociableoff = false;
|
|
|
1706 |
$checked = '';
|
|
|
1707 |
if ( get_post_meta( $post->ID,'_sociableoff',true ) ) {
|
|
|
1708 |
$checked = 'checked="checked"';
|
|
|
1709 |
}
|
|
|
1710 |
wp_nonce_field( 'update_sociable_off' , 'sociable_nonce' );
|
|
|
1711 |
echo '<input type="checkbox" id="sociableoff" name="sociableoff" ' . $checked . ' /> <p class="description">' . __('Check This To Disable Sociable 2 On This Post Only.') . '</p>';
|
|
|
1712 |
|
|
|
1713 |
}
|
|
|
1714 |
|
|
|
1715 |
function save_post( $post_id ){
|
|
|
1716 |
|
|
|
1717 |
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
|
|
|
1718 |
return $post_id;
|
|
|
1719 |
// verify this came from the our screen and with proper authorization,
|
|
|
1720 |
// because save_post can be triggered at other times
|
|
|
1721 |
|
|
|
1722 |
$nonce = ( isset( $_POST['sociable_nonce'] ) ) ? $_POST['sociable_nonce'] : false ;
|
|
|
1723 |
if ( ! $nonce || ! wp_verify_nonce( $nonce, 'update_sociable_off' ) )
|
|
|
1724 |
return $post_id;
|
|
|
1725 |
// Check permissions
|
|
|
1726 |
if ( 'page' == $_POST['post_type'] ){
|
|
|
1727 |
if ( !current_user_can( 'edit_page', $post_id ) )
|
|
|
1728 |
return;
|
|
|
1729 |
} else {
|
|
|
1730 |
if ( !current_user_can( 'edit_post', $post_id ) )
|
|
|
1731 |
return;
|
|
|
1732 |
}
|
|
|
1733 |
|
|
|
1734 |
//Lets Do This
|
|
|
1735 |
if( isset( $_POST['sociableoff'] ) ){
|
|
|
1736 |
update_post_meta( $post_id, '_sociableoff' , $_POST['sociableoff'] );
|
|
|
1737 |
} else {
|
|
|
1738 |
delete_post_meta( $post_id, '_sociableoff' );
|
|
|
1739 |
}
|
|
|
1740 |
|
|
|
1741 |
return $post_id;
|
|
|
1742 |
}
|
|
|
1743 |
|
|
|
1744 |
/**
|
|
|
1745 |
* This Function Runs Before The Options Are Printed Out.
|
|
|
1746 |
*/
|
|
|
1747 |
function general_options_callback(){
|
|
|
1748 |
|
|
|
1749 |
return true;
|
|
|
1750 |
}
|
|
|
1751 |
|
|
|
1752 |
/**
|
|
|
1753 |
* This Function Runs Before The Location Options Are Echoed Out.
|
|
|
1754 |
*/
|
|
|
1755 |
function location_options_callback(){
|
|
|
1756 |
echo '<p>' . __( 'Please Select The Locations That You Wish To Allow The Sociable 2 Plugin To Insert The Links.' ) . '</p>';
|
|
|
1757 |
}
|
|
|
1758 |
|
|
|
1759 |
/**
|
|
|
1760 |
* Adds A Function For The add_settings_field(); function
|
|
|
1761 |
*
|
|
|
1762 |
* should be passed:
|
|
|
1763 |
* $data = array(
|
|
|
1764 |
* 'id' => 'field_id_and_name',
|
|
|
1765 |
* 'description' => 'field Description Should Go Here, This is Not The Title, Rather The Description'
|
|
|
1766 |
* );
|
|
|
1767 |
*/
|
|
|
1768 |
function Checkbox( $data ){
|
|
|
1769 |
global $sociable_options;
|
|
|
1770 |
|
|
|
1771 |
//Save The Locations As a seperate array option
|
1772 |
|
|
|
|
|
1773 |
if( isset( $data['locations'] ) ){
|
|
|
1774 |
$name = 'sociable_options[locations][' . $data['id'] . ']';
|
|
|
1775 |
$checked = ( isset( $sociable_options['locations'][$data['id']] ) ) ? 'checked="checked"' : '' ;
|
|
|
1776 |
} else {
|
|
|
1777 |
$name = 'sociable_options[' . $data['id'] . ']';
|
|
|
1778 |
$checked = ( isset( $sociable_options[$data['id']] ) ) ? 'checked="checked"' : '' ;
|
|
|
1779 |
}
|
|
|
1780 |
|
|
|
1781 |
|
|
|
1782 |
echo '<input ' . $checked . ' id="' . $data['id'] . '" name="' . $name . '" type="checkbox" /> <span class="description">' . $data['description'] . '</span>';
|
|
|
1783 |
}
|
|
|
1784 |
|
|
|
1785 |
function TextInput( $data ){
|
|
|
1786 |
global $sociable_options;
|
|
|
1787 |
|
|
|
1788 |
$value = ( isset( $sociable_options[$data['id']] ) ) ? $sociable_options[$data['id']] : '';
|
|
|
1789 |
|
|
|
1790 |
echo '<input id="' . $data['id'] . '" name="sociable_options[' . $data['id'] . ']" size="40" type="text" value="' . esc_attr( $value ) . '" /> <br /><span class="description">' . $data['description'] . '</span>';
|
|
|
1791 |
|
|
|
1792 |
}
|
|
|
1793 |
|
|
|
1794 |
function TextArea( $data ){
|
|
|
1795 |
global $sociable_options;
|
|
|
1796 |
|
|
|
1797 |
$value = ( isset( $sociable_options[$data['id']] ) ) ? $sociable_options[$data['id']] : '';
|
|
|
1798 |
|
|
|
1799 |
echo '<textarea id="' . $data['id'] . '" name="sociable_options[' . $data['id'] . ']" >' . $value . '</textarea> <br /><span class="description">' . $data['description'] . '</span>';
|
|
|
1800 |
|
|
|
1801 |
}
|
|
|
1802 |
|
|
|
1803 |
function radio( $data ){
|
|
|
1804 |
global $sociable_options;
|
|
|
1805 |
|
|
|
1806 |
$cur_val = ( isset( $sociable_options[$data['id']] ) ) ? $sociable_options[$data['id']] : 0 ;
|
|
|
1807 |
|
|
|
1808 |
echo '<span class="description">' . $data['description'] . '</span><br />';
|
|
|
1809 |
foreach( $data['options'] as $value => $option ){
|
|
|
1810 |
$selected = ( $value == $cur_val ) ? 'checked="checked"' : '' ;
|
|
|
1811 |
echo '<input type="radio" name="sociable_options[' . $data['id'] . ']" value="' . $value . '" ' . $selected . ' /> <span>' . $option . '</span><br />';
|
|
|
1812 |
}
|
|
|
1813 |
}
|
|
|
1814 |
|
|
|
1815 |
|
|
|
1816 |
}
|
|
|
1817 |
function add_ie7() {
|
|
|
1818 |
echo'<!--[if lt IE 7]>
|
|
|
1819 |
<script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE7.js"
|
|
|
1820 |
type="text/javascript"></script>
|
|
|
1821 |
<![endif]-->
|
1822 |
|
|
|
|
|
1823 |
<!--[if lt IE 8]>
|
|
|
1824 |
<script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js"
|
|
|
1825 |
type="text/javascript"></script>
|
|
|
1826 |
<![endif]-->
|
|
|
1827 |
<!--[if lt IE 9]>
|
|
|
1828 |
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
|
|
|
1829 |
<![endif]-->';
|
|
|
1830 |
}
|
|
|
1831 |
//add_action('admin_head', 'add_ie7' );
|
|
|
1832 |
?>
|
1 |
<?php
|
2 |
+
|
3 |
/*
|
4 |
|
5 |
+
|
6 |
+
|
7 |
* Administration Options Class For Sociable 2
|
8 |
|
9 |
+
|
10 |
+
|
11 |
*/
|
12 |
+
|
13 |
class sociable_Admin_Options{
|
14 |
+
|
15 |
/**
|
16 |
|
17 |
+
|
18 |
+
|
19 |
* A Function To Hook To Admin Init.
|
20 |
|
21 |
+
|
22 |
+
|
23 |
*/
|
24 |
+
|
25 |
function init(){
|
26 |
+
|
27 |
register_setting( 'sociable_options_group' , 'sociable_options' );
|
28 |
+
|
29 |
//Add The Settings Sections
|
30 |
+
|
31 |
// add_settings_section( 'sociable_locations', __( 'Locations' ), array( 'sociable_Admin_Options' , 'location_options_callback' ) , 'sociable_options' );
|
32 |
+
|
33 |
// add_settings_section( 'sociable_options', __( 'General Options' ), array( 'sociable_Admin_Options' , 'general_options_callback' ) , 'sociable_options' );
|
34 |
+
|
35 |
register_setting( 'skyscraper_options_group' , 'skyscraper_options' );
|
36 |
+
|
37 |
// add_settings_section( 'sociable_locations', __( 'Locations' ), array( 'sociable_Admin_Options' , 'location_options_callback' ) , 'skyscraper_options' );
|
38 |
|
39 |
+
|
40 |
+
|
41 |
}
|
42 |
+
|
43 |
function skyscraper_init(){
|
44 |
+
|
45 |
register_setting( 'skyscraper_options_group' , 'skyscraper_options' );
|
46 |
+
|
47 |
add_settings_section( 'sociable_locations', __( 'Locations' ), array( 'sociable_Admin_Options' , 'location_options_callback' ) , 'skyscraper_options' );
|
48 |
+
|
49 |
//Add All The Settings Fields
|
50 |
+
|
51 |
//self::add_settings_fields();
|
52 |
|
53 |
+
|
54 |
+
|
55 |
}
|
56 |
+
|
57 |
function Select_Sociable_Page(){
|
58 |
+
|
59 |
global $sociable_options;
|
60 |
|
61 |
+
|
62 |
+
|
63 |
?>
|
64 |
+
|
65 |
<div class="wrap" style="margin-top:25px">
|
66 |
+
|
67 |
<div style="width: 80%; margin-left: 25px; color: rgb(147, 147, 147); font-weight: bold; font-size: 15px;">
|
68 |
+
|
69 |
Congrats! You are joining the leader in the sharing space of WordPress plugins. Started more than 2 years ago, and with over 1,5mm downloads now, here comes the latest version 4.1 <br /><br />
|
70 |
+
|
71 |
You can select Sociable Classic and/or Sociable Skyscraper to spread the World, increase your traffic and your reader's ability to share your posts! <br /> <br />
|
72 |
|
73 |
+
|
74 |
+
|
75 |
</div>
|
76 |
+
|
77 |
<div class="wrap" style="width:42%;float:left">
|
78 |
+
|
79 |
<?php //wp_nonce_field('sociable-config'); ?>
|
80 |
+
|
81 |
<TABLE class="Title-Box" cellspacing="0" cellpadding="0" id="Preview-Title" style="margin:0 0 0 25px">
|
82 |
|
83 |
+
|
84 |
+
|
85 |
<TR>
|
86 |
+
|
87 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" >Skyscraper Sociable</TD><TD class="Border-Right"></TD>
|
88 |
|
89 |
+
|
90 |
+
|
91 |
</TR>
|
92 |
|
93 |
+
|
94 |
+
|
95 |
<TR>
|
96 |
+
|
97 |
<TD colspan="3" >
|
98 |
+
|
99 |
<table>
|
100 |
+
|
101 |
<tr>
|
102 |
|
103 |
+
|
104 |
+
|
105 |
<td>
|
106 |
+
|
107 |
<img src="<?php echo SOCIABLE_HTTP_PATH ?>images/skyphoto.png" style="margin-left:-5px;margin-top:20px;" />
|
108 |
+
|
109 |
</td>
|
110 |
+
|
111 |
<td valign="top" >
|
112 |
+
|
113 |
<br/><br/>
|
114 |
+
|
115 |
<span style="font-size:18px;color:#18305e;font-weight:bold;">Skyscraper Sociable</span>
|
116 |
+
|
117 |
<p style="font-size:12px;color:#939393;font-weight:bold;" >
|
118 |
+
|
119 |
Now introducing the ultimate advanced and feature packed plugin for setting up rating system on your WordPress blog.
|
120 |
|
121 |
+
|
122 |
+
|
123 |
<br/ ><br/ >
|
124 |
+
|
125 |
Sociable Skyscraper allows you to set up different rating systems for posts, pages and comments with great degree of customization.
|
126 |
+
|
127 |
<br/ ><br/ >
|
128 |
+
|
129 |
List of features is so smart and non-stop growing:
|
130 |
+
|
131 |
<br/ ><br/ >
|
132 |
+
|
133 |
You can get more "Sociable" with Sociable Skyscraper and easily getting
|
134 |
+
|
135 |
Rating and Review of: posts, pages, comments, Facebook, G+, LinkedIN,
|
136 |
+
|
137 |
Twitter as well as multiple ratings for posts and pages. Visitor's counter,
|
138 |
+
|
139 |
visitor's from Facebook and Twitter... As a plus you get an easy way to get
|
140 |
+
|
141 |
TOP or HOME from Sociable Skyscraper.
|
142 |
+
|
143 |
<br/ ><br/ >
|
144 |
+
|
145 |
Enjoy it now!!!
|
146 |
+
|
147 |
<br/ ><br/ >
|
148 |
+
|
149 |
Be Sociable, Share!!!
|
150 |
+
|
151 |
</p>
|
152 |
+
|
153 |
|
154 |
+
|
155 |
<a href="?page=skyscraper_options" style="color:#ffffff;text-decoration:none;" ><img src="<?php echo SOCIABLE_HTTP_PATH ?>images/button_newsky.png" ></a>
|
156 |
+
|
157 |
|
158 |
+
|
159 |
</td>
|
160 |
+
|
161 |
</tr>
|
162 |
|
163 |
+
|
164 |
+
|
165 |
</table>
|
166 |
+
|
167 |
</TD>
|
168 |
+
|
169 |
|
170 |
+
|
171 |
|
172 |
+
|
173 |
</TR>
|
174 |
+
|
175 |
</TABLE>
|
176 |
+
|
177 |
<BR/>
|
178 |
+
|
179 |
|
180 |
+
|
181 |
</div>
|
182 |
+
|
183 |
<div class="wrap" style="margin-left:30px;width:48%;float:left">
|
184 |
+
|
185 |
<TABLE class="Title-Box" cellspacing="0" cellpadding="0" id="Preview-Title" style="margin:0 0 0 25px">
|
186 |
+
|
187 |
<TR>
|
188 |
|
189 |
+
|
190 |
+
|
191 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" >Classic Sociable</TD><TD class="Border-Right"></TD>
|
192 |
+
|
193 |
</TR>
|
194 |
+
|
195 |
<TR>
|
196 |
+
|
197 |
<TD colspan="3" >
|
198 |
+
|
199 |
<div style="margin-left:5px;">
|
200 |
+
|
201 |
<br /><br />
|
202 |
+
|
203 |
<span style="font-size:18px;color:#18305e;font-weight:bold;">Classic Sociable</span>
|
204 |
+
|
205 |
|
206 |
+
|
207 |
<p style="font-size:12px;color:#939393;font-weight:bold;" >
|
208 |
|
209 |
+
|
210 |
+
|
211 |
We've improved our visual interface, the default icons are now much
|
212 |
+
|
213 |
<br/ >
|
214 |
+
|
215 |
more appealing, and a touch bit larger (you do want your readers to
|
216 |
+
|
217 |
<br/ >
|
218 |
+
|
219 |
share your posts, don't you? :) Get it now!
|
220 |
+
|
221 |
</p>
|
222 |
+
|
223 |
<img src="<?php echo SOCIABLE_HTTP_PATH ?>images/socciable_old.png" ><br/>
|
224 |
+
|
225 |
<div style="height: 176px;"></div>
|
226 |
+
|
227 |
<a href="?page=sociable_options" style="color:#ffffff;text-decoration:none;" ><img src="<?php echo SOCIABLE_HTTP_PATH ?>images/button_sociabb.png" ></a>
|
228 |
+
|
229 |
</div>
|
230 |
+
|
231 |
</TD>
|
232 |
|
233 |
+
|
234 |
+
|
235 |
|
236 |
+
|
237 |
</TR>
|
238 |
+
|
239 |
</TABLE>
|
240 |
+
|
241 |
<BR/>
|
242 |
+
|
243 |
|
244 |
+
|
245 |
</div>
|
246 |
+
|
247 |
</div>
|
248 |
+
|
249 |
<?php }
|
250 |
+
|
251 |
|
252 |
+
|
253 |
function create_select_options($value){
|
254 |
+
|
255 |
|
256 |
+
|
257 |
for($i=3; $i<=9; ){
|
258 |
+
|
259 |
|
260 |
+
|
261 |
$sel = "";
|
262 |
+
|
263 |
if ($value == $i){
|
264 |
+
|
265 |
$sel = "selected";
|
266 |
+
|
267 |
}
|
268 |
+
|
269 |
echo "<option ".$sel." value='".$i."'> latest ".$i."</option>";
|
270 |
+
|
271 |
|
272 |
+
|
273 |
$i = $i+3;
|
274 |
+
|
275 |
}
|
276 |
+
|
277 |
}
|
278 |
+
|
279 |
|
280 |
+
|
281 |
|
282 |
+
|
283 |
function Create_Options_Page_Skycraper(){
|
284 |
|
285 |
+
|
286 |
+
|
287 |
global $skyscraper_options;
|
288 |
+
|
289 |
?>
|
290 |
|
291 |
+
|
292 |
+
|
293 |
<div class="wrap" style="width:48%;float:left">
|
294 |
|
295 |
+
|
296 |
+
|
297 |
<DIV style="margin:0 0 0 25px" class="Post-subTXT" id="Post-subTXT" >
|
298 |
|
299 |
+
|
300 |
+
|
301 |
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblogplay.com%2F&send=false&layout=standard&width=450&show_faces=true&action=recommend&colorscheme=light&font&height=80&appId=133479460071366" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:40px;" allowTransparency="true"></iframe>
|
302 |
|
303 |
+
|
304 |
+
|
305 |
+
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://blogplay.com" data-text="Check the sociable plugin" >Tweet</a>
|
306 |
+
|
307 |
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
|
308 |
+
|
309 |
<br />
|
310 |
+
|
311 |
</div>
|
312 |
|
313 |
+
|
314 |
+
|
315 |
<form method="post" action="options.php" id="form1" autocomplete="off">
|
316 |
+
|
317 |
<?php wp_nonce_field('sociable-config'); ?>
|
318 |
+
|
319 |
<INPUT type="hidden" class="version-INPUT" id="version" name="skyscraper_options[version]" value="<?php echo $skyscraper_options["version"];?>" />
|
320 |
+
|
321 |
<TABLE class="Title-Box" cellspacing="0" cellpadding="0" id="Preview-Title" style="margin:0 0 0 25px">
|
322 |
+
|
323 |
<TR>
|
324 |
|
325 |
+
|
326 |
+
|
327 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" ><?php _e("Style Options","sociable");?></TD><TD class="Border-Right"></TD>
|
328 |
+
|
329 |
</TR>
|
330 |
+
|
331 |
</TABLE>
|
332 |
+
|
333 |
<BR/>
|
334 |
+
|
335 |
<DIV style="margin:0 0 0 25px" class="Post-subTXT" id="Post-subTXT" >
|
336 |
+
|
337 |
<?php _e("Text Size","sociable");?>:
|
338 |
+
|
339 |
<select id="text_size" name="skyscraper_options[text_size]" style="margin-left:73px">
|
340 |
+
|
341 |
<?php
|
342 |
+
|
343 |
for($px=10; $px <= 20; $px++) {
|
344 |
+
|
345 |
$sel = "";
|
346 |
+
|
347 |
if($px== $skyscraper_options["text_size"])$sel = "selected";
|
348 |
|
349 |
+
|
350 |
+
|
351 |
?>
|
352 |
+
|
353 |
<option <?php echo $sel?> value="<?php echo $px?>"><?php echo $px?>px</option>
|
354 |
|
355 |
+
|
356 |
+
|
357 |
<?php
|
358 |
+
|
359 |
}?>
|
360 |
+
|
361 |
</select>
|
362 |
+
|
363 |
</DIV>
|
364 |
|
365 |
+
|
366 |
+
|
367 |
<DIV style="margin:0 0 0 24px" class="Post-subTXT" id="Post-subTXT" ><?php _e("Widget Width","sociable");?>:
|
368 |
+
|
369 |
<select id="text_size" id="widget_width" name="skyscraper_options[widget_width]" style="margin-left:50px">
|
370 |
|
371 |
+
|
372 |
+
|
373 |
<?php
|
374 |
+
|
375 |
for($wi=70; $wi <= 90; ) {
|
376 |
+
|
377 |
$sel = "";
|
378 |
+
|
379 |
if($wi== $skyscraper_options["widget_width"])$sel = "selected";
|
380 |
|
381 |
+
|
382 |
+
|
383 |
?>
|
384 |
|
385 |
+
|
386 |
+
|
387 |
<option <?php echo $sel?> value="<?php echo $wi?>"><?php echo $wi?>px</option>
|
388 |
|
389 |
+
|
390 |
+
|
391 |
<?php
|
392 |
+
|
393 |
$wi +=5;
|
394 |
+
|
395 |
}?>
|
396 |
+
|
397 |
</select>
|
398 |
+
|
399 |
</DIV>
|
400 |
+
|
401 |
<DIV style="margin:0 0 0 25px" class="Post-subTXT" id="Post-subTXT" ><?php _e("Background Color","sociable");?>:
|
402 |
|
403 |
+
|
404 |
+
|
405 |
<input value="<?php echo $skyscraper_options['background_color']?>" style="margin-left:22px" id="background_color" name="skyscraper_options[background_color]" type="text" /> ( #fefefe default color)
|
406 |
+
|
407 |
</DIV>
|
408 |
|
409 |
+
|
410 |
+
|
411 |
<DIV style="margin:0 0 0 25px" class="Post-subTXT" id="Post-subTXT" ><?php _e("Labels Color","sociable");?>:
|
412 |
|
413 |
+
|
414 |
+
|
415 |
<input value="<?php echo $skyscraper_options['labels_color']?>" style="margin-left:49px" id="background_color" name="skyscraper_options[labels_color]" type="text" /> ( #f7f7f7 default color)
|
416 |
|
417 |
+
|
418 |
+
|
419 |
</DIV>
|
420 |
|
421 |
+
|
422 |
+
|
423 |
<BR/>
|
424 |
|
425 |
+
|
426 |
+
|
427 |
<TABLE class="Title-Box" cellspacing="0" cellpadding="0" id="Tagline-Title">
|
428 |
+
|
429 |
<TR>
|
430 |
+
|
431 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" >
|
432 |
+
|
433 |
Social Options
|
434 |
+
|
435 |
</TD>
|
436 |
+
|
437 |
<TD class="Border-Right"></TD>
|
438 |
+
|
439 |
</TR>
|
440 |
+
|
441 |
</TABLE>
|
442 |
+
|
443 |
<BR/>
|
444 |
|
445 |
+
|
446 |
+
|
447 |
<DIV style="margin:0 0 0 25px" class="Post-subTXT">
|
448 |
+
|
449 |
<?php _e("Your Twitter username","sociable");?>:<?php
|
450 |
+
|
451 |
if (!empty($skyscraper_options["twitter_username"])){
|
452 |
+
|
453 |
$twitter_username = $skyscraper_options["twitter_username"];
|
454 |
+
|
455 |
}
|
456 |
+
|
457 |
else{
|
458 |
+
|
459 |
$twitter_username = "@";
|
460 |
+
|
461 |
}
|
462 |
|
463 |
+
|
464 |
+
|
465 |
?>
|
466 |
+
|
467 |
<input type="text" name="skyscraper_options[twitter_username]" value="<?php echo $twitter_username?>" />
|
468 |
+
|
469 |
<select name="skyscraper_options[num_tweets]" id="num_tweets">
|
470 |
+
|
471 |
<?php self:: create_select_options($skyscraper_options["num_tweets"]) ?>
|
472 |
+
|
473 |
</select>
|
474 |
+
|
475 |
</DIV>
|
476 |
+
|
477 |
<BR/>
|
478 |
+
|
479 |
<DIV style="border: 1px solid rgb(223, 223, 223); margin-left: 22px; font-size: 10px; font-style: italic; width: 327px; padding: 0px 11px;">
|
480 |
+
|
481 |
<p>This feature will read your latest tweets and mentions posted by other users and show them on skyscraper sociable.
|
482 |
+
|
483 |
<p>Sociable will save and use your twitter username only to read tweets. </p>
|
484 |
+
|
485 |
|
486 |
+
|
487 |
<p>Your visitors can read the information that you are sharing.</p>
|
488 |
+
|
489 |
<p>If you agree check here:
|
490 |
+
|
491 |
|
492 |
+
|
493 |
<?php
|
494 |
+
|
495 |
|
496 |
+
|
497 |
$sel = "";
|
498 |
+
|
499 |
if (isset($skyscraper_options["accept_read_twitter"])){
|
500 |
+
|
501 |
|
502 |
+
|
503 |
if ($skyscraper_options["accept_read_twitter"] == 1){
|
504 |
+
|
505 |
|
506 |
+
|
507 |
$sel = "checked";
|
508 |
+
|
509 |
}
|
510 |
+
|
511 |
}
|
512 |
+
|
513 |
?>
|
514 |
+
|
515 |
<input type="checkbox" <?php echo $sel?> name="skyscraper_options[accept_read_twitter]" value="1"/>
|
516 |
+
|
517 |
</p>
|
518 |
+
|
519 |
</DIV>
|
520 |
+
|
521 |
<BR/>
|
522 |
+
|
523 |
<BR/>
|
524 |
+
|
525 |
<DIV style="margin:0 0 0 25px" class="Post-subTXT">
|
526 |
|
527 |
+
|
528 |
+
|
529 |
<?php _e("Your RSS feed","sociable");?>:
|
530 |
+
|
531 |
<?php
|
532 |
+
|
533 |
|
534 |
+
|
535 |
if (!empty($skyscraper_options["rss_feed"])){
|
536 |
+
|
537 |
$rss_feed = $skyscraper_options["rss_feed"];
|
538 |
+
|
539 |
}
|
540 |
+
|
541 |
else{
|
542 |
+
|
543 |
$rss_feed = "http://";
|
544 |
+
|
545 |
}
|
546 |
+
|
547 |
?>
|
548 |
+
|
549 |
<input type="text" name="skyscraper_options[rss_feed]" style="margin-left: 46px;" value="<?php echo $rss_feed?>" />
|
550 |
+
|
551 |
<select name="skyscraper_options[num_rss]" id="num_rss">
|
552 |
+
|
553 |
<?php self:: create_select_options($skyscraper_options["num_rss"]) ?>
|
554 |
+
|
555 |
</select>
|
556 |
+
|
557 |
</DIV><BR/>
|
558 |
+
|
559 |
<DIV style="border: 1px solid rgb(223, 223, 223); margin-left: 22px; font-size: 10px; font-style: italic; width: 327px; padding: 0px 11px;">
|
560 |
+
|
561 |
<p>This feature will read your rss posts and show them on skyscraper sociable. </p>
|
562 |
+
|
563 |
<p>Sociable will save and use the rss url only to read posts.</p>
|
564 |
+
|
565 |
<p>Your visitors can read the information that you are sharing.</p>
|
566 |
+
|
567 |
<p>If you agree check here:
|
568 |
+
|
569 |
|
570 |
+
|
571 |
<?php
|
572 |
+
|
573 |
|
574 |
+
|
575 |
$sel = "";
|
576 |
+
|
577 |
if (isset($skyscraper_options["accept_read_rss"])){
|
578 |
+
|
579 |
|
580 |
+
|
581 |
if ($skyscraper_options["accept_read_rss"] == 1){
|
582 |
+
|
583 |
|
584 |
+
|
585 |
$sel = "checked";
|
586 |
+
|
587 |
}
|
588 |
+
|
589 |
}
|
590 |
+
|
591 |
?>
|
592 |
+
|
593 |
<input type="checkbox" <?php echo $sel?> name="skyscraper_options[accept_read_rss]" value="1"/></p>
|
594 |
+
|
595 |
</DIV>
|
596 |
+
|
597 |
<BR/><BR/>
|
598 |
+
|
599 |
<DIV style="margin:0 0 0 25px" class="Post-subTXT">
|
600 |
|
601 |
+
|
602 |
+
|
603 |
<?php
|
604 |
+
|
605 |
+
|
606 |
$checked = "";
|
607 |
+
|
608 |
if (isset($skyscraper_options["counters"]["check"])){
|
609 |
+
|
610 |
$checked = "checked";
|
611 |
+
|
612 |
}
|
613 |
+
|
614 |
|
615 |
+
|
616 |
$folded = "";
|
617 |
+
|
618 |
$unfolded= "";
|
619 |
+
|
620 |
if (isset($skyscraper_options["counters"]["folded"])){
|
621 |
+
|
622 |
if($skyscraper_options["counters"]["folded"] == "1"){
|
623 |
+
|
624 |
$folded = "checked";
|
625 |
+
|
626 |
$unfolded= "";
|
627 |
+
|
628 |
}else{
|
629 |
+
|
630 |
$unfolded = "checked";
|
631 |
+
|
632 |
$folded= "";
|
633 |
+
|
634 |
}
|
635 |
+
|
636 |
}
|
637 |
+
|
638 |
|
639 |
+
|
640 |
|
641 |
+
|
642 |
?>
|
643 |
+
|
644 |
<input type="checkbox" <?php echo $checked ?> name="skyscraper_options[counters][check]" id="" />
|
645 |
+
|
646 |
Counters
|
647 |
+
|
648 |
<input name="skyscraper_options[counters][folded]" <?php echo $unfolded?> value="0" type="radio">Folded
|
649 |
+
|
650 |
<input name="skyscraper_options[counters][folded]" <?php echo $folded?> value="1" type="radio">Unfolded
|
651 |
+
|
652 |
</DIV><BR/>
|
653 |
+
|
654 |
<DIV style="border: 1px solid rgb(223, 223, 223); margin-left: 22px; font-size: 10px; font-style: italic; width: 327px; padding: 0px 11px;">
|
655 |
+
|
656 |
<p>This feature load Facebook Counter, Twitter Counter and Google Plus Counter.</p>
|
657 |
+
|
658 |
<p>Will load scripts from each site and show information of yours visitors and maybe and could delay the load of the page.</p>
|
659 |
+
|
660 |
</p>
|
661 |
+
|
662 |
</DIV>
|
663 |
+
|
664 |
<BR/> <BR/>
|
665 |
+
|
666 |
<DIV style="margin:0 0 0 25px" class="Post-subTXT">
|
667 |
+
|
668 |
<?php
|
669 |
+
|
670 |
$checked = "";
|
671 |
+
|
672 |
if (isset($skyscraper_options["share"]["check"])){
|
673 |
+
|
674 |
$checked = "checked";
|
675 |
+
|
676 |
}
|
677 |
+
|
678 |
|
679 |
+
|
680 |
if (isset($skyscraper_options["share"]["folded"])){
|
681 |
+
|
682 |
if($skyscraper_options["share"]["folded"] == "1"){
|
683 |
+
|
684 |
$folded = "checked";
|
685 |
+
|
686 |
$unfolded= "";
|
687 |
+
|
688 |
}else{
|
689 |
+
|
690 |
$unfolded = "checked";
|
691 |
+
|
692 |
$folded= "";
|
693 |
+
|
694 |
}
|
695 |
+
|
696 |
}
|
697 |
+
|
698 |
|
699 |
+
|
700 |
|
701 |
+
|
702 |
?>
|
703 |
+
|
704 |
|
705 |
+
|
706 |
<input type="checkbox" <?php echo $checked ?> name="skyscraper_options[share][check]" /> Share
|
707 |
+
|
708 |
<input style="margin-left:19px" <?php echo $unfolded?> value="0" name="skyscraper_options[share][folded]" type="radio">Folded
|
709 |
+
|
710 |
<input name="skyscraper_options[share][folded]" <?php echo $folded?> value="1" type="radio">Unfolded
|
711 |
+
|
712 |
</DIV>
|
713 |
|
714 |
+
|
715 |
+
|
716 |
<DIV class="Content-Box" id="Preview-Content">
|
717 |
+
|
718 |
|
719 |
+
|
720 |
</DIV>
|
721 |
+
|
722 |
<div style="clear:both"></div>
|
723 |
+
|
724 |
|
725 |
+
|
726 |
<BR/>
|
727 |
+
|
728 |
<DIV class="Content-Box" id="Preview-Content">
|
729 |
+
|
730 |
<ul class="items_li">
|
731 |
+
|
732 |
<li>
|
733 |
+
|
734 |
<?php
|
735 |
+
|
736 |
$checked = "";
|
737 |
+
|
738 |
if (isset($skyscraper_options['follow_us_check']) && $skyscraper_options['follow_us_check'] == "on"){
|
739 |
+
|
740 |
$checked = "checked";
|
741 |
+
|
742 |
}
|
743 |
+
|
744 |
?>
|
745 |
+
|
746 |
Follow Us
|
747 |
+
|
748 |
<ul class="sub_item_li">
|
749 |
|
750 |
+
|
751 |
+
|
752 |
<li>
|
753 |
+
|
754 |
<?php
|
755 |
+
|
756 |
$checked = "";
|
757 |
+
|
758 |
if (isset($skyscraper_options['follow_us']['twitter']["active"]) && $skyscraper_options['follow_us']['twitter']["active"] == "on"){
|
759 |
+
|
760 |
$checked = "checked";
|
761 |
+
|
762 |
}
|
763 |
+
|
764 |
?>
|
765 |
+
|
766 |
<input <?php echo $checked ?> name="skyscraper_options[follow_us][twitter][active]" type="checkbox" style="padding-bottom:5px" />
|
767 |
+
|
768 |
<?php
|
769 |
+
|
770 |
$account = "http://twitter.com/";
|
771 |
+
|
772 |
if(!empty($skyscraper_options["follow_us"]["twitter"]["account"])){
|
773 |
+
|
774 |
$account = $skyscraper_options["follow_us"]["twitter"]["account"];
|
775 |
+
|
776 |
}
|
777 |
+
|
778 |
?>
|
779 |
+
|
780 |
<input type="hidden" value="t.png" name="skyscraper_options[follow_us][twitter][logo]" />
|
781 |
+
|
782 |
<img style="padding-bottom:5px" src="<?php echo SOCIABLE_HTTP_PATH ?>images/toolbar/t.png"/>
|
783 |
+
|
784 |
<input size="40" name="skyscraper_options[follow_us][twitter][account]" value="<?php echo $account?>" type="text" />
|
785 |
+
|
786 |
</li>
|
787 |
+
|
788 |
<li>
|
789 |
|
790 |
+
|
791 |
+
|
792 |
<?php
|
793 |
+
|
794 |
$checked = "";
|
795 |
+
|
796 |
if ( isset($skyscraper_options['follow_us']['feed']["active"]) && $skyscraper_options['follow_us']['feed']["active"] == "on"){
|
797 |
+
|
798 |
$checked = "checked";
|
799 |
+
|
800 |
}
|
801 |
+
|
802 |
?>
|
803 |
+
|
804 |
<input <?php echo $checked ?> name="skyscraper_options[follow_us][feed][active]" type="checkbox" style="padding-bottom:5px" />
|
805 |
+
|
806 |
<input type="hidden" value="rss.png" name="skyscraper_options[follow_us][feed][logo]" />
|
807 |
+
|
808 |
<?php
|
809 |
+
|
810 |
$rss = "http://";
|
811 |
+
|
812 |
if(!empty($skyscraper_options["follow_us"]["feed"]["account"])){
|
813 |
+
|
814 |
|
815 |
+
|
816 |
$rss = $skyscraper_options["follow_us"]["feed"]["account"];
|
817 |
+
|
818 |
}
|
819 |
+
|
820 |
?>
|
821 |
+
|
822 |
<img style="padding-bottom:5px" src="<?php echo SOCIABLE_HTTP_PATH ?>images/toolbar/rss.png"/>
|
823 |
+
|
824 |
<input size="40" value="<?php echo $rss?>" name="skyscraper_options[follow_us][feed][account]" type="text" />
|
825 |
+
|
826 |
</li>
|
827 |
+
|
828 |
<li>
|
829 |
+
|
830 |
<?php
|
831 |
+
|
832 |
$checked = "";
|
833 |
+
|
834 |
if ( isset($skyscraper_options['follow_us']['fb']["active"]) && $skyscraper_options['follow_us']['fb']["active"] == "on"){
|
835 |
+
|
836 |
$checked = "checked";
|
837 |
+
|
838 |
}
|
839 |
+
|
840 |
?>
|
841 |
|
842 |
+
|
843 |
+
|
844 |
<input <?php echo $checked ?> name="skyscraper_options[follow_us][fb][active]" type="checkbox" style="padding-bottom:5px" />
|
845 |
+
|
846 |
<input type="hidden" value="f.png" name="skyscraper_options[follow_us][fb][logo]" />
|
847 |
+
|
848 |
|
849 |
+
|
850 |
<?php
|
851 |
+
|
852 |
$fb = "http://facebook.com/";
|
853 |
+
|
854 |
if(!empty($skyscraper_options["follow_us"]["fb"]["account"])){
|
855 |
+
|
856 |
|
857 |
+
|
858 |
$fb = $skyscraper_options["follow_us"]["fb"]["account"];
|
859 |
+
|
860 |
}
|
861 |
+
|
862 |
?>
|
863 |
+
|
864 |
<img style="padding-bottom:5px" src="<?php echo SOCIABLE_HTTP_PATH ?>images/toolbar/f.png"/>
|
865 |
+
|
866 |
<input size="40" value="<?php echo $fb?>" name="skyscraper_options[follow_us][fb][account]" type="text" />
|
867 |
+
|
868 |
</li>
|
869 |
+
|
870 |
|
871 |
+
|
872 |
<li>
|
873 |
+
|
874 |
<?php
|
875 |
+
|
876 |
$checked = "";
|
877 |
+
|
878 |
if ( isset($skyscraper_options['follow_us']['li']["active"]) && $skyscraper_options['follow_us']['li']["active"] == "on"){
|
879 |
+
|
880 |
$checked = "checked";
|
881 |
+
|
882 |
}
|
883 |
+
|
884 |
?>
|
885 |
+
|
886 |
<input <?php echo $checked ?> name="skyscraper_options[follow_us][li][active]" type="checkbox" style="padding-bottom:5px" />
|
887 |
+
|
888 |
<input type="hidden" value="i.png" name="skyscraper_options[follow_us][li][logo]" />
|
889 |
|
890 |
+
|
891 |
+
|
892 |
<input type="hidden" value="linkedin.com/in/" name="skyscraper_options[follow_us][li][url]" />
|
893 |
+
|
894 |
<?php
|
895 |
+
|
896 |
$li = "http://linkedin.com/";
|
897 |
+
|
898 |
if(!empty($skyscraper_options["follow_us"]["li"]["account"])){
|
899 |
+
|
900 |
|
901 |
+
|
902 |
$li = $skyscraper_options["follow_us"]["li"]["account"];
|
903 |
+
|
904 |
}
|
905 |
+
|
906 |
?>
|
907 |
+
|
908 |
<img style="padding-bottom:5px" src="<?php echo SOCIABLE_HTTP_PATH ?>images/toolbar/i.png"/>
|
909 |
+
|
910 |
<input size="40" value="<?php echo $li?>" name="skyscraper_options[follow_us][li][account]" type="text" />
|
911 |
+
|
912 |
</li>
|
913 |
+
|
914 |
</ul>
|
915 |
+
|
916 |
</li>
|
917 |
+
|
918 |
</ul>
|
919 |
+
|
920 |
</DIV>
|
921 |
+
|
922 |
<br />
|
923 |
|
924 |
|
925 |
+
|
926 |
+
|
927 |
+
|
928 |
<div class="Content-Box" id="Active-Content" style="display: block;">
|
929 |
+
|
930 |
<br>
|
931 |
+
|
932 |
<div align="center" style="width:100%;">
|
933 |
+
|
934 |
<table align="center" cellspacing="0" cellpadding="10" border="0" class="GeneralOptions-List">
|
935 |
+
|
936 |
<tbody><tr valign="top">
|
937 |
|
938 |
+
|
939 |
+
|
940 |
<td align="right" class="Title">Active Sociable Banner</td>
|
941 |
|
942 |
+
|
943 |
+
|
944 |
<td align="left" style="width:5px;">
|
945 |
|
946 |
+
|
947 |
+
|
948 |
<?php
|
949 |
|
950 |
+
|
951 |
+
|
952 |
|
953 |
|
954 |
+
|
955 |
+
|
956 |
$sel = "";
|
957 |
|
958 |
+
|
959 |
+
|
960 |
|
961 |
|
962 |
+
|
963 |
+
|
964 |
if (isset($skyscraper_options["sociable_banner"])){
|
965 |
|
966 |
+
|
967 |
+
|
968 |
|
969 |
|
970 |
+
|
971 |
+
|
972 |
if (!empty($skyscraper_options["sociable_banner"])){
|
973 |
|
974 |
+
|
975 |
+
|
976 |
$sel = "checked";
|
977 |
|
978 |
+
|
979 |
+
|
980 |
}
|
981 |
|
982 |
+
|
983 |
+
|
984 |
|
985 |
|
986 |
+
|
987 |
+
|
988 |
}
|
989 |
|
990 |
+
|
991 |
+
|
992 |
|
993 |
|
994 |
+
|
995 |
+
|
996 |
?>
|
997 |
|
998 |
+
|
999 |
+
|
1000 |
|
1001 |
|
1002 |
+
|
1003 |
+
|
1004 |
<input type="checkbox" name="skyscraper_options[sociable_banner]" id="sociable_banner" <?php echo $sel?>></td>
|
1005 |
+
|
1006 |
<td align="left" class="Content">
|
1007 |
+
|
1008 |
<span class="TXT">Active Sociable "Reminder to Share" Banner / Check if you want to remind your readers Share your content.</span>
|
1009 |
+
|
1010 |
<br>
|
1011 |
+
|
1012 |
</td>
|
1013 |
+
|
1014 |
</tr>
|
1015 |
|
1016 |
+
|
1017 |
|
1018 |
<tr valign="top">
|
1019 |
|
|
|
1020 |
|
|
|
1021 |
|
1022 |
+
<td align="right" class="Title">Blogplay Tags</td>
|
1023 |
+
<td align="left" style="width:5px;">
|
1024 |
+
|
1025 |
+
|
1026 |
+
<?php
|
1027 |
+
|
1028 |
+
$sel = "";
|
1029 |
+
|
1030 |
+
if (isset($skyscraper_options["blogplay_tags"])){
|
1031 |
+
|
1032 |
+
if (!empty($skyscraper_options["blogplay_tags"])){
|
1033 |
+
|
1034 |
+
|
1035 |
+
$sel = "checked";
|
1036 |
+
|
1037 |
+
|
1038 |
+
}
|
1039 |
+
|
1040 |
+
}
|
1041 |
+
|
1042 |
+
?>
|
1043 |
+
<input type="checkbox" name="skyscraper_options[blogplay_tags]" id="blogplay_tags" <?php echo $sel?>></td>
|
1044 |
+
|
1045 |
+
<td align="left" class="Content">
|
1046 |
+
|
1047 |
+
<span class="TXT">Accept include the blogplay.com tag into my shares and counters.</span>
|
1048 |
+
|
1049 |
+
<br>
|
1050 |
+
|
1051 |
+
</td>
|
1052 |
+
|
1053 |
+
</tr>
|
1054 |
+
|
1055 |
+
|
1056 |
+
|
1057 |
+
<tr valign="top">
|
1058 |
+
|
1059 |
+
<td align="right" class="Title">Banner's label (35 char Max.)</td>
|
1060 |
+
|
1061 |
+
|
1062 |
+
|
1063 |
+
|
1064 |
+
|
1065 |
+
|
1066 |
|
1067 |
<td align="left" style="width:5px;">
|
1068 |
|
1069 |
+
|
1070 |
+
|
1071 |
<?php
|
1072 |
|
1073 |
+
|
1074 |
+
|
1075 |
$sel = 'Please spread the word: Be Sociable, Share!';
|
1076 |
|
1077 |
+
|
1078 |
+
|
1079 |
if (isset($skyscraper_options["sociable_banner_text"])){
|
1080 |
|
1081 |
+
|
1082 |
+
|
1083 |
if (!empty($skyscraper_options["sociable_banner_text"])){
|
1084 |
|
1085 |
+
|
1086 |
+
|
1087 |
$sel = $skyscraper_options["sociable_banner_text"];
|
1088 |
|
1089 |
+
|
1090 |
+
|
1091 |
}
|
1092 |
|
1093 |
+
|
1094 |
+
|
1095 |
}
|
1096 |
|
1097 |
+
|
1098 |
+
|
1099 |
?>
|
1100 |
|
1101 |
+
|
1102 |
+
|
1103 |
</td>
|
1104 |
|
1105 |
+
|
1106 |
+
|
1107 |
<td align="left" class="Content">
|
1108 |
|
1109 |
+
|
1110 |
+
|
1111 |
|
1112 |
|
1113 |
+
|
1114 |
+
|
1115 |
<span class="TXT"> <input style="width:245px !important" type="text" name="skyscraper_options[sociable_banner_text]" value="<?php echo $sel?>"></span>
|
1116 |
|
1117 |
+
|
1118 |
+
|
1119 |
<br>
|
1120 |
+
|
1121 |
</td>
|
1122 |
+
|
1123 |
</tr>
|
1124 |
|
1125 |
+
|
1126 |
+
|
1127 |
|
1128 |
|
1129 |
+
|
1130 |
+
|
1131 |
<tr valign="top">
|
1132 |
|
1133 |
+
|
1134 |
+
|
1135 |
|
1136 |
|
1137 |
+
|
1138 |
+
|
1139 |
<td align="right" class="Title">Banners Timer (sec.)</td>
|
1140 |
|
1141 |
+
|
1142 |
+
|
1143 |
|
1144 |
|
1145 |
+
|
1146 |
+
|
1147 |
<td align="left" style="width:5px;">
|
1148 |
|
1149 |
+
|
1150 |
+
|
1151 |
|
1152 |
|
1153 |
+
|
1154 |
+
|
1155 |
</td>
|
1156 |
|
1157 |
+
|
1158 |
+
|
1159 |
<td align="left" class="Content">
|
1160 |
|
1161 |
+
|
1162 |
+
|
1163 |
<span class="TXT">
|
1164 |
|
1165 |
+
|
1166 |
+
|
1167 |
|
1168 |
|
1169 |
+
|
1170 |
+
|
1171 |
<select name="skyscraper_options[sociable_banner_timer]" id="banner_timer" >
|
1172 |
|
1173 |
+
|
1174 |
+
|
1175 |
<?php
|
1176 |
|
1177 |
+
|
1178 |
+
|
1179 |
for($timer=10; $timer <= 120; $timer++){
|
1180 |
|
1181 |
+
|
1182 |
+
|
1183 |
|
1184 |
|
1185 |
+
|
1186 |
+
|
1187 |
$sel = "";
|
1188 |
|
1189 |
+
|
1190 |
+
|
1191 |
|
1192 |
|
1193 |
+
|
1194 |
+
|
1195 |
if (!empty($skyscraper_options["sociable_banner_timer"])){
|
1196 |
|
1197 |
+
|
1198 |
+
|
1199 |
|
1200 |
|
1201 |
+
|
1202 |
+
|
1203 |
if ($skyscraper_options["sociable_banner_timer"] == $timer){
|
1204 |
|
1205 |
+
|
1206 |
+
|
1207 |
|
1208 |
|
1209 |
+
|
1210 |
+
|
1211 |
$sel = "selected";
|
1212 |
|
1213 |
+
|
1214 |
+
|
1215 |
}
|
1216 |
|
1217 |
+
|
1218 |
+
|
1219 |
}
|
1220 |
|
1221 |
+
|
1222 |
+
|
1223 |
?>
|
1224 |
|
1225 |
+
|
1226 |
+
|
1227 |
<option value="<?php echo $timer?>" <?php echo $sel ?> ><?php echo $timer?></option>
|
1228 |
|
1229 |
+
|
1230 |
+
|
1231 |
<?php
|
1232 |
|
1233 |
+
|
1234 |
+
|
1235 |
|
1236 |
|
1237 |
+
|
1238 |
+
|
1239 |
$timer = $timer + 4;
|
1240 |
|
1241 |
+
|
1242 |
+
|
1243 |
} ?>
|
1244 |
|
1245 |
+
|
1246 |
+
|
1247 |
</select>
|
1248 |
|
1249 |
+
|
1250 |
+
|
1251 |
|
1252 |
|
1253 |
+
|
1254 |
+
|
1255 |
</span>
|
1256 |
+
|
1257 |
<br>
|
1258 |
+
|
1259 |
</td>
|
1260 |
+
|
1261 |
</tr>
|
1262 |
|
1263 |
+
|
1264 |
+
|
1265 |
|
1266 |
|
1267 |
+
|
1268 |
+
|
1269 |
<tr valign="top">
|
1270 |
|
1271 |
+
|
1272 |
+
|
1273 |
|
1274 |
|
1275 |
+
|
1276 |
+
|
1277 |
<td align="right" class="Title">Font Color <a title="default color #6A6A6A" class="default_values">(#6A6A6A)</a></td>
|
1278 |
|
1279 |
+
|
1280 |
+
|
1281 |
|
1282 |
|
1283 |
+
|
1284 |
+
|
1285 |
<td align="left" style="width:5px;">
|
1286 |
|
1287 |
+
|
1288 |
+
|
1289 |
|
1290 |
|
1291 |
+
|
1292 |
+
|
1293 |
</td>
|
1294 |
|
1295 |
+
|
1296 |
+
|
1297 |
<td align="left" class="Content">
|
1298 |
|
1299 |
+
|
1300 |
+
|
1301 |
|
1302 |
|
1303 |
+
|
1304 |
+
|
1305 |
<span class="TXT">
|
1306 |
|
1307 |
+
|
1308 |
+
|
1309 |
|
1310 |
|
1311 |
+
|
1312 |
+
|
1313 |
<?php
|
1314 |
|
1315 |
+
|
1316 |
+
|
1317 |
$sel = '#6A6A6A';
|
1318 |
|
1319 |
+
|
1320 |
+
|
1321 |
|
1322 |
|
1323 |
+
|
1324 |
+
|
1325 |
if (isset($skyscraper_options["sociable_banner_colorFont"])){
|
1326 |
|
1327 |
+
|
1328 |
+
|
1329 |
|
1330 |
|
1331 |
+
|
1332 |
+
|
1333 |
if (!empty($skyscraper_options["sociable_banner_colorFont"])){
|
1334 |
|
1335 |
+
|
1336 |
+
|
1337 |
|
1338 |
|
1339 |
+
|
1340 |
+
|
1341 |
$sel = $skyscraper_options["sociable_banner_colorFont"];
|
1342 |
|
1343 |
+
|
1344 |
+
|
1345 |
}
|
1346 |
|
1347 |
+
|
1348 |
+
|
1349 |
}
|
1350 |
|
1351 |
+
|
1352 |
+
|
1353 |
?>
|
1354 |
|
1355 |
+
|
1356 |
+
|
1357 |
|
1358 |
|
1359 |
+
|
1360 |
+
|
1361 |
<input type="text" value="<?php echo $sel?>" name="skyscraper_options[sociable_banner_colorFont]" style="width:81px !important">
|
1362 |
|
1363 |
+
|
1364 |
+
|
1365 |
</span>
|
1366 |
+
|
1367 |
<br>
|
1368 |
+
|
1369 |
</td>
|
1370 |
+
|
1371 |
</tr>
|
1372 |
|
1373 |
+
|
1374 |
+
|
1375 |
<!-- Font Size -->
|
1376 |
|
1377 |
+
|
1378 |
+
|
1379 |
<tr valign="top">
|
1380 |
|
1381 |
+
|
1382 |
+
|
1383 |
|
1384 |
|
1385 |
+
|
1386 |
+
|
1387 |
<td align="right" class="Title">Font Size <a title="default size 9px" class="default_values">(9px)</a></td>
|
1388 |
|
1389 |
+
|
1390 |
+
|
1391 |
|
1392 |
|
1393 |
+
|
1394 |
+
|
1395 |
<td align="left" style="width:5px;">
|
1396 |
|
1397 |
+
|
1398 |
+
|
1399 |
|
1400 |
|
1401 |
+
|
1402 |
+
|
1403 |
</td>
|
1404 |
|
1405 |
+
|
1406 |
+
|
1407 |
<td align="left" class="Content">
|
1408 |
|
1409 |
+
|
1410 |
+
|
1411 |
<span class="TXT">
|
1412 |
|
1413 |
+
|
1414 |
+
|
1415 |
|
1416 |
|
1417 |
+
|
1418 |
+
|
1419 |
<select name="skyscraper_options[sociable_banner_fontSize]" id="banner_fontSize" >
|
1420 |
|
1421 |
+
|
1422 |
+
|
1423 |
<?php
|
1424 |
|
1425 |
+
|
1426 |
+
|
1427 |
for($fontSize=8; $fontSize <= 16; $fontSize++){
|
1428 |
|
1429 |
+
|
1430 |
+
|
1431 |
|
1432 |
|
1433 |
+
|
1434 |
+
|
1435 |
$sel = "";
|
1436 |
|
1437 |
+
|
1438 |
+
|
1439 |
|
1440 |
|
1441 |
+
|
1442 |
+
|
1443 |
if (!empty($skyscraper_options["sociable_banner_fontSize"])){
|
1444 |
|
1445 |
+
|
1446 |
+
|
1447 |
|
1448 |
|
1449 |
+
|
1450 |
+
|
1451 |
if ($skyscraper_options["sociable_banner_fontSize"] == $fontSize){
|
1452 |
|
1453 |
+
|
1454 |
+
|
1455 |
|
1456 |
|
1457 |
+
|
1458 |
+
|
1459 |
$sel = "selected";
|
1460 |
|
1461 |
+
|
1462 |
+
|
1463 |
}
|
1464 |
|
1465 |
+
|
1466 |
+
|
1467 |
}
|
1468 |
|
1469 |
+
|
1470 |
+
|
1471 |
?>
|
1472 |
|
1473 |
+
|
1474 |
+
|
1475 |
<option value="<?php echo $fontSize?>px" <?php echo $sel ?> ><?php echo $fontSize?>px</option>
|
1476 |
|
1477 |
+
|
1478 |
+
|
1479 |
<?php
|
1480 |
|
1481 |
+
|
1482 |
+
|
1483 |
} ?>
|
1484 |
|
1485 |
+
|
1486 |
+
|
1487 |
</select>
|
1488 |
|
1489 |
+
|
1490 |
+
|
1491 |
|
1492 |
|
1493 |
+
|
1494 |
+
|
1495 |
|
1496 |
|
1497 |
+
|
1498 |
+
|
1499 |
</span>
|
1500 |
|
1501 |
+
|
1502 |
+
|
1503 |
<br>
|
1504 |
|
1505 |
+
|
1506 |
+
|
1507 |
</td>
|
1508 |
|
1509 |
+
|
1510 |
+
|
1511 |
</tr>
|
1512 |
|
1513 |
+
|
1514 |
+
|
1515 |
|
1516 |
|
1517 |
+
|
1518 |
+
|
1519 |
<!-- color label -->
|
1520 |
|
1521 |
+
|
1522 |
+
|
1523 |
<tr valign="top">
|
1524 |
|
1525 |
+
|
1526 |
+
|
1527 |
|
1528 |
|
1529 |
+
|
1530 |
+
|
1531 |
<td align="right" class="Title">Label Color <a title="default color #F7F7F7" class="default_values">(#F7F7F7)</a></td>
|
1532 |
|
1533 |
+
|
1534 |
+
|
1535 |
|
1536 |
|
1537 |
+
|
1538 |
+
|
1539 |
<td align="left" style="width:5px;">
|
1540 |
|
1541 |
+
|
1542 |
+
|
1543 |
|
1544 |
|
1545 |
+
|
1546 |
+
|
1547 |
</td>
|
1548 |
|
1549 |
+
|
1550 |
+
|
1551 |
<td align="left" class="Content">
|
1552 |
|
1553 |
+
|
1554 |
+
|
1555 |
|
1556 |
|
1557 |
+
|
1558 |
+
|
1559 |
<span class="TXT">
|
1560 |
|
1561 |
+
|
1562 |
+
|
1563 |
|
1564 |
|
1565 |
+
|
1566 |
+
|
1567 |
<?php
|
1568 |
|
1569 |
+
|
1570 |
+
|
1571 |
$sel = '#F7F7F7';
|
1572 |
|
1573 |
+
|
1574 |
+
|
1575 |
|
1576 |
|
1577 |
+
|
1578 |
+
|
1579 |
if (isset($skyscraper_options["sociable_banner_colorLabel"])){
|
1580 |
|
1581 |
+
|
1582 |
+
|
1583 |
|
1584 |
|
1585 |
+
|
1586 |
+
|
1587 |
if (!empty($skyscraper_options["sociable_banner_colorLabel"])){
|
1588 |
|
1589 |
+
|
1590 |
+
|
1591 |
|
1592 |
|
1593 |
+
|
1594 |
+
|
1595 |
$sel = $skyscraper_options["sociable_banner_colorLabel"];
|
1596 |
|
1597 |
+
|
1598 |
+
|
1599 |
}
|
1600 |
|
1601 |
+
|
1602 |
+
|
1603 |
}
|
1604 |
|
1605 |
+
|
1606 |
+
|
1607 |
?>
|
1608 |
|
1609 |
+
|
1610 |
+
|
1611 |
|
1612 |
|
1613 |
+
|
1614 |
+
|
1615 |
<input type="text" value="<?php echo $sel?>" name="skyscraper_options[sociable_banner_colorLabel]" style="width:81px !important">
|
1616 |
|
1617 |
+
|
1618 |
+
|
1619 |
</span>
|
1620 |
|
1621 |
+
|
1622 |
+
|
1623 |
<br>
|
1624 |
+
|
1625 |
</td>
|
1626 |
+
|
1627 |
</tr>
|
1628 |
|
1629 |
+
|
1630 |
+
|
1631 |
<!-- color font -->
|
1632 |
|
1633 |
+
|
1634 |
+
|
1635 |
<tr valign="top">
|
1636 |
|
1637 |
+
|
1638 |
+
|
1639 |
|
1640 |
|
1641 |
+
|
1642 |
+
|
1643 |
<td align="right" class="Title">Background Color <a title="default color #F7F7F7" class="default_values">(#F7F7F7)</a></td>
|
1644 |
|
1645 |
+
|
1646 |
+
|
1647 |
|
1648 |
|
1649 |
+
|
1650 |
+
|
1651 |
<td align="left" style="width:5px;">
|
1652 |
|
1653 |
+
|
1654 |
+
|
1655 |
|
1656 |
|
1657 |
+
|
1658 |
+
|
1659 |
+
</td>
|
1660 |
+
|
1661 |
+
|
1662 |
|
1663 |
<td align="left" class="Content">
|
1664 |
|
1665 |
+
|
1666 |
+
|
1667 |
<span class="TXT">
|
1668 |
|
1669 |
+
|
1670 |
+
|
1671 |
<?php
|
1672 |
|
1673 |
+
|
1674 |
+
|
1675 |
$sel = '#F7F7F7';
|
1676 |
|
1677 |
+
|
1678 |
+
|
1679 |
|
1680 |
|
1681 |
+
|
1682 |
+
|
1683 |
if (isset($skyscraper_options["sociable_banner_colorBack"])){
|
1684 |
|
1685 |
+
|
1686 |
+
|
1687 |
|
1688 |
|
1689 |
+
|
1690 |
+
|
1691 |
if (!empty($skyscraper_options["sociable_banner_colorBack"])){
|
1692 |
|
1693 |
+
|
1694 |
+
|
1695 |
|
1696 |
|
1697 |
+
|
1698 |
+
|
1699 |
$sel = $skyscraper_options["sociable_banner_colorBack"];
|
1700 |
|
1701 |
+
|
1702 |
+
|
1703 |
}
|
1704 |
|
1705 |
+
|
1706 |
+
|
1707 |
}
|
1708 |
|
1709 |
+
|
1710 |
+
|
1711 |
?>
|
1712 |
|
1713 |
+
|
1714 |
+
|
1715 |
<input type="text" value="<?php echo $sel?>" name="skyscraper_options[sociable_banner_colorBack]" style="width:81px !important">
|
1716 |
|
1717 |
+
|
1718 |
+
|
1719 |
|
1720 |
|
1721 |
+
|
1722 |
+
|
1723 |
</span>
|
1724 |
|
1725 |
+
|
1726 |
+
|
1727 |
<br>
|
1728 |
+
|
1729 |
</td>
|
1730 |
+
|
1731 |
</tr>
|
1732 |
|
1733 |
+
|
1734 |
+
|
1735 |
|
1736 |
|
1737 |
+
|
1738 |
+
|
1739 |
</tbody></table>
|
1740 |
|
1741 |
+
|
1742 |
+
|
1743 |
<br><br>
|
1744 |
+
|
1745 |
</div>
|
1746 |
+
|
1747 |
</div>
|
1748 |
+
|
1749 |
<!-- general options -->
|
1750 |
+
|
1751 |
<TABLE class="Title-Box" style="cursor:pointer;" cellspacing="0" cellpadding="0" onclick="hideOrShow('GeneralOptions');">
|
1752 |
|
1753 |
+
|
1754 |
+
|
1755 |
<TR>
|
1756 |
+
|
1757 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" id="GeneralOptions-Title" ><span id="GeneralOptions-Tab"> + </span> <?php _e("General Options","sociable");?></TD><TD class="Border-Right"></TD>
|
1758 |
+
|
1759 |
</TR>
|
1760 |
+
|
1761 |
</TABLE>
|
1762 |
+
|
1763 |
<BR/>
|
1764 |
+
|
1765 |
|
1766 |
+
|
1767 |
<DIV class="Content-Box" id="GeneralOptions-Content" style="display:none;" >
|
1768 |
+
|
1769 |
|
1770 |
+
|
1771 |
<BR/>
|
1772 |
|
1773 |
+
|
1774 |
+
|
1775 |
<DIV align="center" style="width:100%;">
|
1776 |
+
|
1777 |
<TABLE align="center" class="GeneralOptions-List" cellspacing="0" border=0 cellpadding ="10" >
|
1778 |
+
|
1779 |
|
1780 |
+
|
1781 |
<TR valign="top" >
|
1782 |
+
|
1783 |
<TD align="right" class="Title" ><?php _e("Widget Position","sociable")?></TD>
|
1784 |
+
|
1785 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["widget_position"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[widget_position]" id="widget_position" /></TD>
|
1786 |
+
|
1787 |
<TD align="left" class="Content">
|
1788 |
+
|
1789 |
<SPAN class="TXT"><?php _e("Check if you want Sociable Fixed on the screen","sociable");?> </SPAN>
|
1790 |
|
1791 |
+
|
1792 |
+
|
1793 |
<BR/>
|
1794 |
+
|
1795 |
|
1796 |
+
|
1797 |
</TD>
|
1798 |
+
|
1799 |
</TR>
|
1800 |
+
|
1801 |
</TABLE>
|
1802 |
+
|
1803 |
<BR/><BR/>
|
1804 |
+
|
1805 |
</DIV>
|
1806 |
+
|
1807 |
</DIV>
|
1808 |
+
|
1809 |
<TABLE class="Title-Box" style="cursor:pointer;" cellspacing="0" cellpadding="0" onclick="hideOrShow('Locations');" >
|
1810 |
+
|
1811 |
<TR>
|
1812 |
|
1813 |
+
|
1814 |
+
|
1815 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" id="Locations-Title" ><span id="Locations-Tab">+ </span><?php _e("Locations","sociable");?></TD><TD class="Border-Right"></TD>
|
1816 |
+
|
1817 |
</TR>
|
1818 |
+
|
1819 |
</TABLE>
|
1820 |
+
|
1821 |
<BR/>
|
1822 |
+
|
1823 |
|
1824 |
+
|
1825 |
<DIV class="Content-Box" id="Locations-Content" style="display:none;" >
|
1826 |
+
|
1827 |
<DIV class="Locations-TXT" id="Locations-TXT" ><?php _e("Please select the locations that you wish to allow the Sociable plugin to insert itself.","sociable");?></DIV>
|
1828 |
+
|
1829 |
|
1830 |
+
|
1831 |
<BR/>
|
1832 |
+
|
1833 |
<DIV align="center" style="width:100%;">
|
1834 |
|
1835 |
+
|
1836 |
+
|
1837 |
<TABLE align="center" class="Locations-List" cellspacing="0" border=0 cellpadding="10">
|
1838 |
+
|
1839 |
<TR valign="top" >
|
1840 |
+
|
1841 |
<TD align="right" class="Title" ><?php _e("Home page","sociable");?></TD>
|
1842 |
+
|
1843 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["locations"]["is_front_page"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[locations][is_front_page]" id="HomePage" /></TD>
|
1844 |
+
|
1845 |
<TD align="left" class="Content">
|
1846 |
+
|
1847 |
<SPAN class="TXT"><?php _e("The front page of the blog (if set to a static page), or the main blog page (if set to your latest posts).","sociable");?></SPAN>
|
1848 |
+
|
1849 |
|
1850 |
+
|
1851 |
</TD>
|
1852 |
+
|
1853 |
</TR>
|
1854 |
|
1855 |
+
|
1856 |
+
|
1857 |
|
1858 |
+
|
1859 |
<TR valign="top" >
|
1860 |
+
|
1861 |
<TD align="right" class="Title" ><?php _e("Blog page","sociable");?></TD>
|
1862 |
+
|
1863 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["locations"]["is_home"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[locations][is_home]" id="BlogPage" /></TD>
|
1864 |
+
|
1865 |
<TD align="left" class="Content">
|
1866 |
+
|
1867 |
<SPAN class="TXT"><?php _e("The home page of the blog if is set to your latest posts, or the posts page if the home page is set to a static page","sociable");?></SPAN>
|
1868 |
+
|
1869 |
|
1870 |
+
|
1871 |
</TD>
|
1872 |
+
|
1873 |
</TR>
|
1874 |
+
|
1875 |
|
1876 |
+
|
1877 |
<TR valign="top" >
|
1878 |
|
1879 |
+
|
1880 |
+
|
1881 |
<TD align="right" class="Title" ><?php _e("Posts","sociable");?></TD>
|
1882 |
+
|
1883 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["locations"]["is_single"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[locations][is_single]" id="Posts" /></TD>
|
1884 |
+
|
1885 |
<TD align="left" class="Content">
|
1886 |
+
|
1887 |
<SPAN class="TXT"><?php _e("Single post pages","sociable");?></SPAN>
|
1888 |
+
|
1889 |
|
1890 |
+
|
1891 |
</TD>
|
1892 |
+
|
1893 |
</TR>
|
1894 |
+
|
1895 |
|
1896 |
+
|
1897 |
<TR valign="top" >
|
1898 |
+
|
1899 |
<TD align="right" class="Title" ><?php _e("Pages","sociable");?></TD>
|
1900 |
|
1901 |
+
|
1902 |
+
|
1903 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["locations"]["is_page"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[locations][is_page]" id="Pages" /></TD>
|
1904 |
+
|
1905 |
<TD align="left" class="Content">
|
1906 |
+
|
1907 |
<SPAN class="TXT"><?php _e("Individual Wordpress pages","sociable");?></SPAN>
|
1908 |
+
|
1909 |
|
1910 |
+
|
1911 |
</TD>
|
1912 |
+
|
1913 |
</TR>
|
1914 |
+
|
1915 |
|
1916 |
+
|
1917 |
<TR valign="top" >
|
1918 |
+
|
1919 |
<TD align="right" class="Title" ><?php _e("Category archives","sociable");?></TD>
|
1920 |
+
|
1921 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["locations"]["is_category"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[locations][is_category]" id="CategoryArchives" /></TD>
|
1922 |
|
1923 |
+
|
1924 |
+
|
1925 |
<TD align="left" class="Content">
|
1926 |
+
|
1927 |
<SPAN class="TXT"><?php _e("Category archive pages","sociable");?></SPAN>
|
1928 |
+
|
1929 |
|
1930 |
+
|
1931 |
</TD>
|
1932 |
+
|
1933 |
</TR>
|
1934 |
+
|
1935 |
|
1936 |
+
|
1937 |
<TR valign="top" >
|
1938 |
+
|
1939 |
<TD align="right" class="Title" ><?php _e("Date archives","sociable");?></TD>
|
1940 |
+
|
1941 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["locations"]["is_date"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[locations][is_date]" id="DateArchives" /></TD>
|
1942 |
+
|
1943 |
<TD align="left" class="Content">
|
1944 |
|
1945 |
+
|
1946 |
+
|
1947 |
<SPAN class="TXT"><?php _e("Date archive pages","sociable");?> </SPAN>
|
1948 |
+
|
1949 |
|
1950 |
+
|
1951 |
</TD>
|
1952 |
+
|
1953 |
</TR>
|
1954 |
+
|
1955 |
|
1956 |
+
|
1957 |
<TR valign="top" >
|
1958 |
+
|
1959 |
<TD align="right" class="Title" ><?php _e("Tag archives","sociable");?></TD>
|
1960 |
+
|
1961 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["locations"]["is_tag"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[locations][is_tag]" id="TagArchives" /></TD>
|
1962 |
+
|
1963 |
<TD align="left" class="Content">
|
1964 |
|
1965 |
+
|
1966 |
+
|
1967 |
<SPAN class="TXT"><?php _e("Tag archive pages","sociable");?> </SPAN>
|
1968 |
+
|
1969 |
|
1970 |
+
|
1971 |
</TD>
|
1972 |
+
|
1973 |
</TR>
|
1974 |
+
|
1975 |
|
1976 |
+
|
1977 |
<TR valign="top" >
|
1978 |
+
|
1979 |
<TD align="right" class="Title" ><?php _e("Author archives","sociable");?></TD>
|
1980 |
+
|
1981 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["locations"]["is_author"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[locations][is_author]" id="AuthorArchives" /></TD>
|
1982 |
+
|
1983 |
<TD align="left" class="Content">
|
1984 |
|
1985 |
+
|
1986 |
+
|
1987 |
<SPAN class="TXT"><?php _e("Author archive pages","sociable");?></SPAN>
|
1988 |
+
|
1989 |
|
1990 |
+
|
1991 |
</TD>
|
1992 |
+
|
1993 |
</TR>
|
1994 |
+
|
1995 |
|
1996 |
+
|
1997 |
<TR valign="top" >
|
1998 |
+
|
1999 |
<TD align="right" class="Title" ><?php _e("Search results","sociable");?></TD>
|
2000 |
+
|
2001 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["locations"]["is_search"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[locations][is_search]" id="SearchResults" /></TD>
|
2002 |
+
|
2003 |
<TD align="left" class="Content">
|
2004 |
+
|
2005 |
<SPAN class="TXT"><?php _e("Search results pages","sociable");?></SPAN>
|
2006 |
|
2007 |
+
|
2008 |
+
|
2009 |
|
2010 |
+
|
2011 |
</TD>
|
2012 |
+
|
2013 |
</TR>
|
2014 |
+
|
2015 |
|
2016 |
+
|
2017 |
<TR valign="top" >
|
2018 |
+
|
2019 |
<TD align="right" class="Title" ><?php _e("RSS feeds","sociable");?></TD>
|
2020 |
+
|
2021 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($skyscraper_options["locations"]["is_rss"])) echo "checked='checked'"?> type="checkbox" name="skyscraper_options[locations][is_rss]" id="RssFeeds" /></TD>
|
2022 |
+
|
2023 |
<TD align="left" class="Content">
|
2024 |
+
|
2025 |
<SPAN class="TXT"><?php _e("RSS feeds","sociable");?></SPAN>
|
2026 |
+
|
2027 |
|
2028 |
+
|
2029 |
</TD>
|
2030 |
|
2031 |
+
|
2032 |
+
|
2033 |
</TR>
|
2034 |
+
|
2035 |
|
2036 |
+
|
2037 |
</TABLE>
|
2038 |
+
|
2039 |
<BR/><BR/>
|
2040 |
+
|
2041 |
</DIV>
|
2042 |
+
|
2043 |
</DIV>
|
2044 |
+
|
2045 |
|
2046 |
+
|
2047 |
<TABLE class="Title-Box" style="cursor:pointer;" cellspacing="0" cellpadding="0" onclick="hideOrShow('Active');" >
|
2048 |
+
|
2049 |
<TR>
|
2050 |
+
|
2051 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" id="Active-Title" ><span id="Active-Tab">+ </span><?php _e("Active Skyscraper","sociable");?></TD><TD class="Border-Right"></TD>
|
2052 |
+
|
2053 |
</TR>
|
2054 |
|
2055 |
+
|
2056 |
+
|
2057 |
</TABLE>
|
2058 |
+
|
2059 |
|
2060 |
+
|
2061 |
<div style="display: block;" id="Active-Content" class="Content-Box">
|
2062 |
+
|
2063 |
|
2064 |
+
|
2065 |
<br>
|
2066 |
+
|
2067 |
<div align="center" style="width:100%;">
|
2068 |
+
|
2069 |
<table align="center" cellspacing="0" cellpadding="10" border="0" class="GeneralOptions-List">
|
2070 |
+
|
2071 |
|
2072 |
+
|
2073 |
<tbody><tr valign="top">
|
2074 |
+
|
2075 |
<td align="right" class="Title">Active Skyscraper</td>
|
2076 |
+
|
2077 |
<td align="left" style="width:5px;">
|
2078 |
|
2079 |
+
|
2080 |
+
|
2081 |
<input <?php if(isset($skyscraper_options["active"])) echo "checked='checked'"?> type="checkbox" id="active" name="skyscraper_options[active]" ></td>
|
2082 |
+
|
2083 |
<td align="left" class="Content">
|
2084 |
+
|
2085 |
<span class="TXT">Check if you want Sociable Skyscraper enable </span>
|
2086 |
+
|
2087 |
<br>
|
2088 |
+
|
2089 |
|
2090 |
+
|
2091 |
</td>
|
2092 |
+
|
2093 |
</tr>
|
2094 |
+
|
2095 |
</tbody></table>
|
2096 |
+
|
2097 |
<br><br>
|
2098 |
|
2099 |
+
|
2100 |
+
|
2101 |
</div>
|
2102 |
+
|
2103 |
</div>
|
2104 |
+
|
2105 |
<br/><br/>
|
2106 |
+
|
2107 |
<?php settings_fields( 'skyscraper_options_group' ); ?>
|
2108 |
+
|
2109 |
</form>
|
2110 |
+
|
2111 |
<div class="Content-Box">
|
2112 |
+
|
2113 |
|
2114 |
+
|
2115 |
<form id="sociable_reset_form" action="" method="POST">
|
2116 |
+
|
2117 |
<?php wp_nonce_field('sociable-reset'); ?>
|
2118 |
+
|
2119 |
<input type="hidden" id="skyscraper_reset" name="skyscraper_reset" value="1">
|
2120 |
|
2121 |
+
|
2122 |
+
|
2123 |
<?php //submit_button( __( 'Reset Sociable' ) , 'primary', 'sociable_reset', false ); ?>
|
2124 |
+
|
2125 |
</form>
|
2126 |
+
|
2127 |
|
2128 |
+
|
2129 |
<div id="ActionsBar">
|
2130 |
+
|
2131 |
<div style="cursor:pointer;line-height:15px;" onclick="document.getElementById('form1').submit();" class="SaveChanges"><br>
|
2132 |
+
|
2133 |
<span style="margin:30px;">Save Changes</span>
|
2134 |
+
|
2135 |
</div>
|
2136 |
+
|
2137 |
<div style="cursor:pointer;line-height:15px;font-size:12px;" onclick="document.getElementById('sociable_reset_form').submit();" name="sociable_reset" id="sociable_reset" class="ResetSociable"><br>
|
2138 |
+
|
2139 |
<span style="margin:40px;margin-left:35px;">Reset Skyscraper</span>
|
2140 |
|
2141 |
+
|
2142 |
+
|
2143 |
</div>
|
2144 |
+
|
2145 |
</div>
|
2146 |
+
|
2147 |
</div>
|
2148 |
+
|
2149 |
|
2150 |
+
|
2151 |
</div>
|
2152 |
+
|
2153 |
<div style="float:left;width:49%;margin-left:15px" name="skyscraper" id="skyscraper">
|
2154 |
+
|
2155 |
<script type="text/javascript">
|
2156 |
+
|
2157 |
var base_url_sociable = "<?php echo SOCIABLE_HTTP_PATH?>";
|
2158 |
+
|
2159 |
</script>
|
2160 |
+
|
2161 |
</div>
|
2162 |
+
|
2163 |
<?php
|
2164 |
+
|
2165 |
}
|
2166 |
+
|
2167 |
|
2168 |
+
|
2169 |
/**
|
2170 |
+
|
2171 |
* Add The Menu Pages To The Administration Options
|
2172 |
+
|
2173 |
*/
|
2174 |
+
|
2175 |
|
2176 |
+
|
2177 |
function add_menu_pages(){
|
2178 |
+
|
2179 |
|
2180 |
+
|
2181 |
global $sociable_post_types;
|
2182 |
+
|
2183 |
|
2184 |
+
|
2185 |
$url = $_SERVER["QUERY_STRING"];
|
2186 |
+
|
2187 |
// $page[] = add_options_page( __( 'Sociable Options' ), __( 'Sociable Plugin' ), 'manage_options', 'sociable_select' , array( 'sociable_Admin_Options' , 'Select_Sociable_Page' ) );
|
2188 |
+
|
2189 |
//$page[]= add_plugins_page( __( 'Sociable Options' ), __( 'Sociable Plugin' ), 'manage_options', 'Create_Options_Page_Skycraper' );
|
2190 |
+
|
2191 |
//$page[]= add_plugins_page( 'sociable_options', 'sociable_options', 'read', 'Create_Options_Page' );
|
2192 |
+
|
2193 |
$page[] = add_options_page( "","", 'manage_options', 'sociable_select' , array( 'sociable_Admin_Options' , 'Select_Sociable_Page' ) );
|
2194 |
+
|
2195 |
$page[] = add_options_page( "","", 'manage_options', 'sociable_options' , array( 'sociable_Admin_Options' , 'Create_Options_Page' ) );
|
2196 |
+
|
2197 |
$page[] = add_options_page( "","", 'manage_options', 'skyscraper_options' , array( 'sociable_Admin_Options' , 'Create_Options_Page_Skycraper' ) );
|
2198 |
+
|
2199 |
// Add a new submenu under Settings:
|
2200 |
+
|
2201 |
// $page[] = add_options_page(__( 'Sociable Options' ),__( 'Sociable Plugin' ), 'manage_options', 'sociable_select', 'Select_Sociable_Page');
|
2202 |
+
|
2203 |
// Add a new top-level menu (ill-advised):
|
2204 |
+
|
2205 |
add_menu_page(__( 'Sociable Options' ), __( 'Select Sociable Plugin' ), 'manage_options', '/options-general.php?page=sociable_select' );
|
2206 |
+
|
2207 |
// Add a submenu to the custom top-level menu:
|
2208 |
+
|
2209 |
add_submenu_page('options-general.php?page=sociable_select', __( 'Sociable Options' ), __( 'Sociable Options' ), 'manage_options', 'sociable_options' , array( 'sociable_Admin_Options' , 'Create_Options_Page' ) );
|
2210 |
+
|
2211 |
// Add a second submenu to the custom top-level menu:
|
2212 |
+
|
2213 |
add_submenu_page('options-general.php?page=sociable_select', __( 'Skyscraper Options' ), __( 'Skyscraper Options' ), 'manage_options', 'skyscraper_options' , array( 'sociable_Admin_Options' , 'Create_Options_Page_Skycraper' ) );
|
2214 |
+
|
2215 |
|
2216 |
+
|
2217 |
//Add CSS And Javascript Specific To This Options Pages
|
2218 |
+
|
2219 |
add_action( 'admin_print_styles-' . $page[0] , array( 'sociable_Admin_Options' , 'enqueue_styles' ) );
|
2220 |
+
|
2221 |
add_action( 'admin_print_scripts-' . $page[0] , array( 'sociable_Admin_Options' , 'enqueue_scripts' ) );
|
2222 |
+
|
2223 |
|
2224 |
+
|
2225 |
add_action( 'admin_print_styles-' . $page[1] , array( 'sociable_Admin_Options' , 'enqueue_styles' ) );
|
2226 |
+
|
2227 |
add_action( 'admin_print_scripts-' . $page[1] , array( 'sociable_Admin_Options' , 'enqueue_scripts' ) );
|
2228 |
+
|
2229 |
add_action( 'admin_print_styles-' . $page[2] , array( 'sociable_Admin_Options' , 'enqueue_styles' ) );
|
2230 |
+
|
2231 |
add_action( 'admin_print_scripts-' . $page[2] , array( 'sociable_Admin_Options' , 'enqueue_scripts' ) );
|
2232 |
+
|
2233 |
|
2234 |
+
|
2235 |
if( isset( $_POST['sociable_reset'] ) ){
|
2236 |
+
|
2237 |
check_admin_referer( 'sociable-reset' );
|
2238 |
+
|
2239 |
|
2240 |
+
|
2241 |
sociable_reset();
|
2242 |
+
|
2243 |
wp_redirect( $_SERVER['HTTP_REFERER' ] );
|
2244 |
+
|
2245 |
}
|
2246 |
+
|
2247 |
|
2248 |
+
|
2249 |
if( isset( $_POST['skyscraper_reset'] ) ){
|
2250 |
+
|
2251 |
check_admin_referer( 'sociable-reset' );
|
2252 |
+
|
2253 |
|
2254 |
+
|
2255 |
skyscraper_reset();
|
2256 |
+
|
2257 |
wp_redirect( $_SERVER['HTTP_REFERER' ] );
|
2258 |
+
|
2259 |
}
|
2260 |
+
|
2261 |
|
2262 |
+
|
2263 |
|
2264 |
+
|
2265 |
/*
|
2266 |
+
|
2267 |
* We can create The Meta Boxes Here
|
2268 |
+
|
2269 |
*/
|
2270 |
+
|
2271 |
foreach( $sociable_post_types as $type => $data ){
|
2272 |
+
|
2273 |
self::add_meta_box( $type );
|
2274 |
+
|
2275 |
}
|
2276 |
+
|
2277 |
//Also on posts and pages
|
2278 |
+
|
2279 |
self::add_meta_box( 'post' );
|
2280 |
+
|
2281 |
self::add_meta_box( 'page' );
|
2282 |
+
|
2283 |
|
2284 |
+
|
2285 |
}
|
2286 |
+
|
2287 |
|
2288 |
+
|
2289 |
/*
|
2290 |
+
|
2291 |
* Function to Enqueue The Styles For The Options Page
|
2292 |
+
|
2293 |
*/
|
2294 |
+
|
2295 |
function enqueue_styles(){
|
2296 |
+
|
2297 |
wp_enqueue_style( 'style-admin-css', SOCIABLE_HTTP_PATH . 'css/style-admin.css' );
|
2298 |
+
|
2299 |
wp_enqueue_style( 'sociable-admin-css', SOCIABLE_HTTP_PATH . 'css/sociable-admin.css' );
|
2300 |
+
|
2301 |
wp_enqueue_style( 'sociablecss' , SOCIABLE_HTTP_PATH . 'css/sociable.css' );
|
2302 |
+
|
2303 |
}
|
2304 |
+
|
2305 |
|
2306 |
+
|
2307 |
/*
|
2308 |
+
|
2309 |
* Function To Enqueue The Scripts For The Options Page
|
2310 |
+
|
2311 |
*/
|
2312 |
+
|
2313 |
function enqueue_scripts(){
|
2314 |
+
|
2315 |
wp_enqueue_script('jquery');
|
2316 |
+
|
2317 |
wp_enqueue_script('jquery-ui-core',false,array('jquery'));
|
2318 |
+
|
2319 |
wp_enqueue_script('jquery-ui-sortable',false,array('jquery','jquery-ui-core'));
|
2320 |
+
|
2321 |
wp_enqueue_script( 'sociable-admin-js', SOCIABLE_HTTP_PATH . 'js/sociable-admin.js' , array( 'jquery','jquery-ui-core' , 'jquery-ui-sortable' ) );
|
2322 |
+
|
2323 |
wp_enqueue_script( 'admin-fn-js', SOCIABLE_HTTP_PATH . 'js/admin-fn.js' , array( 'jquery','jquery-ui-core' , 'jquery-ui-sortable' ) );
|
2324 |
+
|
2325 |
|
2326 |
+
|
2327 |
}
|
2328 |
+
|
2329 |
|
2330 |
+
|
2331 |
|
2332 |
+
|
2333 |
|
2334 |
+
|
2335 |
/*
|
2336 |
+
|
2337 |
* Function To Add The Settings Fields.
|
2338 |
+
|
2339 |
*/
|
2340 |
+
|
2341 |
function do_site_selection_list($plugin = 'sociable'){
|
2342 |
+
|
2343 |
|
2344 |
+
|
2345 |
if ($plugin == 'sociable'){
|
2346 |
+
|
2347 |
|
2348 |
+
|
2349 |
global $sociable_options;
|
2350 |
+
|
2351 |
$option_plugin = $sociable_options;
|
2352 |
+
|
2353 |
$name_plugin = "sociable_options";
|
2354 |
+
|
2355 |
}
|
2356 |
+
|
2357 |
else{
|
2358 |
+
|
2359 |
|
2360 |
+
|
2361 |
global $skyscraper_options;
|
2362 |
+
|
2363 |
$option_plugin = $skyscraper_options;
|
2364 |
+
|
2365 |
$name_plugin = "skyscraper_options";
|
2366 |
+
|
2367 |
}
|
2368 |
+
|
2369 |
|
2370 |
+
|
2371 |
|
2372 |
+
|
2373 |
$sociable_known_sites = get_option( 'sociable_known_sites' );
|
2374 |
+
|
2375 |
/*
|
2376 |
+
|
2377 |
* Sort The List Based On The Active Sites So That They Display Correctly.
|
2378 |
+
|
2379 |
*/
|
2380 |
+
|
2381 |
$active_sites = isset( $option_plugin['active_sites'] ) && is_array( $option_plugin['active_sites'] ) ? $option_plugin['active_sites'] : array() ;
|
2382 |
+
|
2383 |
|
2384 |
+
|
2385 |
//Start Blank
|
2386 |
+
|
2387 |
$active = Array();
|
2388 |
+
|
2389 |
|
2390 |
+
|
2391 |
//Disabled Untill Proven Active
|
2392 |
+
|
2393 |
$disabled = $sociable_known_sites;
|
2394 |
+
|
2395 |
|
2396 |
+
|
2397 |
//Loop Through The Active Sites, sorting into 2 arrays
|
2398 |
+
|
2399 |
foreach( $active_sites as $sitename => $value ) {
|
2400 |
+
|
2401 |
$active[$sitename] = $disabled[$sitename];
|
2402 |
+
|
2403 |
unset( $disabled[$sitename] );
|
2404 |
+
|
2405 |
}
|
2406 |
+
|
2407 |
|
2408 |
+
|
2409 |
uksort($disabled, "strnatcasecmp");
|
2410 |
+
|
2411 |
|
2412 |
+
|
2413 |
$sites = array_merge( $active, $disabled );
|
2414 |
+
|
2415 |
|
2416 |
+
|
2417 |
$imagepath = isset( $option_plugin['sociable_imagedir'] ) ? $option_plugin['sociable_imagedir'] : '' ;
|
2418 |
+
|
2419 |
|
2420 |
+
|
2421 |
if ($imagepath == "") {
|
2422 |
+
|
2423 |
$imagepath = trailingslashit( SOCIABLE_HTTP_PATH ) . 'images/';
|
2424 |
+
|
2425 |
} else {
|
2426 |
+
|
2427 |
$imagepath .= trailingslashit( $imagepath );
|
2428 |
+
|
2429 |
}
|
2430 |
+
|
2431 |
|
2432 |
+
|
2433 |
$out ='<ul id="sociable_site_list" >' ;
|
2434 |
+
|
2435 |
$io = 0;
|
2436 |
+
|
2437 |
foreach( $sites as $sitename => $site ){
|
2438 |
+
|
2439 |
|
2440 |
+
|
2441 |
|
2442 |
+
|
2443 |
//Set Checked And Active If Relevant
|
2444 |
+
|
2445 |
if( array_key_exists( $sitename, $active_sites ) ){
|
2446 |
+
|
2447 |
$checked = 'checked="checked"';
|
2448 |
+
|
2449 |
$active = 'active';
|
2450 |
+
|
2451 |
} else {
|
2452 |
+
|
2453 |
$checked = '';
|
2454 |
+
|
2455 |
$active = 'inactive';
|
2456 |
+
|
2457 |
}
|
2458 |
+
|
2459 |
if ( $sitename != "More"){
|
2460 |
+
|
2461 |
if (isset($site["counter"])){
|
2462 |
+
|
2463 |
//$image = "<img src='".SOCIABLE_HTTP_PATH."images/".$site["favicon"]."'>";
|
2464 |
+
|
2465 |
$image = $site["url"];
|
2466 |
+
|
2467 |
}else{
|
2468 |
+
|
2469 |
$image = _get_sociable_image( $site, '' );
|
2470 |
+
|
2471 |
}
|
2472 |
+
|
2473 |
}else{
|
2474 |
+
|
2475 |
$image = "<img src='".SOCIABLE_HTTP_PATH."images/more.png'>";
|
2476 |
+
|
2477 |
}
|
2478 |
+
|
2479 |
|
2480 |
+
|
2481 |
// if ( ! isset( $site['spriteCoordinates']) || isset( $sociable_options['sociable_disablesprite'] ) ) {
|
2482 |
+
|
2483 |
// if (strpos($site['favicon'], 'http') === 0) {
|
2484 |
+
|
2485 |
// $imgsrc = $site['favicon'];
|
2486 |
+
|
2487 |
// } else {
|
2488 |
+
|
2489 |
// $imgsrc = $imagepath.$site['favicon'];
|
2490 |
+
|
2491 |
// }
|
2492 |
+
|
2493 |
// $img = '<img src="' . $imgsrc . '" width="16" height="16" />';
|
2494 |
+
|
2495 |
// } else {
|
2496 |
+
|
2497 |
// $imgsrc = $imagepath."services-sprite.gif";
|
2498 |
+
|
2499 |
// $services_sprite_url = $imagepath . "services-sprite.png";
|
2500 |
+
|
2501 |
// $spriteCoords = $site['spriteCoordinates'];
|
2502 |
+
|
2503 |
// $img = '<img src="' . $imgsrc . '" width="16" height="16" style="background: transparent url(' . $services_sprite_url . ') no-repeat; background-position:-' . $spriteCoords[0] . 'px -' . $spriteCoords[1] . 'px" />';
|
2504 |
+
|
2505 |
// }
|
2506 |
+
|
2507 |
|
2508 |
+
|
2509 |
$out .= '<li id="' . $sitename . '" class="' . $active . '">';
|
2510 |
+
|
2511 |
|
2512 |
+
|
2513 |
$out .= '<input type="checkbox" id="cb_' . $sitename . '" name="'.$name_plugin.'[active_sites][' . $sitename . ']" ' . $checked . ' />';
|
2514 |
+
|
2515 |
|
2516 |
+
|
2517 |
$out .= $image;
|
2518 |
+
|
2519 |
if (!isset($site["counter"])){
|
2520 |
+
|
2521 |
$out .= $sitename;
|
2522 |
+
|
2523 |
}
|
2524 |
+
|
2525 |
|
2526 |
+
|
2527 |
$out .= '</li>';
|
2528 |
+
|
2529 |
|
2530 |
+
|
2531 |
}
|
2532 |
+
|
2533 |
|
2534 |
+
|
2535 |
|
2536 |
+
|
2537 |
echo $out."</ul>";
|
2538 |
+
|
2539 |
|
2540 |
+
|
2541 |
}
|
2542 |
+
|
2543 |
|
2544 |
+
|
2545 |
/*
|
2546 |
+
|
2547 |
* Create The HTML For The Options Page
|
2548 |
+
|
2549 |
*/
|
2550 |
+
|
2551 |
function Create_Options_Page(){
|
2552 |
+
|
2553 |
global $sociable_options;
|
2554 |
+
|
2555 |
?>
|
2556 |
|
2557 |
+
|
2558 |
+
|
2559 |
<div class="wrap">
|
2560 |
|
2561 |
+
|
2562 |
+
|
2563 |
<DIV style="margin:0 0 0 25px" class="Post-subTXT" id="Post-subTXT" >
|
2564 |
+
|
2565 |
|
2566 |
+
|
2567 |
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblogplay.com%2F&send=false&layout=standard&width=450&show_faces=true&action=recommend&colorscheme=light&font&height=80&appId=133479460071366" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:40px;" allowTransparency="true"></iframe><br />
|
2568 |
+
|
2569 |
+
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://blogplay.com" data-text="Check the sociable plugin" >Tweet</a>
|
2570 |
+
|
2571 |
+
|
2572 |
|
2573 |
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
|
2574 |
+
|
2575 |
<br />
|
2576 |
+
|
2577 |
</div>
|
2578 |
+
|
2579 |
<h2 style="clear:both;"><?php _e( 'Sociable Options' ); ?></h2>
|
2580 |
+
|
2581 |
<form method="post" action="options.php" id="form1" autocomplete="off">
|
2582 |
|
2583 |
+
|
2584 |
+
|
2585 |
|
2586 |
+
|
2587 |
<?php wp_nonce_field('sociable-config'); ?>
|
2588 |
+
|
2589 |
<INPUT type="hidden" class="version-INPUT" id="version" name="sociable_options[version]" value="<?php echo$sociable_options["version"];?>" />
|
2590 |
+
|
2591 |
+
<INPUT type="hidden" id="blogplay_tags" name="sociable_options[blogplay_tags]" value="1" />
|
2592 |
+
|
2593 |
<TABLE class="Title-Box" cellspacing="0" cellpadding="0" id="Preview-Title" style="margin:0 0 0 25px">
|
2594 |
+
|
2595 |
<TR>
|
2596 |
+
|
2597 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" >Preview</TD><TD class="Border-Right"></TD>
|
2598 |
+
|
2599 |
</TR>
|
2600 |
+
|
2601 |
</TABLE>
|
2602 |
+
|
2603 |
<BR/>
|
2604 |
+
|
2605 |
|
2606 |
+
|
2607 |
<DIV class="Content-Box" id="Preview-Content">
|
2608 |
|
2609 |
+
|
2610 |
+
|
2611 |
<DIV style="margin:0 0 0 25px" align="left" class="Live-Preview" id="Live-Preview" ><?php _e("Live preview of how Sociable will appear on your blog.","sociable")?></DIV>
|
2612 |
+
|
2613 |
|
2614 |
+
|
2615 |
<BR/>
|
2616 |
+
|
2617 |
|
2618 |
+
|
2619 |
<DIV style="margin:0 0 0 25px" class="Post-TXT" id="Post-TXT" ><?php _e("This is your post here...","sociable")?></DIV>
|
2620 |
+
|
2621 |
|
2622 |
+
|
2623 |
<DIV style="margin:0 0 0 25px" class="Post-subTXT" id="Post-subTXT" >Lorem ipsum dolor sit amet, consectetur adipiscing elit.</DIV>
|
2624 |
+
|
2625 |
|
2626 |
+
|
2627 |
<BR/>
|
2628 |
+
|
2629 |
<DIV style="margin:0 0 0 25px" id="ShareAndEnjoy" > <?php do_sociable(); ?></DIV>
|
2630 |
+
|
2631 |
</DIV>
|
2632 |
+
|
2633 |
<TABLE class="Title-Box" cellspacing="0" cellpadding="0" id="Tagline-Title">
|
2634 |
|
2635 |
+
|
2636 |
+
|
2637 |
<TR>
|
2638 |
+
|
2639 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" ><?php _e("Tagline","sociable");?></TD><TD class="Border-Right"></TD>
|
2640 |
+
|
2641 |
</TR>
|
2642 |
+
|
2643 |
</TABLE>
|
2644 |
+
|
2645 |
<BR/>
|
2646 |
+
|
2647 |
|
2648 |
+
|
2649 |
<DIV class="Content-Box" id="Tagline-Content">
|
2650 |
+
|
2651 |
<DIV class="Tagline-TXT" id="Tagline-TXT" ><?php _e('Previously we used "Share and Enjoy", remember the good old days?',"sociable");?></DIV>
|
2652 |
+
|
2653 |
|
2654 |
+
|
2655 |
<BR/>
|
2656 |
+
|
2657 |
<DIV style="width:100%;height:60px;">
|
2658 |
|
2659 |
+
|
2660 |
+
|
2661 |
<INPUT type="text" class="Tagline-INPUT" id="tagline" name="sociable_options[tagline]" value="<?php echo$sociable_options["tagline"];?>" />
|
2662 |
+
|
2663 |
|
2664 |
+
|
2665 |
<DIV class="ToSociable" >
|
2666 |
+
|
2667 |
<INPUT type="checkbox" <?php if (!empty($sociable_options["help_grow"])) echo "checked = 'checked'";?> name="sociable_options[help_grow]" id="LinkToSociable" />
|
2668 |
+
|
2669 |
<?php _e("Link to Sociable","sociable");?><BR/>
|
2670 |
+
|
2671 |
<SPAN style="font-size:14px;"><?php _e("(Help us grow, please leave the link so others discover Sociable from your blog)","sociable");?></SPAN>
|
2672 |
+
|
2673 |
</DIV>
|
2674 |
+
|
2675 |
</DIV>
|
2676 |
+
|
2677 |
</DIV>
|
2678 |
+
|
2679 |
|
2680 |
+
|
2681 |
|
2682 |
+
|
2683 |
<TABLE class="Title-Box" cellspacing="0" cellpadding="0" id="Tagline-Title">
|
2684 |
|
2685 |
+
|
2686 |
+
|
2687 |
<TR>
|
2688 |
+
|
2689 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" ><?php _e("Icons to Include","sociable");?></TD><TD class="Border-Right"></TD>
|
2690 |
+
|
2691 |
</TR>
|
2692 |
+
|
2693 |
</TABLE>
|
2694 |
+
|
2695 |
<BR/>
|
2696 |
+
|
2697 |
|
2698 |
+
|
2699 |
<DIV class="Content-Box" id="IconsToInclude-Box" style="">
|
2700 |
+
|
2701 |
<DIV class="IconsToInclude-TXT" id="IconsToInclude-TXT" >
|
2702 |
+
|
2703 |
<?php _e("Check the sites you want to appear on your blog.","sociable");?>
|
2704 |
+
|
2705 |
+
</DIV>
|
2706 |
+
|
2707 |
+
<BR/>
|
2708 |
+
<DIV style="font-size:13px">
|
2709 |
+
|
2710 |
+
<?php
|
2711 |
+
$check_tags = "";
|
2712 |
+
if (isset($sociable_options["linksoptions"])){
|
2713 |
+
|
2714 |
+
if (!empty($sociable_options["linksoptions"])){
|
2715 |
+
$check_tags = "checked";
|
2716 |
+
}
|
2717 |
+
}
|
2718 |
+
|
2719 |
+
?>
|
2720 |
+
|
2721 |
+
<input type="checkbox" <?php echo $check_tags;?> id="" name="sociable_options[linksoptions]" /> Accept include the blogplay.com tag into my share icons
|
2722 |
</DIV>
|
2723 |
|
2724 |
|
2725 |
+
|
2726 |
<BR/>
|
2727 |
+
|
2728 |
|
2729 |
+
|
2730 |
<?php self::do_site_selection_list(); ?>
|
2731 |
+
|
2732 |
</DIV>
|
2733 |
+
|
2734 |
|
2735 |
+
|
2736 |
<div class="soc_clear"></div>
|
2737 |
+
|
2738 |
|
2739 |
+
|
2740 |
<TABLE class="Title-Box" cellspacing="0" cellpadding="0" id="IconSize-Title" style="margin-top:20px;">
|
2741 |
+
|
2742 |
<TR>
|
2743 |
+
|
2744 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" ><?php _e("Icons Size","sociable");?></TD><TD class="Border-Right"></TD>
|
2745 |
+
|
2746 |
</TR>
|
2747 |
+
|
2748 |
</TABLE>
|
2749 |
|
2750 |
+
|
2751 |
+
|
2752 |
<BR/>
|
2753 |
+
|
2754 |
|
2755 |
+
|
2756 |
<DIV class="Content-Box" style="margin-left:-3px" id="IconSize-Content">
|
2757 |
+
|
2758 |
<?php
|
2759 |
+
|
2760 |
$checked16 = "";
|
2761 |
+
|
2762 |
$checked32 = "";
|
2763 |
+
|
2764 |
$checked48 = "";
|
2765 |
+
|
2766 |
$checked64 = "";
|
2767 |
+
|
2768 |
if ($sociable_options["icon_size"] == 16) $checked16 = "checked='checked'";
|
2769 |
+
|
2770 |
if ($sociable_options["icon_size"] == 32) $checked32 = "checked='checked'";
|
2771 |
+
|
2772 |
if ($sociable_options["icon_size"] == 48) $checked48 = "checked='checked'";
|
2773 |
+
|
2774 |
if ($sociable_options["icon_size"] == 64) $checked64 = "checked='checked'";
|
2775 |
+
|
2776 |
//echo $checked16;
|
2777 |
+
|
2778 |
?>
|
2779 |
+
|
2780 |
<SPAN class="IconSize-Item"> <INPUT value="16" type="radio" name="sociable_options[icon_size]" <?php echo $checked16;?> />16x16 Pixels </SPAN>
|
2781 |
+
|
2782 |
|
2783 |
+
|
2784 |
<SPAN class="IconSize-Item"> <INPUT <?php echo$checked32;?> value="32" type="radio" name="sociable_options[icon_size]" />32x32 Pixels </SPAN>
|
2785 |
+
|
2786 |
|
2787 |
+
|
2788 |
<SPAN class="IconSize-Item"> <INPUT <?php echo$checked48;?> value="48" type="radio" name="sociable_options[icon_size]"/>48x48 Pixels </SPAN>
|
2789 |
|
2790 |
+
|
2791 |
+
|
2792 |
|
2793 |
+
|
2794 |
<SPAN class="IconSize-Item"> <INPUT <?php echo$checked64;?> value="64" type="radio" name="sociable_options[icon_size]" />64x64 Pixels </SPAN>
|
2795 |
+
|
2796 |
|
2797 |
+
|
2798 |
|
2799 |
+
|
2800 |
</DIV>
|
2801 |
+
|
2802 |
|
2803 |
+
|
2804 |
<TABLE class="Title-Box" cellspacing="0" cellpadding="0" id="IconSize-Title" style="margin-top:20px;">
|
2805 |
+
|
2806 |
<TR>
|
2807 |
+
|
2808 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" ><?php _e("Icons Style","sociable");?></TD><TD class="Border-Right"></TD>
|
2809 |
+
|
2810 |
</TR>
|
2811 |
+
|
2812 |
</TABLE>
|
2813 |
|
2814 |
+
|
2815 |
+
|
2816 |
<BR/>
|
2817 |
+
|
2818 |
|
2819 |
+
|
2820 |
<DIV class="Content-Box" id="IconSize-Content" style="padding:20px;">
|
2821 |
+
|
2822 |
|
2823 |
+
|
2824 |
<?php
|
2825 |
+
|
2826 |
$checked1 = "";
|
2827 |
+
|
2828 |
$checked2 = "";
|
2829 |
+
|
2830 |
$checked3 = "";
|
2831 |
+
|
2832 |
$checked4 = "";
|
2833 |
+
|
2834 |
$checked5 = "";
|
2835 |
+
|
2836 |
$checked6 = "";
|
2837 |
+
|
2838 |
if ($sociable_options["icon_option"] == "option1") $checked1 = "checked='checked'";
|
2839 |
+
|
2840 |
if ($sociable_options["icon_option"] == "option2") $checked2 = "checked='checked'";
|
2841 |
+
|
2842 |
if ($sociable_options["icon_option"] == "option3") $checked3 = "checked='checked'";
|
2843 |
+
|
2844 |
if ($sociable_options["icon_option"] == "option4") $checked4 = "checked='checked'";
|
2845 |
+
|
2846 |
if ($sociable_options["icon_option"] == "option5") $checked5 = "checked='checked'";
|
2847 |
+
|
2848 |
if ($sociable_options["icon_option"] == "option6") $checked6 = "checked='checked'";
|
2849 |
+
|
2850 |
|
2851 |
+
|
2852 |
$imagepath = isset( $sociable_options['sociable_imagedir'] ) ? $sociable_options['sociable_imagedir'] : '' ;
|
2853 |
+
|
2854 |
|
2855 |
+
|
2856 |
if ($imagepath == "") {
|
2857 |
+
|
2858 |
$imagepath = trailingslashit( SOCIABLE_HTTP_PATH ) . 'images/';
|
2859 |
+
|
2860 |
} else {
|
2861 |
+
|
2862 |
$imagepath .= trailingslashit( $imagepath );
|
2863 |
+
|
2864 |
}
|
2865 |
+
|
2866 |
//echo $imagepath;
|
2867 |
+
|
2868 |
?>
|
2869 |
+
|
2870 |
|
2871 |
+
|
2872 |
<SPAN class="IconStyle-Item"> <INPUT name="sociable_options[icon_option]" <?php echo$checked1?> value="option1" type="radio" /> <IMG src="<?php echo$imagepath?>icon_styles/<?php echo$sociable_options["icon_size"]?>/option1_<?php echo$sociable_options["icon_size"]?>.jpg" /> </SPAN>
|
2873 |
+
|
2874 |
<BR/><BR/>
|
2875 |
+
|
2876 |
<SPAN class="IconStyle-Item"> <INPUT name="sociable_options[icon_option]" <?php echo$checked2?> value="option2" type="radio" /> <IMG src="<?php echo$imagepath?>icon_styles/<?php echo$sociable_options["icon_size"]?>/option2_<?php echo$sociable_options["icon_size"]?>.jpg" /> </SPAN>
|
2877 |
|
2878 |
+
|
2879 |
+
|
2880 |
<BR/><BR/>
|
2881 |
+
|
2882 |
<SPAN class="IconStyle-Item"> <INPUT name="sociable_options[icon_option]" <?php echo$checked3?> value="option3" type="radio" /> <IMG src="<?php echo$imagepath?>icon_styles/<?php echo$sociable_options["icon_size"]?>/option3_<?php echo$sociable_options["icon_size"]?>.jpg" /> </SPAN>
|
2883 |
+
|
2884 |
<BR/><BR/>
|
2885 |
+
|
2886 |
<SPAN class="IconStyle-Item"> <INPUT name="sociable_options[icon_option]" <?php echo$checked4?> value="option4" type="radio" /> <IMG src="<?php echo$imagepath?>icon_styles/<?php echo$sociable_options["icon_size"]?>/option4_<?php echo$sociable_options["icon_size"]?>.jpg" /> </SPAN>
|
2887 |
|
2888 |
+
|
2889 |
+
|
2890 |
<BR/><BR/>
|
2891 |
+
|
2892 |
<SPAN class="IconStyle-Item"> <INPUT name="sociable_options[icon_option]" <?php echo$checked5?> value="option5" type="radio" /> <IMG src="<?php echo$imagepath?>icon_styles/<?php echo$sociable_options["icon_size"]?>/option5_<?php echo$sociable_options["icon_size"]?>.jpg" /> </SPAN>
|
2893 |
+
|
2894 |
<BR/><BR/>
|
2895 |
+
|
2896 |
<SPAN class="IconStyle-Item"> <INPUT name="sociable_options[icon_option]" <?php echo$checked6?> value="option6" type="radio" /> <IMG src="<?php echo$imagepath?>icon_styles/16/option_6_16.png" /> </SPAN>
|
2897 |
+
|
2898 |
<BR/><BR/>
|
2899 |
+
|
2900 |
</DIV>
|
2901 |
+
|
2902 |
|
2903 |
+
|
2904 |
<TABLE class="Title-Box" style="cursor:pointer;" cellspacing="0" cellpadding="0" onclick="hideOrShow('Locations');" >
|
2905 |
|
2906 |
+
|
2907 |
+
|
2908 |
<TR>
|
2909 |
+
|
2910 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" id="Locations-Title" ><span id="Locations-Tab">+ </span><?php _e("Locations","sociable");?></TD><TD class="Border-Right"></TD>
|
2911 |
+
|
2912 |
</TR>
|
2913 |
+
|
2914 |
</TABLE>
|
2915 |
+
|
2916 |
<BR/>
|
2917 |
+
|
2918 |
|
2919 |
+
|
2920 |
<DIV class="Content-Box" id="Locations-Content" style="display:none;" >
|
2921 |
+
|
2922 |
<DIV class="Locations-TXT" id="Locations-TXT" ><?php _e("Please select the locations that you wish to allow the Sociable plugin to insert itself.","sociable");?></DIV>
|
2923 |
+
|
2924 |
|
2925 |
+
|
2926 |
<BR/>
|
2927 |
|
2928 |
+
|
2929 |
+
|
2930 |
<DIV align="center" style="width:100%;">
|
2931 |
+
|
2932 |
<TABLE align="center" class="Locations-List" cellspacing="0" border=0 cellpadding="10">
|
2933 |
+
|
2934 |
<TR valign="top" >
|
2935 |
+
|
2936 |
<TD align="right" class="Title" ><?php _e("Home page","sociable");?></TD>
|
2937 |
+
|
2938 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["locations"]["is_front_page"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[locations][is_front_page]" id="HomePage" /></TD>
|
2939 |
+
|
2940 |
<TD align="left" class="Content">
|
2941 |
+
|
2942 |
<SPAN class="TXT"><?php _e("The front page of the blog (if set to a static page), or the main blog page (if set to your latest posts).","sociable");?></SPAN>
|
2943 |
+
|
2944 |
|
2945 |
+
|
2946 |
</TD>
|
2947 |
|
2948 |
+
|
2949 |
+
|
2950 |
</TR>
|
2951 |
+
|
2952 |
|
2953 |
+
|
2954 |
<TR valign="top" >
|
2955 |
+
|
2956 |
<TD align="right" class="Title" ><?php _e("Blog page","sociable");?></TD>
|
2957 |
+
|
2958 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["locations"]["is_home"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[locations][is_home]" id="BlogPage" /></TD>
|
2959 |
+
|
2960 |
<TD align="left" class="Content">
|
2961 |
+
|
2962 |
<SPAN class="TXT"><?php _e("The home page of the blog if is set to your latest posts, or the posts page if the home page is set to a static page","sociable");?></SPAN>
|
2963 |
+
|
2964 |
|
2965 |
+
|
2966 |
</TD>
|
2967 |
+
|
2968 |
</TR>
|
2969 |
|
2970 |
+
|
2971 |
+
|
2972 |
|
2973 |
+
|
2974 |
<TR valign="top" >
|
2975 |
+
|
2976 |
<TD align="right" class="Title" ><?php _e("Posts","sociable");?></TD>
|
2977 |
+
|
2978 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["locations"]["is_single"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[locations][is_single]" id="Posts" /></TD>
|
2979 |
+
|
2980 |
<TD align="left" class="Content">
|
2981 |
+
|
2982 |
<SPAN class="TXT"><?php _e("Single post pages","sociable");?></SPAN>
|
2983 |
+
|
2984 |
|
2985 |
+
|
2986 |
</TD>
|
2987 |
+
|
2988 |
</TR>
|
2989 |
+
|
2990 |
|
2991 |
+
|
2992 |
<TR valign="top" >
|
2993 |
|
2994 |
+
|
2995 |
+
|
2996 |
<TD align="right" class="Title" ><?php _e("Pages","sociable");?></TD>
|
2997 |
+
|
2998 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["locations"]["is_page"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[locations][is_page]" id="Pages" /></TD>
|
2999 |
+
|
3000 |
<TD align="left" class="Content">
|
3001 |
+
|
3002 |
<SPAN class="TXT"><?php _e("Individual Wordpress pages","sociable");?></SPAN>
|
3003 |
+
|
3004 |
|
3005 |
+
|
3006 |
</TD>
|
3007 |
+
|
3008 |
</TR>
|
3009 |
+
|
3010 |
|
3011 |
+
|
3012 |
<TR valign="top" >
|
3013 |
+
|
3014 |
<TD align="right" class="Title" ><?php _e("Category archives","sociable");?></TD>
|
3015 |
|
3016 |
+
|
3017 |
+
|
3018 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["locations"]["is_category"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[locations][is_category]" id="CategoryArchives" /></TD>
|
3019 |
+
|
3020 |
<TD align="left" class="Content">
|
3021 |
+
|
3022 |
<SPAN class="TXT"><?php _e("Category archive pages","sociable");?></SPAN>
|
3023 |
+
|
3024 |
|
3025 |
+
|
3026 |
</TD>
|
3027 |
+
|
3028 |
</TR>
|
3029 |
+
|
3030 |
|
3031 |
+
|
3032 |
<TR valign="top" >
|
3033 |
+
|
3034 |
<TD align="right" class="Title" ><?php _e("Date archives","sociable");?></TD>
|
3035 |
+
|
3036 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["locations"]["is_date"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[locations][is_date]" id="DateArchives" /></TD>
|
3037 |
|
3038 |
+
|
3039 |
+
|
3040 |
<TD align="left" class="Content">
|
3041 |
+
|
3042 |
<SPAN class="TXT"><?php _e("Date archive pages","sociable");?> </SPAN>
|
3043 |
+
|
3044 |
|
3045 |
+
|
3046 |
</TD>
|
3047 |
+
|
3048 |
</TR>
|
3049 |
+
|
3050 |
|
3051 |
+
|
3052 |
<TR valign="top" >
|
3053 |
+
|
3054 |
<TD align="right" class="Title" ><?php _e("Tag archives","sociable");?></TD>
|
3055 |
+
|
3056 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["locations"]["is_tag"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[locations][is_tag]" id="TagArchives" /></TD>
|
3057 |
|
3058 |
+
|
3059 |
+
|
3060 |
<TD align="left" class="Content">
|
3061 |
+
|
3062 |
<SPAN class="TXT"><?php _e("Tag archive pages","sociable");?> </SPAN>
|
3063 |
+
|
3064 |
|
3065 |
+
|
3066 |
</TD>
|
3067 |
+
|
3068 |
</TR>
|
3069 |
+
|
3070 |
|
3071 |
+
|
3072 |
<TR valign="top" >
|
3073 |
+
|
3074 |
<TD align="right" class="Title" ><?php _e("Author archives","sociable");?></TD>
|
3075 |
+
|
3076 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["locations"]["is_author"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[locations][is_author]" id="AuthorArchives" /></TD>
|
3077 |
|
3078 |
+
|
3079 |
+
|
3080 |
<TD align="left" class="Content">
|
3081 |
+
|
3082 |
<SPAN class="TXT"><?php _e("Author archive pages","sociable");?></SPAN>
|
3083 |
+
|
3084 |
|
3085 |
+
|
3086 |
</TD>
|
3087 |
+
|
3088 |
</TR>
|
3089 |
+
|
3090 |
|
3091 |
+
|
3092 |
<TR valign="top" >
|
3093 |
+
|
3094 |
<TD align="right" class="Title" ><?php _e("Search results","sociable");?></TD>
|
3095 |
+
|
3096 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["locations"]["is_search"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[locations][is_search]" id="SearchResults" /></TD>
|
3097 |
+
|
3098 |
<TD align="left" class="Content">
|
3099 |
|
3100 |
+
|
3101 |
+
|
3102 |
<SPAN class="TXT"><?php _e("Search results pages","sociable");?></SPAN>
|
3103 |
+
|
3104 |
|
3105 |
+
|
3106 |
</TD>
|
3107 |
+
|
3108 |
</TR>
|
3109 |
+
|
3110 |
|
3111 |
+
|
3112 |
<TR valign="top" >
|
3113 |
+
|
3114 |
<TD align="right" class="Title" ><?php _e("RSS feeds","sociable");?></TD>
|
3115 |
+
|
3116 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["locations"]["is_rss"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[locations][is_rss]" id="RssFeeds" /></TD>
|
3117 |
+
|
3118 |
<TD align="left" class="Content">
|
3119 |
+
|
3120 |
<SPAN class="TXT"><?php _e("RSS feeds","sociable");?></SPAN>
|
3121 |
|
3122 |
+
|
3123 |
+
|
3124 |
|
3125 |
+
|
3126 |
</TD>
|
3127 |
+
|
3128 |
</TR>
|
3129 |
+
|
3130 |
|
3131 |
+
|
3132 |
|
3133 |
+
|
3134 |
</TABLE>
|
3135 |
+
|
3136 |
<BR/><BR/>
|
3137 |
+
|
3138 |
</DIV>
|
3139 |
+
|
3140 |
</DIV>
|
3141 |
+
|
3142 |
|
3143 |
+
|
3144 |
<TABLE class="Title-Box" style="cursor:pointer;" cellspacing="0" cellpadding="0" onclick="hideOrShow('GeneralOptions');">
|
3145 |
+
|
3146 |
<TR>
|
3147 |
+
|
3148 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" id="GeneralOptions-Title" ><span id="GeneralOptions-Tab"> + </span> <?php _e("General Options","sociable");?></TD><TD class="Border-Right"></TD>
|
3149 |
|
3150 |
+
|
3151 |
+
|
3152 |
</TR>
|
3153 |
+
|
3154 |
</TABLE>
|
3155 |
+
|
3156 |
<BR/>
|
3157 |
+
|
3158 |
|
3159 |
+
|
3160 |
<DIV class="Content-Box" id="GeneralOptions-Content" style="display:none;" >
|
3161 |
+
|
3162 |
|
3163 |
+
|
3164 |
<BR/>
|
3165 |
+
|
3166 |
<DIV align="center" style="width:100%;">
|
3167 |
+
|
3168 |
<TABLE align="center" class="GeneralOptions-List" cellspacing="0" border=0 cellpadding ="10" >
|
3169 |
+
|
3170 |
<TR valign="top" >
|
3171 |
+
|
3172 |
<TD align="right" class="Title" ><?php _e("Automatic mode","sociable")?></TD>
|
3173 |
|
3174 |
+
|
3175 |
+
|
3176 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["automatic_mode"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[automatic_mode]" id="AutoMode" /></TD>
|
3177 |
+
|
3178 |
<TD align="left" class="Content">
|
3179 |
+
|
3180 |
<SPAN class="TXT"><?php _e("Do you want to automatically use Sociable on the locations specified?","sociable");?> </SPAN>
|
3181 |
+
|
3182 |
<BR/>
|
3183 |
+
|
3184 |
<SPAN class="sTXT">
|
3185 |
+
|
3186 |
<?php _e("If this is unchecked, you will have to use the shortcode[sociable/] or template","sociable");?> tag ?php if( function_exists( do_sociable() ) ){ do_sociable(); }
|
3187 |
+
|
3188 |
</SPAN>
|
3189 |
+
|
3190 |
|
3191 |
+
|
3192 |
</TD>
|
3193 |
|
3194 |
+
|
3195 |
+
|
3196 |
</TR>
|
3197 |
+
|
3198 |
|
3199 |
+
|
3200 |
|
3201 |
+
|
3202 |
</TR>
|
3203 |
+
|
3204 |
<TR valign="top" >
|
3205 |
+
|
3206 |
<TD align="right" class="Title" ><?php _e("Use styleSheet","sociable");?></TD>
|
3207 |
+
|
3208 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["use_stylesheet"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[use_stylesheet]" id="UseStyleSheets" /></TD>
|
3209 |
+
|
3210 |
<TD align="left" class="Content">
|
3211 |
+
|
3212 |
<SPAN class="TXT"><?php _e("Do you want to use the default stylesheet for sociable?","sociable");?></SPAN>
|
3213 |
+
|
3214 |
</TD>
|
3215 |
|
3216 |
+
|
3217 |
+
|
3218 |
</TR>
|
3219 |
+
|
3220 |
<TR valign="top" >
|
3221 |
+
|
3222 |
<TD align="right" class="Title" ><?php _e("Use your own icons","sociable");?></TD>
|
3223 |
+
|
3224 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["custom_icons"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[custom_icons]" id="UseStyleSheets" /></TD>
|
3225 |
+
|
3226 |
<TD align="left" class="Content">
|
3227 |
+
|
3228 |
<SPAN class="TXT"><?php _e("Do you want to use your own icons for sociable?","sociable");?></SPAN>
|
3229 |
+
|
3230 |
</TD>
|
3231 |
+
|
3232 |
</TR>
|
3233 |
|
3234 |
+
|
3235 |
+
|
3236 |
<TR valign="top" >
|
3237 |
+
|
3238 |
<TD align="right" class="Title" ><?php _e("Use images","sociable");?></TD>
|
3239 |
+
|
3240 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["use_images"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[use_images]" id="UseImages" /></TD>
|
3241 |
+
|
3242 |
<TD align="left" class="Content">
|
3243 |
+
|
3244 |
<SPAN class="TXT"><?php _e("Do you want to use the Sociable images? If not, the plugin will insert plain text links.","sociable");?></SPAN>
|
3245 |
+
|
3246 |
</TD>
|
3247 |
+
|
3248 |
</TR>
|
3249 |
+
|
3250 |
|
3251 |
+
|
3252 |
|
3253 |
+
|
3254 |
<TR valign="top" >
|
3255 |
|
3256 |
+
|
3257 |
+
|
3258 |
<TD align="right" class="Title" ><?php _e("Use alpha mask","sociable");?></TD>
|
3259 |
+
|
3260 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["use_alphamask"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[use_alphamask]" id="AlphaMask" /></TD>
|
3261 |
+
|
3262 |
<TD align="left" class="Content">
|
3263 |
+
|
3264 |
<SPAN class="TXT"><?php _e("Do you want to use alpha masks on the images (available only on the Original Sociable)?","sociable");?></SPAN>
|
3265 |
+
|
3266 |
</TD>
|
3267 |
+
|
3268 |
</TR>
|
3269 |
+
|
3270 |
<TR valign="top" >
|
3271 |
+
|
3272 |
<TD align="right" class="Title" ><?php _e("Bottom and Top","sociable");?></TD>
|
3273 |
|
3274 |
+
|
3275 |
+
|
3276 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["topandbottom"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[topandbottom]" id="TopAndBottom" /></TD>
|
3277 |
+
|
3278 |
<TD align="left" class="Content">
|
3279 |
+
|
3280 |
<SPAN class="TXT"><?php _e("Do you want to use Sociable plugin to show up at the top and bottom?","sociable");?></SPAN>
|
3281 |
+
|
3282 |
</TD>
|
3283 |
+
|
3284 |
</TR>
|
3285 |
+
|
3286 |
<TR valign="top" >
|
3287 |
+
|
3288 |
<TD align="right" class="Title" ><?php _e("Open in new window","sociable");?></TD>
|
3289 |
+
|
3290 |
<TD align="left" style="width:5px;" ><INPUT <?php if(!empty($sociable_options["new_window"])) echo "checked='checked'"?> type="checkbox" name="sociable_options[new_window]" id="OpenNewWindow" /></TD>
|
3291 |
|
3292 |
+
|
3293 |
+
|
3294 |
<TD align="left" class="Content">
|
3295 |
+
|
3296 |
<SPAN class="TXT"><?php _e("do you want to open the links in a new window?","sociable");?></SPAN>
|
3297 |
+
|
3298 |
</TD>
|
3299 |
+
|
3300 |
</TR>
|
3301 |
+
|
3302 |
|
3303 |
+
|
3304 |
|
3305 |
+
|
3306 |
|
3307 |
+
|
3308 |
</TABLE>
|
3309 |
+
|
3310 |
|
3311 |
+
|
3312 |
<BR/><BR/>
|
3313 |
+
|
3314 |
</DIV>
|
3315 |
+
|
3316 |
</DIV>
|
3317 |
+
|
3318 |
<TABLE class="Title-Box" style="cursor:pointer;" cellspacing="0" cellpadding="0" onclick="hideOrShow('Active');" >
|
3319 |
|
3320 |
+
|
3321 |
+
|
3322 |
<TR>
|
3323 |
+
|
3324 |
<TD class="Border-Left" ></TD><TD class="BG-Middle" id="Active-Title" ><span id="Active-Tab">+ </span><?php _e("Active Sociable Classic","sociable");?></TD><TD class="Border-Right"></TD>
|
3325 |
+
|
3326 |
</TR>
|
3327 |
+
|
3328 |
</TABLE>
|
3329 |
+
|
3330 |
|
3331 |
+
|
3332 |
<div style="display: block;" id="Active-Content" class="Content-Box">
|
3333 |
+
|
3334 |
|
3335 |
+
|
3336 |
<br>
|
3337 |
+
|
3338 |
<div align="center" style="width:100%;">
|
3339 |
+
|
3340 |
<table align="center" cellspacing="0" cellpadding="10" border="0" class="GeneralOptions-List">
|
3341 |
|
3342 |
+
|
3343 |
+
|
3344 |
|
3345 |
+
|
3346 |
<tbody><tr valign="top">
|
3347 |
+
|
3348 |
<td align="right" class="Title">Active Sociable Classic</td>
|
3349 |
+
|
3350 |
<td align="left" style="width:5px;">
|
3351 |
+
|
3352 |
<input <?php if(isset($sociable_options["active"])) echo "checked='checked'"?> type="checkbox" id="active" name="sociable_options[active]" /></td>
|
3353 |
+
|
3354 |
<td align="left" class="Content">
|
3355 |
+
|
3356 |
<span class="TXT">Check if you want Sociable Classic enable </span>
|
3357 |
+
|
3358 |
<br>
|
3359 |
|
3360 |
+
|
3361 |
+
|
3362 |
|
3363 |
+
|
3364 |
</td>
|
3365 |
+
|
3366 |
</tr>
|
3367 |
+
|
3368 |
</tbody></table>
|
3369 |
+
|
3370 |
<br><br>
|
3371 |
+
|
3372 |
</div>
|
3373 |
+
|
3374 |
</div>
|
3375 |
+
|
3376 |
<?php //<HR style="height:10px;background:#18305d;"/>?>
|
3377 |
+
|
3378 |
<?php settings_fields( 'sociable_options_group' ); ?>
|
3379 |
+
|
3380 |
</FORM>
|
3381 |
+
|
3382 |
<DIV class="Content-Box" >
|
3383 |
|
3384 |
+
|
3385 |
+
|
3386 |
<DIV id="ActionsBar">
|
3387 |
+
|
3388 |
<DIV class="SaveChanges" onClick="document.getElementById('form1').submit();" style="cursor:pointer;line-height:15px;"><br/>
|
3389 |
+
|
3390 |
<span style="margin:30px;"><?php _e("Save Changes","sociable");?></span>
|
3391 |
|
3392 |
+
|
3393 |
+
|
3394 |
</DIV>
|
3395 |
+
|
3396 |
<DIV class="ResetSociable" id="sociable_reset" name="sociable_reset" onClick="document.getElementById('sociable_reset_form').submit();" style="cursor:pointer;line-height:15px;font-size:12px;"><br/>
|
3397 |
+
|
3398 |
<span style="margin:40px;margin-left:35px;"><?php _e("Reset Sociable","sociable");?></span>
|
3399 |
+
|
3400 |
</DIV>
|
3401 |
+
|
3402 |
<DIV class="UninstallSociable" onClick="document.getElementById('sociable_remove_form').submit();" style="cursor:pointer;line-height:15px;font-size:12px;"><br/>
|
3403 |
|
3404 |
+
|
3405 |
+
|
3406 |
<span style="margin:25px;margin-left:20px;"><?php _e("Completly Uninstall Sociable","sociable");?></span>
|
3407 |
+
|
3408 |
</DIV>
|
3409 |
+
|
3410 |
</DIV>
|
3411 |
+
|
3412 |
</DIV>
|
3413 |
+
|
3414 |
<br>
|
3415 |
+
|
3416 |
<br>
|
3417 |
|
3418 |
+
|
3419 |
+
|
3420 |
<?php //do_settings_sections( 'sociable_options' ); ?>
|
3421 |
+
|
3422 |
<form id="sociable_reset_form" action="" method="POST">
|
3423 |
|
3424 |
+
|
3425 |
+
|
3426 |
<?php wp_nonce_field('sociable-reset'); ?>
|
3427 |
+
|
3428 |
<input type="hidden" id="sociable_reset" name="sociable_reset" value="1">
|
3429 |
+
|
3430 |
<?php //submit_button( __( 'Reset Sociable' ) , 'primary', 'sociable_reset', false ); ?>
|
3431 |
+
|
3432 |
</form>
|
3433 |
+
|
3434 |
|
3435 |
+
|
3436 |
|
3437 |
+
|
3438 |
</div>
|
3439 |
+
|
3440 |
<?php }
|
3441 |
+
|
3442 |
|
3443 |
+
|
3444 |
function add_meta_box( $page ){
|
3445 |
+
|
3446 |
add_meta_box( 'sociable_off' , __( 'Disable sociable' ), array( 'sociable_Admin_Options' , 'create_meta_box' ) , $page, 'side', 'default' );
|
3447 |
+
|
3448 |
}
|
3449 |
+
|
3450 |
|
3451 |
+
|
3452 |
function create_meta_box(){
|
3453 |
+
|
3454 |
global $post;
|
3455 |
+
|
3456 |
$sociableoff = false;
|
3457 |
+
|
3458 |
$checked = '';
|
3459 |
+
|
3460 |
if ( get_post_meta( $post->ID,'_sociableoff',true ) ) {
|
3461 |
+
|
3462 |
$checked = 'checked="checked"';
|
3463 |
+
|
3464 |
}
|
3465 |
+
|
3466 |
wp_nonce_field( 'update_sociable_off' , 'sociable_nonce' );
|
3467 |
+
|
3468 |
echo '<input type="checkbox" id="sociableoff" name="sociableoff" ' . $checked . ' /> <p class="description">' . __('Check This To Disable Sociable 2 On This Post Only.') . '</p>';
|
3469 |
+
|
3470 |
|
3471 |
+
|
3472 |
}
|
3473 |
+
|
3474 |
|
3475 |
+
|
3476 |
function save_post( $post_id ){
|
3477 |
+
|
3478 |
|
3479 |
+
|
3480 |
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
|
3481 |
+
|
3482 |
return $post_id;
|
3483 |
+
|
3484 |
// verify this came from the our screen and with proper authorization,
|
3485 |
+
|
3486 |
// because save_post can be triggered at other times
|
3487 |
+
|
3488 |
|
3489 |
+
|
3490 |
$nonce = ( isset( $_POST['sociable_nonce'] ) ) ? $_POST['sociable_nonce'] : false ;
|
3491 |
+
|
3492 |
if ( ! $nonce || ! wp_verify_nonce( $nonce, 'update_sociable_off' ) )
|
3493 |
+
|
3494 |
return $post_id;
|
3495 |
+
|
3496 |
// Check permissions
|
3497 |
+
|
3498 |
if ( 'page' == $_POST['post_type'] ){
|
3499 |
+
|
3500 |
if ( !current_user_can( 'edit_page', $post_id ) )
|
3501 |
+
|
3502 |
return;
|
3503 |
+
|
3504 |
} else {
|
3505 |
+
|
3506 |
if ( !current_user_can( 'edit_post', $post_id ) )
|
3507 |
+
|
3508 |
return;
|
3509 |
+
|
3510 |
}
|
3511 |
+
|
3512 |
|
3513 |
+
|
3514 |
//Lets Do This
|
3515 |
+
|
3516 |
if( isset( $_POST['sociableoff'] ) ){
|
3517 |
+
|
3518 |
update_post_meta( $post_id, '_sociableoff' , $_POST['sociableoff'] );
|
3519 |
+
|
3520 |
} else {
|
3521 |
+
|
3522 |
delete_post_meta( $post_id, '_sociableoff' );
|
3523 |
+
|
3524 |
}
|
3525 |
+
|
3526 |
|
3527 |
+
|
3528 |
return $post_id;
|
3529 |
+
|
3530 |
}
|
3531 |
+
|
3532 |
|
3533 |
+
|
3534 |
/**
|
3535 |
+
|
3536 |
* This Function Runs Before The Options Are Printed Out.
|
3537 |
+
|
3538 |
*/
|
3539 |
+
|
3540 |
function general_options_callback(){
|
3541 |
+
|
3542 |
|
3543 |
+
|
3544 |
return true;
|
3545 |
+
|
3546 |
}
|
3547 |
+
|
3548 |
|
3549 |
+
|
3550 |
/**
|
3551 |
+
|
3552 |
* This Function Runs Before The Location Options Are Echoed Out.
|
3553 |
+
|
3554 |
*/
|
3555 |
+
|
3556 |
function location_options_callback(){
|
3557 |
+
|
3558 |
echo '<p>' . __( 'Please Select The Locations That You Wish To Allow The Sociable 2 Plugin To Insert The Links.' ) . '</p>';
|
3559 |
+
|
3560 |
}
|
3561 |
+
|
3562 |
|
3563 |
+
|
3564 |
/**
|
3565 |
+
|
3566 |
* Adds A Function For The add_settings_field(); function
|
3567 |
+
|
3568 |
*
|
3569 |
+
|
3570 |
* should be passed:
|
3571 |
+
|
3572 |
* $data = array(
|
3573 |
+
|
3574 |
* 'id' => 'field_id_and_name',
|
3575 |
+
|
3576 |
* 'description' => 'field Description Should Go Here, This is Not The Title, Rather The Description'
|
3577 |
+
|
3578 |
* );
|
3579 |
+
|
3580 |
*/
|
3581 |
+
|
3582 |
function Checkbox( $data ){
|
3583 |
+
|
3584 |
global $sociable_options;
|
3585 |
+
|
3586 |
|
3587 |
+
|
3588 |
//Save The Locations As a seperate array option
|
3589 |
|
3590 |
+
|
3591 |
+
|
3592 |
if( isset( $data['locations'] ) ){
|
3593 |
+
|
3594 |
$name = 'sociable_options[locations][' . $data['id'] . ']';
|
3595 |
+
|
3596 |
$checked = ( isset( $sociable_options['locations'][$data['id']] ) ) ? 'checked="checked"' : '' ;
|
3597 |
+
|
3598 |
} else {
|
3599 |
+
|
3600 |
$name = 'sociable_options[' . $data['id'] . ']';
|
3601 |
+
|
3602 |
$checked = ( isset( $sociable_options[$data['id']] ) ) ? 'checked="checked"' : '' ;
|
3603 |
+
|
3604 |
}
|
3605 |
+
|
3606 |
|
3607 |
+
|
3608 |
|
3609 |
+
|
3610 |
echo '<input ' . $checked . ' id="' . $data['id'] . '" name="' . $name . '" type="checkbox" /> <span class="description">' . $data['description'] . '</span>';
|
3611 |
+
|
3612 |
}
|
3613 |
+
|
3614 |
|
3615 |
+
|
3616 |
function TextInput( $data ){
|
3617 |
+
|
3618 |
global $sociable_options;
|
3619 |
+
|
3620 |
|
3621 |
+
|
3622 |
$value = ( isset( $sociable_options[$data['id']] ) ) ? $sociable_options[$data['id']] : '';
|
3623 |
+
|
3624 |
|
3625 |
+
|
3626 |
echo '<input id="' . $data['id'] . '" name="sociable_options[' . $data['id'] . ']" size="40" type="text" value="' . esc_attr( $value ) . '" /> <br /><span class="description">' . $data['description'] . '</span>';
|
3627 |
+
|
3628 |
|
3629 |
+
|
3630 |
}
|
3631 |
+
|
3632 |
|
3633 |
+
|
3634 |
function TextArea( $data ){
|
3635 |
+
|
3636 |
global $sociable_options;
|
3637 |
+
|
3638 |
|
3639 |
+
|
3640 |
$value = ( isset( $sociable_options[$data['id']] ) ) ? $sociable_options[$data['id']] : '';
|
3641 |
+
|
3642 |
|
3643 |
+
|
3644 |
echo '<textarea id="' . $data['id'] . '" name="sociable_options[' . $data['id'] . ']" >' . $value . '</textarea> <br /><span class="description">' . $data['description'] . '</span>';
|
3645 |
+
|
3646 |
|
3647 |
+
|
3648 |
}
|
3649 |
+
|
3650 |
|
3651 |
+
|
3652 |
function radio( $data ){
|
3653 |
+
|
3654 |
global $sociable_options;
|
3655 |
+
|
3656 |
|
3657 |
+
|
3658 |
$cur_val = ( isset( $sociable_options[$data['id']] ) ) ? $sociable_options[$data['id']] : 0 ;
|
3659 |
+
|
3660 |
|
3661 |
+
|
3662 |
echo '<span class="description">' . $data['description'] . '</span><br />';
|
3663 |
+
|
3664 |
foreach( $data['options'] as $value => $option ){
|
3665 |
+
|
3666 |
$selected = ( $value == $cur_val ) ? 'checked="checked"' : '' ;
|
3667 |
+
|
3668 |
echo '<input type="radio" name="sociable_options[' . $data['id'] . ']" value="' . $value . '" ' . $selected . ' /> <span>' . $option . '</span><br />';
|
3669 |
+
|
3670 |
}
|
3671 |
+
|
3672 |
}
|
3673 |
+
|
3674 |
|
3675 |
+
|
3676 |
|
3677 |
+
|
3678 |
}
|
3679 |
+
|
3680 |
function add_ie7() {
|
3681 |
+
|
3682 |
echo'<!--[if lt IE 7]>
|
3683 |
+
|
3684 |
<script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE7.js"
|
3685 |
+
|
3686 |
type="text/javascript"></script>
|
3687 |
+
|
3688 |
<![endif]-->
|
3689 |
|
3690 |
+
|
3691 |
+
|
3692 |
<!--[if lt IE 8]>
|
3693 |
+
|
3694 |
<script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js"
|
3695 |
+
|
3696 |
type="text/javascript"></script>
|
3697 |
+
|
3698 |
<![endif]-->
|
3699 |
+
|
3700 |
<!--[if lt IE 9]>
|
3701 |
+
|
3702 |
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
|
3703 |
+
|
3704 |
<![endif]-->';
|
3705 |
+
|
3706 |
}
|
3707 |
+
|
3708 |
//add_action('admin_head', 'add_ie7' );
|
3709 |
+
|
3710 |
?>
|
includes/skyscraper_output.php
CHANGED
@@ -1,903 +1,1827 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
/*
|
4 |
|
|
|
|
|
5 |
* The Output And Shortcode Functions For sociable
|
6 |
|
|
|
|
|
7 |
*/
|
|
|
8 |
/*
|
9 |
|
|
|
|
|
10 |
* Returns The Skyscraper Output For The Global $post Object Do Not
|
11 |
|
|
|
|
|
12 |
*/
|
|
|
13 |
function diff_date($date1, $date2){
|
14 |
|
|
|
|
|
15 |
$date1 = mktime(substr($date1,8,2), substr($date1,10,2), substr($date1,12,2), substr($date1,4,2), substr($date1,6,2), substr($date1,0,4));
|
|
|
16 |
$date2 = mktime(substr($date2,8,2), substr($date2,10,2), substr($date2,12,2), substr($date2,4,2), substr($date2,6,2), substr($date2,0,4));
|
17 |
|
|
|
|
|
18 |
$diff_time = ceil((($date2 - $date1)/60));
|
|
|
19 |
return $diff_time;
|
20 |
|
|
|
|
|
21 |
}
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
function skyscraper_html( $where = "" ){
|
|
|
25 |
global $skyscraper_options, $wp_query;
|
|
|
26 |
if (!is_admin() || 1==1){
|
|
|
27 |
// echo "<script type='text/javascript'>";
|
|
|
28 |
// echo "var skyscraper_dir = '".SOCIABLE_HTTP_PATH."' ;";
|
|
|
29 |
// echo "</script>";
|
|
|
30 |
echo " var skyscraper_dir = document.createElement('input');
|
|
|
31 |
skyscraper_dir.id = 'skyscraper_dir';
|
|
|
32 |
skyscraper_dir.type = 'hidden';
|
|
|
33 |
skyscraper_dir.value = '".SOCIABLE_HTTP_PATH."';
|
|
|
34 |
document.body.appendChild(skyscraper_dir); ";
|
|
|
35 |
|
|
|
36 |
$widget_width = str_replace("px", "", $skyscraper_options["widget_width"]);
|
|
|
37 |
|
|
|
38 |
$widget_position = "null";
|
|
|
39 |
if (isset($skyscraper_options["widget_position"])){
|
|
|
40 |
$widget_position = 1;
|
|
|
41 |
}
|
|
|
42 |
|
|
|
43 |
$labels_color = $skyscraper_options["labels_color"];
|
|
|
44 |
$text_size = str_replace("px", "", $skyscraper_options["text_size"]);
|
|
|
45 |
$background_color = $skyscraper_options["background_color"];
|
|
|
46 |
|
|
|
47 |
$addWhere = "";
|
|
|
48 |
|
|
|
49 |
if ($where == ""){
|
|
|
50 |
$addWhere = "var div = document.createElement('div');
|
|
|
51 |
div.id = 'skyscraper';
|
|
|
52 |
document.body.appendChild(div);";
|
|
|
53 |
}
|
|
|
54 |
$url_site= $_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];
|
|
|
55 |
$script = "
|
56 |
|
|
|
|
|
57 |
if (!document.getElementById('fb-root')){
|
58 |
|
|
|
|
|
59 |
var div = document.createElement('div');
|
60 |
|
|
|
|
|
61 |
div.id = 'fb-root';
|
62 |
|
|
|
|
|
63 |
document.body.appendChild(div);
|
64 |
|
|
|
|
|
65 |
}
|
|
|
66 |
(function(d, s, id) {
|
67 |
|
|
|
|
|
68 |
var js, fjs = d.getElementsByTagName(s)[0];
|
69 |
|
|
|
|
|
70 |
if (d.getElementById(id)) return;
|
71 |
|
|
|
|
|
72 |
js = d.createElement(s); js.id = id;
|
73 |
|
|
|
|
|
74 |
js.src = \"http://connect.facebook.net/en_US/all.js#xfbml=1\";
|
75 |
|
|
|
|
|
76 |
fjs.parentNode.insertBefore(js, fjs);
|
|
|
77 |
}(document, 'script', 'facebook-jssdk'));
|
78 |
|
|
|
|
|
79 |
|
80 |
|
|
|
|
|
81 |
".$addWhere."
|
82 |
|
|
|
|
|
83 |
|
84 |
|
|
|
|
|
85 |
jQuery(document).ready(function(){
|
|
|
86 |
oPlugin.toolbarStart('skyscraper', ".$widget_position.",230,".$widget_width.",'".$background_color."','".$labels_color."',false,'#6A6A6A',".$text_size.",'#587cc8');
|
87 |
|
|
|
|
|
88 |
|
89 |
|
|
|
|
|
90 |
".get_share_node()."
|
91 |
|
|
|
|
|
92 |
".get_counters_node()."
|
93 |
|
|
|
|
|
94 |
".get_social_banner_node()."
|
95 |
|
|
|
|
|
96 |
".get_latest_node()."
|
97 |
|
|
|
|
|
98 |
".get_mentions_node()."
|
99 |
|
|
|
|
|
100 |
".get_follow_us_node()."
|
101 |
|
|
|
|
|
102 |
".get_rss_node()."
|
103 |
|
|
|
|
|
104 |
oPlugin.CreateGoToTop('New_Id_12','Top','<img src=\"".SOCIABLE_HTTP_PATH."images/toolbar/gototop.png\" style=\"width:30px;\" />');
|
|
|
105 |
oPlugin.CreateGoToHome('New_Id_13','Go Home','<img src=\"".SOCIABLE_HTTP_PATH."images/toolbar/gotohome.png\" style=\"width:30px;\" />');
|
106 |
|
|
|
|
|
107 |
});
|
108 |
|
|
|
|
|
109 |
jQuery('.title').css('font-size', '".$text_size."px');
|
110 |
|
|
|
|
|
111 |
|
112 |
|
|
|
|
|
113 |
";
|
114 |
|
|
|
|
|
115 |
echo $script;
|
116 |
|
|
|
|
|
117 |
}
|
118 |
|
|
|
|
|
119 |
}
|
|
|
120 |
function get_social_banner_node(){
|
121 |
|
|
|
|
|
122 |
|
123 |
|
|
|
|
|
124 |
|
125 |
|
|
|
|
|
126 |
global $skyscraper_options;
|
|
|
127 |
global $title_shared;
|
|
|
128 |
global $url_shares;
|
129 |
|
|
|
|
|
130 |
|
131 |
|
|
|
|
|
132 |
$social_banner_node = "";
|
133 |
|
|
|
|
|
134 |
|
135 |
|
|
|
|
|
136 |
|
137 |
|
|
|
|
|
138 |
if(!empty($skyscraper_options["sociable_banner"])){
|
139 |
|
|
|
|
|
140 |
|
141 |
|
|
|
|
|
142 |
$follow_us = sc_follow_links(1);
|
143 |
|
|
|
|
|
144 |
|
145 |
|
|
|
|
|
146 |
$follow_buttons = $follow_us["follow_buttons"];
|
147 |
|
|
|
|
|
148 |
|
149 |
|
|
|
|
|
150 |
$follow_us_count = $follow_us["count"];
|
151 |
|
|
|
|
|
|
|
152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
|
154 |
-
$width_banner = 200;
|
155 |
|
156 |
-
|
157 |
|
158 |
$social_banner_node = " var url = '". addslashes(trim($url_shares))."';
|
159 |
|
|
|
|
|
160 |
var title = '".addslashes(trim($title_shared)) ."';
|
161 |
|
|
|
|
|
162 |
var counter = '<ul class=\"boxBanner_ul\">';
|
163 |
|
|
|
|
|
164 |
counter += ' <li>';
|
165 |
|
|
|
|
|
166 |
counter += ' <div class=\"fb-like\" data-send=\"false\" data-layout=\"box_count\" data-width=\"50\" data-href=\"'+url+'\" data-show-faces=\"false\"></div>';
|
167 |
|
|
|
|
|
168 |
|
169 |
|
|
|
|
|
170 |
counter += ' </li>';
|
171 |
|
|
|
|
|
172 |
counter += ' <li>';
|
173 |
|
|
|
|
|
174 |
counter += ' <iframe width=\"100%\" scrolling=\"no\" frameborder=\"0\" title=\"+1\" vspace=\"0\" tabindex=\"-1\" style=\"position: static; left: 0pt; top: 0pt; width: 60px; margin: 0px; border-style: none; visibility: visible; height: 60px;\" src=\"https://plusone.google.com/_/+1/fastbutton?url='+url+'&size=tall&count=true&hl=en-US&jsh=m%3B%2F_%2Fapps-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3Dt1NEBxIt2Qs.es_419.%2Fsv%3D1%2Fam%3D!Xq7AzNfn9_-I0e5PyA%2Fd%3D1%2F#id=I1_1328906079806&parent='+url+'&rpctoken=615138222&_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart\" name=\"I1_1328906079806\" marginwidth=\"0\" marginheight=\"0\" id=\"I1_1328906079806\" hspace=\"0\" allowtransparency=\"true\"></iframe>';
|
175 |
|
|
|
|
|
176 |
counter += ' </li>';
|
177 |
|
|
|
|
|
178 |
counter += ' <li>';
|
179 |
|
180 |
-
|
|
|
|
|
|
|
|
|
181 |
|
182 |
counter += ' </li>';
|
183 |
|
|
|
|
|
184 |
counter += '</ul>';";
|
185 |
|
|
|
|
|
186 |
|
187 |
|
|
|
|
|
188 |
if ($follow_us_count > 0){
|
189 |
|
|
|
|
|
190 |
|
191 |
|
|
|
|
|
192 |
$social_banner_node .= "
|
193 |
|
|
|
|
|
194 |
counter += '<ul class=\"boxBanner_ul_margin\">';
|
195 |
|
|
|
|
|
196 |
counter += '<li>';
|
197 |
|
|
|
|
|
198 |
counter += '</li>';
|
199 |
|
|
|
|
|
200 |
counter += '</ul>';";
|
201 |
|
|
|
|
|
202 |
|
203 |
|
|
|
|
|
204 |
$social_banner_node .= " counter += '".$follow_buttons."'; ";
|
205 |
|
|
|
|
|
206 |
|
207 |
|
|
|
|
|
208 |
if ($follow_us_count > 1){
|
209 |
|
|
|
|
|
210 |
|
211 |
|
|
|
|
|
212 |
$width_banner = $width_banner + (70 * $follow_us_count);
|
213 |
|
|
|
|
|
214 |
}
|
215 |
|
|
|
|
|
216 |
else{
|
217 |
|
|
|
|
|
218 |
$width_banner = $width_banner + (90 * $follow_us_count);
|
219 |
|
|
|
|
|
220 |
}
|
221 |
|
|
|
|
|
222 |
|
223 |
|
|
|
|
|
224 |
|
225 |
|
|
|
|
|
226 |
}
|
227 |
|
|
|
|
|
228 |
|
229 |
|
|
|
|
|
230 |
$label_text = trim($skyscraper_options["sociable_banner_text"]);
|
231 |
|
|
|
|
|
232 |
|
233 |
|
|
|
|
|
234 |
if (strlen($label_text) > 35){
|
235 |
|
|
|
|
|
236 |
// $label_text = substr($label_text,0,35);
|
237 |
|
|
|
|
|
238 |
}
|
239 |
|
|
|
|
|
240 |
$label_text = addslashes($label_text);
|
241 |
|
|
|
|
|
242 |
|
243 |
|
|
|
|
|
244 |
$social_banner_node .= "oPlugin.CreateNode('New_Id_14','".$label_text."', '', counter,'banner',80,".$width_banner.");";
|
245 |
|
|
|
|
|
246 |
$timer = ($skyscraper_options["sociable_banner_timer"] * 1000);
|
247 |
|
|
|
|
|
248 |
|
249 |
|
|
|
|
|
250 |
$colorBack = $skyscraper_options["sociable_banner_colorBack"];
|
251 |
|
|
|
|
|
252 |
$colorFont = $skyscraper_options["sociable_banner_colorFont"];
|
253 |
|
|
|
|
|
254 |
$colorLabel = $skyscraper_options["sociable_banner_colorLabel"];
|
255 |
|
|
|
|
|
256 |
$fontSize = $skyscraper_options["sociable_banner_fontSize"];
|
257 |
|
258 |
-
|
259 |
|
260 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
|
262 |
|
263 |
|
|
|
|
|
264 |
}
|
265 |
|
|
|
|
|
266 |
|
267 |
|
|
|
|
|
268 |
return $social_banner_node;
|
269 |
|
|
|
|
|
270 |
}
|
|
|
271 |
function get_rss_node(){
|
272 |
|
|
|
|
|
273 |
$rss_node = "";
|
|
|
274 |
$latest_posts = "";
|
|
|
275 |
global $skyscraper_options;
|
|
|
276 |
|
|
|
277 |
|
|
|
278 |
if (!empty($skyscraper_options["accept_read_rss"])){
|
279 |
|
|
|
|
|
280 |
if ($skyscraper_options["accept_read_rss"] != 1){
|
|
|
281 |
|
|
|
282 |
return $rss_node;
|
|
|
283 |
}
|
|
|
284 |
}
|
|
|
285 |
else{
|
286 |
|
|
|
|
|
287 |
return $rss_node;
|
|
|
288 |
}
|
|
|
289 |
|
|
|
290 |
$version = phpversion();
|
|
|
291 |
|
|
|
292 |
if ( substr($version,0,1) == 5 && isset($skyscraper_options["rss_feed"]) && $skyscraper_options["rss_feed"]!="http://"){
|
|
|
293 |
|
|
|
294 |
include("rss_php.php");
|
|
|
295 |
|
|
|
296 |
$rss = new rss_php;
|
|
|
297 |
$rss->load($skyscraper_options["rss_feed"]);
|
|
|
298 |
$items = $rss->getItems();
|
|
|
299 |
|
|
|
300 |
if (!empty($skyscraper_options["rss_feed"])){
|
|
|
301 |
|
|
|
302 |
if (count($items) > 0){
|
|
|
303 |
|
|
|
304 |
$cant = 0;
|
|
|
305 |
foreach($items as $item){
|
|
|
306 |
|
|
|
307 |
if ($cant <= $skyscraper_options["num_rss"]){
|
|
|
308 |
|
|
|
309 |
$title="";
|
|
|
310 |
if (isset($item["title"])){
|
|
|
311 |
$title = addslashes($item["title"]);
|
|
|
312 |
}
|
|
|
313 |
$description="";
|
|
|
314 |
if (isset($item["description"])){
|
|
|
315 |
$description = addslashes($item["description"]);
|
|
|
316 |
}
|
|
|
317 |
$guid="";
|
|
|
318 |
if (isset($item["link"])){
|
|
|
319 |
$guid = addslashes($item["link"]);
|
|
|
320 |
}
|
|
|
321 |
$pubDate="";
|
|
|
322 |
if (isset($item["pubDate"])){
|
|
|
323 |
$pubDate = ago(strtotime($item["pubDate"]));
|
|
|
324 |
}
|
|
|
325 |
|
|
|
326 |
$latest_posts .= "['".$title."','','".$description."','".$guid."','".$pubDate."'],";
|
|
|
327 |
}
|
|
|
328 |
else{
|
|
|
329 |
break;
|
|
|
330 |
}
|
|
|
331 |
$cant++;
|
|
|
332 |
}
|
|
|
333 |
$latest_posts = trim($latest_posts, ",");
|
|
|
334 |
}
|
|
|
335 |
}
|
|
|
336 |
}
|
|
|
337 |
|
|
|
338 |
if ($latest_posts != ""){
|
|
|
339 |
|
|
|
340 |
$rss_node = "var LatestBlogPostContent = [
|
|
|
341 |
".$latest_posts."
|
|
|
342 |
];
|
|
|
343 |
oPlugin.CreateNode('New_Id_5','Posts','',LatestBlogPostContent,'Notice',220,460);";
|
|
|
344 |
}
|
|
|
345 |
|
|
|
346 |
return $rss_node;
|
|
|
347 |
}
|
|
|
348 |
function get_latest_node(){
|
349 |
|
|
|
|
|
350 |
$latest_node = "";
|
|
|
351 |
global $skyscraper_options;
|
|
|
352 |
|
|
|
353 |
if (!empty($skyscraper_options["accept_read_twitter"])){
|
354 |
|
|
|
|
|
355 |
if ($skyscraper_options["accept_read_twitter"] != 1){
|
|
|
356 |
|
|
|
357 |
return $latest_node;
|
|
|
358 |
}
|
|
|
359 |
}
|
|
|
360 |
else{
|
361 |
|
|
|
|
|
362 |
return $latest_node;
|
|
|
363 |
}
|
|
|
364 |
|
|
|
365 |
|
|
|
366 |
if ( isset($skyscraper_options["twitter_username"])){
|
|
|
367 |
|
|
|
368 |
$latest_tweets = get_option_tweets("skyscraper_latest");
|
|
|
369 |
if ($skyscraper_options["twitter_username"] != ""){
|
|
|
370 |
|
|
|
371 |
if ($latest_tweets != ""){
|
|
|
372 |
|
|
|
373 |
$latest_node = "
|
374 |
|
|
|
|
|
375 |
|
376 |
|
|
|
|
|
377 |
var LastestTwittsContent = [
|
|
|
378 |
".$latest_tweets."
|
|
|
379 |
];
|
|
|
380 |
|
|
|
381 |
oPlugin.CreateNode('New_Id_3','Latest','',LastestTwittsContent,'Notice',220,460);";
|
|
|
382 |
}
|
|
|
383 |
}
|
|
|
384 |
}
|
|
|
385 |
return $latest_node;
|
|
|
386 |
}
|
|
|
387 |
|
|
|
388 |
function get_mentions_node(){
|
389 |
|
|
|
|
|
390 |
$mentions_node = "";
|
|
|
391 |
|
|
|
392 |
global $skyscraper_options;
|
|
|
393 |
|
|
|
394 |
if (!empty($skyscraper_options["accept_read_twitter"])){
|
395 |
|
|
|
|
|
396 |
if ($skyscraper_options["accept_read_twitter"] != 1){
|
|
|
397 |
|
|
|
398 |
return $mentions_node;
|
|
|
399 |
}
|
|
|
400 |
}
|
|
|
401 |
else{
|
|
|
402 |
|
|
|
403 |
return $mentions_node;
|
|
|
404 |
}
|
|
|
405 |
|
|
|
406 |
|
|
|
407 |
if ( isset($skyscraper_options["twitter_username"])){
|
|
|
408 |
|
|
|
409 |
$mentions_tweets = get_option_tweets("skyscraper_mentions");
|
|
|
410 |
if ($skyscraper_options["twitter_username"] != ""){
|
|
|
411 |
|
|
|
412 |
if ($mentions_tweets != "" ){
|
|
|
413 |
|
|
|
414 |
$mentions_node = "var TweetsMentionsContent = [
|
|
|
415 |
".$mentions_tweets."
|
|
|
416 |
];
|
|
|
417 |
oPlugin.CreateNode('New_Id_4','Mentions','',TweetsMentionsContent,'Notice',220,460);";
|
|
|
418 |
}
|
|
|
419 |
}
|
|
|
420 |
}
|
|
|
421 |
return $mentions_node;
|
|
|
422 |
}
|
|
|
423 |
function get_counters_node(){
|
|
|
424 |
|
|
|
425 |
global $skyscraper_options;
|
|
|
426 |
global $title_shared;
|
|
|
427 |
global $url_shares;
|
|
|
428 |
$counters_node = "";
|
429 |
|
|
|
|
|
430 |
if ((!empty($skyscraper_options["counters"]["check"]))){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
431 |
|
|
|
432 |
$counters_node = " var url = '". addslashes(trim($url_shares))."';
|
|
|
433 |
var title = '".addslashes(trim($title_shared)) ."'; ";
|
434 |
|
|
|
|
|
435 |
|
436 |
|
|
|
|
|
437 |
$counters_node .= "
|
438 |
|
|
|
|
|
439 |
var counter = '<ul class= \"boxCounters_ul\">';
|
440 |
|
|
|
|
|
441 |
|
442 |
|
|
|
|
|
443 |
counter += '<li style=\"margin-left:2px\"><fb:like send=\"false\" layout=\"box_count\" show_faces=\"false\" font=\"\"></fb:like></li>';
|
|
|
444 |
counter +=' <li style=\"margin-left:0px\"><iframe width=\"100%\" scrolling=\"no\" frameborder=\"0\" title=\"+1\" vspace=\"0\" tabindex=\"-1\" style=\"position: static; left: 0pt; top: 0pt; width: 60px; margin: 0px; border-style: none; visibility: visible; height: 60px;\" src=\"https://plusone.google.com/_/+1/fastbutton?url='+url+'&size=tall&count=true&hl=en-US&jsh=m%3B%2F_%2Fapps-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3Dt1NEBxIt2Qs.es_419.%2Fsv%3D1%2Fam%3D!Xq7AzNfn9_-I0e5PyA%2Fd%3D1%2F#id=I1_1328906079806&parent='+url+'&rpctoken=615138222&_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart\" name=\"I1_1328906079806\" marginwidth=\"0\" marginheight=\"0\" id=\"I1_1328906079806\" hspace=\"0\" allowtransparency=\"true\"></iframe></li>';
|
445 |
|
|
|
|
|
446 |
|
447 |
|
448 |
-
|
|
|
|
|
|
|
449 |
counter += '</ul>';";
|
450 |
|
|
|
|
|
451 |
}
|
|
|
|
|
452 |
$counters_node .= "oPlugin.CreateSimpleNode('New_Id_2','Counters<br/>', counter ,".$skyscraper_options["counters"]["folded"].");
|
453 |
|
|
|
|
|
454 |
";
|
|
|
455 |
return $counters_node;
|
|
|
456 |
}
|
|
|
457 |
function get_share_node(){
|
|
|
458 |
global $skyscraper_options;
|
459 |
|
|
|
|
|
460 |
$share_node = "";
|
461 |
|
|
|
|
|
462 |
if (!empty($skyscraper_options["share"]["check"])){
|
|
|
463 |
$share_buttons = share_links();
|
|
|
464 |
$share_node = "oPlugin.CreateSimpleNode('New_Id_1','Share', '".$share_buttons."',".$skyscraper_options["share"]["folded"].");";
|
|
|
465 |
}
|
466 |
|
|
|
|
|
467 |
|
468 |
|
|
|
|
|
469 |
return $share_node;
|
470 |
|
|
|
|
|
471 |
}
|
|
|
472 |
function get_follow_us_node(){
|
|
|
473 |
$follow_us_node = "";
|
|
|
474 |
global $skyscraper_options;
|
|
|
475 |
|
|
|
476 |
if (isset($skyscraper_options["follow_us"])){
|
|
|
477 |
$follow_info = empty_accounts();
|
478 |
|
|
|
|
|
479 |
if ( $follow_info["active"] > 0 && ($follow_info["empty"] < $follow_info["active"])){
|
480 |
|
|
|
|
|
481 |
$follow_buttons = sc_follow_links();
|
482 |
|
|
|
|
|
483 |
$follow_us_node = "oPlugin.CreateNode('New_Id_6','Follow', '', '".$follow_buttons["follow_buttons"]."','Plano',40,140)";
|
484 |
|
|
|
|
|
485 |
|
486 |
|
|
|
|
|
487 |
}
|
488 |
|
|
|
|
|
489 |
}
|
|
|
490 |
return $follow_us_node;
|
491 |
|
|
|
|
|
492 |
}
|
|
|
493 |
function empty_accounts(){
|
|
|
494 |
$empty = 0;
|
|
|
495 |
$active = 0;
|
|
|
496 |
global $skyscraper_options;
|
|
|
497 |
|
|
|
498 |
foreach($skyscraper_options["follow_us"] as $follow_us){
|
|
|
499 |
|
|
|
500 |
if (empty($follow_us["account"])){
|
|
|
501 |
$empty++;
|
|
|
502 |
}
|
|
|
503 |
|
|
|
504 |
if (isset($follow_us["active"])){
|
|
|
505 |
$active++;
|
|
|
506 |
}
|
|
|
507 |
}
|
|
|
508 |
|
|
|
509 |
return array("empty" =>$empty, "active"=>$active);
|
|
|
510 |
}
|
|
|
511 |
function sc_follow_links($banner = 0){
|
|
|
512 |
global $skyscraper_options;
|
|
|
513 |
$follow_buttons = "<ul class=\'boxBanner_ul\'>";
|
514 |
|
|
|
|
|
515 |
$count_follow = 0;
|
516 |
|
|
|
|
|
517 |
|
518 |
|
|
|
|
|
519 |
foreach($skyscraper_options["follow_us"] as $follow_us){
|
|
|
520 |
$follow_us["account"]= trim($follow_us["account"]);
|
|
|
521 |
if (!empty($follow_us["active"]) && !empty($follow_us["account"]) ){
|
|
|
522 |
$follow_us["account"] = str_replace("http://", "", $follow_us["account"]);
|
|
|
523 |
$follow_us["account"] = "http://".$follow_us["account"];
|
|
|
524 |
if ($banner==1){
|
525 |
|
|
|
|
|
526 |
|
527 |
|
|
|
|
|
528 |
$follow_us["logo"] = "48".$follow_us["logo"];
|
529 |
|
|
|
|
|
530 |
}
|
|
|
531 |
$follow_buttons .= "<li><a target=\'_blank\' rel=\'nofollow\' href=\'".$follow_us["account"]."\'><img src=\'".SOCIABLE_HTTP_PATH."images/toolbar/".$follow_us["logo"]."\' /></a></li>";
|
532 |
|
|
|
|
|
533 |
|
534 |
|
|
|
|
|
535 |
$count_follow++;
|
536 |
|
|
|
|
|
537 |
}
|
|
|
538 |
}
|
539 |
|
|
|
|
|
540 |
|
541 |
|
|
|
|
|
542 |
$follow_buttons .= "</ul>";
|
|
|
543 |
$return = array();
|
544 |
|
|
|
|
|
545 |
$return["count"] = $count_follow;
|
546 |
|
|
|
|
|
547 |
$return["follow_buttons"] = $follow_buttons;
|
548 |
|
|
|
|
|
549 |
|
550 |
|
|
|
|
|
551 |
return $return;
|
552 |
|
|
|
|
|
553 |
}
|
|
|
554 |
function share_links(){
|
|
|
555 |
$url = addslashes(get_bloginfo('wpurl'));
|
|
|
556 |
$blogname = addslashes(get_bloginfo('name'));
|
|
|
557 |
global $title_shared;
|
|
|
558 |
global $url_shares;
|
|
|
|
|
|
|
559 |
|
560 |
|
|
|
561 |
$page = trim(addslashes($url_shares));
|
|
|
562 |
$permalink = trim(addslashes($url_shares));
|
|
|
563 |
$title = trim(addslashes($title_shared));
|
|
|
|
|
|
|
564 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
565 |
$share_links = array();
|
|
|
566 |
$share_links = array(
|
567 |
|
|
|
|
|
568 |
"twitter" => array('favicon' => 't.png',
|
569 |
-
|
|
|
|
|
570 |
'title' => "Share on Twitter",
|
571 |
|
|
|
|
|
572 |
'blank' => '_blank' ),
|
|
|
573 |
|
|
|
574 |
"facebook" => array('favicon' => 'f.png',
|
|
|
575 |
'url' => 'http://www.facebook.com/share.php?u='.$permalink.'&t='.$title.'',
|
|
|
576 |
'title' => "Share on Facebook",
|
577 |
|
|
|
|
|
578 |
'blank' => '_blank' ),
|
|
|
579 |
|
|
|
580 |
"google" => array('favicon' => 'g.png',
|
|
|
581 |
'url' => 'https://mail.google.com/mail/?view=cm&fs=1&to&su='.$title.'&body='.$permalink.'&ui=2&tf=1&shva=1',
|
|
|
582 |
'title' => "Share on Gmail",
|
583 |
|
|
|
|
|
584 |
'blank' => '_blank' ),
|
|
|
585 |
|
|
|
586 |
"inbound" => array('favicon' => 'inbound.png',
|
|
|
587 |
'url' => 'http://inbound.org/?url='.$permalink.'&title='.$title.'',
|
|
|
588 |
'title' => "Share on inbound.org",
|
589 |
|
|
|
|
|
590 |
'blank' => '_blank' ),
|
|
|
591 |
|
|
|
592 |
"stumble" => array('favicon' => 's.png',
|
|
|
593 |
'url' => 'http://www.stumbleupon.com/submit?url='.$permalink.'&title='.$title.'',
|
|
|
594 |
'title' => "Share on StumpleUpon",
|
595 |
|
|
|
|
|
596 |
'blank' => '_blank' ),
|
|
|
597 |
|
|
|
598 |
"delicious" => array('favicon' => 'o.png',
|
|
|
599 |
'url' => 'http://delicious.com/post?url='.$permalink.'&title='.$title.'&notes=EXCERPT',
|
|
|
600 |
"title" => "Share on delicious",
|
601 |
|
|
|
|
|
602 |
'blank' => '_blank' ),
|
|
|
603 |
|
|
|
604 |
"reader" => array('favicon' => 'n.png',
|
|
|
605 |
'url' => 'http://www.google.com/reader/link?url='.$permalink.'&title='.$title.'&srcURL='.$permalink.'&srcTitle='.$blogname.'',
|
|
|
606 |
"title" => "Share on Google Reader",
|
607 |
|
|
|
|
|
608 |
'blank' => '_blank' ),
|
|
|
609 |
|
|
|
610 |
"linkedin" => array('favicon' => 'i.png',
|
|
|
611 |
'url' => 'http://www.linkedin.com/shareArticle?mini=true&url='.$permalink.'&title='.$title.'&source='.$blogname.'&summary=EXCERPT',
|
|
|
612 |
"title" => "Share on LinkedIn",
|
613 |
|
|
|
|
|
614 |
'blank' => '_blank' ),
|
615 |
|
|
|
|
|
616 |
|
617 |
|
|
|
|
|
618 |
"pinterest" => array('favicon' => 'pinterest.png',
|
|
|
619 |
'url' => 'http://pinterest.com/pin/create/button/?url='.$permalink.'',
|
|
|
620 |
"title" => "Share on Pinterest",
|
621 |
|
|
|
|
|
622 |
'blank' => '_blank' ),
|
623 |
|
|
|
|
|
624 |
|
625 |
|
|
|
|
|
626 |
"favorites" => array('favicon' => 'fv.png',
|
627 |
|
|
|
|
|
628 |
'url' => 'javascript:AddToFavorites();',
|
629 |
|
|
|
|
|
630 |
'title' => "Add to favorites - doesn\"t work in Chrome",
|
631 |
|
|
|
|
|
632 |
'blank' => '_self' )
|
633 |
|
|
|
|
|
634 |
|
635 |
|
|
|
|
|
636 |
);
|
|
|
637 |
|
|
|
638 |
$share_buttons = "";
|
|
|
639 |
foreach($share_links as $link){
|
640 |
|
|
|
|
|
641 |
|
642 |
|
|
|
|
|
643 |
|
644 |
|
|
|
|
|
645 |
$share_buttons .= "<a target=\'".$link["blank"]."\' rel=\'nofollow\' href=\'".addslashes($link["url"])."\' title=\'".addslashes($link["title"])."\'><img src=\'".SOCIABLE_HTTP_PATH."images/toolbar/".addslashes($link["favicon"])."\' /></a>";
|
|
|
646 |
}
|
|
|
647 |
return $share_buttons;
|
648 |
|
|
|
|
|
649 |
}
|
|
|
650 |
/*
|
|
|
651 |
* Template Tag To Echo The Sociable 2 HTML
|
|
|
652 |
*/
|
|
|
653 |
function do_skyscraper(){
|
|
|
654 |
echo skyscraper_html();
|
|
|
655 |
}
|
|
|
656 |
/*
|
|
|
657 |
* Sociable 2 Shortcode
|
|
|
658 |
*/
|
|
|
659 |
function skyscraper_shortcode(){
|
|
|
660 |
return skyscraper_html();
|
|
|
661 |
}
|
|
|
662 |
function auto_skyscraper($content, $admin = false){
|
|
|
663 |
global $skyscraper_options;
|
664 |
|
|
|
|
|
665 |
if ($admin){
|
|
|
666 |
$content = skyscraper_html();
|
|
|
667 |
return $content;
|
|
|
668 |
}
|
|
|
669 |
|
|
|
670 |
if( ! isset( $skyscraper_options['active'] )){
|
|
|
671 |
$content = "";
|
|
|
672 |
return $content;
|
|
|
673 |
}
|
674 |
|
|
|
|
|
675 |
|
|
|
676 |
if( ! isset( $skyscraper_options['locations'] ) || ! is_array( $skyscraper_options['locations'] ) || empty( $skyscraper_options['locations'] ) ){
|
|
|
677 |
|
|
|
678 |
$content = "";
|
|
|
679 |
} else {
|
|
|
680 |
|
|
|
681 |
$locations = $skyscraper_options['locations'];
|
|
|
682 |
}
|
|
|
683 |
/*
|
|
|
684 |
* Determine if we are supposed to be displaying the output here.
|
|
|
685 |
*/
|
|
|
686 |
$display = false;
|
|
|
687 |
|
|
|
688 |
/*
|
|
|
689 |
* is_single is a unique case it still returning true
|
|
|
690 |
*/
|
|
|
691 |
|
|
|
692 |
//If We Can Verify That We are in the correct loaction, simply add something to the $display array, and test for a true result to continue.
|
|
|
693 |
foreach( $locations as $location => $val ){
|
|
|
694 |
|
|
|
695 |
//First We Handle is_single() so it returning true on Single Post Type Pages is not an issue, this is not the intended functionality of this plugin
|
|
|
696 |
if( $location == 'is_single' ){
|
|
|
697 |
//If we are not in a post, lets ignore this one for now
|
|
|
698 |
if( is_single() && get_post_type() == 'post' ){
|
|
|
699 |
$display = true;
|
|
|
700 |
break;
|
|
|
701 |
} else {
|
|
|
702 |
continue; // So not to trigger is_single later in this loop, but still be allowed to handle others
|
|
|
703 |
}
|
|
|
704 |
|
|
|
705 |
} elseif( strpos( $location , 'is_single_posttype_' ) === 0 ){ //Now We Need To Check For The Variable Names, Taxonomy Archives, Post Type Archives and Single Custom Post Types.
|
|
|
706 |
|
|
|
707 |
//Single Custom Post Type
|
|
|
708 |
$post_type = str_replace( 'is_single_posttype_' , '' , $location );
|
|
|
709 |
if( is_single() && get_post_type() == $post_type ){
|
|
|
710 |
$display = true;
|
|
|
711 |
break;
|
|
|
712 |
}
|
|
|
713 |
|
|
|
714 |
} elseif( strpos( $location , 'is_posttype_archive_' ) === 0 ){
|
|
|
715 |
|
|
|
716 |
//Custom Post Type Archive
|
|
|
717 |
$post_type = str_replace( 'is_posttype_archive_' , '' , $location );
|
|
|
718 |
if( is_post_type_archive( $post_type ) ){
|
|
|
719 |
$display = true;
|
|
|
720 |
break;
|
|
|
721 |
}
|
|
|
722 |
|
|
|
723 |
} elseif( strpos( $location , 'is_taxonomy_archive_' ) === 0 ) {
|
|
|
724 |
|
|
|
725 |
//Taxonomy Archive
|
|
|
726 |
$taxonomy = str_replace( 'is_taxonomy_archive_' , '' , $location );
|
|
|
727 |
if( is_tax( $taxonomy ) ){
|
|
|
728 |
$display = true;
|
|
|
729 |
break;
|
|
|
730 |
}
|
|
|
731 |
|
|
|
732 |
} elseif( function_exists( $location ) ) {
|
|
|
733 |
|
|
|
734 |
//Standard conditional tag, these will return BOOL
|
|
|
735 |
if( call_user_func( $location ) === true ){
|
|
|
736 |
$display = true;
|
|
|
737 |
break;
|
|
|
738 |
}
|
|
|
739 |
|
|
|
740 |
} else {
|
|
|
741 |
continue;
|
|
|
742 |
}
|
|
|
743 |
|
|
|
744 |
|
|
|
745 |
}
|
|
|
746 |
|
|
|
747 |
//If We have passed all the checks and are looking in the right place lets do this thang
|
|
|
748 |
if( isset( $skyscraper_options['automatic_mode'] ) && $display === true ){
|
|
|
749 |
if (isset($skyscraper_options["topandbottom"])){
|
|
|
750 |
$content = skyscraper_html();
|
|
|
751 |
}else{
|
|
|
752 |
$content = skyscraper_html();
|
|
|
753 |
}
|
|
|
754 |
}
|
|
|
755 |
else{
|
|
|
756 |
$content = skyscraper_html();
|
|
|
757 |
}
|
|
|
758 |
|
|
|
759 |
|
|
|
760 |
|
|
|
761 |
return $content;
|
|
|
762 |
}
|
|
|
763 |
function get_tweets_username($username_complete){
|
|
|
764 |
|
|
|
765 |
if (function_exists('curl_init')) {
|
|
|
766 |
|
|
|
767 |
// last tweets
|
|
|
768 |
$username = str_replace("@", "", $username_complete);
|
|
|
769 |
$url = "https://api.twitter.com/1/statuses/user_timeline/".$username.".json";
|
|
|
770 |
$latest = curl_call($url);
|
|
|
771 |
$latest_row = parser_twitter_results($latest,0);
|
|
|
772 |
update_option( "skyscraper_latest", $latest_row );
|
|
|
773 |
|
|
|
774 |
// last mentions
|
|
|
775 |
$url = "http://search.twitter.com/search.json?q=@".$username."&rpp=5&include_entities=true&result_type=mixed";
|
|
|
776 |
$mentions = curl_call($url);
|
|
|
777 |
|
|
|
778 |
if (count($mentions["results"]) > 1){
|
|
|
779 |
|
|
|
780 |
$mentions_row = parser_twitter_results($mentions["results"],1);
|
|
|
781 |
update_option( "skyscraper_mentions", $mentions_row );
|
|
|
782 |
}
|
|
|
783 |
}
|
|
|
784 |
}
|
|
|
785 |
function ago($time){
|
|
|
786 |
$periods = array("second", "minute", "hour", "day", "week", "month", "year", "decade");
|
|
|
787 |
$lengths = array("60","60","24","7","4.35","12","10");
|
|
|
788 |
$now = time();
|
|
|
789 |
$difference = $now - $time;
|
|
|
790 |
$tense = "ago";
|
|
|
791 |
for($j = 0; $difference >= $lengths[$j] && $j < count($lengths)-1; $j++) {
|
|
|
792 |
$difference /= $lengths[$j];
|
|
|
793 |
}
|
|
|
794 |
$difference = round($difference);
|
|
|
795 |
if($difference != 1) {
|
|
|
796 |
$periods[$j].= "s";
|
|
|
797 |
}
|
|
|
798 |
return $difference." ".$periods[$j]."ago";
|
|
|
799 |
}
|
|
|
800 |
function parser_twitter_results($results = array(), $mention){
|
|
|
801 |
|
|
|
802 |
$options_latest = array();
|
|
|
803 |
$options_latest = array("date" => date("YmdHis"));
|
|
|
804 |
global $skyscraper_options;
|
|
|
805 |
$i = 0;
|
|
|
806 |
|
|
|
807 |
if (is_array($results)){
|
|
|
808 |
|
|
|
809 |
foreach($results as $tweet){
|
|
|
810 |
|
|
|
811 |
$options_latest[$i] = array();
|
|
|
812 |
$options_latest[$i]["text"] = $tweet["text"];
|
|
|
813 |
$options_latest[$i]["created_at"] = ago(strtotime($tweet["created_at"]));
|
|
|
814 |
|
|
|
815 |
if ($mention){
|
|
|
816 |
$options_latest[$i]["name"] = $tweet["from_user_name"];
|
|
|
817 |
}
|
|
|
818 |
else{
|
|
|
819 |
$options_latest[$i]["name"] = $tweet["user"]["name"];
|
|
|
820 |
}
|
|
|
821 |
|
|
|
822 |
$i++;
|
|
|
823 |
if ($i == $skyscraper_options["num_tweets"]){
|
|
|
824 |
break;
|
|
|
825 |
}
|
|
|
826 |
}
|
|
|
827 |
}
|
|
|
828 |
|
|
|
829 |
return $options_latest;
|
|
|
830 |
}
|
|
|
831 |
function curl_call($url){
|
|
|
832 |
|
|
|
833 |
$ch = curl_init();
|
|
|
834 |
curl_setopt($ch, CURLOPT_URL, $url);
|
|
|
835 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
|
836 |
curl_setopt($ch, CURLOPT_TIMEOUT, 3);
|
|
|
837 |
curl_setopt($ch, CURLINFO_HEADER_OUT, true);
|
|
|
838 |
$output = curl_exec($ch);
|
|
|
839 |
$info = curl_getinfo($ch);
|
|
|
840 |
curl_close($ch);
|
|
|
841 |
|
|
|
842 |
if ($info["http_code"] == "200"){
|
|
|
843 |
|
|
|
844 |
$return = json_decode($output,1);
|
|
|
845 |
}
|
|
|
846 |
else{
|
|
|
847 |
$return = false;
|
|
|
848 |
}
|
|
|
849 |
|
|
|
850 |
return $return;
|
|
|
851 |
}
|
|
|
852 |
function get_option_tweets($option){
|
|
|
853 |
|
|
|
854 |
global $skyscraper_options;
|
|
|
855 |
$skyscraper_latest = get_option($option);
|
|
|
856 |
|
|
|
857 |
if (empty($skyscraper_latest)){
|
|
|
858 |
|
|
|
859 |
get_tweets_username($skyscraper_options["twitter_username"]);
|
|
|
860 |
$skyscraper_latest = get_option($option);
|
|
|
861 |
}
|
|
|
862 |
else{
|
|
|
863 |
|
|
|
864 |
// 5 minutes
|
|
|
865 |
if (diff_date($skyscraper_latest["date"], date("YmdHis")) > 5){
|
|
|
866 |
|
|
|
867 |
get_tweets_username($skyscraper_options["twitter_username"]);
|
|
|
868 |
$skyscraper_latest = get_option($option);
|
|
|
869 |
}
|
|
|
870 |
}
|
|
|
871 |
|
|
|
872 |
|
|
|
873 |
return generate_tweets_box_content($skyscraper_latest);
|
|
|
874 |
}
|
|
|
875 |
function generate_tweets_box_content($tweets){
|
|
|
876 |
$content = "";
|
|
|
877 |
if (isset($tweets["date"])){
|
|
|
878 |
unset($tweets["date"]);
|
|
|
879 |
}
|
|
|
880 |
|
|
|
881 |
|
|
|
882 |
foreach($tweets as $tweet){
|
|
|
883 |
|
|
|
884 |
$tweet["name"] = addslashes($tweet["name"]);
|
|
|
885 |
$tweet["text"] = addslashes($tweet["text"]);
|
|
|
886 |
|
|
|
887 |
$content .= "['".$tweet["name"]."','".$tweet["name"]."','".$tweet["text"]."','','".$tweet["created_at"]."'],";
|
|
|
888 |
}
|
|
|
889 |
$content = trim(trim(trim($content), ","));
|
|
|
890 |
|
|
|
891 |
return $content;
|
|
|
892 |
}
|
|
|
893 |
if (!empty($_GET["sky"])){
|
|
|
894 |
add_action('wp_ajax_my_action', 'my_action_callback');
|
|
|
895 |
function my_action_callback() {
|
|
|
896 |
global $wpdb; global $skyscraper_options; // this is how you get access to the database
|
|
|
897 |
$whatever = intval( $_POST['whatever'] );
|
|
|
898 |
$whatever += 10;
|
|
|
899 |
echo $whatever;
|
|
|
900 |
die(); // this is required to return a proper result
|
|
|
901 |
}
|
|
|
902 |
}
|
|
|
903 |
?>
|
1 |
<?php
|
2 |
|
3 |
+
|
4 |
+
|
5 |
/*
|
6 |
|
7 |
+
|
8 |
+
|
9 |
* The Output And Shortcode Functions For sociable
|
10 |
|
11 |
+
|
12 |
+
|
13 |
*/
|
14 |
+
|
15 |
/*
|
16 |
|
17 |
+
|
18 |
+
|
19 |
* Returns The Skyscraper Output For The Global $post Object Do Not
|
20 |
|
21 |
+
|
22 |
+
|
23 |
*/
|
24 |
+
|
25 |
function diff_date($date1, $date2){
|
26 |
|
27 |
+
|
28 |
+
|
29 |
$date1 = mktime(substr($date1,8,2), substr($date1,10,2), substr($date1,12,2), substr($date1,4,2), substr($date1,6,2), substr($date1,0,4));
|
30 |
+
|
31 |
$date2 = mktime(substr($date2,8,2), substr($date2,10,2), substr($date2,12,2), substr($date2,4,2), substr($date2,6,2), substr($date2,0,4));
|
32 |
|
33 |
+
|
34 |
+
|
35 |
$diff_time = ceil((($date2 - $date1)/60));
|
36 |
+
|
37 |
return $diff_time;
|
38 |
|
39 |
+
|
40 |
+
|
41 |
}
|
42 |
+
|
43 |
|
44 |
+
|
45 |
|
46 |
+
|
47 |
function skyscraper_html( $where = "" ){
|
48 |
+
|
49 |
global $skyscraper_options, $wp_query;
|
50 |
+
|
51 |
if (!is_admin() || 1==1){
|
52 |
+
|
53 |
// echo "<script type='text/javascript'>";
|
54 |
+
|
55 |
// echo "var skyscraper_dir = '".SOCIABLE_HTTP_PATH."' ;";
|
56 |
+
|
57 |
// echo "</script>";
|
58 |
+
|
59 |
echo " var skyscraper_dir = document.createElement('input');
|
60 |
+
|
61 |
skyscraper_dir.id = 'skyscraper_dir';
|
62 |
+
|
63 |
skyscraper_dir.type = 'hidden';
|
64 |
+
|
65 |
skyscraper_dir.value = '".SOCIABLE_HTTP_PATH."';
|
66 |
+
|
67 |
document.body.appendChild(skyscraper_dir); ";
|
68 |
+
|
69 |
|
70 |
+
|
71 |
$widget_width = str_replace("px", "", $skyscraper_options["widget_width"]);
|
72 |
+
|
73 |
|
74 |
+
|
75 |
$widget_position = "null";
|
76 |
+
|
77 |
if (isset($skyscraper_options["widget_position"])){
|
78 |
+
|
79 |
$widget_position = 1;
|
80 |
+
|
81 |
}
|
82 |
+
|
83 |
|
84 |
+
|
85 |
$labels_color = $skyscraper_options["labels_color"];
|
86 |
+
|
87 |
$text_size = str_replace("px", "", $skyscraper_options["text_size"]);
|
88 |
+
|
89 |
$background_color = $skyscraper_options["background_color"];
|
90 |
+
|
91 |
|
92 |
+
|
93 |
$addWhere = "";
|
94 |
+
|
95 |
|
96 |
+
|
97 |
if ($where == ""){
|
98 |
+
|
99 |
$addWhere = "var div = document.createElement('div');
|
100 |
+
|
101 |
div.id = 'skyscraper';
|
102 |
+
|
103 |
document.body.appendChild(div);";
|
104 |
+
|
105 |
}
|
106 |
+
|
107 |
$url_site= $_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];
|
108 |
+
|
109 |
$script = "
|
110 |
|
111 |
+
|
112 |
+
|
113 |
if (!document.getElementById('fb-root')){
|
114 |
|
115 |
+
|
116 |
+
|
117 |
var div = document.createElement('div');
|
118 |
|
119 |
+
|
120 |
+
|
121 |
div.id = 'fb-root';
|
122 |
|
123 |
+
|
124 |
+
|
125 |
document.body.appendChild(div);
|
126 |
|
127 |
+
|
128 |
+
|
129 |
}
|
130 |
+
|
131 |
(function(d, s, id) {
|
132 |
|
133 |
+
|
134 |
+
|
135 |
var js, fjs = d.getElementsByTagName(s)[0];
|
136 |
|
137 |
+
|
138 |
+
|
139 |
if (d.getElementById(id)) return;
|
140 |
|
141 |
+
|
142 |
+
|
143 |
js = d.createElement(s); js.id = id;
|
144 |
|
145 |
+
|
146 |
+
|
147 |
js.src = \"http://connect.facebook.net/en_US/all.js#xfbml=1\";
|
148 |
|
149 |
+
|
150 |
+
|
151 |
fjs.parentNode.insertBefore(js, fjs);
|
152 |
+
|
153 |
}(document, 'script', 'facebook-jssdk'));
|
154 |
|
155 |
+
|
156 |
+
|
157 |
|
158 |
|
159 |
+
|
160 |
+
|
161 |
".$addWhere."
|
162 |
|
163 |
+
|
164 |
+
|
165 |
|
166 |
|
167 |
+
|
168 |
+
|
169 |
jQuery(document).ready(function(){
|
170 |
+
|
171 |
oPlugin.toolbarStart('skyscraper', ".$widget_position.",230,".$widget_width.",'".$background_color."','".$labels_color."',false,'#6A6A6A',".$text_size.",'#587cc8');
|
172 |
|
173 |
+
|
174 |
+
|
175 |
|
176 |
|
177 |
+
|
178 |
+
|
179 |
".get_share_node()."
|
180 |
|
181 |
+
|
182 |
+
|
183 |
".get_counters_node()."
|
184 |
|
185 |
+
|
186 |
+
|
187 |
".get_social_banner_node()."
|
188 |
|
189 |
+
|
190 |
+
|
191 |
".get_latest_node()."
|
192 |
|
193 |
+
|
194 |
+
|
195 |
".get_mentions_node()."
|
196 |
|
197 |
+
|
198 |
+
|
199 |
".get_follow_us_node()."
|
200 |
|
201 |
+
|
202 |
+
|
203 |
".get_rss_node()."
|
204 |
|
205 |
+
|
206 |
+
|
207 |
oPlugin.CreateGoToTop('New_Id_12','Top','<img src=\"".SOCIABLE_HTTP_PATH."images/toolbar/gototop.png\" style=\"width:30px;\" />');
|
208 |
+
|
209 |
oPlugin.CreateGoToHome('New_Id_13','Go Home','<img src=\"".SOCIABLE_HTTP_PATH."images/toolbar/gotohome.png\" style=\"width:30px;\" />');
|
210 |
|
211 |
+
|
212 |
+
|
213 |
});
|
214 |
|
215 |
+
|
216 |
+
|
217 |
jQuery('.title').css('font-size', '".$text_size."px');
|
218 |
|
219 |
+
|
220 |
+
|
221 |
|
222 |
|
223 |
+
|
224 |
+
|
225 |
";
|
226 |
|
227 |
+
|
228 |
+
|
229 |
echo $script;
|
230 |
|
231 |
+
|
232 |
+
|
233 |
}
|
234 |
|
235 |
+
|
236 |
+
|
237 |
}
|
238 |
+
|
239 |
function get_social_banner_node(){
|
240 |
|
241 |
+
|
242 |
+
|
243 |
|
244 |
|
245 |
+
|
246 |
+
|
247 |
|
248 |
|
249 |
+
|
250 |
+
|
251 |
global $skyscraper_options;
|
252 |
+
|
253 |
global $title_shared;
|
254 |
+
|
255 |
global $url_shares;
|
256 |
|
257 |
+
|
258 |
+
|
259 |
|
260 |
|
261 |
+
|
262 |
+
|
263 |
$social_banner_node = "";
|
264 |
|
265 |
+
|
266 |
+
|
267 |
|
268 |
|
269 |
+
|
270 |
+
|
271 |
|
272 |
|
273 |
+
|
274 |
+
|
275 |
if(!empty($skyscraper_options["sociable_banner"])){
|
276 |
|
277 |
+
|
278 |
+
|
279 |
|
280 |
|
281 |
+
|
282 |
+
|
283 |
$follow_us = sc_follow_links(1);
|
284 |
|
285 |
+
|
286 |
+
|
287 |
|
288 |
|
289 |
+
|
290 |
+
|
291 |
$follow_buttons = $follow_us["follow_buttons"];
|
292 |
|
293 |
+
|
294 |
+
|
295 |
|
296 |
|
297 |
+
|
298 |
+
|
299 |
$follow_us_count = $follow_us["count"];
|
300 |
|
301 |
+
$width_banner = 200;
|
302 |
+
|
303 |
+
$tag_banner = '';
|
304 |
|
305 |
+
if (isset($skyscraper_options["blogplay_tags"])){
|
306 |
+
|
307 |
+
if (!empty($skyscraper_options["blogplay_tags"])){
|
308 |
+
|
309 |
+
$tag_banner = '<blogplay.com>';
|
310 |
+
}
|
311 |
+
}
|
312 |
|
|
|
313 |
|
|
|
314 |
|
315 |
$social_banner_node = " var url = '". addslashes(trim($url_shares))."';
|
316 |
|
317 |
+
|
318 |
+
|
319 |
var title = '".addslashes(trim($title_shared)) ."';
|
320 |
|
321 |
+
|
322 |
+
|
323 |
var counter = '<ul class=\"boxBanner_ul\">';
|
324 |
|
325 |
+
|
326 |
+
|
327 |
counter += ' <li>';
|
328 |
|
329 |
+
|
330 |
+
|
331 |
counter += ' <div class=\"fb-like\" data-send=\"false\" data-layout=\"box_count\" data-width=\"50\" data-href=\"'+url+'\" data-show-faces=\"false\"></div>';
|
332 |
|
333 |
+
|
334 |
+
|
335 |
|
336 |
|
337 |
+
|
338 |
+
|
339 |
counter += ' </li>';
|
340 |
|
341 |
+
|
342 |
+
|
343 |
counter += ' <li>';
|
344 |
|
345 |
+
|
346 |
+
|
347 |
counter += ' <iframe width=\"100%\" scrolling=\"no\" frameborder=\"0\" title=\"+1\" vspace=\"0\" tabindex=\"-1\" style=\"position: static; left: 0pt; top: 0pt; width: 60px; margin: 0px; border-style: none; visibility: visible; height: 60px;\" src=\"https://plusone.google.com/_/+1/fastbutton?url='+url+'&size=tall&count=true&hl=en-US&jsh=m%3B%2F_%2Fapps-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3Dt1NEBxIt2Qs.es_419.%2Fsv%3D1%2Fam%3D!Xq7AzNfn9_-I0e5PyA%2Fd%3D1%2F#id=I1_1328906079806&parent='+url+'&rpctoken=615138222&_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart\" name=\"I1_1328906079806\" marginwidth=\"0\" marginheight=\"0\" id=\"I1_1328906079806\" hspace=\"0\" allowtransparency=\"true\"></iframe>';
|
348 |
|
349 |
+
|
350 |
+
|
351 |
counter += ' </li>';
|
352 |
|
353 |
+
|
354 |
+
|
355 |
counter += ' <li>';
|
356 |
|
357 |
+
|
358 |
+
|
359 |
+
counter += '<iframe scrolling=\"no\" frameborder=\"0\" allowtransparency=\"true\" src=\"https://platform.twitter.com/widgets/tweet_button.html?_version=2&count=vertical&enableNewSizing=false&id=twitter-widget-6&lang=en&original_referer='+url+'&size=m&text='+title+' ".$tag_banner." &url='+url+'\" class=\"twitter-share-button twitter-count-vertical\" style=\"width: 55px; height: 62px;\" title=\"Twitter Tweet Button\"></iframe>';
|
360 |
+
|
361 |
+
|
362 |
|
363 |
counter += ' </li>';
|
364 |
|
365 |
+
|
366 |
+
|
367 |
counter += '</ul>';";
|
368 |
|
369 |
+
|
370 |
+
|
371 |
|
372 |
|
373 |
+
|
374 |
+
|
375 |
if ($follow_us_count > 0){
|
376 |
|
377 |
+
|
378 |
+
|
379 |
|
380 |
|
381 |
+
|
382 |
+
|
383 |
$social_banner_node .= "
|
384 |
|
385 |
+
|
386 |
+
|
387 |
counter += '<ul class=\"boxBanner_ul_margin\">';
|
388 |
|
389 |
+
|
390 |
+
|
391 |
counter += '<li>';
|
392 |
|
393 |
+
|
394 |
+
|
395 |
counter += '</li>';
|
396 |
|
397 |
+
|
398 |
+
|
399 |
counter += '</ul>';";
|
400 |
|
401 |
+
|
402 |
+
|
403 |
|
404 |
|
405 |
+
|
406 |
+
|
407 |
$social_banner_node .= " counter += '".$follow_buttons."'; ";
|
408 |
|
409 |
+
|
410 |
+
|
411 |
|
412 |
|
413 |
+
|
414 |
+
|
415 |
if ($follow_us_count > 1){
|
416 |
|
417 |
+
|
418 |
+
|
419 |
|
420 |
|
421 |
+
|
422 |
+
|
423 |
$width_banner = $width_banner + (70 * $follow_us_count);
|
424 |
|
425 |
+
|
426 |
+
|
427 |
}
|
428 |
|
429 |
+
|
430 |
+
|
431 |
else{
|
432 |
|
433 |
+
|
434 |
+
|
435 |
$width_banner = $width_banner + (90 * $follow_us_count);
|
436 |
|
437 |
+
|
438 |
+
|
439 |
}
|
440 |
|
441 |
+
|
442 |
+
|
443 |
|
444 |
|
445 |
+
|
446 |
+
|
447 |
|
448 |
|
449 |
+
|
450 |
+
|
451 |
}
|
452 |
|
453 |
+
|
454 |
+
|
455 |
|
456 |
|
457 |
+
|
458 |
+
|
459 |
$label_text = trim($skyscraper_options["sociable_banner_text"]);
|
460 |
|
461 |
+
|
462 |
+
|
463 |
|
464 |
|
465 |
+
|
466 |
+
|
467 |
if (strlen($label_text) > 35){
|
468 |
|
469 |
+
|
470 |
+
|
471 |
// $label_text = substr($label_text,0,35);
|
472 |
|
473 |
+
|
474 |
+
|
475 |
}
|
476 |
|
477 |
+
|
478 |
+
|
479 |
$label_text = addslashes($label_text);
|
480 |
|
481 |
+
|
482 |
+
|
483 |
|
484 |
|
485 |
+
|
486 |
+
|
487 |
$social_banner_node .= "oPlugin.CreateNode('New_Id_14','".$label_text."', '', counter,'banner',80,".$width_banner.");";
|
488 |
|
489 |
+
|
490 |
+
|
491 |
$timer = ($skyscraper_options["sociable_banner_timer"] * 1000);
|
492 |
|
493 |
+
|
494 |
+
|
495 |
|
496 |
|
497 |
+
|
498 |
+
|
499 |
$colorBack = $skyscraper_options["sociable_banner_colorBack"];
|
500 |
|
501 |
+
|
502 |
+
|
503 |
$colorFont = $skyscraper_options["sociable_banner_colorFont"];
|
504 |
|
505 |
+
|
506 |
+
|
507 |
$colorLabel = $skyscraper_options["sociable_banner_colorLabel"];
|
508 |
|
509 |
+
|
510 |
+
|
511 |
$fontSize = $skyscraper_options["sociable_banner_fontSize"];
|
512 |
|
|
|
513 |
|
514 |
+
|
515 |
+
|
516 |
+
|
517 |
+
|
518 |
+
|
519 |
+
$social_banner_node .="setTimeout('showBanner(".$timer.",\"".$colorBack."\", \"".$colorLabel."\", \"".$colorFont."\", \"".$fontSize."\")', ".$timer.");";
|
520 |
+
|
521 |
+
|
522 |
|
523 |
|
524 |
|
525 |
+
|
526 |
+
|
527 |
}
|
528 |
|
529 |
+
|
530 |
+
|
531 |
|
532 |
|
533 |
+
|
534 |
+
|
535 |
return $social_banner_node;
|
536 |
|
537 |
+
|
538 |
+
|
539 |
}
|
540 |
+
|
541 |
function get_rss_node(){
|
542 |
|
543 |
+
|
544 |
+
|
545 |
$rss_node = "";
|
546 |
+
|
547 |
$latest_posts = "";
|
548 |
+
|
549 |
global $skyscraper_options;
|
550 |
+
|
551 |
|
552 |
+
|
553 |
|
554 |
+
|
555 |
if (!empty($skyscraper_options["accept_read_rss"])){
|
556 |
|
557 |
+
|
558 |
+
|
559 |
if ($skyscraper_options["accept_read_rss"] != 1){
|
560 |
+
|
561 |
|
562 |
+
|
563 |
return $rss_node;
|
564 |
+
|
565 |
}
|
566 |
+
|
567 |
}
|
568 |
+
|
569 |
else{
|
570 |
|
571 |
+
|
572 |
+
|
573 |
return $rss_node;
|
574 |
+
|
575 |
}
|
576 |
+
|
577 |
|
578 |
+
|
579 |
$version = phpversion();
|
580 |
+
|
581 |
|
582 |
+
|
583 |
if ( substr($version,0,1) == 5 && isset($skyscraper_options["rss_feed"]) && $skyscraper_options["rss_feed"]!="http://"){
|
584 |
+
|
585 |
|
586 |
+
|
587 |
include("rss_php.php");
|
588 |
+
|
589 |
|
590 |
+
|
591 |
$rss = new rss_php;
|
592 |
+
|
593 |
$rss->load($skyscraper_options["rss_feed"]);
|
594 |
+
|
595 |
$items = $rss->getItems();
|
596 |
+
|
597 |
|
598 |
+
|
599 |
if (!empty($skyscraper_options["rss_feed"])){
|
600 |
+
|
601 |
|
602 |
+
|
603 |
if (count($items) > 0){
|
604 |
+
|
605 |
|
606 |
+
|
607 |
$cant = 0;
|
608 |
+
|
609 |
foreach($items as $item){
|
610 |
+
|
611 |
|
612 |
+
|
613 |
if ($cant <= $skyscraper_options["num_rss"]){
|
614 |
+
|
615 |
|
616 |
+
|
617 |
$title="";
|
618 |
+
|
619 |
if (isset($item["title"])){
|
620 |
+
|
621 |
$title = addslashes($item["title"]);
|
622 |
+
|
623 |
}
|
624 |
+
|
625 |
$description="";
|
626 |
+
|
627 |
if (isset($item["description"])){
|
628 |
+
|
629 |
$description = addslashes($item["description"]);
|
630 |
+
|
631 |
}
|
632 |
+
|
633 |
$guid="";
|
634 |
+
|
635 |
if (isset($item["link"])){
|
636 |
+
|
637 |
$guid = addslashes($item["link"]);
|
638 |
+
|
639 |
}
|
640 |
+
|
641 |
$pubDate="";
|
642 |
+
|
643 |
if (isset($item["pubDate"])){
|
644 |
+
|
645 |
$pubDate = ago(strtotime($item["pubDate"]));
|
646 |
+
|
647 |
}
|
648 |
+
|
649 |
|
650 |
+
|
651 |
$latest_posts .= "['".$title."','','".$description."','".$guid."','".$pubDate."'],";
|
652 |
+
|
653 |
}
|
654 |
+
|
655 |
else{
|
656 |
+
|
657 |
break;
|
658 |
+
|
659 |
}
|
660 |
+
|
661 |
$cant++;
|
662 |
+
|
663 |
}
|
664 |
+
|
665 |
$latest_posts = trim($latest_posts, ",");
|
666 |
+
|
667 |
}
|
668 |
+
|
669 |
}
|
670 |
+
|
671 |
}
|
672 |
+
|
673 |
|
674 |
+
|
675 |
if ($latest_posts != ""){
|
676 |
+
|
677 |
|
678 |
+
|
679 |
$rss_node = "var LatestBlogPostContent = [
|
680 |
+
|
681 |
".$latest_posts."
|
682 |
+
|
683 |
];
|
684 |
+
|
685 |
oPlugin.CreateNode('New_Id_5','Posts','',LatestBlogPostContent,'Notice',220,460);";
|
686 |
+
|
687 |
}
|
688 |
+
|
689 |
|
690 |
+
|
691 |
return $rss_node;
|
692 |
+
|
693 |
}
|
694 |
+
|
695 |
function get_latest_node(){
|
696 |
|
697 |
+
|
698 |
+
|
699 |
$latest_node = "";
|
700 |
+
|
701 |
global $skyscraper_options;
|
702 |
+
|
703 |
|
704 |
+
|
705 |
if (!empty($skyscraper_options["accept_read_twitter"])){
|
706 |
|
707 |
+
|
708 |
+
|
709 |
if ($skyscraper_options["accept_read_twitter"] != 1){
|
710 |
+
|
711 |
|
712 |
+
|
713 |
return $latest_node;
|
714 |
+
|
715 |
}
|
716 |
+
|
717 |
}
|
718 |
+
|
719 |
else{
|
720 |
|
721 |
+
|
722 |
+
|
723 |
return $latest_node;
|
724 |
+
|
725 |
}
|
726 |
+
|
727 |
|
728 |
+
|
729 |
|
730 |
+
|
731 |
if ( isset($skyscraper_options["twitter_username"])){
|
732 |
+
|
733 |
|
734 |
+
|
735 |
$latest_tweets = get_option_tweets("skyscraper_latest");
|
736 |
+
|
737 |
if ($skyscraper_options["twitter_username"] != ""){
|
738 |
+
|
739 |
|
740 |
+
|
741 |
if ($latest_tweets != ""){
|
742 |
+
|
743 |
|
744 |
+
|
745 |
$latest_node = "
|
746 |
|
747 |
+
|
748 |
+
|
749 |
|
750 |
|
751 |
+
|
752 |
+
|
753 |
var LastestTwittsContent = [
|
754 |
+
|
755 |
".$latest_tweets."
|
756 |
+
|
757 |
];
|
758 |
+
|
759 |
|
760 |
+
|
761 |
oPlugin.CreateNode('New_Id_3','Latest','',LastestTwittsContent,'Notice',220,460);";
|
762 |
+
|
763 |
}
|
764 |
+
|
765 |
}
|
766 |
+
|
767 |
}
|
768 |
+
|
769 |
return $latest_node;
|
770 |
+
|
771 |
}
|
772 |
+
|
773 |
|
774 |
+
|
775 |
function get_mentions_node(){
|
776 |
|
777 |
+
|
778 |
+
|
779 |
$mentions_node = "";
|
780 |
+
|
781 |
|
782 |
+
|
783 |
global $skyscraper_options;
|
784 |
+
|
785 |
|
786 |
+
|
787 |
if (!empty($skyscraper_options["accept_read_twitter"])){
|
788 |
|
789 |
+
|
790 |
+
|
791 |
if ($skyscraper_options["accept_read_twitter"] != 1){
|
792 |
+
|
793 |
|
794 |
+
|
795 |
return $mentions_node;
|
796 |
+
|
797 |
}
|
798 |
+
|
799 |
}
|
800 |
+
|
801 |
else{
|
802 |
+
|
803 |
|
804 |
+
|
805 |
return $mentions_node;
|
806 |
+
|
807 |
}
|
808 |
+
|
809 |
|
810 |
+
|
811 |
|
812 |
+
|
813 |
if ( isset($skyscraper_options["twitter_username"])){
|
814 |
+
|
815 |
|
816 |
+
|
817 |
$mentions_tweets = get_option_tweets("skyscraper_mentions");
|
818 |
+
|
819 |
if ($skyscraper_options["twitter_username"] != ""){
|
820 |
+
|
821 |
|
822 |
+
|
823 |
if ($mentions_tweets != "" ){
|
824 |
+
|
825 |
|
826 |
+
|
827 |
$mentions_node = "var TweetsMentionsContent = [
|
828 |
+
|
829 |
".$mentions_tweets."
|
830 |
+
|
831 |
];
|
832 |
+
|
833 |
oPlugin.CreateNode('New_Id_4','Mentions','',TweetsMentionsContent,'Notice',220,460);";
|
834 |
+
|
835 |
}
|
836 |
+
|
837 |
}
|
838 |
+
|
839 |
}
|
840 |
+
|
841 |
return $mentions_node;
|
842 |
+
|
843 |
}
|
844 |
+
|
845 |
function get_counters_node(){
|
846 |
+
|
847 |
|
848 |
+
|
849 |
global $skyscraper_options;
|
850 |
+
|
851 |
global $title_shared;
|
852 |
+
|
853 |
global $url_shares;
|
854 |
+
|
855 |
$counters_node = "";
|
856 |
|
857 |
+
|
858 |
+
|
859 |
if ((!empty($skyscraper_options["counters"]["check"]))){
|
860 |
+
|
861 |
+
|
862 |
+
$tag_counter = '';
|
863 |
+
|
864 |
+
if (isset($skyscraper_options["blogplay_tags"])){
|
865 |
+
|
866 |
+
if (!empty($skyscraper_options["blogplay_tags"])){
|
867 |
+
|
868 |
+
$tag_counter = '(blogplay.com)';
|
869 |
+
}
|
870 |
+
}
|
871 |
|
872 |
+
|
873 |
$counters_node = " var url = '". addslashes(trim($url_shares))."';
|
874 |
+
|
875 |
var title = '".addslashes(trim($title_shared)) ."'; ";
|
876 |
|
877 |
+
|
878 |
+
|
879 |
|
880 |
|
881 |
+
|
882 |
+
|
883 |
$counters_node .= "
|
884 |
|
885 |
+
|
886 |
+
|
887 |
var counter = '<ul class= \"boxCounters_ul\">';
|
888 |
|
889 |
+
|
890 |
+
|
891 |
|
892 |
|
893 |
+
|
894 |
+
|
895 |
counter += '<li style=\"margin-left:2px\"><fb:like send=\"false\" layout=\"box_count\" show_faces=\"false\" font=\"\"></fb:like></li>';
|
896 |
+
|
897 |
counter +=' <li style=\"margin-left:0px\"><iframe width=\"100%\" scrolling=\"no\" frameborder=\"0\" title=\"+1\" vspace=\"0\" tabindex=\"-1\" style=\"position: static; left: 0pt; top: 0pt; width: 60px; margin: 0px; border-style: none; visibility: visible; height: 60px;\" src=\"https://plusone.google.com/_/+1/fastbutton?url='+url+'&size=tall&count=true&hl=en-US&jsh=m%3B%2F_%2Fapps-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3Dt1NEBxIt2Qs.es_419.%2Fsv%3D1%2Fam%3D!Xq7AzNfn9_-I0e5PyA%2Fd%3D1%2F#id=I1_1328906079806&parent='+url+'&rpctoken=615138222&_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart\" name=\"I1_1328906079806\" marginwidth=\"0\" marginheight=\"0\" id=\"I1_1328906079806\" hspace=\"0\" allowtransparency=\"true\"></iframe></li>';
|
898 |
|
899 |
+
|
900 |
+
|
901 |
|
902 |
|
903 |
+
|
904 |
+
|
905 |
+
counter += '<li style=\"margin-left:-2px\"><iframe scrolling=\"no\" frameborder=\"0\" allowtransparency=\"true\" src=\"https://platform.twitter.com/widgets/tweet_button.html?_version=2&count=vertical&enableNewSizing=false&id=twitter-widget-6&lang=en&original_referer='+url+'&size=m&text='+title+' ".$tag_counter." &url='+url+'\" class=\"twitter-share-button twitter-count-vertical\" style=\"width: 55px; height: 62px;\" title=\"Twitter Tweet Button\"></iframe></li>';
|
906 |
+
|
907 |
counter += '</ul>';";
|
908 |
|
909 |
+
|
910 |
+
|
911 |
}
|
912 |
+
|
913 |
+
|
914 |
$counters_node .= "oPlugin.CreateSimpleNode('New_Id_2','Counters<br/>', counter ,".$skyscraper_options["counters"]["folded"].");
|
915 |
|
916 |
+
|
917 |
+
|
918 |
";
|
919 |
+
|
920 |
return $counters_node;
|
921 |
+
|
922 |
}
|
923 |
+
|
924 |
function get_share_node(){
|
925 |
+
|
926 |
global $skyscraper_options;
|
927 |
|
928 |
+
|
929 |
+
|
930 |
$share_node = "";
|
931 |
|
932 |
+
|
933 |
+
|
934 |
if (!empty($skyscraper_options["share"]["check"])){
|
935 |
+
|
936 |
$share_buttons = share_links();
|
937 |
+
|
938 |
$share_node = "oPlugin.CreateSimpleNode('New_Id_1','Share', '".$share_buttons."',".$skyscraper_options["share"]["folded"].");";
|
939 |
+
|
940 |
}
|
941 |
|
942 |
+
|
943 |
+
|
944 |
|
945 |
|
946 |
+
|
947 |
+
|
948 |
return $share_node;
|
949 |
|
950 |
+
|
951 |
+
|
952 |
}
|
953 |
+
|
954 |
function get_follow_us_node(){
|
955 |
+
|
956 |
$follow_us_node = "";
|
957 |
+
|
958 |
global $skyscraper_options;
|
959 |
+
|
960 |
|
961 |
+
|
962 |
if (isset($skyscraper_options["follow_us"])){
|
963 |
+
|
964 |
$follow_info = empty_accounts();
|
965 |
|
966 |
+
|
967 |
+
|
968 |
if ( $follow_info["active"] > 0 && ($follow_info["empty"] < $follow_info["active"])){
|
969 |
|
970 |
+
|
971 |
+
|
972 |
$follow_buttons = sc_follow_links();
|
973 |
|
974 |
+
|
975 |
+
|
976 |
$follow_us_node = "oPlugin.CreateNode('New_Id_6','Follow', '', '".$follow_buttons["follow_buttons"]."','Plano',40,140)";
|
977 |
|
978 |
+
|
979 |
+
|
980 |
|
981 |
|
982 |
+
|
983 |
+
|
984 |
}
|
985 |
|
986 |
+
|
987 |
+
|
988 |
}
|
989 |
+
|
990 |
return $follow_us_node;
|
991 |
|
992 |
+
|
993 |
+
|
994 |
}
|
995 |
+
|
996 |
function empty_accounts(){
|
997 |
+
|
998 |
$empty = 0;
|
999 |
+
|
1000 |
$active = 0;
|
1001 |
+
|
1002 |
global $skyscraper_options;
|
1003 |
+
|
1004 |
|
1005 |
+
|
1006 |
foreach($skyscraper_options["follow_us"] as $follow_us){
|
1007 |
+
|
1008 |
|
1009 |
+
|
1010 |
if (empty($follow_us["account"])){
|
1011 |
+
|
1012 |
$empty++;
|
1013 |
+
|
1014 |
}
|
1015 |
+
|
1016 |
|
1017 |
+
|
1018 |
if (isset($follow_us["active"])){
|
1019 |
+
|
1020 |
$active++;
|
1021 |
+
|
1022 |
}
|
1023 |
+
|
1024 |
}
|
1025 |
+
|
1026 |
|
1027 |
+
|
1028 |
return array("empty" =>$empty, "active"=>$active);
|
1029 |
+
|
1030 |
}
|
1031 |
+
|
1032 |
function sc_follow_links($banner = 0){
|
1033 |
+
|
1034 |
global $skyscraper_options;
|
1035 |
+
|
1036 |
$follow_buttons = "<ul class=\'boxBanner_ul\'>";
|
1037 |
|
1038 |
+
|
1039 |
+
|
1040 |
$count_follow = 0;
|
1041 |
|
1042 |
+
|
1043 |
+
|
1044 |
|
1045 |
|
1046 |
+
|
1047 |
+
|
1048 |
foreach($skyscraper_options["follow_us"] as $follow_us){
|
1049 |
+
|
1050 |
$follow_us["account"]= trim($follow_us["account"]);
|
1051 |
+
|
1052 |
if (!empty($follow_us["active"]) && !empty($follow_us["account"]) ){
|
1053 |
+
|
1054 |
$follow_us["account"] = str_replace("http://", "", $follow_us["account"]);
|
1055 |
+
|
1056 |
$follow_us["account"] = "http://".$follow_us["account"];
|
1057 |
+
|
1058 |
if ($banner==1){
|
1059 |
|
1060 |
+
|
1061 |
+
|
1062 |
|
1063 |
|
1064 |
+
|
1065 |
+
|
1066 |
$follow_us["logo"] = "48".$follow_us["logo"];
|
1067 |
|
1068 |
+
|
1069 |
+
|
1070 |
}
|
1071 |
+
|
1072 |
$follow_buttons .= "<li><a target=\'_blank\' rel=\'nofollow\' href=\'".$follow_us["account"]."\'><img src=\'".SOCIABLE_HTTP_PATH."images/toolbar/".$follow_us["logo"]."\' /></a></li>";
|
1073 |
|
1074 |
+
|
1075 |
+
|
1076 |
|
1077 |
|
1078 |
+
|
1079 |
+
|
1080 |
$count_follow++;
|
1081 |
|
1082 |
+
|
1083 |
+
|
1084 |
}
|
1085 |
+
|
1086 |
}
|
1087 |
|
1088 |
+
|
1089 |
+
|
1090 |
|
1091 |
|
1092 |
+
|
1093 |
+
|
1094 |
$follow_buttons .= "</ul>";
|
1095 |
+
|
1096 |
$return = array();
|
1097 |
|
1098 |
+
|
1099 |
+
|
1100 |
$return["count"] = $count_follow;
|
1101 |
|
1102 |
+
|
1103 |
+
|
1104 |
$return["follow_buttons"] = $follow_buttons;
|
1105 |
|
1106 |
+
|
1107 |
+
|
1108 |
|
1109 |
|
1110 |
+
|
1111 |
+
|
1112 |
return $return;
|
1113 |
|
1114 |
+
|
1115 |
+
|
1116 |
}
|
1117 |
+
|
1118 |
function share_links(){
|
1119 |
+
|
1120 |
$url = addslashes(get_bloginfo('wpurl'));
|
1121 |
+
|
1122 |
$blogname = addslashes(get_bloginfo('name'));
|
1123 |
+
|
1124 |
global $title_shared;
|
1125 |
+
|
1126 |
global $url_shares;
|
1127 |
+
|
1128 |
+
global $skyscraper_options;
|
1129 |
+
|
1130 |
|
1131 |
|
1132 |
+
|
1133 |
$page = trim(addslashes($url_shares));
|
1134 |
+
|
1135 |
$permalink = trim(addslashes($url_shares));
|
1136 |
+
|
1137 |
$title = trim(addslashes($title_shared));
|
1138 |
+
|
1139 |
+
|
1140 |
+
$tag_share = '';
|
1141 |
|
1142 |
+
if (isset($skyscraper_options["blogplay_tags"])){
|
1143 |
+
|
1144 |
+
if (!empty($skyscraper_options["blogplay_tags"])){
|
1145 |
+
|
1146 |
+
$tag_share = '{blogplay.com}';
|
1147 |
+
}
|
1148 |
+
}
|
1149 |
+
|
1150 |
+
|
1151 |
$share_links = array();
|
1152 |
+
|
1153 |
$share_links = array(
|
1154 |
|
1155 |
+
|
1156 |
+
|
1157 |
"twitter" => array('favicon' => 't.png',
|
1158 |
+
|
1159 |
+
'url' => 'http://twitter.com/intent/tweet?text='.urlencode($title).' - '.urlencode($url).' '.urlencode($tag_share).' ',
|
1160 |
+
|
1161 |
'title' => "Share on Twitter",
|
1162 |
|
1163 |
+
|
1164 |
+
|
1165 |
'blank' => '_blank' ),
|
1166 |
+
|
1167 |
|
1168 |
+
|
1169 |
"facebook" => array('favicon' => 'f.png',
|
1170 |
+
|
1171 |
'url' => 'http://www.facebook.com/share.php?u='.$permalink.'&t='.$title.'',
|
1172 |
+
|
1173 |
'title' => "Share on Facebook",
|
1174 |
|
1175 |
+
|
1176 |
+
|
1177 |
'blank' => '_blank' ),
|
1178 |
+
|
1179 |
|
1180 |
+
|
1181 |
"google" => array('favicon' => 'g.png',
|
1182 |
+
|
1183 |
'url' => 'https://mail.google.com/mail/?view=cm&fs=1&to&su='.$title.'&body='.$permalink.'&ui=2&tf=1&shva=1',
|
1184 |
+
|
1185 |
'title' => "Share on Gmail",
|
1186 |
|
1187 |
+
|
1188 |
+
|
1189 |
'blank' => '_blank' ),
|
1190 |
+
|
1191 |
|
1192 |
+
|
1193 |
"inbound" => array('favicon' => 'inbound.png',
|
1194 |
+
|
1195 |
'url' => 'http://inbound.org/?url='.$permalink.'&title='.$title.'',
|
1196 |
+
|
1197 |
'title' => "Share on inbound.org",
|
1198 |
|
1199 |
+
|
1200 |
+
|
1201 |
'blank' => '_blank' ),
|
1202 |
+
|
1203 |
|
1204 |
+
|
1205 |
"stumble" => array('favicon' => 's.png',
|
1206 |
+
|
1207 |
'url' => 'http://www.stumbleupon.com/submit?url='.$permalink.'&title='.$title.'',
|
1208 |
+
|
1209 |
'title' => "Share on StumpleUpon",
|
1210 |
|
1211 |
+
|
1212 |
+
|
1213 |
'blank' => '_blank' ),
|
1214 |
+
|
1215 |
|
1216 |
+
|
1217 |
"delicious" => array('favicon' => 'o.png',
|
1218 |
+
|
1219 |
'url' => 'http://delicious.com/post?url='.$permalink.'&title='.$title.'&notes=EXCERPT',
|
1220 |
+
|
1221 |
"title" => "Share on delicious",
|
1222 |
|
1223 |
+
|
1224 |
+
|
1225 |
'blank' => '_blank' ),
|
1226 |
+
|
1227 |
|
1228 |
+
|
1229 |
"reader" => array('favicon' => 'n.png',
|
1230 |
+
|
1231 |
'url' => 'http://www.google.com/reader/link?url='.$permalink.'&title='.$title.'&srcURL='.$permalink.'&srcTitle='.$blogname.'',
|
1232 |
+
|
1233 |
"title" => "Share on Google Reader",
|
1234 |
|
1235 |
+
|
1236 |
+
|
1237 |
'blank' => '_blank' ),
|
1238 |
+
|
1239 |
|
1240 |
+
|
1241 |
"linkedin" => array('favicon' => 'i.png',
|
1242 |
+
|
1243 |
'url' => 'http://www.linkedin.com/shareArticle?mini=true&url='.$permalink.'&title='.$title.'&source='.$blogname.'&summary=EXCERPT',
|
1244 |
+
|
1245 |
"title" => "Share on LinkedIn",
|
1246 |
|
1247 |
+
|
1248 |
+
|
1249 |
'blank' => '_blank' ),
|
1250 |
|
1251 |
+
|
1252 |
+
|
1253 |
|
1254 |
|
1255 |
+
|
1256 |
+
|
1257 |
"pinterest" => array('favicon' => 'pinterest.png',
|
1258 |
+
|
1259 |
'url' => 'http://pinterest.com/pin/create/button/?url='.$permalink.'',
|
1260 |
+
|
1261 |
"title" => "Share on Pinterest",
|
1262 |
|
1263 |
+
|
1264 |
+
|
1265 |
'blank' => '_blank' ),
|
1266 |
|
1267 |
+
|
1268 |
+
|
1269 |
|
1270 |
|
1271 |
+
|
1272 |
+
|
1273 |
"favorites" => array('favicon' => 'fv.png',
|
1274 |
|
1275 |
+
|
1276 |
+
|
1277 |
'url' => 'javascript:AddToFavorites();',
|
1278 |
|
1279 |
+
|
1280 |
+
|
1281 |
'title' => "Add to favorites - doesn\"t work in Chrome",
|
1282 |
|
1283 |
+
|
1284 |
+
|
1285 |
'blank' => '_self' )
|
1286 |
|
1287 |
+
|
1288 |
+
|
1289 |
|
1290 |
|
1291 |
+
|
1292 |
+
|
1293 |
);
|
1294 |
+
|
1295 |
|
1296 |
+
|
1297 |
$share_buttons = "";
|
1298 |
+
|
1299 |
foreach($share_links as $link){
|
1300 |
|
1301 |
+
|
1302 |
+
|
1303 |
|
1304 |
|
1305 |
+
|
1306 |
+
|
1307 |
|
1308 |
|
1309 |
+
|
1310 |
+
|
1311 |
$share_buttons .= "<a target=\'".$link["blank"]."\' rel=\'nofollow\' href=\'".addslashes($link["url"])."\' title=\'".addslashes($link["title"])."\'><img src=\'".SOCIABLE_HTTP_PATH."images/toolbar/".addslashes($link["favicon"])."\' /></a>";
|
1312 |
+
|
1313 |
}
|
1314 |
+
|
1315 |
return $share_buttons;
|
1316 |
|
1317 |
+
|
1318 |
+
|
1319 |
}
|
1320 |
+
|
1321 |
/*
|
1322 |
+
|
1323 |
* Template Tag To Echo The Sociable 2 HTML
|
1324 |
+
|
1325 |
*/
|
1326 |
+
|
1327 |
function do_skyscraper(){
|
1328 |
+
|
1329 |
echo skyscraper_html();
|
1330 |
+
|
1331 |
}
|
1332 |
+
|
1333 |
/*
|
1334 |
+
|
1335 |
* Sociable 2 Shortcode
|
1336 |
+
|
1337 |
*/
|
1338 |
+
|
1339 |
function skyscraper_shortcode(){
|
1340 |
+
|
1341 |
return skyscraper_html();
|
1342 |
+
|
1343 |
}
|
1344 |
+
|
1345 |
function auto_skyscraper($content, $admin = false){
|
1346 |
+
|
1347 |
global $skyscraper_options;
|
1348 |
|
1349 |
+
|
1350 |
+
|
1351 |
if ($admin){
|
1352 |
+
|
1353 |
$content = skyscraper_html();
|
1354 |
+
|
1355 |
return $content;
|
1356 |
+
|
1357 |
}
|
1358 |
+
|
1359 |
|
1360 |
+
|
1361 |
if( ! isset( $skyscraper_options['active'] )){
|
1362 |
+
|
1363 |
$content = "";
|
1364 |
+
|
1365 |
return $content;
|
1366 |
+
|
1367 |
}
|
1368 |
|
1369 |
+
|
1370 |
+
|
1371 |
|
1372 |
+
|
1373 |
if( ! isset( $skyscraper_options['locations'] ) || ! is_array( $skyscraper_options['locations'] ) || empty( $skyscraper_options['locations'] ) ){
|
1374 |
+
|
1375 |
|
1376 |
+
|
1377 |
$content = "";
|
1378 |
+
|
1379 |
} else {
|
1380 |
+
|
1381 |
|
1382 |
+
|
1383 |
$locations = $skyscraper_options['locations'];
|
1384 |
+
|
1385 |
}
|
1386 |
+
|
1387 |
/*
|
1388 |
+
|
1389 |
* Determine if we are supposed to be displaying the output here.
|
1390 |
+
|
1391 |
*/
|
1392 |
+
|
1393 |
$display = false;
|
1394 |
+
|
1395 |
|
1396 |
+
|
1397 |
/*
|
1398 |
+
|
1399 |
* is_single is a unique case it still returning true
|
1400 |
+
|
1401 |
*/
|
1402 |
+
|
1403 |
|
1404 |
+
|
1405 |
//If We Can Verify That We are in the correct loaction, simply add something to the $display array, and test for a true result to continue.
|
1406 |
+
|
1407 |
foreach( $locations as $location => $val ){
|
1408 |
+
|
1409 |
|
1410 |
+
|
1411 |
//First We Handle is_single() so it returning true on Single Post Type Pages is not an issue, this is not the intended functionality of this plugin
|
1412 |
+
|
1413 |
if( $location == 'is_single' ){
|
1414 |
+
|
1415 |
//If we are not in a post, lets ignore this one for now
|
1416 |
+
|
1417 |
if( is_single() && get_post_type() == 'post' ){
|
1418 |
+
|
1419 |
$display = true;
|
1420 |
+
|
1421 |
break;
|
1422 |
+
|
1423 |
} else {
|
1424 |
+
|
1425 |
continue; // So not to trigger is_single later in this loop, but still be allowed to handle others
|
1426 |
+
|
1427 |
}
|
1428 |
+
|
1429 |
|
1430 |
+
|
1431 |
} elseif( strpos( $location , 'is_single_posttype_' ) === 0 ){ //Now We Need To Check For The Variable Names, Taxonomy Archives, Post Type Archives and Single Custom Post Types.
|
1432 |
+
|
1433 |
|
1434 |
+
|
1435 |
//Single Custom Post Type
|
1436 |
+
|
1437 |
$post_type = str_replace( 'is_single_posttype_' , '' , $location );
|
1438 |
+
|
1439 |
if( is_single() && get_post_type() == $post_type ){
|
1440 |
+
|
1441 |
$display = true;
|
1442 |
+
|
1443 |
break;
|
1444 |
+
|
1445 |
}
|
1446 |
+
|
1447 |
|
1448 |
+
|
1449 |
} elseif( strpos( $location , 'is_posttype_archive_' ) === 0 ){
|
1450 |
+
|
1451 |
|
1452 |
+
|
1453 |
//Custom Post Type Archive
|
1454 |
+
|
1455 |
$post_type = str_replace( 'is_posttype_archive_' , '' , $location );
|
1456 |
+
|
1457 |
if( is_post_type_archive( $post_type ) ){
|
1458 |
+
|
1459 |
$display = true;
|
1460 |
+
|
1461 |
break;
|
1462 |
+
|
1463 |
}
|
1464 |
+
|
1465 |
|
1466 |
+
|
1467 |
} elseif( strpos( $location , 'is_taxonomy_archive_' ) === 0 ) {
|
1468 |
+
|
1469 |
|
1470 |
+
|
1471 |
//Taxonomy Archive
|
1472 |
+
|
1473 |
$taxonomy = str_replace( 'is_taxonomy_archive_' , '' , $location );
|
1474 |
+
|
1475 |
if( is_tax( $taxonomy ) ){
|
1476 |
+
|
1477 |
$display = true;
|
1478 |
+
|
1479 |
break;
|
1480 |
+
|
1481 |
}
|
1482 |
+
|
1483 |
|
1484 |
+
|
1485 |
} elseif( function_exists( $location ) ) {
|
1486 |
+
|
1487 |
|
1488 |
+
|
1489 |
//Standard conditional tag, these will return BOOL
|
1490 |
+
|
1491 |
if( call_user_func( $location ) === true ){
|
1492 |
+
|
1493 |
$display = true;
|
1494 |
+
|
1495 |
break;
|
1496 |
+
|
1497 |
}
|
1498 |
+
|
1499 |
|
1500 |
+
|
1501 |
} else {
|
1502 |
+
|
1503 |
continue;
|
1504 |
+
|
1505 |
}
|
1506 |
+
|
1507 |
|
1508 |
+
|
1509 |
|
1510 |
+
|
1511 |
}
|
1512 |
+
|
1513 |
|
1514 |
+
|
1515 |
//If We have passed all the checks and are looking in the right place lets do this thang
|
1516 |
+
|
1517 |
if( isset( $skyscraper_options['automatic_mode'] ) && $display === true ){
|
1518 |
+
|
1519 |
if (isset($skyscraper_options["topandbottom"])){
|
1520 |
+
|
1521 |
$content = skyscraper_html();
|
1522 |
+
|
1523 |
}else{
|
1524 |
+
|
1525 |
$content = skyscraper_html();
|
1526 |
+
|
1527 |
}
|
1528 |
+
|
1529 |
}
|
1530 |
+
|
1531 |
else{
|
1532 |
+
|
1533 |
$content = skyscraper_html();
|
1534 |
+
|
1535 |
}
|
1536 |
+
|
1537 |
|
1538 |
+
|
1539 |
|
1540 |
+
|
1541 |
|
1542 |
+
|
1543 |
return $content;
|
1544 |
+
|
1545 |
}
|
1546 |
+
|
1547 |
function get_tweets_username($username_complete){
|
1548 |
+
|
1549 |
|
1550 |
+
|
1551 |
if (function_exists('curl_init')) {
|
1552 |
+
|
1553 |
|
1554 |
+
|
1555 |
// last tweets
|
1556 |
+
|
1557 |
$username = str_replace("@", "", $username_complete);
|
1558 |
+
|
1559 |
$url = "https://api.twitter.com/1/statuses/user_timeline/".$username.".json";
|
1560 |
+
|
1561 |
$latest = curl_call($url);
|
1562 |
+
|
1563 |
$latest_row = parser_twitter_results($latest,0);
|
1564 |
+
|
1565 |
update_option( "skyscraper_latest", $latest_row );
|
1566 |
+
|
1567 |
|
1568 |
+
|
1569 |
// last mentions
|
1570 |
+
|
1571 |
$url = "http://search.twitter.com/search.json?q=@".$username."&rpp=5&include_entities=true&result_type=mixed";
|
1572 |
+
|
1573 |
$mentions = curl_call($url);
|
1574 |
+
|
1575 |
|
1576 |
+
|
1577 |
if (count($mentions["results"]) > 1){
|
1578 |
+
|
1579 |
|
1580 |
+
|
1581 |
$mentions_row = parser_twitter_results($mentions["results"],1);
|
1582 |
+
|
1583 |
update_option( "skyscraper_mentions", $mentions_row );
|
1584 |
+
|
1585 |
}
|
1586 |
+
|
1587 |
}
|
1588 |
+
|
1589 |
}
|
1590 |
+
|
1591 |
function ago($time){
|
1592 |
+
|
1593 |
$periods = array("second", "minute", "hour", "day", "week", "month", "year", "decade");
|
1594 |
+
|
1595 |
$lengths = array("60","60","24","7","4.35","12","10");
|
1596 |
+
|
1597 |
$now = time();
|
1598 |
+
|
1599 |
$difference = $now - $time;
|
1600 |
+
|
1601 |
$tense = "ago";
|
1602 |
+
|
1603 |
for($j = 0; $difference >= $lengths[$j] && $j < count($lengths)-1; $j++) {
|
1604 |
+
|
1605 |
$difference /= $lengths[$j];
|
1606 |
+
|
1607 |
}
|
1608 |
+
|
1609 |
$difference = round($difference);
|
1610 |
+
|
1611 |
if($difference != 1) {
|
1612 |
+
|
1613 |
$periods[$j].= "s";
|
1614 |
+
|
1615 |
}
|
1616 |
+
|
1617 |
return $difference." ".$periods[$j]."ago";
|
1618 |
+
|
1619 |
}
|
1620 |
+
|
1621 |
function parser_twitter_results($results = array(), $mention){
|
1622 |
+
|
1623 |
|
1624 |
+
|
1625 |
$options_latest = array();
|
1626 |
+
|
1627 |
$options_latest = array("date" => date("YmdHis"));
|
1628 |
+
|
1629 |
global $skyscraper_options;
|
1630 |
+
|
1631 |
$i = 0;
|
1632 |
+
|
1633 |
|
1634 |
+
|
1635 |
if (is_array($results)){
|
1636 |
+
|
1637 |
|
1638 |
+
|
1639 |
foreach($results as $tweet){
|
1640 |
+
|
1641 |
|
1642 |
+
|
1643 |
$options_latest[$i] = array();
|
1644 |
+
|
1645 |
$options_latest[$i]["text"] = $tweet["text"];
|
1646 |
+
|
1647 |
$options_latest[$i]["created_at"] = ago(strtotime($tweet["created_at"]));
|
1648 |
+
|
1649 |
|
1650 |
+
|
1651 |
if ($mention){
|
1652 |
+
|
1653 |
$options_latest[$i]["name"] = $tweet["from_user_name"];
|
1654 |
+
|
1655 |
}
|
1656 |
+
|
1657 |
else{
|
1658 |
+
|
1659 |
$options_latest[$i]["name"] = $tweet["user"]["name"];
|
1660 |
+
|
1661 |
}
|
1662 |
+
|
1663 |
|
1664 |
+
|
1665 |
$i++;
|
1666 |
+
|
1667 |
if ($i == $skyscraper_options["num_tweets"]){
|
1668 |
+
|
1669 |
break;
|
1670 |
+
|
1671 |
}
|
1672 |
+
|
1673 |
}
|
1674 |
+
|
1675 |
}
|
1676 |
+
|
1677 |
|
1678 |
+
|
1679 |
return $options_latest;
|
1680 |
+
|
1681 |
}
|
1682 |
+
|
1683 |
function curl_call($url){
|
1684 |
+
|
1685 |
|
1686 |
+
|
1687 |
$ch = curl_init();
|
1688 |
+
|
1689 |
curl_setopt($ch, CURLOPT_URL, $url);
|
1690 |
+
|
1691 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
1692 |
+
|
1693 |
curl_setopt($ch, CURLOPT_TIMEOUT, 3);
|
1694 |
+
|
1695 |
curl_setopt($ch, CURLINFO_HEADER_OUT, true);
|
1696 |
+
|
1697 |
$output = curl_exec($ch);
|
1698 |
+
|
1699 |
$info = curl_getinfo($ch);
|
1700 |
+
|
1701 |
curl_close($ch);
|
1702 |
+
|
1703 |
|
1704 |
+
|
1705 |
if ($info["http_code"] == "200"){
|
1706 |
+
|
1707 |
|
1708 |
+
|
1709 |
$return = json_decode($output,1);
|
1710 |
+
|
1711 |
}
|
1712 |
+
|
1713 |
else{
|
1714 |
+
|
1715 |
$return = false;
|
1716 |
+
|
1717 |
}
|
1718 |
+
|
1719 |
|
1720 |
+
|
1721 |
return $return;
|
1722 |
+
|
1723 |
}
|
1724 |
+
|
1725 |
function get_option_tweets($option){
|
1726 |
+
|
1727 |
|
1728 |
+
|
1729 |
global $skyscraper_options;
|
1730 |
+
|
1731 |
$skyscraper_latest = get_option($option);
|
1732 |
+
|
1733 |
|
1734 |
+
|
1735 |
if (empty($skyscraper_latest)){
|
1736 |
+
|
1737 |
|
1738 |
+
|
1739 |
get_tweets_username($skyscraper_options["twitter_username"]);
|
1740 |
+
|
1741 |
$skyscraper_latest = get_option($option);
|
1742 |
+
|
1743 |
}
|
1744 |
+
|
1745 |
else{
|
1746 |
+
|
1747 |
|
1748 |
+
|
1749 |
// 5 minutes
|
1750 |
+
|
1751 |
if (diff_date($skyscraper_latest["date"], date("YmdHis")) > 5){
|
1752 |
+
|
1753 |
|
1754 |
+
|
1755 |
get_tweets_username($skyscraper_options["twitter_username"]);
|
1756 |
+
|
1757 |
$skyscraper_latest = get_option($option);
|
1758 |
+
|
1759 |
}
|
1760 |
+
|
1761 |
}
|
1762 |
+
|
1763 |
|
1764 |
+
|
1765 |
|
1766 |
+
|
1767 |
return generate_tweets_box_content($skyscraper_latest);
|
1768 |
+
|
1769 |
}
|
1770 |
+
|
1771 |
function generate_tweets_box_content($tweets){
|
1772 |
+
|
1773 |
$content = "";
|
1774 |
+
|
1775 |
if (isset($tweets["date"])){
|
1776 |
+
|
1777 |
unset($tweets["date"]);
|
1778 |
+
|
1779 |
}
|
1780 |
+
|
1781 |
|
1782 |
+
|
1783 |
|
1784 |
+
|
1785 |
foreach($tweets as $tweet){
|
1786 |
+
|
1787 |
|
1788 |
+
|
1789 |
$tweet["name"] = addslashes($tweet["name"]);
|
1790 |
+
|
1791 |
$tweet["text"] = addslashes($tweet["text"]);
|
1792 |
+
|
1793 |
|
1794 |
+
|
1795 |
$content .= "['".$tweet["name"]."','".$tweet["name"]."','".$tweet["text"]."','','".$tweet["created_at"]."'],";
|
1796 |
+
|
1797 |
}
|
1798 |
+
|
1799 |
$content = trim(trim(trim($content), ","));
|
1800 |
+
|
1801 |
|
1802 |
+
|
1803 |
return $content;
|
1804 |
+
|
1805 |
}
|
1806 |
+
|
1807 |
if (!empty($_GET["sky"])){
|
1808 |
+
|
1809 |
add_action('wp_ajax_my_action', 'my_action_callback');
|
1810 |
+
|
1811 |
function my_action_callback() {
|
1812 |
+
|
1813 |
global $wpdb; global $skyscraper_options; // this is how you get access to the database
|
1814 |
+
|
1815 |
$whatever = intval( $_POST['whatever'] );
|
1816 |
+
|
1817 |
$whatever += 10;
|
1818 |
+
|
1819 |
echo $whatever;
|
1820 |
+
|
1821 |
die(); // this is required to return a proper result
|
1822 |
+
|
1823 |
}
|
1824 |
+
|
1825 |
}
|
1826 |
+
|
1827 |
?>
|
includes/sociable_output.php
CHANGED
@@ -1,338 +1,698 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
/*
|
4 |
|
|
|
|
|
5 |
* The Output And Shortcode Functions For sociable
|
6 |
|
|
|
|
|
7 |
*/
|
|
|
8 |
/*
|
|
|
9 |
* Returns The Sociable Output For The Global $post Object Do Not
|
|
|
10 |
*/
|
|
|
11 |
function sociable_html( $display = array(),$location = "" ){
|
|
|
12 |
global $sociable_options, $wp_query, $post;
|
|
|
13 |
//ra( $sociable_options );
|
14 |
|
|
|
|
|
15 |
$sociable_known_sites = get_option( 'sociable_known_sites' );
|
|
|
16 |
if( ! $post ){
|
|
|
17 |
$post = get_post( $post_id = 1 );
|
|
|
18 |
}
|
|
|
19 |
if ( get_post_meta($post->ID,'_sociableoff',true)) {
|
20 |
|
|
|
|
|
21 |
return "";
|
|
|
22 |
}
|
|
|
23 |
$active_sites = $sociable_options['active_sites'];
|
|
|
24 |
// Get The Image Path
|
|
|
25 |
//$imagepath = _get_sociable_image_path();
|
|
|
26 |
// if no sites are specified, display all active
|
|
|
27 |
// have to check $active_sites has content because WP
|
|
|
28 |
// won't save an empty array as an option
|
|
|
29 |
if ( empty($display) && isset( $active_sites ) )
|
|
|
30 |
$display = $active_sites;
|
|
|
31 |
// if no sites are active, display nothing
|
|
|
32 |
if ( empty($display) )
|
|
|
33 |
return "";
|
|
|
34 |
// Load the post's and blog's data
|
|
|
35 |
$blogname = urlencode(get_bloginfo('name')." ".get_bloginfo('description'));
|
|
|
36 |
$blogrss = get_bloginfo('rss2_url');
|
|
|
37 |
// Grab the excerpt, if there is no excerpt, create one
|
|
|
38 |
$excerpt = urlencode(strip_tags(strip_shortcodes($post->post_excerpt)));
|
|
|
39 |
if ($excerpt == "") {
|
|
|
40 |
$excerpt = urlencode(substr(strip_tags(strip_shortcodes($post->post_content)),0,250));
|
|
|
41 |
}
|
|
|
42 |
// Clean the excerpt for use with links
|
|
|
43 |
$excerpt = str_replace('+','%20',$excerpt);
|
|
|
44 |
$permalink = urlencode(get_permalink($post->ID));
|
|
|
45 |
$permalinkCOUNT = get_permalink($post->ID);
|
|
|
46 |
$title = str_replace('+','%20',urlencode($post->post_title));
|
|
|
47 |
$titleCOUNT = $post->post_title;
|
|
|
48 |
$rss = urlencode(get_bloginfo('ref_url'));
|
|
|
49 |
// Start preparing the output
|
50 |
|
|
|
|
|
51 |
$html = '<!-- Start Sociable --><div class="sociable">';
|
|
|
52 |
// If a tagline is set, display it above the links list
|
|
|
53 |
$tagline = isset( $sociable_options['tagline'] ) ? $sociable_options['tagline'] : '' ;
|
|
|
54 |
if ($tagline != '') {
|
|
|
55 |
$html .= '<div class="sociable_tagline">';
|
56 |
|
|
|
|
|
57 |
if (isset( $sociable_options['help_grow'] )) {
|
58 |
-
|
59 |
-
if ($sociable_options['
|
60 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
}else{
|
|
|
62 |
$html .= $tagline;
|
63 |
|
|
|
|
|
64 |
}
|
|
|
65 |
$html .= "</div>";
|
|
|
66 |
}
|
|
|
67 |
/**
|
68 |
|
|
|
|
|
69 |
* Start the list of links
|
|
|
70 |
*/
|
|
|
71 |
$html .= "<ul class='clearfix'>";
|
|
|
72 |
$i = 0;
|
73 |
|
|
|
|
|
74 |
$totalsites = count($display);
|
|
|
75 |
$margin = "0px";
|
|
|
76 |
switch ($sociable_options['icon_size']){
|
77 |
|
|
|
|
|
78 |
case "16": $margin = "padding-top: 0;margin-top:-2px";
|
|
|
79 |
break;
|
|
|
80 |
case "32": $margin = "margin-top:9px";
|
|
|
81 |
break;
|
|
|
82 |
case "48": $margin = "margin-top:24px";
|
|
|
83 |
break;
|
|
|
84 |
case "64": $margin = "margin-top:38px";
|
|
|
85 |
break;
|
|
|
86 |
}
|
|
|
87 |
|
|
|
88 |
// print_r($display);
|
89 |
|
|
|
|
|
90 |
if (isset($display["More"])){
|
|
|
91 |
unset($display["More"]);
|
|
|
92 |
array_push($display,"More");
|
|
|
93 |
$display["More"] = "On";
|
|
|
94 |
}
|
|
|
95 |
//print_r($display);
|
|
|
96 |
foreach($display as $sitename => $val ) {
|
|
|
97 |
if ( ! array_key_exists($sitename, $active_sites) || isset($sociable_known_sites[$sitename]["counter"]))
|
|
|
98 |
continue;
|
|
|
99 |
$site = $sociable_known_sites[$sitename];
|
|
|
100 |
$url = ( isset( $site['script'] ) ) ? $site['script'] : $site['url'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
$url = str_replace('TITLECOUNT', $titleCOUNT, $url);
|
|
|
102 |
$url = str_replace('TITLE', $title, $url);
|
|
|
103 |
$url = str_replace('RSS', $rss, $url);
|
|
|
104 |
$url = str_replace('BLOGNAME', $blogname, $url);
|
|
|
105 |
$url = str_replace('EXCERPT', $excerpt, $url);
|
|
|
106 |
$url = str_replace('FEEDLINK', $blogrss, $url);
|
|
|
107 |
$url = str_replace('PERMALINKCOUNT', $permalinkCOUNT, $url);
|
|
|
108 |
$url = str_replace('PERMALINK', $permalink, $url);
|
|
|
109 |
if (isset($site['description']) && $site['description'] != "") {
|
|
|
110 |
$description = $site['description'];
|
|
|
111 |
} else {
|
|
|
112 |
$description = $sitename;
|
|
|
113 |
}
|
|
|
114 |
$link = '<li>';
|
|
|
115 |
if (!empty($sociable_options["custom_icons"])){
|
|
|
116 |
$linkitem = ( ! isset( $sociable_options['use_images'] ) ) ? $description : _get_sociable_image( $site, $description );
|
|
|
117 |
}else{
|
|
|
118 |
if ($description != "More"){
|
|
|
119 |
$linkitem = ( ! isset( $sociable_options['use_images'] ) ) ? $description : _get_sociable_image( $site, $description );
|
|
|
120 |
}else{
|
|
|
121 |
$linkitem = ( ! isset( $sociable_options['use_images'] ) ) ? $description : "<img style='".$margin."' src='".SOCIABLE_HTTP_PATH."images/more.png'>";
|
|
|
122 |
}
|
|
|
123 |
}
|
|
|
124 |
$posX = $site["spriteCoordinates"][$sociable_options['icon_size']]["0"];
|
|
|
125 |
$posY = $site["spriteCoordinates"][$sociable_options['icon_size']]["1"];
|
|
|
126 |
$backgroundFile = $sociable_options['icon_option']."_".$sociable_options['icon_size'].".png";
|
|
|
127 |
$style = "background-position:".$posX." ".$posY;
|
|
|
128 |
$href = $url;
|
|
|
129 |
$target = isset( $sociable_options['new_window'] ) ? 'target="_blank"' : '' ;
|
|
|
130 |
if ($sitename == "Add to favorites" || $sitename=="More"){
|
|
|
131 |
if ($sitename == "More"){
|
|
|
132 |
$link .= '<a style="cursor:pointer" rel="nofollow" onMouseOut="fixOnMouseOut(document.getElementById(\'sociable-post'.$location.'-'.$post->ID.'\'), event, \'post'.$location.'-'.$post->ID.'\')" onMouseOver="more(this,\'post'.$location.'-' . $post->ID . '\')">' . $linkitem . '</a></li>' ;
|
|
|
133 |
}else{
|
|
|
134 |
$link .= '<a class="'.$sociable_options['icon_option'].'_'.$sociable_options['icon_size'].'" style="cursor:pointer;'.$style.'" rel="nofollow" title="'.$sitename.' - doesn\'t work in Chrome" onClick="' . $href . '">' ."" . '</a></li>' ;
|
|
|
135 |
}
|
|
|
136 |
}else{
|
|
|
137 |
if($sociable_options["icon_option"] == "option6" || !empty($sociable_options["custom_icons"])){
|
|
|
138 |
$link .= '<a title="'.$sitename.'" style="'.$description.$sociable_options['icon_size'].'_'.str_replace("option","",$sociable_options['icon_option']).'" rel="nofollow" ' . $target . ' href="' . $href . '">' . $linkitem . '</a></li>' ;
|
|
|
139 |
}else{
|
|
|
140 |
if (count(split("Counter",$sitename))>1){
|
|
|
141 |
$link.= $href;
|
|
|
142 |
}else{
|
|
|
143 |
$link .= '<a title="'.$sitename.'" class="'.$sociable_options['icon_option'].'_'.$sociable_options['icon_size'].'" style="'.$style.'" rel="nofollow" ' . $target . ' href="' . $href . '">' . "" . '</a></li>' ;
|
|
|
144 |
}
|
|
|
145 |
}
|
|
|
146 |
}
|
|
|
147 |
$html .= apply_filters( 'sociable_link' , $link );
|
|
|
148 |
$i++;
|
149 |
|
|
|
|
|
150 |
}
|
|
|
151 |
//return $html;
|
|
|
152 |
//if ($sociable_options['icon_option'] !="option6"){
|
|
|
153 |
$inner = "<ul>";
|
|
|
154 |
foreach ($sociable_known_sites as $sitename => $val){
|
|
|
155 |
if (array_key_exists($sitename, $display) || isset($sociable_known_sites[$sitename]["counter"]) )
|
|
|
156 |
continue;
|
|
|
157 |
$site = $sociable_known_sites[$sitename];
|
|
|
158 |
$url = ( isset( $site['script'] ) ) ? $site['script'] : $site['url'];
|
|
|
159 |
$url = str_replace('TITLECOUNT', $titleCOUNT, $url);
|
|
|
160 |
$url = str_replace('TITLE', $title, $url);
|
|
|
161 |
$url = str_replace('RSS', $rss, $url);
|
|
|
162 |
$url = str_replace('BLOGNAME', $blogname, $url);
|
|
|
163 |
$url = str_replace('EXCERPT', $excerpt, $url);
|
|
|
164 |
$url = str_replace('FEEDLINK', $blogrss, $url);
|
|
|
165 |
$url = str_replace('PERMALINKCOUNT', $permalinkCOUNT, $url);
|
|
|
166 |
$url = str_replace('PERMALINK', $permalink, $url);
|
|
|
167 |
$link = '<li style="heigth:'.$sociable_options['icon_size'].'px;width:'.$sociable_options['icon_size'].'px">';
|
|
|
168 |
if (!empty($sociable_options["custom_icons"])){
|
|
|
169 |
$linkitem = ( ! isset( $sociable_options['use_images'] ) ) ? $description : _get_sociable_image( $site, $description );
|
|
|
170 |
}else{
|
|
|
171 |
if (isset($description) && $description!= "More"){
|
|
|
172 |
$linkitem = ( ! isset( $sociable_options['use_images'] ) ) ? $description : _get_sociable_image( $site, $description );
|
|
|
173 |
}else{
|
|
|
174 |
$linkitem = ( ! isset( $sociable_options['use_images'] ) ) ? $description : "<img style='".$margin."' src='".SOCIABLE_HTTP_PATH."images/more.png'>";
|
|
|
175 |
}
|
|
|
176 |
}
|
|
|
177 |
$posX = $site["spriteCoordinates"][$sociable_options['icon_size']]["0"];
|
|
|
178 |
$posY = $site["spriteCoordinates"][$sociable_options['icon_size']]["1"];
|
|
|
179 |
$backgroundFile = $sociable_options['icon_option']."_".$sociable_options['icon_size'].".png";
|
|
|
180 |
$style = "background-position:".$posX." ".$posY;
|
|
|
181 |
$href = $url;
|
|
|
182 |
$target = isset( $sociable_options['new_window'] ) ? 'target="_blank"' : '' ;
|
|
|
183 |
if ($sitename == "Add to favorites" || $sitename=="More"){
|
|
|
184 |
if ($sitename == "More"){
|
|
|
185 |
$link .= '<a style="cursor:poainter" rel="nofollow" onMouseOver="more(this,\'post'.$location.'-' . $post->ID . '\')">' . $linkitem . '</a></li>' ;
|
|
|
186 |
}else{
|
|
|
187 |
$link .= '<a class="'.$sociable_options['icon_option'].'_'.$sociable_options['icon_size'].'" style="cursor:pointer;'.$style.'" rel="nofollow" title="'.$sitename.' - doesn\'t work in Chrome" onClick="' . $href . '">' ."" . '</a></li>' ;
|
|
|
188 |
}
|
|
|
189 |
}else{
|
|
|
190 |
if($sociable_options["icon_option"] == "option6" || !empty($sociable_options["custom_icons"])){
|
|
|
191 |
$link .= '<a title="'.$sitename.'" style="'.$description.$sociable_options['icon_size'].'_'.str_replace("option","",$sociable_options['icon_option']).'" rel="nofollow" ' . $target . ' href="' . $href . '">' . $linkitem . '</a></li>' ;
|
|
|
192 |
}else{
|
|
|
193 |
$link .= '<a title="'.$sitename.'" class="'.$sociable_options['icon_option'].'_'.$sociable_options['icon_size'].'" style="'.$style.'" rel="nofollow" ' . $target . ' href="' . $href . '">' . "" . '</a></li>' ;
|
|
|
194 |
}
|
|
|
195 |
}
|
|
|
196 |
$inner .= apply_filters( 'sociable_link' , $link );
|
|
|
197 |
$i++;
|
|
|
198 |
}
|
|
|
199 |
$inner .="</ul>";
|
|
|
200 |
$html .='</ul><div onMouseout="fixOnMouseOut(this,event,\'post'.$location.'-'.$post->ID.'\')" id="sociable-post'.$location.'-'.$post->ID.'" style="display:none;">
|
|
|
201 |
<div style="top: auto; left: auto; display: block;" id="sociable">
|
202 |
|
|
|
|
|
203 |
<div class="popup">
|
|
|
204 |
<div class="content">
|
|
|
205 |
'.$inner.'
|
|
|
206 |
</div>
|
|
|
207 |
<a style="cursor:pointer" onclick="hide_sociable(\'post'.$location.'-'.$post->ID.'\',true)" class="close">
|
|
|
208 |
<img onclick="hide_sociable(\'post'.$location.'-'.$post->ID.'\',true)" title="close" src="'.SOCIABLE_HTTP_PATH . 'images/closelabel.png">
|
|
|
209 |
</a>
|
|
|
210 |
</div>
|
|
|
211 |
</div>
|
|
|
212 |
</div>HereGoCounters</div><!-- End Sociable -->';
|
|
|
213 |
//$margin =
|
|
|
214 |
//$html .= "<li class='sociablelast' style='".$margin."'><img src='".SOCIABLE_HTTP_PATH."images/more.jpg'></li></ul><div class='soc_clear'></div></div>";
|
|
|
215 |
//}
|
|
|
216 |
//return "";
|
|
|
217 |
$counters ="";
|
|
|
218 |
/*if ($location == "bottom" && (is_single() || is_admin())){ */
|
|
|
219 |
$counters = "</div><div class='sociable' style='float:none'><ul class='clearfix'>";
|
|
|
220 |
foreach ($display as $sitename => $val){
|
|
|
221 |
//echo $sitename."<br>";
|
|
|
222 |
if (!array_key_exists($sitename, $display) || !isset($sociable_known_sites[$sitename]["counter"]) )
|
|
|
223 |
continue;
|
|
|
224 |
//echo $sitename."<br>";
|
|
|
225 |
$link = '<li id="'.str_replace("+","p",str_replace(" ","_",$sitename)).'">';
|
|
|
226 |
$site = $sociable_known_sites[$sitename];
|
|
|
227 |
$url = ( isset( $site['script'] ) ) ? $site['script'] : $site['url'];
|
|
|
228 |
$url = str_replace('TITLECOUNT', $titleCOUNT, $url);
|
|
|
229 |
$url = str_replace('TITLE', $title, $url);
|
|
|
230 |
$url = str_replace('RSS', $rss, $url);
|
|
|
231 |
$url = str_replace('BLOGNAME', $blogname, $url);
|
|
|
232 |
$url = str_replace('EXCERPT', $excerpt, $url);
|
|
|
233 |
$url = str_replace('FEEDLINK', $blogrss, $url);
|
|
|
234 |
$url = str_replace('PERMALINKCOUNT', $permalinkCOUNT, $url);
|
|
|
235 |
$url = str_replace('PERMALINK', $permalink, $url);
|
|
|
236 |
$link.= $url."</li>";
|
|
|
237 |
$counters .= apply_filters( 'sociable_link' , $link );
|
|
|
238 |
}
|
|
|
239 |
$counters .="</ul>";
|
|
|
240 |
$html = str_replace("HereGoCounters",$counters,$html);
|
|
|
241 |
/*}else{
|
|
|
242 |
$html = str_replace("HereGoCounters",$counters,$html);
|
|
|
243 |
}*/
|
|
|
244 |
return $html;
|
|
|
245 |
}
|
|
|
246 |
/*
|
|
|
247 |
* Template Tag To Echo The Sociable 2 HTML
|
|
|
248 |
*/
|
|
|
249 |
function do_sociable(){
|
|
|
250 |
echo sociable_html();
|
|
|
251 |
}
|
|
|
252 |
/*
|
|
|
253 |
* Hook For the_content to automatically output the sociable HTML If The Option To Disable Has Not Been Unchecked
|
|
|
254 |
*/
|
|
|
255 |
function auto_sociable( $content ){
|
|
|
256 |
global $sociable_options;
|
|
|
257 |
if (!isset($sociable_options["active"])){
|
|
|
258 |
return $content;
|
|
|
259 |
}
|
|
|
260 |
if( ! isset( $sociable_options['locations'] ) || ! is_array( $sociable_options['locations'] ) || empty( $sociable_options['locations'] ) ){
|
|
|
261 |
return $content;
|
|
|
262 |
} else {
|
|
|
263 |
$locations = $sociable_options['locations'];
|
|
|
264 |
}
|
|
|
265 |
/*
|
|
|
266 |
* Determine if we are supposed to be displaying the output here.
|
|
|
267 |
*/
|
|
|
268 |
$display = false;
|
269 |
|
|
|
|
|
270 |
/*
|
|
|
271 |
* is_single is a unique case it still returning true
|
|
|
272 |
*/
|
|
|
273 |
//If We Can Verify That We are in the correct loaction, simply add something to the $display array, and test for a true result to continue.
|
|
|
274 |
foreach( $locations as $location => $val ){
|
|
|
275 |
//First We Handle is_single() so it returning true on Single Post Type Pages is not an issue, this is not the intended functionality of this plugin
|
|
|
276 |
if( $location == 'is_single' ){
|
|
|
277 |
//If we are not in a post, lets ignore this one for now
|
|
|
278 |
if( is_single() && get_post_type() == 'post' ){
|
|
|
279 |
$display = true;
|
|
|
280 |
break;
|
|
|
281 |
} else {
|
|
|
282 |
continue; // So not to trigger is_single later in this loop, but still be allowed to handle others
|
|
|
283 |
}
|
|
|
284 |
} elseif( strpos( $location , 'is_single_posttype_' ) === 0 ){ //Now We Need To Check For The Variable Names, Taxonomy Archives, Post Type Archives and Single Custom Post Types.
|
|
|
285 |
//Single Custom Post Type
|
|
|
286 |
$post_type = str_replace( 'is_single_posttype_' , '' , $location );
|
|
|
287 |
if( is_single() && get_post_type() == $post_type ){
|
|
|
288 |
$display = true;
|
|
|
289 |
break;
|
|
|
290 |
}
|
|
|
291 |
} elseif( strpos( $location , 'is_posttype_archive_' ) === 0 ){
|
|
|
292 |
//Custom Post Type Archive
|
|
|
293 |
$post_type = str_replace( 'is_posttype_archive_' , '' , $location );
|
|
|
294 |
if( is_post_type_archive( $post_type ) ){
|
|
|
295 |
$display = true;
|
|
|
296 |
break;
|
|
|
297 |
}
|
|
|
298 |
} elseif( strpos( $location , 'is_taxonomy_archive_' ) === 0 ) {
|
|
|
299 |
//Taxonomy Archive
|
|
|
300 |
$taxonomy = str_replace( 'is_taxonomy_archive_' , '' , $location );
|
|
|
301 |
if( is_tax( $taxonomy ) ){
|
|
|
302 |
$display = true;
|
|
|
303 |
break;
|
|
|
304 |
}
|
|
|
305 |
} elseif( function_exists( $location ) ) {
|
|
|
306 |
//Standard conditional tag, these will return BOOL
|
|
|
307 |
if( call_user_func( $location ) === true ){
|
|
|
308 |
$display = true;
|
|
|
309 |
break;
|
|
|
310 |
}
|
311 |
|
|
|
|
|
312 |
} else {
|
|
|
313 |
continue;
|
|
|
314 |
}
|
|
|
315 |
}
|
|
|
316 |
//If We have passed all the checks and are looking in the right place lets do this thang
|
|
|
317 |
if( isset( $sociable_options['automatic_mode'] ) && $display === true ){
|
|
|
318 |
if (isset($sociable_options["topandbottom"])){
|
|
|
319 |
$content = sociable_html(array(),"top").$content . sociable_html(array(),"bottom");
|
|
|
320 |
}else{
|
|
|
321 |
$content = "".$content . sociable_html(array());
|
|
|
322 |
}
|
|
|
323 |
}
|
324 |
|
|
|
|
|
325 |
return $content;
|
|
|
326 |
}
|
|
|
327 |
/*
|
|
|
328 |
* Sociable 2 Shortcode
|
|
|
329 |
*/
|
|
|
330 |
function sociable_shortcode(){
|
|
|
331 |
return sociable_html();
|
332 |
|
|
|
|
|
333 |
}
|
|
|
334 |
function add_googleplus() {
|
|
|
335 |
//echo'<script type="text/javascript" src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>';
|
|
|
336 |
}
|
|
|
337 |
//add_action('wp_head', 'add_googleplus' );
|
|
|
338 |
?>
|
1 |
<?php
|
2 |
|
3 |
+
|
4 |
+
|
5 |
/*
|
6 |
|
7 |
+
|
8 |
+
|
9 |
* The Output And Shortcode Functions For sociable
|
10 |
|
11 |
+
|
12 |
+
|
13 |
*/
|
14 |
+
|
15 |
/*
|
16 |
+
|
17 |
* Returns The Sociable Output For The Global $post Object Do Not
|
18 |
+
|
19 |
*/
|
20 |
+
|
21 |
function sociable_html( $display = array(),$location = "" ){
|
22 |
+
|
23 |
global $sociable_options, $wp_query, $post;
|
24 |
+
|
25 |
//ra( $sociable_options );
|
26 |
|
27 |
+
|
28 |
+
|
29 |
$sociable_known_sites = get_option( 'sociable_known_sites' );
|
30 |
+
|
31 |
if( ! $post ){
|
32 |
+
|
33 |
$post = get_post( $post_id = 1 );
|
34 |
+
|
35 |
}
|
36 |
+
|
37 |
if ( get_post_meta($post->ID,'_sociableoff',true)) {
|
38 |
|
39 |
+
|
40 |
+
|
41 |
return "";
|
42 |
+
|
43 |
}
|
44 |
+
|
45 |
$active_sites = $sociable_options['active_sites'];
|
46 |
+
|
47 |
// Get The Image Path
|
48 |
+
|
49 |
//$imagepath = _get_sociable_image_path();
|
50 |
+
|
51 |
// if no sites are specified, display all active
|
52 |
+
|
53 |
// have to check $active_sites has content because WP
|
54 |
+
|
55 |
// won't save an empty array as an option
|
56 |
+
|
57 |
if ( empty($display) && isset( $active_sites ) )
|
58 |
+
|
59 |
$display = $active_sites;
|
60 |
+
|
61 |
// if no sites are active, display nothing
|
62 |
+
|
63 |
if ( empty($display) )
|
64 |
+
|
65 |
return "";
|
66 |
+
|
67 |
// Load the post's and blog's data
|
68 |
+
|
69 |
$blogname = urlencode(get_bloginfo('name')." ".get_bloginfo('description'));
|
70 |
+
|
71 |
$blogrss = get_bloginfo('rss2_url');
|
72 |
+
|
73 |
// Grab the excerpt, if there is no excerpt, create one
|
74 |
+
|
75 |
$excerpt = urlencode(strip_tags(strip_shortcodes($post->post_excerpt)));
|
76 |
+
|
77 |
if ($excerpt == "") {
|
78 |
+
|
79 |
$excerpt = urlencode(substr(strip_tags(strip_shortcodes($post->post_content)),0,250));
|
80 |
+
|
81 |
}
|
82 |
+
|
83 |
// Clean the excerpt for use with links
|
84 |
+
|
85 |
$excerpt = str_replace('+','%20',$excerpt);
|
86 |
+
|
87 |
$permalink = urlencode(get_permalink($post->ID));
|
88 |
+
|
89 |
$permalinkCOUNT = get_permalink($post->ID);
|
90 |
+
|
91 |
$title = str_replace('+','%20',urlencode($post->post_title));
|
92 |
+
|
93 |
$titleCOUNT = $post->post_title;
|
94 |
+
|
95 |
$rss = urlencode(get_bloginfo('ref_url'));
|
96 |
+
|
97 |
// Start preparing the output
|
98 |
|
99 |
+
|
100 |
+
|
101 |
$html = '<!-- Start Sociable --><div class="sociable">';
|
102 |
+
|
103 |
// If a tagline is set, display it above the links list
|
104 |
+
|
105 |
$tagline = isset( $sociable_options['tagline'] ) ? $sociable_options['tagline'] : '' ;
|
106 |
+
|
107 |
if ($tagline != '') {
|
108 |
+
|
109 |
$html .= '<div class="sociable_tagline">';
|
110 |
|
111 |
+
|
112 |
+
|
113 |
if (isset( $sociable_options['help_grow'] )) {
|
114 |
+
|
115 |
+
if (!empty($sociable_options['help_grow'])){
|
116 |
+
$addSize = "";
|
117 |
+
|
118 |
+
if ($sociable_options['icon_size'] ==16) $addSize = "font-size:11px;";
|
119 |
+
|
120 |
+
$html .= "<a class='sociable_tagline' target='_blank' href='http://blogplay.com' style='".$addSize."color:#333333;text-decoration:none'>".$tagline."</a>";
|
121 |
+
}
|
122 |
+
else{
|
123 |
+
$html .= $tagline;
|
124 |
+
}
|
125 |
}else{
|
126 |
+
|
127 |
$html .= $tagline;
|
128 |
|
129 |
+
|
130 |
+
|
131 |
}
|
132 |
+
|
133 |
$html .= "</div>";
|
134 |
+
|
135 |
}
|
136 |
+
|
137 |
/**
|
138 |
|
139 |
+
|
140 |
+
|
141 |
* Start the list of links
|
142 |
+
|
143 |
*/
|
144 |
+
|
145 |
$html .= "<ul class='clearfix'>";
|
146 |
+
|
147 |
$i = 0;
|
148 |
|
149 |
+
|
150 |
+
|
151 |
$totalsites = count($display);
|
152 |
+
|
153 |
$margin = "0px";
|
154 |
+
|
155 |
switch ($sociable_options['icon_size']){
|
156 |
|
157 |
+
|
158 |
+
|
159 |
case "16": $margin = "padding-top: 0;margin-top:-2px";
|
160 |
+
|
161 |
break;
|
162 |
+
|
163 |
case "32": $margin = "margin-top:9px";
|
164 |
+
|
165 |
break;
|
166 |
+
|
167 |
case "48": $margin = "margin-top:24px";
|
168 |
+
|
169 |
break;
|
170 |
+
|
171 |
case "64": $margin = "margin-top:38px";
|
172 |
+
|
173 |
break;
|
174 |
+
|
175 |
}
|
176 |
+
|
177 |
|
178 |
+
|
179 |
// print_r($display);
|
180 |
|
181 |
+
|
182 |
+
|
183 |
if (isset($display["More"])){
|
184 |
+
|
185 |
unset($display["More"]);
|
186 |
+
|
187 |
array_push($display,"More");
|
188 |
+
|
189 |
$display["More"] = "On";
|
190 |
+
|
191 |
}
|
192 |
+
|
193 |
//print_r($display);
|
194 |
+
|
195 |
foreach($display as $sitename => $val ) {
|
196 |
+
|
197 |
if ( ! array_key_exists($sitename, $active_sites) || isset($sociable_known_sites[$sitename]["counter"]))
|
198 |
+
|
199 |
continue;
|
200 |
+
|
201 |
$site = $sociable_known_sites[$sitename];
|
202 |
+
|
203 |
$url = ( isset( $site['script'] ) ) ? $site['script'] : $site['url'];
|
204 |
+
|
205 |
+
if ($sitename == 'Twitter Counter' || $sitename== 'Twitter'){
|
206 |
+
|
207 |
+
if (isset($sociable_options["linksoptions"])){
|
208 |
+
|
209 |
+
if (!empty($sociable_options["linksoptions"])){
|
210 |
+
|
211 |
+
$url = str_replace('SHARETAG', '*blogplay.com*', $url);
|
212 |
+
}
|
213 |
+
else{
|
214 |
+
|
215 |
+
$url = str_replace('SHARETAG', '', $url);
|
216 |
+
}
|
217 |
+
}
|
218 |
+
else{
|
219 |
+
|
220 |
+
$url = str_replace('SHARETAG', '', $url);
|
221 |
+
}
|
222 |
+
}
|
223 |
+
|
224 |
$url = str_replace('TITLECOUNT', $titleCOUNT, $url);
|
225 |
+
|
226 |
$url = str_replace('TITLE', $title, $url);
|
227 |
+
|
228 |
$url = str_replace('RSS', $rss, $url);
|
229 |
+
|
230 |
$url = str_replace('BLOGNAME', $blogname, $url);
|
231 |
+
|
232 |
$url = str_replace('EXCERPT', $excerpt, $url);
|
233 |
+
|
234 |
$url = str_replace('FEEDLINK', $blogrss, $url);
|
235 |
+
|
236 |
$url = str_replace('PERMALINKCOUNT', $permalinkCOUNT, $url);
|
237 |
+
|
238 |
$url = str_replace('PERMALINK', $permalink, $url);
|
239 |
+
|
240 |
if (isset($site['description']) && $site['description'] != "") {
|
241 |
+
|
242 |
$description = $site['description'];
|
243 |
+
|
244 |
} else {
|
245 |
+
|
246 |
$description = $sitename;
|
247 |
+
|
248 |
}
|
249 |
+
|
250 |
$link = '<li>';
|
251 |
+
|
252 |
if (!empty($sociable_options["custom_icons"])){
|
253 |
+
|
254 |
$linkitem = ( ! isset( $sociable_options['use_images'] ) ) ? $description : _get_sociable_image( $site, $description );
|
255 |
+
|
256 |
}else{
|
257 |
+
|
258 |
if ($description != "More"){
|
259 |
+
|
260 |
$linkitem = ( ! isset( $sociable_options['use_images'] ) ) ? $description : _get_sociable_image( $site, $description );
|
261 |
+
|
262 |
}else{
|
263 |
+
|
264 |
$linkitem = ( ! isset( $sociable_options['use_images'] ) ) ? $description : "<img style='".$margin."' src='".SOCIABLE_HTTP_PATH."images/more.png'>";
|
265 |
+
|
266 |
}
|
267 |
+
|
268 |
}
|
269 |
+
|
270 |
$posX = $site["spriteCoordinates"][$sociable_options['icon_size']]["0"];
|
271 |
+
|
272 |
$posY = $site["spriteCoordinates"][$sociable_options['icon_size']]["1"];
|
273 |
+
|
274 |
$backgroundFile = $sociable_options['icon_option']."_".$sociable_options['icon_size'].".png";
|
275 |
+
|
276 |
$style = "background-position:".$posX." ".$posY;
|
277 |
+
|
278 |
$href = $url;
|
279 |
+
|
280 |
$target = isset( $sociable_options['new_window'] ) ? 'target="_blank"' : '' ;
|
281 |
+
|
282 |
if ($sitename == "Add to favorites" || $sitename=="More"){
|
283 |
+
|
284 |
if ($sitename == "More"){
|
285 |
+
|
286 |
$link .= '<a style="cursor:pointer" rel="nofollow" onMouseOut="fixOnMouseOut(document.getElementById(\'sociable-post'.$location.'-'.$post->ID.'\'), event, \'post'.$location.'-'.$post->ID.'\')" onMouseOver="more(this,\'post'.$location.'-' . $post->ID . '\')">' . $linkitem . '</a></li>' ;
|
287 |
+
|
288 |
}else{
|
289 |
+
|
290 |
$link .= '<a class="'.$sociable_options['icon_option'].'_'.$sociable_options['icon_size'].'" style="cursor:pointer;'.$style.'" rel="nofollow" title="'.$sitename.' - doesn\'t work in Chrome" onClick="' . $href . '">' ."" . '</a></li>' ;
|
291 |
+
|
292 |
}
|
293 |
+
|
294 |
}else{
|
295 |
+
|
296 |
if($sociable_options["icon_option"] == "option6" || !empty($sociable_options["custom_icons"])){
|
297 |
+
|
298 |
$link .= '<a title="'.$sitename.'" style="'.$description.$sociable_options['icon_size'].'_'.str_replace("option","",$sociable_options['icon_option']).'" rel="nofollow" ' . $target . ' href="' . $href . '">' . $linkitem . '</a></li>' ;
|
299 |
+
|
300 |
}else{
|
301 |
+
|
302 |
if (count(split("Counter",$sitename))>1){
|
303 |
+
|
304 |
$link.= $href;
|
305 |
+
|
306 |
}else{
|
307 |
+
|
308 |
$link .= '<a title="'.$sitename.'" class="'.$sociable_options['icon_option'].'_'.$sociable_options['icon_size'].'" style="'.$style.'" rel="nofollow" ' . $target . ' href="' . $href . '">' . "" . '</a></li>' ;
|
309 |
+
|
310 |
}
|
311 |
+
|
312 |
}
|
313 |
+
|
314 |
}
|
315 |
+
|
316 |
$html .= apply_filters( 'sociable_link' , $link );
|
317 |
+
|
318 |
$i++;
|
319 |
|
320 |
+
|
321 |
+
|
322 |
}
|
323 |
+
|
324 |
//return $html;
|
325 |
+
|
326 |
//if ($sociable_options['icon_option'] !="option6"){
|
327 |
+
|
328 |
$inner = "<ul>";
|
329 |
+
|
330 |
foreach ($sociable_known_sites as $sitename => $val){
|
331 |
+
|
332 |
if (array_key_exists($sitename, $display) || isset($sociable_known_sites[$sitename]["counter"]) )
|
333 |
+
|
334 |
continue;
|
335 |
+
|
336 |
$site = $sociable_known_sites[$sitename];
|
337 |
+
|
338 |
$url = ( isset( $site['script'] ) ) ? $site['script'] : $site['url'];
|
339 |
+
|
340 |
$url = str_replace('TITLECOUNT', $titleCOUNT, $url);
|
341 |
+
|
342 |
$url = str_replace('TITLE', $title, $url);
|
343 |
+
|
344 |
$url = str_replace('RSS', $rss, $url);
|
345 |
+
|
346 |
$url = str_replace('BLOGNAME', $blogname, $url);
|
347 |
+
|
348 |
$url = str_replace('EXCERPT', $excerpt, $url);
|
349 |
+
|
350 |
$url = str_replace('FEEDLINK', $blogrss, $url);
|
351 |
+
|
352 |
$url = str_replace('PERMALINKCOUNT', $permalinkCOUNT, $url);
|
353 |
+
|
354 |
$url = str_replace('PERMALINK', $permalink, $url);
|
355 |
+
|
356 |
$link = '<li style="heigth:'.$sociable_options['icon_size'].'px;width:'.$sociable_options['icon_size'].'px">';
|
357 |
+
|
358 |
if (!empty($sociable_options["custom_icons"])){
|
359 |
+
|
360 |
$linkitem = ( ! isset( $sociable_options['use_images'] ) ) ? $description : _get_sociable_image( $site, $description );
|
361 |
+
|
362 |
}else{
|
363 |
+
|
364 |
if (isset($description) && $description!= "More"){
|
365 |
+
|
366 |
$linkitem = ( ! isset( $sociable_options['use_images'] ) ) ? $description : _get_sociable_image( $site, $description );
|
367 |
+
|
368 |
}else{
|
369 |
+
|
370 |
$linkitem = ( ! isset( $sociable_options['use_images'] ) ) ? $description : "<img style='".$margin."' src='".SOCIABLE_HTTP_PATH."images/more.png'>";
|
371 |
+
|
372 |
}
|
373 |
+
|
374 |
}
|
375 |
+
|
376 |
$posX = $site["spriteCoordinates"][$sociable_options['icon_size']]["0"];
|
377 |
+
|
378 |
$posY = $site["spriteCoordinates"][$sociable_options['icon_size']]["1"];
|
379 |
+
|
380 |
$backgroundFile = $sociable_options['icon_option']."_".$sociable_options['icon_size'].".png";
|
381 |
+
|
382 |
$style = "background-position:".$posX." ".$posY;
|
383 |
+
|
384 |
$href = $url;
|
385 |
+
|
386 |
$target = isset( $sociable_options['new_window'] ) ? 'target="_blank"' : '' ;
|
387 |
+
|
388 |
if ($sitename == "Add to favorites" || $sitename=="More"){
|
389 |
+
|
390 |
if ($sitename == "More"){
|
391 |
+
|
392 |
$link .= '<a style="cursor:poainter" rel="nofollow" onMouseOver="more(this,\'post'.$location.'-' . $post->ID . '\')">' . $linkitem . '</a></li>' ;
|
393 |
+
|
394 |
}else{
|
395 |
+
|
396 |
$link .= '<a class="'.$sociable_options['icon_option'].'_'.$sociable_options['icon_size'].'" style="cursor:pointer;'.$style.'" rel="nofollow" title="'.$sitename.' - doesn\'t work in Chrome" onClick="' . $href . '">' ."" . '</a></li>' ;
|
397 |
+
|
398 |
}
|
399 |
+
|
400 |
}else{
|
401 |
+
|
402 |
if($sociable_options["icon_option"] == "option6" || !empty($sociable_options["custom_icons"])){
|
403 |
+
|
404 |
$link .= '<a title="'.$sitename.'" style="'.$description.$sociable_options['icon_size'].'_'.str_replace("option","",$sociable_options['icon_option']).'" rel="nofollow" ' . $target . ' href="' . $href . '">' . $linkitem . '</a></li>' ;
|
405 |
+
|
406 |
}else{
|
407 |
+
|
408 |
$link .= '<a title="'.$sitename.'" class="'.$sociable_options['icon_option'].'_'.$sociable_options['icon_size'].'" style="'.$style.'" rel="nofollow" ' . $target . ' href="' . $href . '">' . "" . '</a></li>' ;
|
409 |
+
|
410 |
}
|
411 |
+
|
412 |
}
|
413 |
+
|
414 |
$inner .= apply_filters( 'sociable_link' , $link );
|
415 |
+
|
416 |
$i++;
|
417 |
+
|
418 |
}
|
419 |
+
|
420 |
$inner .="</ul>";
|
421 |
+
|
422 |
$html .='</ul><div onMouseout="fixOnMouseOut(this,event,\'post'.$location.'-'.$post->ID.'\')" id="sociable-post'.$location.'-'.$post->ID.'" style="display:none;">
|
423 |
+
|
424 |
<div style="top: auto; left: auto; display: block;" id="sociable">
|
425 |
|
426 |
+
|
427 |
+
|
428 |
<div class="popup">
|
429 |
+
|
430 |
<div class="content">
|
431 |
+
|
432 |
'.$inner.'
|
433 |
+
|
434 |
</div>
|
435 |
+
|
436 |
<a style="cursor:pointer" onclick="hide_sociable(\'post'.$location.'-'.$post->ID.'\',true)" class="close">
|
437 |
+
|
438 |
<img onclick="hide_sociable(\'post'.$location.'-'.$post->ID.'\',true)" title="close" src="'.SOCIABLE_HTTP_PATH . 'images/closelabel.png">
|
439 |
+
|
440 |
</a>
|
441 |
+
|
442 |
</div>
|
443 |
+
|
444 |
</div>
|
445 |
+
|
446 |
</div>HereGoCounters</div><!-- End Sociable -->';
|
447 |
+
|
448 |
//$margin =
|
449 |
+
|
450 |
//$html .= "<li class='sociablelast' style='".$margin."'><img src='".SOCIABLE_HTTP_PATH."images/more.jpg'></li></ul><div class='soc_clear'></div></div>";
|
451 |
+
|
452 |
//}
|
453 |
+
|
454 |
//return "";
|
455 |
+
|
456 |
$counters ="";
|
457 |
+
|
458 |
/*if ($location == "bottom" && (is_single() || is_admin())){ */
|
459 |
+
|
460 |
$counters = "</div><div class='sociable' style='float:none'><ul class='clearfix'>";
|
461 |
+
|
462 |
foreach ($display as $sitename => $val){
|
463 |
+
|
464 |
//echo $sitename."<br>";
|
465 |
+
|
466 |
if (!array_key_exists($sitename, $display) || !isset($sociable_known_sites[$sitename]["counter"]) )
|
467 |
+
|
468 |
continue;
|
469 |
+
|
470 |
//echo $sitename."<br>";
|
471 |
+
|
472 |
$link = '<li id="'.str_replace("+","p",str_replace(" ","_",$sitename)).'">';
|
473 |
+
|
474 |
$site = $sociable_known_sites[$sitename];
|
475 |
+
|
476 |
$url = ( isset( $site['script'] ) ) ? $site['script'] : $site['url'];
|
477 |
+
|
478 |
$url = str_replace('TITLECOUNT', $titleCOUNT, $url);
|
479 |
+
|
480 |
$url = str_replace('TITLE', $title, $url);
|
481 |
+
|
482 |
$url = str_replace('RSS', $rss, $url);
|
483 |
+
|
484 |
$url = str_replace('BLOGNAME', $blogname, $url);
|
485 |
+
|
486 |
$url = str_replace('EXCERPT', $excerpt, $url);
|
487 |
+
|
488 |
$url = str_replace('FEEDLINK', $blogrss, $url);
|
489 |
+
|
490 |
$url = str_replace('PERMALINKCOUNT', $permalinkCOUNT, $url);
|
491 |
+
|
492 |
$url = str_replace('PERMALINK', $permalink, $url);
|
493 |
+
|
494 |
$link.= $url."</li>";
|
495 |
+
|
496 |
$counters .= apply_filters( 'sociable_link' , $link );
|
497 |
+
|
498 |
}
|
499 |
+
|
500 |
$counters .="</ul>";
|
501 |
+
|
502 |
$html = str_replace("HereGoCounters",$counters,$html);
|
503 |
+
|
504 |
/*}else{
|
505 |
+
|
506 |
$html = str_replace("HereGoCounters",$counters,$html);
|
507 |
+
|
508 |
}*/
|
509 |
+
|
510 |
return $html;
|
511 |
+
|
512 |
}
|
513 |
+
|
514 |
/*
|
515 |
+
|
516 |
* Template Tag To Echo The Sociable 2 HTML
|
517 |
+
|
518 |
*/
|
519 |
+
|
520 |
function do_sociable(){
|
521 |
+
|
522 |
echo sociable_html();
|
523 |
+
|
524 |
}
|
525 |
+
|
526 |
/*
|
527 |
+
|
528 |
* Hook For the_content to automatically output the sociable HTML If The Option To Disable Has Not Been Unchecked
|
529 |
+
|
530 |
*/
|
531 |
+
|
532 |
function auto_sociable( $content ){
|
533 |
+
|
534 |
global $sociable_options;
|
535 |
+
|
536 |
if (!isset($sociable_options["active"])){
|
537 |
+
|
538 |
return $content;
|
539 |
+
|
540 |
}
|
541 |
+
|
542 |
if( ! isset( $sociable_options['locations'] ) || ! is_array( $sociable_options['locations'] ) || empty( $sociable_options['locations'] ) ){
|
543 |
+
|
544 |
return $content;
|
545 |
+
|
546 |
} else {
|
547 |
+
|
548 |
$locations = $sociable_options['locations'];
|
549 |
+
|
550 |
}
|
551 |
+
|
552 |
/*
|
553 |
+
|
554 |
* Determine if we are supposed to be displaying the output here.
|
555 |
+
|
556 |
*/
|
557 |
+
|
558 |
$display = false;
|
559 |
|
560 |
+
|
561 |
+
|
562 |
/*
|
563 |
+
|
564 |
* is_single is a unique case it still returning true
|
565 |
+
|
566 |
*/
|
567 |
+
|
568 |
//If We Can Verify That We are in the correct loaction, simply add something to the $display array, and test for a true result to continue.
|
569 |
+
|
570 |
foreach( $locations as $location => $val ){
|
571 |
+
|
572 |
//First We Handle is_single() so it returning true on Single Post Type Pages is not an issue, this is not the intended functionality of this plugin
|
573 |
+
|
574 |
if( $location == 'is_single' ){
|
575 |
+
|
576 |
//If we are not in a post, lets ignore this one for now
|
577 |
+
|
578 |
if( is_single() && get_post_type() == 'post' ){
|
579 |
+
|
580 |
$display = true;
|
581 |
+
|
582 |
break;
|
583 |
+
|
584 |
} else {
|
585 |
+
|
586 |
continue; // So not to trigger is_single later in this loop, but still be allowed to handle others
|
587 |
+
|
588 |
}
|
589 |
+
|
590 |
} elseif( strpos( $location , 'is_single_posttype_' ) === 0 ){ //Now We Need To Check For The Variable Names, Taxonomy Archives, Post Type Archives and Single Custom Post Types.
|
591 |
+
|
592 |
//Single Custom Post Type
|
593 |
+
|
594 |
$post_type = str_replace( 'is_single_posttype_' , '' , $location );
|
595 |
+
|
596 |
if( is_single() && get_post_type() == $post_type ){
|
597 |
+
|
598 |
$display = true;
|
599 |
+
|
600 |
break;
|
601 |
+
|
602 |
}
|
603 |
+
|
604 |
} elseif( strpos( $location , 'is_posttype_archive_' ) === 0 ){
|
605 |
+
|
606 |
//Custom Post Type Archive
|
607 |
+
|
608 |
$post_type = str_replace( 'is_posttype_archive_' , '' , $location );
|
609 |
+
|
610 |
if( is_post_type_archive( $post_type ) ){
|
611 |
+
|
612 |
$display = true;
|
613 |
+
|
614 |
break;
|
615 |
+
|
616 |
}
|
617 |
+
|
618 |
} elseif( strpos( $location , 'is_taxonomy_archive_' ) === 0 ) {
|
619 |
+
|
620 |
//Taxonomy Archive
|
621 |
+
|
622 |
$taxonomy = str_replace( 'is_taxonomy_archive_' , '' , $location );
|
623 |
+
|
624 |
if( is_tax( $taxonomy ) ){
|
625 |
+
|
626 |
$display = true;
|
627 |
+
|
628 |
break;
|
629 |
+
|
630 |
}
|
631 |
+
|
632 |
} elseif( function_exists( $location ) ) {
|
633 |
+
|
634 |
//Standard conditional tag, these will return BOOL
|
635 |
+
|
636 |
if( call_user_func( $location ) === true ){
|
637 |
+
|
638 |
$display = true;
|
639 |
+
|
640 |
break;
|
641 |
+
|
642 |
}
|
643 |
|
644 |
+
|
645 |
+
|
646 |
} else {
|
647 |
+
|
648 |
continue;
|
649 |
+
|
650 |
}
|
651 |
+
|
652 |
}
|
653 |
+
|
654 |
//If We have passed all the checks and are looking in the right place lets do this thang
|
655 |
+
|
656 |
if( isset( $sociable_options['automatic_mode'] ) && $display === true ){
|
657 |
+
|
658 |
if (isset($sociable_options["topandbottom"])){
|
659 |
+
|
660 |
$content = sociable_html(array(),"top").$content . sociable_html(array(),"bottom");
|
661 |
+
|
662 |
}else{
|
663 |
+
|
664 |
$content = "".$content . sociable_html(array());
|
665 |
+
|
666 |
}
|
667 |
+
|
668 |
}
|
669 |
|
670 |
+
|
671 |
+
|
672 |
return $content;
|
673 |
+
|
674 |
}
|
675 |
+
|
676 |
/*
|
677 |
+
|
678 |
* Sociable 2 Shortcode
|
679 |
+
|
680 |
*/
|
681 |
+
|
682 |
function sociable_shortcode(){
|
683 |
+
|
684 |
return sociable_html();
|
685 |
|
686 |
+
|
687 |
+
|
688 |
}
|
689 |
+
|
690 |
function add_googleplus() {
|
691 |
+
|
692 |
//echo'<script type="text/javascript" src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>';
|
693 |
+
|
694 |
}
|
695 |
+
|
696 |
//add_action('wp_head', 'add_googleplus' );
|
697 |
+
|
698 |
?>
|
readme.txt
CHANGED
@@ -1,16 +1,10 @@
|
|
1 |
=== Sociable ===
|
2 |
-
|
3 |
Author: sociable
|
4 |
-
|
5 |
Contributors: sociable
|
6 |
-
|
7 |
Tags: sociable, social bookmarking, social bookmarks, social icons, bookmarking, share, sharing, be sociable share, share and enjoy, digg, delicious, twitter, facebook, blinklist, stumbleupon, gmail, posterous, tumblr
|
8 |
-
|
9 |
Requires at least: 2.6
|
10 |
-
|
11 |
Tested up to: 3.3.1
|
12 |
-
|
13 |
-
Stable tag: 4.2.7
|
14 |
|
15 |
Congrats for joining the leader in the sharing space of WordPress plugins. "Sociable" is totally FREE, has over 1,5 million downloads and is experiencing an exponential growth and amazing new features. Your feedback is much apreciated. Enjoy!
|
16 |
|
@@ -18,76 +12,87 @@ Congrats for joining the leader in the sharing space of WordPress plugins. "Soci
|
|
18 |
|
19 |
As you know, Sociable continues being the fastest growing leader in the sharing space of WordPress plugins. We really appreciate your feedback, so, here you are lastest version including Pinterest icon, font changes you suggested and other terrific features you get totally Free.
|
20 |
|
|
|
|
|
21 |
After introducing Sociable Skyscraper, the ultimate advanced and feature-packed plugin for setting up a rating system on your WordPress blog, we've developed Sociable Slider. It is sort of banner that reminds your readers to spread the word. You can select and customize several features, such as text, color, and length in order to ensure your readers and their friends a great Sociable Experience. Sociable Skyscraper allows you to set up pages and comments with a great degree of customization.
|
22 |
|
|
|
|
|
23 |
Sociable Plug-in is totally free and continues leading digital arena with over 1.5 million downloads now. We're working hard making you happy and your feedback and suggestions allow us to keep growing, so, let's enjoy co-creation, collaboration and sharing. Be Sociable. Share!
|
24 |
|
25 |
= About Sociable Skyscraper =
|
26 |
|
27 |
Sociable Skyscraper is the ultimate advanced and feature-packed plugin for setting up a rating system on your WordPress blog. This plugin allows you to set up different rating systems for posts, pages and comments with a great degree of customization.
|
|
|
28 |
Sociable Skyscraper's list of features is smart, extensive and ever-growing:
|
|
|
29 |
You can get even more Sociable with Sociable Skyscraper and: Rating and Review of: posts, pages, comments, Facebook, G+, LinkedIN, and Twitter. Multiple ratings for posts and pages. Latest tweets, latest posts, follows, and mentions. Visitor counter, visitors from Facebook and Twitter. As an added bonus, you also get an easy way to get to the TOP of the page or back HOME from Sociable Skyscraper.
|
30 |
-
|
31 |
And now the over 1.5 million WordPress Blogs with the Sociable Plugin can also use the Inbound.org icon. Inbound.org is a for-fun partnership of Rand from Moz and Dharmesh from HubSpot which offers community-curated marketing news. We like their idea so much and we hope you enjoy discovering and sharing great stuff from the inbound marketing fields of blogging, SEO, Social media, content marketing, conversion rate optimization, web analytics and more.
|
32 |
|
33 |
We're constantly interacting with you via our Forum and/or emails, which means we're enhancing our free tool faster and more accurately thanks to your feedback. Please tell us your comments so we can make it better together.
|
|
|
34 |
= About Sociable Classic =
|
35 |
|
36 |
As you know, we've recently improved our visual interface. The default icons are now much more appealing, and a tad bit larger (you want your readers to share your posts, don't you?)
|
37 |
|
38 |
Enjoy it now!
|
39 |
-
|
|
|
40 |
Be Sociable, Share!
|
41 |
|
|
|
|
|
42 |
[vimeo http://vimeo.com/31023294]
|
|
|
43 |
[vimeo http://vimeo.com/31023684]
|
44 |
|
|
|
|
|
45 |
Have technical support issues? Please leave them in the forum: http://wordpress.org/tags/sociable?forum_id=10
|
46 |
|
47 |
Also use the forum for ideas, feedback, suggestions. We'll try to check the forum every day.
|
|
|
48 |
What happened to the old icons? You can still use them in the new version, but they're not the default style anymore.
|
|
|
49 |
Sociable finds its home outside of the WordPress environment on Blogplay.com-
|
50 |
|
51 |
-
|
|
|
|
|
|
|
52 |
= Recent Updates =
|
53 |
|
|
|
54 |
* Add Private Options
|
55 |
-
|
56 |
* Add Pinterest share icon
|
57 |
-
|
58 |
* Add inbound.org share icon
|
59 |
* Changed the old motto "share and enjoy" for "Be Sociable, Share" much more attractive. Of course you can customize it to whatever you want.
|
60 |
-
|
61 |
* Complete re-write to increase efficiency and speed of the plugin
|
62 |
-
|
63 |
* New Sociable Skyscraper version, the ultimate advanced packed plugin for setting up rating system on your WordPress blog. Sociable Skyscraper allows you to set up pages and comments with great degree of customization.
|
|
|
64 |
= Recently Added Sites =
|
65 |
|
66 |
-
* Pinterest
|
67 |
|
68 |
-
* Inbound.org
|
69 |
|
|
|
|
|
70 |
* Posterous
|
71 |
-
|
72 |
* Sphinn
|
73 |
-
|
74 |
* Tumblr
|
75 |
-
|
76 |
* G+
|
77 |
-
|
78 |
* LinkedIN
|
79 |
-
|
80 |
* Inbound
|
81 |
|
|
|
|
|
82 |
= Recently Deleted Sites =
|
83 |
|
84 |
* Mixx.com, recently acquired, doesn't support share functions anymore
|
85 |
-
|
86 |
* Netvibes stopped sharing
|
87 |
-
|
88 |
* Slashdot: New bookmark creation is no longer supported
|
89 |
-
|
90 |
* And we deleted a bunch of others that were really not used that much
|
|
|
91 |
= Special Thanks =
|
92 |
|
93 |
Sociable plugin wouldn't be what it is today if it weren't for these people that helped us along the way:
|
@@ -95,8 +100,10 @@ Sociable plugin wouldn't be what it is today if it weren't for these people that
|
|
95 |
* Thanks to [WPzoom](http://http://www.wpzoom.com/wpzoom/500-free-icons-wpzoom-social-networking-icon-set/) for letting us to use their awesome icons
|
96 |
|
97 |
* Also special thanks to [Webtreats etc](http://http://webtreats.mysitemyway.com/) for allowing us to use their great icons
|
|
|
98 |
== Screenshots ==
|
99 |
|
|
|
100 |
1. The Sociable backend, easily select sites and drag & drop to change the order of appearance.
|
101 |
|
102 |
2. Sociable with its new default styling.
|
@@ -106,494 +113,980 @@ Sociable plugin wouldn't be what it is today if it weren't for these people that
|
|
106 |
4. Or you can pick your own style
|
107 |
|
108 |
5. Select which plugin want to customize
|
|
|
109 |
== Installation ==
|
110 |
|
|
|
111 |
1. Upload the extracted archive to `wp-content/plugins/`
|
112 |
|
|
|
113 |
2. Activate the plugin through the 'Plugins' menu
|
114 |
|
|
|
115 |
3. Open the plugin settings page Settings -> Sociable
|
116 |
|
|
|
|
|
117 |
4. Adjust settings to your liking
|
118 |
|
|
|
|
|
119 |
4. Enjoy!
|
120 |
|
|
|
|
|
121 |
== Frequently Asked Questions ==
|
122 |
|
|
|
|
|
123 |
= What happened to the old icons? =
|
124 |
|
|
|
|
|
125 |
You can still use them. It's just they're not the default anymore.
|
|
|
126 |
= I want to reach you, but not for a technical question =
|
127 |
|
|
|
|
|
128 |
Please send us an email to sociableblogplay [ at ] gmail.com
|
|
|
129 |
== Changelog ==
|
130 |
|
|
|
|
|
|
|
|
|
131 |
= 4.2.7 =
|
132 |
|
133 |
* Some fixes
|
134 |
|
135 |
= 4.2.6 =
|
136 |
|
|
|
|
|
137 |
* Save issue
|
138 |
|
|
|
|
|
139 |
= 4.2.5 =
|
140 |
|
|
|
|
|
141 |
* Privacy options
|
142 |
|
|
|
|
|
143 |
= 4.2.4 =
|
144 |
|
|
|
|
|
145 |
* Privacy options
|
146 |
|
|
|
|
|
147 |
= 4.2.3 =
|
|
|
148 |
* Pinterest
|
|
|
149 |
* Tags
|
|
|
150 |
= 4.2.2 =
|
|
|
151 |
* Social Banner and settings
|
|
|
152 |
* Inbound icon
|
|
|
153 |
* FIXED: Some Fixes
|
|
|
154 |
= 4.2.1 =
|
155 |
|
|
|
|
|
156 |
* FIXED: Some Fixes
|
157 |
|
|
|
|
|
158 |
= 4.2.0 =
|
159 |
|
|
|
|
|
160 |
* FIXED: Some Fixes
|
161 |
|
|
|
|
|
162 |
= 4.1.9 =
|
163 |
|
|
|
|
|
164 |
* FIXED: Some Fixes
|
165 |
|
|
|
|
|
166 |
= 4.1.8 =
|
167 |
|
|
|
|
|
168 |
* FIXED: Some Fixes
|
169 |
|
|
|
|
|
170 |
= 4.1.7 =
|
171 |
|
|
|
|
|
172 |
* FIXED: Some Fixes
|
173 |
|
|
|
|
|
174 |
= 4.1.6 =
|
175 |
|
|
|
|
|
176 |
* FIXED: Some Fixes
|
|
|
177 |
= 4.1.5 =
|
178 |
|
|
|
|
|
179 |
* FIXED: Some Fixes
|
|
|
180 |
= 4.1.4 =
|
181 |
|
|
|
|
|
182 |
* FIXED: Some Fixes
|
|
|
183 |
= 4.1.3 =
|
184 |
|
|
|
|
|
185 |
* FIXED: Some Fixes
|
|
|
186 |
= 4.1.2 =
|
187 |
|
|
|
|
|
188 |
* FIXED: Google plus problem
|
|
|
189 |
= 4.1.1 =
|
190 |
|
|
|
|
|
191 |
* ADDED: Facebook Like Counter, Twitter Counter, Google Plus Counter, Linkedin Counter,StumbleUpon Counter and Digg Counter
|
192 |
|
|
|
|
|
193 |
* ADDED: Add Sociable at Top and Bottom of the post
|
|
|
194 |
= 4.0.6 =
|
195 |
|
|
|
|
|
196 |
* FIXED: Allow Sub Directory Blogs (http://domain.com/blog)
|
|
|
197 |
= 4.0.5 =
|
198 |
|
|
|
|
|
199 |
* FIXED: Other Upgrade issues
|
|
|
200 |
= 4.0.4 =
|
201 |
|
|
|
|
|
202 |
* FIXED: Upgrade issues
|
203 |
|
|
|
|
|
204 |
= 4.0.3 =
|
205 |
|
|
|
|
|
206 |
* Fix IIS 6.0 and PHP 5.3.x
|
|
|
207 |
= 4.0.1 =
|
208 |
|
|
|
|
|
209 |
* Changed the old motto "share and enjoy" for "Be Sociable, Share" much more attractive. Of cours you can customize it to whatever you want.
|
210 |
|
|
|
|
|
211 |
* Complete re-write to increase efficiency and speed of the plugin
|
212 |
|
|
|
|
|
213 |
* Updated it for up to Wordpress version 3.2.1
|
|
|
214 |
= 3.5.2 =
|
215 |
|
|
|
|
|
216 |
* Added new services MOB, ??, ????, QQ??, LaTafanera, SheToldMe, viadeo FR, Diggita, Design Float
|
217 |
|
|
|
|
|
218 |
* Removed ID properties from sociable anchor tags (share links)
|
219 |
|
|
|
|
|
220 |
* FIXED: Having a custom image directory now disables sprite usage, and the icons of services are displayed on sociable configuration page.
|
|
|
221 |
= 3.5.1 =
|
222 |
|
|
|
|
|
223 |
* Fixed the xhtml validation issues
|
224 |
|
|
|
|
|
225 |
* 'target=blank' (open link in new window) issue solved
|
226 |
|
|
|
|
|
227 |
* Sprites can now be disabled, allowing for custom icons
|
228 |
|
|
|
|
|
229 |
* Sprites have been disabled for RSS
|
230 |
|
|
|
|
|
231 |
* You can now deactivate the blogplay widget from your wordpress dashboard
|
|
|
232 |
= 3.5.0 =
|
233 |
|
|
|
|
|
234 |
* The icons now load in a CSS Sprites, allowing for faster download times.
|
235 |
|
|
|
|
|
236 |
* These services have been discontinued: BlogMeme FR, BlogMeme SP, co.mments, DesignFloat.com, PPNow.net, Symbaloo.com.
|
237 |
|
|
|
|
|
238 |
* You can now add links to your browser favorites.
|
239 |
|
|
|
|
|
240 |
* iFrames added for services that support them.
|
241 |
|
|
|
|
|
242 |
* You can know unselect the transparency effect on the sociable icons.
|
|
|
243 |
= 3.4.4 =
|
244 |
|
|
|
|
|
245 |
* Another fix for the sociableoff dilemma's, no backwards compatibility unfortunately, so disable sociable again on pages where you want to disable it.
|
|
|
246 |
= 3.4.3 =
|
247 |
|
|
|
|
|
248 |
* Fixed the bug mentioned [here](http://wordpress.org/support/topic/288487) and [here](http://wordpress.org/support/topic/290753) that made it impossible to disable Sociable on a per post/page basis (for real, now).
|
|
|
249 |
= 3.4.2 =
|
250 |
|
|
|
|
|
251 |
* Added a site specific id to each links anchor tag.
|
252 |
|
|
|
|
|
253 |
* Fixed the bug mentioned [here](http://wordpress.org/support/topic/288487) and [here](http://wordpress.org/support/topic/290753) that made it impossible to disable Sociable on a per post/page basis.
|
254 |
|
|
|
|
|
255 |
* "Reintroduced" TwitThis as Twitter.
|
|
|
256 |
= 3.4.1 =
|
257 |
|
|
|
|
|
258 |
* Fixed the Sphinn submit link.
|
|
|
259 |
= 3.4 =
|
260 |
|
|
|
|
|
261 |
* Added the option to add a site to Sociable through a filter, read [How to add a site to Sociable](http://yoast.com/add-sites-to-sociable/).
|
|
|
262 |
= 3.3.8 =
|
263 |
|
|
|
|
|
264 |
* Fixed the option to disable Sociable on a per post / page basis.
|
|
|
265 |
= 3.3.7 =
|
266 |
|
|
|
|
|
267 |
* More bugfixery.
|
|
|
268 |
= 3.3.6 =
|
269 |
|
|
|
|
|
270 |
* Reverted plugin URL fix because of too many people on old WordPress installations complaining. (Upgrade, people, upgrade!)
|
271 |
|
|
|
|
|
272 |
* Added PHPDoc throughout the plugins code.
|
|
|
273 |
= 3.3.5 =
|
274 |
|
|
|
|
|
275 |
* Added a Hyves button.
|
276 |
|
|
|
|
|
277 |
* Fixed MSN Reporter button.
|
|
|
278 |
= 3.3.4 =
|
279 |
|
|
|
|
|
280 |
* Fixed RSS.
|
|
|
281 |
= 3.3.3 =
|
282 |
|
|
|
|
|
283 |
* Brought back Tumblr
|
284 |
|
|
|
|
|
285 |
* Updated PDF link
|
286 |
|
|
|
|
|
287 |
* Added Posterous
|
288 |
|
|
|
|
|
289 |
* Smushed all images using [Smush.it](http://smush.it/), reducing the total image file size with 31.72 KB (42.03%)!
|
290 |
|
|
|
|
|
291 |
* Removed pre - 2.6 compatibility code
|
|
|
292 |
= 3.3.1 =
|
293 |
|
|
|
|
|
294 |
* Added new option to use pure text links, instead of image links.
|
295 |
|
|
|
|
|
296 |
* Fixed small issue with using target=blank links and the new awe.sm options.
|
297 |
|
|
|
|
|
298 |
* Allowed for usage without an awe.sm API key, as awe.sm falls back to "default" awe.sm shortlinks.
|
299 |
|
|
|
|
|
300 |
* Code cleanup for more efficiency in the backend on saving options.
|
301 |
|
|
|
|
|
302 |
* General code cleanup.
|
303 |
|
|
|
|
|
304 |
* Moved to the new default Changelog markup.
|
|
|
305 |
= 3.3 =
|
306 |
|
|
|
|
|
307 |
* Added awe.sm integration and some sites.
|
|
|
308 |
= 3.2.3 =
|
309 |
|
|
|
|
|
310 |
* Removed the last bit of non jQuery javascript.
|
311 |
|
|
|
|
|
312 |
* Improved styling and visual feedback when selecting a site.
|
|
|
313 |
= 3.2.2 =
|
314 |
|
|
|
|
|
315 |
* Moved style loading to admin_print_styles and scripts to admin_print_scripts.
|
|
|
316 |
= 3.2.1 =
|
317 |
|
|
|
|
|
318 |
* Fixed a bug with printing styles in 2.8 beta.
|
|
|
319 |
= 3.2 =
|
320 |
|
|
|
|
|
321 |
This is a MAJOR update to Sociable. Major Thanks to Jean-Paul of [iPhoneclub](http://www.iphoneclub.nl/) for all his work in looking up all the sites. The full list of changes:
|
|
|
322 |
* Restored sociable-admin.js, as it got accidentally removed.
|
323 |
|
324 |
-
|
|
|
|
|
|
|
|
|
325 |
|
326 |
* Added:
|
327 |
|
|
|
|
|
328 |
* An RSS button, which links to your sites RSS feed
|
329 |
|
|
|
|
|
330 |
* Printfriendly.com for both printing and creating a PDF, replacing the original "Print" function, which didn't work from RSS
|
331 |
|
|
|
|
|
332 |
* Current
|
333 |
|
|
|
|
|
334 |
* FriendFeed
|
335 |
|
|
|
|
|
336 |
* MSN Reporter.nl
|
337 |
|
|
|
|
|
338 |
* FS Daily
|
339 |
|
|
|
|
|
340 |
* Hello TXT
|
341 |
|
|
|
|
|
342 |
* Removed the following sites that were no longer working or active:
|
343 |
|
|
|
|
|
344 |
* BlinkBits
|
345 |
|
|
|
|
|
346 |
* Blogmemes.cn, .net, .jp
|
347 |
|
|
|
|
|
348 |
* Blogsvine
|
349 |
|
|
|
|
|
350 |
* Book.mark.hu
|
351 |
|
|
|
|
|
352 |
* Bumpzee
|
353 |
|
|
|
|
|
354 |
* Del.irio.us
|
355 |
|
|
|
|
|
356 |
* Feed Me Links
|
357 |
|
|
|
|
|
358 |
* Furl (replaced by Diigo)
|
359 |
|
|
|
|
|
360 |
* GeenRedactie
|
361 |
|
|
|
|
|
362 |
* Kick.ie
|
363 |
|
|
|
|
|
364 |
* Leonaut
|
365 |
|
|
|
|
|
366 |
* Magnolia
|
367 |
|
|
|
|
|
368 |
* Plug IM
|
369 |
|
|
|
|
|
370 |
* Pownce
|
371 |
|
|
|
|
|
372 |
* Salesmarks
|
373 |
|
|
|
|
|
374 |
* Scuttle
|
375 |
|
|
|
|
|
376 |
* Shadows
|
377 |
|
|
|
|
|
378 |
* Smarking
|
379 |
|
|
|
|
|
380 |
* Spurl
|
381 |
|
|
|
|
|
382 |
* Taggly
|
383 |
|
|
|
|
|
384 |
* Tailrank
|
385 |
|
|
|
|
|
386 |
* Tumblr (due to the change to a POST API, which we, unfortunately, can't support with Sociable)
|
387 |
|
|
|
|
|
388 |
* Updated the following sites to include the excerpt when submitting:
|
389 |
|
|
|
|
|
390 |
* Connotea
|
391 |
|
|
|
|
|
392 |
* Delicious
|
393 |
|
|
|
|
|
394 |
* Digg
|
395 |
|
|
|
|
|
396 |
* Ekudos
|
397 |
|
|
|
|
|
398 |
* Google Bookmarks
|
399 |
|
|
|
|
|
400 |
* NuJij
|
401 |
|
|
|
|
|
402 |
* Ping.fm
|
403 |
|
|
|
|
|
404 |
* Otherwise updated:
|
405 |
|
|
|
|
|
406 |
* Google Bookmarks (new icon)
|
407 |
|
|
|
|
|
408 |
* Fleck (New URL)
|
409 |
|
|
|
|
|
410 |
* Rec6 (new URL)
|
|
|
411 |
= 3.1.1 =
|
412 |
|
|
|
|
|
413 |
* Fixed bug with stylesheet introduced in 3.1.
|
|
|
414 |
= 3.1 =
|
415 |
|
|
|
|
|
416 |
* Converted all images to PNG.
|
417 |
|
|
|
|
|
418 |
* Cleaned up usage of javascript in the backend and switched to the jquery library that comes with WordPress.
|
419 |
|
|
|
|
|
420 |
* Allowed for usage of an external image directory.
|
421 |
|
|
|
|
|
422 |
* Removed pre 2.6 compatibility fixes.
|
|
|
423 |
= 3.0.6 =
|
424 |
|
|
|
|
|
425 |
* Fixed xhtml bug in Netvibes integration.
|
426 |
|
|
|
|
|
427 |
* Added Bitacoras.
|
|
|
428 |
= 3.0.5 =
|
429 |
|
|
|
|
|
430 |
* Added Identi.ca.
|
431 |
|
|
|
|
|
432 |
* Fixed a bug in Yoast Posts widget.
|
|
|
433 |
= 3.0.4 =
|
434 |
|
|
|
|
|
435 |
* Added Netvibes.
|
|
|
436 |
= 3.0.3 =
|
437 |
|
|
|
|
|
438 |
* Security enhancements, thx to Mark Jaquith.
|
|
|
439 |
= 3.0.2 =
|
440 |
|
|
|
|
|
441 |
* Fixed CSS bug introduced in 3.0.
|
|
|
442 |
= 3.0.1 =
|
443 |
|
|
|
|
|
444 |
* Removed some other, now obsolete, code, reducing the code size by another 4KB.
|
|
|
445 |
= 3.0 =
|
446 |
|
|
|
|
|
447 |
* Fixed IE bug in admin.
|
448 |
|
|
|
|
|
449 |
* Cleaned up Admin Area and changed support messages.
|
450 |
|
|
|
|
|
451 |
* Removed directory checking for all images (speeds up incredibly).
|
452 |
|
|
|
|
|
453 |
* Made display: inline !important to prevent vertical icon display.
|
454 |
|
|
|
|
|
455 |
* Updated Wykop icon.
|
|
|
456 |
= 2.9.15 =
|
457 |
|
|
|
|
|
458 |
* Added a fallback for strip_shortcodes to maintain backwards compatibility with WordPress 2.3 and below.
|
|
|
459 |
= 2.9.14 =
|
460 |
|
|
|
|
|
461 |
* Made sure there are no tags or shortcodes in the excerpt.
|
462 |
|
|
|
|
|
463 |
* Added ping.fm.
|
464 |
|
|
|
|
|
465 |
* Removed indiagram (shut down).
|
|
|
466 |
= 2.9.13 =
|
467 |
|
|
|
|
|
468 |
* Changed Facebook link from sharer.php (meant for a popup window) to share.php (which has the actual menu on it etc.).
|
|
|
469 |
= 2.9.12 =
|
470 |
|
|
|
|
|
471 |
* Added Tip'd.
|
|
|
472 |
= 2.9.11 =
|
473 |
|
|
|
|
|
474 |
* Added settings link and Ozh admin menu icon.
|
|
|
475 |
= 2.9.10 =
|
476 |
|
|
|
|
|
477 |
* Fixes issue with excerpt not being urlencoded.
|
|
|
478 |
= 2.9.9 =
|
479 |
|
|
|
|
|
480 |
* Fixes for custom fields issues.
|
|
|
481 |
= 2.9.8 =
|
482 |
|
|
|
|
|
483 |
* Fixes for WP 2.7.
|
|
|
484 |
= 2.9.6 =
|
485 |
|
|
|
|
|
486 |
* Added Symbaloo and Tumblr.
|
|
|
487 |
= 2.9.5 =
|
488 |
|
|
|
|
|
489 |
* Fixed Fark & Propeller links.
|
490 |
|
|
|
|
|
491 |
* Added missing i18n strings.
|
492 |
|
|
|
|
|
493 |
* Added Yahoo Buzz.
|
|
|
494 |
= 2.9.4 =
|
495 |
|
|
|
|
|
496 |
* Removed PopCurrent and Rawsugar as they no longer exist.
|
497 |
|
|
|
|
|
498 |
* Renamed BlueDot to Faves.
|
|
|
499 |
= 2.9.3 =
|
500 |
|
|
|
|
|
501 |
* Added Leonaut & MySpace.
|
502 |
|
|
|
|
|
503 |
* Fixed plugin description.
|
504 |
|
|
|
|
|
505 |
* Added option to disable Sociable on a per post basis.
|
506 |
|
|
|
|
|
507 |
* Added option to display sociable on tag pages.
|
508 |
|
|
|
|
|
509 |
* Added extra security to config page.
|
510 |
|
|
|
|
|
511 |
* Fixed print button.
|
512 |
|
|
|
|
|
513 |
* Fixed Twitter functionality.
|
|
|
514 |
= 2.9.2 =
|
515 |
|
|
|
|
|
516 |
* Added Swedish and Chinese localisations, thx to [Mikael Jorhult](http://www.mishkin.se/) and [Hugo Chen](http://take-ez.com/).
|
|
|
517 |
= 2.9.1 =
|
518 |
|
|
|
|
|
519 |
* Fixed bug where jQuery UI would be loaded twice.
|
|
|
520 |
= 2.9 =
|
521 |
|
|
|
|
|
522 |
* Removed Tool-Man in favor of jQuery, thx to Martin Joosse.
|
|
|
523 |
= 2.8.4 =
|
524 |
|
|
|
|
|
525 |
* General bugfixes.
|
|
|
526 |
= 2.8.3 =
|
527 |
|
|
|
|
|
528 |
* Added wikio.it, upnews.it, muti.co.za.
|
529 |
|
|
|
|
|
530 |
* Made LinkedIn work even better.
|
531 |
|
|
|
|
|
532 |
* Made opening in a new window optional.
|
|
|
533 |
= 2.8.2 =
|
534 |
|
|
|
|
|
535 |
* Now adds icons to feeds with excerpts too.
|
536 |
|
|
|
|
|
537 |
* Added LinkedIn.
|
|
|
538 |
= 2.8.1 =
|
539 |
|
|
|
|
|
540 |
* Fixed some small issues.
|
541 |
|
|
|
|
|
542 |
* Made sure tagline shows up again.
|
|
|
543 |
= 2.8 =
|
544 |
|
|
|
|
|
545 |
* Added option to show bookmark icons in feed.
|
546 |
|
|
|
|
|
547 |
* Added Ratimarks.
|
548 |
|
|
|
|
|
549 |
* Fixed xhtml compliance.
|
550 |
|
|
|
|
|
551 |
* Fixed blue dot bug.
|
|
|
552 |
= 2.6.9 =
|
553 |
|
|
|
|
|
554 |
* Fixed WP 2.6 compatibility.
|
|
|
555 |
= 2.6.8 =
|
556 |
|
|
|
|
|
557 |
* Updated inline documentation.
|
|
|
558 |
= 2.6.7 =
|
559 |
|
|
|
|
|
560 |
* Renamed Sk*rt to Kirtsy.
|
561 |
|
|
|
|
|
562 |
* Added designfloat.
|
563 |
|
|
|
|
|
564 |
* Fixed description.
|
|
|
565 |
= 2.5.4 =
|
566 |
|
|
|
|
|
567 |
* Added HealthRanker, N4G, Meneame, BarraPunto, Laaik.it and E-mail option.
|
|
|
568 |
= 2.5.3 =
|
569 |
|
|
|
|
|
570 |
* Added Global Grind, Salesmarks, Webnews.de, Xerpi, Yigg.
|
|
|
571 |
= 2.5.2 =
|
572 |
|
|
|
|
|
573 |
* Added NuJIJ, eKudos, Sk-rt, Socialogs and MisterWong.de.
|
|
|
574 |
= 2.5.1 =
|
575 |
|
|
|
|
|
576 |
* Swapped Netscape for Propeller.
|
|
|
577 |
Special thanks to [Robert Harm](http://www.die-truppe.com/) for coming up with loads of nice ideas.
|
578 |
|
|
|
|
|
579 |
== Installation ==
|
|
|
580 |
Download, Upgrading, Installation:
|
|
|
581 |
Upgrade
|
|
|
582 |
1. First deactivate Sociable
|
583 |
|
|
|
|
|
584 |
1. Remove the `sociable` directory
|
|
|
585 |
**Install**
|
|
|
586 |
1. Unzip the `sociable.zip` file.
|
587 |
|
|
|
|
|
588 |
1. Upload the the `sociable` folder (not just the files in it!) to your `wp-contents/plugins` folder. If you're using FTP, use 'binary' mode.
|
|
|
589 |
**Activate**
|
|
|
590 |
1. In your WordPress administration, go to the Plugins page
|
591 |
|
|
|
|
|
592 |
1. Activate the Sociable plugin and a subpage for Sociable will appear
|
593 |
|
|
|
|
|
594 |
in your Options menu.
|
|
|
595 |
If you find any bugs or have any ideas, please mail me.
|
|
|
596 |
**Advanced Users**
|
|
|
597 |
For advanced use of the plugin, see the [Sociable](http://www.blogplay.com/sociable-for-wordpress) page on [Blogplay](http://www.blogplay.com/plugin)
|
598 |
|
|
|
|
|
599 |
|
1 |
=== Sociable ===
|
|
|
2 |
Author: sociable
|
|
|
3 |
Contributors: sociable
|
|
|
4 |
Tags: sociable, social bookmarking, social bookmarks, social icons, bookmarking, share, sharing, be sociable share, share and enjoy, digg, delicious, twitter, facebook, blinklist, stumbleupon, gmail, posterous, tumblr
|
|
|
5 |
Requires at least: 2.6
|
|
|
6 |
Tested up to: 3.3.1
|
7 |
+
Stable tag: 4.2.8
|
|
|
8 |
|
9 |
Congrats for joining the leader in the sharing space of WordPress plugins. "Sociable" is totally FREE, has over 1,5 million downloads and is experiencing an exponential growth and amazing new features. Your feedback is much apreciated. Enjoy!
|
10 |
|
12 |
|
13 |
As you know, Sociable continues being the fastest growing leader in the sharing space of WordPress plugins. We really appreciate your feedback, so, here you are lastest version including Pinterest icon, font changes you suggested and other terrific features you get totally Free.
|
14 |
|
15 |
+
|
16 |
+
|
17 |
After introducing Sociable Skyscraper, the ultimate advanced and feature-packed plugin for setting up a rating system on your WordPress blog, we've developed Sociable Slider. It is sort of banner that reminds your readers to spread the word. You can select and customize several features, such as text, color, and length in order to ensure your readers and their friends a great Sociable Experience. Sociable Skyscraper allows you to set up pages and comments with a great degree of customization.
|
18 |
|
19 |
+
|
20 |
+
|
21 |
Sociable Plug-in is totally free and continues leading digital arena with over 1.5 million downloads now. We're working hard making you happy and your feedback and suggestions allow us to keep growing, so, let's enjoy co-creation, collaboration and sharing. Be Sociable. Share!
|
22 |
|
23 |
= About Sociable Skyscraper =
|
24 |
|
25 |
Sociable Skyscraper is the ultimate advanced and feature-packed plugin for setting up a rating system on your WordPress blog. This plugin allows you to set up different rating systems for posts, pages and comments with a great degree of customization.
|
26 |
+
|
27 |
Sociable Skyscraper's list of features is smart, extensive and ever-growing:
|
28 |
+
|
29 |
You can get even more Sociable with Sociable Skyscraper and: Rating and Review of: posts, pages, comments, Facebook, G+, LinkedIN, and Twitter. Multiple ratings for posts and pages. Latest tweets, latest posts, follows, and mentions. Visitor counter, visitors from Facebook and Twitter. As an added bonus, you also get an easy way to get to the TOP of the page or back HOME from Sociable Skyscraper.
|
30 |
+
|
31 |
And now the over 1.5 million WordPress Blogs with the Sociable Plugin can also use the Inbound.org icon. Inbound.org is a for-fun partnership of Rand from Moz and Dharmesh from HubSpot which offers community-curated marketing news. We like their idea so much and we hope you enjoy discovering and sharing great stuff from the inbound marketing fields of blogging, SEO, Social media, content marketing, conversion rate optimization, web analytics and more.
|
32 |
|
33 |
We're constantly interacting with you via our Forum and/or emails, which means we're enhancing our free tool faster and more accurately thanks to your feedback. Please tell us your comments so we can make it better together.
|
34 |
+
|
35 |
= About Sociable Classic =
|
36 |
|
37 |
As you know, we've recently improved our visual interface. The default icons are now much more appealing, and a tad bit larger (you want your readers to share your posts, don't you?)
|
38 |
|
39 |
Enjoy it now!
|
40 |
+
|
41 |
+
|
42 |
Be Sociable, Share!
|
43 |
|
44 |
+
|
45 |
+
|
46 |
[vimeo http://vimeo.com/31023294]
|
47 |
+
|
48 |
[vimeo http://vimeo.com/31023684]
|
49 |
|
50 |
+
|
51 |
+
|
52 |
Have technical support issues? Please leave them in the forum: http://wordpress.org/tags/sociable?forum_id=10
|
53 |
|
54 |
Also use the forum for ideas, feedback, suggestions. We'll try to check the forum every day.
|
55 |
+
|
56 |
What happened to the old icons? You can still use them in the new version, but they're not the default style anymore.
|
57 |
+
|
58 |
Sociable finds its home outside of the WordPress environment on Blogplay.com-
|
59 |
|
60 |
+
|
61 |
+
|
62 |
+
*** Sociable 4.2.8 ***
|
63 |
+
|
64 |
= Recent Updates =
|
65 |
|
66 |
+
* Change links permissions
|
67 |
* Add Private Options
|
|
|
68 |
* Add Pinterest share icon
|
|
|
69 |
* Add inbound.org share icon
|
70 |
* Changed the old motto "share and enjoy" for "Be Sociable, Share" much more attractive. Of course you can customize it to whatever you want.
|
|
|
71 |
* Complete re-write to increase efficiency and speed of the plugin
|
|
|
72 |
* New Sociable Skyscraper version, the ultimate advanced packed plugin for setting up rating system on your WordPress blog. Sociable Skyscraper allows you to set up pages and comments with great degree of customization.
|
73 |
+
|
74 |
= Recently Added Sites =
|
75 |
|
|
|
76 |
|
|
|
77 |
|
78 |
+
* Pinterest
|
79 |
+
* Inbound.org
|
80 |
* Posterous
|
|
|
81 |
* Sphinn
|
|
|
82 |
* Tumblr
|
|
|
83 |
* G+
|
|
|
84 |
* LinkedIN
|
|
|
85 |
* Inbound
|
86 |
|
87 |
+
|
88 |
+
|
89 |
= Recently Deleted Sites =
|
90 |
|
91 |
* Mixx.com, recently acquired, doesn't support share functions anymore
|
|
|
92 |
* Netvibes stopped sharing
|
|
|
93 |
* Slashdot: New bookmark creation is no longer supported
|
|
|
94 |
* And we deleted a bunch of others that were really not used that much
|
95 |
+
|
96 |
= Special Thanks =
|
97 |
|
98 |
Sociable plugin wouldn't be what it is today if it weren't for these people that helped us along the way:
|
100 |
* Thanks to [WPzoom](http://http://www.wpzoom.com/wpzoom/500-free-icons-wpzoom-social-networking-icon-set/) for letting us to use their awesome icons
|
101 |
|
102 |
* Also special thanks to [Webtreats etc](http://http://webtreats.mysitemyway.com/) for allowing us to use their great icons
|
103 |
+
|
104 |
== Screenshots ==
|
105 |
|
106 |
+
|
107 |
1. The Sociable backend, easily select sites and drag & drop to change the order of appearance.
|
108 |
|
109 |
2. Sociable with its new default styling.
|
113 |
4. Or you can pick your own style
|
114 |
|
115 |
5. Select which plugin want to customize
|
116 |
+
|
117 |
== Installation ==
|
118 |
|
119 |
+
|
120 |
1. Upload the extracted archive to `wp-content/plugins/`
|
121 |
|
122 |
+
|
123 |
2. Activate the plugin through the 'Plugins' menu
|
124 |
|
125 |
+
|
126 |
3. Open the plugin settings page Settings -> Sociable
|
127 |
|
128 |
+
|
129 |
+
|
130 |
4. Adjust settings to your liking
|
131 |
|
132 |
+
|
133 |
+
|
134 |
4. Enjoy!
|
135 |
|
136 |
+
|
137 |
+
|
138 |
== Frequently Asked Questions ==
|
139 |
|
140 |
+
|
141 |
+
|
142 |
= What happened to the old icons? =
|
143 |
|
144 |
+
|
145 |
+
|
146 |
You can still use them. It's just they're not the default anymore.
|
147 |
+
|
148 |
= I want to reach you, but not for a technical question =
|
149 |
|
150 |
+
|
151 |
+
|
152 |
Please send us an email to sociableblogplay [ at ] gmail.com
|
153 |
+
|
154 |
== Changelog ==
|
155 |
|
156 |
+
= 4.2.8 =
|
157 |
+
|
158 |
+
* Change links permissions
|
159 |
+
|
160 |
= 4.2.7 =
|
161 |
|
162 |
* Some fixes
|
163 |
|
164 |
= 4.2.6 =
|
165 |
|
166 |
+
|
167 |
+
|
168 |
* Save issue
|
169 |
|
170 |
+
|
171 |
+
|
172 |
= 4.2.5 =
|
173 |
|
174 |
+
|
175 |
+
|
176 |
* Privacy options
|
177 |
|
178 |
+
|
179 |
+
|
180 |
= 4.2.4 =
|
181 |
|
182 |
+
|
183 |
+
|
184 |
* Privacy options
|
185 |
|
186 |
+
|
187 |
+
|
188 |
= 4.2.3 =
|
189 |
+
|
190 |
* Pinterest
|
191 |
+
|
192 |
* Tags
|
193 |
+
|
194 |
= 4.2.2 =
|
195 |
+
|
196 |
* Social Banner and settings
|
197 |
+
|
198 |
* Inbound icon
|
199 |
+
|
200 |
* FIXED: Some Fixes
|
201 |
+
|
202 |
= 4.2.1 =
|
203 |
|
204 |
+
|
205 |
+
|
206 |
* FIXED: Some Fixes
|
207 |
|
208 |
+
|
209 |
+
|
210 |
= 4.2.0 =
|
211 |
|
212 |
+
|
213 |
+
|
214 |
* FIXED: Some Fixes
|
215 |
|
216 |
+
|
217 |
+
|
218 |
= 4.1.9 =
|
219 |
|
220 |
+
|
221 |
+
|
222 |
* FIXED: Some Fixes
|
223 |
|
224 |
+
|
225 |
+
|
226 |
= 4.1.8 =
|
227 |
|
228 |
+
|
229 |
+
|
230 |
* FIXED: Some Fixes
|
231 |
|
232 |
+
|
233 |
+
|
234 |
= 4.1.7 =
|
235 |
|
236 |
+
|
237 |
+
|
238 |
* FIXED: Some Fixes
|
239 |
|
240 |
+
|
241 |
+
|
242 |
= 4.1.6 =
|
243 |
|
244 |
+
|
245 |
+
|
246 |
* FIXED: Some Fixes
|
247 |
+
|
248 |
= 4.1.5 =
|
249 |
|
250 |
+
|
251 |
+
|
252 |
* FIXED: Some Fixes
|
253 |
+
|
254 |
= 4.1.4 =
|
255 |
|
256 |
+
|
257 |
+
|
258 |
* FIXED: Some Fixes
|
259 |
+
|
260 |
= 4.1.3 =
|
261 |
|
262 |
+
|
263 |
+
|
264 |
* FIXED: Some Fixes
|
265 |
+
|
266 |
= 4.1.2 =
|
267 |
|
268 |
+
|
269 |
+
|
270 |
* FIXED: Google plus problem
|
271 |
+
|
272 |
= 4.1.1 =
|
273 |
|
274 |
+
|
275 |
+
|
276 |
* ADDED: Facebook Like Counter, Twitter Counter, Google Plus Counter, Linkedin Counter,StumbleUpon Counter and Digg Counter
|
277 |
|
278 |
+
|
279 |
+
|
280 |
* ADDED: Add Sociable at Top and Bottom of the post
|
281 |
+
|
282 |
= 4.0.6 =
|
283 |
|
284 |
+
|
285 |
+
|
286 |
* FIXED: Allow Sub Directory Blogs (http://domain.com/blog)
|
287 |
+
|
288 |
= 4.0.5 =
|
289 |
|
290 |
+
|
291 |
+
|
292 |
* FIXED: Other Upgrade issues
|
293 |
+
|
294 |
= 4.0.4 =
|
295 |
|
296 |
+
|
297 |
+
|
298 |
* FIXED: Upgrade issues
|
299 |
|
300 |
+
|
301 |
+
|
302 |
= 4.0.3 =
|
303 |
|
304 |
+
|
305 |
+
|
306 |
* Fix IIS 6.0 and PHP 5.3.x
|
307 |
+
|
308 |
= 4.0.1 =
|
309 |
|
310 |
+
|
311 |
+
|
312 |
* Changed the old motto "share and enjoy" for "Be Sociable, Share" much more attractive. Of cours you can customize it to whatever you want.
|
313 |
|
314 |
+
|
315 |
+
|
316 |
* Complete re-write to increase efficiency and speed of the plugin
|
317 |
|
318 |
+
|
319 |
+
|
320 |
* Updated it for up to Wordpress version 3.2.1
|
321 |
+
|
322 |
= 3.5.2 =
|
323 |
|
324 |
+
|
325 |
+
|
326 |
* Added new services MOB, ??, ????, QQ??, LaTafanera, SheToldMe, viadeo FR, Diggita, Design Float
|
327 |
|
328 |
+
|
329 |
+
|
330 |
* Removed ID properties from sociable anchor tags (share links)
|
331 |
|
332 |
+
|
333 |
+
|
334 |
* FIXED: Having a custom image directory now disables sprite usage, and the icons of services are displayed on sociable configuration page.
|
335 |
+
|
336 |
= 3.5.1 =
|
337 |
|
338 |
+
|
339 |
+
|
340 |
* Fixed the xhtml validation issues
|
341 |
|
342 |
+
|
343 |
+
|
344 |
* 'target=blank' (open link in new window) issue solved
|
345 |
|
346 |
+
|
347 |
+
|
348 |
* Sprites can now be disabled, allowing for custom icons
|
349 |
|
350 |
+
|
351 |
+
|
352 |
* Sprites have been disabled for RSS
|
353 |
|
354 |
+
|
355 |
+
|
356 |
* You can now deactivate the blogplay widget from your wordpress dashboard
|
357 |
+
|
358 |
= 3.5.0 =
|
359 |
|
360 |
+
|
361 |
+
|
362 |
* The icons now load in a CSS Sprites, allowing for faster download times.
|
363 |
|
364 |
+
|
365 |
+
|
366 |
* These services have been discontinued: BlogMeme FR, BlogMeme SP, co.mments, DesignFloat.com, PPNow.net, Symbaloo.com.
|
367 |
|
368 |
+
|
369 |
+
|
370 |
* You can now add links to your browser favorites.
|
371 |
|
372 |
+
|
373 |
+
|
374 |
* iFrames added for services that support them.
|
375 |
|
376 |
+
|
377 |
+
|
378 |
* You can know unselect the transparency effect on the sociable icons.
|
379 |
+
|
380 |
= 3.4.4 =
|
381 |
|
382 |
+
|
383 |
+
|
384 |
* Another fix for the sociableoff dilemma's, no backwards compatibility unfortunately, so disable sociable again on pages where you want to disable it.
|
385 |
+
|
386 |
= 3.4.3 =
|
387 |
|
388 |
+
|
389 |
+
|
390 |
* Fixed the bug mentioned [here](http://wordpress.org/support/topic/288487) and [here](http://wordpress.org/support/topic/290753) that made it impossible to disable Sociable on a per post/page basis (for real, now).
|
391 |
+
|
392 |
= 3.4.2 =
|
393 |
|
394 |
+
|
395 |
+
|
396 |
* Added a site specific id to each links anchor tag.
|
397 |
|
398 |
+
|
399 |
+
|
400 |
* Fixed the bug mentioned [here](http://wordpress.org/support/topic/288487) and [here](http://wordpress.org/support/topic/290753) that made it impossible to disable Sociable on a per post/page basis.
|
401 |
|
402 |
+
|
403 |
+
|
404 |
* "Reintroduced" TwitThis as Twitter.
|
405 |
+
|
406 |
= 3.4.1 =
|
407 |
|
408 |
+
|
409 |
+
|
410 |
* Fixed the Sphinn submit link.
|
411 |
+
|
412 |
= 3.4 =
|
413 |
|
414 |
+
|
415 |
+
|
416 |
* Added the option to add a site to Sociable through a filter, read [How to add a site to Sociable](http://yoast.com/add-sites-to-sociable/).
|
417 |
+
|
418 |
= 3.3.8 =
|
419 |
|
420 |
+
|
421 |
+
|
422 |
* Fixed the option to disable Sociable on a per post / page basis.
|
423 |
+
|
424 |
= 3.3.7 =
|
425 |
|
426 |
+
|
427 |
+
|
428 |
* More bugfixery.
|
429 |
+
|
430 |
= 3.3.6 =
|
431 |
|
432 |
+
|
433 |
+
|
434 |
* Reverted plugin URL fix because of too many people on old WordPress installations complaining. (Upgrade, people, upgrade!)
|
435 |
|
436 |
+
|
437 |
+
|
438 |
* Added PHPDoc throughout the plugins code.
|
439 |
+
|
440 |
= 3.3.5 =
|
441 |
|
442 |
+
|
443 |
+
|
444 |
* Added a Hyves button.
|
445 |
|
446 |
+
|
447 |
+
|
448 |
* Fixed MSN Reporter button.
|
449 |
+
|
450 |
= 3.3.4 =
|
451 |
|
452 |
+
|
453 |
+
|
454 |
* Fixed RSS.
|
455 |
+
|
456 |
= 3.3.3 =
|
457 |
|
458 |
+
|
459 |
+
|
460 |
* Brought back Tumblr
|
461 |
|
462 |
+
|
463 |
+
|
464 |
* Updated PDF link
|
465 |
|
466 |
+
|
467 |
+
|
468 |
* Added Posterous
|
469 |
|
470 |
+
|
471 |
+
|
472 |
* Smushed all images using [Smush.it](http://smush.it/), reducing the total image file size with 31.72 KB (42.03%)!
|
473 |
|
474 |
+
|
475 |
+
|
476 |
* Removed pre - 2.6 compatibility code
|
477 |
+
|
478 |
= 3.3.1 =
|
479 |
|
480 |
+
|
481 |
+
|
482 |
* Added new option to use pure text links, instead of image links.
|
483 |
|
484 |
+
|
485 |
+
|
486 |
* Fixed small issue with using target=blank links and the new awe.sm options.
|
487 |
|
488 |
+
|
489 |
+
|
490 |
* Allowed for usage without an awe.sm API key, as awe.sm falls back to "default" awe.sm shortlinks.
|
491 |
|
492 |
+
|
493 |
+
|
494 |
* Code cleanup for more efficiency in the backend on saving options.
|
495 |
|
496 |
+
|
497 |
+
|
498 |
* General code cleanup.
|
499 |
|
500 |
+
|
501 |
+
|
502 |
* Moved to the new default Changelog markup.
|
503 |
+
|
504 |
= 3.3 =
|
505 |
|
506 |
+
|
507 |
+
|
508 |
* Added awe.sm integration and some sites.
|
509 |
+
|
510 |
= 3.2.3 =
|
511 |
|
512 |
+
|
513 |
+
|
514 |
* Removed the last bit of non jQuery javascript.
|
515 |
|
516 |
+
|
517 |
+
|
518 |
* Improved styling and visual feedback when selecting a site.
|
519 |
+
|
520 |
= 3.2.2 =
|
521 |
|
522 |
+
|
523 |
+
|
524 |
* Moved style loading to admin_print_styles and scripts to admin_print_scripts.
|
525 |
+
|
526 |
= 3.2.1 =
|
527 |
|
528 |
+
|
529 |
+
|
530 |
* Fixed a bug with printing styles in 2.8 beta.
|
531 |
+
|
532 |
= 3.2 =
|
533 |
|
534 |
+
|
535 |
+
|
536 |
This is a MAJOR update to Sociable. Major Thanks to Jean-Paul of [iPhoneclub](http://www.iphoneclub.nl/) for all his work in looking up all the sites. The full list of changes:
|
537 |
+
|
538 |
* Restored sociable-admin.js, as it got accidentally removed.
|
539 |
|
540 |
+
|
541 |
+
|
542 |
+
* Added `class="sociablefirst"` to the first site in the list and `class="sociablelast"` to the last one.
|
543 |
+
|
544 |
+
|
545 |
|
546 |
* Added:
|
547 |
|
548 |
+
|
549 |
+
|
550 |
* An RSS button, which links to your sites RSS feed
|
551 |
|
552 |
+
|
553 |
+
|
554 |
* Printfriendly.com for both printing and creating a PDF, replacing the original "Print" function, which didn't work from RSS
|
555 |
|
556 |
+
|
557 |
+
|
558 |
* Current
|
559 |
|
560 |
+
|
561 |
+
|
562 |
* FriendFeed
|
563 |
|
564 |
+
|
565 |
+
|
566 |
* MSN Reporter.nl
|
567 |
|
568 |
+
|
569 |
+
|
570 |
* FS Daily
|
571 |
|
572 |
+
|
573 |
+
|
574 |
* Hello TXT
|
575 |
|
576 |
+
|
577 |
+
|
578 |
* Removed the following sites that were no longer working or active:
|
579 |
|
580 |
+
|
581 |
+
|
582 |
* BlinkBits
|
583 |
|
584 |
+
|
585 |
+
|
586 |
* Blogmemes.cn, .net, .jp
|
587 |
|
588 |
+
|
589 |
+
|
590 |
* Blogsvine
|
591 |
|
592 |
+
|
593 |
+
|
594 |
* Book.mark.hu
|
595 |
|
596 |
+
|
597 |
+
|
598 |
* Bumpzee
|
599 |
|
600 |
+
|
601 |
+
|
602 |
* Del.irio.us
|
603 |
|
604 |
+
|
605 |
+
|
606 |
* Feed Me Links
|
607 |
|
608 |
+
|
609 |
+
|
610 |
* Furl (replaced by Diigo)
|
611 |
|
612 |
+
|
613 |
+
|
614 |
* GeenRedactie
|
615 |
|
616 |
+
|
617 |
+
|
618 |
* Kick.ie
|
619 |
|
620 |
+
|
621 |
+
|
622 |
* Leonaut
|
623 |
|
624 |
+
|
625 |
+
|
626 |
* Magnolia
|
627 |
|
628 |
+
|
629 |
+
|
630 |
* Plug IM
|
631 |
|
632 |
+
|
633 |
+
|
634 |
* Pownce
|
635 |
|
636 |
+
|
637 |
+
|
638 |
* Salesmarks
|
639 |
|
640 |
+
|
641 |
+
|
642 |
* Scuttle
|
643 |
|
644 |
+
|
645 |
+
|
646 |
* Shadows
|
647 |
|
648 |
+
|
649 |
+
|
650 |
* Smarking
|
651 |
|
652 |
+
|
653 |
+
|
654 |
* Spurl
|
655 |
|
656 |
+
|
657 |
+
|
658 |
* Taggly
|
659 |
|
660 |
+
|
661 |
+
|
662 |
* Tailrank
|
663 |
|
664 |
+
|
665 |
+
|
666 |
* Tumblr (due to the change to a POST API, which we, unfortunately, can't support with Sociable)
|
667 |
|
668 |
+
|
669 |
+
|
670 |
* Updated the following sites to include the excerpt when submitting:
|
671 |
|
672 |
+
|
673 |
+
|
674 |
* Connotea
|
675 |
|
676 |
+
|
677 |
+
|
678 |
* Delicious
|
679 |
|
680 |
+
|
681 |
+
|
682 |
* Digg
|
683 |
|
684 |
+
|
685 |
+
|
686 |
* Ekudos
|
687 |
|
688 |
+
|
689 |
+
|
690 |
* Google Bookmarks
|
691 |
|
692 |
+
|
693 |
+
|
694 |
* NuJij
|
695 |
|
696 |
+
|
697 |
+
|
698 |
* Ping.fm
|
699 |
|
700 |
+
|
701 |
+
|
702 |
* Otherwise updated:
|
703 |
|
704 |
+
|
705 |
+
|
706 |
* Google Bookmarks (new icon)
|
707 |
|
708 |
+
|
709 |
+
|
710 |
* Fleck (New URL)
|
711 |
|
712 |
+
|
713 |
+
|
714 |
* Rec6 (new URL)
|
715 |
+
|
716 |
= 3.1.1 =
|
717 |
|
718 |
+
|
719 |
+
|
720 |
* Fixed bug with stylesheet introduced in 3.1.
|
721 |
+
|
722 |
= 3.1 =
|
723 |
|
724 |
+
|
725 |
+
|
726 |
* Converted all images to PNG.
|
727 |
|
728 |
+
|
729 |
+
|
730 |
* Cleaned up usage of javascript in the backend and switched to the jquery library that comes with WordPress.
|
731 |
|
732 |
+
|
733 |
+
|
734 |
* Allowed for usage of an external image directory.
|
735 |
|
736 |
+
|
737 |
+
|
738 |
* Removed pre 2.6 compatibility fixes.
|
739 |
+
|
740 |
= 3.0.6 =
|
741 |
|
742 |
+
|
743 |
+
|
744 |
* Fixed xhtml bug in Netvibes integration.
|
745 |
|
746 |
+
|
747 |
+
|
748 |
* Added Bitacoras.
|
749 |
+
|
750 |
= 3.0.5 =
|
751 |
|
752 |
+
|
753 |
+
|
754 |
* Added Identi.ca.
|
755 |
|
756 |
+
|
757 |
+
|
758 |
* Fixed a bug in Yoast Posts widget.
|
759 |
+
|
760 |
= 3.0.4 =
|
761 |
|
762 |
+
|
763 |
+
|
764 |
* Added Netvibes.
|
765 |
+
|
766 |
= 3.0.3 =
|
767 |
|
768 |
+
|
769 |
+
|
770 |
* Security enhancements, thx to Mark Jaquith.
|
771 |
+
|
772 |
= 3.0.2 =
|
773 |
|
774 |
+
|
775 |
+
|
776 |
* Fixed CSS bug introduced in 3.0.
|
777 |
+
|
778 |
= 3.0.1 =
|
779 |
|
780 |
+
|
781 |
+
|
782 |
* Removed some other, now obsolete, code, reducing the code size by another 4KB.
|
783 |
+
|
784 |
= 3.0 =
|
785 |
|
786 |
+
|
787 |
+
|
788 |
* Fixed IE bug in admin.
|
789 |
|
790 |
+
|
791 |
+
|
792 |
* Cleaned up Admin Area and changed support messages.
|
793 |
|
794 |
+
|
795 |
+
|
796 |
* Removed directory checking for all images (speeds up incredibly).
|
797 |
|
798 |
+
|
799 |
+
|
800 |
* Made display: inline !important to prevent vertical icon display.
|
801 |
|
802 |
+
|
803 |
+
|
804 |
* Updated Wykop icon.
|
805 |
+
|
806 |
= 2.9.15 =
|
807 |
|
808 |
+
|
809 |
+
|
810 |
* Added a fallback for strip_shortcodes to maintain backwards compatibility with WordPress 2.3 and below.
|
811 |
+
|
812 |
= 2.9.14 =
|
813 |
|
814 |
+
|
815 |
+
|
816 |
* Made sure there are no tags or shortcodes in the excerpt.
|
817 |
|
818 |
+
|
819 |
+
|
820 |
* Added ping.fm.
|
821 |
|
822 |
+
|
823 |
+
|
824 |
* Removed indiagram (shut down).
|
825 |
+
|
826 |
= 2.9.13 =
|
827 |
|
828 |
+
|
829 |
+
|
830 |
* Changed Facebook link from sharer.php (meant for a popup window) to share.php (which has the actual menu on it etc.).
|
831 |
+
|
832 |
= 2.9.12 =
|
833 |
|
834 |
+
|
835 |
+
|
836 |
* Added Tip'd.
|
837 |
+
|
838 |
= 2.9.11 =
|
839 |
|
840 |
+
|
841 |
+
|
842 |
* Added settings link and Ozh admin menu icon.
|
843 |
+
|
844 |
= 2.9.10 =
|
845 |
|
846 |
+
|
847 |
+
|
848 |
* Fixes issue with excerpt not being urlencoded.
|
849 |
+
|
850 |
= 2.9.9 =
|
851 |
|
852 |
+
|
853 |
+
|
854 |
* Fixes for custom fields issues.
|
855 |
+
|
856 |
= 2.9.8 =
|
857 |
|
858 |
+
|
859 |
+
|
860 |
* Fixes for WP 2.7.
|
861 |
+
|
862 |
= 2.9.6 =
|
863 |
|
864 |
+
|
865 |
+
|
866 |
* Added Symbaloo and Tumblr.
|
867 |
+
|
868 |
= 2.9.5 =
|
869 |
|
870 |
+
|
871 |
+
|
872 |
* Fixed Fark & Propeller links.
|
873 |
|
874 |
+
|
875 |
+
|
876 |
* Added missing i18n strings.
|
877 |
|
878 |
+
|
879 |
+
|
880 |
* Added Yahoo Buzz.
|
881 |
+
|
882 |
= 2.9.4 =
|
883 |
|
884 |
+
|
885 |
+
|
886 |
* Removed PopCurrent and Rawsugar as they no longer exist.
|
887 |
|
888 |
+
|
889 |
+
|
890 |
* Renamed BlueDot to Faves.
|
891 |
+
|
892 |
= 2.9.3 =
|
893 |
|
894 |
+
|
895 |
+
|
896 |
* Added Leonaut & MySpace.
|
897 |
|
898 |
+
|
899 |
+
|
900 |
* Fixed plugin description.
|
901 |
|
902 |
+
|
903 |
+
|
904 |
* Added option to disable Sociable on a per post basis.
|
905 |
|
906 |
+
|
907 |
+
|
908 |
* Added option to display sociable on tag pages.
|
909 |
|
910 |
+
|
911 |
+
|
912 |
* Added extra security to config page.
|
913 |
|
914 |
+
|
915 |
+
|
916 |
* Fixed print button.
|
917 |
|
918 |
+
|
919 |
+
|
920 |
* Fixed Twitter functionality.
|
921 |
+
|
922 |
= 2.9.2 =
|
923 |
|
924 |
+
|
925 |
+
|
926 |
* Added Swedish and Chinese localisations, thx to [Mikael Jorhult](http://www.mishkin.se/) and [Hugo Chen](http://take-ez.com/).
|
927 |
+
|
928 |
= 2.9.1 =
|
929 |
|
930 |
+
|
931 |
+
|
932 |
* Fixed bug where jQuery UI would be loaded twice.
|
933 |
+
|
934 |
= 2.9 =
|
935 |
|
936 |
+
|
937 |
+
|
938 |
* Removed Tool-Man in favor of jQuery, thx to Martin Joosse.
|
939 |
+
|
940 |
= 2.8.4 =
|
941 |
|
942 |
+
|
943 |
+
|
944 |
* General bugfixes.
|
945 |
+
|
946 |
= 2.8.3 =
|
947 |
|
948 |
+
|
949 |
+
|
950 |
* Added wikio.it, upnews.it, muti.co.za.
|
951 |
|
952 |
+
|
953 |
+
|
954 |
* Made LinkedIn work even better.
|
955 |
|
956 |
+
|
957 |
+
|
958 |
* Made opening in a new window optional.
|
959 |
+
|
960 |
= 2.8.2 =
|
961 |
|
962 |
+
|
963 |
+
|
964 |
* Now adds icons to feeds with excerpts too.
|
965 |
|
966 |
+
|
967 |
+
|
968 |
* Added LinkedIn.
|
969 |
+
|
970 |
= 2.8.1 =
|
971 |
|
972 |
+
|
973 |
+
|
974 |
* Fixed some small issues.
|
975 |
|
976 |
+
|
977 |
+
|
978 |
* Made sure tagline shows up again.
|
979 |
+
|
980 |
= 2.8 =
|
981 |
|
982 |
+
|
983 |
+
|
984 |
* Added option to show bookmark icons in feed.
|
985 |
|
986 |
+
|
987 |
+
|
988 |
* Added Ratimarks.
|
989 |
|
990 |
+
|
991 |
+
|
992 |
* Fixed xhtml compliance.
|
993 |
|
994 |
+
|
995 |
+
|
996 |
* Fixed blue dot bug.
|
997 |
+
|
998 |
= 2.6.9 =
|
999 |
|
1000 |
+
|
1001 |
+
|
1002 |
* Fixed WP 2.6 compatibility.
|
1003 |
+
|
1004 |
= 2.6.8 =
|
1005 |
|
1006 |
+
|
1007 |
+
|
1008 |
* Updated inline documentation.
|
1009 |
+
|
1010 |
= 2.6.7 =
|
1011 |
|
1012 |
+
|
1013 |
+
|
1014 |
* Renamed Sk*rt to Kirtsy.
|
1015 |
|
1016 |
+
|
1017 |
+
|
1018 |
* Added designfloat.
|
1019 |
|
1020 |
+
|
1021 |
+
|
1022 |
* Fixed description.
|
1023 |
+
|
1024 |
= 2.5.4 =
|
1025 |
|
1026 |
+
|
1027 |
+
|
1028 |
* Added HealthRanker, N4G, Meneame, BarraPunto, Laaik.it and E-mail option.
|
1029 |
+
|
1030 |
= 2.5.3 =
|
1031 |
|
1032 |
+
|
1033 |
+
|
1034 |
* Added Global Grind, Salesmarks, Webnews.de, Xerpi, Yigg.
|
1035 |
+
|
1036 |
= 2.5.2 =
|
1037 |
|
1038 |
+
|
1039 |
+
|
1040 |
* Added NuJIJ, eKudos, Sk-rt, Socialogs and MisterWong.de.
|
1041 |
+
|
1042 |
= 2.5.1 =
|
1043 |
|
1044 |
+
|
1045 |
+
|
1046 |
* Swapped Netscape for Propeller.
|
1047 |
+
|
1048 |
Special thanks to [Robert Harm](http://www.die-truppe.com/) for coming up with loads of nice ideas.
|
1049 |
|
1050 |
+
|
1051 |
+
|
1052 |
== Installation ==
|
1053 |
+
|
1054 |
Download, Upgrading, Installation:
|
1055 |
+
|
1056 |
Upgrade
|
1057 |
+
|
1058 |
1. First deactivate Sociable
|
1059 |
|
1060 |
+
|
1061 |
+
|
1062 |
1. Remove the `sociable` directory
|
1063 |
+
|
1064 |
**Install**
|
1065 |
+
|
1066 |
1. Unzip the `sociable.zip` file.
|
1067 |
|
1068 |
+
|
1069 |
+
|
1070 |
1. Upload the the `sociable` folder (not just the files in it!) to your `wp-contents/plugins` folder. If you're using FTP, use 'binary' mode.
|
1071 |
+
|
1072 |
**Activate**
|
1073 |
+
|
1074 |
1. In your WordPress administration, go to the Plugins page
|
1075 |
|
1076 |
+
|
1077 |
+
|
1078 |
1. Activate the Sociable plugin and a subpage for Sociable will appear
|
1079 |
|
1080 |
+
|
1081 |
+
|
1082 |
in your Options menu.
|
1083 |
+
|
1084 |
If you find any bugs or have any ideas, please mail me.
|
1085 |
+
|
1086 |
**Advanced Users**
|
1087 |
+
|
1088 |
For advanced use of the plugin, see the [Sociable](http://www.blogplay.com/sociable-for-wordpress) page on [Blogplay](http://www.blogplay.com/plugin)
|
1089 |
|
1090 |
+
|
1091 |
+
|
1092 |
|
sociable.php
CHANGED
@@ -1,22 +1,13 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
|
4 |
Plugin Name: Sociable
|
5 |
-
|
6 |
Plugin URI: http://blogplay.com/plugin
|
7 |
-
|
8 |
Description: Automatically add links on your posts, pages and RSS feed to your favorite social bookmarking sites.
|
9 |
-
|
10 |
-
Version: 4.2.7
|
11 |
-
|
12 |
Author: Blogplay
|
13 |
-
|
14 |
Author URI: http://blogplay.com/
|
15 |
-
|
16 |
Copyright 2006 Peter Harkins (ph@malaprop.org)
|
17 |
-
|
18 |
Copyright 2008-2009 Joost de Valk (joost@yoast.com)
|
19 |
-
|
20 |
Copyright 2009-Present Blogplay.com (info@blogplay.com)
|
21 |
|
22 |
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
|
@@ -26,997 +17,1995 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
26 |
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
27 |
*/
|
28 |
|
|
|
|
|
29 |
/*
|
|
|
30 |
* Define Some Paths
|
|
|
31 |
*/
|
32 |
|
|
|
|
|
33 |
define( 'SOCIABLE_HTTP_PATH' , WP_PLUGIN_URL . '/' . str_replace(basename( __FILE__) , "" , plugin_basename(__FILE__) ) );
|
|
|
34 |
define( 'SOCIABLE_ABSPATH' , WP_PLUGIN_DIR . '/' . str_replace(basename( __FILE__) , "" , plugin_basename(__FILE__) ) );
|
|
|
35 |
/*
|
36 |
|
|
|
|
|
37 |
* Includes
|
38 |
|
|
|
|
|
39 |
*/
|
40 |
|
|
|
|
|
41 |
include 'includes/class-sociable_Admin_Options.php';
|
42 |
|
|
|
|
|
43 |
include("includes/skyscraper_output.php");
|
44 |
|
|
|
|
|
45 |
include 'includes/class-Sociable_Globals.php';
|
46 |
|
|
|
|
|
47 |
include 'includes/sociable_output.php';
|
48 |
|
|
|
|
|
49 |
/*
|
50 |
|
|
|
|
|
51 |
* Global Variables
|
52 |
|
|
|
|
|
53 |
*/
|
|
|
54 |
//$sociable_known_sites = Sociable_Globals::default_sites();
|
55 |
|
|
|
|
|
56 |
$sociable_options = get_option( 'sociable_options' );
|
57 |
|
|
|
|
|
58 |
$skyscraper_options = get_option( 'skyscraper_options' );
|
59 |
|
|
|
|
|
60 |
$skyscraper_latest = get_option( 'skyscraper_latest' );
|
61 |
|
|
|
|
|
62 |
$skyscraper_mentions = get_option( 'skyscraper_mentions' );
|
63 |
|
|
|
|
|
64 |
//$sociable_post_types = array(); //Set This blank here, won't work before init
|
65 |
|
|
|
|
|
66 |
//$sociable_taxonomies = array(); //Same Here
|
|
|
67 |
/*
|
68 |
|
|
|
|
|
69 |
* General Init Function
|
70 |
|
|
|
|
|
71 |
*/
|
|
|
72 |
function sociable_init(){
|
73 |
|
|
|
|
|
74 |
wp_enqueue_script('jquery');
|
75 |
|
|
|
|
|
76 |
global $sociable_post_types, $sociable_taxonomies, $sociable_options, $skyscraper_options;
|
77 |
|
|
|
|
|
78 |
$import_call_asyn = true;
|
79 |
|
|
|
|
|
80 |
$url_shares = $_SERVER["REQUEST_URI"];
|
|
|
81 |
if (strpos($url_shares, "wp-admin")){
|
82 |
|
|
|
|
|
83 |
if (strpos($url_shares, "wp-admin") && !strpos($url_shares, "page=skyscraper_options")){
|
|
|
84 |
$import_call_asyn = false;
|
85 |
|
|
|
|
|
86 |
}
|
87 |
|
|
|
|
|
88 |
}
|
89 |
|
|
|
|
|
90 |
else{
|
|
|
91 |
if (!isset($skyscraper_options["active"])){
|
|
|
92 |
$import_call_asyn = false;
|
93 |
|
|
|
|
|
94 |
}
|
95 |
|
|
|
|
|
96 |
}
|
97 |
|
|
|
|
|
98 |
if ($import_call_asyn){
|
|
|
99 |
wp_enqueue_script( 'async_call' , SOCIABLE_HTTP_PATH . 'js/async_call.js' );
|
100 |
|
|
|
|
|
101 |
wp_enqueue_script( 'oplugin' , SOCIABLE_HTTP_PATH . 'js/oPlugin.js' );
|
102 |
|
|
|
|
|
103 |
wp_enqueue_style( "skyscraper_style_shape",SOCIABLE_HTTP_PATH."css/shape.css");
|
104 |
|
|
|
|
|
105 |
wp_enqueue_style( "skyscraper_style_toolbar", SOCIABLE_HTTP_PATH."css/toolbar.css");
|
106 |
|
|
|
|
|
107 |
|
108 |
|
|
|
|
|
109 |
}
|
110 |
|
111 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
|
113 |
if (!isset($skyscraper_options['accept_read_twitter'])){
|
114 |
|
|
|
|
|
115 |
//skyscraper_reset();
|
|
|
116 |
}
|
|
|
117 |
|
|
|
118 |
|
|
|
119 |
load_plugin_textdomain( 'sociable', false, dirname( plugin_basename( __FILE__ ) )."/languages" );
|
120 |
|
|
|
|
|
121 |
$active_sites = ( isset( $sociable_options['active_sites'] ) ) ? $sociable_options['active_sites'] : array() ;
|
122 |
|
|
|
|
|
123 |
//Set The Post Types
|
|
|
124 |
$sociable_post_types = Sociable_Globals::sociable_get_post_types();
|
|
|
125 |
//Set The Custom Taxonomies
|
|
|
126 |
$sociable_taxonomies = Sociable_Globals::sociable_get_taxonomies();
|
|
|
127 |
wp_enqueue_script( 'sociable' , SOCIABLE_HTTP_PATH . 'js/sociable.js' );
|
128 |
|
|
|
|
|
129 |
wp_enqueue_script( 'addtofavourites' , SOCIABLE_HTTP_PATH . 'js/addtofavorites.js' );
|
130 |
|
|
|
|
|
131 |
if( ! is_admin() ){
|
|
|
132 |
//Load Up The Front Of Site CSS And JS
|
|
|
133 |
if( array_key_exists( 'Add to favorites' , $active_sites ) ){
|
|
|
134 |
// wp_enqueue_script( 'addtofavourites' , SOCIABLE_HTTP_PATH . 'js/addtofavorites.js' );
|
135 |
|
|
|
|
|
136 |
}
|
137 |
|
|
|
|
|
138 |
if( isset( $sociable_options['use_stylesheet'] ) ){
|
|
|
139 |
wp_enqueue_style( 'sociablecss' , SOCIABLE_HTTP_PATH . 'css/sociable.css' );
|
140 |
|
|
|
|
|
141 |
}
|
142 |
|
|
|
|
|
143 |
}
|
144 |
|
|
|
|
|
145 |
}
|
|
|
146 |
/*
|
147 |
|
|
|
|
|
148 |
* Hooks And Filters
|
149 |
|
|
|
|
|
150 |
*/
|
|
|
151 |
add_action( 'admin_init' , array( 'sociable_Admin_Options' , 'init' ) );
|
152 |
|
|
|
|
|
153 |
add_action( 'admin_menu' , array( 'sociable_Admin_Options' , 'add_menu_pages' ) );
|
154 |
|
|
|
|
|
155 |
add_action( 'save_post' , array( 'sociable_Admin_Options' , 'save_post' ) );
|
156 |
|
|
|
|
|
157 |
add_action( 'init' , 'sociable_init' );
|
158 |
|
|
|
|
|
159 |
add_action( 'wp_head' , 'sociable_init_async' );
|
160 |
|
|
|
|
|
161 |
function sociable_init_async(){
|
|
|
162 |
echo "<script type='text/javascript'>";
|
163 |
|
|
|
|
|
164 |
echo "var base_url_sociable = '".SOCIABLE_HTTP_PATH."'";
|
165 |
|
|
|
|
|
166 |
echo "</script><script type='text/javascript' src='http://apis.google.com/js/plusone.js'></script>";
|
167 |
|
|
|
|
|
168 |
}
|
|
|
169 |
add_filter( 'the_content', 'auto_sociable' );
|
|
|
170 |
//add_filter( 'get_pages', 'auto_skyscraper' );
|
171 |
|
|
|
|
|
172 |
//add_filter( 'the_excerpt', 'auto_skyscraper' );
|
173 |
|
|
|
|
|
174 |
add_filter( 'the_excerpt', 'auto_sociable' );
|
175 |
|
|
|
|
|
176 |
register_activation_hook(__FILE__, 'sociable_activate' );
|
177 |
|
|
|
|
|
178 |
register_deactivation_hook( __FILE__, 'sociable_deactivate' );
|
179 |
|
|
|
|
|
180 |
/*
|
181 |
|
|
|
|
|
182 |
* Activation Function
|
183 |
|
|
|
|
|
184 |
*/
|
|
|
185 |
function sociable_activate(){
|
186 |
|
|
|
|
|
187 |
if( ! get_option( 'sociable_options' ) ){
|
|
|
188 |
return sociable_reset();
|
189 |
|
|
|
|
|
190 |
}
|
191 |
|
|
|
|
|
192 |
}
|
|
|
193 |
/*
|
194 |
|
|
|
|
|
195 |
* Reset Function
|
196 |
|
|
|
|
|
197 |
*/
|
|
|
198 |
function sociable_reset(){
|
|
|
199 |
global $wpdb;
|
|
|
200 |
//reset all data to factory defaults, install if is there.
|
201 |
|
|
|
|
|
202 |
//Delete All Metadata From The Database ?
|
|
|
203 |
$wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = '_sociableoff'");
|
|
|
204 |
$sociable_options = array(
|
205 |
-
|
|
|
|
|
|
|
206 |
|
207 |
'automatic_mode' => 'on',
|
208 |
|
|
|
|
|
209 |
'tagline' => 'Be Sociable, Share!',
|
210 |
|
|
|
|
|
211 |
'custom_image_directory' => '',
|
212 |
|
|
|
|
|
213 |
'use_stylesheet' => 'on',
|
214 |
|
|
|
|
|
215 |
'use_images' => 'on',
|
216 |
|
|
|
|
|
217 |
'use_alphamask' => 'on',
|
218 |
|
|
|
|
|
219 |
'new_window' => 'on',
|
220 |
|
221 |
-
|
|
|
|
|
|
|
|
|
222 |
|
223 |
'locations' => array(
|
224 |
|
|
|
|
|
225 |
'is_single' => 'on',
|
226 |
|
|
|
|
|
227 |
'is_page' => 'on'
|
228 |
|
|
|
|
|
229 |
),
|
230 |
|
|
|
|
|
231 |
'active_sites' => array(
|
232 |
|
|
|
|
|
233 |
'Twitter' => 'on',
|
234 |
|
|
|
|
|
235 |
'Facebook' => 'on',
|
236 |
|
|
|
|
|
237 |
'email'=>'on',
|
238 |
|
|
|
|
|
239 |
'Add to favorites'=>'on',
|
240 |
|
|
|
|
|
241 |
'StumbleUpon' =>'on',
|
242 |
|
|
|
|
|
243 |
'Delicious' =>'on',
|
244 |
|
|
|
|
|
245 |
'Google Reader' =>'on',
|
246 |
|
|
|
|
|
247 |
'LinkedIn' => 'on',
|
248 |
|
|
|
|
|
249 |
'BlinkList' =>'on',
|
250 |
|
|
|
|
|
251 |
'More' => 'on',
|
252 |
|
|
|
|
|
253 |
'Twitter Counter' =>'on',
|
254 |
|
|
|
|
|
255 |
'Facebook Counter' =>'on',
|
256 |
|
|
|
|
|
257 |
'Google +' =>'on',
|
258 |
|
|
|
|
|
259 |
'LinkedIn Counter' =>'on',
|
260 |
|
|
|
|
|
261 |
'StumbleUpon Counter' =>'on'
|
262 |
|
|
|
|
|
263 |
),
|
264 |
|
|
|
|
|
265 |
'icon_size' => '32',
|
266 |
|
|
|
|
|
267 |
'icon_option' => 'option1',
|
268 |
|
269 |
-
|
|
|
|
|
|
|
|
|
270 |
|
271 |
);
|
|
|
272 |
$sociable_known_sites = array(
|
|
|
273 |
'Facebook' => array(
|
274 |
|
275 |
-
|
|
|
|
|
|
|
|
|
276 |
|
277 |
'url' => 'http://www.facebook.com/share.php?u=PERMALINK&t=TITLE',
|
278 |
|
|
|
|
|
279 |
'spriteCoordinates' => Array(
|
280 |
|
|
|
|
|
281 |
'16' => array("-48px","0px"),
|
282 |
|
|
|
|
|
283 |
'32' => array("-96px","0px"),
|
284 |
|
|
|
|
|
285 |
'48' => array("-144px","0px"),
|
286 |
|
|
|
|
|
287 |
'64' => array("-192px","0px")
|
288 |
|
|
|
|
|
289 |
)
|
290 |
|
|
|
|
|
291 |
),
|
292 |
|
|
|
|
|
293 |
'Facebook Counter' => array(
|
294 |
|
|
|
|
|
295 |
'counter' =>1,
|
296 |
|
|
|
|
|
297 |
'favicon' => 'likecounter.png',
|
298 |
|
|
|
|
|
299 |
'url' => '<iframe src="http://www.facebook.com/plugins/like.php?href=PERMALINKCOUNT&send=false&layout=button_count&show_faces=false&action=like&colorscheme=light&font" scrolling="no" frameborder="0" style="border:none; overflow:hidden;height:32px;width:100px" allowTransparency="true"></iframe>',
|
300 |
|
|
|
|
|
301 |
'spriteCoordinates' => Array(
|
302 |
|
|
|
|
|
303 |
'16' => array("-48px","0px"),
|
304 |
|
|
|
|
|
305 |
'32' => array("-96px","0px"),
|
306 |
|
|
|
|
|
307 |
'48' => array("-144px","0px"),
|
308 |
|
|
|
|
|
309 |
'64' => array("-192px","0px")
|
310 |
|
|
|
|
|
311 |
)
|
312 |
|
|
|
|
|
313 |
),
|
|
|
314 |
'Myspace' => array(
|
315 |
|
|
|
|
|
316 |
'favicon' => 'myspace.png',
|
317 |
|
|
|
|
|
318 |
'url' => 'http://www.myspace.com/Modules/PostTo/Pages/?u=PERMALINK&t=TITLE',
|
319 |
|
|
|
|
|
320 |
'spriteCoordinates' => Array(
|
321 |
|
|
|
|
|
322 |
'16' => array("0px","-16px"),
|
323 |
|
|
|
|
|
324 |
'32' => array("0px","-32px"),
|
325 |
|
|
|
|
|
326 |
'48' => array("0px","-48px"),
|
327 |
|
|
|
|
|
328 |
'64' => array("0px","-64px")
|
329 |
|
|
|
|
|
330 |
)
|
331 |
|
|
|
|
|
332 |
),
|
|
|
333 |
'Twitter' => array(
|
334 |
|
|
|
|
|
335 |
'favicon' => 'twitter.png',
|
336 |
|
337 |
-
|
|
|
|
|
|
|
|
|
338 |
|
339 |
'spriteCoordinates' => Array(
|
340 |
|
|
|
|
|
341 |
'16' => array("-144px","-16px"),
|
342 |
|
|
|
|
|
343 |
'32' => array("-288px","-32px"),
|
344 |
|
|
|
|
|
345 |
'48' => array("-432px","-48px"),
|
346 |
|
|
|
|
|
347 |
'64' => array("-576px","-64px")
|
348 |
|
|
|
|
|
349 |
)
|
350 |
|
|
|
|
|
351 |
),
|
|
|
352 |
'Twitter Counter' => array(
|
353 |
|
|
|
|
|
354 |
'counter' =>1,
|
355 |
|
|
|
|
|
356 |
'favicon' => 'twitter.png',
|
357 |
|
358 |
-
|
|
|
|
|
|
|
|
|
359 |
|
360 |
'spriteCoordinates' => Array(
|
361 |
|
|
|
|
|
362 |
'16' => array("-144px","-16px"),
|
363 |
|
|
|
|
|
364 |
'32' => array("-288px","-32px"),
|
365 |
|
|
|
|
|
366 |
'48' => array("-432px","-48px"),
|
367 |
|
|
|
|
|
368 |
'64' => array("-576px","-64px")
|
369 |
|
|
|
|
|
370 |
)
|
371 |
|
|
|
|
|
372 |
),
|
373 |
|
|
|
|
|
374 |
'LinkedIn' => array(
|
375 |
|
|
|
|
|
376 |
'favicon' => 'linkedin.png',
|
377 |
|
|
|
|
|
378 |
'url' => 'http://www.linkedin.com/shareArticle?mini=true&url=PERMALINK&title=TITLE&source=BLOGNAME&summary=EXCERPT',
|
379 |
|
|
|
|
|
380 |
'spriteCoordinates' => Array(
|
381 |
|
|
|
|
|
382 |
'16' => array("-144px","0px"),
|
383 |
|
|
|
|
|
384 |
'32' => array("-288px","0px"),
|
385 |
|
|
|
|
|
386 |
'48' => array("-432px","0px"),
|
387 |
|
|
|
|
|
388 |
'64' => array("-576px","0px")
|
389 |
|
|
|
|
|
390 |
)
|
391 |
|
|
|
|
|
392 |
),
|
|
|
393 |
'LinkedIn Counter' => array(
|
394 |
|
|
|
|
|
395 |
'counter'=>1,
|
396 |
|
|
|
|
|
397 |
'favicon' => 'linkedin.png',
|
398 |
|
|
|
|
|
399 |
'url' => '<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-url="PERMALINKCOUNT" data-counter="right"></script>',
|
400 |
|
|
|
|
|
401 |
'spriteCoordinates' => Array(
|
|
|
402 |
'16' => array("-144px","0px"),
|
403 |
|
|
|
|
|
404 |
'32' => array("-288px","0px"),
|
405 |
|
|
|
|
|
406 |
'48' => array("-432px","0px"),
|
407 |
|
|
|
|
|
408 |
'64' => array("-576px","0px")
|
409 |
|
|
|
|
|
410 |
)
|
411 |
|
|
|
|
|
412 |
),
|
|
|
413 |
'Delicious' => array(
|
|
|
414 |
'favicon' => 'delicious.png',
|
415 |
|
|
|
|
|
416 |
'url' => 'http://delicious.com/post?url=PERMALINK&title=TITLE&notes=EXCERPT',
|
417 |
|
|
|
|
|
418 |
'spriteCoordinates' => Array(
|
419 |
|
|
|
|
|
420 |
'16' => array("-16px","0px"),
|
421 |
|
|
|
|
|
422 |
'32' => array("-32px","0px"),
|
423 |
|
|
|
|
|
424 |
'48' => array("-48px","0px"),
|
425 |
|
|
|
|
|
426 |
'64' => array("-64px","0px")
|
427 |
|
|
|
|
|
428 |
)
|
429 |
|
|
|
|
|
430 |
),
|
|
|
431 |
'Digg' => array(
|
|
|
432 |
'favicon' => 'digg.png',
|
433 |
|
|
|
|
|
434 |
'url' => 'http://digg.com/submit?phase=2&url=PERMALINK&title=TITLE&bodytext=EXCERPT',
|
435 |
|
|
|
|
|
436 |
'spriteCoordinates' => Array(
|
437 |
|
|
|
|
|
438 |
'16' => array("-32px","0px"),
|
439 |
|
|
|
|
|
440 |
'32' => array("-64px","0px"),
|
441 |
|
|
|
|
|
442 |
'48' => array("-96px","0px"),
|
443 |
|
|
|
|
|
444 |
'64' => array("-128px","0px")
|
445 |
|
|
|
|
|
446 |
)
|
447 |
|
|
|
|
|
448 |
),
|
449 |
|
|
|
|
|
450 |
'Digg Counter' => array(
|
451 |
|
|
|
|
|
452 |
'counter' =>1,
|
453 |
|
|
|
|
|
454 |
'favicon' => 'digg.png',
|
455 |
|
|
|
|
|
456 |
'url' => "<script type='text/javascript'>(function() {var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];s.type = 'text/javascript';s.async = true;s.src = 'http://widgets.digg.com/buttons.js';s1.parentNode.insertBefore(s, s1);})();</script><a href='http://digg.com/submit?url=PERMALINK&title=TITLE' class='DiggThisButton DiggCompact'></a>",
|
|
|
457 |
'spriteCoordinates' => Array(
|
458 |
|
|
|
|
|
459 |
'16' => array("-32px","0px"),
|
460 |
|
|
|
|
|
461 |
'32' => array("-64px","0px"),
|
462 |
|
|
|
|
|
463 |
'48' => array("-96px","0px"),
|
464 |
|
|
|
|
|
465 |
'64' => array("-128px","0px")
|
466 |
|
|
|
|
|
467 |
)
|
468 |
|
|
|
|
|
469 |
),
|
|
|
470 |
'Reddit' => array(
|
|
|
471 |
'favicon' => 'reddit.png',
|
472 |
|
|
|
|
|
473 |
|
474 |
|
|
|
|
|
475 |
'url' => 'http://reddit.com/submit?url=PERMALINK&title=TITLE',
|
476 |
|
|
|
|
|
477 |
'spriteCoordinates' => Array(
|
478 |
|
|
|
|
|
479 |
'16' => array("-64px","-16px"),
|
480 |
|
|
|
|
|
481 |
'32' => array("-128px","-32px"),
|
482 |
|
|
|
|
|
483 |
'48' => array("-192px","-48px"),
|
484 |
|
|
|
|
|
485 |
'64' => array("-256px","-64px")
|
486 |
|
|
|
|
|
487 |
)
|
488 |
|
|
|
|
|
489 |
),
|
490 |
|
|
|
|
|
491 |
|
492 |
|
|
|
|
|
493 |
'StumbleUpon' => array(
|
494 |
|
|
|
|
|
495 |
'favicon' => 'stumbleupon.png',
|
496 |
|
|
|
|
|
497 |
'url' => 'http://www.stumbleupon.com/submit?url=PERMALINK&title=TITLE',
|
498 |
|
|
|
|
|
499 |
'spriteCoordinates' => Array(
|
500 |
|
|
|
|
|
501 |
'16' => array("-112px","-16px"),
|
502 |
|
|
|
|
|
503 |
'32' => array("-224px","-32px"),
|
504 |
|
|
|
|
|
505 |
'48' => array("-336px","-48px"),
|
506 |
|
|
|
|
|
507 |
'64' => array("-448px","-64px")
|
508 |
|
|
|
|
|
509 |
)),
|
510 |
|
|
|
|
|
511 |
|
512 |
|
|
|
|
|
513 |
'StumbleUpon Counter' => array(
|
514 |
|
|
|
|
|
515 |
'counter' =>1,
|
516 |
|
|
|
|
|
517 |
'favicon' => 'stumbleupon.png',
|
518 |
|
|
|
|
|
519 |
'url' => '<script src="http://www.stumbleupon.com/hostedbadge.php?s=2&r=PERMALINKCOUNT"></script>',
|
520 |
|
|
|
|
|
521 |
'spriteCoordinates' => Array(
|
522 |
|
|
|
|
|
523 |
'16' => array("-112px","-16px"),
|
524 |
|
|
|
|
|
525 |
'32' => array("-224px","-32px"),
|
526 |
|
|
|
|
|
527 |
'48' => array("-336px","-48px"),
|
528 |
|
|
|
|
|
529 |
'64' => array("-448px","-64px")
|
530 |
|
|
|
|
|
531 |
)
|
532 |
|
|
|
|
|
533 |
),
|
534 |
|
|
|
|
|
535 |
'Google Bookmarks' => Array (
|
536 |
|
|
|
|
|
537 |
'favicon' => 'google.png',
|
538 |
|
|
|
|
|
539 |
'url' => 'http://www.google.com/bookmarks/mark?op=edit&bkmk=PERMALINK&title=TITLE&annotation=EXCERPT',
|
540 |
|
|
|
|
|
541 |
'description' => 'Google Bookmarks',
|
542 |
|
|
|
|
|
543 |
'spriteCoordinates' => Array(
|
544 |
|
|
|
|
|
545 |
'16' => array("-96px","0px"),
|
546 |
|
|
|
|
|
547 |
'32' => array("-192px","0px"),
|
548 |
|
|
|
|
|
549 |
'48' => array("-288px","0px"),
|
550 |
|
|
|
|
|
551 |
'64' => array("-384px","0px")
|
552 |
|
|
|
|
|
553 |
)
|
554 |
|
|
|
|
|
555 |
),
|
556 |
|
|
|
|
|
557 |
|
558 |
|
|
|
|
|
559 |
'Google +' => Array (
|
560 |
|
|
|
|
|
561 |
|
562 |
|
|
|
|
|
563 |
'counter' =>1,
|
564 |
|
|
|
|
|
565 |
'favicon' => 'google.png',
|
566 |
|
|
|
|
|
567 |
/* 'url' => '<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
|
568 |
|
|
|
|
|
569 |
<g:plusone annotation="bubble" size="medium"></g:plusone>',*/
|
570 |
|
|
|
|
|
571 |
'url' => '<g:plusone annotation="bubble" href="PERMALINKCOUNT" size="medium"></g:plusone>',
|
572 |
|
|
|
|
|
573 |
/*
|
574 |
|
|
|
|
|
575 |
<script type="text/javascript">
|
576 |
|
|
|
|
|
577 |
window.___gcfg = {
|
578 |
|
|
|
|
|
579 |
lang: \'en-US\'
|
580 |
|
|
|
|
|
581 |
};
|
582 |
|
|
|
|
|
583 |
(function() {
|
584 |
|
|
|
|
|
585 |
var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;
|
586 |
|
|
|
|
|
587 |
po.src = \'https://apis.google.com/js/plusone.js\';
|
588 |
|
|
|
|
|
589 |
var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);
|
590 |
|
|
|
|
|
591 |
})();
|
592 |
|
|
|
|
|
593 |
</script>
|
594 |
|
|
|
|
|
595 |
',*/
|
596 |
|
|
|
|
|
597 |
'description' => 'Google Bookmarks',
|
598 |
|
|
|
|
|
599 |
'spriteCoordinates' => Array(
|
600 |
|
|
|
|
|
601 |
'16' => array("-96px","0px"),
|
602 |
|
|
|
|
|
603 |
'32' => array("-192px","0px"),
|
604 |
|
|
|
|
|
605 |
'48' => array("-288px","0px"),
|
606 |
|
|
|
|
|
607 |
'64' => array("-384px","0px")
|
608 |
|
|
|
|
|
609 |
)
|
610 |
|
|
|
|
|
611 |
),
|
612 |
|
|
|
|
|
613 |
|
614 |
|
|
|
|
|
615 |
'HackerNews' => Array(
|
616 |
|
|
|
|
|
617 |
'favicon' => 'hacker_news.png',
|
618 |
|
|
|
|
|
619 |
'url' => 'http://news.ycombinator.com/submitlink?u=PERMALINK&t=TITLE',
|
620 |
|
|
|
|
|
621 |
'spriteCoordinates' => Array(
|
622 |
|
|
|
|
|
623 |
'16' => array("-128px","0px"),
|
624 |
|
|
|
|
|
625 |
'32' => array("-256px","0px"),
|
626 |
|
|
|
|
|
627 |
'48' => array("-384px","0px"),
|
628 |
|
|
|
|
|
629 |
'64' => array("-512px","0px")
|
630 |
|
|
|
|
|
631 |
)
|
632 |
|
|
|
|
|
633 |
),
|
634 |
|
|
|
|
|
635 |
'MSNReporter' => Array(
|
636 |
|
|
|
|
|
637 |
'favicon' => 'msn.png',
|
638 |
|
|
|
|
|
639 |
'url' => 'http://reporter.es.msn.com/?fn=contribute&Title=TITLE&URL=PERMALINK&cat_id=6&tag_id=31&Remark=EXCERPT',
|
640 |
|
|
|
|
|
641 |
'description' => 'MSN Reporter',
|
642 |
|
|
|
|
|
643 |
'spriteCoordinates' => Array(
|
644 |
|
|
|
|
|
645 |
'16' => array("-176px","0px"),
|
646 |
|
|
|
|
|
647 |
'32' => array("-352px","0px"),
|
648 |
|
|
|
|
|
649 |
'48' => array("-528px","0px"),
|
650 |
|
|
|
|
|
651 |
'64' => array("-704px","0px")
|
652 |
|
|
|
|
|
653 |
)
|
654 |
|
|
|
|
|
655 |
),
|
656 |
|
|
|
|
|
657 |
|
658 |
|
|
|
|
|
659 |
'BlinkList' => Array(
|
660 |
|
|
|
|
|
661 |
'favicon' => 'blinklist.png',
|
662 |
|
|
|
|
|
663 |
'url' => 'http://www.blinklist.com/index.php?Action=Blink/addblink.php&Url=PERMALINK&Title=TITLE',
|
664 |
|
|
|
|
|
665 |
'spriteCoordinates' => Array(
|
666 |
|
|
|
|
|
667 |
'16' => array("0px","0px"),
|
668 |
|
|
|
|
|
669 |
'32' => array("0px","0px"),
|
670 |
|
|
|
|
|
671 |
'48' => array("0px","0px"),
|
672 |
|
|
|
|
|
673 |
'64' => array("0px","0px")
|
674 |
|
|
|
|
|
675 |
),
|
676 |
|
|
|
|
|
677 |
'supportsIframe' => false,
|
678 |
|
|
|
|
|
679 |
),
|
680 |
|
|
|
|
|
681 |
'Sphinn' => Array(
|
682 |
|
|
|
|
|
683 |
'favicon' => 'sphinn.png',
|
684 |
|
|
|
|
|
685 |
'url' => 'http://sphinn.com/index.php?c=post&m=submit&link=PERMALINK',
|
686 |
|
|
|
|
|
687 |
'spriteCoordinates' => Array(
|
688 |
|
|
|
|
|
689 |
'16' => array("-96px","-16px"),
|
690 |
|
|
|
|
|
691 |
'32' => array("-192px","-32px"),
|
692 |
|
|
|
|
|
693 |
'48' => array("-288px","-48px"),
|
694 |
|
|
|
|
|
695 |
'64' => array("-384px","-64px")
|
696 |
|
|
|
|
|
697 |
)
|
698 |
|
|
|
|
|
699 |
),
|
700 |
|
|
|
|
|
701 |
|
702 |
|
|
|
|
|
703 |
'Posterous' => Array(
|
704 |
|
|
|
|
|
705 |
'favicon' => 'posterous.png',
|
706 |
|
|
|
|
|
707 |
'url' => 'http://posterous.com/share?linkto=PERMALINK&title=TITLE&selection=EXCERPT',
|
708 |
|
|
|
|
|
709 |
'spriteCoordinates' => Array(
|
710 |
|
|
|
|
|
711 |
'16' => array("-32px","-16px"),
|
712 |
|
|
|
|
|
713 |
'32' => array("-64px","-32px"),
|
714 |
|
|
|
|
|
715 |
'48' => array("-96px","-48px"),
|
716 |
|
|
|
|
|
717 |
'64' => array("-128px","-64px")
|
718 |
|
|
|
|
|
719 |
)
|
720 |
|
|
|
|
|
721 |
),
|
722 |
|
|
|
|
|
723 |
'Tumblr' => Array(
|
724 |
|
|
|
|
|
725 |
'favicon' => 'tumblr.png',
|
726 |
|
|
|
|
|
727 |
'url' => 'http://www.tumblr.com/share?v=3&u=PERMALINK&t=TITLE&s=EXCERPT',
|
728 |
|
|
|
|
|
729 |
'spriteCoordinates' => Array(
|
730 |
|
|
|
|
|
731 |
'16' => array("-128px","-16px"),
|
732 |
|
|
|
|
|
733 |
'32' => array("-256px","-32px"),
|
734 |
|
|
|
|
|
735 |
'48' => array("-384px","-48px"),
|
736 |
|
|
|
|
|
737 |
'64' => array("-512px","-64px")
|
738 |
|
|
|
|
|
739 |
),
|
740 |
|
|
|
|
|
741 |
'supportsIframe' => false
|
742 |
|
|
|
|
|
743 |
),
|
744 |
|
|
|
|
|
745 |
'email' => Array(
|
746 |
|
|
|
|
|
747 |
'favicon' => 'gmail.png',
|
748 |
|
|
|
|
|
749 |
'url' => 'https://mail.google.com/mail/?view=cm&fs=1&to&su=TITLE&body=PERMALINK&ui=2&tf=1&shva=1',
|
750 |
|
|
|
|
|
751 |
'spriteCoordinates' => Array(
|
752 |
|
|
|
|
|
753 |
'16' => array("-80px","0px"),
|
754 |
|
|
|
|
|
755 |
'32' => array("-160px","0px"),
|
756 |
|
|
|
|
|
757 |
'48' => array("-240px","0px"),
|
758 |
|
|
|
|
|
759 |
'64' => array("-320px","0px")
|
760 |
|
|
|
|
|
761 |
),
|
762 |
|
|
|
|
|
763 |
'supportsIframe' => false
|
764 |
|
765 |
-
|
|
|
|
|
|
|
|
|
766 |
|
767 |
|
768 |
|
|
|
|
|
769 |
'Google Reader' => array (
|
770 |
|
|
|
|
|
771 |
'favicon' => 'googlebuzz.png',
|
772 |
|
|
|
|
|
773 |
'url' => 'http://www.google.com/reader/link?url=PERMALINK&title=TITLE&srcURL=PERMALINK&srcTitle=BLOGNAME',
|
774 |
|
|
|
|
|
775 |
'spriteCoordinates' => Array(
|
776 |
|
|
|
|
|
777 |
'16' => array("-112px","0px"),
|
778 |
|
|
|
|
|
779 |
'32' => array("-224px","0px"),
|
780 |
|
|
|
|
|
781 |
'48' => array("-336px","0px"),
|
782 |
|
|
|
|
|
783 |
'64' => array("-448px","0px")
|
784 |
|
|
|
|
|
785 |
)
|
786 |
|
|
|
|
|
787 |
),
|
788 |
|
|
|
|
|
789 |
'Add to favorites' => array(
|
790 |
|
|
|
|
|
791 |
'favicon' => 'favorites.png',
|
792 |
|
|
|
|
|
793 |
'url' => 'javascript:AddToFavorites();',
|
794 |
|
|
|
|
|
795 |
'spriteCoordinates' => Array(
|
796 |
|
|
|
|
|
797 |
'16' => array("-64px","0px"),
|
798 |
|
|
|
|
|
799 |
'32' => array("-128px","0px"),
|
800 |
|
|
|
|
|
801 |
'48' => array("-192px","0px"),
|
802 |
|
|
|
|
|
803 |
'64' => array("-256px","0px")
|
804 |
|
|
|
|
|
805 |
)
|
806 |
|
|
|
|
|
807 |
),
|
808 |
|
|
|
|
|
809 |
'More' => array(
|
810 |
|
|
|
|
|
811 |
'favicon' => 'more.png',
|
812 |
|
|
|
|
|
813 |
'url' => 'javascript:more();',
|
814 |
|
|
|
|
|
815 |
'spriteCoordinates' => Array(
|
816 |
|
|
|
|
|
817 |
'16' => array("0px","0px"),
|
818 |
|
|
|
|
|
819 |
'32' => array("0px","0px"),
|
820 |
|
|
|
|
|
821 |
'48' => array("0px","0px"),
|
822 |
|
|
|
|
|
823 |
'64' => array("0px","0px")
|
824 |
|
|
|
|
|
825 |
)
|
826 |
|
|
|
|
|
827 |
),
|
828 |
|
|
|
|
|
829 |
);
|
|
|
830 |
|
|
|
831 |
|
|
|
832 |
//Update will create if it doesn't exist.
|
833 |
|
|
|
|
|
834 |
|
|
|
835 |
update_option( 'sociable_known_sites' , $sociable_known_sites );
|
|
|
836 |
update_option( 'sociable_options' , $sociable_options );
|
|
|
837 |
update_option( 'sociable_helpus' , 1);
|
|
|
838 |
}
|
839 |
|
|
|
|
|
840 |
function skyscraper_reset(){
|
841 |
|
|
|
|
|
842 |
$skyscraper_options = array(
|
|
|
843 |
"version" => "1.0",
|
|
|
844 |
"widget_width" => "60px",
|
|
|
845 |
"widget_position" => "1",
|
|
|
846 |
"background_color" => "#fefefe",
|
|
|
847 |
"labels_color" => "#f7f7f7",
|
|
|
848 |
"text_size" => "10px",
|
|
|
849 |
"counters" => array("check" => "0",
|
|
|
850 |
"folded" => "0"),
|
|
|
851 |
"share" => array("check" => "0",
|
|
|
852 |
"folded" => "0"),
|
|
|
853 |
"num_tweets" => 3,
|
|
|
854 |
"num_rss" =>3,
|
|
|
855 |
"locations" => array("is_front_page" => 1,
|
|
|
856 |
"is_home" => 1,
|
|
|
857 |
"is_single" => 1,
|
|
|
858 |
"is_page" => 1,
|
|
|
859 |
"is_category" => 1,
|
|
|
860 |
"is_date" => 1,
|
|
|
861 |
"is_tag" => 1,
|
|
|
862 |
"is_author" => 1,
|
|
|
863 |
"is_search" => 1,
|
|
|
864 |
"is_rss" => 1 ),
|
|
|
865 |
|
|
|
866 |
"counters" => array("check" => 1,
|
|
|
867 |
"folded" => 1),
|
|
|
868 |
"share" => array("check" => 1,
|
|
|
869 |
"folded" => 1),
|
870 |
|
|
|
|
|
871 |
"sociable_banner" => "",
|
872 |
|
|
|
|
|
873 |
"sociable_banner_timer" => 15,
|
874 |
|
|
|
|
|
875 |
"sociable_banner_text" => 'Please spread the word: Be Sociable, Share!',
|
876 |
|
|
|
|
|
877 |
"sociable_banner_colorBack" => '#FFFFFF',
|
878 |
|
|
|
|
|
879 |
"sociable_banner_fontSize" => '9px',
|
880 |
|
|
|
|
|
881 |
"sociable_banner_colorLabel" => '#F7F7F7',
|
|
|
882 |
|
|
|
883 |
"sociable_banner_colorFont" => '#6A6A6A',
|
|
|
884 |
|
|
|
885 |
"accept_read_twitter" => '',
|
|
|
886 |
|
|
|
887 |
"accept_read_rss" => ''
|
|
|
888 |
);
|
889 |
|
|
|
|
|
890 |
update_option( 'skyscraper_options' , $skyscraper_options );
|
|
|
891 |
|
|
|
892 |
|
|
|
893 |
$skyscraper_latest = array();
|
|
|
894 |
update_option("skyscraper_latest",$skyscraper_latest );
|
|
|
895 |
|
|
|
896 |
$skyscraper_mentions = array();
|
|
|
897 |
update_option("skyscraper_mentions",$skyscraper_mentions );
|
|
|
898 |
}
|
899 |
|
|
|
|
|
900 |
/*
|
|
|
901 |
* De-Activate Function
|
|
|
902 |
*/
|
|
|
903 |
function sociable_deactivate(){
|
|
|
904 |
// global $wpdb;
|
|
|
905 |
// //Delete The Metadata
|
|
|
906 |
// $wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = '_sociableoff'");
|
|
|
907 |
// //delete The Options
|
|
|
908 |
// return delete_option( 'sociable_options' );
|
|
|
909 |
}
|
910 |
|
|
|
|
|
911 |
/*
|
|
|
912 |
* Function To Completely Remove The Options
|
|
|
913 |
*/
|
|
|
914 |
function sociable_2_remove(){
|
|
|
915 |
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
|
|
|
916 |
|
|
|
917 |
global $wpdb;
|
|
|
918 |
//Delete The Metadata
|
|
|
919 |
$wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = '_sociableoff'");
|
|
|
920 |
//delete The Options
|
|
|
921 |
delete_option( 'sociable_options' );
|
|
|
922 |
delete_option( 'skyscraper_options' );
|
|
|
923 |
|
|
|
924 |
|
925 |
|
|
|
|
|
926 |
deactivate_plugins( array( 'sociable/sociable.php' ) );
|
|
|
927 |
wp_redirect( '/wp-admin/plugins.php?deactivate=true' );
|
|
|
928 |
}
|
929 |
|
|
|
|
|
930 |
/*
|
|
|
931 |
* Generic Plugin Wide Functions
|
|
|
932 |
*/
|
|
|
933 |
function _get_sociable_image_path(){
|
934 |
|
|
|
|
|
935 |
global $sociable_options;
|
936 |
|
|
|
|
|
937 |
|
938 |
|
|
|
|
|
939 |
if( empty( $sociable_options['custom_icons'] )){
|
940 |
|
|
|
|
|
941 |
if ($sociable_options['icon_option'] !="option6"){
|
942 |
|
|
|
|
|
943 |
$path = trailingslashit( SOCIABLE_HTTP_PATH . 'images/'.$sociable_options['icon_option']."/" . $sociable_options['icon_size'] );
|
944 |
|
|
|
|
|
945 |
}else{
|
946 |
|
|
|
|
|
947 |
|
948 |
|
|
|
|
|
949 |
$path = trailingslashit( SOCIABLE_HTTP_PATH . 'images/original/');
|
950 |
|
|
|
|
|
951 |
}
|
952 |
|
|
|
|
|
953 |
} else {
|
954 |
|
|
|
|
|
955 |
$path = trailingslashit( SOCIABLE_HTTP_PATH . 'images/customIcons/');
|
956 |
|
|
|
|
|
957 |
}
|
958 |
|
|
|
|
|
959 |
|
960 |
|
|
|
|
|
961 |
|
962 |
|
|
|
|
|
963 |
return $path;
|
964 |
|
|
|
|
|
965 |
}
|
966 |
|
|
|
|
|
967 |
function _get_sociable_image( $site, $description ){
|
968 |
|
|
|
|
|
969 |
global $sociable_options;
|
970 |
|
|
|
|
|
971 |
$imageclass = '';
|
|
|
972 |
$imagestyle = '';
|
|
|
973 |
$imagepath = _get_sociable_image_path();
|
|
|
974 |
//Get The Source Of The Image
|
|
|
975 |
if ( ! isset( $site['spriteCoordinates'] ) || ! isset( $sociable_options['use_sprites'] ) || is_feed() ) {
|
976 |
|
|
|
|
|
977 |
if ( strpos( $site['favicon'], 'http' ) === 0 ) {
|
|
|
978 |
$imagesource = $site['favicon'];
|
|
|
979 |
} else {
|
|
|
980 |
$imagesource = $imagepath.$site['favicon'];
|
|
|
981 |
}
|
982 |
|
|
|
|
|
983 |
} else {
|
984 |
|
|
|
|
|
985 |
$imagesource = $imagepath . "services-sprite.gif";
|
|
|
986 |
$services_sprite_url = $imagepath . "sprite.png";
|
987 |
|
|
|
|
|
988 |
$spriteCoords = $site['spriteCoordinates'];
|
|
|
989 |
|
|
|
990 |
$size = $sociable_options['icon_size'];
|
991 |
|
|
|
|
|
992 |
$imagestyle = 'width: ' . $size . 'px; height: ' . $size . 'px; background: transparent url(' . $services_sprite_url . ') no-repeat; background-position:' . $spriteCoords[$size] . 'px 0';
|
993 |
|
|
|
|
|
994 |
}
|
|
|
995 |
|
996 |
|
|
|
|
|
997 |
if( isset( $sociable_options['use_alphamask'] ) ){
|
|
|
998 |
$imageclass .= 'sociable-hovers';
|
|
|
999 |
}
|
1000 |
|
|
|
|
|
1001 |
//If A Class Has Been Specified, Ensure It Is Added To The Class Attribute.
|
|
|
1002 |
if ( isset( $site['class'] ) ) {
|
|
|
1003 |
$imageclass .= 'sociable_' . $site['class'];
|
|
|
1004 |
}
|
|
|
1005 |
|
|
|
1006 |
if( $imagestyle != '' ){
|
|
|
1007 |
$imagestyle = 'style="' . $imagestyle . '"';
|
|
|
1008 |
}
|
|
|
1009 |
if ($sociable_options['icon_option'] !="option6"){
|
1010 |
|
|
|
|
|
1011 |
$image = '<img src="' . $imagesource . '" title="' . $description . '" alt="' . $description . '"' . $imagestyle . ' />' ;
|
1012 |
|
|
|
|
|
1013 |
}else{
|
1014 |
|
|
|
|
|
1015 |
$image = '<img class="' . $imageclass . '" src="' . $imagesource . '" title="' . $description . '" alt="' . $description . '"' . $imagestyle . ' />' ;
|
1016 |
|
|
|
|
|
1017 |
}
|
|
|
1018 |
|
|
|
1019 |
return $image;
|
|
|
1020 |
}
|
1021 |
|
|
|
|
|
1022 |
?>
|
1 |
<?php
|
2 |
/*
|
|
|
3 |
Plugin Name: Sociable
|
|
|
4 |
Plugin URI: http://blogplay.com/plugin
|
|
|
5 |
Description: Automatically add links on your posts, pages and RSS feed to your favorite social bookmarking sites.
|
6 |
+
Version: 4.2.8
|
|
|
|
|
7 |
Author: Blogplay
|
|
|
8 |
Author URI: http://blogplay.com/
|
|
|
9 |
Copyright 2006 Peter Harkins (ph@malaprop.org)
|
|
|
10 |
Copyright 2008-2009 Joost de Valk (joost@yoast.com)
|
|
|
11 |
Copyright 2009-Present Blogplay.com (info@blogplay.com)
|
12 |
|
13 |
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
|
17 |
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
18 |
*/
|
19 |
|
20 |
+
|
21 |
+
|
22 |
/*
|
23 |
+
|
24 |
* Define Some Paths
|
25 |
+
|
26 |
*/
|
27 |
|
28 |
+
|
29 |
+
|
30 |
define( 'SOCIABLE_HTTP_PATH' , WP_PLUGIN_URL . '/' . str_replace(basename( __FILE__) , "" , plugin_basename(__FILE__) ) );
|
31 |
+
|
32 |
define( 'SOCIABLE_ABSPATH' , WP_PLUGIN_DIR . '/' . str_replace(basename( __FILE__) , "" , plugin_basename(__FILE__) ) );
|
33 |
+
|
34 |
/*
|
35 |
|
36 |
+
|
37 |
+
|
38 |
* Includes
|
39 |
|
40 |
+
|
41 |
+
|
42 |
*/
|
43 |
|
44 |
+
|
45 |
+
|
46 |
include 'includes/class-sociable_Admin_Options.php';
|
47 |
|
48 |
+
|
49 |
+
|
50 |
include("includes/skyscraper_output.php");
|
51 |
|
52 |
+
|
53 |
+
|
54 |
include 'includes/class-Sociable_Globals.php';
|
55 |
|
56 |
+
|
57 |
+
|
58 |
include 'includes/sociable_output.php';
|
59 |
|
60 |
+
|
61 |
+
|
62 |
/*
|
63 |
|
64 |
+
|
65 |
+
|
66 |
* Global Variables
|
67 |
|
68 |
+
|
69 |
+
|
70 |
*/
|
71 |
+
|
72 |
//$sociable_known_sites = Sociable_Globals::default_sites();
|
73 |
|
74 |
+
|
75 |
+
|
76 |
$sociable_options = get_option( 'sociable_options' );
|
77 |
|
78 |
+
|
79 |
+
|
80 |
$skyscraper_options = get_option( 'skyscraper_options' );
|
81 |
|
82 |
+
|
83 |
+
|
84 |
$skyscraper_latest = get_option( 'skyscraper_latest' );
|
85 |
|
86 |
+
|
87 |
+
|
88 |
$skyscraper_mentions = get_option( 'skyscraper_mentions' );
|
89 |
|
90 |
+
|
91 |
+
|
92 |
//$sociable_post_types = array(); //Set This blank here, won't work before init
|
93 |
|
94 |
+
|
95 |
+
|
96 |
//$sociable_taxonomies = array(); //Same Here
|
97 |
+
|
98 |
/*
|
99 |
|
100 |
+
|
101 |
+
|
102 |
* General Init Function
|
103 |
|
104 |
+
|
105 |
+
|
106 |
*/
|
107 |
+
|
108 |
function sociable_init(){
|
109 |
|
110 |
+
|
111 |
+
|
112 |
wp_enqueue_script('jquery');
|
113 |
|
114 |
+
|
115 |
+
|
116 |
global $sociable_post_types, $sociable_taxonomies, $sociable_options, $skyscraper_options;
|
117 |
|
118 |
+
|
119 |
+
|
120 |
$import_call_asyn = true;
|
121 |
|
122 |
+
|
123 |
+
|
124 |
$url_shares = $_SERVER["REQUEST_URI"];
|
125 |
+
|
126 |
if (strpos($url_shares, "wp-admin")){
|
127 |
|
128 |
+
|
129 |
+
|
130 |
if (strpos($url_shares, "wp-admin") && !strpos($url_shares, "page=skyscraper_options")){
|
131 |
+
|
132 |
$import_call_asyn = false;
|
133 |
|
134 |
+
|
135 |
+
|
136 |
}
|
137 |
|
138 |
+
|
139 |
+
|
140 |
}
|
141 |
|
142 |
+
|
143 |
+
|
144 |
else{
|
145 |
+
|
146 |
if (!isset($skyscraper_options["active"])){
|
147 |
+
|
148 |
$import_call_asyn = false;
|
149 |
|
150 |
+
|
151 |
+
|
152 |
}
|
153 |
|
154 |
+
|
155 |
+
|
156 |
}
|
157 |
|
158 |
+
|
159 |
+
|
160 |
if ($import_call_asyn){
|
161 |
+
|
162 |
wp_enqueue_script( 'async_call' , SOCIABLE_HTTP_PATH . 'js/async_call.js' );
|
163 |
|
164 |
+
|
165 |
+
|
166 |
wp_enqueue_script( 'oplugin' , SOCIABLE_HTTP_PATH . 'js/oPlugin.js' );
|
167 |
|
168 |
+
|
169 |
+
|
170 |
wp_enqueue_style( "skyscraper_style_shape",SOCIABLE_HTTP_PATH."css/shape.css");
|
171 |
|
172 |
+
|
173 |
+
|
174 |
wp_enqueue_style( "skyscraper_style_toolbar", SOCIABLE_HTTP_PATH."css/toolbar.css");
|
175 |
|
176 |
+
|
177 |
+
|
178 |
|
179 |
|
180 |
+
|
181 |
+
|
182 |
}
|
183 |
|
184 |
+
|
185 |
+
|
186 |
+
if (!isset($sociable_options['icon_size']) || $sociable_options['icon_size'] == "" || !isset($sociable_options['version']) || !isset($sociable_options['blogplay_tags'])){
|
187 |
+
|
188 |
+
sociable_reset();
|
189 |
+
}
|
190 |
+
|
191 |
+
|
192 |
|
193 |
if (!isset($skyscraper_options['accept_read_twitter'])){
|
194 |
|
195 |
+
|
196 |
+
|
197 |
//skyscraper_reset();
|
198 |
+
|
199 |
}
|
200 |
+
|
201 |
|
202 |
+
|
203 |
|
204 |
+
|
205 |
load_plugin_textdomain( 'sociable', false, dirname( plugin_basename( __FILE__ ) )."/languages" );
|
206 |
|
207 |
+
|
208 |
+
|
209 |
$active_sites = ( isset( $sociable_options['active_sites'] ) ) ? $sociable_options['active_sites'] : array() ;
|
210 |
|
211 |
+
|
212 |
+
|
213 |
//Set The Post Types
|
214 |
+
|
215 |
$sociable_post_types = Sociable_Globals::sociable_get_post_types();
|
216 |
+
|
217 |
//Set The Custom Taxonomies
|
218 |
+
|
219 |
$sociable_taxonomies = Sociable_Globals::sociable_get_taxonomies();
|
220 |
+
|
221 |
wp_enqueue_script( 'sociable' , SOCIABLE_HTTP_PATH . 'js/sociable.js' );
|
222 |
|
223 |
+
|
224 |
+
|
225 |
wp_enqueue_script( 'addtofavourites' , SOCIABLE_HTTP_PATH . 'js/addtofavorites.js' );
|
226 |
|
227 |
+
|
228 |
+
|
229 |
if( ! is_admin() ){
|
230 |
+
|
231 |
//Load Up The Front Of Site CSS And JS
|
232 |
+
|
233 |
if( array_key_exists( 'Add to favorites' , $active_sites ) ){
|
234 |
+
|
235 |
// wp_enqueue_script( 'addtofavourites' , SOCIABLE_HTTP_PATH . 'js/addtofavorites.js' );
|
236 |
|
237 |
+
|
238 |
+
|
239 |
}
|
240 |
|
241 |
+
|
242 |
+
|
243 |
if( isset( $sociable_options['use_stylesheet'] ) ){
|
244 |
+
|
245 |
wp_enqueue_style( 'sociablecss' , SOCIABLE_HTTP_PATH . 'css/sociable.css' );
|
246 |
|
247 |
+
|
248 |
+
|
249 |
}
|
250 |
|
251 |
+
|
252 |
+
|
253 |
}
|
254 |
|
255 |
+
|
256 |
+
|
257 |
}
|
258 |
+
|
259 |
/*
|
260 |
|
261 |
+
|
262 |
+
|
263 |
* Hooks And Filters
|
264 |
|
265 |
+
|
266 |
+
|
267 |
*/
|
268 |
+
|
269 |
add_action( 'admin_init' , array( 'sociable_Admin_Options' , 'init' ) );
|
270 |
|
271 |
+
|
272 |
+
|
273 |
add_action( 'admin_menu' , array( 'sociable_Admin_Options' , 'add_menu_pages' ) );
|
274 |
|
275 |
+
|
276 |
+
|
277 |
add_action( 'save_post' , array( 'sociable_Admin_Options' , 'save_post' ) );
|
278 |
|
279 |
+
|
280 |
+
|
281 |
add_action( 'init' , 'sociable_init' );
|
282 |
|
283 |
+
|
284 |
+
|
285 |
add_action( 'wp_head' , 'sociable_init_async' );
|
286 |
|
287 |
+
|
288 |
+
|
289 |
function sociable_init_async(){
|
290 |
+
|
291 |
echo "<script type='text/javascript'>";
|
292 |
|
293 |
+
|
294 |
+
|
295 |
echo "var base_url_sociable = '".SOCIABLE_HTTP_PATH."'";
|
296 |
|
297 |
+
|
298 |
+
|
299 |
echo "</script><script type='text/javascript' src='http://apis.google.com/js/plusone.js'></script>";
|
300 |
|
301 |
+
|
302 |
+
|
303 |
}
|
304 |
+
|
305 |
add_filter( 'the_content', 'auto_sociable' );
|
306 |
+
|
307 |
//add_filter( 'get_pages', 'auto_skyscraper' );
|
308 |
|
309 |
+
|
310 |
+
|
311 |
//add_filter( 'the_excerpt', 'auto_skyscraper' );
|
312 |
|
313 |
+
|
314 |
+
|
315 |
add_filter( 'the_excerpt', 'auto_sociable' );
|
316 |
|
317 |
+
|
318 |
+
|
319 |
register_activation_hook(__FILE__, 'sociable_activate' );
|
320 |
|
321 |
+
|
322 |
+
|
323 |
register_deactivation_hook( __FILE__, 'sociable_deactivate' );
|
324 |
|
325 |
+
|
326 |
+
|
327 |
/*
|
328 |
|
329 |
+
|
330 |
+
|
331 |
* Activation Function
|
332 |
|
333 |
+
|
334 |
+
|
335 |
*/
|
336 |
+
|
337 |
function sociable_activate(){
|
338 |
|
339 |
+
|
340 |
+
|
341 |
if( ! get_option( 'sociable_options' ) ){
|
342 |
+
|
343 |
return sociable_reset();
|
344 |
|
345 |
+
|
346 |
+
|
347 |
}
|
348 |
|
349 |
+
|
350 |
+
|
351 |
}
|
352 |
+
|
353 |
/*
|
354 |
|
355 |
+
|
356 |
+
|
357 |
* Reset Function
|
358 |
|
359 |
+
|
360 |
+
|
361 |
*/
|
362 |
+
|
363 |
function sociable_reset(){
|
364 |
+
|
365 |
global $wpdb;
|
366 |
+
|
367 |
//reset all data to factory defaults, install if is there.
|
368 |
|
369 |
+
|
370 |
+
|
371 |
//Delete All Metadata From The Database ?
|
372 |
+
|
373 |
$wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = '_sociableoff'");
|
374 |
+
|
375 |
$sociable_options = array(
|
376 |
+
|
377 |
+
'blogplay_tags' => 1,
|
378 |
+
|
379 |
+
'version' =>'4.2.8',
|
380 |
|
381 |
'automatic_mode' => 'on',
|
382 |
|
383 |
+
|
384 |
+
|
385 |
'tagline' => 'Be Sociable, Share!',
|
386 |
|
387 |
+
|
388 |
+
|
389 |
'custom_image_directory' => '',
|
390 |
|
391 |
+
|
392 |
+
|
393 |
'use_stylesheet' => 'on',
|
394 |
|
395 |
+
|
396 |
+
|
397 |
'use_images' => 'on',
|
398 |
|
399 |
+
|
400 |
+
|
401 |
'use_alphamask' => 'on',
|
402 |
|
403 |
+
|
404 |
+
|
405 |
'new_window' => 'on',
|
406 |
|
407 |
+
|
408 |
+
|
409 |
+
'help_grow' => '',
|
410 |
+
|
411 |
+
|
412 |
|
413 |
'locations' => array(
|
414 |
|
415 |
+
|
416 |
+
|
417 |
'is_single' => 'on',
|
418 |
|
419 |
+
|
420 |
+
|
421 |
'is_page' => 'on'
|
422 |
|
423 |
+
|
424 |
+
|
425 |
),
|
426 |
|
427 |
+
|
428 |
+
|
429 |
'active_sites' => array(
|
430 |
|
431 |
+
|
432 |
+
|
433 |
'Twitter' => 'on',
|
434 |
|
435 |
+
|
436 |
+
|
437 |
'Facebook' => 'on',
|
438 |
|
439 |
+
|
440 |
+
|
441 |
'email'=>'on',
|
442 |
|
443 |
+
|
444 |
+
|
445 |
'Add to favorites'=>'on',
|
446 |
|
447 |
+
|
448 |
+
|
449 |
'StumbleUpon' =>'on',
|
450 |
|
451 |
+
|
452 |
+
|
453 |
'Delicious' =>'on',
|
454 |
|
455 |
+
|
456 |
+
|
457 |
'Google Reader' =>'on',
|
458 |
|
459 |
+
|
460 |
+
|
461 |
'LinkedIn' => 'on',
|
462 |
|
463 |
+
|
464 |
+
|
465 |
'BlinkList' =>'on',
|
466 |
|
467 |
+
|
468 |
+
|
469 |
'More' => 'on',
|
470 |
|
471 |
+
|
472 |
+
|
473 |
'Twitter Counter' =>'on',
|
474 |
|
475 |
+
|
476 |
+
|
477 |
'Facebook Counter' =>'on',
|
478 |
|
479 |
+
|
480 |
+
|
481 |
'Google +' =>'on',
|
482 |
|
483 |
+
|
484 |
+
|
485 |
'LinkedIn Counter' =>'on',
|
486 |
|
487 |
+
|
488 |
+
|
489 |
'StumbleUpon Counter' =>'on'
|
490 |
|
491 |
+
|
492 |
+
|
493 |
),
|
494 |
|
495 |
+
|
496 |
+
|
497 |
'icon_size' => '32',
|
498 |
|
499 |
+
|
500 |
+
|
501 |
'icon_option' => 'option1',
|
502 |
|
503 |
+
|
504 |
+
|
505 |
+
"active" => 1,
|
506 |
+
|
507 |
+
'linksoptions' => ''
|
508 |
|
509 |
);
|
510 |
+
|
511 |
$sociable_known_sites = array(
|
512 |
+
|
513 |
'Facebook' => array(
|
514 |
|
515 |
+
|
516 |
+
|
517 |
+
'favicon' => 'facebook.png',
|
518 |
+
|
519 |
+
|
520 |
|
521 |
'url' => 'http://www.facebook.com/share.php?u=PERMALINK&t=TITLE',
|
522 |
|
523 |
+
|
524 |
+
|
525 |
'spriteCoordinates' => Array(
|
526 |
|
527 |
+
|
528 |
+
|
529 |
'16' => array("-48px","0px"),
|
530 |
|
531 |
+
|
532 |
+
|
533 |
'32' => array("-96px","0px"),
|
534 |
|
535 |
+
|
536 |
+
|
537 |
'48' => array("-144px","0px"),
|
538 |
|
539 |
+
|
540 |
+
|
541 |
'64' => array("-192px","0px")
|
542 |
|
543 |
+
|
544 |
+
|
545 |
)
|
546 |
|
547 |
+
|
548 |
+
|
549 |
),
|
550 |
|
551 |
+
|
552 |
+
|
553 |
'Facebook Counter' => array(
|
554 |
|
555 |
+
|
556 |
+
|
557 |
'counter' =>1,
|
558 |
|
559 |
+
|
560 |
+
|
561 |
'favicon' => 'likecounter.png',
|
562 |
|
563 |
+
|
564 |
+
|
565 |
'url' => '<iframe src="http://www.facebook.com/plugins/like.php?href=PERMALINKCOUNT&send=false&layout=button_count&show_faces=false&action=like&colorscheme=light&font" scrolling="no" frameborder="0" style="border:none; overflow:hidden;height:32px;width:100px" allowTransparency="true"></iframe>',
|
566 |
|
567 |
+
|
568 |
+
|
569 |
'spriteCoordinates' => Array(
|
570 |
|
571 |
+
|
572 |
+
|
573 |
'16' => array("-48px","0px"),
|
574 |
|
575 |
+
|
576 |
+
|
577 |
'32' => array("-96px","0px"),
|
578 |
|
579 |
+
|
580 |
+
|
581 |
'48' => array("-144px","0px"),
|
582 |
|
583 |
+
|
584 |
+
|
585 |
'64' => array("-192px","0px")
|
586 |
|
587 |
+
|
588 |
+
|
589 |
)
|
590 |
|
591 |
+
|
592 |
+
|
593 |
),
|
594 |
+
|
595 |
'Myspace' => array(
|
596 |
|
597 |
+
|
598 |
+
|
599 |
'favicon' => 'myspace.png',
|
600 |
|
601 |
+
|
602 |
+
|
603 |
'url' => 'http://www.myspace.com/Modules/PostTo/Pages/?u=PERMALINK&t=TITLE',
|
604 |
|
605 |
+
|
606 |
+
|
607 |
'spriteCoordinates' => Array(
|
608 |
|
609 |
+
|
610 |
+
|
611 |
'16' => array("0px","-16px"),
|
612 |
|
613 |
+
|
614 |
+
|
615 |
'32' => array("0px","-32px"),
|
616 |
|
617 |
+
|
618 |
+
|
619 |
'48' => array("0px","-48px"),
|
620 |
|
621 |
+
|
622 |
+
|
623 |
'64' => array("0px","-64px")
|
624 |
|
625 |
+
|
626 |
+
|
627 |
)
|
628 |
|
629 |
+
|
630 |
+
|
631 |
),
|
632 |
+
|
633 |
'Twitter' => array(
|
634 |
|
635 |
+
|
636 |
+
|
637 |
'favicon' => 'twitter.png',
|
638 |
|
639 |
+
|
640 |
+
|
641 |
+
'url' => 'http://twitter.com/intent/tweet?text=TITLE%20-%20PERMALINK%20 SHARETAG',
|
642 |
+
|
643 |
+
|
644 |
|
645 |
'spriteCoordinates' => Array(
|
646 |
|
647 |
+
|
648 |
+
|
649 |
'16' => array("-144px","-16px"),
|
650 |
|
651 |
+
|
652 |
+
|
653 |
'32' => array("-288px","-32px"),
|
654 |
|
655 |
+
|
656 |
+
|
657 |
'48' => array("-432px","-48px"),
|
658 |
|
659 |
+
|
660 |
+
|
661 |
'64' => array("-576px","-64px")
|
662 |
|
663 |
+
|
664 |
+
|
665 |
)
|
666 |
|
667 |
+
|
668 |
+
|
669 |
),
|
670 |
+
|
671 |
'Twitter Counter' => array(
|
672 |
|
673 |
+
|
674 |
+
|
675 |
'counter' =>1,
|
676 |
|
677 |
+
|
678 |
+
|
679 |
'favicon' => 'twitter.png',
|
680 |
|
681 |
+
|
682 |
+
|
683 |
+
'url' => '<a href="https://twitter.com/share" data-text="TITLECOUNT - PERMALINKCOUNT" data-url="PERMALINKCOUNT" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>',
|
684 |
+
|
685 |
+
|
686 |
|
687 |
'spriteCoordinates' => Array(
|
688 |
|
689 |
+
|
690 |
+
|
691 |
'16' => array("-144px","-16px"),
|
692 |
|
693 |
+
|
694 |
+
|
695 |
'32' => array("-288px","-32px"),
|
696 |
|
697 |
+
|
698 |
+
|
699 |
'48' => array("-432px","-48px"),
|
700 |
|
701 |
+
|
702 |
+
|
703 |
'64' => array("-576px","-64px")
|
704 |
|
705 |
+
|
706 |
+
|
707 |
)
|
708 |
|
709 |
+
|
710 |
+
|
711 |
),
|
712 |
|
713 |
+
|
714 |
+
|
715 |
'LinkedIn' => array(
|
716 |
|
717 |
+
|
718 |
+
|
719 |
'favicon' => 'linkedin.png',
|
720 |
|
721 |
+
|
722 |
+
|
723 |
'url' => 'http://www.linkedin.com/shareArticle?mini=true&url=PERMALINK&title=TITLE&source=BLOGNAME&summary=EXCERPT',
|
724 |
|
725 |
+
|
726 |
+
|
727 |
'spriteCoordinates' => Array(
|
728 |
|
729 |
+
|
730 |
+
|
731 |
'16' => array("-144px","0px"),
|
732 |
|
733 |
+
|
734 |
+
|
735 |
'32' => array("-288px","0px"),
|
736 |
|
737 |
+
|
738 |
+
|
739 |
'48' => array("-432px","0px"),
|
740 |
|
741 |
+
|
742 |
+
|
743 |
'64' => array("-576px","0px")
|
744 |
|
745 |
+
|
746 |
+
|
747 |
)
|
748 |
|
749 |
+
|
750 |
+
|
751 |
),
|
752 |
+
|
753 |
'LinkedIn Counter' => array(
|
754 |
|
755 |
+
|
756 |
+
|
757 |
'counter'=>1,
|
758 |
|
759 |
+
|
760 |
+
|
761 |
'favicon' => 'linkedin.png',
|
762 |
|
763 |
+
|
764 |
+
|
765 |
'url' => '<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-url="PERMALINKCOUNT" data-counter="right"></script>',
|
766 |
|
767 |
+
|
768 |
+
|
769 |
'spriteCoordinates' => Array(
|
770 |
+
|
771 |
'16' => array("-144px","0px"),
|
772 |
|
773 |
+
|
774 |
+
|
775 |
'32' => array("-288px","0px"),
|
776 |
|
777 |
+
|
778 |
+
|
779 |
'48' => array("-432px","0px"),
|
780 |
|
781 |
+
|
782 |
+
|
783 |
'64' => array("-576px","0px")
|
784 |
|
785 |
+
|
786 |
+
|
787 |
)
|
788 |
|
789 |
+
|
790 |
+
|
791 |
),
|
792 |
+
|
793 |
'Delicious' => array(
|
794 |
+
|
795 |
'favicon' => 'delicious.png',
|
796 |
|
797 |
+
|
798 |
+
|
799 |
'url' => 'http://delicious.com/post?url=PERMALINK&title=TITLE&notes=EXCERPT',
|
800 |
|
801 |
+
|
802 |
+
|
803 |
'spriteCoordinates' => Array(
|
804 |
|
805 |
+
|
806 |
+
|
807 |
'16' => array("-16px","0px"),
|
808 |
|
809 |
+
|
810 |
+
|
811 |
'32' => array("-32px","0px"),
|
812 |
|
813 |
+
|
814 |
+
|
815 |
'48' => array("-48px","0px"),
|
816 |
|
817 |
+
|
818 |
+
|
819 |
'64' => array("-64px","0px")
|
820 |
|
821 |
+
|
822 |
+
|
823 |
)
|
824 |
|
825 |
+
|
826 |
+
|
827 |
),
|
828 |
+
|
829 |
'Digg' => array(
|
830 |
+
|
831 |
'favicon' => 'digg.png',
|
832 |
|
833 |
+
|
834 |
+
|
835 |
'url' => 'http://digg.com/submit?phase=2&url=PERMALINK&title=TITLE&bodytext=EXCERPT',
|
836 |
|
837 |
+
|
838 |
+
|
839 |
'spriteCoordinates' => Array(
|
840 |
|
841 |
+
|
842 |
+
|
843 |
'16' => array("-32px","0px"),
|
844 |
|
845 |
+
|
846 |
+
|
847 |
'32' => array("-64px","0px"),
|
848 |
|
849 |
+
|
850 |
+
|
851 |
'48' => array("-96px","0px"),
|
852 |
|
853 |
+
|
854 |
+
|
855 |
'64' => array("-128px","0px")
|
856 |
|
857 |
+
|
858 |
+
|
859 |
)
|
860 |
|
861 |
+
|
862 |
+
|
863 |
),
|
864 |
|
865 |
+
|
866 |
+
|
867 |
'Digg Counter' => array(
|
868 |
|
869 |
+
|
870 |
+
|
871 |
'counter' =>1,
|
872 |
|
873 |
+
|
874 |
+
|
875 |
'favicon' => 'digg.png',
|
876 |
|
877 |
+
|
878 |
+
|
879 |
'url' => "<script type='text/javascript'>(function() {var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];s.type = 'text/javascript';s.async = true;s.src = 'http://widgets.digg.com/buttons.js';s1.parentNode.insertBefore(s, s1);})();</script><a href='http://digg.com/submit?url=PERMALINK&title=TITLE' class='DiggThisButton DiggCompact'></a>",
|
880 |
+
|
881 |
'spriteCoordinates' => Array(
|
882 |
|
883 |
+
|
884 |
+
|
885 |
'16' => array("-32px","0px"),
|
886 |
|
887 |
+
|
888 |
+
|
889 |
'32' => array("-64px","0px"),
|
890 |
|
891 |
+
|
892 |
+
|
893 |
'48' => array("-96px","0px"),
|
894 |
|
895 |
+
|
896 |
+
|
897 |
'64' => array("-128px","0px")
|
898 |
|
899 |
+
|
900 |
+
|
901 |
)
|
902 |
|
903 |
+
|
904 |
+
|
905 |
),
|
906 |
+
|
907 |
'Reddit' => array(
|
908 |
+
|
909 |
'favicon' => 'reddit.png',
|
910 |
|
911 |
+
|
912 |
+
|
913 |
|
914 |
|
915 |
+
|
916 |
+
|
917 |
'url' => 'http://reddit.com/submit?url=PERMALINK&title=TITLE',
|
918 |
|
919 |
+
|
920 |
+
|
921 |
'spriteCoordinates' => Array(
|
922 |
|
923 |
+
|
924 |
+
|
925 |
'16' => array("-64px","-16px"),
|
926 |
|
927 |
+
|
928 |
+
|
929 |
'32' => array("-128px","-32px"),
|
930 |
|
931 |
+
|
932 |
+
|
933 |
'48' => array("-192px","-48px"),
|
934 |
|
935 |
+
|
936 |
+
|
937 |
'64' => array("-256px","-64px")
|
938 |
|
939 |
+
|
940 |
+
|
941 |
)
|
942 |
|
943 |
+
|
944 |
+
|
945 |
),
|
946 |
|
947 |
+
|
948 |
+
|
949 |
|
950 |
|
951 |
+
|
952 |
+
|
953 |
'StumbleUpon' => array(
|
954 |
|
955 |
+
|
956 |
+
|
957 |
'favicon' => 'stumbleupon.png',
|
958 |
|
959 |
+
|
960 |
+
|
961 |
'url' => 'http://www.stumbleupon.com/submit?url=PERMALINK&title=TITLE',
|
962 |
|
963 |
+
|
964 |
+
|
965 |
'spriteCoordinates' => Array(
|
966 |
|
967 |
+
|
968 |
+
|
969 |
'16' => array("-112px","-16px"),
|
970 |
|
971 |
+
|
972 |
+
|
973 |
'32' => array("-224px","-32px"),
|
974 |
|
975 |
+
|
976 |
+
|
977 |
'48' => array("-336px","-48px"),
|
978 |
|
979 |
+
|
980 |
+
|
981 |
'64' => array("-448px","-64px")
|
982 |
|
983 |
+
|
984 |
+
|
985 |
)),
|
986 |
|
987 |
+
|
988 |
+
|
989 |
|
990 |
|
991 |
+
|
992 |
+
|
993 |
'StumbleUpon Counter' => array(
|
994 |
|
995 |
+
|
996 |
+
|
997 |
'counter' =>1,
|
998 |
|
999 |
+
|
1000 |
+
|
1001 |
'favicon' => 'stumbleupon.png',
|
1002 |
|
1003 |
+
|
1004 |
+
|
1005 |
'url' => '<script src="http://www.stumbleupon.com/hostedbadge.php?s=2&r=PERMALINKCOUNT"></script>',
|
1006 |
|
1007 |
+
|
1008 |
+
|
1009 |
'spriteCoordinates' => Array(
|
1010 |
|
1011 |
+
|
1012 |
+
|
1013 |
'16' => array("-112px","-16px"),
|
1014 |
|
1015 |
+
|
1016 |
+
|
1017 |
'32' => array("-224px","-32px"),
|
1018 |
|
1019 |
+
|
1020 |
+
|
1021 |
'48' => array("-336px","-48px"),
|
1022 |
|
1023 |
+
|
1024 |
+
|
1025 |
'64' => array("-448px","-64px")
|
1026 |
|
1027 |
+
|
1028 |
+
|
1029 |
)
|
1030 |
|
1031 |
+
|
1032 |
+
|
1033 |
),
|
1034 |
|
1035 |
+
|
1036 |
+
|
1037 |
'Google Bookmarks' => Array (
|
1038 |
|
1039 |
+
|
1040 |
+
|
1041 |
'favicon' => 'google.png',
|
1042 |
|
1043 |
+
|
1044 |
+
|
1045 |
'url' => 'http://www.google.com/bookmarks/mark?op=edit&bkmk=PERMALINK&title=TITLE&annotation=EXCERPT',
|
1046 |
|
1047 |
+
|
1048 |
+
|
1049 |
'description' => 'Google Bookmarks',
|
1050 |
|
1051 |
+
|
1052 |
+
|
1053 |
'spriteCoordinates' => Array(
|
1054 |
|
1055 |
+
|
1056 |
+
|
1057 |
'16' => array("-96px","0px"),
|
1058 |
|
1059 |
+
|
1060 |
+
|
1061 |
'32' => array("-192px","0px"),
|
1062 |
|
1063 |
+
|
1064 |
+
|
1065 |
'48' => array("-288px","0px"),
|
1066 |
|
1067 |
+
|
1068 |
+
|
1069 |
'64' => array("-384px","0px")
|
1070 |
|
1071 |
+
|
1072 |
+
|
1073 |
)
|
1074 |
|
1075 |
+
|
1076 |
+
|
1077 |
),
|
1078 |
|
1079 |
+
|
1080 |
+
|
1081 |
|
1082 |
|
1083 |
+
|
1084 |
+
|
1085 |
'Google +' => Array (
|
1086 |
|
1087 |
+
|
1088 |
+
|
1089 |
|
1090 |
|
1091 |
+
|
1092 |
+
|
1093 |
'counter' =>1,
|
1094 |
|
1095 |
+
|
1096 |
+
|
1097 |
'favicon' => 'google.png',
|
1098 |
|
1099 |
+
|
1100 |
+
|
1101 |
/* 'url' => '<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
|
1102 |
|
1103 |
+
|
1104 |
+
|
1105 |
<g:plusone annotation="bubble" size="medium"></g:plusone>',*/
|
1106 |
|
1107 |
+
|
1108 |
+
|
1109 |
'url' => '<g:plusone annotation="bubble" href="PERMALINKCOUNT" size="medium"></g:plusone>',
|
1110 |
|
1111 |
+
|
1112 |
+
|
1113 |
/*
|
1114 |
|
1115 |
+
|
1116 |
+
|
1117 |
<script type="text/javascript">
|
1118 |
|
1119 |
+
|
1120 |
+
|
1121 |
window.___gcfg = {
|
1122 |
|
1123 |
+
|
1124 |
+
|
1125 |
lang: \'en-US\'
|
1126 |
|
1127 |
+
|
1128 |
+
|
1129 |
};
|
1130 |
|
1131 |
+
|
1132 |
+
|
1133 |
(function() {
|
1134 |
|
1135 |
+
|
1136 |
+
|
1137 |
var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;
|
1138 |
|
1139 |
+
|
1140 |
+
|
1141 |
po.src = \'https://apis.google.com/js/plusone.js\';
|
1142 |
|
1143 |
+
|
1144 |
+
|
1145 |
var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);
|
1146 |
|
1147 |
+
|
1148 |
+
|
1149 |
})();
|
1150 |
|
1151 |
+
|
1152 |
+
|
1153 |
</script>
|
1154 |
|
1155 |
+
|
1156 |
+
|
1157 |
',*/
|
1158 |
|
1159 |
+
|
1160 |
+
|
1161 |
'description' => 'Google Bookmarks',
|
1162 |
|
1163 |
+
|
1164 |
+
|
1165 |
'spriteCoordinates' => Array(
|
1166 |
|
1167 |
+
|
1168 |
+
|
1169 |
'16' => array("-96px","0px"),
|
1170 |
|
1171 |
+
|
1172 |
+
|
1173 |
'32' => array("-192px","0px"),
|
1174 |
|
1175 |
+
|
1176 |
+
|
1177 |
'48' => array("-288px","0px"),
|
1178 |
|
1179 |
+
|
1180 |
+
|
1181 |
'64' => array("-384px","0px")
|
1182 |
|
1183 |
+
|
1184 |
+
|
1185 |
)
|
1186 |
|
1187 |
+
|
1188 |
+
|
1189 |
),
|
1190 |
|
1191 |
+
|
1192 |
+
|
1193 |
|
1194 |
|
1195 |
+
|
1196 |
+
|
1197 |
'HackerNews' => Array(
|
1198 |
|
1199 |
+
|
1200 |
+
|
1201 |
'favicon' => 'hacker_news.png',
|
1202 |
|
1203 |
+
|
1204 |
+
|
1205 |
'url' => 'http://news.ycombinator.com/submitlink?u=PERMALINK&t=TITLE',
|
1206 |
|
1207 |
+
|
1208 |
+
|
1209 |
'spriteCoordinates' => Array(
|
1210 |
|
1211 |
+
|
1212 |
+
|
1213 |
'16' => array("-128px","0px"),
|
1214 |
|
1215 |
+
|
1216 |
+
|
1217 |
'32' => array("-256px","0px"),
|
1218 |
|
1219 |
+
|
1220 |
+
|
1221 |
'48' => array("-384px","0px"),
|
1222 |
|
1223 |
+
|
1224 |
+
|
1225 |
'64' => array("-512px","0px")
|
1226 |
|
1227 |
+
|
1228 |
+
|
1229 |
)
|
1230 |
|
1231 |
+
|
1232 |
+
|
1233 |
),
|
1234 |
|
1235 |
+
|
1236 |
+
|
1237 |
'MSNReporter' => Array(
|
1238 |
|
1239 |
+
|
1240 |
+
|
1241 |
'favicon' => 'msn.png',
|
1242 |
|
1243 |
+
|
1244 |
+
|
1245 |
'url' => 'http://reporter.es.msn.com/?fn=contribute&Title=TITLE&URL=PERMALINK&cat_id=6&tag_id=31&Remark=EXCERPT',
|
1246 |
|
1247 |
+
|
1248 |
+
|
1249 |
'description' => 'MSN Reporter',
|
1250 |
|
1251 |
+
|
1252 |
+
|
1253 |
'spriteCoordinates' => Array(
|
1254 |
|
1255 |
+
|
1256 |
+
|
1257 |
'16' => array("-176px","0px"),
|
1258 |
|
1259 |
+
|
1260 |
+
|
1261 |
'32' => array("-352px","0px"),
|
1262 |
|
1263 |
+
|
1264 |
+
|
1265 |
'48' => array("-528px","0px"),
|
1266 |
|
1267 |
+
|
1268 |
+
|
1269 |
'64' => array("-704px","0px")
|
1270 |
|
1271 |
+
|
1272 |
+
|
1273 |
)
|
1274 |
|
1275 |
+
|
1276 |
+
|
1277 |
),
|
1278 |
|
1279 |
+
|
1280 |
+
|
1281 |
|
1282 |
|
1283 |
+
|
1284 |
+
|
1285 |
'BlinkList' => Array(
|
1286 |
|
1287 |
+
|
1288 |
+
|
1289 |
'favicon' => 'blinklist.png',
|
1290 |
|
1291 |
+
|
1292 |
+
|
1293 |
'url' => 'http://www.blinklist.com/index.php?Action=Blink/addblink.php&Url=PERMALINK&Title=TITLE',
|
1294 |
|
1295 |
+
|
1296 |
+
|
1297 |
'spriteCoordinates' => Array(
|
1298 |
|
1299 |
+
|
1300 |
+
|
1301 |
'16' => array("0px","0px"),
|
1302 |
|
1303 |
+
|
1304 |
+
|
1305 |
'32' => array("0px","0px"),
|
1306 |
|
1307 |
+
|
1308 |
+
|
1309 |
'48' => array("0px","0px"),
|
1310 |
|
1311 |
+
|
1312 |
+
|
1313 |
'64' => array("0px","0px")
|
1314 |
|
1315 |
+
|
1316 |
+
|
1317 |
),
|
1318 |
|
1319 |
+
|
1320 |
+
|
1321 |
'supportsIframe' => false,
|
1322 |
|
1323 |
+
|
1324 |
+
|
1325 |
),
|
1326 |
|
1327 |
+
|
1328 |
+
|
1329 |
'Sphinn' => Array(
|
1330 |
|
1331 |
+
|
1332 |
+
|
1333 |
'favicon' => 'sphinn.png',
|
1334 |
|
1335 |
+
|
1336 |
+
|
1337 |
'url' => 'http://sphinn.com/index.php?c=post&m=submit&link=PERMALINK',
|
1338 |
|
1339 |
+
|
1340 |
+
|
1341 |
'spriteCoordinates' => Array(
|
1342 |
|
1343 |
+
|
1344 |
+
|
1345 |
'16' => array("-96px","-16px"),
|
1346 |
|
1347 |
+
|
1348 |
+
|
1349 |
'32' => array("-192px","-32px"),
|
1350 |
|
1351 |
+
|
1352 |
+
|
1353 |
'48' => array("-288px","-48px"),
|
1354 |
|
1355 |
+
|
1356 |
+
|
1357 |
'64' => array("-384px","-64px")
|
1358 |
|
1359 |
+
|
1360 |
+
|
1361 |
)
|
1362 |
|
1363 |
+
|
1364 |
+
|
1365 |
),
|
1366 |
|
1367 |
+
|
1368 |
+
|
1369 |
|
1370 |
|
1371 |
+
|
1372 |
+
|
1373 |
'Posterous' => Array(
|
1374 |
|
1375 |
+
|
1376 |
+
|
1377 |
'favicon' => 'posterous.png',
|
1378 |
|
1379 |
+
|
1380 |
+
|
1381 |
'url' => 'http://posterous.com/share?linkto=PERMALINK&title=TITLE&selection=EXCERPT',
|
1382 |
|
1383 |
+
|
1384 |
+
|
1385 |
'spriteCoordinates' => Array(
|
1386 |
|
1387 |
+
|
1388 |
+
|
1389 |
'16' => array("-32px","-16px"),
|
1390 |
|
1391 |
+
|
1392 |
+
|
1393 |
'32' => array("-64px","-32px"),
|
1394 |
|
1395 |
+
|
1396 |
+
|
1397 |
'48' => array("-96px","-48px"),
|
1398 |
|
1399 |
+
|
1400 |
+
|
1401 |
'64' => array("-128px","-64px")
|
1402 |
|
1403 |
+
|
1404 |
+
|
1405 |
)
|
1406 |
|
1407 |
+
|
1408 |
+
|
1409 |
),
|
1410 |
|
1411 |
+
|
1412 |
+
|
1413 |
'Tumblr' => Array(
|
1414 |
|
1415 |
+
|
1416 |
+
|
1417 |
'favicon' => 'tumblr.png',
|
1418 |
|
1419 |
+
|
1420 |
+
|
1421 |
'url' => 'http://www.tumblr.com/share?v=3&u=PERMALINK&t=TITLE&s=EXCERPT',
|
1422 |
|
1423 |
+
|
1424 |
+
|
1425 |
'spriteCoordinates' => Array(
|
1426 |
|
1427 |
+
|
1428 |
+
|
1429 |
'16' => array("-128px","-16px"),
|
1430 |
|
1431 |
+
|
1432 |
+
|
1433 |
'32' => array("-256px","-32px"),
|
1434 |
|
1435 |
+
|
1436 |
+
|
1437 |
'48' => array("-384px","-48px"),
|
1438 |
|
1439 |
+
|
1440 |
+
|
1441 |
'64' => array("-512px","-64px")
|
1442 |
|
1443 |
+
|
1444 |
+
|
1445 |
),
|
1446 |
|
1447 |
+
|
1448 |
+
|
1449 |
'supportsIframe' => false
|
1450 |
|
1451 |
+
|
1452 |
+
|
1453 |
),
|
1454 |
|
1455 |
+
|
1456 |
+
|
1457 |
'email' => Array(
|
1458 |
|
1459 |
+
|
1460 |
+
|
1461 |
'favicon' => 'gmail.png',
|
1462 |
|
1463 |
+
|
1464 |
+
|
1465 |
'url' => 'https://mail.google.com/mail/?view=cm&fs=1&to&su=TITLE&body=PERMALINK&ui=2&tf=1&shva=1',
|
1466 |
|
1467 |
+
|
1468 |
+
|
1469 |
'spriteCoordinates' => Array(
|
1470 |
|
1471 |
+
|
1472 |
+
|
1473 |
'16' => array("-80px","0px"),
|
1474 |
|
1475 |
+
|
1476 |
+
|
1477 |
'32' => array("-160px","0px"),
|
1478 |
|
1479 |
+
|
1480 |
+
|
1481 |
'48' => array("-240px","0px"),
|
1482 |
|
1483 |
+
|
1484 |
+
|
1485 |
'64' => array("-320px","0px")
|
1486 |
|
1487 |
+
|
1488 |
+
|
1489 |
),
|
1490 |
|
1491 |
+
|
1492 |
+
|
1493 |
'supportsIframe' => false
|
1494 |
|
1495 |
+
|
1496 |
+
|
1497 |
+
),
|
1498 |
+
|
1499 |
+
|
1500 |
|
1501 |
|
1502 |
|
1503 |
+
|
1504 |
+
|
1505 |
'Google Reader' => array (
|
1506 |
|
1507 |
+
|
1508 |
+
|
1509 |
'favicon' => 'googlebuzz.png',
|
1510 |
|
1511 |
+
|
1512 |
+
|
1513 |
'url' => 'http://www.google.com/reader/link?url=PERMALINK&title=TITLE&srcURL=PERMALINK&srcTitle=BLOGNAME',
|
1514 |
|
1515 |
+
|
1516 |
+
|
1517 |
'spriteCoordinates' => Array(
|
1518 |
|
1519 |
+
|
1520 |
+
|
1521 |
'16' => array("-112px","0px"),
|
1522 |
|
1523 |
+
|
1524 |
+
|
1525 |
'32' => array("-224px","0px"),
|
1526 |
|
1527 |
+
|
1528 |
+
|
1529 |
'48' => array("-336px","0px"),
|
1530 |
|
1531 |
+
|
1532 |
+
|
1533 |
'64' => array("-448px","0px")
|
1534 |
|
1535 |
+
|
1536 |
+
|
1537 |
)
|
1538 |
|
1539 |
+
|
1540 |
+
|
1541 |
),
|
1542 |
|
1543 |
+
|
1544 |
+
|
1545 |
'Add to favorites' => array(
|
1546 |
|
1547 |
+
|
1548 |
+
|
1549 |
'favicon' => 'favorites.png',
|
1550 |
|
1551 |
+
|
1552 |
+
|
1553 |
'url' => 'javascript:AddToFavorites();',
|
1554 |
|
1555 |
+
|
1556 |
+
|
1557 |
'spriteCoordinates' => Array(
|
1558 |
|
1559 |
+
|
1560 |
+
|
1561 |
'16' => array("-64px","0px"),
|
1562 |
|
1563 |
+
|
1564 |
+
|
1565 |
'32' => array("-128px","0px"),
|
1566 |
|
1567 |
+
|
1568 |
+
|
1569 |
'48' => array("-192px","0px"),
|
1570 |
|
1571 |
+
|
1572 |
+
|
1573 |
'64' => array("-256px","0px")
|
1574 |
|
1575 |
+
|
1576 |
+
|
1577 |
)
|
1578 |
|
1579 |
+
|
1580 |
+
|
1581 |
),
|
1582 |
|
1583 |
+
|
1584 |
+
|
1585 |
'More' => array(
|
1586 |
|
1587 |
+
|
1588 |
+
|
1589 |
'favicon' => 'more.png',
|
1590 |
|
1591 |
+
|
1592 |
+
|
1593 |
'url' => 'javascript:more();',
|
1594 |
|
1595 |
+
|
1596 |
+
|
1597 |
'spriteCoordinates' => Array(
|
1598 |
|
1599 |
+
|
1600 |
+
|
1601 |
'16' => array("0px","0px"),
|
1602 |
|
1603 |
+
|
1604 |
+
|
1605 |
'32' => array("0px","0px"),
|
1606 |
|
1607 |
+
|
1608 |
+
|
1609 |
'48' => array("0px","0px"),
|
1610 |
|
1611 |
+
|
1612 |
+
|
1613 |
'64' => array("0px","0px")
|
1614 |
|
1615 |
+
|
1616 |
+
|
1617 |
)
|
1618 |
|
1619 |
+
|
1620 |
+
|
1621 |
),
|
1622 |
|
1623 |
+
|
1624 |
+
|
1625 |
);
|
1626 |
+
|
1627 |
|
1628 |
+
|
1629 |
|
1630 |
+
|
1631 |
//Update will create if it doesn't exist.
|
1632 |
|
1633 |
+
|
1634 |
+
|
1635 |
|
1636 |
+
|
1637 |
update_option( 'sociable_known_sites' , $sociable_known_sites );
|
1638 |
+
|
1639 |
update_option( 'sociable_options' , $sociable_options );
|
1640 |
+
|
1641 |
update_option( 'sociable_helpus' , 1);
|
1642 |
+
|
1643 |
}
|
1644 |
|
1645 |
+
|
1646 |
+
|
1647 |
function skyscraper_reset(){
|
1648 |
|
1649 |
+
|
1650 |
+
|
1651 |
$skyscraper_options = array(
|
1652 |
+
|
1653 |
"version" => "1.0",
|
1654 |
+
|
1655 |
"widget_width" => "60px",
|
1656 |
+
|
1657 |
"widget_position" => "1",
|
1658 |
+
|
1659 |
"background_color" => "#fefefe",
|
1660 |
+
|
1661 |
"labels_color" => "#f7f7f7",
|
1662 |
+
|
1663 |
"text_size" => "10px",
|
1664 |
+
|
1665 |
"counters" => array("check" => "0",
|
1666 |
+
|
1667 |
"folded" => "0"),
|
1668 |
+
|
1669 |
"share" => array("check" => "0",
|
1670 |
+
|
1671 |
"folded" => "0"),
|
1672 |
+
|
1673 |
"num_tweets" => 3,
|
1674 |
+
|
1675 |
"num_rss" =>3,
|
1676 |
+
|
1677 |
"locations" => array("is_front_page" => 1,
|
1678 |
+
|
1679 |
"is_home" => 1,
|
1680 |
+
|
1681 |
"is_single" => 1,
|
1682 |
+
|
1683 |
"is_page" => 1,
|
1684 |
+
|
1685 |
"is_category" => 1,
|
1686 |
+
|
1687 |
"is_date" => 1,
|
1688 |
+
|
1689 |
"is_tag" => 1,
|
1690 |
+
|
1691 |
"is_author" => 1,
|
1692 |
+
|
1693 |
"is_search" => 1,
|
1694 |
+
|
1695 |
"is_rss" => 1 ),
|
1696 |
+
|
1697 |
|
1698 |
+
|
1699 |
"counters" => array("check" => 1,
|
1700 |
+
|
1701 |
"folded" => 1),
|
1702 |
+
|
1703 |
"share" => array("check" => 1,
|
1704 |
+
|
1705 |
"folded" => 1),
|
1706 |
|
1707 |
+
|
1708 |
+
|
1709 |
"sociable_banner" => "",
|
1710 |
|
1711 |
+
|
1712 |
+
|
1713 |
"sociable_banner_timer" => 15,
|
1714 |
|
1715 |
+
|
1716 |
+
|
1717 |
"sociable_banner_text" => 'Please spread the word: Be Sociable, Share!',
|
1718 |
|
1719 |
+
|
1720 |
+
|
1721 |
"sociable_banner_colorBack" => '#FFFFFF',
|
1722 |
|
1723 |
+
|
1724 |
+
|
1725 |
"sociable_banner_fontSize" => '9px',
|
1726 |
|
1727 |
+
|
1728 |
+
|
1729 |
"sociable_banner_colorLabel" => '#F7F7F7',
|
1730 |
+
|
1731 |
|
1732 |
+
|
1733 |
"sociable_banner_colorFont" => '#6A6A6A',
|
1734 |
+
|
1735 |
|
1736 |
+
|
1737 |
"accept_read_twitter" => '',
|
1738 |
+
|
1739 |
|
1740 |
+
|
1741 |
"accept_read_rss" => ''
|
1742 |
+
|
1743 |
);
|
1744 |
|
1745 |
+
|
1746 |
+
|
1747 |
update_option( 'skyscraper_options' , $skyscraper_options );
|
1748 |
+
|
1749 |
|
1750 |
+
|
1751 |
|
1752 |
+
|
1753 |
$skyscraper_latest = array();
|
1754 |
+
|
1755 |
update_option("skyscraper_latest",$skyscraper_latest );
|
1756 |
+
|
1757 |
|
1758 |
+
|
1759 |
$skyscraper_mentions = array();
|
1760 |
+
|
1761 |
update_option("skyscraper_mentions",$skyscraper_mentions );
|
1762 |
+
|
1763 |
}
|
1764 |
|
1765 |
+
|
1766 |
+
|
1767 |
/*
|
1768 |
+
|
1769 |
* De-Activate Function
|
1770 |
+
|
1771 |
*/
|
1772 |
+
|
1773 |
function sociable_deactivate(){
|
1774 |
+
|
1775 |
// global $wpdb;
|
1776 |
+
|
1777 |
// //Delete The Metadata
|
1778 |
+
|
1779 |
// $wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = '_sociableoff'");
|
1780 |
+
|
1781 |
// //delete The Options
|
1782 |
+
|
1783 |
// return delete_option( 'sociable_options' );
|
1784 |
+
|
1785 |
}
|
1786 |
|
1787 |
+
|
1788 |
+
|
1789 |
/*
|
1790 |
+
|
1791 |
* Function To Completely Remove The Options
|
1792 |
+
|
1793 |
*/
|
1794 |
+
|
1795 |
function sociable_2_remove(){
|
1796 |
+
|
1797 |
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
|
1798 |
+
|
1799 |
|
1800 |
+
|
1801 |
global $wpdb;
|
1802 |
+
|
1803 |
//Delete The Metadata
|
1804 |
+
|
1805 |
$wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = '_sociableoff'");
|
1806 |
+
|
1807 |
//delete The Options
|
1808 |
+
|
1809 |
delete_option( 'sociable_options' );
|
1810 |
+
|
1811 |
delete_option( 'skyscraper_options' );
|
1812 |
+
|
1813 |
|
1814 |
+
|
1815 |
|
1816 |
|
1817 |
+
|
1818 |
+
|
1819 |
deactivate_plugins( array( 'sociable/sociable.php' ) );
|
1820 |
+
|
1821 |
wp_redirect( '/wp-admin/plugins.php?deactivate=true' );
|
1822 |
+
|
1823 |
}
|
1824 |
|
1825 |
+
|
1826 |
+
|
1827 |
/*
|
1828 |
+
|
1829 |
* Generic Plugin Wide Functions
|
1830 |
+
|
1831 |
*/
|
1832 |
+
|
1833 |
function _get_sociable_image_path(){
|
1834 |
|
1835 |
+
|
1836 |
+
|
1837 |
global $sociable_options;
|
1838 |
|
1839 |
+
|
1840 |
+
|
1841 |
|
1842 |
|
1843 |
+
|
1844 |
+
|
1845 |
if( empty( $sociable_options['custom_icons'] )){
|
1846 |
|
1847 |
+
|
1848 |
+
|
1849 |
if ($sociable_options['icon_option'] !="option6"){
|
1850 |
|
1851 |
+
|
1852 |
+
|
1853 |
$path = trailingslashit( SOCIABLE_HTTP_PATH . 'images/'.$sociable_options['icon_option']."/" . $sociable_options['icon_size'] );
|
1854 |
|
1855 |
+
|
1856 |
+
|
1857 |
}else{
|
1858 |
|
1859 |
+
|
1860 |
+
|
1861 |
|
1862 |
|
1863 |
+
|
1864 |
+
|
1865 |
$path = trailingslashit( SOCIABLE_HTTP_PATH . 'images/original/');
|
1866 |
|
1867 |
+
|
1868 |
+
|
1869 |
}
|
1870 |
|
1871 |
+
|
1872 |
+
|
1873 |
} else {
|
1874 |
|
1875 |
+
|
1876 |
+
|
1877 |
$path = trailingslashit( SOCIABLE_HTTP_PATH . 'images/customIcons/');
|
1878 |
|
1879 |
+
|
1880 |
+
|
1881 |
}
|
1882 |
|
1883 |
+
|
1884 |
+
|
1885 |
|
1886 |
|
1887 |
+
|
1888 |
+
|
1889 |
|
1890 |
|
1891 |
+
|
1892 |
+
|
1893 |
return $path;
|
1894 |
|
1895 |
+
|
1896 |
+
|
1897 |
}
|
1898 |
|
1899 |
+
|
1900 |
+
|
1901 |
function _get_sociable_image( $site, $description ){
|
1902 |
|
1903 |
+
|
1904 |
+
|
1905 |
global $sociable_options;
|
1906 |
|
1907 |
+
|
1908 |
+
|
1909 |
$imageclass = '';
|
1910 |
+
|
1911 |
$imagestyle = '';
|
1912 |
+
|
1913 |
$imagepath = _get_sociable_image_path();
|
1914 |
+
|
1915 |
//Get The Source Of The Image
|
1916 |
+
|
1917 |
if ( ! isset( $site['spriteCoordinates'] ) || ! isset( $sociable_options['use_sprites'] ) || is_feed() ) {
|
1918 |
|
1919 |
+
|
1920 |
+
|
1921 |
if ( strpos( $site['favicon'], 'http' ) === 0 ) {
|
1922 |
+
|
1923 |
$imagesource = $site['favicon'];
|
1924 |
+
|
1925 |
} else {
|
1926 |
+
|
1927 |
$imagesource = $imagepath.$site['favicon'];
|
1928 |
+
|
1929 |
}
|
1930 |
|
1931 |
+
|
1932 |
+
|
1933 |
} else {
|
1934 |
|
1935 |
+
|
1936 |
+
|
1937 |
$imagesource = $imagepath . "services-sprite.gif";
|
1938 |
+
|
1939 |
$services_sprite_url = $imagepath . "sprite.png";
|
1940 |
|
1941 |
+
|
1942 |
+
|
1943 |
$spriteCoords = $site['spriteCoordinates'];
|
1944 |
+
|
1945 |
|
1946 |
+
|
1947 |
$size = $sociable_options['icon_size'];
|
1948 |
|
1949 |
+
|
1950 |
+
|
1951 |
$imagestyle = 'width: ' . $size . 'px; height: ' . $size . 'px; background: transparent url(' . $services_sprite_url . ') no-repeat; background-position:' . $spriteCoords[$size] . 'px 0';
|
1952 |
|
1953 |
+
|
1954 |
+
|
1955 |
}
|
1956 |
+
|
1957 |
|
1958 |
|
1959 |
+
|
1960 |
+
|
1961 |
if( isset( $sociable_options['use_alphamask'] ) ){
|
1962 |
+
|
1963 |
$imageclass .= 'sociable-hovers';
|
1964 |
+
|
1965 |
}
|
1966 |
|
1967 |
+
|
1968 |
+
|
1969 |
//If A Class Has Been Specified, Ensure It Is Added To The Class Attribute.
|
1970 |
+
|
1971 |
if ( isset( $site['class'] ) ) {
|
1972 |
+
|
1973 |
$imageclass .= 'sociable_' . $site['class'];
|
1974 |
+
|
1975 |
}
|
1976 |
+
|
1977 |
|
1978 |
+
|
1979 |
if( $imagestyle != '' ){
|
1980 |
+
|
1981 |
$imagestyle = 'style="' . $imagestyle . '"';
|
1982 |
+
|
1983 |
}
|
1984 |
+
|
1985 |
if ($sociable_options['icon_option'] !="option6"){
|
1986 |
|
1987 |
+
|
1988 |
+
|
1989 |
$image = '<img src="' . $imagesource . '" title="' . $description . '" alt="' . $description . '"' . $imagestyle . ' />' ;
|
1990 |
|
1991 |
+
|
1992 |
+
|
1993 |
}else{
|
1994 |
|
1995 |
+
|
1996 |
+
|
1997 |
$image = '<img class="' . $imageclass . '" src="' . $imagesource . '" title="' . $description . '" alt="' . $description . '"' . $imagestyle . ' />' ;
|
1998 |
|
1999 |
+
|
2000 |
+
|
2001 |
}
|
2002 |
+
|
2003 |
|
2004 |
+
|
2005 |
return $image;
|
2006 |
+
|
2007 |
}
|
2008 |
|
2009 |
+
|
2010 |
+
|
2011 |
?>
|