Version Description
- Inform users with multiple active subscriptions
- Updated terms and contitions
- Added more links for support in the Feedback and Support sections
- Fixed Facebook Admin ID for Profile and Pages
- Changed the Theme for Squirrly SEO Settings and Advanced sections
- Fixed Typos and Broken Links
Updated the Keyword Research for Long Tail Keyword
Optimized the loading speed in case of poor connection with the API
Pass the SSL issue for API calls
Fixed the Squirrly SEO Weekly audit for free users
Fixed Pay With a Tweet button
Added google.us in Ranking Option
Download this release
Release Info
Developer | cifi |
Plugin | SEO SQUIRRLY™ |
Version | 6.3.1 |
Comparing to | |
See all releases |
Code changes from version 6.2.6 to 6.3.1
- classes/SQ_Action.php +53 -47
- classes/SQ_Ranking.php +10 -3
- classes/SQ_Tools.php +7 -9
- config/paths.php +7 -5
- controllers/SQ_Frontend.php +4 -1
- controllers/SQ_Menu.php +8 -8
- controllers/SQ_Post.php +12 -22
- controllers/SQ_PostsList.php +2 -3
- controllers/SQ_Sitemaps.php +1 -3
- core/SQ_BlockPostsAnalytics/SQ_BlockPostsAnalytics.php +2 -0
- core/SQ_BlockSettings/SQ_BlockSettings.php +4 -0
- core/SQ_BlockSettingsSeo/SQ_BlockSettingsSeo.php +0 -1
- core/SQ_Blockseo/SQ_Blockseo.php +1 -1
- models/SQ_BlockPostsAnalytics.php +16 -4
- models/SQ_BlockSettingsSeo.php +35 -56
- models/SQ_Frontend.php +245 -88
- models/SQ_Post.php +0 -1
- readme.txt +29 -3
- squirrly.php +2 -2
- themes/default/SQ_BlockAccount.php +1 -1
- themes/default/SQ_BlockAffiliate.php +1 -1
- themes/default/SQ_BlockAnalytics.php +1 -1
- themes/default/SQ_BlockDashboard.php +3 -3
- themes/default/SQ_BlockPostsAnalytics.php +35 -16
- themes/default/SQ_BlockSettings.php +28 -9
- themes/default/SQ_BlockSettingsSeo.php +111 -102
- themes/default/SQ_BlockSupport.php +12 -7
- themes/default/SQ_Blocklogin.php +6 -3
- themes/default/css/sq_blockdashboard.css +4 -2
- themes/default/css/sq_global.css +2 -3
- themes/default/css/sq_menu.css +31 -6
- themes/default/css/sq_post.css +14 -5
- themes/default/css/sq_sitemap.xsl +1 -1
- themes/default/css/sq_sitemapindex.xsl +1 -1
- themes/default/img/settings/bgimage.jpg +0 -0
- themes/default/img/sprite.png +0 -0
- themes/default/js/sq_blockdashboard.js +2 -2
- themes/default/js/sq_blocklogin.js +19 -6
- themes/default/js/sq_blocksettings.js +22 -18
- themes/default/js/sq_blocksettingsseo.js +77 -42
- themes/default/js/sq_blocksupport.js +13 -13
- themes/default/js/sq_menu.js +8 -39
classes/SQ_Action.php
CHANGED
@@ -5,12 +5,22 @@
|
|
5 |
*/
|
6 |
class SQ_Action extends SQ_FrontController {
|
7 |
|
8 |
-
/** @var array with all form and ajax actions
|
9 |
var $actions = array();
|
10 |
|
11 |
/** @var array from core config */
|
12 |
private static $config;
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
/**
|
15 |
* The hookAjax is loaded as custom hook in hookController class
|
16 |
*
|
@@ -19,7 +29,7 @@ class SQ_Action extends SQ_FrontController {
|
|
19 |
public function hookInit() {
|
20 |
|
21 |
/* Only if ajax */
|
22 |
-
if (
|
23 |
$this->actions = array();
|
24 |
$this->getActions(((isset($_GET['action']) ? $_GET['action'] : (isset($_POST['action']) ? $_POST['action'] : ''))));
|
25 |
}
|
@@ -32,11 +42,10 @@ class SQ_Action extends SQ_FrontController {
|
|
32 |
*/
|
33 |
public function hookMenu() {
|
34 |
/* Only if post */
|
35 |
-
if (
|
36 |
-
|
|
|
37 |
}
|
38 |
-
$this->actions = array();
|
39 |
-
$this->getActions(((isset($_GET['action']) ? $_GET['action'] : (isset($_POST['action']) ? $_POST['action'] : ''))));
|
40 |
}
|
41 |
|
42 |
/**
|
@@ -55,9 +64,6 @@ class SQ_Action extends SQ_FrontController {
|
|
55 |
"adminlisturl": "' . admin_url('edit.php') . '",
|
56 |
"nonce": "' . wp_create_nonce(_SQ_NONCE_ID_) . '"
|
57 |
}
|
58 |
-
|
59 |
-
if(parseInt(jQuery.fn.jquery.replace(/\./g,"")) < 162)
|
60 |
-
google.load("jquery", "1.6.2");
|
61 |
</script>';
|
62 |
}
|
63 |
|
@@ -67,51 +73,51 @@ class SQ_Action extends SQ_FrontController {
|
|
67 |
* @return void
|
68 |
*/
|
69 |
public function getActions($cur_action) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
if (!file_exists($config_file)) {
|
75 |
-
return;
|
76 |
}
|
77 |
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
/* if there is a single action */
|
87 |
-
if (isset($block['actions']['action']))
|
88 |
-
|
89 |
-
/* if there are more actions for the current block */ {
|
90 |
-
if (!is_array($block['actions']['action'])) {
|
91 |
-
/* add the action in the actions array */
|
92 |
-
if ($block['actions']['action'] == $cur_action) {
|
93 |
-
$this->actions[] = array('class' => $block['name'], 'path' => $block['path']);
|
94 |
-
}
|
95 |
-
} else {
|
96 |
-
/* if there are more actions for the current block */
|
97 |
-
foreach ($block['actions']['action'] as $action) {
|
98 |
-
/* add the actions in the actions array */
|
99 |
-
if ($action == $cur_action) {
|
100 |
$this->actions[] = array('class' => $block['name'], 'path' => $block['path']);
|
101 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
}
|
103 |
}
|
104 |
}
|
105 |
}
|
106 |
}
|
107 |
-
}
|
108 |
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
|
|
115 |
}
|
116 |
}
|
117 |
}
|
@@ -122,8 +128,9 @@ class SQ_Action extends SQ_FrontController {
|
|
122 |
* @param array $args
|
123 |
* @return json | string
|
124 |
*/
|
125 |
-
public static function apiCall($module, $args = array(), $timeout =
|
126 |
$parameters = "";
|
|
|
127 |
|
128 |
if (SQ_Tools::$options['sq_api'] == '' && $module <> 'sq/login' && $module <> 'sq/register') {
|
129 |
return false;
|
@@ -137,7 +144,6 @@ class SQ_Action extends SQ_FrontController {
|
|
137 |
'token' => SQ_Tools::$options['sq_api']);
|
138 |
|
139 |
|
140 |
-
|
141 |
if (is_array($args)) {
|
142 |
$args = array_merge($args, $extra);
|
143 |
} else {
|
@@ -160,8 +166,8 @@ class SQ_Action extends SQ_FrontController {
|
|
160 |
if ($module <> "") {
|
161 |
$module .= "/";
|
162 |
}
|
163 |
-
|
164 |
-
$url = self::cleanUrl(_SQ_API_URL_ . $module . "?" . $parameters);
|
165 |
return SQ_Tools::sq_remote_get($url, array(), array('timeout' => $timeout));
|
166 |
}
|
167 |
|
5 |
*/
|
6 |
class SQ_Action extends SQ_FrontController {
|
7 |
|
8 |
+
/** @var array with all form and ajax actions */
|
9 |
var $actions = array();
|
10 |
|
11 |
/** @var array from core config */
|
12 |
private static $config;
|
13 |
|
14 |
+
|
15 |
+
private function _isAjax() {
|
16 |
+
$url = (isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : false);
|
17 |
+
if ($url && (strpos($url, admin_url('admin-ajax.php', 'relative')) !== false || strpos(admin_url('admin-ajax.php', 'relative'), $url) !== false)) {
|
18 |
+
return true;
|
19 |
+
}
|
20 |
+
|
21 |
+
return false;
|
22 |
+
}
|
23 |
+
|
24 |
/**
|
25 |
* The hookAjax is loaded as custom hook in hookController class
|
26 |
*
|
29 |
public function hookInit() {
|
30 |
|
31 |
/* Only if ajax */
|
32 |
+
if ($this->_isAjax()) {
|
33 |
$this->actions = array();
|
34 |
$this->getActions(((isset($_GET['action']) ? $_GET['action'] : (isset($_POST['action']) ? $_POST['action'] : ''))));
|
35 |
}
|
42 |
*/
|
43 |
public function hookMenu() {
|
44 |
/* Only if post */
|
45 |
+
if (!$this->_isAjax()) {
|
46 |
+
$this->actions = array();
|
47 |
+
$this->getActions(((isset($_GET['action']) ? $_GET['action'] : (isset($_POST['action']) ? $_POST['action'] : ''))));
|
48 |
}
|
|
|
|
|
49 |
}
|
50 |
|
51 |
/**
|
64 |
"adminlisturl": "' . admin_url('edit.php') . '",
|
65 |
"nonce": "' . wp_create_nonce(_SQ_NONCE_ID_) . '"
|
66 |
}
|
|
|
|
|
|
|
67 |
</script>';
|
68 |
}
|
69 |
|
73 |
* @return void
|
74 |
*/
|
75 |
public function getActions($cur_action) {
|
76 |
+
//Let only the logged users to access the actions
|
77 |
+
if (is_admin() || is_network_admin()) {
|
78 |
+
/* if config allready in cache */
|
79 |
+
if (!isset(self::$config)) {
|
80 |
+
$config_file = _SQ_CORE_DIR_ . 'config.xml';
|
81 |
+
if (!file_exists($config_file)) {
|
82 |
+
return;
|
83 |
+
}
|
84 |
|
85 |
+
/* load configuration blocks data from core config files */
|
86 |
+
$data = file_get_contents($config_file);
|
87 |
+
self::$config = json_decode(json_encode((array)simplexml_load_string($data)), 1);
|
|
|
|
|
88 |
}
|
89 |
|
90 |
+
if (is_array(self::$config)) {
|
91 |
+
foreach (self::$config['block'] as $block) {
|
92 |
+
if ($block['active'] == 1) {
|
93 |
+
/* if there is a single action */
|
94 |
+
if (isset($block['actions']['action'])) /* if there are more actions for the current block */ {
|
95 |
+
if (!is_array($block['actions']['action'])) {
|
96 |
+
/* add the action in the actions array */
|
97 |
+
if ($block['actions']['action'] == $cur_action) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
$this->actions[] = array('class' => $block['name'], 'path' => $block['path']);
|
99 |
}
|
100 |
+
} else {
|
101 |
+
/* if there are more actions for the current block */
|
102 |
+
foreach ($block['actions']['action'] as $action) {
|
103 |
+
/* add the actions in the actions array */
|
104 |
+
if ($action == $cur_action) {
|
105 |
+
$this->actions[] = array('class' => $block['name'], 'path' => $block['path']);
|
106 |
+
}
|
107 |
+
}
|
108 |
}
|
109 |
}
|
110 |
}
|
111 |
}
|
112 |
}
|
|
|
113 |
|
114 |
+
/* add the actions in WP */
|
115 |
+
foreach ($this->actions as $actions) {
|
116 |
+
if ($actions['path'] == 'core') {
|
117 |
+
SQ_ObjController::getBlock($actions['class'])->action();
|
118 |
+
} elseif ($actions['path'] == 'controllers') {
|
119 |
+
SQ_ObjController::getController($actions['class'])->action();
|
120 |
+
}
|
121 |
}
|
122 |
}
|
123 |
}
|
128 |
* @param array $args
|
129 |
* @return json | string
|
130 |
*/
|
131 |
+
public static function apiCall($module, $args = array(), $timeout = 10) {
|
132 |
$parameters = "";
|
133 |
+
$scheme = "http:";
|
134 |
|
135 |
if (SQ_Tools::$options['sq_api'] == '' && $module <> 'sq/login' && $module <> 'sq/register') {
|
136 |
return false;
|
144 |
'token' => SQ_Tools::$options['sq_api']);
|
145 |
|
146 |
|
|
|
147 |
if (is_array($args)) {
|
148 |
$args = array_merge($args, $extra);
|
149 |
} else {
|
166 |
if ($module <> "") {
|
167 |
$module .= "/";
|
168 |
}
|
169 |
+
//call it with http to prevent curl issues with ssls
|
170 |
+
$url = self::cleanUrl($scheme . _SQ_API_URL_ . $module . "?" . $parameters);
|
171 |
return SQ_Tools::sq_remote_get($url, array(), array('timeout' => $timeout));
|
172 |
}
|
173 |
|
classes/SQ_Ranking.php
CHANGED
@@ -85,7 +85,8 @@ class SQ_Ranking extends SQ_FrontController
|
|
85 |
*/
|
86 |
public function getGoogleRank()
|
87 |
{
|
88 |
-
|
|
|
89 |
$this->error = '';
|
90 |
|
91 |
if (trim($this->keyword) == '') {
|
@@ -229,7 +230,6 @@ class SQ_Ranking extends SQ_FrontController
|
|
229 |
|
230 |
preg_match_all('/<h3.*?><a href="(.*?)".*?<\/h3>/is', $response, $matches);
|
231 |
|
232 |
-
SQ_Tools::dump($matches[1]);
|
233 |
if (!empty($matches[1])) {
|
234 |
$pos = -1;
|
235 |
foreach ($matches[1] as $index => $url) {
|
@@ -251,9 +251,16 @@ class SQ_Ranking extends SQ_FrontController
|
|
251 |
public function processCron()
|
252 |
{
|
253 |
global $wpdb;
|
254 |
-
|
|
|
255 |
return;
|
256 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
257 |
set_time_limit(3000);
|
258 |
/* Load the Submit Actions Handler */
|
259 |
SQ_ObjController::getController('SQ_Tools', false);
|
85 |
*/
|
86 |
public function getGoogleRank()
|
87 |
{
|
88 |
+
|
89 |
+
@ini_set('open_basedir', null);
|
90 |
$this->error = '';
|
91 |
|
92 |
if (trim($this->keyword) == '') {
|
230 |
|
231 |
preg_match_all('/<h3.*?><a href="(.*?)".*?<\/h3>/is', $response, $matches);
|
232 |
|
|
|
233 |
if (!empty($matches[1])) {
|
234 |
$pos = -1;
|
235 |
foreach ($matches[1] as $index => $url) {
|
251 |
public function processCron()
|
252 |
{
|
253 |
global $wpdb;
|
254 |
+
|
255 |
+
if (get_transient('google_blocked') !== false || SQ_Tools::$options['sq_google_ranksperhour'] == 0) {
|
256 |
return;
|
257 |
}
|
258 |
+
|
259 |
+
if (isset($_SERVER['SERVER_ADDR'])){
|
260 |
+
if (strpos($_SERVER['SERVER_ADDR'], '192.') === 0){
|
261 |
+
return;
|
262 |
+
}
|
263 |
+
}
|
264 |
set_time_limit(3000);
|
265 |
/* Load the Submit Actions Handler */
|
266 |
SQ_ObjController::getController('SQ_Tools', false);
|
classes/SQ_Tools.php
CHANGED
@@ -22,7 +22,7 @@ class SQ_Tools extends SQ_FrontController {
|
|
22 |
|
23 |
self::$options = $this->getOptions();
|
24 |
|
25 |
-
|
26 |
}
|
27 |
|
28 |
public static function getUserID() {
|
@@ -64,7 +64,7 @@ class SQ_Tools extends SQ_FrontController {
|
|
64 |
/**
|
65 |
* Load the Options from user option table in DB
|
66 |
*
|
67 |
-
* @return
|
68 |
*/
|
69 |
public static function getOptions() {
|
70 |
$default = array(
|
@@ -72,7 +72,7 @@ class SQ_Tools extends SQ_FrontController {
|
|
72 |
'sq_api' => '',
|
73 |
'sq_checkedissues' => 0,
|
74 |
'sq_areissues' => 0,
|
75 |
-
'sq_use' =>
|
76 |
'sq_post_types' => array(
|
77 |
'post', 'page', 'product', 'shopp_page_shopp-products'
|
78 |
),
|
@@ -187,6 +187,10 @@ class SQ_Tools extends SQ_FrontController {
|
|
187 |
return $default;
|
188 |
}
|
189 |
|
|
|
|
|
|
|
|
|
190 |
public static function getBriefOptions() {
|
191 |
if ($pageId = get_option('page_on_front')) {
|
192 |
$title = SQ_ObjController::getModel('SQ_Frontend')->getAdvancedMeta($pageId, 'title');
|
@@ -894,15 +898,11 @@ class SQ_Tools extends SQ_FrontController {
|
|
894 |
}
|
895 |
|
896 |
if ($postid > 0) {
|
897 |
-
self::dump("it's a post", $url, $postid);
|
898 |
$frontend->setPost(get_post($postid));
|
899 |
$snippet['title'] = $frontend->getTitle();
|
900 |
$snippet['description'] = $frontend->getDescription();
|
901 |
$snippet['url'] = $url;
|
902 |
-
self::dump($snippet);
|
903 |
} elseif ($url == get_bloginfo('url')) {
|
904 |
-
self::dump("it's main page", $url, get_bloginfo('url'));
|
905 |
-
|
906 |
if (self::$options ['sq_auto_title'] == 1) {
|
907 |
$snippet['title'] = self::$options['sq_fp_title'];
|
908 |
}
|
@@ -911,7 +911,6 @@ class SQ_Tools extends SQ_FrontController {
|
|
911 |
}
|
912 |
|
913 |
$snippet['url'] = $url;
|
914 |
-
self::dump($snippet);
|
915 |
} else {
|
916 |
$length = array('title' => 66,
|
917 |
'description' => 240,
|
@@ -1027,7 +1026,6 @@ class SQ_Tools extends SQ_FrontController {
|
|
1027 |
|
1028 |
echo PHP_EOL . " Load: {$memory_avail} (avail) / {$memory_used}M (used) / {$memory_peak}M (peak)";
|
1029 |
echo " | Time: {$run_time}s | {$pps} req/sec";
|
1030 |
-
echo "<pre>" . print_r($wp_query, true) . "</pre>";
|
1031 |
}
|
1032 |
|
1033 |
public function sq_activate() {
|
22 |
|
23 |
self::$options = $this->getOptions();
|
24 |
|
25 |
+
//$this->checkDebug(); //dev mode
|
26 |
}
|
27 |
|
28 |
public static function getUserID() {
|
64 |
/**
|
65 |
* Load the Options from user option table in DB
|
66 |
*
|
67 |
+
* @return array
|
68 |
*/
|
69 |
public static function getOptions() {
|
70 |
$default = array(
|
72 |
'sq_api' => '',
|
73 |
'sq_checkedissues' => 0,
|
74 |
'sq_areissues' => 0,
|
75 |
+
'sq_use' => 1,
|
76 |
'sq_post_types' => array(
|
77 |
'post', 'page', 'product', 'shopp_page_shopp-products'
|
78 |
),
|
187 |
return $default;
|
188 |
}
|
189 |
|
190 |
+
/**
|
191 |
+
* Send completed tasks from tutorial
|
192 |
+
* @return array
|
193 |
+
*/
|
194 |
public static function getBriefOptions() {
|
195 |
if ($pageId = get_option('page_on_front')) {
|
196 |
$title = SQ_ObjController::getModel('SQ_Frontend')->getAdvancedMeta($pageId, 'title');
|
898 |
}
|
899 |
|
900 |
if ($postid > 0) {
|
|
|
901 |
$frontend->setPost(get_post($postid));
|
902 |
$snippet['title'] = $frontend->getTitle();
|
903 |
$snippet['description'] = $frontend->getDescription();
|
904 |
$snippet['url'] = $url;
|
|
|
905 |
} elseif ($url == get_bloginfo('url')) {
|
|
|
|
|
906 |
if (self::$options ['sq_auto_title'] == 1) {
|
907 |
$snippet['title'] = self::$options['sq_fp_title'];
|
908 |
}
|
911 |
}
|
912 |
|
913 |
$snippet['url'] = $url;
|
|
|
914 |
} else {
|
915 |
$length = array('title' => 66,
|
916 |
'description' => 240,
|
1026 |
|
1027 |
echo PHP_EOL . " Load: {$memory_avail} (avail) / {$memory_used}M (used) / {$memory_peak}M (peak)";
|
1028 |
echo " | Time: {$run_time}s | {$pps} req/sec";
|
|
|
1029 |
}
|
1030 |
|
1031 |
public function sq_activate() {
|
config/paths.php
CHANGED
@@ -6,14 +6,16 @@ define('_SQ_NAME_', 'squirrly');
|
|
6 |
define('_SQ_PLUGIN_NAME_', 'squirrly-seo'); //THIS LINE WILL BE CHANGED WITH THE USER SETTINGS
|
7 |
define('_THEME_NAME_', 'default'); //THIS LINE WILL BE CHANGED WITH THE USER SETTINGS
|
8 |
|
9 |
-
defined('_SQ_DASH_URL_') || define('_SQ_DASH_URL_', 'https://my.squirrly.co/');
|
10 |
$scheme = (((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") || (defined('FORCE_SSL_ADMIN') && FORCE_SSL_ADMIN)) ? 'https:' : 'http:'); //CHECK IF SCURE
|
11 |
-
|
12 |
defined('SQ_URI') || define('SQ_URI', (WP_VERSION_ID >= 3000) ? 'wp350' : 'wp2');
|
13 |
-
defined('_SQ_API_URL_') || define('_SQ_API_URL_',
|
14 |
|
15 |
-
defined('_SQ_STATIC_API_URL_') || define('_SQ_STATIC_API_URL_',
|
16 |
-
defined('
|
|
|
|
|
|
|
17 |
|
18 |
/* Directories */
|
19 |
define('_SQ_ROOT_DIR_', realpath(dirname($currentDir)));
|
6 |
define('_SQ_PLUGIN_NAME_', 'squirrly-seo'); //THIS LINE WILL BE CHANGED WITH THE USER SETTINGS
|
7 |
define('_THEME_NAME_', 'default'); //THIS LINE WILL BE CHANGED WITH THE USER SETTINGS
|
8 |
|
|
|
9 |
$scheme = (((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") || (defined('FORCE_SSL_ADMIN') && FORCE_SSL_ADMIN)) ? 'https:' : 'http:'); //CHECK IF SCURE
|
10 |
+
defined('_SQ_DASH_URL_') || define('_SQ_DASH_URL_', 'https://my.squirrly.co/');
|
11 |
defined('SQ_URI') || define('SQ_URI', (WP_VERSION_ID >= 3000) ? 'wp350' : 'wp2');
|
12 |
+
defined('_SQ_API_URL_') || define('_SQ_API_URL_', '//api.squirrly.co/');
|
13 |
|
14 |
+
defined('_SQ_STATIC_API_URL_') || define('_SQ_STATIC_API_URL_', '//storage.googleapis.com/squirrly/');
|
15 |
+
defined('_SQ_SUPPORT_EMAIL_URL_') || define('_SQ_SUPPORT_EMAIL_URL_', 'http://plugin.squirrly.co/contact/');
|
16 |
+
defined('_SQ_SUPPORT_GOOGLE_URL_') || define('_SQ_SUPPORT_GOOGLE_URL_', 'https://plus.google.com/u/0/communities/104196720668136264985');
|
17 |
+
defined('_SQ_SUPPORT_FACEBOOK_URL_') || define('_SQ_SUPPORT_FACEBOOK_URL_', 'https://www.facebook.com/Squirrly.co');
|
18 |
+
defined('_SQ_SUPPORT_URL_') || define('_SQ_SUPPORT_URL_', _SQ_SUPPORT_FACEBOOK_URL_);
|
19 |
|
20 |
/* Directories */
|
21 |
define('_SQ_ROOT_DIR_', realpath(dirname($currentDir)));
|
controllers/SQ_Frontend.php
CHANGED
@@ -33,6 +33,7 @@ class SQ_Frontend extends SQ_FrontController {
|
|
33 |
add_filter('sq_description', array($this->model, 'clearDescription'));
|
34 |
|
35 |
add_action('plugins_loaded', array($this->model, 'startBuffer'));
|
|
|
36 |
//flush the header with the title and removing duplicates
|
37 |
add_action('wp_head', array($this->model, 'flushHeader'),99);
|
38 |
add_action('shutdown', array($this->model, 'flushHeader'));
|
@@ -55,8 +56,10 @@ class SQ_Frontend extends SQ_FrontController {
|
|
55 |
}
|
56 |
|
57 |
private function _isAjax() {
|
58 |
-
|
|
|
59 |
return true;
|
|
|
60 |
|
61 |
return false;
|
62 |
}
|
33 |
add_filter('sq_description', array($this->model, 'clearDescription'));
|
34 |
|
35 |
add_action('plugins_loaded', array($this->model, 'startBuffer'));
|
36 |
+
add_action('template_redirect', array($this->model, 'checkHandles'));
|
37 |
//flush the header with the title and removing duplicates
|
38 |
add_action('wp_head', array($this->model, 'flushHeader'),99);
|
39 |
add_action('shutdown', array($this->model, 'flushHeader'));
|
56 |
}
|
57 |
|
58 |
private function _isAjax() {
|
59 |
+
$url = (isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : false);
|
60 |
+
if ($url && (strpos($url, admin_url('admin-ajax.php', 'relative')) !== false || strpos(admin_url('admin-ajax.php', 'relative'), $url) !== false)) {
|
61 |
return true;
|
62 |
+
}
|
63 |
|
64 |
return false;
|
65 |
}
|
controllers/SQ_Menu.php
CHANGED
@@ -104,7 +104,7 @@ class SQ_Menu extends SQ_FrontController {
|
|
104 |
));
|
105 |
|
106 |
$this->model->addSubmenu(array('sq_dashboard',
|
107 |
-
ucfirst(_SQ_NAME_) . __('
|
108 |
( (SQ_Tools::$options['sq_api'] == '') ? __('First Step', _SQ_PLUGIN_NAME_) : __('Dashboard', _SQ_PLUGIN_NAME_)) . SQ_Tools::showNotices($dashboard_alert, 'errors_count'),
|
109 |
'edit_posts',
|
110 |
'sq_dashboard',
|
@@ -115,7 +115,7 @@ class SQ_Menu extends SQ_FrontController {
|
|
115 |
//IF SERP PLUGIN IS NOT INSTALLED
|
116 |
if (!class_exists('SRC_Classes_ObjController')){
|
117 |
$this->model->addSubmenu(array('sq_dashboard',
|
118 |
-
ucfirst(_SQ_NAME_) . __('
|
119 |
__('Performance <br />Analytics', _SQ_PLUGIN_NAME_) . SQ_Tools::showNotices($analytics_alert, 'errors_count'),
|
120 |
'edit_posts',
|
121 |
'sq_posts',
|
@@ -126,23 +126,23 @@ class SQ_Menu extends SQ_FrontController {
|
|
126 |
|
127 |
|
128 |
$this->model->addSubmenu(array('sq_dashboard',
|
129 |
-
ucfirst(_SQ_NAME_) . __('
|
130 |
-
__('SEO', _SQ_PLUGIN_NAME_) . SQ_Tools::showNotices(SQ_Tools::$errors_count, 'errors_count'),
|
131 |
'manage_options',
|
132 |
'sq_seo',
|
133 |
array(SQ_ObjController::getBlock('SQ_BlockSettingsSeo'), 'init')
|
134 |
));
|
135 |
|
136 |
$this->model->addSubmenu(array('sq_dashboard',
|
137 |
-
ucfirst(_SQ_NAME_) . __(' Settings', _SQ_PLUGIN_NAME_),
|
138 |
-
__('
|
139 |
'manage_options',
|
140 |
'sq_settings',
|
141 |
array(SQ_ObjController::getBlock('SQ_BlockSettings'), 'init')
|
142 |
));
|
143 |
|
144 |
$this->model->addSubmenu(array('sq_dashboard',
|
145 |
-
ucfirst(_SQ_NAME_) . __('
|
146 |
__('Account Info', _SQ_PLUGIN_NAME_),
|
147 |
'manage_options',
|
148 |
'sq_account',
|
@@ -152,7 +152,7 @@ class SQ_Menu extends SQ_FrontController {
|
|
152 |
|
153 |
$this->model->addSubmenu(array('sq_dashboard',
|
154 |
__('Become an Affiliate with ', _SQ_PLUGIN_NAME_) . ucfirst(_SQ_NAME_),
|
155 |
-
__('Affiliate
|
156 |
'manage_options',
|
157 |
'sq_affiliate',
|
158 |
array(SQ_ObjController::getBlock('SQ_BlockAffiliate'), 'init')
|
104 |
));
|
105 |
|
106 |
$this->model->addSubmenu(array('sq_dashboard',
|
107 |
+
ucfirst(_SQ_NAME_) . __(' Dashboard', _SQ_PLUGIN_NAME_),
|
108 |
( (SQ_Tools::$options['sq_api'] == '') ? __('First Step', _SQ_PLUGIN_NAME_) : __('Dashboard', _SQ_PLUGIN_NAME_)) . SQ_Tools::showNotices($dashboard_alert, 'errors_count'),
|
109 |
'edit_posts',
|
110 |
'sq_dashboard',
|
115 |
//IF SERP PLUGIN IS NOT INSTALLED
|
116 |
if (!class_exists('SRC_Classes_ObjController')){
|
117 |
$this->model->addSubmenu(array('sq_dashboard',
|
118 |
+
ucfirst(_SQ_NAME_) . __(' Performance Analytics', _SQ_PLUGIN_NAME_),
|
119 |
__('Performance <br />Analytics', _SQ_PLUGIN_NAME_) . SQ_Tools::showNotices($analytics_alert, 'errors_count'),
|
120 |
'edit_posts',
|
121 |
'sq_posts',
|
126 |
|
127 |
|
128 |
$this->model->addSubmenu(array('sq_dashboard',
|
129 |
+
ucfirst(_SQ_NAME_) . __(' SEO Settings', _SQ_PLUGIN_NAME_),
|
130 |
+
__('SEO Settings', _SQ_PLUGIN_NAME_) . SQ_Tools::showNotices(SQ_Tools::$errors_count, 'errors_count'),
|
131 |
'manage_options',
|
132 |
'sq_seo',
|
133 |
array(SQ_ObjController::getBlock('SQ_BlockSettingsSeo'), 'init')
|
134 |
));
|
135 |
|
136 |
$this->model->addSubmenu(array('sq_dashboard',
|
137 |
+
ucfirst(_SQ_NAME_) . __(' Advanced Settings', _SQ_PLUGIN_NAME_),
|
138 |
+
__('Advanced', _SQ_PLUGIN_NAME_),
|
139 |
'manage_options',
|
140 |
'sq_settings',
|
141 |
array(SQ_ObjController::getBlock('SQ_BlockSettings'), 'init')
|
142 |
));
|
143 |
|
144 |
$this->model->addSubmenu(array('sq_dashboard',
|
145 |
+
ucfirst(_SQ_NAME_) . __(' Account Info', _SQ_PLUGIN_NAME_),
|
146 |
__('Account Info', _SQ_PLUGIN_NAME_),
|
147 |
'manage_options',
|
148 |
'sq_account',
|
152 |
|
153 |
$this->model->addSubmenu(array('sq_dashboard',
|
154 |
__('Become an Affiliate with ', _SQ_PLUGIN_NAME_) . ucfirst(_SQ_NAME_),
|
155 |
+
__('Affiliate', _SQ_PLUGIN_NAME_),
|
156 |
'manage_options',
|
157 |
'sq_affiliate',
|
158 |
array(SQ_ObjController::getBlock('SQ_BlockAffiliate'), 'init')
|
controllers/SQ_Post.php
CHANGED
@@ -209,26 +209,15 @@ class SQ_Post extends SQ_FrontController {
|
|
209 |
SQ_Action::apiCall('sq/seo/post', $args, 10);
|
210 |
} else {
|
211 |
$process = array();
|
212 |
-
if (
|
213 |
-
$process = json_decode(
|
214 |
}
|
215 |
-
//Add args at the beginning of the process
|
216 |
-
array_unshift($process, $args);
|
217 |
|
218 |
-
|
219 |
-
set_transient('sq_seopost', json_encode($process));
|
220 |
-
|
221 |
-
//prevent lost posts if there are not processed
|
222 |
-
if (count($process) > 5){
|
223 |
-
SQ_Tools::saveOptions('sq_force_savepost', 1);
|
224 |
-
SQ_Action::apiCall('sq/seo/post', $args, 10);
|
225 |
-
}
|
226 |
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
SQ_Action::apiCall('sq/seo/post', $args, 1);
|
231 |
-
}
|
232 |
}
|
233 |
|
234 |
//Save the keyword for this post
|
@@ -331,7 +320,6 @@ class SQ_Post extends SQ_FrontController {
|
|
331 |
$meta[] = array('key' => '_sq_canonical',
|
332 |
'value' => SQ_Tools::getValue('sq_canonical'));
|
333 |
|
334 |
-
SQ_Tools::dump($meta);
|
335 |
$this->model->saveAdvMeta($post_id, $meta);
|
336 |
|
337 |
return $meta;
|
@@ -352,17 +340,19 @@ class SQ_Post extends SQ_FrontController {
|
|
352 |
SQ_ObjController::getController('SQ_Tools', false);
|
353 |
SQ_ObjController::getController('SQ_Action', false);
|
354 |
|
355 |
-
if (
|
356 |
-
$process = json_decode(
|
357 |
foreach ($process as $key => $call) {
|
358 |
|
359 |
-
|
|
|
|
|
360 |
|
361 |
if (isset($response->saved) && $response->saved == true) {
|
362 |
unset($process[$key]);
|
363 |
}
|
364 |
}
|
365 |
-
|
366 |
}
|
367 |
}
|
368 |
|
209 |
SQ_Action::apiCall('sq/seo/post', $args, 10);
|
210 |
} else {
|
211 |
$process = array();
|
212 |
+
if (get_option('sq_seopost') !== false) {
|
213 |
+
$process = json_decode(get_option('sq_seopost'), true);
|
214 |
}
|
|
|
|
|
215 |
|
216 |
+
$process[] = $args;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
|
218 |
+
//save for later send to api
|
219 |
+
update_option('sq_seopost', json_encode($process));
|
220 |
+
wp_schedule_single_event(time(), 'sq_processApi');
|
|
|
|
|
221 |
}
|
222 |
|
223 |
//Save the keyword for this post
|
320 |
$meta[] = array('key' => '_sq_canonical',
|
321 |
'value' => SQ_Tools::getValue('sq_canonical'));
|
322 |
|
|
|
323 |
$this->model->saveAdvMeta($post_id, $meta);
|
324 |
|
325 |
return $meta;
|
340 |
SQ_ObjController::getController('SQ_Tools', false);
|
341 |
SQ_ObjController::getController('SQ_Action', false);
|
342 |
|
343 |
+
if (get_option('sq_seopost') !== false) {
|
344 |
+
$process = json_decode(get_option('sq_seopost'), true);
|
345 |
foreach ($process as $key => $call) {
|
346 |
|
347 |
+
if(!$response = json_decode(SQ_Action::apiCall('sq/seo/post', $call, 10))){
|
348 |
+
break;
|
349 |
+
}
|
350 |
|
351 |
if (isset($response->saved) && $response->saved == true) {
|
352 |
unset($process[$key]);
|
353 |
}
|
354 |
}
|
355 |
+
update_option('sq_seopost', json_encode($process));
|
356 |
}
|
357 |
}
|
358 |
|
controllers/SQ_PostsList.php
CHANGED
@@ -267,7 +267,7 @@ class SQ_PostsList extends SQ_FrontController
|
|
267 |
$posts = SQ_Tools::getValue('posts');
|
268 |
$args['posts'] = join(',', $posts);
|
269 |
|
270 |
-
$response = json_decode(SQ_Action::apiCall('sq/user-analytics/total', $args,
|
271 |
}
|
272 |
if (isset($response) && is_object($response)) {
|
273 |
$response = $this->model->getTotal($response);
|
@@ -297,7 +297,7 @@ class SQ_PostsList extends SQ_FrontController
|
|
297 |
}
|
298 |
}
|
299 |
|
300 |
-
$response = json_decode(SQ_Action::apiCall('sq/user-analytics/detail', $args,
|
301 |
|
302 |
if (!is_object($response)) {
|
303 |
exit(json_encode(array('error' => $response)));
|
@@ -309,7 +309,6 @@ class SQ_PostsList extends SQ_FrontController
|
|
309 |
$analytics->audit = $this->model->getAnalytics($response, $this->model->post_id);
|
310 |
|
311 |
$response = $analytics->init();
|
312 |
-
SQ_Tools::dump($response);
|
313 |
if (SQ_Tools::getValue('sq_debug') === 'on') {
|
314 |
exit();
|
315 |
}
|
267 |
$posts = SQ_Tools::getValue('posts');
|
268 |
$args['posts'] = join(',', $posts);
|
269 |
|
270 |
+
$response = json_decode(SQ_Action::apiCall('sq/user-analytics/total', $args, 20));
|
271 |
}
|
272 |
if (isset($response) && is_object($response)) {
|
273 |
$response = $this->model->getTotal($response);
|
297 |
}
|
298 |
}
|
299 |
|
300 |
+
$response = json_decode(SQ_Action::apiCall('sq/user-analytics/detail', $args, 20));
|
301 |
|
302 |
if (!is_object($response)) {
|
303 |
exit(json_encode(array('error' => $response)));
|
309 |
$analytics->audit = $this->model->getAnalytics($response, $this->model->post_id);
|
310 |
|
311 |
$response = $analytics->init();
|
|
|
312 |
if (SQ_Tools::getValue('sq_debug') === 'on') {
|
313 |
exit();
|
314 |
}
|
controllers/SQ_Sitemaps.php
CHANGED
@@ -107,16 +107,14 @@ class SQ_Sitemaps extends SQ_FrontController {
|
|
107 |
|
108 |
/**
|
109 |
* Show the Sitemap Header
|
110 |
-
* @global integer $blog_id Used for charset
|
111 |
* @param array $include Include schema
|
112 |
*/
|
113 |
public function showSitemapHeader($include = array()) {
|
114 |
@ini_set('memory_limit', apply_filters('admin_memory_limit', WP_MAX_MEMORY_LIMIT));
|
115 |
-
global $blog_id;
|
116 |
|
117 |
header('Status: 200 OK', true, 200);
|
118 |
header('Content-Type: text/xml; charset=' . get_bloginfo('charset'), true);
|
119 |
-
//Generate header
|
120 |
echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?>' . "\n";
|
121 |
echo '<?xml-stylesheet type="text/xsl" href="' . wp_make_link_relative(_SQ_THEME_URL_) . 'css/sq_sitemap' . ($this->model->type == 'sitemap' ? 'index' : '') . '.xsl"?>' . "\n";
|
122 |
echo '<!-- generated-on="' . date('Y-m-d\TH:i:s+00:00') . '" -->' . "\n";
|
107 |
|
108 |
/**
|
109 |
* Show the Sitemap Header
|
|
|
110 |
* @param array $include Include schema
|
111 |
*/
|
112 |
public function showSitemapHeader($include = array()) {
|
113 |
@ini_set('memory_limit', apply_filters('admin_memory_limit', WP_MAX_MEMORY_LIMIT));
|
|
|
114 |
|
115 |
header('Status: 200 OK', true, 200);
|
116 |
header('Content-Type: text/xml; charset=' . get_bloginfo('charset'), true);
|
117 |
+
//Generate header
|
118 |
echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?>' . "\n";
|
119 |
echo '<?xml-stylesheet type="text/xsl" href="' . wp_make_link_relative(_SQ_THEME_URL_) . 'css/sq_sitemap' . ($this->model->type == 'sitemap' ? 'index' : '') . '.xsl"?>' . "\n";
|
120 |
echo '<!-- generated-on="' . date('Y-m-d\TH:i:s+00:00') . '" -->' . "\n";
|
core/SQ_BlockPostsAnalytics/SQ_BlockPostsAnalytics.php
CHANGED
@@ -12,6 +12,8 @@ class SQ_BlockPostsAnalytics extends SQ_BlockController {
|
|
12 |
$this->postlist = SQ_ObjController::getController('SQ_PostsList');
|
13 |
|
14 |
$this->model->prepare_items();
|
|
|
|
|
15 |
}
|
16 |
|
17 |
public function getNavigationTop() {
|
12 |
$this->postlist = SQ_ObjController::getController('SQ_PostsList');
|
13 |
|
14 |
$this->model->prepare_items();
|
15 |
+
|
16 |
+
@ini_set('open_basedir', null);
|
17 |
}
|
18 |
|
19 |
public function getNavigationTop() {
|
core/SQ_BlockSettings/SQ_BlockSettings.php
CHANGED
@@ -49,9 +49,13 @@ class SQ_BlockSettings extends SQ_BlockController {
|
|
49 |
|
50 |
SQ_Tools::saveOptions('sq_keyword_help', (int) SQ_Tools::getValue('sq_keyword_help'));
|
51 |
SQ_Tools::saveOptions('sq_keyword_information', (int) SQ_Tools::getValue('sq_keyword_information'));
|
|
|
|
|
|
|
52 |
SQ_Tools::saveOptions('sq_sla', (int) SQ_Tools::getValue('sq_sla'));
|
53 |
SQ_Tools::saveOptions('sq_keywordtag', (int) SQ_Tools::getValue('sq_keywordtag'));
|
54 |
SQ_Tools::saveOptions('sq_local_images', (int) SQ_Tools::getValue('sq_local_images'));
|
|
|
55 |
|
56 |
|
57 |
SQ_Tools::saveOptions('sq_google_wt', SQ_ObjController::getModel('SQ_BlockSettingsSeo')->checkGoogleWTCode(SQ_Tools::getValue('sq_google_wt','',true)));
|
49 |
|
50 |
SQ_Tools::saveOptions('sq_keyword_help', (int) SQ_Tools::getValue('sq_keyword_help'));
|
51 |
SQ_Tools::saveOptions('sq_keyword_information', (int) SQ_Tools::getValue('sq_keyword_information'));
|
52 |
+
SQ_Tools::saveOptions('sq_force_savepost', (int) SQ_Tools::getValue('sq_force_savepost'));
|
53 |
+
|
54 |
+
|
55 |
SQ_Tools::saveOptions('sq_sla', (int) SQ_Tools::getValue('sq_sla'));
|
56 |
SQ_Tools::saveOptions('sq_keywordtag', (int) SQ_Tools::getValue('sq_keywordtag'));
|
57 |
SQ_Tools::saveOptions('sq_local_images', (int) SQ_Tools::getValue('sq_local_images'));
|
58 |
+
SQ_Tools::saveOptions('sq_url_fix', (int) SQ_Tools::getValue('sq_url_fix'));
|
59 |
|
60 |
|
61 |
SQ_Tools::saveOptions('sq_google_wt', SQ_ObjController::getModel('SQ_BlockSettingsSeo')->checkGoogleWTCode(SQ_Tools::getValue('sq_google_wt','',true)));
|
core/SQ_BlockSettingsSeo/SQ_BlockSettingsSeo.php
CHANGED
@@ -33,7 +33,6 @@ class SQ_BlockSettingsSeo extends SQ_BlockController {
|
|
33 |
public function action() {
|
34 |
parent::action();
|
35 |
|
36 |
-
|
37 |
switch (SQ_Tools::getValue('action')) {
|
38 |
|
39 |
case 'sq_settingsseo_update':
|
33 |
public function action() {
|
34 |
parent::action();
|
35 |
|
|
|
36 |
switch (SQ_Tools::getValue('action')) {
|
37 |
|
38 |
case 'sq_settingsseo_update':
|
core/SQ_Blockseo/SQ_Blockseo.php
CHANGED
@@ -16,7 +16,7 @@ class SQ_Blockseo extends SQ_BlockController {
|
|
16 |
var __snippetsavecancel = "' . __('Cancel', _SQ_PLUGIN_NAME_) . '";
|
17 |
var __snippetreset = "' . __('Reset', _SQ_PLUGIN_NAME_) . '";
|
18 |
|
19 |
-
var __snippetcustomize = "' . __('
|
20 |
var __snippetkeyword = "' . __('manage keywords', _SQ_PLUGIN_NAME_) . '";
|
21 |
var __snippetshort = "' . __('Too short', _SQ_PLUGIN_NAME_) . '";
|
22 |
var __snippetlong = "' . __('Too long', _SQ_PLUGIN_NAME_) . '";
|
16 |
var __snippetsavecancel = "' . __('Cancel', _SQ_PLUGIN_NAME_) . '";
|
17 |
var __snippetreset = "' . __('Reset', _SQ_PLUGIN_NAME_) . '";
|
18 |
|
19 |
+
var __snippetcustomize = "' . __('Edit Meta / Open Graph', _SQ_PLUGIN_NAME_) . '";
|
20 |
var __snippetkeyword = "' . __('manage keywords', _SQ_PLUGIN_NAME_) . '";
|
21 |
var __snippetshort = "' . __('Too short', _SQ_PLUGIN_NAME_) . '";
|
22 |
var __snippetlong = "' . __('Too long', _SQ_PLUGIN_NAME_) . '";
|
models/SQ_BlockPostsAnalytics.php
CHANGED
@@ -220,13 +220,18 @@ class Model_SQ_BlockPostsAnalytics extends WP_List_Table
|
|
220 |
|
221 |
function get_sortable_columns()
|
222 |
{
|
223 |
-
|
224 |
'title' => 'title',
|
225 |
'type' => 'type',
|
226 |
'author' => 'author',
|
227 |
-
'rank' => 'rank',
|
228 |
-
'date' => array('date', true)
|
229 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
}
|
231 |
|
232 |
function print_column_headers($with_id = true)
|
@@ -302,7 +307,14 @@ class Model_SQ_BlockPostsAnalytics extends WP_List_Table
|
|
302 |
if (empty($post_type) || is_object_in_taxonomy($post_type, 'post_tag'))
|
303 |
$posts_columns['keywords'] = __('Keywords');
|
304 |
|
305 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
$posts_columns['traffic'] = '';
|
307 |
$posts_columns['date'] = __('Date');
|
308 |
return $posts_columns;
|
220 |
|
221 |
function get_sortable_columns()
|
222 |
{
|
223 |
+
$columns = array(
|
224 |
'title' => 'title',
|
225 |
'type' => 'type',
|
226 |
'author' => 'author',
|
|
|
|
|
227 |
);
|
228 |
+
if(SQ_Tools::$options['sq_google_ranksperhour'] > 0){
|
229 |
+
$columns['rank'] = 'rank';
|
230 |
+
}
|
231 |
+
|
232 |
+
$columns['date'] = array('date', true);
|
233 |
+
|
234 |
+
return $columns;
|
235 |
}
|
236 |
|
237 |
function print_column_headers($with_id = true)
|
307 |
if (empty($post_type) || is_object_in_taxonomy($post_type, 'post_tag'))
|
308 |
$posts_columns['keywords'] = __('Keywords');
|
309 |
|
310 |
+
if(SQ_Tools::$options['sq_google_ranksperhour'] > 0) {
|
311 |
+
$blog_ip = @gethostbyname(gethostname());
|
312 |
+
if (isset($blog_ip)) {
|
313 |
+
if (strpos($blog_ip, '192.') === false) {
|
314 |
+
$posts_columns['rank'] = sprintf(__('Google.%s Position'), SQ_Tools::$options['sq_google_country']);
|
315 |
+
}
|
316 |
+
}
|
317 |
+
}
|
318 |
$posts_columns['traffic'] = '';
|
319 |
$posts_columns['date'] = __('Date');
|
320 |
return $posts_columns;
|
models/SQ_BlockSettingsSeo.php
CHANGED
@@ -1,13 +1,11 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
class Model_SQ_BlockSettingsSeo
|
4 |
-
{
|
5 |
|
6 |
var $eTypes;
|
7 |
var $appleSizes;
|
8 |
|
9 |
-
public function __construct()
|
10 |
-
{
|
11 |
$this->appleSizes = preg_split('/[,]+/', _SQ_MOBILE_ICON_SIZES);
|
12 |
}
|
13 |
|
@@ -15,8 +13,7 @@ class Model_SQ_BlockSettingsSeo
|
|
15 |
* Check if ecommerce is installed
|
16 |
* @return boolean
|
17 |
*/
|
18 |
-
public function isEcommerce()
|
19 |
-
{
|
20 |
if (isset($this->eTypes)) {
|
21 |
return $this->eTypes;
|
22 |
}
|
@@ -41,8 +38,7 @@ class Model_SQ_BlockSettingsSeo
|
|
41 |
*
|
42 |
* @return string
|
43 |
*/
|
44 |
-
public function checkGoogleWTCode($code)
|
45 |
-
{
|
46 |
|
47 |
if ($code <> '') {
|
48 |
if (strpos($code, 'content') !== false) {
|
@@ -64,8 +60,7 @@ class Model_SQ_BlockSettingsSeo
|
|
64 |
*
|
65 |
* @return string
|
66 |
*/
|
67 |
-
public function checkGoogleAnalyticsCode($code)
|
68 |
-
{
|
69 |
//echo $code;
|
70 |
if ($code <> '') {
|
71 |
if (strpos($code, 'GoogleAnalyticsObject') !== false) {
|
@@ -91,50 +86,44 @@ class Model_SQ_BlockSettingsSeo
|
|
91 |
*
|
92 |
* @return string
|
93 |
*/
|
94 |
-
public function checkFavebookInsightsCode($code)
|
95 |
-
|
96 |
if ($code <> '') {
|
97 |
-
if (strpos($code, '
|
98 |
-
preg_match('/
|
99 |
-
$code = '';
|
100 |
if (isset($result[1]) && !empty($result[1])) {
|
101 |
-
$
|
102 |
}
|
103 |
}
|
104 |
|
105 |
if (strpos($code, 'facebook.com/') !== false) {
|
106 |
preg_match('/facebook.com\/([^\/]+)/i', $code, $result);
|
107 |
-
$code = '';
|
108 |
if (isset($result[1]) && !empty($result[1])) {
|
109 |
if (is_string($result[1])) {
|
110 |
-
$
|
111 |
-
if ($
|
112 |
-
$
|
113 |
-
if (preg_match('/<code[^>]*>([0-9]+)<\/code[^>]*>/i', $html, $result)) {
|
114 |
-
if (isset($result[1]) && !empty($result[1])) {
|
115 |
-
$code = $result[1];
|
116 |
-
}
|
117 |
-
}
|
118 |
}
|
119 |
-
} elseif(is_numeric($result[1])) {
|
120 |
-
$
|
121 |
}
|
122 |
}
|
123 |
-
}
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
|
|
130 |
}
|
131 |
}
|
132 |
|
133 |
-
if ($
|
134 |
SQ_Error::setError(__("The code for Facebook is incorrect.", _SQ_PLUGIN_NAME_));
|
135 |
}
|
136 |
}
|
137 |
-
return $
|
138 |
}
|
139 |
|
140 |
/**
|
@@ -142,8 +131,7 @@ class Model_SQ_BlockSettingsSeo
|
|
142 |
*
|
143 |
* @return string
|
144 |
*/
|
145 |
-
public function checkPinterestCode($code)
|
146 |
-
{
|
147 |
if ($code <> '') {
|
148 |
if (strpos($code, 'content') !== false) {
|
149 |
preg_match('/content\\s*=\\s*[\'\"]([^\'\"]+)[\'\"]/i', $code, $result);
|
@@ -165,8 +153,7 @@ class Model_SQ_BlockSettingsSeo
|
|
165 |
*
|
166 |
* @return string
|
167 |
*/
|
168 |
-
public function checkBingWTCode($code)
|
169 |
-
{
|
170 |
if ($code <> '') {
|
171 |
if (strpos($code, 'content') !== false) {
|
172 |
preg_match('/content\\s*=\\s*[\'\"]([^\'\"]+)[\'\"]/i', $code, $result);
|
@@ -188,8 +175,7 @@ class Model_SQ_BlockSettingsSeo
|
|
188 |
*
|
189 |
* @return string
|
190 |
*/
|
191 |
-
public function checkTwitterAccount($account)
|
192 |
-
{
|
193 |
if (SQ_ObjController::getModel('SQ_Frontend')->getTwitterAccount($account) === false) {
|
194 |
SQ_Error::setError(__("The twitter account is incorrect", _SQ_PLUGIN_NAME_));
|
195 |
}
|
@@ -204,8 +190,7 @@ class Model_SQ_BlockSettingsSeo
|
|
204 |
*
|
205 |
* @return string
|
206 |
*/
|
207 |
-
public function checkGoogleAccount($account)
|
208 |
-
{
|
209 |
if ($account <> '' && strpos($account, 'google.') === false) {
|
210 |
$account = 'https://plus.google.com/' . $account;
|
211 |
}
|
@@ -217,8 +202,7 @@ class Model_SQ_BlockSettingsSeo
|
|
217 |
*
|
218 |
* @return string
|
219 |
*/
|
220 |
-
public function checkLinkeinAccount($account)
|
221 |
-
{
|
222 |
if ($account <> '' && strpos($account, 'linkedin.') === false) {
|
223 |
$account = 'https://www.linkedin.com/in/' . $account;
|
224 |
}
|
@@ -230,24 +214,21 @@ class Model_SQ_BlockSettingsSeo
|
|
230 |
*
|
231 |
* @return string
|
232 |
*/
|
233 |
-
public function checkFacebookAccount($account)
|
234 |
-
{
|
235 |
if ($account <> '' && strpos($account, 'facebook.com') === false) {
|
236 |
$account = 'https://www.facebook.com/' . $account;
|
237 |
}
|
238 |
return $account;
|
239 |
}
|
240 |
|
241 |
-
public function checkPinterestAccount($account)
|
242 |
-
{
|
243 |
if ($account <> '' && strpos($account, 'pinterest.com') === false) {
|
244 |
$account = 'https://www.pinterest.com/' . $account;
|
245 |
}
|
246 |
return $account;
|
247 |
}
|
248 |
|
249 |
-
public function checkInstagramAccount($account)
|
250 |
-
{
|
251 |
if ($account <> '' && strpos($account, 'instagram.com') === false) {
|
252 |
$account = 'https://www.instagram.com/' . $account;
|
253 |
}
|
@@ -263,8 +244,7 @@ class Model_SQ_BlockSettingsSeo
|
|
263 |
* @return array [name (the name of the file), favicon (the path of the ico), message (the returned message)]
|
264 |
*
|
265 |
*/
|
266 |
-
public function addFavicon($file, $path = ABSPATH)
|
267 |
-
{
|
268 |
|
269 |
/* get the file extension */
|
270 |
$file_name = explode('.', $file['name']);
|
@@ -358,8 +338,7 @@ class Model_SQ_BlockSettingsSeo
|
|
358 |
}
|
359 |
}
|
360 |
|
361 |
-
private function checkFunctions()
|
362 |
-
{
|
363 |
$required_functions = array('getimagesize', 'imagecreatefromstring', 'imagecreatetruecolor', 'imagecolortransparent', 'imagecolorallocatealpha', 'imagealphablending', 'imagesavealpha', 'imagesx', 'imagesy', 'imagecopyresampled',);
|
364 |
|
365 |
foreach ($required_functions as $function) {
|
1 |
<?php
|
2 |
|
3 |
+
class Model_SQ_BlockSettingsSeo {
|
|
|
4 |
|
5 |
var $eTypes;
|
6 |
var $appleSizes;
|
7 |
|
8 |
+
public function __construct() {
|
|
|
9 |
$this->appleSizes = preg_split('/[,]+/', _SQ_MOBILE_ICON_SIZES);
|
10 |
}
|
11 |
|
13 |
* Check if ecommerce is installed
|
14 |
* @return boolean
|
15 |
*/
|
16 |
+
public function isEcommerce() {
|
|
|
17 |
if (isset($this->eTypes)) {
|
18 |
return $this->eTypes;
|
19 |
}
|
38 |
*
|
39 |
* @return string
|
40 |
*/
|
41 |
+
public function checkGoogleWTCode($code) {
|
|
|
42 |
|
43 |
if ($code <> '') {
|
44 |
if (strpos($code, 'content') !== false) {
|
60 |
*
|
61 |
* @return string
|
62 |
*/
|
63 |
+
public function checkGoogleAnalyticsCode($code) {
|
|
|
64 |
//echo $code;
|
65 |
if ($code <> '') {
|
66 |
if (strpos($code, 'GoogleAnalyticsObject') !== false) {
|
86 |
*
|
87 |
* @return string
|
88 |
*/
|
89 |
+
public function checkFavebookInsightsCode($code) {
|
90 |
+
$id = '';
|
91 |
if ($code <> '') {
|
92 |
+
if (strpos($code, '"') !== false) {
|
93 |
+
preg_match('/[\'\"]([^\'\"]+)[\'\"]/i', $code, $result);
|
|
|
94 |
if (isset($result[1]) && !empty($result[1])) {
|
95 |
+
$id = $result[1];
|
96 |
}
|
97 |
}
|
98 |
|
99 |
if (strpos($code, 'facebook.com/') !== false) {
|
100 |
preg_match('/facebook.com\/([^\/]+)/i', $code, $result);
|
|
|
101 |
if (isset($result[1]) && !empty($result[1])) {
|
102 |
if (is_string($result[1])) {
|
103 |
+
$response = SQ_Action::apiCall('sq/seo/facebook-id', array('profile' => $result[1]));
|
104 |
+
if ($response && $json = json_decode($response)) {
|
105 |
+
$id = $json->code;
|
|
|
|
|
|
|
|
|
|
|
106 |
}
|
107 |
+
} elseif (is_numeric($result[1])) {
|
108 |
+
$id = $result[1];
|
109 |
}
|
110 |
}
|
111 |
+
}else {
|
112 |
+
if (is_string($code)) {
|
113 |
+
$response = SQ_Action::apiCall('sq/seo/facebook-id', array('profile' => $code));
|
114 |
+
if ($response && $json = json_decode($response)) {
|
115 |
+
$id = $json->code;
|
116 |
+
}
|
117 |
+
} elseif (is_numeric($code)) {
|
118 |
+
$id = $code;
|
119 |
}
|
120 |
}
|
121 |
|
122 |
+
if ($id == '') {
|
123 |
SQ_Error::setError(__("The code for Facebook is incorrect.", _SQ_PLUGIN_NAME_));
|
124 |
}
|
125 |
}
|
126 |
+
return $id;
|
127 |
}
|
128 |
|
129 |
/**
|
131 |
*
|
132 |
* @return string
|
133 |
*/
|
134 |
+
public function checkPinterestCode($code) {
|
|
|
135 |
if ($code <> '') {
|
136 |
if (strpos($code, 'content') !== false) {
|
137 |
preg_match('/content\\s*=\\s*[\'\"]([^\'\"]+)[\'\"]/i', $code, $result);
|
153 |
*
|
154 |
* @return string
|
155 |
*/
|
156 |
+
public function checkBingWTCode($code) {
|
|
|
157 |
if ($code <> '') {
|
158 |
if (strpos($code, 'content') !== false) {
|
159 |
preg_match('/content\\s*=\\s*[\'\"]([^\'\"]+)[\'\"]/i', $code, $result);
|
175 |
*
|
176 |
* @return string
|
177 |
*/
|
178 |
+
public function checkTwitterAccount($account) {
|
|
|
179 |
if (SQ_ObjController::getModel('SQ_Frontend')->getTwitterAccount($account) === false) {
|
180 |
SQ_Error::setError(__("The twitter account is incorrect", _SQ_PLUGIN_NAME_));
|
181 |
}
|
190 |
*
|
191 |
* @return string
|
192 |
*/
|
193 |
+
public function checkGoogleAccount($account) {
|
|
|
194 |
if ($account <> '' && strpos($account, 'google.') === false) {
|
195 |
$account = 'https://plus.google.com/' . $account;
|
196 |
}
|
202 |
*
|
203 |
* @return string
|
204 |
*/
|
205 |
+
public function checkLinkeinAccount($account) {
|
|
|
206 |
if ($account <> '' && strpos($account, 'linkedin.') === false) {
|
207 |
$account = 'https://www.linkedin.com/in/' . $account;
|
208 |
}
|
214 |
*
|
215 |
* @return string
|
216 |
*/
|
217 |
+
public function checkFacebookAccount($account) {
|
|
|
218 |
if ($account <> '' && strpos($account, 'facebook.com') === false) {
|
219 |
$account = 'https://www.facebook.com/' . $account;
|
220 |
}
|
221 |
return $account;
|
222 |
}
|
223 |
|
224 |
+
public function checkPinterestAccount($account) {
|
|
|
225 |
if ($account <> '' && strpos($account, 'pinterest.com') === false) {
|
226 |
$account = 'https://www.pinterest.com/' . $account;
|
227 |
}
|
228 |
return $account;
|
229 |
}
|
230 |
|
231 |
+
public function checkInstagramAccount($account) {
|
|
|
232 |
if ($account <> '' && strpos($account, 'instagram.com') === false) {
|
233 |
$account = 'https://www.instagram.com/' . $account;
|
234 |
}
|
244 |
* @return array [name (the name of the file), favicon (the path of the ico), message (the returned message)]
|
245 |
*
|
246 |
*/
|
247 |
+
public function addFavicon($file, $path = ABSPATH) {
|
|
|
248 |
|
249 |
/* get the file extension */
|
250 |
$file_name = explode('.', $file['name']);
|
338 |
}
|
339 |
}
|
340 |
|
341 |
+
private function checkFunctions() {
|
|
|
342 |
$required_functions = array('getimagesize', 'imagecreatefromstring', 'imagecreatetruecolor', 'imagecolortransparent', 'imagecolorallocatealpha', 'imagealphablending', 'imagesavealpha', 'imagesx', 'imagesy', 'imagecopyresampled',);
|
343 |
|
344 |
foreach ($required_functions as $function) {
|
models/SQ_Frontend.php
CHANGED
@@ -5,8 +5,10 @@ class Model_SQ_Frontend {
|
|
5 |
public $buffer;
|
6 |
|
7 |
/** @var object Current post */
|
8 |
-
private $post;
|
|
|
9 |
private $post_type;
|
|
|
10 |
|
11 |
/** @var canonical link */
|
12 |
private $url;
|
@@ -46,11 +48,10 @@ class Model_SQ_Frontend {
|
|
46 |
|
47 |
public function __construct() {
|
48 |
SQ_ObjController::getController('SQ_Tools', false);
|
49 |
-
$this->
|
50 |
}
|
51 |
|
52 |
/** @var meta from other plugins */
|
53 |
-
// private $op_meta = array();
|
54 |
/**
|
55 |
* Write the signature
|
56 |
* @return string
|
@@ -64,20 +65,55 @@ class Model_SQ_Frontend {
|
|
64 |
* @return string
|
65 |
*/
|
66 |
public function setStartTag() {
|
67 |
-
|
68 |
if ($this->is_squirrly()) {
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
-
|
72 |
-
|
73 |
-
|
|
|
|
|
74 |
$this->post = get_post($post->ID);
|
75 |
}
|
76 |
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
}
|
82 |
}
|
83 |
|
@@ -114,6 +150,22 @@ class Model_SQ_Frontend {
|
|
114 |
return $this->buffer;
|
115 |
}
|
116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
/**
|
118 |
* Flush the header from wordpress
|
119 |
*
|
@@ -121,9 +173,6 @@ class Model_SQ_Frontend {
|
|
121 |
*
|
122 |
*/
|
123 |
public function flushHeader() {
|
124 |
-
$buffers = array();
|
125 |
-
|
126 |
-
|
127 |
try {
|
128 |
if (function_exists('ob_list_handlers')) {
|
129 |
$buffers = @ob_list_handlers();
|
@@ -151,7 +200,7 @@ class Model_SQ_Frontend {
|
|
151 |
return false;
|
152 |
}
|
153 |
|
154 |
-
if ($this->isHomePage() || is_single() || is_preview() || is_page() || is_archive() || is_author() || is_category() || is_tag() || is_search() || (!empty($this->
|
155 |
return true;
|
156 |
}
|
157 |
|
@@ -164,7 +213,6 @@ class Model_SQ_Frontend {
|
|
164 |
* @return string
|
165 |
*/
|
166 |
public function setMetaInBuffer($buffer) {
|
167 |
-
global $post;
|
168 |
|
169 |
//if the title is already shown
|
170 |
if (isset($this->url)) {
|
@@ -172,18 +220,14 @@ class Model_SQ_Frontend {
|
|
172 |
}
|
173 |
//get the post from shop if woocommerce is installed
|
174 |
if (!isset($this->post)) {
|
175 |
-
|
176 |
-
$this->post = get_post(wc_get_page_id('shop'));
|
177 |
-
} elseif (isset($post->ID)) {
|
178 |
-
$this->post = get_post($post->ID);
|
179 |
-
}
|
180 |
}
|
181 |
|
182 |
if ($this->is_squirrly()) {
|
183 |
|
184 |
//update ... please monitor
|
185 |
-
if(is_single() || is_page()
|
186 |
-
if(!isset($this->post->ID)){
|
187 |
return $buffer;
|
188 |
}
|
189 |
}
|
@@ -225,7 +269,7 @@ class Model_SQ_Frontend {
|
|
225 |
if (isset($this->title) && $this->title <> '') {
|
226 |
//replace the existing title
|
227 |
$buffer = @preg_replace('/<title[^<>]*>([^<>]*)<\/title>/si', '', $buffer, -1);
|
228 |
-
$buffer = @preg_replace('/(<head[^>]*>)/si', sprintf("$1\n<title>%s</title>", $this->title) . "\n", $buffer, -1
|
229 |
}
|
230 |
}
|
231 |
|
@@ -311,12 +355,8 @@ class Model_SQ_Frontend {
|
|
311 |
return $ret;
|
312 |
}
|
313 |
|
314 |
-
public function setPost($newpost) {
|
315 |
-
global $post;
|
316 |
-
$this->post = $post = $newpost;
|
317 |
-
}
|
318 |
|
319 |
-
|
320 |
$meta = "\n";
|
321 |
|
322 |
//Title and Description is required
|
@@ -336,8 +376,8 @@ class Model_SQ_Frontend {
|
|
336 |
$meta .= (($sq_twitter_creator <> '') ? sprintf('<meta name="twitter:creator" content="%s" />', $this->getTwitterAccount($sq_twitter_creator)) . "\n" : '');
|
337 |
$meta .= (($sq_twitter_site <> '') ? sprintf('<meta name="twitter:site" content="%s" />', $this->getTwitterAccount($sq_twitter_creator)) . "\n" : '');
|
338 |
$meta .= sprintf('<meta name="twitter:url" content="%s">', $this->url) . "\n";
|
339 |
-
$meta .= sprintf('<meta name="twitter:title" content="%s">', $this->title) . "\n";
|
340 |
-
$meta .= (($this->description <> '') ? sprintf('<meta name="twitter:description" content="%s">', $this->description . ' | ' . $this->meta['blogname']) . "\n" : '');
|
341 |
$meta .= (!empty($this->thumb_images) ? sprintf('<meta name="twitter:image" content="%s">', $this->thumb_images[0]['src']) . "\n" : '');
|
342 |
$meta .= (($this->meta['blogname'] <> '') ? sprintf('<meta name="twitter:domain" content="%s">', $this->meta['blogname']) . "\n" : '');
|
343 |
|
@@ -373,7 +413,7 @@ class Model_SQ_Frontend {
|
|
373 |
* Get the Open Graph Protocol
|
374 |
* @return string
|
375 |
*/
|
376 |
-
|
377 |
$meta = "\n";
|
378 |
$image = '';
|
379 |
|
@@ -405,8 +445,8 @@ class Model_SQ_Frontend {
|
|
405 |
$meta .= sprintf('<meta property="og:video:height" content="%s" />', 280) . "\n";
|
406 |
}
|
407 |
|
408 |
-
$meta .= sprintf('<meta property="og:title" content="%s" />', $this->title) . "\n";
|
409 |
-
$meta .= sprintf('<meta property="og:description" content="%s" />', $this->description) . "\n";
|
410 |
$meta .= (($this->meta['blogname'] <> '') ? sprintf('<meta property="og:site_name" content="%s" />', apply_filters('sq_open_graph_site', $this->meta['blogname'])) . "\n" : '');
|
411 |
|
412 |
|
@@ -497,7 +537,7 @@ class Model_SQ_Frontend {
|
|
497 |
*
|
498 |
* @return string
|
499 |
*/
|
500 |
-
|
501 |
if ($url = $this->getCanonicalUrl(true)) {
|
502 |
remove_action('wp_head', 'rel_canonical');
|
503 |
|
@@ -588,7 +628,7 @@ class Model_SQ_Frontend {
|
|
588 |
if (is_paged()) {
|
589 |
$this->title .= $sep . __('Page', _SQ_PLUGIN_NAME_) . " " . (int)get_query_var('paged');
|
590 |
}
|
591 |
-
} elseif (is_single() || is_page() || is_singular() || in_array(
|
592 |
if (isset($this->post) && isset($this->post->ID)) {
|
593 |
//is a post page
|
594 |
$this->title = $this->grabTitleFromPost($this->post->ID);
|
@@ -855,7 +895,7 @@ class Model_SQ_Frontend {
|
|
855 |
if (is_paged()) {
|
856 |
$description .= $sep . __('Page', _SQ_PLUGIN_NAME_) . " " . (int)get_query_var('paged');
|
857 |
}
|
858 |
-
} elseif (is_single() || is_page() || is_singular() || $this->checkPostsPage() || in_array(
|
859 |
if (isset($this->post) && isset($this->post->ID)) {
|
860 |
//is a post page
|
861 |
$description .= $this->grabDescriptionFromPost($this->post->ID);
|
@@ -918,7 +958,7 @@ class Model_SQ_Frontend {
|
|
918 |
*
|
919 |
* @return string
|
920 |
*/
|
921 |
-
|
922 |
$keywords = '';
|
923 |
|
924 |
if ($this->checkPostsPage() && SQ_Tools::$options['sq_auto_description'] == 1) {
|
@@ -952,7 +992,7 @@ class Model_SQ_Frontend {
|
|
952 |
*
|
953 |
* @return string
|
954 |
*/
|
955 |
-
|
956 |
$meta = '';
|
957 |
|
958 |
$name = $this->getAuthor('display_name');
|
@@ -972,7 +1012,7 @@ class Model_SQ_Frontend {
|
|
972 |
*
|
973 |
* @return string
|
974 |
*/
|
975 |
-
|
976 |
$meta = '';
|
977 |
$author = SQ_Tools::$options['sq_google_plus'];
|
978 |
|
@@ -992,7 +1032,7 @@ class Model_SQ_Frontend {
|
|
992 |
*
|
993 |
* @return string
|
994 |
*/
|
995 |
-
|
996 |
$meta = '';
|
997 |
$rnd = '';
|
998 |
|
@@ -1035,7 +1075,7 @@ class Model_SQ_Frontend {
|
|
1035 |
*
|
1036 |
* @return string
|
1037 |
*/
|
1038 |
-
|
1039 |
$meta = '';
|
1040 |
$language = get_bloginfo('language');
|
1041 |
|
@@ -1057,7 +1097,7 @@ class Model_SQ_Frontend {
|
|
1057 |
*
|
1058 |
* @return string
|
1059 |
*/
|
1060 |
-
|
1061 |
$date = null;
|
1062 |
$meta = '';
|
1063 |
|
@@ -1091,7 +1131,7 @@ class Model_SQ_Frontend {
|
|
1091 |
*
|
1092 |
* @return string
|
1093 |
*/
|
1094 |
-
|
1095 |
$meta = '';
|
1096 |
|
1097 |
$xml_url = SQ_ObjController::getController('SQ_Sitemaps')->getXmlUrl('sitemap');
|
@@ -1108,7 +1148,7 @@ class Model_SQ_Frontend {
|
|
1108 |
*
|
1109 |
* @return string
|
1110 |
*/
|
1111 |
-
|
1112 |
$sq_google_wt = SQ_Tools::$options['sq_google_wt'];
|
1113 |
|
1114 |
if ($this->isHomePage() && $sq_google_wt <> '') {
|
@@ -1123,26 +1163,17 @@ class Model_SQ_Frontend {
|
|
1123 |
*
|
1124 |
* @return string
|
1125 |
*/
|
1126 |
-
|
1127 |
$sq_google_analytics = SQ_Tools::$options['sq_google_analytics'];
|
1128 |
|
1129 |
if ($sq_google_analytics <> '') {
|
1130 |
-
if (SQ_Tools::$options['sq_auto_amp']){
|
1131 |
return '<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>' . "\n";
|
1132 |
-
}else {
|
1133 |
SQ_ObjController::getController('SQ_DisplayController', false)
|
1134 |
->loadMedia('https://www.google-analytics.com/analytics.js');
|
1135 |
|
1136 |
-
return sprintf("<script>
|
1137 |
-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
1138 |
-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
1139 |
-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
1140 |
-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
1141 |
-
|
1142 |
-
ga('create', '%s', 'auto');
|
1143 |
-
ga('send', 'pageview');
|
1144 |
-
ga('require', 'linked');
|
1145 |
-
</script>", $sq_google_analytics);
|
1146 |
}
|
1147 |
}
|
1148 |
|
@@ -1153,36 +1184,152 @@ class Model_SQ_Frontend {
|
|
1153 |
$sq_google_analytics = SQ_Tools::$options['sq_google_analytics'];
|
1154 |
|
1155 |
if ($sq_google_analytics <> '') {
|
1156 |
-
if (SQ_Tools::$options['sq_auto_amp']){
|
1157 |
return sprintf('<amp-analytics type="googleanalytics" id="analytics1"><script type="application/json">{"vars": {"account": "%s"},"triggers": {"trackPageview": {"on": "visible","request": "pageview"}}}</script></amp-analytics>', $sq_google_analytics) . "\n";
|
1158 |
}
|
1159 |
}
|
1160 |
return '';
|
1161 |
}
|
1162 |
|
1163 |
-
|
1164 |
-
|
1165 |
$sq_facebook_analytics = SQ_Tools::$options['sq_facebook_analytics'];
|
1166 |
-
|
1167 |
if ($sq_facebook_analytics <> '') {
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1183 |
}
|
1184 |
}
|
1185 |
-
|
1186 |
return false;
|
1187 |
}
|
1188 |
|
@@ -1191,7 +1338,7 @@ src='https://www.facebook.com/tr?id=%s&ev=PageView&noscript=1'
|
|
1191 |
*
|
1192 |
* @return string
|
1193 |
*/
|
1194 |
-
|
1195 |
$sq_facebook_insights = SQ_Tools::$options ['sq_facebook_insights'];
|
1196 |
|
1197 |
if ($this->isHomePage() && $sq_facebook_insights <> '') {
|
@@ -1206,7 +1353,7 @@ src='https://www.facebook.com/tr?id=%s&ev=PageView&noscript=1'
|
|
1206 |
*
|
1207 |
* @return string
|
1208 |
*/
|
1209 |
-
|
1210 |
$sq_pinterest = SQ_Tools::$options['sq_pinterest'];
|
1211 |
|
1212 |
if ($this->isHomePage() && $sq_pinterest <> '') {
|
@@ -1221,7 +1368,7 @@ src='https://www.facebook.com/tr?id=%s&ev=PageView&noscript=1'
|
|
1221 |
*
|
1222 |
* @return string
|
1223 |
*/
|
1224 |
-
|
1225 |
$sq_alexa = SQ_Tools::$options['sq_alexa'];
|
1226 |
|
1227 |
if ($this->isHomePage() && $sq_alexa <> '') {
|
@@ -1236,7 +1383,7 @@ src='https://www.facebook.com/tr?id=%s&ev=PageView&noscript=1'
|
|
1236 |
*
|
1237 |
* @return string
|
1238 |
*/
|
1239 |
-
|
1240 |
$sq_bing_wt = SQ_Tools::$options['sq_bing_wt'];
|
1241 |
|
1242 |
if ($this->isHomePage() && $sq_bing_wt <> '') {
|
@@ -1250,7 +1397,7 @@ src='https://www.facebook.com/tr?id=%s&ev=PageView&noscript=1'
|
|
1250 |
* Get the JsonLD meta for this site
|
1251 |
* @return string
|
1252 |
*/
|
1253 |
-
|
1254 |
$meta = '';
|
1255 |
$sep = ",\n";
|
1256 |
if ($this->isHomePage()) {
|
@@ -1598,6 +1745,16 @@ src='https://www.facebook.com/tr?id=%s&ev=PageView&noscript=1'
|
|
1598 |
}
|
1599 |
}
|
1600 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1601 |
$haspost = (count($wp_query->posts) > 0);
|
1602 |
|
1603 |
if (get_query_var('m') <> '') {
|
@@ -1697,7 +1854,7 @@ src='https://www.facebook.com/tr?id=%s&ev=PageView&noscript=1'
|
|
1697 |
*
|
1698 |
* @return bool
|
1699 |
*/
|
1700 |
-
|
1701 |
global $wp_query;
|
1702 |
|
1703 |
if (isset($wp_query->queried_object_id)) {
|
@@ -1713,7 +1870,7 @@ src='https://www.facebook.com/tr?id=%s&ev=PageView&noscript=1'
|
|
1713 |
return (is_home() || (isset($wp_query->query) && empty($wp_query->query) && !is_preview()));
|
1714 |
}
|
1715 |
|
1716 |
-
|
1717 |
$headers = headers_list();
|
1718 |
|
1719 |
foreach ($headers as $index => $value) {
|
@@ -1741,7 +1898,7 @@ src='https://www.facebook.com/tr?id=%s&ev=PageView&noscript=1'
|
|
1741 |
*
|
1742 |
* @return bool
|
1743 |
*/
|
1744 |
-
|
1745 |
return is_page() && get_option('show_on_front') == 'page' && isset($this->post->ID) && $this->post->ID == get_option('page_on_front');
|
1746 |
}
|
1747 |
|
@@ -1750,7 +1907,7 @@ src='https://www.facebook.com/tr?id=%s&ev=PageView&noscript=1'
|
|
1750 |
*
|
1751 |
* @return bool
|
1752 |
*/
|
1753 |
-
|
1754 |
return is_home() && get_option('show_on_front') == 'page' && isset($this->post->ID) && $this->post->ID == get_option('page_for_posts');
|
1755 |
}
|
1756 |
|
5 |
public $buffer;
|
6 |
|
7 |
/** @var object Current post */
|
8 |
+
private $post = null;
|
9 |
+
|
10 |
private $post_type;
|
11 |
+
private $post_types;
|
12 |
|
13 |
/** @var canonical link */
|
14 |
private $url;
|
48 |
|
49 |
public function __construct() {
|
50 |
SQ_ObjController::getController('SQ_Tools', false);
|
51 |
+
$this->post_types = SQ_Tools::$options['sq_post_types'];
|
52 |
}
|
53 |
|
54 |
/** @var meta from other plugins */
|
|
|
55 |
/**
|
56 |
* Write the signature
|
57 |
* @return string
|
65 |
* @return string
|
66 |
*/
|
67 |
public function setStartTag() {
|
68 |
+
$this->setPost();
|
69 |
if ($this->is_squirrly()) {
|
70 |
+
SQ_Tools::dump('Show Squirrly', 'isHomePage: ' . $this->isHomePage(), 'is_single: ' . is_single(), 'is_preview: ' . is_preview(), 'is_page: ' . is_page(), 'is_archive: ' . is_archive(), 'is_author: ' . is_author(), 'is_category: ' . is_category(), 'is_tag: ' . is_tag(), 'is_search: ' . is_search(), 'in_array: ' . (!empty($this->post_types) && in_array($this->post_type, $this->post_types)));
|
71 |
+
return "<squirrly />";
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Set the post
|
77 |
+
*
|
78 |
+
* @param null|WP_Post $newpost
|
79 |
+
* @return array|null|object|WP_Post
|
80 |
+
*/
|
81 |
+
public function setPost($newpost = null) {
|
82 |
+
global $post;
|
83 |
+
|
84 |
+
if (isset($newpost)) {
|
85 |
+
$post = $newpost;
|
86 |
+
}
|
87 |
|
88 |
+
if (function_exists('is_shop') && is_shop()) {
|
89 |
+
$this->post = get_post(wc_get_page_id('shop'));
|
90 |
+
$this->post_type = 'shop';
|
91 |
+
} else {
|
92 |
+
if (isset($post->ID)) {
|
93 |
$this->post = get_post($post->ID);
|
94 |
}
|
95 |
|
96 |
+
if (function_exists('is_product') && is_product()) {
|
97 |
+
$this->post_type = 'product';
|
98 |
+
} elseif (function_exists('is_checkout') && is_checkout()) {
|
99 |
+
$this->post_type = 'checkout';
|
100 |
+
} elseif (is_single()) {
|
101 |
+
$this->post_type = 'post';
|
102 |
+
} elseif (is_page()) {
|
103 |
+
$this->post_type = 'page';
|
104 |
+
} elseif (is_category()) {
|
105 |
+
$this->post_type = 'category';
|
106 |
+
} elseif (is_tag()) {
|
107 |
+
$this->post_type = 'tag';
|
108 |
+
} elseif (is_author()) {
|
109 |
+
$this->post_type = 'author';
|
110 |
+
} elseif (is_search()) {
|
111 |
+
$this->post_type = 'search';
|
112 |
+
} elseif (is_archive()) {
|
113 |
+
$this->post_type = 'archive';
|
114 |
+
} else {
|
115 |
+
$this->post_type = get_post_type();
|
116 |
+
}
|
117 |
}
|
118 |
}
|
119 |
|
150 |
return $this->buffer;
|
151 |
}
|
152 |
|
153 |
+
public function checkHandles() {
|
154 |
+
try {
|
155 |
+
if (function_exists('ob_list_handlers')) {
|
156 |
+
$buffers = @ob_list_handlers();
|
157 |
+
|
158 |
+
if (sizeof($buffers) > 0) {
|
159 |
+
if (!in_array(get_class($this) . '::getBuffer', $buffers)) {
|
160 |
+
$this->startBuffer();
|
161 |
+
}
|
162 |
+
}
|
163 |
+
}
|
164 |
+
} catch (Exception $ex) {
|
165 |
+
//error
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
/**
|
170 |
* Flush the header from wordpress
|
171 |
*
|
173 |
*
|
174 |
*/
|
175 |
public function flushHeader() {
|
|
|
|
|
|
|
176 |
try {
|
177 |
if (function_exists('ob_list_handlers')) {
|
178 |
$buffers = @ob_list_handlers();
|
200 |
return false;
|
201 |
}
|
202 |
|
203 |
+
if ($this->isHomePage() || is_single() || is_preview() || is_page() || is_archive() || is_author() || is_category() || is_tag() || is_search() || (!empty($this->post_types) && in_array($this->post_type, $this->post_types))) {
|
204 |
return true;
|
205 |
}
|
206 |
|
213 |
* @return string
|
214 |
*/
|
215 |
public function setMetaInBuffer($buffer) {
|
|
|
216 |
|
217 |
//if the title is already shown
|
218 |
if (isset($this->url)) {
|
220 |
}
|
221 |
//get the post from shop if woocommerce is installed
|
222 |
if (!isset($this->post)) {
|
223 |
+
$this->setPost();
|
|
|
|
|
|
|
|
|
224 |
}
|
225 |
|
226 |
if ($this->is_squirrly()) {
|
227 |
|
228 |
//update ... please monitor
|
229 |
+
if (is_single() || is_page()) {
|
230 |
+
if (!isset($this->post->ID)) {
|
231 |
return $buffer;
|
232 |
}
|
233 |
}
|
269 |
if (isset($this->title) && $this->title <> '') {
|
270 |
//replace the existing title
|
271 |
$buffer = @preg_replace('/<title[^<>]*>([^<>]*)<\/title>/si', '', $buffer, -1);
|
272 |
+
$buffer = @preg_replace('/(<head[^>]*>)/si', sprintf("$1\n<title>%s</title>", $this->title) . "\n", $buffer, -1);
|
273 |
}
|
274 |
}
|
275 |
|
355 |
return $ret;
|
356 |
}
|
357 |
|
|
|
|
|
|
|
|
|
358 |
|
359 |
+
public function getTwitterCard() {
|
360 |
$meta = "\n";
|
361 |
|
362 |
//Title and Description is required
|
376 |
$meta .= (($sq_twitter_creator <> '') ? sprintf('<meta name="twitter:creator" content="%s" />', $this->getTwitterAccount($sq_twitter_creator)) . "\n" : '');
|
377 |
$meta .= (($sq_twitter_site <> '') ? sprintf('<meta name="twitter:site" content="%s" />', $this->getTwitterAccount($sq_twitter_creator)) . "\n" : '');
|
378 |
$meta .= sprintf('<meta name="twitter:url" content="%s">', $this->url) . "\n";
|
379 |
+
$meta .= sprintf('<meta name="twitter:title" content="%s">', apply_filters('sq_twitter_card_title', $this->title)) . "\n";
|
380 |
+
$meta .= (($this->description <> '') ? sprintf('<meta name="twitter:description" content="%s">', apply_filters('sq_twitter_card_description', ($this->description . ' | ' . $this->meta['blogname']))) . "\n" : '');
|
381 |
$meta .= (!empty($this->thumb_images) ? sprintf('<meta name="twitter:image" content="%s">', $this->thumb_images[0]['src']) . "\n" : '');
|
382 |
$meta .= (($this->meta['blogname'] <> '') ? sprintf('<meta name="twitter:domain" content="%s">', $this->meta['blogname']) . "\n" : '');
|
383 |
|
413 |
* Get the Open Graph Protocol
|
414 |
* @return string
|
415 |
*/
|
416 |
+
public function getOpenGraph() {
|
417 |
$meta = "\n";
|
418 |
$image = '';
|
419 |
|
445 |
$meta .= sprintf('<meta property="og:video:height" content="%s" />', 280) . "\n";
|
446 |
}
|
447 |
|
448 |
+
$meta .= sprintf('<meta property="og:title" content="%s" />', apply_filters('sq_open_graph_title', $this->title)) . "\n";
|
449 |
+
$meta .= sprintf('<meta property="og:description" content="%s" />', apply_filters('sq_open_graph_description', $this->description)) . "\n";
|
450 |
$meta .= (($this->meta['blogname'] <> '') ? sprintf('<meta property="og:site_name" content="%s" />', apply_filters('sq_open_graph_site', $this->meta['blogname'])) . "\n" : '');
|
451 |
|
452 |
|
537 |
*
|
538 |
* @return string
|
539 |
*/
|
540 |
+
public function setCanonical() {
|
541 |
if ($url = $this->getCanonicalUrl(true)) {
|
542 |
remove_action('wp_head', 'rel_canonical');
|
543 |
|
628 |
if (is_paged()) {
|
629 |
$this->title .= $sep . __('Page', _SQ_PLUGIN_NAME_) . " " . (int)get_query_var('paged');
|
630 |
}
|
631 |
+
} elseif (is_single() || is_page() || is_singular() || in_array($this->post_type, $this->post_types)) {
|
632 |
if (isset($this->post) && isset($this->post->ID)) {
|
633 |
//is a post page
|
634 |
$this->title = $this->grabTitleFromPost($this->post->ID);
|
895 |
if (is_paged()) {
|
896 |
$description .= $sep . __('Page', _SQ_PLUGIN_NAME_) . " " . (int)get_query_var('paged');
|
897 |
}
|
898 |
+
} elseif (is_single() || is_page() || is_singular() || $this->checkPostsPage() || in_array($this->post_type, $this->post_types)) {
|
899 |
if (isset($this->post) && isset($this->post->ID)) {
|
900 |
//is a post page
|
901 |
$description .= $this->grabDescriptionFromPost($this->post->ID);
|
958 |
*
|
959 |
* @return string
|
960 |
*/
|
961 |
+
public function getCustomKeyword() {
|
962 |
$keywords = '';
|
963 |
|
964 |
if ($this->checkPostsPage() && SQ_Tools::$options['sq_auto_description'] == 1) {
|
992 |
*
|
993 |
* @return string
|
994 |
*/
|
995 |
+
public function getCopyright() {
|
996 |
$meta = '';
|
997 |
|
998 |
$name = $this->getAuthor('display_name');
|
1012 |
*
|
1013 |
* @return string
|
1014 |
*/
|
1015 |
+
public function getGooglePlusMeta() {
|
1016 |
$meta = '';
|
1017 |
$author = SQ_Tools::$options['sq_google_plus'];
|
1018 |
|
1032 |
*
|
1033 |
* @return string
|
1034 |
*/
|
1035 |
+
public function getFavicon() {
|
1036 |
$meta = '';
|
1037 |
$rnd = '';
|
1038 |
|
1075 |
*
|
1076 |
* @return string
|
1077 |
*/
|
1078 |
+
public function getLanguage() {
|
1079 |
$meta = '';
|
1080 |
$language = get_bloginfo('language');
|
1081 |
|
1097 |
*
|
1098 |
* @return string
|
1099 |
*/
|
1100 |
+
public function getDublinCore() {
|
1101 |
$date = null;
|
1102 |
$meta = '';
|
1103 |
|
1131 |
*
|
1132 |
* @return string
|
1133 |
*/
|
1134 |
+
public function getXMLSitemap() {
|
1135 |
$meta = '';
|
1136 |
|
1137 |
$xml_url = SQ_ObjController::getController('SQ_Sitemaps')->getXmlUrl('sitemap');
|
1148 |
*
|
1149 |
* @return string
|
1150 |
*/
|
1151 |
+
public function getGoogleWT() {
|
1152 |
$sq_google_wt = SQ_Tools::$options['sq_google_wt'];
|
1153 |
|
1154 |
if ($this->isHomePage() && $sq_google_wt <> '') {
|
1163 |
*
|
1164 |
* @return string
|
1165 |
*/
|
1166 |
+
public function getGoogleAnalytics() {
|
1167 |
$sq_google_analytics = SQ_Tools::$options['sq_google_analytics'];
|
1168 |
|
1169 |
if ($sq_google_analytics <> '') {
|
1170 |
+
if (SQ_Tools::$options['sq_auto_amp']) {
|
1171 |
return '<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>' . "\n";
|
1172 |
+
} else {
|
1173 |
SQ_ObjController::getController('SQ_DisplayController', false)
|
1174 |
->loadMedia('https://www.google-analytics.com/analytics.js');
|
1175 |
|
1176 |
+
return sprintf("<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', '%s', 'auto');ga('send', 'pageview');</script>", $sq_google_analytics);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1177 |
}
|
1178 |
}
|
1179 |
|
1184 |
$sq_google_analytics = SQ_Tools::$options['sq_google_analytics'];
|
1185 |
|
1186 |
if ($sq_google_analytics <> '') {
|
1187 |
+
if (SQ_Tools::$options['sq_auto_amp']) {
|
1188 |
return sprintf('<amp-analytics type="googleanalytics" id="analytics1"><script type="application/json">{"vars": {"account": "%s"},"triggers": {"trackPageview": {"on": "visible","request": "pageview"}}}</script></amp-analytics>', $sq_google_analytics) . "\n";
|
1189 |
}
|
1190 |
}
|
1191 |
return '';
|
1192 |
}
|
1193 |
|
1194 |
+
public function getFacebookPixel() {
|
|
|
1195 |
$sq_facebook_analytics = SQ_Tools::$options['sq_facebook_analytics'];
|
|
|
1196 |
if ($sq_facebook_analytics <> '') {
|
1197 |
+
$this->setPost($this->post);
|
1198 |
+
$domain = str_replace(array('http://', 'http://', 'www.'), '', get_bloginfo('url'));
|
1199 |
+
if ($this->isHomePage()) {
|
1200 |
+
$events[] = array(
|
1201 |
+
'type' => 'track',
|
1202 |
+
'name' => 'PageView',
|
1203 |
+
'params' => array('page' => get_bloginfo('url'), 'domain' => $domain)
|
1204 |
+
);
|
1205 |
+
} else {
|
1206 |
+
if (isset($this->post->ID)) {
|
1207 |
+
$params['content_ids'] = array((string)$this->post->ID);
|
1208 |
+
}
|
1209 |
+
|
1210 |
+
$params['content_type'] = $this->post_type;
|
1211 |
+
|
1212 |
+
if ($this->post_type == 'category') {
|
1213 |
+
$category = get_category(get_query_var('cat'), false);
|
1214 |
+
if (isset($category->name)) {
|
1215 |
+
$params['content_category'] = $category->name;
|
1216 |
+
}
|
1217 |
+
} elseif ($this->post_type == 'product') {
|
1218 |
+
$params['content_name'] = $this->post->post_title;
|
1219 |
+
$cat = get_the_terms($this->post->ID, 'product_cat');
|
1220 |
+
if (!empty($cat)) {
|
1221 |
+
$params['content_category'] = $cat[0]->name;
|
1222 |
+
}
|
1223 |
+
|
1224 |
+
if (isset($_POST['product_id']) && isset($params['content_ids']) && isset($params['content_type'])) {
|
1225 |
+
if (function_exists('wc_get_product') && function_exists('get_woocommerce_currency')) {
|
1226 |
+
if ($product = wc_get_product((int)$_POST['product_id'])) {
|
1227 |
+
$params['value'] = $product->get_price();
|
1228 |
+
$params['currency'] = get_woocommerce_currency();
|
1229 |
+
}
|
1230 |
+
}
|
1231 |
+
|
1232 |
+
$events[] = array(
|
1233 |
+
'type' => 'track',
|
1234 |
+
'name' => 'AddToCart',
|
1235 |
+
'params' => $params
|
1236 |
+
);
|
1237 |
+
}
|
1238 |
+
} elseif ($this->post_type == 'search') {
|
1239 |
+
$search = get_search_query(true);
|
1240 |
+
if ($search <> '') {
|
1241 |
+
$params['search_string'] = $search;
|
1242 |
+
$events[] = array(
|
1243 |
+
'type' => 'track',
|
1244 |
+
'name' => 'Search',
|
1245 |
+
'params' => $params
|
1246 |
+
);
|
1247 |
+
}
|
1248 |
+
} elseif ($this->post_type == 'checkout' && isset($this->post->ID)) {
|
1249 |
+
global $woocommerce;
|
1250 |
+
if (isset($woocommerce->cart->total) && $woocommerce->cart->total > 0) {
|
1251 |
+
$params['value'] = $woocommerce->cart->total;
|
1252 |
+
|
1253 |
+
if (isset($woocommerce->cart->cart_contents) && !empty($woocommerce->cart->cart_contents)) {
|
1254 |
+
$quantity = 0;
|
1255 |
+
foreach ($woocommerce->cart->cart_contents as $product) {
|
1256 |
+
$quantity += $product['quantity'];
|
1257 |
+
}
|
1258 |
+
if ($quantity > 0) {
|
1259 |
+
$params['num_items'] = $quantity;
|
1260 |
+
}
|
1261 |
+
}
|
1262 |
+
$events[] = array(
|
1263 |
+
'type' => 'track',
|
1264 |
+
'name' => 'InitiateCheckout',
|
1265 |
+
'params' => $params
|
1266 |
+
);
|
1267 |
+
} elseif (SQ_Tools::getIsset('key')) {
|
1268 |
+
$params['content_type'] = 'purchase';
|
1269 |
+
global $wpdb;
|
1270 |
+
$sql = "SELECT `post_id`
|
1271 |
+
FROM `" . $wpdb->postmeta . "`
|
1272 |
+
WHERE `meta_key` = '_order_key' AND `meta_value`='" . SQ_Tools::getValue('key') . "'";
|
1273 |
+
|
1274 |
+
if ($post = $wpdb->get_row($sql)) {
|
1275 |
+
if ($order = wc_get_order($post->post_id)) {
|
1276 |
+
$params['content_type'] = "checkout";
|
1277 |
+
$params['value'] = $order->get_total();
|
1278 |
+
$params['currency'] = $order->get_order_currency();
|
1279 |
+
|
1280 |
+
$events[] = array(
|
1281 |
+
'type' => 'track',
|
1282 |
+
'name' => 'Purchase',
|
1283 |
+
'params' => $params
|
1284 |
+
);
|
1285 |
+
}
|
1286 |
+
}
|
1287 |
+
}
|
1288 |
+
|
1289 |
+
|
1290 |
+
} else {
|
1291 |
+
$cat = get_the_terms($this->post->ID, 'category');
|
1292 |
+
if (!empty($cat)) {
|
1293 |
+
$params['content_category'] = $cat[0]->name;
|
1294 |
+
}
|
1295 |
+
}
|
1296 |
+
|
1297 |
+
$params['page'] = $this->getCanonicalUrl();
|
1298 |
+
$params['domain'] = $domain;
|
1299 |
+
|
1300 |
+
if (isset($params['content_ids']) && isset($params['content_type'])) {
|
1301 |
+
$events[] = array(
|
1302 |
+
'type' => 'track',
|
1303 |
+
'name' => 'ViewContent',
|
1304 |
+
'params' => $params
|
1305 |
+
);
|
1306 |
+
} else {
|
1307 |
+
$events[] = array(
|
1308 |
+
'type' => 'trackCustom',
|
1309 |
+
'name' => 'GeneralEvent',
|
1310 |
+
'params' => $params
|
1311 |
+
);
|
1312 |
+
}
|
1313 |
+
|
1314 |
+
$events[] = array(
|
1315 |
+
'type' => 'track',
|
1316 |
+
'name' => 'PageView',
|
1317 |
+
'params' => array('page' => $params['page'], 'domain' => $params['domain'])
|
1318 |
+
);
|
1319 |
+
}
|
1320 |
+
$track = '';
|
1321 |
+
foreach ($events as $event) {
|
1322 |
+
$track .= "fbq('" . $event['type'] . "', '" . $event['name'] . "', '" . json_encode($event['params']) . "');";
|
1323 |
+
}
|
1324 |
+
//$track .= json_encode($this->post);
|
1325 |
+
if ($sq_facebook_analytics <> '') {
|
1326 |
+
if (SQ_Tools::$options['sq_auto_amp']) {
|
1327 |
+
//not yet supported
|
1328 |
+
} else {
|
1329 |
+
return sprintf("<script>!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,document,'script','https://connect.facebook.net/en_US/fbevents.js');fbq('init', '%s');%s</script><noscript><img height='1' width='1' style='display:none'src='https://www.facebook.com/tr?id=%s&ev=PageView&noscript=1'/></noscript>" . "\n", $sq_facebook_analytics, $track, $sq_facebook_analytics);
|
1330 |
+
}
|
1331 |
}
|
1332 |
}
|
|
|
1333 |
return false;
|
1334 |
}
|
1335 |
|
1338 |
*
|
1339 |
* @return string
|
1340 |
*/
|
1341 |
+
public function getFacebookIns() {
|
1342 |
$sq_facebook_insights = SQ_Tools::$options ['sq_facebook_insights'];
|
1343 |
|
1344 |
if ($this->isHomePage() && $sq_facebook_insights <> '') {
|
1353 |
*
|
1354 |
* @return string
|
1355 |
*/
|
1356 |
+
public function getPinterest() {
|
1357 |
$sq_pinterest = SQ_Tools::$options['sq_pinterest'];
|
1358 |
|
1359 |
if ($this->isHomePage() && $sq_pinterest <> '') {
|
1368 |
*
|
1369 |
* @return string
|
1370 |
*/
|
1371 |
+
public function getAlexaT() {
|
1372 |
$sq_alexa = SQ_Tools::$options['sq_alexa'];
|
1373 |
|
1374 |
if ($this->isHomePage() && $sq_alexa <> '') {
|
1383 |
*
|
1384 |
* @return string
|
1385 |
*/
|
1386 |
+
public function getBingWT() {
|
1387 |
$sq_bing_wt = SQ_Tools::$options['sq_bing_wt'];
|
1388 |
|
1389 |
if ($this->isHomePage() && $sq_bing_wt <> '') {
|
1397 |
* Get the JsonLD meta for this site
|
1398 |
* @return string
|
1399 |
*/
|
1400 |
+
public function getJsonLD() {
|
1401 |
$meta = '';
|
1402 |
$sep = ",\n";
|
1403 |
if ($this->isHomePage()) {
|
1745 |
}
|
1746 |
}
|
1747 |
|
1748 |
+
//If we have the Post ID
|
1749 |
+
if (isset($this->post->ID)) {
|
1750 |
+
$link = get_permalink($this->post->ID);
|
1751 |
+
$link = $this->getPaged($link);
|
1752 |
+
if ($link <> '') {
|
1753 |
+
return apply_filters('sq_canonical', $link);
|
1754 |
+
}
|
1755 |
+
}
|
1756 |
+
|
1757 |
+
//Find the canonical
|
1758 |
$haspost = (count($wp_query->posts) > 0);
|
1759 |
|
1760 |
if (get_query_var('m') <> '') {
|
1854 |
*
|
1855 |
* @return bool
|
1856 |
*/
|
1857 |
+
public function isHomePage() {
|
1858 |
global $wp_query;
|
1859 |
|
1860 |
if (isset($wp_query->queried_object_id)) {
|
1870 |
return (is_home() || (isset($wp_query->query) && empty($wp_query->query) && !is_preview()));
|
1871 |
}
|
1872 |
|
1873 |
+
public function isHtmlHeader() {
|
1874 |
$headers = headers_list();
|
1875 |
|
1876 |
foreach ($headers as $index => $value) {
|
1898 |
*
|
1899 |
* @return bool
|
1900 |
*/
|
1901 |
+
public function checkFrontPage() {
|
1902 |
return is_page() && get_option('show_on_front') == 'page' && isset($this->post->ID) && $this->post->ID == get_option('page_on_front');
|
1903 |
}
|
1904 |
|
1907 |
*
|
1908 |
* @return bool
|
1909 |
*/
|
1910 |
+
public function checkPostsPage() {
|
1911 |
return is_home() && get_option('show_on_front') == 'page' && isset($this->post->ID) && $this->post->ID == get_option('page_for_posts');
|
1912 |
}
|
1913 |
|
models/SQ_Post.php
CHANGED
@@ -295,7 +295,6 @@ class Model_SQ_Post {
|
|
295 |
(`post_id`,`meta_key`,`meta_value`)
|
296 |
VALUES (" . (int) $post_id . ",'" . $meta['key'] . "','" . addslashes($meta['value']) . "')";
|
297 |
}
|
298 |
-
SQ_Tools::dump($sql);
|
299 |
$wpdb->query($sql);
|
300 |
}
|
301 |
|
295 |
(`post_id`,`meta_key`,`meta_value`)
|
296 |
VALUES (" . (int) $post_id . ",'" . $meta['key'] . "','" . addslashes($meta['value']) . "')";
|
297 |
}
|
|
|
298 |
$wpdb->query($sql);
|
299 |
}
|
300 |
|
readme.txt
CHANGED
@@ -17,7 +17,7 @@ Recommended by <strong><a href="http://www.quicksprout.com/university/how-to-max
|
|
17 |
|
18 |
[youtube https://www.youtube.com/watch?v=mEjrE7TuDDc]
|
19 |
|
20 |
-
See all the Squirrly SEO
|
21 |
|
22 |
Based on the topic you're writing about, the interface will light up green while you're editing your text, so that you know you've done something right. When all the lights are green, you can publish it, because your text has excellent SEO and it's 100% optimized.
|
23 |
|
@@ -134,9 +134,35 @@ Type a keyword to the right of the screen and start using Squirrly Seo. Enjoy!
|
|
134 |
7. Seo - Check your Weekly Site Audit and improve to get higher scores
|
135 |
|
136 |
== Upgrade Notice ==
|
137 |
-
Squirrly
|
138 |
|
139 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
= 6.2.6 =
|
141 |
* Fixed Canonical link for facebook Open Graph
|
142 |
* Don't show the Canonical Link if Squirrly SEO is off
|
@@ -374,7 +400,7 @@ For higher content marketing and SEO needs, you can check our Official Site and
|
|
374 |
== Frequently Asked Questions ==
|
375 |
= I can't log into the Wordpress with my user. Get the message 'An error occured.' What can I do? =
|
376 |
I see that your host server is not letting you to access our remote API.
|
377 |
-
Please tell your web master to add the IPs
|
378 |
|
379 |
= How does Squirrly WordPress SEO Plugin work? =
|
380 |
Neil Patel, the Co-Founder of Kissmetrics and Crazy Egg made a great video on how to use Squirrly's Live Assistant:
|
17 |
|
18 |
[youtube https://www.youtube.com/watch?v=mEjrE7TuDDc]
|
19 |
|
20 |
+
See all the Squirrly SEO 2017 features at: http://howto.squirrly.co/category/sides/
|
21 |
|
22 |
Based on the topic you're writing about, the interface will light up green while you're editing your text, so that you know you've done something right. When all the lights are green, you can publish it, because your text has excellent SEO and it's 100% optimized.
|
23 |
|
134 |
7. Seo - Check your Weekly Site Audit and improve to get higher scores
|
135 |
|
136 |
== Upgrade Notice ==
|
137 |
+
Squirrly 6.2.8 it's a stable version of Squirrly SEO and has all the SEO requirements by Search Engines
|
138 |
|
139 |
== Changelog ==
|
140 |
+
= 6.3.1 =
|
141 |
+
* Inform users with multiple active subscriptions
|
142 |
+
* Updated terms and contitions
|
143 |
+
* Added more links for support in the Feedback and Support sections
|
144 |
+
* Fixed Facebook Admin ID for Profile and Pages
|
145 |
+
* Changed the Theme for Squirrly SEO Settings and Advanced sections
|
146 |
+
* Fixed Typos and Broken Links
|
147 |
+
* Updated the Keyword Research for Long Tail Keyword
|
148 |
+
|
149 |
+
* Optimized the loading speed in case of poor connection with the API
|
150 |
+
* Pass the SSL issue for API calls
|
151 |
+
* Fixed the Squirrly SEO Weekly audit for free users
|
152 |
+
* Fixed Pay With a Tweet button
|
153 |
+
* Added google.us in Ranking Option
|
154 |
+
|
155 |
+
= 6.3.0 =
|
156 |
+
* Updated the facebook and google tracking code
|
157 |
+
* Improved the Faceboox Pixel Feature to work with Woocommerce
|
158 |
+
* Corrected the google tracking code
|
159 |
+
* Improved the comunication with the API server
|
160 |
+
|
161 |
+
= 6.2.8 =
|
162 |
+
* Fixed the Canonical link for some WP Themes
|
163 |
+
* Added forced keyword update in Squirrly SEO Settings
|
164 |
+
* Added a new Country in the Rank Option section
|
165 |
+
|
166 |
= 6.2.6 =
|
167 |
* Fixed Canonical link for facebook Open Graph
|
168 |
* Don't show the Canonical Link if Squirrly SEO is off
|
400 |
== Frequently Asked Questions ==
|
401 |
= I can't log into the Wordpress with my user. Get the message 'An error occured.' What can I do? =
|
402 |
I see that your host server is not letting you to access our remote API.
|
403 |
+
Please tell your web master to add the IPs 176.9.59.55 and 176.9.112.210 in the white-list for remote access and it should work.
|
404 |
|
405 |
= How does Squirrly WordPress SEO Plugin work? =
|
406 |
Neil Patel, the Co-Founder of Kissmetrics and Crazy Egg made a great video on how to use Squirrly's Live Assistant:
|
squirrly.php
CHANGED
@@ -8,12 +8,12 @@
|
|
8 |
Plugin URI: http://www.squirrly.co
|
9 |
Description: SEO Plugin By Squirrly is for the NON-SEO experts. Get Excellent Seo with Better Content, Ranking and Analytics. For Both Humans and Search Bots.<BR> <a href="http://my.squirrly.co/user" target="_blank"><strong>Check your profile</strong></a>
|
10 |
Author: calinvingan, florinmuresan, nagy.sorel
|
11 |
-
Version: 6.
|
12 |
Author URI: http://www.squirrly.co
|
13 |
*/
|
14 |
|
15 |
/* SET THE CURRENT VERSION ABOVE AND BELOW */
|
16 |
-
define('SQ_VERSION', '6.
|
17 |
/* Call config files */
|
18 |
if (file_exists(dirname(__FILE__) . '/config/config.php')) {
|
19 |
require(dirname(__FILE__) . '/config/config.php');
|
8 |
Plugin URI: http://www.squirrly.co
|
9 |
Description: SEO Plugin By Squirrly is for the NON-SEO experts. Get Excellent Seo with Better Content, Ranking and Analytics. For Both Humans and Search Bots.<BR> <a href="http://my.squirrly.co/user" target="_blank"><strong>Check your profile</strong></a>
|
10 |
Author: calinvingan, florinmuresan, nagy.sorel
|
11 |
+
Version: 6.3.1
|
12 |
Author URI: http://www.squirrly.co
|
13 |
*/
|
14 |
|
15 |
/* SET THE CURRENT VERSION ABOVE AND BELOW */
|
16 |
+
define('SQ_VERSION', '6.3.1');
|
17 |
/* Call config files */
|
18 |
if (file_exists(dirname(__FILE__) . '/config/config.php')) {
|
19 |
require(dirname(__FILE__) . '/config/config.php');
|
themes/default/SQ_BlockAccount.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
<span class="sq_icon"></span>
|
7 |
<div id="sq_settings_title" ><?php _e('Squirrly account information', _SQ_PLUGIN_NAME_); ?> </div>
|
8 |
<div id="sq_settings_title" style="text-align: right">
|
9 |
-
<input id="sq_goto_dashboard" type="button" value="<?php _e('Go to dashboard', _SQ_PLUGIN_NAME_) ?> »" />
|
10 |
<br style="clear: both;">
|
11 |
</div>
|
12 |
</div>
|
6 |
<span class="sq_icon"></span>
|
7 |
<div id="sq_settings_title" ><?php _e('Squirrly account information', _SQ_PLUGIN_NAME_); ?> </div>
|
8 |
<div id="sq_settings_title" style="text-align: right">
|
9 |
+
<input id="sq_goto_dashboard" class="sq_goto_dashboard" type="button" value="<?php _e('Go to dashboard', _SQ_PLUGIN_NAME_) ?> »" />
|
10 |
<br style="clear: both;">
|
11 |
</div>
|
12 |
</div>
|
themes/default/SQ_BlockAffiliate.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
<span class="sq_icon"></span>
|
5 |
<div id="sq_settings_title" ><?php _e('Join Squirrly today!', _SQ_PLUGIN_NAME_); ?> </div>
|
6 |
<div id="sq_settings_title" >
|
7 |
-
<input id="sq_goto_dashboard" type="button" value="<?php _e('Go to dashboard', _SQ_PLUGIN_NAME_) ?> »" />
|
8 |
</div>
|
9 |
</div>
|
10 |
<div id="sq_helpaffiliateside" class="sq_helpside"></div>
|
4 |
<span class="sq_icon"></span>
|
5 |
<div id="sq_settings_title" ><?php _e('Join Squirrly today!', _SQ_PLUGIN_NAME_); ?> </div>
|
6 |
<div id="sq_settings_title" >
|
7 |
+
<input id="sq_goto_dashboard" class="sq_goto_dashboard" type="button" value="<?php _e('Go to dashboard', _SQ_PLUGIN_NAME_) ?> »" />
|
8 |
</div>
|
9 |
</div>
|
10 |
<div id="sq_helpaffiliateside" class="sq_helpside"></div>
|
themes/default/SQ_BlockAnalytics.php
CHANGED
@@ -286,7 +286,7 @@
|
|
286 |
</div>
|
287 |
|
288 |
<script>
|
289 |
-
jQuery('.sq_analytics_tasks_video_cover').
|
290 |
jQuery(this).html('<object width="280" height="158"><param name="movie" value="https://www.youtube.com/v/' + jQuery(this).attr('rel') + ((jQuery(this).attr('rel').indexOf('?') != -1) ? '&' : '?') + 'version=3&hl=en_US&autoplay=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="https://www.youtube.com/v/' + jQuery(this).attr('rel') + ((jQuery(this).attr('rel').indexOf('?') != -1) ? '&' : '?') + 'version=3&hl=en_US&autoplay=1" type="application/x-shockwave-flash" width="280" height="158" allowscriptaccess="always" allowfullscreen="true"></embed></object>');
|
291 |
});
|
292 |
</script>
|
286 |
</div>
|
287 |
|
288 |
<script>
|
289 |
+
jQuery('.sq_analytics_tasks_video_cover').off('click').on('click', function () {
|
290 |
jQuery(this).html('<object width="280" height="158"><param name="movie" value="https://www.youtube.com/v/' + jQuery(this).attr('rel') + ((jQuery(this).attr('rel').indexOf('?') != -1) ? '&' : '?') + 'version=3&hl=en_US&autoplay=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="https://www.youtube.com/v/' + jQuery(this).attr('rel') + ((jQuery(this).attr('rel').indexOf('?') != -1) ? '&' : '?') + 'version=3&hl=en_US&autoplay=1" type="application/x-shockwave-flash" width="280" height="158" allowscriptaccess="always" allowfullscreen="true"></embed></object>');
|
291 |
});
|
292 |
</script>
|
themes/default/SQ_BlockDashboard.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
|
11 |
|
12 |
<div class="sq_login_link"><?php _e('Connect to Squirrly and start optimizing your site', _SQ_PLUGIN_NAME_); ?></div>
|
13 |
-
<input id="sq_goto_dashboard" style="display:none; margin: 0 auto; width: 500px; padding: 0px 10px;" type="button" value="«<?php _e('START HERE', _SQ_PLUGIN_NAME_) ?> »" />
|
14 |
|
15 |
<?php
|
16 |
} else {
|
@@ -26,7 +26,7 @@
|
|
26 |
|
27 |
<div class="sq_helpcontent" style="display: none; clear: left; <?php echo (SQ_Tools::$options['sq_api'] == '') ? 'text-align: center;' : '' ?>">
|
28 |
<div style="width: 700px; display: inline-block;">
|
29 |
-
<div style="font-size: 24px; margin: 30px 0; color: #999;">
|
30 |
<ul class="sq_slidelist">
|
31 |
<li>
|
32 |
<a href="javascript:void(0);" rel="44987512" style="background-image: url('//image.slidesharecdn.com/kr-150222110827-conversion-gate01/95/squirrly-keyword-research-1-638.jpg?cb=1424624994')"></a>
|
@@ -82,7 +82,7 @@
|
|
82 |
</li>
|
83 |
<li>
|
84 |
<a href="javascript:void(0);" rel="46222827" style="background-image: url('//image.slidesharecdn.com/success-150324093815-conversion-gate01/95/measure-your-success-option-from-squirrly-1-638.jpg?cb=1427713584')"></a>
|
85 |
-
<div>Measure Your Success
|
86 |
</li>
|
87 |
<li>
|
88 |
<a href="javascript:void(0);" rel="46256414" style="background-image: url('//image.slidesharecdn.com/robots-150325031929-conversion-gate01/95/squirrly-robotstxt-1-638.jpg?cb=1427713635')"></a>
|
10 |
|
11 |
|
12 |
<div class="sq_login_link"><?php _e('Connect to Squirrly and start optimizing your site', _SQ_PLUGIN_NAME_); ?></div>
|
13 |
+
<input id="sq_goto_dashboard" class="sq_goto_dashboard" style="display:none; margin: 0 auto; width: 500px; padding: 0px 10px;" type="button" value="«<?php _e('START HERE', _SQ_PLUGIN_NAME_) ?> »" />
|
14 |
|
15 |
<?php
|
16 |
} else {
|
26 |
|
27 |
<div class="sq_helpcontent" style="display: none; clear: left; <?php echo (SQ_Tools::$options['sq_api'] == '') ? 'text-align: center;' : '' ?>">
|
28 |
<div style="width: 700px; display: inline-block;">
|
29 |
+
<div style="font-size: 24px; margin: 30px 0; color: #999;">Learn About Squirrly's Features (click on the images):</div>
|
30 |
<ul class="sq_slidelist">
|
31 |
<li>
|
32 |
<a href="javascript:void(0);" rel="44987512" style="background-image: url('//image.slidesharecdn.com/kr-150222110827-conversion-gate01/95/squirrly-keyword-research-1-638.jpg?cb=1424624994')"></a>
|
82 |
</li>
|
83 |
<li>
|
84 |
<a href="javascript:void(0);" rel="46222827" style="background-image: url('//image.slidesharecdn.com/success-150324093815-conversion-gate01/95/measure-your-success-option-from-squirrly-1-638.jpg?cb=1427713584')"></a>
|
85 |
+
<div>Measure Your Success with Squirrly</div>
|
86 |
</li>
|
87 |
<li>
|
88 |
<a href="javascript:void(0);" rel="46256414" style="background-image: url('//image.slidesharecdn.com/robots-150325031929-conversion-gate01/95/squirrly-robotstxt-1-638.jpg?cb=1427713635')"></a>
|
themes/default/SQ_BlockPostsAnalytics.php
CHANGED
@@ -1,24 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<div id="sq_posts">
|
2 |
<span class="sq_icon"></span>
|
3 |
|
|
|
4 |
<div id="sq_posts_title"><?php _e('Squirrly Analytics', _SQ_PLUGIN_NAME_); ?> </div>
|
5 |
<div id="sq_posts_subtitle"><?php _e('Don\'t see all your pages here? Make sure you optimize them with Squirrly, so that we can track them, and display you the analytics', _SQ_PLUGIN_NAME_); ?> </div>
|
6 |
-
|
7 |
-
if (get_transient('google_blocked') !== false) {
|
8 |
-
echo '<div id="sq_posts_subtitle" style="font-size: 14px;color: red;padding: 0px;margin: 0 0 15px 0;text-align: center;line-height: 15px;">';
|
9 |
-
if (function_exists('curl_init') && !ini_get('open_basedir')) {
|
10 |
-
echo sprintf(__('The IP %s is calling the rank too often and google stopped the calls for %s mins. Lower the Rank check rate in Squirrly > Settings > Rank Option. %sMore details%s', _SQ_PLUGIN_NAME_), @gethostbyname(gethostname()), (((get_transient('google_blocked')- time() + 3600) > 0) ? date('i',(get_transient('google_blocked')- time() + 3600)) : 'an hour'),'<a href="http://howto.squirrly.co/wordpress-seo/could-not-receive-data-from-google-err-blocked-ip/" target="_blank" >','</a>');
|
11 |
-
} else {
|
12 |
-
if (!function_exists('curl_init')) {
|
13 |
-
echo sprintf(__('To be able to check the RANK please activate cURL for PHP on your server %sDetails%s', _SQ_PLUGIN_NAME_), '<a href="http://stackoverflow.com/questions/1347146/how-to-enable-curl-in-php-xampp" target="_blank">', '</a>');
|
14 |
-
} else {
|
15 |
-
echo sprintf(__('To be able to check the RANK please remove the "safe_mode" and "open_basedir" for PHP cURL on your server %sDetails%s', _SQ_PLUGIN_NAME_), '<a href="http://stackoverflow.com/a/6918685" target="_blank">', '</a>');
|
16 |
-
|
17 |
-
}
|
18 |
-
}
|
19 |
-
echo '</div>';
|
20 |
-
}
|
21 |
-
?>
|
22 |
|
23 |
<?php echo $view->getNavigationTop() ?>
|
24 |
<table class="wp-list-table widefat fixed posts" cellspacing="0">
|
1 |
+
<?php
|
2 |
+
if (SQ_Tools::$options['sq_google_ranksperhour'] > 0) {
|
3 |
+
$blog_ip = @gethostbyname(gethostname());
|
4 |
+
if (isset($blog_ip)){
|
5 |
+
if (strpos($blog_ip, '192.') === 0){
|
6 |
+
echo '<div class="notice sq_message"><p>';
|
7 |
+
echo sprintf(__("You can't check the Google Rank from a local server. You need a shared or a dedicated hosting plan for this option.", _SQ_PLUGIN_NAME_));
|
8 |
+
echo '</p></div>';
|
9 |
+
}
|
10 |
+
}
|
11 |
+
|
12 |
+
if (get_transient('google_blocked') !== false) {
|
13 |
+
echo '<div id="notice sq_message" style="font-size: 14px;color: red;padding: 0px;margin: 0 0 15px 0;text-align: center;line-height: 15px;"><p>';
|
14 |
+
if (function_exists('curl_init') && !ini_get('open_basedir')) {
|
15 |
+
echo sprintf(__('The IP %s is calling the rank too often and google stopped the calls for %s mins. Lower the Rank check rate in Squirrly > Advanced > Rank Option. %sMore details%s', _SQ_PLUGIN_NAME_),$blog_ip, (((get_transient('google_blocked') - time() + 3600) > 0) ? date('i', (get_transient('google_blocked') - time() + 3600)) : 'an hour'), '<a href="http://howto.squirrly.co/wordpress-seo/could-not-receive-data-from-google-err-blocked-ip/" target="_blank" >', '</a>');
|
16 |
+
}
|
17 |
+
echo '</p></div>';
|
18 |
+
} elseif (!function_exists('curl_init')) {
|
19 |
+
echo '<div class="notice sq_message"><p>';
|
20 |
+
echo sprintf(__('To be able to check the RANK please activate cURL for PHP on your server %sDetails%s', _SQ_PLUGIN_NAME_), '<a href="http://stackoverflow.com/questions/1347146/how-to-enable-curl-in-php-xampp" target="_blank">', '</a>');
|
21 |
+
echo '</p></div>';
|
22 |
+
} elseif (ini_get('open_basedir') <> '') {
|
23 |
+
echo '<div class="notice sq_message"><p>';
|
24 |
+
echo sprintf(__('To be able to check the RANK please set the "open_basedir" to NULL on your server %sDetails%s', _SQ_PLUGIN_NAME_), '<a href="http://stackoverflow.com/a/6918685" target="_blank">', '</a>');
|
25 |
+
echo '</p></div>';
|
26 |
+
}
|
27 |
+
} else {
|
28 |
+
echo '<div class="notice sq_message"><p>';
|
29 |
+
echo sprintf(__('To see the Google Ranking for each article you need to select how many pages to be checked by google rank every hour from %sSquirrly > Advanced > Google Rank Option%s. ', _SQ_PLUGIN_NAME_), '<a href="' . admin_url('admin.php?page=sq_settings') . '">', '</a>');
|
30 |
+
echo '</p></div>';
|
31 |
+
|
32 |
+
}
|
33 |
+
?>
|
34 |
<div id="sq_posts">
|
35 |
<span class="sq_icon"></span>
|
36 |
|
37 |
+
|
38 |
<div id="sq_posts_title"><?php _e('Squirrly Analytics', _SQ_PLUGIN_NAME_); ?> </div>
|
39 |
<div id="sq_posts_subtitle"><?php _e('Don\'t see all your pages here? Make sure you optimize them with Squirrly, so that we can track them, and display you the analytics', _SQ_PLUGIN_NAME_); ?> </div>
|
40 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
<?php echo $view->getNavigationTop() ?>
|
43 |
<table class="wp-list-table widefat fixed posts" cellspacing="0">
|
themes/default/SQ_BlockSettings.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<div>
|
4 |
<span class="sq_icon"></span>
|
5 |
|
6 |
-
<div id="sq_settings_title"><?php _e('Settings', _SQ_PLUGIN_NAME_); ?> </div>
|
7 |
<div id="sq_settings_title">
|
8 |
<input type="submit" name="sq_update" value="<?php _e('Save settings', _SQ_PLUGIN_NAME_) ?> »"/>
|
9 |
</div>
|
@@ -73,7 +73,7 @@
|
|
73 |
<label for="sq_keyword_help0" class="sq_switch-label sq_switch-label-on"><?php _e('No', _SQ_PLUGIN_NAME_); ?></label>
|
74 |
<span class="sq_switch-selection"></span>
|
75 |
</div>
|
76 |
-
<span><?php _e('Show <strong>Squirrly Tooltips</strong> posting a new article (e.g. "Enter a keyword").', _SQ_PLUGIN_NAME_); ?></span>
|
77 |
</div>
|
78 |
|
79 |
<div class="sq_option_content">
|
@@ -87,6 +87,16 @@
|
|
87 |
<span><?php _e('Always show <strong>Keyword Research</strong> about the selected keyword.', _SQ_PLUGIN_NAME_); ?></span>
|
88 |
</div>
|
89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
|
91 |
<div class="sq_option_content">
|
92 |
<div class="sq_switch">
|
@@ -108,7 +118,7 @@
|
|
108 |
<label for="sq_keywordtag0" class="sq_switch-label sq_switch-label-on"><?php _e('No', _SQ_PLUGIN_NAME_); ?></label>
|
109 |
<span class="sq_switch-selection"></span>
|
110 |
</div>
|
111 |
-
<span><?php _e('Add the Post tags in <strong>META
|
112 |
</div>
|
113 |
|
114 |
<div class="sq_option_content">
|
@@ -140,6 +150,7 @@
|
|
140 |
<legend>
|
141 |
<span class="sq_legend_title"><?php _e('Google Rank Options', _SQ_PLUGIN_NAME_); ?></span>
|
142 |
<span><?php echo sprintf(__('%sCountry targeting%s', _SQ_PLUGIN_NAME_), '<a href="https://support.google.com/webmasters/answer/62399?hl=en" target="_blank">', '</a>'); ?></span>
|
|
|
143 |
</legend>
|
144 |
<div>
|
145 |
<div class="sq_option_content">
|
@@ -250,24 +261,31 @@
|
|
250 |
<option value="com.ua"><?php _e('Ukraine', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.ua/)</option>
|
251 |
<option value="ae"><?php _e('United Arab Emirates', _SQ_PLUGIN_NAME_); ?> (http://www.google.ae/)</option>
|
252 |
<option value="co.uk"><?php _e('United Kingdom', _SQ_PLUGIN_NAME_); ?> (http://www.google.co.uk/)</option>
|
|
|
253 |
<option value="com.uy"><?php _e('Uruguay', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.uy/)</option>
|
254 |
<option value="uz"><?php _e('Uzbekistan', _SQ_PLUGIN_NAME_); ?> (http://www.google.uz/)</option>
|
255 |
<option value="vu"><?php _e('Vanuatu', _SQ_PLUGIN_NAME_); ?> (http://www.google.vu/)</option>
|
256 |
<option value="co.ve"><?php _e('Venezuela', _SQ_PLUGIN_NAME_); ?> (http://www.google.co.ve/)</option>
|
257 |
-
|
|
|
258 |
</div>
|
259 |
<p>
|
260 |
-
<span><?php echo sprintf(__('Select how many pages to be checked by google rank every hour. %
|
261 |
</p>
|
262 |
|
263 |
<div class="withborder">
|
264 |
<select id="sq_google_ranksperhour" name="sq_google_ranksperhour">
|
265 |
-
<?php for ($i = 0; $i
|
266 |
-
if (
|
267 |
-
|
|
|
|
|
|
|
|
|
|
|
268 |
}
|
269 |
?>
|
270 |
-
<option value="<?php echo $i ?>" <?php echo((SQ_Tools::$options['sq_google_ranksperhour'] == $i) ? "selected='selected'" : '') ?>><?php echo $i
|
271 |
<?php } ?>
|
272 |
</select>
|
273 |
|
@@ -284,6 +302,7 @@
|
|
284 |
<span><?php _e('Restricts search results to results originating in the above particular country.', _SQ_PLUGIN_NAME_); ?></span>
|
285 |
</div>
|
286 |
|
|
|
287 |
</div>
|
288 |
</div>
|
289 |
</fieldset>
|
3 |
<div>
|
4 |
<span class="sq_icon"></span>
|
5 |
|
6 |
+
<div id="sq_settings_title"><?php _e('Advanced Settings', _SQ_PLUGIN_NAME_); ?> </div>
|
7 |
<div id="sq_settings_title">
|
8 |
<input type="submit" name="sq_update" value="<?php _e('Save settings', _SQ_PLUGIN_NAME_) ?> »"/>
|
9 |
</div>
|
73 |
<label for="sq_keyword_help0" class="sq_switch-label sq_switch-label-on"><?php _e('No', _SQ_PLUGIN_NAME_); ?></label>
|
74 |
<span class="sq_switch-selection"></span>
|
75 |
</div>
|
76 |
+
<span><?php _e('Show <strong>Squirrly Tooltips</strong> when posting a new article (e.g. "Enter a keyword").', _SQ_PLUGIN_NAME_); ?></span>
|
77 |
</div>
|
78 |
|
79 |
<div class="sq_option_content">
|
87 |
<span><?php _e('Always show <strong>Keyword Research</strong> about the selected keyword.', _SQ_PLUGIN_NAME_); ?></span>
|
88 |
</div>
|
89 |
|
90 |
+
<div class="sq_option_content">
|
91 |
+
<div class="sq_switch">
|
92 |
+
<input id="sq_force_savepost1" type="radio" class="sq_switch-input" name="sq_force_savepost" value="1" <?php echo((SQ_Tools::$options['sq_force_savepost'] == 1) ? "checked" : '') ?> />
|
93 |
+
<label for="sq_force_savepost1" class="sq_switch-label sq_switch-label-off"><?php _e('Yes', _SQ_PLUGIN_NAME_); ?></label>
|
94 |
+
<input id="sq_force_savepost0" type="radio" class="sq_switch-input" name="sq_force_savepost" value="0" <?php echo((SQ_Tools::$options['sq_force_savepost'] == 0) ? "checked" : '') ?> />
|
95 |
+
<label for="sq_force_savepost0" class="sq_switch-label sq_switch-label-on"><?php _e('No', _SQ_PLUGIN_NAME_); ?></label>
|
96 |
+
<span class="sq_switch-selection"></span>
|
97 |
+
</div>
|
98 |
+
<span><?php _e('Send optimization data to Squirrly API when the post is saved (don\'t use cron)', _SQ_PLUGIN_NAME_); ?></span>
|
99 |
+
</div>
|
100 |
|
101 |
<div class="sq_option_content">
|
102 |
<div class="sq_switch">
|
118 |
<label for="sq_keywordtag0" class="sq_switch-label sq_switch-label-on"><?php _e('No', _SQ_PLUGIN_NAME_); ?></label>
|
119 |
<span class="sq_switch-selection"></span>
|
120 |
</div>
|
121 |
+
<span><?php _e('Add the Post tags in <strong>Keyword META</strong>.', _SQ_PLUGIN_NAME_); ?></span>
|
122 |
</div>
|
123 |
|
124 |
<div class="sq_option_content">
|
150 |
<legend>
|
151 |
<span class="sq_legend_title"><?php _e('Google Rank Options', _SQ_PLUGIN_NAME_); ?></span>
|
152 |
<span><?php echo sprintf(__('%sCountry targeting%s', _SQ_PLUGIN_NAME_), '<a href="https://support.google.com/webmasters/answer/62399?hl=en" target="_blank">', '</a>'); ?></span>
|
153 |
+
<span><?php echo sprintf(__('%sPowerful SEO Tool For Strong Google Rankings%s', _SQ_PLUGIN_NAME_), '<a href="http://www.squirrly.co/serp-checker" target="_blank">', '</a>'); ?></span>
|
154 |
</legend>
|
155 |
<div>
|
156 |
<div class="sq_option_content">
|
261 |
<option value="com.ua"><?php _e('Ukraine', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.ua/)</option>
|
262 |
<option value="ae"><?php _e('United Arab Emirates', _SQ_PLUGIN_NAME_); ?> (http://www.google.ae/)</option>
|
263 |
<option value="co.uk"><?php _e('United Kingdom', _SQ_PLUGIN_NAME_); ?> (http://www.google.co.uk/)</option>
|
264 |
+
v <option value="us"><?php _e('United States', _SQ_PLUGIN_NAME_); ?> (http://www.google.us/)</option>
|
265 |
<option value="com.uy"><?php _e('Uruguay', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.uy/)</option>
|
266 |
<option value="uz"><?php _e('Uzbekistan', _SQ_PLUGIN_NAME_); ?> (http://www.google.uz/)</option>
|
267 |
<option value="vu"><?php _e('Vanuatu', _SQ_PLUGIN_NAME_); ?> (http://www.google.vu/)</option>
|
268 |
<option value="co.ve"><?php _e('Venezuela', _SQ_PLUGIN_NAME_); ?> (http://www.google.co.ve/)</option>
|
269 |
+
<option value="com.vn"><?php _e('Vietnam', _SQ_PLUGIN_NAME_); ?> (http://www.google.com.vn/)</option>
|
270 |
+
</select>
|
271 |
</div>
|
272 |
<p>
|
273 |
+
<span><?php echo sprintf(__('Select how many pages to be checked by google rank every hour. %s(not recommended for shared hosting plan)%s', _SQ_PLUGIN_NAME_), '<br /><span style="color:#aaa;font-size:12px;">', '</span>'); ?></span>
|
274 |
</p>
|
275 |
|
276 |
<div class="withborder">
|
277 |
<select id="sq_google_ranksperhour" name="sq_google_ranksperhour">
|
278 |
+
<?php for ($i = 0; $i <= 5; $i++) {
|
279 |
+
if ($i == 1) {
|
280 |
+
$text = __('page', _SQ_PLUGIN_NAME_);
|
281 |
+
}else{
|
282 |
+
$text = __('pages', _SQ_PLUGIN_NAME_);
|
283 |
+
}
|
284 |
+
if ((int)SQ_Tools::$options['sq_google_ranksperhour'] > 5) {
|
285 |
+
SQ_Tools::$options['sq_google_ranksperhour'] = 5;
|
286 |
}
|
287 |
?>
|
288 |
+
<option value="<?php echo $i ?>" <?php echo((SQ_Tools::$options['sq_google_ranksperhour'] == $i) ? "selected='selected'" : '') ?>><?php echo $i . ' ' . $text . '/' . __('h',_SQ_PLUGIN_NAME_)?> </option>
|
289 |
<?php } ?>
|
290 |
</select>
|
291 |
|
302 |
<span><?php _e('Restricts search results to results originating in the above particular country.', _SQ_PLUGIN_NAME_); ?></span>
|
303 |
</div>
|
304 |
|
305 |
+
|
306 |
</div>
|
307 |
</div>
|
308 |
</fieldset>
|
themes/default/SQ_BlockSettingsSeo.php
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
<fieldset>
|
20 |
<legend>
|
21 |
<span class="sq_legend_title"><?php _e('Let Squirrly SEO optimize this blog', _SQ_PLUGIN_NAME_); ?></span>
|
22 |
-
<span><?php echo sprintf(__('%sIs Squirrly SEO better then WordPress SEO by Yoast?%s', _SQ_PLUGIN_NAME_), '<a href="http://www.squirrly.co/why_is_squirrly_seo_better_then_wordpress_seo_by_yoast-pagblog-article_id61980-html" target="_blank"
|
23 |
|
24 |
<span><?php _e('Activate the built-in SEO settings from Squirrly by switching Yes below. <strong>Works well with Multisites and Ecommerce.</strong>', _SQ_PLUGIN_NAME_); ?></span><br />
|
25 |
<div class="sq_option_content">
|
@@ -152,7 +152,7 @@
|
|
152 |
<label for="sq_auto_amp0" class="sq_switch-label sq_switch-label-on"><?php _e('No', _SQ_PLUGIN_NAME_); ?></label>
|
153 |
<span class="sq_switch-selection"></span>
|
154 |
</div>
|
155 |
-
<span><?php echo sprintf(__('
|
156 |
</div>
|
157 |
</li>
|
158 |
<p class="sq_option_info" style="padding-left:10px; color: darkgrey;"> <?php _e('Note! By switching the <strong>Json-LD</strong>, <strong>XML Sitemap</strong> and <strong>Favicon</strong> on, you open new options below', _SQ_PLUGIN_NAME_); ?></p>
|
@@ -162,11 +162,11 @@
|
|
162 |
</div>
|
163 |
</div>
|
164 |
</fieldset>
|
165 |
-
<fieldset id="sq_title_description_keywords" <?php echo ((SQ_Tools::$options['sq_use'] == 0) ? '
|
166 |
<legend>
|
167 |
-
<span class="sq_legend_title"><?php _e('
|
168 |
<span><?php echo sprintf(__('%sThe best SEO approach to Meta information%s', _SQ_PLUGIN_NAME_), '<a href="http://www.squirrly.co/the-best-seo-approach-to-meta-information" target="_blank">', '</a>'); ?></span>
|
169 |
-
<span><?php _e('
|
170 |
<?php
|
171 |
$auto_option = false;
|
172 |
if (SQ_Tools::$options['sq_auto_title'] == 1)
|
@@ -182,7 +182,7 @@
|
|
182 |
</div>
|
183 |
</div>
|
184 |
|
185 |
-
<span><?php _e('
|
186 |
|
187 |
<?php
|
188 |
$auto_option = false;
|
@@ -200,7 +200,7 @@
|
|
200 |
</div>
|
201 |
<span class="withborder"></span>
|
202 |
<span class="sq_legend_title"><?php _e('SEO for all post/pages', _SQ_PLUGIN_NAME_); ?></span>
|
203 |
-
<span><?php echo sprintf(__('To customize the Title and Description for all the Posts and Pages in your site use the %
|
204 |
|
205 |
</legend>
|
206 |
|
@@ -225,49 +225,55 @@
|
|
225 |
}
|
226 |
}
|
227 |
?>
|
228 |
-
<
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
<
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
<span class="sq_option_info"><?php _e('First Page Preview (Title, Description, Keywords)', _SQ_PLUGIN_NAME_); ?></span>
|
250 |
-
<div id="sq_snippet">
|
251 |
-
<div id="sq_snippet_name"><?php _e('Squirrly Snippet', _SQ_PLUGIN_NAME_) ?></div>
|
252 |
-
|
253 |
-
<ul id="sq_snippet_ul">
|
254 |
-
<div class="sq_select_ogimage_preview" <?php echo ((SQ_Tools::$options['sq_auto_facebook'] == 1) ? '' : 'style="display:none"') ?>>
|
255 |
-
<div class="sq_fp_ogimage_close" <?php echo ((SQ_Tools::$options['sq_fp_ogimage'] <> '') ? '' : 'style="display:none;"') ?>>x</div>
|
256 |
-
<div class="sq_fp_ogimage"><?php echo ((SQ_Tools::$options['sq_fp_ogimage'] <> '') ? '<img src="'.SQ_Tools::$options['sq_fp_ogimage'] .'" />' : '') ?></div>
|
257 |
</div>
|
258 |
-
|
259 |
-
|
260 |
-
<
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
267 |
|
|
|
|
|
268 |
</div>
|
269 |
</fieldset>
|
270 |
-
<fieldset id="sq_social_media"
|
271 |
<legend>
|
272 |
<span class="sq_legend_title"><?php _e('Social Media Options', _SQ_PLUGIN_NAME_); ?></span>
|
273 |
<p>
|
@@ -480,63 +486,14 @@
|
|
480 |
</ul>
|
481 |
</div>
|
482 |
</fieldset>
|
483 |
-
<fieldset id="
|
484 |
-
<legend>
|
485 |
-
<span class="sq_legend_title"><?php _e('Social Media Accounts', _SQ_PLUGIN_NAME_); ?></span>
|
486 |
-
<span><?php echo sprintf(__('%sLink your Google+ profile to the content you create%s', _SQ_PLUGIN_NAME_), '<a href="https://developers.google.com/structured-data/" target="_blank">', '</a>'); ?></span>
|
487 |
-
<span><?php echo sprintf(__('%sTwitter account is mandatory for <strong>Twitter Card Validation</strong>%s', _SQ_PLUGIN_NAME_), '<a href="https://dev.twitter.com/docs/cards/validation/validator" target="_blank">', '</a>'); ?></span>
|
488 |
-
<span><?php echo sprintf(__('%sAdd all your social accounts for <strong>JSON-LD Semantic SEO</strong>%s', _SQ_PLUGIN_NAME_), '<a href="http://howto.squirrly.c%so/sides/squirrly-json-ld-structured-data/" target="_blank">', '</a>'); ?></span>
|
489 |
-
<span><?php echo sprintf(__('%sSpecify your social profiles to Google%s', _SQ_PLUGIN_NAME_), '<a href="https://developers.google.com/structured-data/customize/social-profiles" target="_blank">', '</a>'); ?></span>
|
490 |
-
</legend>
|
491 |
-
|
492 |
-
<div>
|
493 |
-
<ul id="sq_settings_sq_use" class="sq_settings_info">
|
494 |
-
<li>
|
495 |
-
<p class="withborder withcode">
|
496 |
-
<span class="sq_icon sq_icon_twitter"></span>
|
497 |
-
<?php _e('Your Twitter Account:', _SQ_PLUGIN_NAME_); ?><br /><strong><input type="text" name="sq_twitter_account" value="<?php echo ((SQ_Tools::$options['sq_twitter_account'] <> '') ? SQ_Tools::$options['sq_twitter_account'] : '') ?>" size="60" placeholder="https://twitter.com/" /> (e.g. https://twitter.com/XXXXXXXXXXXXXXXXXX)</strong>
|
498 |
-
</p>
|
499 |
-
</li>
|
500 |
-
<li>
|
501 |
-
<p class="withborder withcode">
|
502 |
-
<span class="sq_icon sq_icon_googleplus"></span>
|
503 |
-
<?php _e('Google Plus Profile:', _SQ_PLUGIN_NAME_); ?><br /><strong><input type="text" name="sq_google_plus" value="<?php echo ((SQ_Tools::$options['sq_google_plus'] <> '') ? SQ_Tools::$options['sq_google_plus'] : '') ?>" size="60" placeholder="https://plus.google.com/" /> (e.g. https://plus.google.com/+XXXXXXXXXXXXXXXXXX)</strong>
|
504 |
-
</p>
|
505 |
-
</li>
|
506 |
-
<li>
|
507 |
-
<p class="withborder withcode">
|
508 |
-
<span class="sq_icon sq_icon_facebook"></span>
|
509 |
-
<?php _e('Facebook Profile:', _SQ_PLUGIN_NAME_); ?><br /><strong><input type="text" name="sq_facebook_account" value="<?php echo ((SQ_Tools::$options['sq_facebook_account'] <> '') ? SQ_Tools::$options['sq_facebook_account'] : '') ?>" size="60" placeholder="https://www.facebook.com/" /> (e.g. https://www.facebook.com/XXXXXXXXXXXXXXXXXX)</strong>
|
510 |
-
</p>
|
511 |
-
</li>
|
512 |
-
<li>
|
513 |
-
<p class="withborder withcode">
|
514 |
-
<span class="sq_icon sq_icon_linkedin"></span>
|
515 |
-
<?php _e('Linkedin Profile:', _SQ_PLUGIN_NAME_); ?><br /><strong><input type="text" name="sq_linkedin_account" value="<?php echo ((SQ_Tools::$options['sq_linkedin_account'] <> '') ? SQ_Tools::$options['sq_linkedin_account'] : '') ?>" size="60" placeholder="https://www.linkedin.com/" /> (e.g. https://www.linkedin.com/XXXX/XXXXXXXXXXXXXXXXXX)</strong>
|
516 |
-
</p>
|
517 |
-
</li>
|
518 |
-
<li>
|
519 |
-
<p class="withborder withcode">
|
520 |
-
<span class="sq_icon sq_icon_social_pinterest"></span>
|
521 |
-
<?php _e('Pinterest Profile:', _SQ_PLUGIN_NAME_); ?><br /><strong><input type="text" name="sq_pinterest_account" value="<?php echo ((SQ_Tools::$options['sq_pinterest_account'] <> '') ? SQ_Tools::$options['sq_pinterest_account'] : '') ?>" size="60" placeholder="https://www.pinterest.com/" /> (e.g. https://www.pinterest.com/XXXXXXXXXXXXXXXXXX)</strong>
|
522 |
-
</p>
|
523 |
-
</li>
|
524 |
-
<li>
|
525 |
-
<p class="withborder withcode">
|
526 |
-
<span class="sq_icon sq_icon_social_instagram"></span>
|
527 |
-
<?php _e('Instagram Profile:', _SQ_PLUGIN_NAME_); ?><br /><strong><input type="text" name="sq_instagram_account" value="<?php echo ((SQ_Tools::$options['sq_instagram_account'] <> '') ? SQ_Tools::$options['sq_instagram_account'] : '') ?>" size="60" placeholder="https://www.instagram.com/" /> (e.g. https://www.linkedin.com/XXXXXXXXXXXXXXXXXX)</strong>
|
528 |
-
</p>
|
529 |
-
</li>
|
530 |
-
</ul>
|
531 |
-
</div>
|
532 |
-
</fieldset>
|
533 |
-
<fieldset id="sq_sitemap" style="<?php echo ((SQ_Tools::$options['sq_use'] == 0 || SQ_Tools::$options['sq_auto_sitemap'] == 0) ? 'display:none;' : ''); ?>">
|
534 |
<legend>
|
535 |
<span class="sq_legend_title"><?php _e('XML Sitemap for Google', _SQ_PLUGIN_NAME_); ?></span>
|
536 |
<span><?php echo __('Squirrly Sitemap is the fastest way to tell Google about your site links. <strong>Supports Multisites, Google News, Images, Videos, Custom Post Types, Custom Taxonomies and Ecommerce products</strong>', _SQ_PLUGIN_NAME_) ?></span>
|
537 |
<span><?php echo sprintf(__('%sHow to submit your sitemap.xml in Google Webmaster Tool%s', _SQ_PLUGIN_NAME_), '<a href="http://howto.squirrly.co/wordpress-seo/how-to-submit-your-sitemap-xml-in-google-sitemap/" target="_blank">', '</a>'); ?></span>
|
538 |
<span><?php echo sprintf(__('%s10 Vital To Dos to Feed Your SEO Content Machine After You Post Articles%s', _SQ_PLUGIN_NAME_), '<a href="http://www.squirrly.co/10_vital_to_dos_to_feed_your_seo_content_machine_after_you_post_articles-pagblog-article_id62194-html" target="_blank">', '</a>'); ?></span>
|
539 |
-
|
|
|
540 |
|
541 |
<div>
|
542 |
<?php
|
@@ -560,7 +517,7 @@
|
|
560 |
<p><?php _e('Build Sitemaps for', _SQ_PLUGIN_NAME_); ?>:</p>
|
561 |
<ul id="sq_sitemap_buid">
|
562 |
<li class="sq_selectall"><input type="checkbox" id="sq_selectall"/>Select All</li>
|
563 |
-
<li><input type="checkbox" class="sq_sitemap" name="sq_sitemap[]" value="sitemap-news" <?php echo ((SQ_Tools::$options['sq_sitemap']['sitemap-news'][1] == 1) ? 'checked="checked"' : ''); ?>><?php _e('Google News', _SQ_PLUGIN_NAME_);
|
564 |
<li><input type="checkbox" class="sq_sitemap" name="sq_sitemap[]" value="sitemap-category" <?php echo ((SQ_Tools::$options['sq_sitemap']['sitemap-category'][1] == 1) ? 'checked="checked"' : ''); ?>><?php _e('Categories', _SQ_PLUGIN_NAME_); ?></li>
|
565 |
<?php if (SQ_ObjController::getModel('SQ_BlockSettingsSeo')->isEcommerce()) { //check for ecommerce product ?><li><input type="checkbox" class="sq_sitemap" name="sq_sitemap[]" value="sitemap-product" <?php echo ((SQ_Tools::$options['sq_sitemap']['sitemap-product'][1] == 1) ? 'checked="checked"' : ''); ?>><?php _e('Products', _SQ_PLUGIN_NAME_); ?></li><?php } ?>
|
566 |
<li><input type="checkbox" class="sq_sitemap" name="sq_sitemap[]" value="sitemap-post" <?php echo ((SQ_Tools::$options['sq_sitemap']['sitemap-post'][1] == 1) ? 'checked="checked"' : ''); ?>><?php _e('Posts', _SQ_PLUGIN_NAME_); ?></li>
|
@@ -570,6 +527,8 @@
|
|
570 |
<li><input type="checkbox" class="sq_sitemap" name="sq_sitemap[]" value="sitemap-custom-tax" <?php echo ((SQ_Tools::$options['sq_sitemap']['sitemap-custom-tax'][1] == 1) ? 'checked="checked"' : ''); ?>><?php _e('Custom Taxonomies', _SQ_PLUGIN_NAME_); ?></li>
|
571 |
<li><input type="checkbox" class="sq_sitemap" name="sq_sitemap[]" value="sitemap-custom-post" <?php echo ((SQ_Tools::$options['sq_sitemap']['sitemap-custom-post'][1] == 1) ? 'checked="checked"' : ''); ?>><?php _e('Custom Posts', _SQ_PLUGIN_NAME_); ?></li>
|
572 |
</ul>
|
|
|
|
|
573 |
</li>
|
574 |
<li>
|
575 |
<p><?php _e('Include in Sitemaps', _SQ_PLUGIN_NAME_); ?>:</p>
|
@@ -591,7 +550,7 @@
|
|
591 |
</div>
|
592 |
</fieldset>
|
593 |
<a name="sq_favicon_anchor"></a>
|
594 |
-
<fieldset id="sq_favicon"
|
595 |
<legend>
|
596 |
<span class="sq_legend_title"><?php _e('Change the Website Icon', _SQ_PLUGIN_NAME_); ?></span>
|
597 |
<span><?php _e('Now, even tablet & smartphone browsers make use of your icons. This makes having a good favicon even more important.', _SQ_PLUGIN_NAME_); ?> </span>
|
@@ -625,7 +584,7 @@
|
|
625 |
</div>
|
626 |
|
627 |
</fieldset>
|
628 |
-
<fieldset id="sq_jsonld"
|
629 |
<legend>
|
630 |
<span class="sq_legend_title"><?php _e('JSON-LD for Semantic SEO', _SQ_PLUGIN_NAME_); ?></span>
|
631 |
<span><?php echo __('Squirrly will automatically add the JSON-LD Structured Data in your site.', _SQ_PLUGIN_NAME_) ?></span>
|
@@ -691,6 +650,56 @@
|
|
691 |
</ul>
|
692 |
</div>
|
693 |
</fieldset>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
694 |
<fieldset id="sq_tracking" >
|
695 |
<legend>
|
696 |
<span class="sq_legend_title"><?php _e('Tracking Tools', _SQ_PLUGIN_NAME_); ?></span>
|
@@ -704,7 +713,7 @@
|
|
704 |
|
705 |
<p class="withborder withcode">
|
706 |
<span class="sq_icon sq_icon_googleanalytics"></span>
|
707 |
-
<?php echo sprintf(__('Google %sAnalytics ID%s:', _SQ_PLUGIN_NAME_), '<a href="
|
708 |
</p>
|
709 |
<p class="withborder withcode" >
|
710 |
<span class="sq_icon sq_icon_facebookinsights"></span>
|
19 |
<fieldset>
|
20 |
<legend>
|
21 |
<span class="sq_legend_title"><?php _e('Let Squirrly SEO optimize this blog', _SQ_PLUGIN_NAME_); ?></span>
|
22 |
+
<span><?php echo sprintf(__('%sIs Squirrly SEO better then WordPress SEO by Yoast?%s', _SQ_PLUGIN_NAME_), '<a href="http://www.squirrly.co/why_is_squirrly_seo_better_then_wordpress_seo_by_yoast-pagblog-article_id61980-html" target="_blank">', '</a>'); ?></span>
|
23 |
|
24 |
<span><?php _e('Activate the built-in SEO settings from Squirrly by switching Yes below. <strong>Works well with Multisites and Ecommerce.</strong>', _SQ_PLUGIN_NAME_); ?></span><br />
|
25 |
<div class="sq_option_content">
|
152 |
<label for="sq_auto_amp0" class="sq_switch-label sq_switch-label-on"><?php _e('No', _SQ_PLUGIN_NAME_); ?></label>
|
153 |
<span class="sq_switch-selection"></span>
|
154 |
</div>
|
155 |
+
<span><?php echo sprintf(__('loads <strong>%sGoogle Analytics AMP%s</strong> (Note: Only for AMP Themes!)', _SQ_PLUGIN_NAME_), '<a href="https://developers.google.com/analytics/devguides/collection/amp-analytics/" target="_blank">', '</a>'); ?></span>
|
156 |
</div>
|
157 |
</li>
|
158 |
<p class="sq_option_info" style="padding-left:10px; color: darkgrey;"> <?php _e('Note! By switching the <strong>Json-LD</strong>, <strong>XML Sitemap</strong> and <strong>Favicon</strong> on, you open new options below', _SQ_PLUGIN_NAME_); ?></p>
|
162 |
</div>
|
163 |
</div>
|
164 |
</fieldset>
|
165 |
+
<fieldset id="sq_title_description_keywords" <?php echo ((SQ_Tools::$options['sq_use'] == 0) ? 'class="deactivated"' : ''); ?> <?php echo ((SQ_Tools::$options['sq_fp_title'] == '' || SQ_Tools::$options['sq_auto_seo'] == 1) ? '' : 'class="sq_custom_title"'); ?>>
|
166 |
<legend>
|
167 |
+
<span class="sq_legend_title"><?php _e('Page Optimization', _SQ_PLUGIN_NAME_); ?></span>
|
168 |
<span><?php echo sprintf(__('%sThe best SEO approach to Meta information%s', _SQ_PLUGIN_NAME_), '<a href="http://www.squirrly.co/the-best-seo-approach-to-meta-information" target="_blank">', '</a>'); ?></span>
|
169 |
+
<span><?php _e('Optimize the <strong>Titles</strong>', _SQ_PLUGIN_NAME_); ?></span>
|
170 |
<?php
|
171 |
$auto_option = false;
|
172 |
if (SQ_Tools::$options['sq_auto_title'] == 1)
|
182 |
</div>
|
183 |
</div>
|
184 |
|
185 |
+
<span><?php _e('Optimize <strong>Descriptions</strong> and <strong>Keywords</strong>', _SQ_PLUGIN_NAME_); ?></span>
|
186 |
|
187 |
<?php
|
188 |
$auto_option = false;
|
200 |
</div>
|
201 |
<span class="withborder"></span>
|
202 |
<span class="sq_legend_title"><?php _e('SEO for all post/pages', _SQ_PLUGIN_NAME_); ?></span>
|
203 |
+
<span><?php echo sprintf(__('To customize the Title and Description for all the Posts and Pages in your site use the %sSquirrly Snippet Tool%s', _SQ_PLUGIN_NAME_), '<a href="http://howto.squirrly.co/sides/squirrly-snippet-tool/" target="_blank" >', '</a>'); ?></span>
|
204 |
|
205 |
</legend>
|
206 |
|
225 |
}
|
226 |
}
|
227 |
?>
|
228 |
+
<ul id="sq_settings_sq_use" class="sq_settings_info">
|
229 |
+
<span><?php _e('First Page Optimization:', _SQ_PLUGIN_NAME_); ?></span>
|
230 |
+
<li>
|
231 |
+
<input id="sq_customize" type="hidden" name="sq_auto_seo" value="0">
|
232 |
+
<div id="sq_customize_settings">
|
233 |
+
<p class="withborder">
|
234 |
+
<span style="width: 65px;display: inline-block; vertical-align: top;"><?php _e('Title:', _SQ_PLUGIN_NAME_); ?></span><input type="text" name="sq_fp_title" value="<?php echo ((SQ_Tools::$options['sq_fp_title'] <> '') ? SQ_Tools::$options['sq_fp_title'] : '') ?>" size="75" /><span id="sq_title_info" />
|
235 |
+
<span id="sq_fp_title_length"></span><span class="sq_settings_info"><?php _e('Tips: Length 10-75 chars', _SQ_PLUGIN_NAME_); ?></span>
|
236 |
+
</p>
|
237 |
+
<p class="withborder">
|
238 |
+
<span style="width: 65px;display: inline-block; vertical-align: top;"><?php _e('Description:', _SQ_PLUGIN_NAME_); ?></span><textarea name="sq_fp_description" cols="70" rows="3" ><?php echo ((SQ_Tools::$options['sq_fp_description'] <> '') ? SQ_Tools::$options['sq_fp_description'] : '') ?></textarea><span id="sq_description_info" />
|
239 |
+
<span id="sq_fp_description_length"></span><span class="sq_settings_info"><?php _e('Tips: Length 70-165 chars', _SQ_PLUGIN_NAME_); ?></span>
|
240 |
+
</p>
|
241 |
+
<p class="withborder">
|
242 |
+
<span style="width: 65px;display: inline-block; vertical-align: top;"><?php _e('Keywords:', _SQ_PLUGIN_NAME_); ?></span><input type="text" name="sq_fp_keywords" value="<?php echo ((SQ_Tools::$options['sq_fp_keywords'] <> '') ? SQ_Tools::$options['sq_fp_keywords'] : '') ?>" size="70" />
|
243 |
+
<span id="sq_fp_keywords_length"></span><span class="sq_settings_info"><?php _e('Tips: 2-4 keywords', _SQ_PLUGIN_NAME_); ?></span>
|
244 |
+
</p>
|
245 |
+
<p class="withborder sq_select_ogimage" <?php echo ((SQ_Tools::$options['sq_auto_facebook'] == 1) ? '' : 'style="display:none"') ?>>
|
246 |
+
<span style="width: 65px;display: inline-block; vertical-align: top;"><?php _e('OG Image:', _SQ_PLUGIN_NAME_); ?></span>
|
247 |
+
<strong><input type="text" name="sq_fp_ogimage" value="<?php echo ((SQ_Tools::$options['sq_fp_ogimage'] <> '') ? SQ_Tools::$options['sq_fp_ogimage'] : '') ?>" size="60" style="display:none;" /><input id="sq_fp_imageselect" type="button" class="sq_button" value="<?php echo __('Select Open Graph Image', _SQ_PLUGIN_NAME_) ?>"/></strong>
|
248 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
</div>
|
250 |
+
</li>
|
251 |
+
<li>
|
252 |
+
<span class="sq_option_info"><?php _e('First Page Preview (Title, Description, Keywords)', _SQ_PLUGIN_NAME_); ?></span>
|
253 |
+
<div id="sq_snippet">
|
254 |
+
<div id="sq_snippet_name"><?php _e('Squirrly Snippet', _SQ_PLUGIN_NAME_) ?></div>
|
255 |
+
|
256 |
+
<ul id="sq_snippet_ul">
|
257 |
+
<div class="sq_select_ogimage_preview" <?php echo ((SQ_Tools::$options['sq_auto_facebook'] == 1) ? '' : 'style="display:none"') ?>>
|
258 |
+
<div class="sq_fp_ogimage_close" <?php echo ((SQ_Tools::$options['sq_fp_ogimage'] <> '') ? '' : 'style="display:none;"') ?>>x</div>
|
259 |
+
<div class="sq_fp_ogimage"><?php echo ((SQ_Tools::$options['sq_fp_ogimage'] <> '') ? '<img src="'.SQ_Tools::$options['sq_fp_ogimage'] .'" />' : '') ?></div>
|
260 |
+
</div>
|
261 |
+
<li id="sq_snippet_title"></li>
|
262 |
+
<li id="sq_snippet_url"></li>
|
263 |
+
<li id="sq_snippet_description"></li>
|
264 |
+
</ul>
|
265 |
+
|
266 |
+
<div id="sq_snippet_disclaimer" ><?php _e('If you don\'t see any changes in custom optimization, check if another SEO plugin affects Squirrly SEO', _SQ_PLUGIN_NAME_) ?></div>
|
267 |
+
</div>
|
268 |
+
</li>
|
269 |
+
<li>
|
270 |
+
<span class="sq_option_info"><?php echo sprintf(__('Use the %s<strong>Squirrly Snippet Tool</strong>%s while edit a Post/Page to customize the Title and Description for all the Posts and Pages', _SQ_PLUGIN_NAME_), '<a href="http://howto.squirrly.co/sides/squirrly-snippet-tool/" target="_blank" >', '</a>'); ?></span>
|
271 |
|
272 |
+
</li>
|
273 |
+
</ul>
|
274 |
</div>
|
275 |
</fieldset>
|
276 |
+
<fieldset id="sq_social_media" <?php echo ((SQ_Tools::$options['sq_use'] == 0) ? 'class="deactivated"' : ''); ?>>
|
277 |
<legend>
|
278 |
<span class="sq_legend_title"><?php _e('Social Media Options', _SQ_PLUGIN_NAME_); ?></span>
|
279 |
<p>
|
486 |
</ul>
|
487 |
</div>
|
488 |
</fieldset>
|
489 |
+
<fieldset id="sq_sitemap" <?php echo ((SQ_Tools::$options['sq_use'] == 0 || SQ_Tools::$options['sq_auto_sitemap'] == 0) ? 'class="deactivated"' : ''); ?>>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
490 |
<legend>
|
491 |
<span class="sq_legend_title"><?php _e('XML Sitemap for Google', _SQ_PLUGIN_NAME_); ?></span>
|
492 |
<span><?php echo __('Squirrly Sitemap is the fastest way to tell Google about your site links. <strong>Supports Multisites, Google News, Images, Videos, Custom Post Types, Custom Taxonomies and Ecommerce products</strong>', _SQ_PLUGIN_NAME_) ?></span>
|
493 |
<span><?php echo sprintf(__('%sHow to submit your sitemap.xml in Google Webmaster Tool%s', _SQ_PLUGIN_NAME_), '<a href="http://howto.squirrly.co/wordpress-seo/how-to-submit-your-sitemap-xml-in-google-sitemap/" target="_blank">', '</a>'); ?></span>
|
494 |
<span><?php echo sprintf(__('%s10 Vital To Dos to Feed Your SEO Content Machine After You Post Articles%s', _SQ_PLUGIN_NAME_), '<a href="http://www.squirrly.co/10_vital_to_dos_to_feed_your_seo_content_machine_after_you_post_articles-pagblog-article_id62194-html" target="_blank">', '</a>'); ?></span>
|
495 |
+
<span><?php echo sprintf(__('For Google News Sitemap, ensure that your site is included in %sGoogle News%s', _SQ_PLUGIN_NAME_), '<a href="https://partnerdash.google.com/partnerdash/d/news" target="_blank">', '</a>'); ?></span>
|
496 |
+
</legend>
|
497 |
|
498 |
<div>
|
499 |
<?php
|
517 |
<p><?php _e('Build Sitemaps for', _SQ_PLUGIN_NAME_); ?>:</p>
|
518 |
<ul id="sq_sitemap_buid">
|
519 |
<li class="sq_selectall"><input type="checkbox" id="sq_selectall"/>Select All</li>
|
520 |
+
<li><input type="checkbox" class="sq_sitemap" name="sq_sitemap[]" value="sitemap-news" <?php echo ((SQ_Tools::$options['sq_sitemap']['sitemap-news'][1] == 1) ? 'checked="checked"' : ''); ?>><?php _e('Google News', _SQ_PLUGIN_NAME_); ?> <a href="https://partnerdash.google.com/partnerdash/d/news" target="_blank">Read first!</a></li>
|
521 |
<li><input type="checkbox" class="sq_sitemap" name="sq_sitemap[]" value="sitemap-category" <?php echo ((SQ_Tools::$options['sq_sitemap']['sitemap-category'][1] == 1) ? 'checked="checked"' : ''); ?>><?php _e('Categories', _SQ_PLUGIN_NAME_); ?></li>
|
522 |
<?php if (SQ_ObjController::getModel('SQ_BlockSettingsSeo')->isEcommerce()) { //check for ecommerce product ?><li><input type="checkbox" class="sq_sitemap" name="sq_sitemap[]" value="sitemap-product" <?php echo ((SQ_Tools::$options['sq_sitemap']['sitemap-product'][1] == 1) ? 'checked="checked"' : ''); ?>><?php _e('Products', _SQ_PLUGIN_NAME_); ?></li><?php } ?>
|
523 |
<li><input type="checkbox" class="sq_sitemap" name="sq_sitemap[]" value="sitemap-post" <?php echo ((SQ_Tools::$options['sq_sitemap']['sitemap-post'][1] == 1) ? 'checked="checked"' : ''); ?>><?php _e('Posts', _SQ_PLUGIN_NAME_); ?></li>
|
527 |
<li><input type="checkbox" class="sq_sitemap" name="sq_sitemap[]" value="sitemap-custom-tax" <?php echo ((SQ_Tools::$options['sq_sitemap']['sitemap-custom-tax'][1] == 1) ? 'checked="checked"' : ''); ?>><?php _e('Custom Taxonomies', _SQ_PLUGIN_NAME_); ?></li>
|
528 |
<li><input type="checkbox" class="sq_sitemap" name="sq_sitemap[]" value="sitemap-custom-post" <?php echo ((SQ_Tools::$options['sq_sitemap']['sitemap-custom-post'][1] == 1) ? 'checked="checked"' : ''); ?>><?php _e('Custom Posts', _SQ_PLUGIN_NAME_); ?></li>
|
529 |
</ul>
|
530 |
+
<span style="color: red; margin: 10px; line-height: 20px; display: block;"><?php echo sprintf(__('Select only the Post Types that have links in them. Your sitemap will be %s', _SQ_PLUGIN_NAME_),'<a href="' . SQ_ObjController::getController('SQ_Sitemaps')->getXmlUrl('sitemap') . '" target="_blank">' . SQ_ObjController::getController('SQ_Sitemaps')->getXmlUrl('sitemap') . '</a></strong>'); ?></span>
|
531 |
+
|
532 |
</li>
|
533 |
<li>
|
534 |
<p><?php _e('Include in Sitemaps', _SQ_PLUGIN_NAME_); ?>:</p>
|
550 |
</div>
|
551 |
</fieldset>
|
552 |
<a name="sq_favicon_anchor"></a>
|
553 |
+
<fieldset id="sq_favicon" <?php echo ((SQ_Tools::$options['sq_use'] == 0 || SQ_Tools::$options['sq_auto_favicon'] == 0) ? 'class="deactivated"' : ''); ?>>
|
554 |
<legend>
|
555 |
<span class="sq_legend_title"><?php _e('Change the Website Icon', _SQ_PLUGIN_NAME_); ?></span>
|
556 |
<span><?php _e('Now, even tablet & smartphone browsers make use of your icons. This makes having a good favicon even more important.', _SQ_PLUGIN_NAME_); ?> </span>
|
584 |
</div>
|
585 |
|
586 |
</fieldset>
|
587 |
+
<fieldset id="sq_jsonld" <?php echo ((SQ_Tools::$options['sq_use'] == 0 || SQ_Tools::$options['sq_auto_jsonld'] == 0) ? 'class="deactivated"' : ''); ?>>
|
588 |
<legend>
|
589 |
<span class="sq_legend_title"><?php _e('JSON-LD for Semantic SEO', _SQ_PLUGIN_NAME_); ?></span>
|
590 |
<span><?php echo __('Squirrly will automatically add the JSON-LD Structured Data in your site.', _SQ_PLUGIN_NAME_) ?></span>
|
650 |
</ul>
|
651 |
</div>
|
652 |
</fieldset>
|
653 |
+
<fieldset id="sq_social_media_accounts" >
|
654 |
+
<legend>
|
655 |
+
<span class="sq_legend_title"><?php _e('Social Media Accounts', _SQ_PLUGIN_NAME_); ?></span>
|
656 |
+
<span><?php echo sprintf(__('%sLink your Google+ profile to the content you create%s', _SQ_PLUGIN_NAME_), '<a href="https://developers.google.com/structured-data/" target="_blank">', '</a>'); ?></span>
|
657 |
+
<span><?php echo sprintf(__('%sTwitter account is mandatory for <strong>Twitter Card Validation</strong>%s', _SQ_PLUGIN_NAME_), '<a href="https://dev.twitter.com/docs/cards/validation/validator" target="_blank">', '</a>'); ?></span>
|
658 |
+
<span><?php echo sprintf(__('%sAdd all your social accounts for <strong>JSON-LD Semantic SEO</strong>%s', _SQ_PLUGIN_NAME_), '<a href="http://howto.squirrly.c%so/sides/squirrly-json-ld-structured-data/" target="_blank">', '</a>'); ?></span>
|
659 |
+
<span><?php echo sprintf(__('%sSpecify your social profiles to Google%s', _SQ_PLUGIN_NAME_), '<a href="https://developers.google.com/structured-data/customize/social-profiles" target="_blank">', '</a>'); ?></span>
|
660 |
+
</legend>
|
661 |
+
|
662 |
+
<div>
|
663 |
+
<ul id="sq_settings_sq_use" class="sq_settings_info">
|
664 |
+
<li>
|
665 |
+
<p class="withborder withcode">
|
666 |
+
<span class="sq_icon sq_icon_twitter"></span>
|
667 |
+
<?php _e('Your Twitter Account:', _SQ_PLUGIN_NAME_); ?><br /><strong><input type="text" name="sq_twitter_account" value="<?php echo ((SQ_Tools::$options['sq_twitter_account'] <> '') ? SQ_Tools::$options['sq_twitter_account'] : '') ?>" size="60" placeholder="https://twitter.com/" /> (e.g. https://twitter.com/XXXXXXXXXXXXXXXXXX)</strong>
|
668 |
+
</p>
|
669 |
+
</li>
|
670 |
+
<li>
|
671 |
+
<p class="withborder withcode">
|
672 |
+
<span class="sq_icon sq_icon_googleplus"></span>
|
673 |
+
<?php _e('Google Plus Profile:', _SQ_PLUGIN_NAME_); ?><br /><strong><input type="text" name="sq_google_plus" value="<?php echo ((SQ_Tools::$options['sq_google_plus'] <> '') ? SQ_Tools::$options['sq_google_plus'] : '') ?>" size="60" placeholder="https://plus.google.com/" /> (e.g. https://plus.google.com/+XXXXXXXXXXXXXXXXXX)</strong>
|
674 |
+
</p>
|
675 |
+
</li>
|
676 |
+
<li>
|
677 |
+
<p class="withborder withcode">
|
678 |
+
<span class="sq_icon sq_icon_facebook"></span>
|
679 |
+
<?php _e('Facebook Profile:', _SQ_PLUGIN_NAME_); ?><br /><strong><input type="text" name="sq_facebook_account" value="<?php echo ((SQ_Tools::$options['sq_facebook_account'] <> '') ? SQ_Tools::$options['sq_facebook_account'] : '') ?>" size="60" placeholder="https://www.facebook.com/" /> (e.g. https://www.facebook.com/XXXXXXXXXXXXXXXXXX)</strong>
|
680 |
+
</p>
|
681 |
+
</li>
|
682 |
+
<li>
|
683 |
+
<p class="withborder withcode">
|
684 |
+
<span class="sq_icon sq_icon_linkedin"></span>
|
685 |
+
<?php _e('Linkedin Profile:', _SQ_PLUGIN_NAME_); ?><br /><strong><input type="text" name="sq_linkedin_account" value="<?php echo ((SQ_Tools::$options['sq_linkedin_account'] <> '') ? SQ_Tools::$options['sq_linkedin_account'] : '') ?>" size="60" placeholder="https://www.linkedin.com/" /> (e.g. https://www.linkedin.com/XXXX/XXXXXXXXXXXXXXXXXX)</strong>
|
686 |
+
</p>
|
687 |
+
</li>
|
688 |
+
<li>
|
689 |
+
<p class="withborder withcode">
|
690 |
+
<span class="sq_icon sq_icon_social_pinterest"></span>
|
691 |
+
<?php _e('Pinterest Profile:', _SQ_PLUGIN_NAME_); ?><br /><strong><input type="text" name="sq_pinterest_account" value="<?php echo ((SQ_Tools::$options['sq_pinterest_account'] <> '') ? SQ_Tools::$options['sq_pinterest_account'] : '') ?>" size="60" placeholder="https://www.pinterest.com/" /> (e.g. https://www.pinterest.com/XXXXXXXXXXXXXXXXXX)</strong>
|
692 |
+
</p>
|
693 |
+
</li>
|
694 |
+
<li>
|
695 |
+
<p class="withborder withcode">
|
696 |
+
<span class="sq_icon sq_icon_social_instagram"></span>
|
697 |
+
<?php _e('Instagram Profile:', _SQ_PLUGIN_NAME_); ?><br /><strong><input type="text" name="sq_instagram_account" value="<?php echo ((SQ_Tools::$options['sq_instagram_account'] <> '') ? SQ_Tools::$options['sq_instagram_account'] : '') ?>" size="60" placeholder="https://www.instagram.com/" /> (e.g. https://www.linkedin.com/XXXXXXXXXXXXXXXXXX)</strong>
|
698 |
+
</p>
|
699 |
+
</li>
|
700 |
+
</ul>
|
701 |
+
</div>
|
702 |
+
</fieldset>
|
703 |
<fieldset id="sq_tracking" >
|
704 |
<legend>
|
705 |
<span class="sq_legend_title"><?php _e('Tracking Tools', _SQ_PLUGIN_NAME_); ?></span>
|
713 |
|
714 |
<p class="withborder withcode">
|
715 |
<span class="sq_icon sq_icon_googleanalytics"></span>
|
716 |
+
<?php echo sprintf(__('Google %sAnalytics ID%s:', _SQ_PLUGIN_NAME_), '<a href="https://analytics.google.com/analytics/web/" target="_blank">', '</a>'); ?><br><strong><input type="text" name="sq_google_analytics" value="<?php echo ((SQ_Tools::$options['sq_google_analytics'] <> '') ? SQ_Tools::$options['sq_google_analytics'] : '') ?>" size="15" placeholder="UA-XXXXXXX-XX" /> (e.g. UA-XXXXXXX-XX)</strong>
|
717 |
</p>
|
718 |
<p class="withborder withcode" >
|
719 |
<span class="sq_icon sq_icon_facebookinsights"></span>
|
themes/default/SQ_BlockSupport.php
CHANGED
@@ -24,7 +24,10 @@
|
|
24 |
<p><input id="sq_support_submit" type="button" value="<?php _e('Send Question', _SQ_PLUGIN_NAME_) ?>"></p>
|
25 |
|
26 |
</li>
|
27 |
-
<
|
|
|
|
|
|
|
28 |
|
29 |
</ul>
|
30 |
</li>
|
@@ -49,11 +52,11 @@
|
|
49 |
<li>
|
50 |
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
51 |
<tr>
|
52 |
-
<td><label class="sq_label_feedback_smiley sq_label_feedback_0" for="sq_feedback_0"></label><input class="sq_feedback_smiley" type="radio" name="sq_feedback_face" id="sq_feedback_0" value="1" title="<?php _e('Angry', _SQ_PLUGIN_NAME_) ?>"
|
53 |
-
<td><label class="sq_label_feedback_smiley sq_label_feedback_1" for="sq_feedback_1"></label><input class="sq_feedback_smiley" type="radio" name="sq_feedback_face" id="sq_feedback_1" value="2" title="<?php _e('Sad', _SQ_PLUGIN_NAME_) ?>"
|
54 |
-
<td><label class="sq_label_feedback_smiley sq_label_feedback_2" for="sq_feedback_2"></label><input class="sq_feedback_smiley" type="radio" name="sq_feedback_face" id="sq_feedback_2" value="3" title="<?php _e('Happy', _SQ_PLUGIN_NAME_) ?>"
|
55 |
-
<td><label class="sq_label_feedback_smiley sq_label_feedback_3" for="sq_feedback_3"></label><input class="sq_feedback_smiley" type="radio" name="sq_feedback_face" id="sq_feedback_3" value="4" title="<?php _e('Excited', _SQ_PLUGIN_NAME_) ?>"
|
56 |
-
<td><label class="sq_label_feedback_smiley sq_label_feedback_4" for="sq_feedback_4"></label><input class="sq_feedback_smiley" type="radio" name="sq_feedback_face" id="sq_feedback_4" value="5" title="<?php _e('Love it', _SQ_PLUGIN_NAME_) ?>"
|
57 |
</tr>
|
58 |
</table>
|
59 |
<div id="sq_options_feedback_error"></div>
|
@@ -65,7 +68,9 @@
|
|
65 |
</p>
|
66 |
|
67 |
</li>
|
68 |
-
<li><?php _e('
|
|
|
|
|
69 |
</ul>
|
70 |
<?php } else { ?>
|
71 |
<ul class="sq_options_feedback_popup" style="display: none;">
|
24 |
<p><input id="sq_support_submit" type="button" value="<?php _e('Send Question', _SQ_PLUGIN_NAME_) ?>"></p>
|
25 |
|
26 |
</li>
|
27 |
+
<hr />
|
28 |
+
<li><?php _e('Facebook:', _SQ_PLUGIN_NAME_) ?> <a href="<?php echo _SQ_SUPPORT_FACEBOOK_URL_ ?>" title="<?php _e('Send us a message', _SQ_PLUGIN_NAME_) ?>" target="_blank"><?php _e('Send us a message', _SQ_PLUGIN_NAME_) ?></a></li>
|
29 |
+
<li><?php _e('Google:', _SQ_PLUGIN_NAME_) ?> <a href="<?php echo _SQ_SUPPORT_GOOGLE_URL_ ?>" title="<?php _e('Join the support community', _SQ_PLUGIN_NAME_) ?>" target="_blank"><?php _e('Join the support community', _SQ_PLUGIN_NAME_) ?></a></li>
|
30 |
+
<li><?php _e('Contact:', _SQ_PLUGIN_NAME_) ?> <a href="<?php echo _SQ_SUPPORT_EMAIL_URL_ ?>" title="<?php _e('Write an email', _SQ_PLUGIN_NAME_) ?>" target="_blank"><?php _e('Write an email', _SQ_PLUGIN_NAME_) ?></a></li>
|
31 |
|
32 |
</ul>
|
33 |
</li>
|
52 |
<li>
|
53 |
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
54 |
<tr>
|
55 |
+
<td><label class="sq_label_feedback_smiley sq_label_feedback_0" for="sq_feedback_0"></label><input class="sq_feedback_smiley" type="radio" name="sq_feedback_face" id="sq_feedback_0" value="1" title="<?php _e('Angry', _SQ_PLUGIN_NAME_) ?>" /><?php _e("Annoying", _SQ_PLUGIN_NAME_) ?></td>
|
56 |
+
<td><label class="sq_label_feedback_smiley sq_label_feedback_1" for="sq_feedback_1"></label><input class="sq_feedback_smiley" type="radio" name="sq_feedback_face" id="sq_feedback_1" value="2" title="<?php _e('Sad', _SQ_PLUGIN_NAME_) ?>" /><?php _e("Bad", _SQ_PLUGIN_NAME_) ?></td>
|
57 |
+
<td><label class="sq_label_feedback_smiley sq_label_feedback_2" for="sq_feedback_2"></label><input class="sq_feedback_smiley" type="radio" name="sq_feedback_face" id="sq_feedback_2" value="3" title="<?php _e('Happy', _SQ_PLUGIN_NAME_) ?>" /><?php _e("Nice", _SQ_PLUGIN_NAME_) ?></td>
|
58 |
+
<td><label class="sq_label_feedback_smiley sq_label_feedback_3" for="sq_feedback_3"></label><input class="sq_feedback_smiley" type="radio" name="sq_feedback_face" id="sq_feedback_3" value="4" title="<?php _e('Excited', _SQ_PLUGIN_NAME_) ?>" /><?php _e("Great", _SQ_PLUGIN_NAME_) ?></td>
|
59 |
+
<td><label class="sq_label_feedback_smiley sq_label_feedback_4" for="sq_feedback_4"></label><input class="sq_feedback_smiley" type="radio" name="sq_feedback_face" id="sq_feedback_4" value="5" title="<?php _e('Love it', _SQ_PLUGIN_NAME_) ?>" /><?php _e("Love it", _SQ_PLUGIN_NAME_) ?></td>
|
60 |
</tr>
|
61 |
</table>
|
62 |
<div id="sq_options_feedback_error"></div>
|
68 |
</p>
|
69 |
|
70 |
</li>
|
71 |
+
<li style="margin-top: 10px;"><?php _e('Facebook:', _SQ_PLUGIN_NAME_) ?> <a href="<?php echo _SQ_SUPPORT_FACEBOOK_URL_ ?>" title="<?php _e('Send us a message', _SQ_PLUGIN_NAME_) ?>" target="_blank"><?php _e('Send us a message', _SQ_PLUGIN_NAME_) ?></a></li>
|
72 |
+
<li><?php _e('Google:', _SQ_PLUGIN_NAME_) ?> <a href="<?php echo _SQ_SUPPORT_GOOGLE_URL_ ?>" title="<?php _e('Join the support community', _SQ_PLUGIN_NAME_) ?>" target="_blank"><?php _e('Join the support community', _SQ_PLUGIN_NAME_) ?></a></li>
|
73 |
+
<li><?php _e('Contact:', _SQ_PLUGIN_NAME_) ?> <a href="<?php echo _SQ_SUPPORT_EMAIL_URL_ ?>" title="<?php _e('Write an email', _SQ_PLUGIN_NAME_) ?>" target="_blank"><?php _e('Write an email', _SQ_PLUGIN_NAME_) ?></a></li>
|
74 |
</ul>
|
75 |
<?php } else { ?>
|
76 |
<ul class="sq_options_feedback_popup" style="display: none;">
|
themes/default/SQ_Blocklogin.php
CHANGED
@@ -17,13 +17,16 @@
|
|
17 |
<div id="sq_autologin" align="center">
|
18 |
<div class="sq_error"></div>
|
19 |
<span id="sq_register"><?php _e('Enter your email', _SQ_PLUGIN_NAME_); ?></span><span id="sq_register_wait"></span>
|
20 |
-
<div id="sq_register_email"
|
|
|
21 |
<input type="text" id="sq_email" name="sq_email" value="<?php
|
22 |
$current_user = wp_get_current_user();
|
23 |
echo $current_user->user_email;
|
24 |
?>" />
|
|
|
25 |
</div>
|
26 |
-
<div id="
|
|
|
27 |
<div id="sq_signin"><?php _e('I already have an account', _SQ_PLUGIN_NAME_); ?></div>
|
28 |
<span><?php _e('This email connects you to Squirrly.co', _SQ_PLUGIN_NAME_); ?></span>
|
29 |
|
@@ -39,7 +42,7 @@
|
|
39 |
var __try_again = '<?php _e('Click on Sign Up button and try again ...', _SQ_PLUGIN_NAME_); ?>';
|
40 |
var __error_login = '<?php _e('An error occured while logging in!', _SQ_PLUGIN_NAME_); ?>';
|
41 |
var __connecting = '<?php _e('Connecting ...', _SQ_PLUGIN_NAME_); ?>';
|
42 |
-
jQuery('#sq_loginimage').
|
43 |
sq_autoLogin();
|
44 |
});
|
45 |
|
17 |
<div id="sq_autologin" align="center">
|
18 |
<div class="sq_error"></div>
|
19 |
<span id="sq_register"><?php _e('Enter your email', _SQ_PLUGIN_NAME_); ?></span><span id="sq_register_wait"></span>
|
20 |
+
<div id="sq_register_email" >
|
21 |
+
<label for="sq_email"><?php _e('Your Email:', _SQ_PLUGIN_NAME_); ?></label>
|
22 |
<input type="text" id="sq_email" name="sq_email" value="<?php
|
23 |
$current_user = wp_get_current_user();
|
24 |
echo $current_user->user_email;
|
25 |
?>" />
|
26 |
+
|
27 |
</div>
|
28 |
+
<div id="sq_termsdiv"><input type="checkbox" id="sq_terms" style="height: 18px;width: 18px; margin: 0 10px;" /><?php echo sprintf(__('I Agree with the %sSquirrly Terms%s', _SQ_PLUGIN_NAME_),'<a href="http://www.squirrly.co/terms-of-use#page-block-lvtsrakgujgzxgvi" target="_blank" >','</a>'); ?></div>
|
29 |
+
<div id="sq_loginimage" style="opacity: 0.4"><?php _e('Sign Up', _SQ_PLUGIN_NAME_); ?></div>
|
30 |
<div id="sq_signin"><?php _e('I already have an account', _SQ_PLUGIN_NAME_); ?></div>
|
31 |
<span><?php _e('This email connects you to Squirrly.co', _SQ_PLUGIN_NAME_); ?></span>
|
32 |
|
42 |
var __try_again = '<?php _e('Click on Sign Up button and try again ...', _SQ_PLUGIN_NAME_); ?>';
|
43 |
var __error_login = '<?php _e('An error occured while logging in!', _SQ_PLUGIN_NAME_); ?>';
|
44 |
var __connecting = '<?php _e('Connecting ...', _SQ_PLUGIN_NAME_); ?>';
|
45 |
+
jQuery('#sq_loginimage').on('click', function () {
|
46 |
sq_autoLogin();
|
47 |
});
|
48 |
|
themes/default/css/sq_blockdashboard.css
CHANGED
@@ -49,9 +49,11 @@
|
|
49 |
border-radius: 2px;
|
50 |
bottom: -5px;
|
51 |
cursor: pointer;
|
52 |
-
|
|
|
|
|
53 |
height: 35px;
|
54 |
-
padding:
|
55 |
margin: 0 0 5px 0;
|
56 |
overflow: hidden;
|
57 |
position: absolute;
|
49 |
border-radius: 2px;
|
50 |
bottom: -5px;
|
51 |
cursor: pointer;
|
52 |
+
color: darkorange;
|
53 |
+
font-size: 17px;
|
54 |
+
font-weight: bold;
|
55 |
height: 35px;
|
56 |
+
padding: 14px 0 0px 0;
|
57 |
margin: 0 0 5px 0;
|
58 |
overflow: hidden;
|
59 |
position: absolute;
|
themes/default/css/sq_global.css
CHANGED
@@ -6,14 +6,13 @@
|
|
6 |
font-size: 13px;
|
7 |
text-align: center;
|
8 |
|
9 |
-
border
|
10 |
-
border-style: solid;
|
11 |
-webkit-border-bottom-right-radius: 3px;
|
12 |
-webkit-border-bottom-left-radius: 3px;
|
13 |
border-bottom-right-radius: 3px;
|
14 |
border-bottom-left-radius: 3px;
|
15 |
background-color: #FFFBCC;
|
16 |
-
|
17 |
}
|
18 |
.sq_notices{
|
19 |
font-size: 13px;
|
6 |
font-size: 13px;
|
7 |
text-align: center;
|
8 |
|
9 |
+
border: 1px solid #E6DB55;
|
|
|
10 |
-webkit-border-bottom-right-radius: 3px;
|
11 |
-webkit-border-bottom-left-radius: 3px;
|
12 |
border-bottom-right-radius: 3px;
|
13 |
border-bottom-left-radius: 3px;
|
14 |
background-color: #FFFBCC;
|
15 |
+
position: relative;
|
16 |
}
|
17 |
.sq_notices{
|
18 |
font-size: 13px;
|
themes/default/css/sq_menu.css
CHANGED
@@ -289,12 +289,14 @@
|
|
289 |
/**************************************************************/
|
290 |
#sq_settings #sq_userinfo{
|
291 |
color: #333;
|
|
|
|
|
292 |
font-size: 14px;
|
293 |
font-weight: normal;
|
294 |
-
min-height: 500px;
|
295 |
margin: 0 15px 5px 0;
|
296 |
padding: 0px;
|
297 |
text-shadow: 1px 1px white;
|
|
|
298 |
}
|
299 |
#sq_settings #sq_userinfo li{
|
300 |
padding: 10px;
|
@@ -326,7 +328,7 @@
|
|
326 |
float: left;
|
327 |
clear: both;
|
328 |
width: 900px;
|
329 |
-
background: #
|
330 |
border: 1px solid #ddd;
|
331 |
font-size: 1.1em;
|
332 |
margin: 10px auto;
|
@@ -336,6 +338,21 @@
|
|
336 |
|
337 |
text-shadow: 1px 1px white;
|
338 |
box-shadow: 0 5px 9px -6px #222;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
339 |
}
|
340 |
#sq_settings_body fieldset > div{
|
341 |
float: left;
|
@@ -360,6 +377,8 @@
|
|
360 |
text-align: left;
|
361 |
color: #fff;
|
362 |
text-shadow: none;
|
|
|
|
|
363 |
}
|
364 |
#sq_settings_body fieldset legend.sq_legend_small{
|
365 |
min-height: 250px;
|
@@ -382,7 +401,7 @@
|
|
382 |
}
|
383 |
|
384 |
#sq_settings_body fieldset legend > span strong{
|
385 |
-
color: #
|
386 |
}
|
387 |
|
388 |
#sq_settings_body fieldset legend .sq_legend_title{
|
@@ -394,11 +413,11 @@
|
|
394 |
}
|
395 |
|
396 |
#sq_settings_body fieldset legend > span a{
|
397 |
-
color: #
|
398 |
font-size: 14px;
|
399 |
-
font-weight:
|
400 |
text-decoration: none;
|
401 |
-
text-shadow: 1px 1px #
|
402 |
}
|
403 |
|
404 |
#sq_settings_body fieldset legend select{
|
@@ -662,6 +681,7 @@
|
|
662 |
text-shadow: 1px 1px #FFF;
|
663 |
}
|
664 |
|
|
|
665 |
.sq_switch {
|
666 |
float: left;
|
667 |
position: relative;
|
@@ -674,6 +694,11 @@
|
|
674 |
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);
|
675 |
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);
|
676 |
}
|
|
|
|
|
|
|
|
|
|
|
677 |
.sq_switch-label {
|
678 |
position: relative;
|
679 |
z-index: 2;
|
289 |
/**************************************************************/
|
290 |
#sq_settings #sq_userinfo{
|
291 |
color: #333;
|
292 |
+
width: 100%;
|
293 |
+
min-height: 800px;
|
294 |
font-size: 14px;
|
295 |
font-weight: normal;
|
|
|
296 |
margin: 0 15px 5px 0;
|
297 |
padding: 0px;
|
298 |
text-shadow: 1px 1px white;
|
299 |
+
background-color: #f1f1f1 !important;
|
300 |
}
|
301 |
#sq_settings #sq_userinfo li{
|
302 |
padding: 10px;
|
328 |
float: left;
|
329 |
clear: both;
|
330 |
width: 900px;
|
331 |
+
background: #23282D;
|
332 |
border: 1px solid #ddd;
|
333 |
font-size: 1.1em;
|
334 |
margin: 10px auto;
|
338 |
|
339 |
text-shadow: 1px 1px white;
|
340 |
box-shadow: 0 5px 9px -6px #222;
|
341 |
+
|
342 |
+
|
343 |
+
background: linear-gradient(to bottom, #23282D 5%, rgba(55, 29, 48, 0.96) 100%), no-repeat 0 0 !important;
|
344 |
+
background: -moz-linear-gradient(top, #23282D 5%, rgba(55, 29, 48, 0.96) 100%), url(../img/settings/bgimage.jpg) no-repeat 0 0 !important;
|
345 |
+
background: -webkit-linear-gradient(top, #23282D 5%, rgba(55, 29, 48, 0.96) 100%), url(../img/settings/bgimage.jpg) no-repeat 0 0 !important;
|
346 |
+
background: -o-linear-gradient(top, #23282D 5%, rgba(55, 29, 48, 0.96) 100%), url(../img/settings/bgimage.jpg) no-repeat 0 0 !important;
|
347 |
+
background: -ms-linear-gradient(top, #23282D 5%, rgba(55, 29, 48, 0.96) 100%), url(../img/settings/bgimage.jpg) no-repeat 0 0 !important;
|
348 |
+
background-size: auto 100% !important;
|
349 |
+
background-position: top left !important;
|
350 |
+
background-attachment: fixed;
|
351 |
+
}
|
352 |
+
|
353 |
+
#sq_settings_body fieldset.deactivated{
|
354 |
+
opacity: 0.3;
|
355 |
+
cursor: pointer;
|
356 |
}
|
357 |
#sq_settings_body fieldset > div{
|
358 |
float: left;
|
377 |
text-align: left;
|
378 |
color: #fff;
|
379 |
text-shadow: none;
|
380 |
+
|
381 |
+
|
382 |
}
|
383 |
#sq_settings_body fieldset legend.sq_legend_small{
|
384 |
min-height: 250px;
|
401 |
}
|
402 |
|
403 |
#sq_settings_body fieldset legend > span strong{
|
404 |
+
color: #FFF;
|
405 |
}
|
406 |
|
407 |
#sq_settings_body fieldset legend .sq_legend_title{
|
413 |
}
|
414 |
|
415 |
#sq_settings_body fieldset legend > span a{
|
416 |
+
color: #FFD6AD;
|
417 |
font-size: 14px;
|
418 |
+
font-weight: 700;
|
419 |
text-decoration: none;
|
420 |
+
text-shadow: 1px 1px #000;
|
421 |
}
|
422 |
|
423 |
#sq_settings_body fieldset legend select{
|
681 |
text-shadow: 1px 1px #FFF;
|
682 |
}
|
683 |
|
684 |
+
|
685 |
.sq_switch {
|
686 |
float: left;
|
687 |
position: relative;
|
694 |
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);
|
695 |
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);
|
696 |
}
|
697 |
+
|
698 |
+
.sq_option_content .sq_switch{
|
699 |
+
border: 7px solid #fcfcfc;
|
700 |
+
margin-left: -10px;
|
701 |
+
}
|
702 |
.sq_switch-label {
|
703 |
position: relative;
|
704 |
z-index: 2;
|
themes/default/css/sq_post.css
CHANGED
@@ -260,6 +260,7 @@
|
|
260 |
display: block;
|
261 |
height: 37px;
|
262 |
width: 37px;
|
|
|
263 |
background: transparent url('../img/sprite.png') no-repeat;
|
264 |
border: none;
|
265 |
cursor: pointer;
|
@@ -291,7 +292,7 @@
|
|
291 |
#sq_options_support .sq_options_support_popup,
|
292 |
#sq_options_feedback .sq_options_feedback_popup{
|
293 |
display: table;
|
294 |
-
min-width:
|
295 |
position: absolute;
|
296 |
z-index: 1002;
|
297 |
background-color: white;
|
@@ -309,12 +310,18 @@
|
|
309 |
cursor: default;
|
310 |
}
|
311 |
#sq_options_support .sq_options_support_popup{
|
312 |
-
|
313 |
}
|
314 |
#sq_options_feedback .sq_options_feedback_popup{
|
315 |
left: -101px;
|
316 |
}
|
317 |
|
|
|
|
|
|
|
|
|
|
|
|
|
318 |
#sq_options_support .sq_options_support_popup li,
|
319 |
#sq_options_feedback .sq_options_feedback_popup li{
|
320 |
color: #333;
|
@@ -329,10 +336,11 @@
|
|
329 |
margin: 6px 0;
|
330 |
}
|
331 |
#sq_options_feedback .sq_small_input{
|
332 |
-
width:
|
|
|
333 |
}
|
334 |
#sq_options_support .sq_small_input{
|
335 |
-
width:
|
336 |
}
|
337 |
#sq_options_support .sq_options_support_popup #sq_support_submit,
|
338 |
#sq_options_feedback .sq_options_feedback_popup #sq_feedback_submit{
|
@@ -373,8 +381,9 @@
|
|
373 |
}
|
374 |
|
375 |
#sq_facebook_b {
|
376 |
-
padding: 6px
|
377 |
clear: both;
|
|
|
378 |
}
|
379 |
#sq_facebook_b > span{
|
380 |
display: block;
|
260 |
display: block;
|
261 |
height: 37px;
|
262 |
width: 37px;
|
263 |
+
margin: 5px auto;
|
264 |
background: transparent url('../img/sprite.png') no-repeat;
|
265 |
border: none;
|
266 |
cursor: pointer;
|
292 |
#sq_options_support .sq_options_support_popup,
|
293 |
#sq_options_feedback .sq_options_feedback_popup{
|
294 |
display: table;
|
295 |
+
min-width: 345px;
|
296 |
position: absolute;
|
297 |
z-index: 1002;
|
298 |
background-color: white;
|
310 |
cursor: default;
|
311 |
}
|
312 |
#sq_options_support .sq_options_support_popup{
|
313 |
+
right: 0px;
|
314 |
}
|
315 |
#sq_options_feedback .sq_options_feedback_popup{
|
316 |
left: -101px;
|
317 |
}
|
318 |
|
319 |
+
#sq_options_feedback table td{
|
320 |
+
text-align: center;
|
321 |
+
color: #999;
|
322 |
+
min-width: 50px;
|
323 |
+
height: 70px;
|
324 |
+
}
|
325 |
#sq_options_support .sq_options_support_popup li,
|
326 |
#sq_options_feedback .sq_options_feedback_popup li{
|
327 |
color: #333;
|
336 |
margin: 6px 0;
|
337 |
}
|
338 |
#sq_options_feedback .sq_small_input{
|
339 |
+
width: 100%;
|
340 |
+
height: 70px;
|
341 |
}
|
342 |
#sq_options_support .sq_small_input{
|
343 |
+
width: 100%;
|
344 |
}
|
345 |
#sq_options_support .sq_options_support_popup #sq_support_submit,
|
346 |
#sq_options_feedback .sq_options_feedback_popup #sq_feedback_submit{
|
381 |
}
|
382 |
|
383 |
#sq_facebook_b {
|
384 |
+
padding: 6px 50px;
|
385 |
clear: both;
|
386 |
+
display: table;
|
387 |
}
|
388 |
#sq_facebook_b > span{
|
389 |
display: block;
|
themes/default/css/sq_sitemap.xsl
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
<script type="text/javascript"><![CDATA[
|
12 |
(function($){$.extend({tablesorter:new
|
13 |
function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",cssChildRow:"expand-child",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,sortLocaleCompare:true,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'/\.|\,/g',onRenderHeader:null,selectorHeaders:'thead th',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}if(table.tBodies.length==0)return;var rows=table.tBodies[0].rows;if(rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}if(!p){p=detectParserForColumn(table,rows,-1,i);}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;};function detectParserForColumn(table,rows,rowIndex,cellIndex){var l=parsers.length,node=false,nodeValue=false,keepLooking=true;while(nodeValue==''&&keepLooking){rowIndex++;if(rows[rowIndex]){node=getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex);nodeValue=trimAndGetNodeText(table.config,node);if(table.config.debug){log('Checking if value was empty on row:'+rowIndex);}}else{keepLooking=false;}}for(var i=1;i<l;i++){if(parsers[i].is(nodeValue,table,node)){return parsers[i];}}return parsers[0];}function getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex){return rows[rowIndex].cells[cellIndex];}function trimAndGetNodeText(config,node){return $.trim(getElementText(config,node));}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=$(table.tBodies[0].rows[i]),cols=[];if(c.hasClass(table.config.cssChildRow)){cache.row[cache.row.length-1]=cache.row[cache.row.length-1].add(c);continue;}cache.row.push(c);for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c[0].cells[j]),table,c[0].cells[j]));}cols.push(cache.normalized.length);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;};function getElementText(config,node){var text="";if(!node)return"";if(!config.supportsTextContent)config.supportsTextContent=node.textContent||false;if(config.textExtraction=="simple"){if(config.supportsTextContent){text=node.textContent;}else{if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){text=node.childNodes[0].innerHTML;}else{text=node.innerHTML;}}}else{if(typeof(config.textExtraction)=="function"){text=config.textExtraction(node);}else{text=$(node).text();}}return text;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){var pos=n[i][checkCell];rows.push(r[pos]);if(!table.config.appender){var l=r[pos].length;for(var j=0;j<l;j++){tableBody[0].appendChild(r[pos][j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);};function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false;var header_index=computeTableHeaderCellIndexes(table);$tableHeaders=$(table.config.selectorHeaders,table).each(function(index){this.column=header_index[this.parentNode.rowIndex+"-"+this.cellIndex];this.order=formatSortingOrder(table.config.sortInitialOrder);this.count=this.order;if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(checkHeaderOptionsSortingLocked(table,index))this.order=this.lockedOrder=checkHeaderOptionsSortingLocked(table,index);if(!this.sortDisabled){var $th=$(this).addClass(table.config.cssHeader);if(table.config.onRenderHeader)table.config.onRenderHeader.apply($th);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;};function computeTableHeaderCellIndexes(t){var matrix=[];var lookup={};var thead=t.getElementsByTagName('THEAD')[0];var trs=thead.getElementsByTagName('TR');for(var i=0;i<trs.length;i++){var cells=trs[i].cells;for(var j=0;j<cells.length;j++){var c=cells[j];var rowIndex=c.parentNode.rowIndex;var cellId=rowIndex+"-"+c.cellIndex;var rowSpan=c.rowSpan||1;var colSpan=c.colSpan||1
|
14 |
-
var firstAvailCol;if(typeof(matrix[rowIndex])=="undefined"){matrix[rowIndex]=[];}for(var k=0;k<matrix[rowIndex].length+1;k++){if(typeof(matrix[rowIndex][k])=="undefined"){firstAvailCol=k;break;}}lookup[cellId]=firstAvailCol;for(var k=rowIndex;k<rowIndex+rowSpan;k++){if(typeof(matrix[k])=="undefined"){matrix[k]=[];}var matrixrow=matrix[k];for(var l=firstAvailCol;l<firstAvailCol+colSpan;l++){matrixrow[l]="x";}}}}return lookup;}function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function checkHeaderOptionsSortingLocked(table,i){if((table.config.headers[i])&&(table.config.headers[i].lockedOrder))return table.config.headers[i].lockedOrder;return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}};function formatSortingOrder(v){if(typeof(v)!="Number"){return(v.toLowerCase()=="desc")?1:0;}else{return(v==1)?1:0;}}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('<colgroup>');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('<col>').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(table.config.parsers[c].type=="text")?((order==0)?makeSortFunction("text","asc",c):makeSortFunction("text","desc",c)):((order==0)?makeSortFunction("numeric","asc",c):makeSortFunction("numeric","desc",c));var e="e"+i;dynamicExp+="var "+e+" = "+s;dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}dynamicExp+="return 0; ";dynamicExp+="}; ";if(table.config.debug){benchmark("Evaling expression:"+dynamicExp,new Date());}eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;};function makeSortFunction(type,direction,index){var a="a["+index+"]",b="b["+index+"]";if(type=='text'&&direction=='asc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+a+" < "+b+") ? -1 : 1 )));";}else if(type=='text'&&direction=='desc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+b+" < "+a+") ? -1 : 1 )));";}else if(type=='numeric'&&direction=='asc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+a+" - "+b+"));";}else if(type=='numeric'&&direction=='desc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+b+" - "+a+"));";}};function makeSortText(i){return"((a["+i+"] < b["+i+"]) ? -1 : ((a["+i+"] > b["+i+"]) ? 1 : 0));";};function makeSortTextDesc(i){return"((b["+i+"] < a["+i+"]) ? -1 : ((b["+i+"] > a["+i+"]) ? 1 : 0));";};function makeSortNumeric(i){return"a["+i+"]-b["+i+"];";};function makeSortNumericDesc(i){return"b["+i+"]-a["+i+"];";};function sortText(a,b){if(table.config.sortLocaleCompare)return a.localeCompare(b);return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){if(table.config.sortLocaleCompare)return b.localeCompare(a);return((b<a)?-1:((b>a)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$.data(this,"tablesorter",config);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){$this.trigger("sortStart");var $cell=$(this);var i=this.column;this.order=this.count++%2;if(this.lockedOrder)this.order=this.lockedOrder;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false;}});$this.bind("update",function(){var me=this;setTimeout(function(){me.config.parsers=buildParserCache(me,$headers);cache=buildCache(me);},1);}).bind("updateCell",function(e,cell){var config=this.config;var pos=[(cell.parentNode.rowIndex-1),cell.cellIndex];cache.normalized[pos[0]][pos[1]]=config.parsers[pos[1]].format(getElementText(config,cell),cell);}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).bind("appendCache",function(){appendToTable(this,cache);}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).bind("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);};};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){return/^[-+]?\d*$/.test($.trim(s.replace(/[,.']/g,'')));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild);}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLocaleLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[£$€?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[£$€]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}var $tr,row=-1,odd;$("tr:visible",table.tBodies[0]).each(function(i){$tr=$(this);if(!$tr.hasClass(table.config.cssChildRow))row++;odd=(row%2==0);$tr.removeClass(table.config.widgetZebra.css[odd?0:1]).addClass(table.config.widgetZebra.css[odd?1:0])});if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);
|
15 |
$(document).ready(function() {
|
16 |
$("#sitemap").tablesorter( { sortList: [[1,0]],widgets: ['zebra'] } );
|
17 |
});
|
11 |
<script type="text/javascript"><![CDATA[
|
12 |
(function($){$.extend({tablesorter:new
|
13 |
function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",cssChildRow:"expand-child",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,sortLocaleCompare:true,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'/\.|\,/g',onRenderHeader:null,selectorHeaders:'thead th',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}if(table.tBodies.length==0)return;var rows=table.tBodies[0].rows;if(rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}if(!p){p=detectParserForColumn(table,rows,-1,i);}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;};function detectParserForColumn(table,rows,rowIndex,cellIndex){var l=parsers.length,node=false,nodeValue=false,keepLooking=true;while(nodeValue==''&&keepLooking){rowIndex++;if(rows[rowIndex]){node=getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex);nodeValue=trimAndGetNodeText(table.config,node);if(table.config.debug){log('Checking if value was empty on row:'+rowIndex);}}else{keepLooking=false;}}for(var i=1;i<l;i++){if(parsers[i].is(nodeValue,table,node)){return parsers[i];}}return parsers[0];}function getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex){return rows[rowIndex].cells[cellIndex];}function trimAndGetNodeText(config,node){return $.trim(getElementText(config,node));}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=$(table.tBodies[0].rows[i]),cols=[];if(c.hasClass(table.config.cssChildRow)){cache.row[cache.row.length-1]=cache.row[cache.row.length-1].add(c);continue;}cache.row.push(c);for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c[0].cells[j]),table,c[0].cells[j]));}cols.push(cache.normalized.length);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;};function getElementText(config,node){var text="";if(!node)return"";if(!config.supportsTextContent)config.supportsTextContent=node.textContent||false;if(config.textExtraction=="simple"){if(config.supportsTextContent){text=node.textContent;}else{if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){text=node.childNodes[0].innerHTML;}else{text=node.innerHTML;}}}else{if(typeof(config.textExtraction)=="function"){text=config.textExtraction(node);}else{text=$(node).text();}}return text;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){var pos=n[i][checkCell];rows.push(r[pos]);if(!table.config.appender){var l=r[pos].length;for(var j=0;j<l;j++){tableBody[0].appendChild(r[pos][j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);};function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false;var header_index=computeTableHeaderCellIndexes(table);$tableHeaders=$(table.config.selectorHeaders,table).each(function(index){this.column=header_index[this.parentNode.rowIndex+"-"+this.cellIndex];this.order=formatSortingOrder(table.config.sortInitialOrder);this.count=this.order;if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(checkHeaderOptionsSortingLocked(table,index))this.order=this.lockedOrder=checkHeaderOptionsSortingLocked(table,index);if(!this.sortDisabled){var $th=$(this).addClass(table.config.cssHeader);if(table.config.onRenderHeader)table.config.onRenderHeader.apply($th);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;};function computeTableHeaderCellIndexes(t){var matrix=[];var lookup={};var thead=t.getElementsByTagName('THEAD')[0];var trs=thead.getElementsByTagName('TR');for(var i=0;i<trs.length;i++){var cells=trs[i].cells;for(var j=0;j<cells.length;j++){var c=cells[j];var rowIndex=c.parentNode.rowIndex;var cellId=rowIndex+"-"+c.cellIndex;var rowSpan=c.rowSpan||1;var colSpan=c.colSpan||1
|
14 |
+
var firstAvailCol;if(typeof(matrix[rowIndex])=="undefined"){matrix[rowIndex]=[];}for(var k=0;k<matrix[rowIndex].length+1;k++){if(typeof(matrix[rowIndex][k])=="undefined"){firstAvailCol=k;break;}}lookup[cellId]=firstAvailCol;for(var k=rowIndex;k<rowIndex+rowSpan;k++){if(typeof(matrix[k])=="undefined"){matrix[k]=[];}var matrixrow=matrix[k];for(var l=firstAvailCol;l<firstAvailCol+colSpan;l++){matrixrow[l]="x";}}}}return lookup;}function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function checkHeaderOptionsSortingLocked(table,i){if((table.config.headers[i])&&(table.config.headers[i].lockedOrder))return table.config.headers[i].lockedOrder;return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}};function formatSortingOrder(v){if(typeof(v)!="Number"){return(v.toLowerCase()=="desc")?1:0;}else{return(v==1)?1:0;}}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('<colgroup>');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('<col>').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(table.config.parsers[c].type=="text")?((order==0)?makeSortFunction("text","asc",c):makeSortFunction("text","desc",c)):((order==0)?makeSortFunction("numeric","asc",c):makeSortFunction("numeric","desc",c));var e="e"+i;dynamicExp+="var "+e+" = "+s;dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}dynamicExp+="return 0; ";dynamicExp+="}; ";if(table.config.debug){benchmark("Evaling expression:"+dynamicExp,new Date());}eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;};function makeSortFunction(type,direction,index){var a="a["+index+"]",b="b["+index+"]";if(type=='text'&&direction=='asc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+a+" < "+b+") ? -1 : 1 )));";}else if(type=='text'&&direction=='desc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+b+" < "+a+") ? -1 : 1 )));";}else if(type=='numeric'&&direction=='asc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+a+" - "+b+"));";}else if(type=='numeric'&&direction=='desc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+b+" - "+a+"));";}};function makeSortText(i){return"((a["+i+"] < b["+i+"]) ? -1 : ((a["+i+"] > b["+i+"]) ? 1 : 0));";};function makeSortTextDesc(i){return"((b["+i+"] < a["+i+"]) ? -1 : ((b["+i+"] > a["+i+"]) ? 1 : 0));";};function makeSortNumeric(i){return"a["+i+"]-b["+i+"];";};function makeSortNumericDesc(i){return"b["+i+"]-a["+i+"];";};function sortText(a,b){if(table.config.sortLocaleCompare)return a.localeCompare(b);return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){if(table.config.sortLocaleCompare)return b.localeCompare(a);return((b<a)?-1:((b>a)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$.data(this,"tablesorter",config);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){$this.trigger("sortStart");var $cell=$(this);var i=this.column;this.order=this.count++%2;if(this.lockedOrder)this.order=this.lockedOrder;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false;}});$this.on("update",function(){var me=this;setTimeout(function(){me.config.parsers=buildParserCache(me,$headers);cache=buildCache(me);},1);}).on("updateCell",function(e,cell){var config=this.config;var pos=[(cell.parentNode.rowIndex-1),cell.cellIndex];cache.normalized[pos[0]][pos[1]]=config.parsers[pos[1]].format(getElementText(config,cell),cell);}).on("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).on("appendCache",function(){appendToTable(this,cache);}).on("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).on("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);};};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){return/^[-+]?\d*$/.test($.trim(s.replace(/[,.']/g,'')));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild);}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLocaleLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[£$€?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[£$€]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}var $tr,row=-1,odd;$("tr:visible",table.tBodies[0]).each(function(i){$tr=$(this);if(!$tr.hasClass(table.config.cssChildRow))row++;odd=(row%2==0);$tr.removeClass(table.config.widgetZebra.css[odd?0:1]).addClass(table.config.widgetZebra.css[odd?1:0])});if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);
|
15 |
$(document).ready(function() {
|
16 |
$("#sitemap").tablesorter( { sortList: [[1,0]],widgets: ['zebra'] } );
|
17 |
});
|
themes/default/css/sq_sitemapindex.xsl
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
<script type="text/javascript"><![CDATA[
|
12 |
(function($){$.extend({tablesorter:new
|
13 |
function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",cssChildRow:"expand-child",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,sortLocaleCompare:true,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'/\.|\,/g',onRenderHeader:null,selectorHeaders:'thead th',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}if(table.tBodies.length==0)return;var rows=table.tBodies[0].rows;if(rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}if(!p){p=detectParserForColumn(table,rows,-1,i);}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;};function detectParserForColumn(table,rows,rowIndex,cellIndex){var l=parsers.length,node=false,nodeValue=false,keepLooking=true;while(nodeValue==''&&keepLooking){rowIndex++;if(rows[rowIndex]){node=getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex);nodeValue=trimAndGetNodeText(table.config,node);if(table.config.debug){log('Checking if value was empty on row:'+rowIndex);}}else{keepLooking=false;}}for(var i=1;i<l;i++){if(parsers[i].is(nodeValue,table,node)){return parsers[i];}}return parsers[0];}function getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex){return rows[rowIndex].cells[cellIndex];}function trimAndGetNodeText(config,node){return $.trim(getElementText(config,node));}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=$(table.tBodies[0].rows[i]),cols=[];if(c.hasClass(table.config.cssChildRow)){cache.row[cache.row.length-1]=cache.row[cache.row.length-1].add(c);continue;}cache.row.push(c);for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c[0].cells[j]),table,c[0].cells[j]));}cols.push(cache.normalized.length);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;};function getElementText(config,node){var text="";if(!node)return"";if(!config.supportsTextContent)config.supportsTextContent=node.textContent||false;if(config.textExtraction=="simple"){if(config.supportsTextContent){text=node.textContent;}else{if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){text=node.childNodes[0].innerHTML;}else{text=node.innerHTML;}}}else{if(typeof(config.textExtraction)=="function"){text=config.textExtraction(node);}else{text=$(node).text();}}return text;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){var pos=n[i][checkCell];rows.push(r[pos]);if(!table.config.appender){var l=r[pos].length;for(var j=0;j<l;j++){tableBody[0].appendChild(r[pos][j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);};function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false;var header_index=computeTableHeaderCellIndexes(table);$tableHeaders=$(table.config.selectorHeaders,table).each(function(index){this.column=header_index[this.parentNode.rowIndex+"-"+this.cellIndex];this.order=formatSortingOrder(table.config.sortInitialOrder);this.count=this.order;if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(checkHeaderOptionsSortingLocked(table,index))this.order=this.lockedOrder=checkHeaderOptionsSortingLocked(table,index);if(!this.sortDisabled){var $th=$(this).addClass(table.config.cssHeader);if(table.config.onRenderHeader)table.config.onRenderHeader.apply($th);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;};function computeTableHeaderCellIndexes(t){var matrix=[];var lookup={};var thead=t.getElementsByTagName('THEAD')[0];var trs=thead.getElementsByTagName('TR');for(var i=0;i<trs.length;i++){var cells=trs[i].cells;for(var j=0;j<cells.length;j++){var c=cells[j];var rowIndex=c.parentNode.rowIndex;var cellId=rowIndex+"-"+c.cellIndex;var rowSpan=c.rowSpan||1;var colSpan=c.colSpan||1
|
14 |
-
var firstAvailCol;if(typeof(matrix[rowIndex])=="undefined"){matrix[rowIndex]=[];}for(var k=0;k<matrix[rowIndex].length+1;k++){if(typeof(matrix[rowIndex][k])=="undefined"){firstAvailCol=k;break;}}lookup[cellId]=firstAvailCol;for(var k=rowIndex;k<rowIndex+rowSpan;k++){if(typeof(matrix[k])=="undefined"){matrix[k]=[];}var matrixrow=matrix[k];for(var l=firstAvailCol;l<firstAvailCol+colSpan;l++){matrixrow[l]="x";}}}}return lookup;}function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function checkHeaderOptionsSortingLocked(table,i){if((table.config.headers[i])&&(table.config.headers[i].lockedOrder))return table.config.headers[i].lockedOrder;return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}};function formatSortingOrder(v){if(typeof(v)!="Number"){return(v.toLowerCase()=="desc")?1:0;}else{return(v==1)?1:0;}}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('<colgroup>');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('<col>').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(table.config.parsers[c].type=="text")?((order==0)?makeSortFunction("text","asc",c):makeSortFunction("text","desc",c)):((order==0)?makeSortFunction("numeric","asc",c):makeSortFunction("numeric","desc",c));var e="e"+i;dynamicExp+="var "+e+" = "+s;dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}dynamicExp+="return 0; ";dynamicExp+="}; ";if(table.config.debug){benchmark("Evaling expression:"+dynamicExp,new Date());}eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;};function makeSortFunction(type,direction,index){var a="a["+index+"]",b="b["+index+"]";if(type=='text'&&direction=='asc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+a+" < "+b+") ? -1 : 1 )));";}else if(type=='text'&&direction=='desc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+b+" < "+a+") ? -1 : 1 )));";}else if(type=='numeric'&&direction=='asc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+a+" - "+b+"));";}else if(type=='numeric'&&direction=='desc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+b+" - "+a+"));";}};function makeSortText(i){return"((a["+i+"] < b["+i+"]) ? -1 : ((a["+i+"] > b["+i+"]) ? 1 : 0));";};function makeSortTextDesc(i){return"((b["+i+"] < a["+i+"]) ? -1 : ((b["+i+"] > a["+i+"]) ? 1 : 0));";};function makeSortNumeric(i){return"a["+i+"]-b["+i+"];";};function makeSortNumericDesc(i){return"b["+i+"]-a["+i+"];";};function sortText(a,b){if(table.config.sortLocaleCompare)return a.localeCompare(b);return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){if(table.config.sortLocaleCompare)return b.localeCompare(a);return((b<a)?-1:((b>a)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$.data(this,"tablesorter",config);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){$this.trigger("sortStart");var $cell=$(this);var i=this.column;this.order=this.count++%2;if(this.lockedOrder)this.order=this.lockedOrder;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false;}});$this.bind("update",function(){var me=this;setTimeout(function(){me.config.parsers=buildParserCache(me,$headers);cache=buildCache(me);},1);}).bind("updateCell",function(e,cell){var config=this.config;var pos=[(cell.parentNode.rowIndex-1),cell.cellIndex];cache.normalized[pos[0]][pos[1]]=config.parsers[pos[1]].format(getElementText(config,cell),cell);}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).bind("appendCache",function(){appendToTable(this,cache);}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).bind("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);};};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){return/^[-+]?\d*$/.test($.trim(s.replace(/[,.']/g,'')));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild);}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLocaleLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[£$€?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[£$€]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}var $tr,row=-1,odd;$("tr:visible",table.tBodies[0]).each(function(i){$tr=$(this);if(!$tr.hasClass(table.config.cssChildRow))row++;odd=(row%2==0);$tr.removeClass(table.config.widgetZebra.css[odd?0:1]).addClass(table.config.widgetZebra.css[odd?1:0])});if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);
|
15 |
$(document).ready(function() {
|
16 |
$("#sitemap").tablesorter( { sortList: [[0,0]],widgets: ['zebra'] } );
|
17 |
});
|
11 |
<script type="text/javascript"><![CDATA[
|
12 |
(function($){$.extend({tablesorter:new
|
13 |
function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",cssChildRow:"expand-child",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,sortLocaleCompare:true,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'/\.|\,/g',onRenderHeader:null,selectorHeaders:'thead th',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}if(table.tBodies.length==0)return;var rows=table.tBodies[0].rows;if(rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}if(!p){p=detectParserForColumn(table,rows,-1,i);}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;};function detectParserForColumn(table,rows,rowIndex,cellIndex){var l=parsers.length,node=false,nodeValue=false,keepLooking=true;while(nodeValue==''&&keepLooking){rowIndex++;if(rows[rowIndex]){node=getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex);nodeValue=trimAndGetNodeText(table.config,node);if(table.config.debug){log('Checking if value was empty on row:'+rowIndex);}}else{keepLooking=false;}}for(var i=1;i<l;i++){if(parsers[i].is(nodeValue,table,node)){return parsers[i];}}return parsers[0];}function getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex){return rows[rowIndex].cells[cellIndex];}function trimAndGetNodeText(config,node){return $.trim(getElementText(config,node));}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=$(table.tBodies[0].rows[i]),cols=[];if(c.hasClass(table.config.cssChildRow)){cache.row[cache.row.length-1]=cache.row[cache.row.length-1].add(c);continue;}cache.row.push(c);for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c[0].cells[j]),table,c[0].cells[j]));}cols.push(cache.normalized.length);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;};function getElementText(config,node){var text="";if(!node)return"";if(!config.supportsTextContent)config.supportsTextContent=node.textContent||false;if(config.textExtraction=="simple"){if(config.supportsTextContent){text=node.textContent;}else{if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){text=node.childNodes[0].innerHTML;}else{text=node.innerHTML;}}}else{if(typeof(config.textExtraction)=="function"){text=config.textExtraction(node);}else{text=$(node).text();}}return text;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){var pos=n[i][checkCell];rows.push(r[pos]);if(!table.config.appender){var l=r[pos].length;for(var j=0;j<l;j++){tableBody[0].appendChild(r[pos][j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);};function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false;var header_index=computeTableHeaderCellIndexes(table);$tableHeaders=$(table.config.selectorHeaders,table).each(function(index){this.column=header_index[this.parentNode.rowIndex+"-"+this.cellIndex];this.order=formatSortingOrder(table.config.sortInitialOrder);this.count=this.order;if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(checkHeaderOptionsSortingLocked(table,index))this.order=this.lockedOrder=checkHeaderOptionsSortingLocked(table,index);if(!this.sortDisabled){var $th=$(this).addClass(table.config.cssHeader);if(table.config.onRenderHeader)table.config.onRenderHeader.apply($th);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;};function computeTableHeaderCellIndexes(t){var matrix=[];var lookup={};var thead=t.getElementsByTagName('THEAD')[0];var trs=thead.getElementsByTagName('TR');for(var i=0;i<trs.length;i++){var cells=trs[i].cells;for(var j=0;j<cells.length;j++){var c=cells[j];var rowIndex=c.parentNode.rowIndex;var cellId=rowIndex+"-"+c.cellIndex;var rowSpan=c.rowSpan||1;var colSpan=c.colSpan||1
|
14 |
+
var firstAvailCol;if(typeof(matrix[rowIndex])=="undefined"){matrix[rowIndex]=[];}for(var k=0;k<matrix[rowIndex].length+1;k++){if(typeof(matrix[rowIndex][k])=="undefined"){firstAvailCol=k;break;}}lookup[cellId]=firstAvailCol;for(var k=rowIndex;k<rowIndex+rowSpan;k++){if(typeof(matrix[k])=="undefined"){matrix[k]=[];}var matrixrow=matrix[k];for(var l=firstAvailCol;l<firstAvailCol+colSpan;l++){matrixrow[l]="x";}}}}return lookup;}function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function checkHeaderOptionsSortingLocked(table,i){if((table.config.headers[i])&&(table.config.headers[i].lockedOrder))return table.config.headers[i].lockedOrder;return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}};function formatSortingOrder(v){if(typeof(v)!="Number"){return(v.toLowerCase()=="desc")?1:0;}else{return(v==1)?1:0;}}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('<colgroup>');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('<col>').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(table.config.parsers[c].type=="text")?((order==0)?makeSortFunction("text","asc",c):makeSortFunction("text","desc",c)):((order==0)?makeSortFunction("numeric","asc",c):makeSortFunction("numeric","desc",c));var e="e"+i;dynamicExp+="var "+e+" = "+s;dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}dynamicExp+="return 0; ";dynamicExp+="}; ";if(table.config.debug){benchmark("Evaling expression:"+dynamicExp,new Date());}eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;};function makeSortFunction(type,direction,index){var a="a["+index+"]",b="b["+index+"]";if(type=='text'&&direction=='asc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+a+" < "+b+") ? -1 : 1 )));";}else if(type=='text'&&direction=='desc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+b+" < "+a+") ? -1 : 1 )));";}else if(type=='numeric'&&direction=='asc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+a+" - "+b+"));";}else if(type=='numeric'&&direction=='desc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+b+" - "+a+"));";}};function makeSortText(i){return"((a["+i+"] < b["+i+"]) ? -1 : ((a["+i+"] > b["+i+"]) ? 1 : 0));";};function makeSortTextDesc(i){return"((b["+i+"] < a["+i+"]) ? -1 : ((b["+i+"] > a["+i+"]) ? 1 : 0));";};function makeSortNumeric(i){return"a["+i+"]-b["+i+"];";};function makeSortNumericDesc(i){return"b["+i+"]-a["+i+"];";};function sortText(a,b){if(table.config.sortLocaleCompare)return a.localeCompare(b);return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){if(table.config.sortLocaleCompare)return b.localeCompare(a);return((b<a)?-1:((b>a)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$.data(this,"tablesorter",config);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){$this.trigger("sortStart");var $cell=$(this);var i=this.column;this.order=this.count++%2;if(this.lockedOrder)this.order=this.lockedOrder;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false;}});$this.on("update",function(){var me=this;setTimeout(function(){me.config.parsers=buildParserCache(me,$headers);cache=buildCache(me);},1);}).on("updateCell",function(e,cell){var config=this.config;var pos=[(cell.parentNode.rowIndex-1),cell.cellIndex];cache.normalized[pos[0]][pos[1]]=config.parsers[pos[1]].format(getElementText(config,cell),cell);}).on("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).on("appendCache",function(){appendToTable(this,cache);}).on("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).on("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);};};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){return/^[-+]?\d*$/.test($.trim(s.replace(/[,.']/g,'')));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild);}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLocaleLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[£$€?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[£$€]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}var $tr,row=-1,odd;$("tr:visible",table.tBodies[0]).each(function(i){$tr=$(this);if(!$tr.hasClass(table.config.cssChildRow))row++;odd=(row%2==0);$tr.removeClass(table.config.widgetZebra.css[odd?0:1]).addClass(table.config.widgetZebra.css[odd?1:0])});if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);
|
15 |
$(document).ready(function() {
|
16 |
$("#sitemap").tablesorter( { sortList: [[0,0]],widgets: ['zebra'] } );
|
17 |
});
|
themes/default/img/settings/bgimage.jpg
ADDED
Binary file
|
themes/default/img/sprite.png
CHANGED
Binary file
|
themes/default/js/sq_blockdashboard.js
CHANGED
@@ -11,7 +11,7 @@ function sq_blockdashboard(){
|
|
11 |
jQuery('#sq_settings_login').after(jQuery('.sq_helpcontent'));
|
12 |
}
|
13 |
jQuery('.sq_helpcontent').show();
|
14 |
-
jQuery('.sq_slidelist a').
|
15 |
var li = jQuery(this).parent('li');
|
16 |
li.addClass('sq_loading');
|
17 |
li.find('a').hide();
|
@@ -22,7 +22,7 @@ function sq_blockdashboard(){
|
|
22 |
li.find('iframe').show();
|
23 |
li.append('<span>x</span>');
|
24 |
|
25 |
-
li.find('span').
|
26 |
var li = jQuery(this).parent('li');
|
27 |
li.find('a').show();
|
28 |
li.find('div').show();
|
11 |
jQuery('#sq_settings_login').after(jQuery('.sq_helpcontent'));
|
12 |
}
|
13 |
jQuery('.sq_helpcontent').show();
|
14 |
+
jQuery('.sq_slidelist a').on('click', function () {
|
15 |
var li = jQuery(this).parent('li');
|
16 |
li.addClass('sq_loading');
|
17 |
li.find('a').hide();
|
22 |
li.find('iframe').show();
|
23 |
li.append('<span>x</span>');
|
24 |
|
25 |
+
li.find('span').on('click', function () {
|
26 |
var li = jQuery(this).parent('li');
|
27 |
li.find('a').show();
|
28 |
li.find('div').show();
|
themes/default/js/sq_blocklogin.js
CHANGED
@@ -6,7 +6,7 @@ if (jQuery('#sq_blocklogin').length > 0) {
|
|
6 |
});
|
7 |
}
|
8 |
function sq_blocklogin() {
|
9 |
-
jQuery('#sq_email').
|
10 |
|
11 |
if (event.keyCode === 13)
|
12 |
sq_autoLogin();
|
@@ -14,7 +14,7 @@ function sq_blocklogin() {
|
|
14 |
return event.keyCode !== 13;
|
15 |
});
|
16 |
|
17 |
-
jQuery('#sq_user').
|
18 |
|
19 |
if (event.keyCode === 13)
|
20 |
jQuery('#sq_login').trigger('click');
|
@@ -22,7 +22,7 @@ function sq_blocklogin() {
|
|
22 |
return event.keyCode !== 13;
|
23 |
});
|
24 |
|
25 |
-
jQuery('#sq_password').
|
26 |
|
27 |
if (event.keyCode === 13)
|
28 |
jQuery('#sq_login').trigger('click');
|
@@ -30,7 +30,16 @@ function sq_blocklogin() {
|
|
30 |
return event.keyCode !== 13;
|
31 |
});
|
32 |
|
33 |
-
jQuery('#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
jQuery('#sq_autologin').hide();
|
35 |
jQuery('#sq_blocklogin').find('ul').show();
|
36 |
|
@@ -39,7 +48,7 @@ function sq_blocklogin() {
|
|
39 |
jQuery('#sq_email').focus();
|
40 |
});
|
41 |
|
42 |
-
jQuery('#sq_signup').
|
43 |
jQuery('#sq_autologin').show();
|
44 |
jQuery('#sq_blocklogin').find('ul').hide();
|
45 |
|
@@ -48,7 +57,7 @@ function sq_blocklogin() {
|
|
48 |
jQuery('#sq_email').focus();
|
49 |
});
|
50 |
|
51 |
-
jQuery('#sq_login').
|
52 |
jQuery('#sq_login').addClass('sq_minloading');
|
53 |
jQuery('#sq_login').attr("disabled", "disabled");
|
54 |
jQuery('#sq_login').val('');
|
@@ -214,6 +223,10 @@ function sq_reload(response) {
|
|
214 |
jQuery('#sq_goto_dashboard').show();
|
215 |
jQuery('.sq_login_link').after(jQuery('#sq_goto_dashboard').clone());
|
216 |
jQuery('.sq_login_link').remove();
|
|
|
|
|
|
|
|
|
217 |
}
|
218 |
}
|
219 |
|
6 |
});
|
7 |
}
|
8 |
function sq_blocklogin() {
|
9 |
+
jQuery('#sq_email').on('keypress', function (event) {
|
10 |
|
11 |
if (event.keyCode === 13)
|
12 |
sq_autoLogin();
|
14 |
return event.keyCode !== 13;
|
15 |
});
|
16 |
|
17 |
+
jQuery('#sq_user').on('keypress', function (event) {
|
18 |
|
19 |
if (event.keyCode === 13)
|
20 |
jQuery('#sq_login').trigger('click');
|
22 |
return event.keyCode !== 13;
|
23 |
});
|
24 |
|
25 |
+
jQuery('#sq_password').on('keypress', function (event) {
|
26 |
|
27 |
if (event.keyCode === 13)
|
28 |
jQuery('#sq_login').trigger('click');
|
30 |
return event.keyCode !== 13;
|
31 |
});
|
32 |
|
33 |
+
jQuery('#sq_terms').on('click', function () {
|
34 |
+
if (jQuery(this).prop("checked") == true){
|
35 |
+
jQuery('#sq_loginimage').css('opacity','1');
|
36 |
+
}else{
|
37 |
+
jQuery('#sq_loginimage').css('opacity','0.4');
|
38 |
+
}
|
39 |
+
});
|
40 |
+
|
41 |
+
|
42 |
+
jQuery('#sq_signin').on('click', function (event) {
|
43 |
jQuery('#sq_autologin').hide();
|
44 |
jQuery('#sq_blocklogin').find('ul').show();
|
45 |
|
48 |
jQuery('#sq_email').focus();
|
49 |
});
|
50 |
|
51 |
+
jQuery('#sq_signup').on('click', function (event) {
|
52 |
jQuery('#sq_autologin').show();
|
53 |
jQuery('#sq_blocklogin').find('ul').hide();
|
54 |
|
57 |
jQuery('#sq_email').focus();
|
58 |
});
|
59 |
|
60 |
+
jQuery('#sq_login').on('click', function () {
|
61 |
jQuery('#sq_login').addClass('sq_minloading');
|
62 |
jQuery('#sq_login').attr("disabled", "disabled");
|
63 |
jQuery('#sq_login').val('');
|
223 |
jQuery('#sq_goto_dashboard').show();
|
224 |
jQuery('.sq_login_link').after(jQuery('#sq_goto_dashboard').clone());
|
225 |
jQuery('.sq_login_link').remove();
|
226 |
+
|
227 |
+
jQuery(".sq_goto_dashboard").on('click', function () {
|
228 |
+
location.href = "?page=sq_dashboard";
|
229 |
+
});
|
230 |
}
|
231 |
}
|
232 |
|
themes/default/js/sq_blocksettings.js
CHANGED
@@ -30,29 +30,33 @@ function sq_submitSettings() {
|
|
30 |
});
|
31 |
|
32 |
jQuery.post(
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
39 |
// --
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
// --
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
47 |
// --
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
// --
|
52 |
-
|
53 |
-
|
54 |
).done(function () {
|
55 |
-
|
56 |
}, 'json');
|
57 |
|
58 |
}
|
30 |
});
|
31 |
|
32 |
jQuery.post(
|
33 |
+
sqQuery.ajaxurl,
|
34 |
+
{
|
35 |
+
action: 'sq_settings_update',
|
36 |
+
sq_post_types: sq_post_types,
|
37 |
+
sq_keyword_help: jQuery('#sq_settings').find('input[name=sq_keyword_help]:checked').val(),
|
38 |
+
sq_keyword_information: jQuery('#sq_settings').find('input[name=sq_keyword_information]:checked').val(),
|
39 |
+
sq_force_savepost: jQuery('#sq_settings').find('input[name=sq_force_savepost]:checked').val(),
|
40 |
+
|
41 |
+
|
42 |
// --
|
43 |
+
sq_google_country: jQuery('#sq_settings').find('select[name=sq_google_country] option:selected').val(),
|
44 |
+
sq_google_country_strict: jQuery('#sq_settings').find('input[name=sq_google_country_strict]:checked').val(),
|
45 |
+
sq_google_ranksperhour: jQuery('#sq_settings').find('select[name=sq_google_ranksperhour] option:selected').val(),
|
46 |
// --
|
47 |
+
sq_sla: jQuery('#sq_settings').find('input[name=sq_sla]:checked').val(),
|
48 |
+
sq_keywordtag: jQuery('#sq_settings').find('input[name=sq_keywordtag]:checked').val(),
|
49 |
+
sq_local_images: jQuery('#sq_settings').find('input[name=sq_local_images]:checked').val(),
|
50 |
+
sq_url_fix: jQuery('#sq_settings').find('input[name=sq_url_fix]:checked').val(),
|
51 |
// --
|
52 |
+
sq_google_wt: jQuery('#sq_settings').find('input[name=sq_google_wt]').val(),
|
53 |
+
sq_bing_wt: jQuery('#sq_settings').find('input[name=sq_bing_wt]').val(),
|
54 |
+
sq_alexa: jQuery('#sq_settings').find('input[name=sq_alexa]').val(),
|
55 |
// --
|
56 |
+
nonce: sqQuery.nonce
|
57 |
+
}
|
58 |
).done(function () {
|
59 |
+
sq_showSaved(2000);
|
60 |
}, 'json');
|
61 |
|
62 |
}
|
themes/default/js/sq_blocksettingsseo.js
CHANGED
@@ -11,23 +11,23 @@ function sq_blocksettingsseo() {
|
|
11 |
///////////////////////////////
|
12 |
var snippet_timeout;
|
13 |
//switch click
|
14 |
-
jQuery('#sq_settings_form').find('input[name=sq_auto_title],input[name=sq_auto_description]').
|
15 |
sq_getSnippet();
|
16 |
});
|
17 |
|
18 |
//Custom title/description
|
19 |
-
jQuery('#sq_customize').
|
20 |
jQuery('#sq_customize_settings').show();
|
21 |
jQuery('#sq_snippet_disclaimer').show();
|
22 |
jQuery('#sq_title_description_keywords').addClass('sq_custom_title');
|
23 |
});
|
24 |
|
25 |
-
jQuery('.sq_checkissues').
|
26 |
location.href = '?page=sq_seo&action=sq_checkissues&nonce=' + jQuery('#sq_settings_form').find('input[name=nonce]').val();
|
27 |
});
|
28 |
|
29 |
//Listen the title field imput for snippet preview
|
30 |
-
jQuery('#sq_settings').find('input[name=sq_fp_title]').
|
31 |
if (snippet_timeout) {
|
32 |
clearTimeout(snippet_timeout);
|
33 |
}
|
@@ -41,7 +41,7 @@ function sq_blocksettingsseo() {
|
|
41 |
});
|
42 |
|
43 |
//Listen the description field imput for snippet preview
|
44 |
-
jQuery('#sq_settings').find('textarea[name=sq_fp_description]').
|
45 |
if (snippet_timeout) {
|
46 |
clearTimeout(snippet_timeout);
|
47 |
}
|
@@ -54,7 +54,7 @@ function sq_blocksettingsseo() {
|
|
54 |
sq_trackLength(jQuery(this), 'description');
|
55 |
});
|
56 |
|
57 |
-
jQuery('#sq_settings').find('input[name=sq_fp_keywords]').
|
58 |
if (snippet_timeout) {
|
59 |
clearTimeout(snippet_timeout);
|
60 |
}
|
@@ -71,28 +71,29 @@ function sq_blocksettingsseo() {
|
|
71 |
}
|
72 |
|
73 |
//Listen the favicon switch
|
74 |
-
jQuery('#sq_auto_favicon1').
|
75 |
-
jQuery('#sq_favicon').
|
76 |
});
|
77 |
-
jQuery('#sq_auto_favicon0').
|
78 |
-
jQuery('#sq_favicon').
|
79 |
});
|
80 |
|
81 |
//Listen the favicon switch
|
82 |
-
jQuery('#sq_auto_sitemap1').
|
83 |
-
jQuery('#sq_sitemap').
|
84 |
});
|
85 |
-
jQuery('#sq_auto_sitemap0').
|
86 |
-
jQuery('#sq_sitemap').
|
87 |
});
|
88 |
-
jQuery('#sq_auto_jsonld1').
|
89 |
-
jQuery('#sq_jsonld').
|
|
|
90 |
});
|
91 |
-
jQuery('#sq_auto_jsonld0').
|
92 |
-
jQuery('#sq_jsonld').
|
93 |
});
|
94 |
|
95 |
-
jQuery('.sq_social_link').
|
96 |
var previewtop = jQuery('#sq_social_media_accounts').offset().top - 100;
|
97 |
jQuery('html,body').animate({scrollTop: previewtop}, 1000);
|
98 |
});
|
@@ -111,21 +112,21 @@ function sq_blocksettingsseo() {
|
|
111 |
});
|
112 |
|
113 |
//Listen the Squirrly Auto seo switch ON
|
114 |
-
jQuery('#sq_use_on').
|
115 |
jQuery('#sq_settings .sq_seo_switch_condition').show();
|
116 |
-
jQuery('#sq_title_description_keywords').
|
117 |
-
jQuery('#sq_social_media').
|
118 |
|
119 |
if (jQuery('#sq_settings').find('input[name=sq_auto_sitemap]:checked').val() == 1) {
|
120 |
-
jQuery('#sq_sitemap').
|
121 |
}
|
122 |
|
123 |
if (jQuery('#sq_settings').find('input[name=sq_auto_favicon]:checked').val() == 1) {
|
124 |
-
jQuery('#sq_favicon').
|
125 |
}
|
126 |
|
127 |
-
if (jQuery('#sq_settings').find('input[name=
|
128 |
-
jQuery('#sq_jsonld').
|
129 |
}
|
130 |
|
131 |
if (parseInt(jQuery('.sq_count').html()) > 0) {
|
@@ -137,19 +138,19 @@ function sq_blocksettingsseo() {
|
|
137 |
jQuery('.sq_count').hide();
|
138 |
}
|
139 |
}
|
140 |
-
jQuery('#sq_fix_auto').slideUp('
|
141 |
|
142 |
|
143 |
});
|
144 |
//Listen the Squirrly Auto seo switch OFF
|
145 |
-
jQuery('#sq_use_off').
|
146 |
jQuery('#sq_settings .sq_seo_switch_condition').hide();
|
147 |
-
jQuery('#sq_title_description_keywords').slideUp('fast');
|
148 |
|
149 |
-
jQuery('#
|
150 |
-
jQuery('#
|
151 |
-
jQuery('#
|
152 |
-
jQuery('#
|
|
|
153 |
|
154 |
|
155 |
if (parseInt(jQuery('.sq_count').html()) >= 0) {
|
@@ -161,10 +162,44 @@ function sq_blocksettingsseo() {
|
|
161 |
jQuery('#sq_fix_auto').slideDown('show');
|
162 |
});
|
163 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
///////////////////////////////
|
165 |
////////////////////FIX ACTIONS
|
166 |
//FIX Google settings
|
167 |
-
jQuery('#sq_google_index1').
|
168 |
if (parseInt(jQuery('.sq_count').html()) > 0) {
|
169 |
var notif = (parseInt(jQuery('.sq_count').html()) - 1);
|
170 |
if (notif > 0) {
|
@@ -177,7 +212,7 @@ function sq_blocksettingsseo() {
|
|
177 |
jQuery('#sq_fix_private').slideUp('show');
|
178 |
|
179 |
});
|
180 |
-
jQuery('#sq_google_index0').
|
181 |
if (parseInt(jQuery('.sq_count').html()) >= 0) {
|
182 |
var notif = (parseInt(jQuery('.sq_count').html()) + 1);
|
183 |
if (notif > 0) {
|
@@ -188,7 +223,7 @@ function sq_blocksettingsseo() {
|
|
188 |
});
|
189 |
|
190 |
//JsonLD switch types
|
191 |
-
jQuery('.sq_jsonld_type').
|
192 |
jQuery('.sq_jsonld_types').hide();
|
193 |
jQuery('.sq_jsonld_' + jQuery('#sq_settings').find('select[name=sq_jsonld_type] option:selected').val()).show();
|
194 |
|
@@ -196,7 +231,7 @@ function sq_blocksettingsseo() {
|
|
196 |
//////////////////////////////////////////
|
197 |
|
198 |
//Upload image from library
|
199 |
-
jQuery('#sq_json_imageselect').
|
200 |
var frame;
|
201 |
|
202 |
event.preventDefault();
|
@@ -232,23 +267,23 @@ function sq_blocksettingsseo() {
|
|
232 |
frame.open();
|
233 |
});
|
234 |
|
235 |
-
jQuery('#sq_auto_facebook1').
|
236 |
jQuery('p.sq_select_ogimage').slideDown();
|
237 |
jQuery('div.sq_select_ogimage_preview').slideDown();
|
238 |
|
239 |
});
|
240 |
-
jQuery('#sq_auto_facebook0').
|
241 |
jQuery('p.sq_select_ogimage').slideUp();
|
242 |
jQuery('div.sq_select_ogimage_preview').slideUp();
|
243 |
});
|
244 |
|
245 |
-
jQuery('div.sq_fp_ogimage_close').
|
246 |
jQuery('input[name=sq_fp_ogimage]').val('');
|
247 |
jQuery('div.sq_fp_ogimage').html('');
|
248 |
jQuery('div.sq_fp_ogimage_close').hide();
|
249 |
});
|
250 |
//Upload image from library
|
251 |
-
jQuery('#sq_fp_imageselect').
|
252 |
var frame;
|
253 |
|
254 |
event.preventDefault();
|
@@ -363,7 +398,7 @@ function sq_submitSettings() {
|
|
363 |
nonce: sqQuery.nonce
|
364 |
}
|
365 |
).done(function () {
|
366 |
-
|
367 |
}, 'json');
|
368 |
|
369 |
}
|
11 |
///////////////////////////////
|
12 |
var snippet_timeout;
|
13 |
//switch click
|
14 |
+
jQuery('#sq_settings_form').find('input[name=sq_auto_title],input[name=sq_auto_description]').on('click', function () {
|
15 |
sq_getSnippet();
|
16 |
});
|
17 |
|
18 |
//Custom title/description
|
19 |
+
jQuery('#sq_customize').on('click', function () {
|
20 |
jQuery('#sq_customize_settings').show();
|
21 |
jQuery('#sq_snippet_disclaimer').show();
|
22 |
jQuery('#sq_title_description_keywords').addClass('sq_custom_title');
|
23 |
});
|
24 |
|
25 |
+
jQuery('.sq_checkissues').on('click', function () {
|
26 |
location.href = '?page=sq_seo&action=sq_checkissues&nonce=' + jQuery('#sq_settings_form').find('input[name=nonce]').val();
|
27 |
});
|
28 |
|
29 |
//Listen the title field imput for snippet preview
|
30 |
+
jQuery('#sq_settings').find('input[name=sq_fp_title]').on('keyup', function () {
|
31 |
if (snippet_timeout) {
|
32 |
clearTimeout(snippet_timeout);
|
33 |
}
|
41 |
});
|
42 |
|
43 |
//Listen the description field imput for snippet preview
|
44 |
+
jQuery('#sq_settings').find('textarea[name=sq_fp_description]').on('keyup', function () {
|
45 |
if (snippet_timeout) {
|
46 |
clearTimeout(snippet_timeout);
|
47 |
}
|
54 |
sq_trackLength(jQuery(this), 'description');
|
55 |
});
|
56 |
|
57 |
+
jQuery('#sq_settings').find('input[name=sq_fp_keywords]').on('keyup', function () {
|
58 |
if (snippet_timeout) {
|
59 |
clearTimeout(snippet_timeout);
|
60 |
}
|
71 |
}
|
72 |
|
73 |
//Listen the favicon switch
|
74 |
+
jQuery('#sq_auto_favicon1').on('click', function () {
|
75 |
+
jQuery('#sq_favicon').removeClass('deactivated');
|
76 |
});
|
77 |
+
jQuery('#sq_auto_favicon0').on('click', function () {
|
78 |
+
jQuery('#sq_favicon').addClass('deactivated');
|
79 |
});
|
80 |
|
81 |
//Listen the favicon switch
|
82 |
+
jQuery('#sq_auto_sitemap1').on('click', function () {
|
83 |
+
jQuery('#sq_sitemap').removeClass('deactivated');
|
84 |
});
|
85 |
+
jQuery('#sq_auto_sitemap0').on('click', function () {
|
86 |
+
jQuery('#sq_sitemap').addClass('deactivated');
|
87 |
});
|
88 |
+
jQuery('#sq_auto_jsonld1').on('click', function () {
|
89 |
+
jQuery('#sq_jsonld').removeClass('deactivated');
|
90 |
+
|
91 |
});
|
92 |
+
jQuery('#sq_auto_jsonld0').on('click', function () {
|
93 |
+
jQuery('#sq_jsonld').addClass('deactivated');
|
94 |
});
|
95 |
|
96 |
+
jQuery('.sq_social_link').on('click', function () {
|
97 |
var previewtop = jQuery('#sq_social_media_accounts').offset().top - 100;
|
98 |
jQuery('html,body').animate({scrollTop: previewtop}, 1000);
|
99 |
});
|
112 |
});
|
113 |
|
114 |
//Listen the Squirrly Auto seo switch ON
|
115 |
+
jQuery('#sq_use_on').on('click', function () {
|
116 |
jQuery('#sq_settings .sq_seo_switch_condition').show();
|
117 |
+
jQuery('#sq_title_description_keywords').removeClass('deactivated');
|
118 |
+
jQuery('#sq_social_media').removeClass('deactivated');
|
119 |
|
120 |
if (jQuery('#sq_settings').find('input[name=sq_auto_sitemap]:checked').val() == 1) {
|
121 |
+
jQuery('#sq_sitemap').removeClass('deactivated');
|
122 |
}
|
123 |
|
124 |
if (jQuery('#sq_settings').find('input[name=sq_auto_favicon]:checked').val() == 1) {
|
125 |
+
jQuery('#sq_favicon').removeClass('deactivated');
|
126 |
}
|
127 |
|
128 |
+
if (jQuery('#sq_settings').find('input[name=sq_auto_jsonld]:checked').val() == 1) {
|
129 |
+
jQuery('#sq_jsonld').removeClass('deactivated');
|
130 |
}
|
131 |
|
132 |
if (parseInt(jQuery('.sq_count').html()) > 0) {
|
138 |
jQuery('.sq_count').hide();
|
139 |
}
|
140 |
}
|
141 |
+
jQuery('#sq_fix_auto').slideUp('fast');
|
142 |
|
143 |
|
144 |
});
|
145 |
//Listen the Squirrly Auto seo switch OFF
|
146 |
+
jQuery('#sq_use_off').on('click', function () {
|
147 |
jQuery('#sq_settings .sq_seo_switch_condition').hide();
|
|
|
148 |
|
149 |
+
jQuery('#sq_title_description_keywords').addClass('deactivated');
|
150 |
+
jQuery('#sq_social_media').addClass('deactivated');
|
151 |
+
jQuery('#sq_favicon').addClass('deactivated');
|
152 |
+
jQuery('#sq_sitemap').addClass('deactivated');
|
153 |
+
jQuery('#sq_jsonld').addClass('deactivated');
|
154 |
|
155 |
|
156 |
if (parseInt(jQuery('.sq_count').html()) >= 0) {
|
162 |
jQuery('#sq_fix_auto').slideDown('show');
|
163 |
});
|
164 |
|
165 |
+
jQuery('#sq_title_description_keywords').on('click', function () {
|
166 |
+
if (jQuery('#sq_title_description_keywords').hasClass('deactivated')) {
|
167 |
+
jQuery('#sq_use_on').trigger('click');
|
168 |
+
jQuery(this).removeClass('deactivated');
|
169 |
+
}
|
170 |
+
});
|
171 |
+
jQuery('#sq_social_media.deactivated').on('click', function () {
|
172 |
+
if (jQuery('#sq_social_media').hasClass('deactivated')) {
|
173 |
+
jQuery('#sq_use_on').trigger('click');
|
174 |
+
jQuery(this).removeClass('deactivated');
|
175 |
+
}
|
176 |
+
});
|
177 |
+
jQuery('#sq_favicon.deactivated').on('click', function () {
|
178 |
+
if (jQuery('#sq_favicon').hasClass('deactivated')) {
|
179 |
+
jQuery('#sq_use_on').trigger('click');
|
180 |
+
jQuery('#sq_auto_favicon1').trigger('click');
|
181 |
+
jQuery(this).removeClass('deactivated');
|
182 |
+
}
|
183 |
+
});
|
184 |
+
jQuery('#sq_sitemap.deactivated').on('click', function () {
|
185 |
+
if (jQuery('#sq_sitemap').hasClass('deactivated')) {
|
186 |
+
jQuery('#sq_use_on').trigger('click');
|
187 |
+
jQuery('#sq_auto_sitemap1').trigger('click');
|
188 |
+
jQuery(this).removeClass('deactivated');
|
189 |
+
}
|
190 |
+
});
|
191 |
+
jQuery('#sq_jsonld.deactivated').on('click', function () {
|
192 |
+
if (jQuery('#sq_jsonld').hasClass('deactivated')) {
|
193 |
+
jQuery('#sq_use_on').trigger('click');
|
194 |
+
jQuery('#sq_auto_jsonld1').trigger('click');
|
195 |
+
jQuery(this).removeClass('deactivated');
|
196 |
+
}
|
197 |
+
});
|
198 |
+
|
199 |
///////////////////////////////
|
200 |
////////////////////FIX ACTIONS
|
201 |
//FIX Google settings
|
202 |
+
jQuery('#sq_google_index1').on('click', function () {
|
203 |
if (parseInt(jQuery('.sq_count').html()) > 0) {
|
204 |
var notif = (parseInt(jQuery('.sq_count').html()) - 1);
|
205 |
if (notif > 0) {
|
212 |
jQuery('#sq_fix_private').slideUp('show');
|
213 |
|
214 |
});
|
215 |
+
jQuery('#sq_google_index0').on('click', function () {
|
216 |
if (parseInt(jQuery('.sq_count').html()) >= 0) {
|
217 |
var notif = (parseInt(jQuery('.sq_count').html()) + 1);
|
218 |
if (notif > 0) {
|
223 |
});
|
224 |
|
225 |
//JsonLD switch types
|
226 |
+
jQuery('.sq_jsonld_type').on('change', function () {
|
227 |
jQuery('.sq_jsonld_types').hide();
|
228 |
jQuery('.sq_jsonld_' + jQuery('#sq_settings').find('select[name=sq_jsonld_type] option:selected').val()).show();
|
229 |
|
231 |
//////////////////////////////////////////
|
232 |
|
233 |
//Upload image from library
|
234 |
+
jQuery('#sq_json_imageselect').on('click', function (event) {
|
235 |
var frame;
|
236 |
|
237 |
event.preventDefault();
|
267 |
frame.open();
|
268 |
});
|
269 |
|
270 |
+
jQuery('#sq_auto_facebook1').on('click', function () {
|
271 |
jQuery('p.sq_select_ogimage').slideDown();
|
272 |
jQuery('div.sq_select_ogimage_preview').slideDown();
|
273 |
|
274 |
});
|
275 |
+
jQuery('#sq_auto_facebook0').on('click', function () {
|
276 |
jQuery('p.sq_select_ogimage').slideUp();
|
277 |
jQuery('div.sq_select_ogimage_preview').slideUp();
|
278 |
});
|
279 |
|
280 |
+
jQuery('div.sq_fp_ogimage_close').on('click', function (event) {
|
281 |
jQuery('input[name=sq_fp_ogimage]').val('');
|
282 |
jQuery('div.sq_fp_ogimage').html('');
|
283 |
jQuery('div.sq_fp_ogimage_close').hide();
|
284 |
});
|
285 |
//Upload image from library
|
286 |
+
jQuery('#sq_fp_imageselect').on('click', function (event) {
|
287 |
var frame;
|
288 |
|
289 |
event.preventDefault();
|
398 |
nonce: sqQuery.nonce
|
399 |
}
|
400 |
).done(function () {
|
401 |
+
sq_showSaved(2000);
|
402 |
}, 'json');
|
403 |
|
404 |
}
|
themes/default/js/sq_blocksupport.js
CHANGED
@@ -10,35 +10,35 @@ function sq_blocksupport() {
|
|
10 |
if (typeof sq_facebook_b === 'undefined')
|
11 |
var sq_facebook_b = '<iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2FSquirrly.co&send=false&layout=button_count&width=90&show_faces=false&font=arial&colorscheme=light&action=like&height=21&appId=384403641631593" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe>';
|
12 |
|
13 |
-
jQuery('#sq_options_support').find('span').
|
14 |
jQuery('.sq_options_support_popup').show();
|
15 |
jQuery('.sq_options_feedback_popup').hide();
|
16 |
});
|
17 |
-
jQuery('#sq_options_close').
|
18 |
jQuery('.sq_options_support_popup').hide();
|
19 |
});
|
20 |
|
21 |
|
22 |
-
jQuery('#sq_options_feedback').find('span').
|
23 |
jQuery('.sq_options_feedback_popup').show();
|
24 |
jQuery("#sq_options_feedback").find('.sq_push').hide();
|
25 |
jQuery('.sq_options_support_popup').hide();
|
26 |
});
|
27 |
-
jQuery("#sq_options_feedback_close").
|
28 |
jQuery('.sq_options_feedback_popup').hide();
|
29 |
});
|
30 |
|
31 |
-
jQuery("#sq_feedback_0").
|
32 |
jQuery('#sq_feedback_msg').show();
|
33 |
// for(i=0;i<5;i++) jQuery('#sq_options_feedback').find('.sq_icon').removeClass('sq_label_feedback_' + i);
|
34 |
// jQuery('#sq_options_feedback').find('.sq_icon').addClass('sq_label_feedback_0');
|
35 |
});
|
36 |
-
jQuery("#sq_feedback_1").
|
37 |
jQuery('#sq_feedback_msg').show();
|
38 |
// for(i=0;i<5;i++) jQuery('#sq_options_feedback').find('.sq_icon').removeClass('sq_label_feedback_' + i);
|
39 |
// jQuery('#sq_options_feedback').find('.sq_icon').addClass('sq_label_feedback_1');
|
40 |
});
|
41 |
-
jQuery("#sq_feedback_2").
|
42 |
jQuery("#sq_feedback_submit").trigger('click');
|
43 |
for (i = 0; i < 5; i++)
|
44 |
jQuery('#sq_options_feedback').find('.sq_icon').removeClass('sq_label_feedback_' + i);
|
@@ -48,7 +48,7 @@ function sq_blocksupport() {
|
|
48 |
jQuery("#sq_options_feedback_error").after('<div id="sq_facebook_b"><span class="sq_facebook_title">We\'re also on facebook</span><span class="sq_facebook_image"><a href="http://www.facebook.com/Squirrly.co" target="_blank"><img src="http://static.api.squirrly.co/default/img/social/squirrly_facebook.png"></a></span> <span class="sq_facebook_frame">' + sq_facebook_b + '</span></div>');
|
49 |
|
50 |
});
|
51 |
-
jQuery("#sq_feedback_3").
|
52 |
jQuery("#sq_feedback_submit").trigger('click');
|
53 |
for (i = 0; i < 5; i++)
|
54 |
jQuery('#sq_options_feedback').find('.sq_icon').removeClass('sq_label_feedback_' + i);
|
@@ -58,7 +58,7 @@ function sq_blocksupport() {
|
|
58 |
jQuery("#sq_options_feedback_error").after('<div id="sq_facebook_b"><span class="sq_facebook_title">We\'re also on facebook</span><span class="sq_facebook_image"><a href="http://www.facebook.com/Squirrly.co" target="_blank"><img src="http://static.api.squirrly.co/default/img/social/squirrly_facebook.png"></a></span> <span class="sq_facebook_frame">' + sq_facebook_b + '</span></div>');
|
59 |
|
60 |
});
|
61 |
-
jQuery("#sq_feedback_4").
|
62 |
jQuery("#sq_feedback_submit").trigger('click');
|
63 |
for (i = 0; i < 5; i++)
|
64 |
jQuery('#sq_options_feedback').find('.sq_icon').removeClass('sq_label_feedback_' + i);
|
@@ -69,7 +69,7 @@ function sq_blocksupport() {
|
|
69 |
|
70 |
});
|
71 |
|
72 |
-
jQuery("#sq_feedback_submit").
|
73 |
jQuery('#sq_feedback_msg').hide();
|
74 |
jQuery('#sq_options_feedback_error').html('<p class="sq_minloading" style="margin:0 auto; padding:2px;"></p>');
|
75 |
jQuery('#sq_feedback_submit').attr("disabled", "disabled");
|
@@ -122,7 +122,7 @@ function sq_blocksupport() {
|
|
122 |
}, 'json');
|
123 |
});
|
124 |
|
125 |
-
jQuery("#sq_support_submit").
|
126 |
jQuery('#sq_options_support_error').html('<p class="sq_minloading" style="margin:0 auto; padding:2px;"></p>');
|
127 |
jQuery('#sq_support_submit').attr("disabled", "disabled");
|
128 |
|
@@ -170,7 +170,7 @@ function sq_blocksupport() {
|
|
170 |
|
171 |
|
172 |
/////////////////For Survey
|
173 |
-
jQuery("#sq_survey_submit").
|
174 |
jQuery('#sq_survey_error').html('<p class="sq_minloading" style="margin:0 auto; padding:2px;"></p>');
|
175 |
jQuery('#sq_survey_submit').attr("disabled", "disabled");
|
176 |
|
@@ -226,7 +226,7 @@ function sq_blocksupport() {
|
|
226 |
}, 'json');
|
227 |
});
|
228 |
|
229 |
-
jQuery("#sq_survey_close").
|
230 |
jQuery.post(
|
231 |
sqQuery.ajaxurl,
|
232 |
{
|
10 |
if (typeof sq_facebook_b === 'undefined')
|
11 |
var sq_facebook_b = '<iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2FSquirrly.co&send=false&layout=button_count&width=90&show_faces=false&font=arial&colorscheme=light&action=like&height=21&appId=384403641631593" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe>';
|
12 |
|
13 |
+
jQuery('#sq_options_support').find('span').on('click', function () {
|
14 |
jQuery('.sq_options_support_popup').show();
|
15 |
jQuery('.sq_options_feedback_popup').hide();
|
16 |
});
|
17 |
+
jQuery('#sq_options_close').on('click', function () {
|
18 |
jQuery('.sq_options_support_popup').hide();
|
19 |
});
|
20 |
|
21 |
|
22 |
+
jQuery('#sq_options_feedback').find('span').on('click', function () {
|
23 |
jQuery('.sq_options_feedback_popup').show();
|
24 |
jQuery("#sq_options_feedback").find('.sq_push').hide();
|
25 |
jQuery('.sq_options_support_popup').hide();
|
26 |
});
|
27 |
+
jQuery("#sq_options_feedback_close").on('click', function () {
|
28 |
jQuery('.sq_options_feedback_popup').hide();
|
29 |
});
|
30 |
|
31 |
+
jQuery("#sq_feedback_0").on('click', function () {
|
32 |
jQuery('#sq_feedback_msg').show();
|
33 |
// for(i=0;i<5;i++) jQuery('#sq_options_feedback').find('.sq_icon').removeClass('sq_label_feedback_' + i);
|
34 |
// jQuery('#sq_options_feedback').find('.sq_icon').addClass('sq_label_feedback_0');
|
35 |
});
|
36 |
+
jQuery("#sq_feedback_1").on('click', function () {
|
37 |
jQuery('#sq_feedback_msg').show();
|
38 |
// for(i=0;i<5;i++) jQuery('#sq_options_feedback').find('.sq_icon').removeClass('sq_label_feedback_' + i);
|
39 |
// jQuery('#sq_options_feedback').find('.sq_icon').addClass('sq_label_feedback_1');
|
40 |
});
|
41 |
+
jQuery("#sq_feedback_2").on('click', function () {
|
42 |
jQuery("#sq_feedback_submit").trigger('click');
|
43 |
for (i = 0; i < 5; i++)
|
44 |
jQuery('#sq_options_feedback').find('.sq_icon').removeClass('sq_label_feedback_' + i);
|
48 |
jQuery("#sq_options_feedback_error").after('<div id="sq_facebook_b"><span class="sq_facebook_title">We\'re also on facebook</span><span class="sq_facebook_image"><a href="http://www.facebook.com/Squirrly.co" target="_blank"><img src="http://static.api.squirrly.co/default/img/social/squirrly_facebook.png"></a></span> <span class="sq_facebook_frame">' + sq_facebook_b + '</span></div>');
|
49 |
|
50 |
});
|
51 |
+
jQuery("#sq_feedback_3").on('click', function () {
|
52 |
jQuery("#sq_feedback_submit").trigger('click');
|
53 |
for (i = 0; i < 5; i++)
|
54 |
jQuery('#sq_options_feedback').find('.sq_icon').removeClass('sq_label_feedback_' + i);
|
58 |
jQuery("#sq_options_feedback_error").after('<div id="sq_facebook_b"><span class="sq_facebook_title">We\'re also on facebook</span><span class="sq_facebook_image"><a href="http://www.facebook.com/Squirrly.co" target="_blank"><img src="http://static.api.squirrly.co/default/img/social/squirrly_facebook.png"></a></span> <span class="sq_facebook_frame">' + sq_facebook_b + '</span></div>');
|
59 |
|
60 |
});
|
61 |
+
jQuery("#sq_feedback_4").on('click', function () {
|
62 |
jQuery("#sq_feedback_submit").trigger('click');
|
63 |
for (i = 0; i < 5; i++)
|
64 |
jQuery('#sq_options_feedback').find('.sq_icon').removeClass('sq_label_feedback_' + i);
|
69 |
|
70 |
});
|
71 |
|
72 |
+
jQuery("#sq_feedback_submit").on('click', function () {
|
73 |
jQuery('#sq_feedback_msg').hide();
|
74 |
jQuery('#sq_options_feedback_error').html('<p class="sq_minloading" style="margin:0 auto; padding:2px;"></p>');
|
75 |
jQuery('#sq_feedback_submit').attr("disabled", "disabled");
|
122 |
}, 'json');
|
123 |
});
|
124 |
|
125 |
+
jQuery("#sq_support_submit").on('click', function () {
|
126 |
jQuery('#sq_options_support_error').html('<p class="sq_minloading" style="margin:0 auto; padding:2px;"></p>');
|
127 |
jQuery('#sq_support_submit').attr("disabled", "disabled");
|
128 |
|
170 |
|
171 |
|
172 |
/////////////////For Survey
|
173 |
+
jQuery("#sq_survey_submit").on('click', function () {
|
174 |
jQuery('#sq_survey_error').html('<p class="sq_minloading" style="margin:0 auto; padding:2px;"></p>');
|
175 |
jQuery('#sq_survey_submit').attr("disabled", "disabled");
|
176 |
|
226 |
}, 'json');
|
227 |
});
|
228 |
|
229 |
+
jQuery("#sq_survey_close").on('click', function () {
|
230 |
jQuery.post(
|
231 |
sqQuery.ajaxurl,
|
232 |
{
|
themes/default/js/sq_menu.js
CHANGED
@@ -7,73 +7,42 @@ if (jQuery('#sq_settings').length > 0) {
|
|
7 |
}
|
8 |
|
9 |
|
10 |
-
function ctl_setThemeColors(background, button, text) {
|
11 |
-
jQuery('#sq_settings fieldset').css('background-color', background);
|
12 |
-
jQuery('#sq_settings input[type="submit"]').css('background-color', button);
|
13 |
-
jQuery('#sq_settings input[type="submit"]').css('color', text);
|
14 |
-
jQuery('#sq_settings legend > span').css('color', text);
|
15 |
-
jQuery('#sq_settings legend label').css('color', text);
|
16 |
-
jQuery('#sq_settings_body fieldset legend > span a').css('color', text);
|
17 |
-
|
18 |
-
}
|
19 |
-
|
20 |
function sq_blockmenu() {
|
21 |
///////////////////////////////
|
22 |
|
23 |
//Go to dashboard listener
|
24 |
-
jQuery("
|
25 |
location.href = "?page=sq_dashboard";
|
26 |
});
|
27 |
|
28 |
-
jQuery('input[name=sq_update]').
|
29 |
jQuery('#sq_settings_form').submit();
|
30 |
});
|
31 |
|
32 |
-
jQuery('input[name=sq_restore]').
|
33 |
jQuery('.sq_settings_restore').show();
|
34 |
});
|
35 |
|
36 |
-
jQuery('.sq_settings_restore').find('.sq_close').
|
37 |
jQuery('.sq_settings_restore').find('textarea').val('');
|
38 |
jQuery('.sq_settings_restore').hide();
|
39 |
});
|
40 |
|
41 |
-
//Go to settings listener
|
42 |
-
jQuery("#sq_goto_seo").bind('click', function () {
|
43 |
-
location.href = "?page=sq_seo";
|
44 |
-
});
|
45 |
-
|
46 |
-
//Go to settings listener
|
47 |
-
jQuery("#sq_goto_settings").bind('click', function () {
|
48 |
-
location.href = "?page=sq_settings";
|
49 |
-
});
|
50 |
-
|
51 |
-
//Set the squirrly seo style according to wp colors
|
52 |
-
var colorwait = setInterval(function () {
|
53 |
-
if (jQuery('#adminmenuback').is(':visible')) {
|
54 |
-
clearInterval(colorwait);
|
55 |
-
|
56 |
-
ctl_setThemeColors(jQuery('#adminmenuback').css('background-color')
|
57 |
-
, jQuery('#adminmenu li.current a.menu-top').css('background-color')
|
58 |
-
, jQuery('#adminmenu a').css('color'));
|
59 |
-
}
|
60 |
-
|
61 |
-
}, 100);
|
62 |
|
63 |
//switch click
|
64 |
-
jQuery('#sq_settings_form').find('input[type=radio]').
|
65 |
sq_submitSettings();
|
66 |
});
|
67 |
|
68 |
//Custom title/description
|
69 |
-
jQuery('#sq_customize').
|
70 |
jQuery('#sq_customize_settings').show();
|
71 |
jQuery('#sq_snippet_disclaimer').show();
|
72 |
jQuery('#sq_title_description_keywords').addClass('sq_custom_title');
|
73 |
});
|
74 |
|
75 |
//Login
|
76 |
-
jQuery('.sq_login_link').
|
77 |
var previewtop = jQuery('#sq_settings_login').offset().top - 100;
|
78 |
jQuery('html,body').animate({scrollTop: previewtop}, 1000);
|
79 |
});
|
@@ -338,7 +307,7 @@ function checkResponse(response) {
|
|
338 |
}
|
339 |
}
|
340 |
|
341 |
-
function
|
342 |
jQuery("#sq_settings").prepend('<div class="sq_savenotice sq_absolute" ><span class="sq_success">Saved!</span></div>');
|
343 |
|
344 |
if (typeof sq_help_reload == 'function') {
|
7 |
}
|
8 |
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
function sq_blockmenu() {
|
11 |
///////////////////////////////
|
12 |
|
13 |
//Go to dashboard listener
|
14 |
+
jQuery(".sq_goto_dashboard").on('click', function () {
|
15 |
location.href = "?page=sq_dashboard";
|
16 |
});
|
17 |
|
18 |
+
jQuery('input[name=sq_update]').on('click', function () {
|
19 |
jQuery('#sq_settings_form').submit();
|
20 |
});
|
21 |
|
22 |
+
jQuery('input[name=sq_restore]').on('click', function () {
|
23 |
jQuery('.sq_settings_restore').show();
|
24 |
});
|
25 |
|
26 |
+
jQuery('.sq_settings_restore').find('.sq_close').on('click', function () {
|
27 |
jQuery('.sq_settings_restore').find('textarea').val('');
|
28 |
jQuery('.sq_settings_restore').hide();
|
29 |
});
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
//switch click
|
33 |
+
jQuery('#sq_settings_form').find('input[type=radio]').on('change', function () {
|
34 |
sq_submitSettings();
|
35 |
});
|
36 |
|
37 |
//Custom title/description
|
38 |
+
jQuery('#sq_customize').on('click', function () {
|
39 |
jQuery('#sq_customize_settings').show();
|
40 |
jQuery('#sq_snippet_disclaimer').show();
|
41 |
jQuery('#sq_title_description_keywords').addClass('sq_custom_title');
|
42 |
});
|
43 |
|
44 |
//Login
|
45 |
+
jQuery('.sq_login_link').on('click', function () {
|
46 |
var previewtop = jQuery('#sq_settings_login').offset().top - 100;
|
47 |
jQuery('html,body').animate({scrollTop: previewtop}, 1000);
|
48 |
});
|
307 |
}
|
308 |
}
|
309 |
|
310 |
+
function sq_showSaved(time) {
|
311 |
jQuery("#sq_settings").prepend('<div class="sq_savenotice sq_absolute" ><span class="sq_success">Saved!</span></div>');
|
312 |
|
313 |
if (typeof sq_help_reload == 'function') {
|