Version Description
Save your social media posts as drafts
Download this release
Release Info
Developer | Blog2Social |
Plugin | Blog2Social: Social Media Auto Post & Scheduler |
Version | 5.7.0 |
Comparing to | |
See all releases |
Code changes from version 5.6.1 to 5.7.0
- assets/css/b2s/network.css +57 -2
- assets/css/b2s/post.draft.css +3 -0
- assets/css/b2s/ship.css +31 -19
- assets/css/general.css +8 -0
- assets/images/settings/b2s-post-format-19-1-de.png +0 -0
- assets/images/settings/b2s-post-format-19-1-en.png +0 -0
- assets/images/settings/b2s-post-format-19-2-de.png +0 -0
- assets/images/settings/b2s-post-format-19-2-en.png +0 -0
- assets/images/settings/like-icons-19.png +0 -0
- assets/js/b2s/calendar.js +693 -653
- assets/js/b2s/curation.draft.js +51 -0
- assets/js/b2s/general.js +3 -0
- assets/js/b2s/network.js +2 -0
- assets/js/b2s/post.js +958 -888
- assets/js/b2s/ship.js +3476 -3143
- blog2social.php +3 -3
- includes/Ajax/Get.php +578 -543
- includes/Ajax/Post.php +73 -17
- includes/B2S/AutoPost.php +277 -279
- includes/B2S/Calendar/Item.php +1 -1
- includes/B2S/Curation/View.php +1 -1
- includes/B2S/Network/Item.php +53 -2
- includes/B2S/Post/Filter.php +2 -2
- includes/B2S/Post/Item.php +60 -9
- includes/B2S/PostBox.php +1 -1
- includes/B2S/Settings/Item.php +2 -2
- includes/B2S/Ship/Item.php +71 -53
- includes/B2S/Ship/Navbar.php +22 -11
- includes/Loader.php +1549 -1511
- includes/System.php +40 -0
- includes/Tools.php +4 -0
- languages/blog2social-de_DE.mo +0 -0
- languages/blog2social-de_DE.po +226 -203
assets/css/b2s/network.css
CHANGED
@@ -169,8 +169,8 @@ ul.b2s-network-item-auth-list li:last-child{
|
|
169 |
font: 18px/1 Arial,sans-serif;
|
170 |
font-weight: 700;
|
171 |
line-height: 30px;
|
172 |
-
padding: 0 2px
|
173 |
-
|
174 |
text-align: center;
|
175 |
border: 0 !important;
|
176 |
width: 2% !important;
|
@@ -548,4 +548,59 @@ ul.b2s-network-item-auth-list li:last-child{
|
|
548 |
}
|
549 |
.b2s-info-character-limit-text{
|
550 |
margin: 0 0 10px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
551 |
}
|
169 |
font: 18px/1 Arial,sans-serif;
|
170 |
font-weight: 700;
|
171 |
line-height: 30px;
|
172 |
+
padding: 0 2px !important;
|
173 |
+
min-width: 28px;
|
174 |
text-align: center;
|
175 |
border: 0 !important;
|
176 |
width: 2% !important;
|
548 |
}
|
549 |
.b2s-info-character-limit-text{
|
550 |
margin: 0 0 10px;
|
551 |
+
}
|
552 |
+
|
553 |
+
.b2s-edit-template-preview-border-19 {
|
554 |
+
padding-top: 15px;
|
555 |
+
padding-bottom: 15px;
|
556 |
+
border-radius: 3px;
|
557 |
+
}
|
558 |
+
|
559 |
+
.b2s-edit-template-preview-profile-img-19 {
|
560 |
+
height: 40px;
|
561 |
+
}
|
562 |
+
|
563 |
+
.b2s-edit-template-preview-profile-name-19 {
|
564 |
+
color: #009090;
|
565 |
+
font-size: 13px;
|
566 |
+
font-weight: 600;
|
567 |
+
line-height: 18px;
|
568 |
+
}
|
569 |
+
|
570 |
+
.b2s-edit-template-preview-header-19 {
|
571 |
+
padding-top: 15px;
|
572 |
+
padding-bottom: 15px;
|
573 |
+
border-bottom: 1px solid lightgray;
|
574 |
+
margin-bottom: 15px;
|
575 |
+
}
|
576 |
+
|
577 |
+
.b2s-edit-template-preview-like-icons-19 {
|
578 |
+
margin-top: 15px;
|
579 |
+
width: 120px;
|
580 |
+
}
|
581 |
+
|
582 |
+
.b2s-edit-template-preview-link-meta-box-title-19 {
|
583 |
+
color: #009090;
|
584 |
+
font-size: 18px;
|
585 |
+
font-weight: 400;
|
586 |
+
line-height: 22px;
|
587 |
+
}
|
588 |
+
|
589 |
+
.b2s-edit-template-preview-link-meta-box-desc-19 {
|
590 |
+
font-size: 13px;
|
591 |
+
line-height: 18px;
|
592 |
+
}
|
593 |
+
|
594 |
+
.b2s-edit-template-preview-link-meta-box-domain-19 {
|
595 |
+
font-size: 13px;
|
596 |
+
line-height: 18px;
|
597 |
+
color: gray;
|
598 |
+
}
|
599 |
+
|
600 |
+
.b2s-edit-template-image-preview .b2s-edit-template-preview-image-border-19 {
|
601 |
+
padding: 0px;
|
602 |
+
}
|
603 |
+
|
604 |
+
.b2s-edit-template-preview-content-19 {
|
605 |
+
margin: 15px 0px;
|
606 |
}
|
assets/css/b2s/post.draft.css
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
.deleteDraftBtn {
|
2 |
+
margin-right: 10px;
|
3 |
+
}
|
assets/css/b2s/ship.css
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
/** Navbar */
|
2 |
#b2s-wrapper {
|
3 |
padding-right: 0;
|
4 |
-webkit-transition: all 0.5s ease;
|
@@ -24,10 +24,10 @@
|
|
24 |
width: 100% !important;
|
25 |
}
|
26 |
.b2s-network-thumb{
|
27 |
-
width:20% !important;
|
28 |
}
|
29 |
.b2s-network-details{
|
30 |
-
width: 60% !important;
|
31 |
}
|
32 |
.b2s-network-status{
|
33 |
width: 15% !important;
|
@@ -50,7 +50,7 @@
|
|
50 |
}
|
51 |
|
52 |
.b2s-network-details-legend{
|
53 |
-
color:#FFFFFF;
|
54 |
text-align: center;
|
55 |
opacity: 0.6;
|
56 |
}
|
@@ -246,7 +246,7 @@
|
|
246 |
color: #fff;
|
247 |
font-weight: 400;
|
248 |
text-transform: uppercase;
|
249 |
-
margin-top:3px;
|
250 |
margin-bottom: 5px;
|
251 |
}
|
252 |
|
@@ -277,7 +277,7 @@
|
|
277 |
float: left;
|
278 |
}
|
279 |
.b2s-post-item-thumb{
|
280 |
-
width: 5%;
|
281 |
margin-right: 8px;
|
282 |
}
|
283 |
|
@@ -312,7 +312,7 @@
|
|
312 |
}
|
313 |
.b2s-post-item-details p{
|
314 |
font-size: 12px;
|
315 |
-
margin: 0px 3px;
|
316 |
|
317 |
}
|
318 |
|
@@ -331,7 +331,7 @@
|
|
331 |
|
332 |
.b2s-post-item-details-item-message-input-allow-html{
|
333 |
min-height: 200px;
|
334 |
-
}
|
335 |
.b2s-post-item-message-info{
|
336 |
margin-left:15px !important;
|
337 |
font-weight: 600;
|
@@ -357,7 +357,7 @@
|
|
357 |
|
358 |
.b2s-no-image-area{
|
359 |
margin-left: 15px;
|
360 |
-
}
|
361 |
.b2s-no-image-area-text{
|
362 |
font-size: 12px;
|
363 |
margin-left: 2px;
|
@@ -392,7 +392,7 @@
|
|
392 |
}
|
393 |
.b2s-post-item-details-release-area{
|
394 |
float: left;
|
395 |
-
width: 100%;
|
396 |
}
|
397 |
|
398 |
.b2s-post-item-details-release-area-details, .b2s-post-item-relay-area-details{
|
@@ -400,7 +400,7 @@
|
|
400 |
width: 100%;
|
401 |
}
|
402 |
.b2s-post-item-details-release-input-daySelect input{
|
403 |
-
margin-right: 15px;
|
404 |
}
|
405 |
|
406 |
.b2s-post-item-details-tag-input{
|
@@ -513,7 +513,7 @@ input[type="checkbox"], input[type="radio"] {
|
|
513 |
margin:0px 4px 0px 4px;
|
514 |
}
|
515 |
.ad-tag-btn:hover,.remove-tag-btn:hover{
|
516 |
-
color:#000;
|
517 |
}
|
518 |
|
519 |
.b2s-post-details{
|
@@ -663,7 +663,7 @@ input[type="checkbox"], input[type="radio"] {
|
|
663 |
}
|
664 |
|
665 |
.xing-url-title{
|
666 |
-
margin-top: 0px;
|
667 |
margin-bottom: 4px;
|
668 |
font-size: 18px;
|
669 |
font-weight: normal;
|
@@ -759,17 +759,17 @@ input[type="checkbox"], input[type="radio"] {
|
|
759 |
margin-right: 5px !important;
|
760 |
}
|
761 |
.b2s-img-required{
|
762 |
-
border-color: #d9534f !important;
|
763 |
}
|
764 |
.b2s-post-item-details-url-image{
|
765 |
cursor: pointer;
|
766 |
}
|
767 |
|
768 |
-
.b2s-user-network-settings-post-format-area label > input{
|
769 |
-
visibility: hidden;
|
770 |
-
position: absolute;
|
771 |
}
|
772 |
-
.b2s-user-network-settings-post-format-area label > input + img{
|
773 |
cursor:pointer;
|
774 |
border:2px solid transparent;
|
775 |
}
|
@@ -832,4 +832,16 @@ input[type="number"]{
|
|
832 |
|
833 |
.b2s-sidebar-menu-item{
|
834 |
font-weight: 600 !important;
|
835 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/** Navbar */
|
2 |
#b2s-wrapper {
|
3 |
padding-right: 0;
|
4 |
-webkit-transition: all 0.5s ease;
|
24 |
width: 100% !important;
|
25 |
}
|
26 |
.b2s-network-thumb{
|
27 |
+
width:20% !important;
|
28 |
}
|
29 |
.b2s-network-details{
|
30 |
+
width: 60% !important;
|
31 |
}
|
32 |
.b2s-network-status{
|
33 |
width: 15% !important;
|
50 |
}
|
51 |
|
52 |
.b2s-network-details-legend{
|
53 |
+
color:#FFFFFF;
|
54 |
text-align: center;
|
55 |
opacity: 0.6;
|
56 |
}
|
246 |
color: #fff;
|
247 |
font-weight: 400;
|
248 |
text-transform: uppercase;
|
249 |
+
margin-top:3px;
|
250 |
margin-bottom: 5px;
|
251 |
}
|
252 |
|
277 |
float: left;
|
278 |
}
|
279 |
.b2s-post-item-thumb{
|
280 |
+
width: 5%;
|
281 |
margin-right: 8px;
|
282 |
}
|
283 |
|
312 |
}
|
313 |
.b2s-post-item-details p{
|
314 |
font-size: 12px;
|
315 |
+
margin: 0px 3px;
|
316 |
|
317 |
}
|
318 |
|
331 |
|
332 |
.b2s-post-item-details-item-message-input-allow-html{
|
333 |
min-height: 200px;
|
334 |
+
}
|
335 |
.b2s-post-item-message-info{
|
336 |
margin-left:15px !important;
|
337 |
font-weight: 600;
|
357 |
|
358 |
.b2s-no-image-area{
|
359 |
margin-left: 15px;
|
360 |
+
}
|
361 |
.b2s-no-image-area-text{
|
362 |
font-size: 12px;
|
363 |
margin-left: 2px;
|
392 |
}
|
393 |
.b2s-post-item-details-release-area{
|
394 |
float: left;
|
395 |
+
width: 100%;
|
396 |
}
|
397 |
|
398 |
.b2s-post-item-details-release-area-details, .b2s-post-item-relay-area-details{
|
400 |
width: 100%;
|
401 |
}
|
402 |
.b2s-post-item-details-release-input-daySelect input{
|
403 |
+
margin-right: 15px;
|
404 |
}
|
405 |
|
406 |
.b2s-post-item-details-tag-input{
|
513 |
margin:0px 4px 0px 4px;
|
514 |
}
|
515 |
.ad-tag-btn:hover,.remove-tag-btn:hover{
|
516 |
+
color:#000;
|
517 |
}
|
518 |
|
519 |
.b2s-post-details{
|
663 |
}
|
664 |
|
665 |
.xing-url-title{
|
666 |
+
margin-top: 0px;
|
667 |
margin-bottom: 4px;
|
668 |
font-size: 18px;
|
669 |
font-weight: normal;
|
759 |
margin-right: 5px !important;
|
760 |
}
|
761 |
.b2s-img-required{
|
762 |
+
border-color: #d9534f !important;
|
763 |
}
|
764 |
.b2s-post-item-details-url-image{
|
765 |
cursor: pointer;
|
766 |
}
|
767 |
|
768 |
+
.b2s-user-network-settings-post-format-area label > input{
|
769 |
+
visibility: hidden;
|
770 |
+
position: absolute;
|
771 |
}
|
772 |
+
.b2s-user-network-settings-post-format-area label > input + img{
|
773 |
cursor:pointer;
|
774 |
border:2px solid transparent;
|
775 |
}
|
832 |
|
833 |
.b2s-sidebar-menu-item{
|
834 |
font-weight: 600 !important;
|
835 |
+
}
|
836 |
+
|
837 |
+
.b2s-submit-btn {
|
838 |
+
margin-left: 5px;
|
839 |
+
}
|
840 |
+
|
841 |
+
.b2s-loader-btn-ship{
|
842 |
+
height: 24px;
|
843 |
+
width: 24px;
|
844 |
+
margin-top: -10px !important;
|
845 |
+
margin-bottom: -6px !important;
|
846 |
+
display: none;
|
847 |
+
}
|
assets/css/general.css
CHANGED
@@ -7589,4 +7589,12 @@ CSS CheckBOX
|
|
7589 |
|
7590 |
.b2s-padding-bottom-5{
|
7591 |
padding-bottom: 5px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7592 |
}
|
7589 |
|
7590 |
.b2s-padding-bottom-5{
|
7591 |
padding-bottom: 5px;
|
7592 |
+
}
|
7593 |
+
|
7594 |
+
.b2s-left-border-success {
|
7595 |
+
border-left: 4px solid #79B232;
|
7596 |
+
}
|
7597 |
+
|
7598 |
+
.b2s-left-border-danger {
|
7599 |
+
border-left: 4px solid #a94442;
|
7600 |
}
|
assets/images/settings/b2s-post-format-19-1-de.png
ADDED
Binary file
|
assets/images/settings/b2s-post-format-19-1-en.png
ADDED
Binary file
|
assets/images/settings/b2s-post-format-19-2-de.png
ADDED
Binary file
|
assets/images/settings/b2s-post-format-19-2-en.png
ADDED
Binary file
|
assets/images/settings/like-icons-19.png
ADDED
Binary file
|
assets/js/b2s/calendar.js
CHANGED
@@ -1,653 +1,693 @@
|
|
1 |
-
jQuery.noConflict();
|
2 |
-
|
3 |
-
var curSource = new Array();
|
4 |
-
curSource[0] = ajaxurl + '?action=b2s_get_calendar_events&filter_network_auth=all&filter_network=all&filter_status=0';
|
5 |
-
var newSource = new Array();
|
6 |
-
|
7 |
-
jQuery(document).ready(function () {
|
8 |
-
jQuery('#b2s_calendar').fullCalendar({
|
9 |
-
editable: b2s_has_premium,
|
10 |
-
locale: b2s_calendar_locale,
|
11 |
-
eventLimit: 2,
|
12 |
-
timeFormat: 'H:mm',
|
13 |
-
eventSources: [curSource[0]],
|
14 |
-
eventRender: function (event, element) {
|
15 |
-
show = true;
|
16 |
-
$header = jQuery("<div>").addClass("b2s-calendar-header").attr('data-b2s-id', event.b2s_id);
|
17 |
-
$isRelayPost = '';
|
18 |
-
$isCuratedPost = '';
|
19 |
-
if (event.post_type == 'b2s_ex_post') {
|
20 |
-
$isCuratedPost = ' (Curated Post)';
|
21 |
-
}
|
22 |
-
if (event.relay_primary_post_id > 0) {
|
23 |
-
$isRelayPost = ' (Retweet)';
|
24 |
-
}
|
25 |
-
$network_name = jQuery("<span>").text(event.author + $isRelayPost + $isCuratedPost).addClass("network-name").css("display", "block");
|
26 |
-
element.find(".fc-time").after($network_name);
|
27 |
-
element.html(element.html());
|
28 |
-
$parent = element.parent();
|
29 |
-
$header.append(element.find(".fc-content"));
|
30 |
-
element.append($header);
|
31 |
-
$body = jQuery("<div>").addClass("b2s-calendar-body");
|
32 |
-
$body.append(event.avatar);
|
33 |
-
if (event.status == "error") {
|
34 |
-
$body.append(jQuery('<i>').addClass('glyphicon glyphicon-warning-sign glyphicon-danger'));
|
35 |
-
}
|
36 |
-
$body.append(element.find(".fc-title"));
|
37 |
-
$body.append(jQuery("<br>"));
|
38 |
-
var $em = jQuery("<em>").css("padding-top", "5px").css("display", "block");
|
39 |
-
$em.append("<img src='" + b2s_plugin_url + "assets/images/portale/" + event.network_id + "_flat.png' style='height: 16px;width: 16px;display: inline-block;padding-right: 2px;padding-left: 2px;' />")
|
40 |
-
$em.append(event.network_name);
|
41 |
-
$em.append(jQuery("<span>").text(": " + event.profile));
|
42 |
-
$body.append($em);
|
43 |
-
element.append($body);
|
44 |
-
if (event.status != "scheduled") {
|
45 |
-
event.editable = false;
|
46 |
-
}
|
47 |
-
},
|
48 |
-
dayRender: function (date, element) {
|
49 |
-
//TODO state to load
|
50 |
-
if (!jQuery(element[0]).hasClass('fc-past')) {
|
51 |
-
var date = jQuery(element[0]).attr('data-date');
|
52 |
-
var sel_element = jQuery(element[0]).closest('div').next('div').find('td[data-date="' + date + '"]');
|
53 |
-
$header = jQuery("<a>").html("+ <span class=\"hidden-sm hidden-xs\">" + jQuery("#b2sJSTextAddPost").val() + "</span>").addClass("b2s-calendar-sched-new-post-btn").attr('href', '#');
|
54 |
-
sel_element.append($header);
|
55 |
-
}
|
56 |
-
},
|
57 |
-
eventDrop: function (event, delta, revertFunc) {
|
58 |
-
jQuery.ajax({
|
59 |
-
url: ajaxurl,
|
60 |
-
type: "POST",
|
61 |
-
dataType: "json",
|
62 |
-
cache: false,
|
63 |
-
data: {
|
64 |
-
'action': 'b2s_calendar_move_post',
|
65 |
-
'b2s_id': event.b2s_id,
|
66 |
-
'user_timezone': event.user_timezone,
|
67 |
-
'sched_date': event.start.format(),
|
68 |
-
'post_for_relay': event.post_for_relay,
|
69 |
-
'post_for_approve': event.post_for_approve,
|
70 |
-
'network_type': event.network_type,
|
71 |
-
'nework_id': event.network_id
|
72 |
-
},
|
73 |
-
success: function (data) {
|
74 |
-
refreshCalender();
|
75 |
-
wp.heartbeat.connectNow();
|
76 |
-
}
|
77 |
-
});
|
78 |
-
},
|
79 |
-
eventAllow: function (dropLocation, draggedEvent) {
|
80 |
-
return dropLocation.start.isAfter(b2s_calendar_date) && draggedEvent.start.isAfter(b2s_calendar_datetime);
|
81 |
-
},
|
82 |
-
eventClick: function (calEvent, jsEvent, view) {
|
83 |
-
if (calEvent.status == "scheduled") {
|
84 |
-
showEditSchedCalendarPost(calEvent.b2s_id, calEvent.post_id, calEvent.network_auth_id, calEvent.network_type, calEvent.network_id, calEvent.post_format, calEvent.relay_primary_post_id);
|
85 |
-
} else {
|
86 |
-
if (calEvent.publish_link != "") {
|
87 |
-
window.open(calEvent.publish_link, '_blank');
|
88 |
-
}
|
89 |
-
}
|
90 |
-
},
|
91 |
-
loading: function (bool) {
|
92 |
-
if (!bool) {
|
93 |
-
//Routing from Dashboard - loading edit post preview
|
94 |
-
var rfd = jQuery('#b2s_rfd').val();
|
95 |
-
if (rfd == 1) {
|
96 |
-
jQuery('#b2s_rfd').val("0");
|
97 |
-
jQuery('.b2s-calendar-header[data-b2s-id="' + jQuery('#b2s_rfd_b2s_id').val() + '"]').parent().trigger('click');
|
98 |
-
}
|
99 |
-
}
|
100 |
-
}
|
101 |
-
|
102 |
-
});
|
103 |
-
jQuery(".b2s-loading-area").hide();
|
104 |
-
});
|
105 |
-
|
106 |
-
|
107 |
-
function showEditSchedCalendarPost(b2s_id, post_id, network_auth_id, network_type, network_id, post_format, relay_primary_post_id) {
|
108 |
-
if (jQuery('#b2s-edit-event-modal-' + b2s_id).length == 1)
|
109 |
-
{
|
110 |
-
jQuery('#b2s-edit-event-modal-' + b2s_id).remove();
|
111 |
-
}
|
112 |
-
b2s_current_post_id = post_id;
|
113 |
-
jQuery("#b2sPostId").val(post_id);
|
114 |
-
var $modal = jQuery("<div>");
|
115 |
-
jQuery.ajax({
|
116 |
-
url: ajaxurl,
|
117 |
-
type: "POST",
|
118 |
-
cache: false,
|
119 |
-
async: false,
|
120 |
-
data: {
|
121 |
-
'action': 'b2s_get_post_edit_modal',
|
122 |
-
'id': b2s_id
|
123 |
-
},
|
124 |
-
success: function (data) {
|
125 |
-
$modal = $modal.html(data);
|
126 |
-
}
|
127 |
-
});
|
128 |
-
jQuery("body").append($modal);
|
129 |
-
jQuery('#b2sUserTimeZone').val(jQuery('#user_timezone').val());
|
130 |
-
jQuery('#b2s-edit-event-modal-' + b2s_id).modal('show');
|
131 |
-
activatePortal(network_auth_id);
|
132 |
-
initSceditor(network_auth_id);
|
133 |
-
|
134 |
-
|
135 |
-
var
|
136 |
-
var
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
jQuery('.
|
141 |
-
jQuery('.b2s-post-
|
142 |
-
|
143 |
-
|
144 |
-
jQuery('.b2s-user-network-settings-post-format[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').
|
145 |
-
|
146 |
-
|
147 |
-
jQuery('.b2s-post-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
jQuery('.b2s-post-item-details-preview-
|
161 |
-
jQuery('.b2s-post-item-details-preview-
|
162 |
-
jQuery('.b2s-post-item-details-preview-url-reload[data-network-id="' + network_id + '"]').
|
163 |
-
jQuery('.b2s-post-item-details-preview-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + network_auth_id + '"]').
|
175 |
-
jQuery('.b2s-post-item-
|
176 |
-
jQuery('.b2s-post-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
jQuery('.b2s-post-item-details-preview-
|
183 |
-
jQuery('.b2s-post-item-details-preview-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + network_auth_id + '"]').
|
189 |
-
jQuery('.b2s-post-item-
|
190 |
-
jQuery('.b2s-post-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
jQuery('.b2s-post-item-details-preview-
|
198 |
-
jQuery('.b2s-post-item-details-
|
199 |
-
jQuery('.b2s-
|
200 |
-
jQuery('.b2s-
|
201 |
-
|
202 |
-
jQuery('.b2s-
|
203 |
-
|
204 |
-
|
205 |
-
jQuery('.b2s-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
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 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
if (
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
jQuery(
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
}
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
jQuery(
|
329 |
-
|
330 |
-
|
331 |
-
});
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
jQuery(
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
jQuery(
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
jQuery(
|
359 |
-
jQuery('#
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
});
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
jQuery('
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
jQuery('#
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
jQuery('#
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
jQuery('
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
}
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
jQuery(
|
538 |
-
|
539 |
-
|
540 |
-
jQuery.
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
jQuery(
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
jQuery('
|
570 |
-
|
571 |
-
wp.heartbeat.connectNow();
|
572 |
-
}
|
573 |
-
});
|
574 |
-
});
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
}
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
jQuery('#
|
598 |
-
jQuery(
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
function
|
648 |
-
var dateElement = '.b2s-post-item-details-release-input-date[data-network-auth-id="' + dataNetworkAuthId + '"]';
|
649 |
-
var
|
650 |
-
dateStr =
|
651 |
-
jQuery(
|
652 |
-
|
653 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery.noConflict();
|
2 |
+
|
3 |
+
var curSource = new Array();
|
4 |
+
curSource[0] = ajaxurl + '?action=b2s_get_calendar_events&filter_network_auth=all&filter_network=all&filter_status=0';
|
5 |
+
var newSource = new Array();
|
6 |
+
|
7 |
+
jQuery(document).ready(function () {
|
8 |
+
jQuery('#b2s_calendar').fullCalendar({
|
9 |
+
editable: b2s_has_premium,
|
10 |
+
locale: b2s_calendar_locale,
|
11 |
+
eventLimit: 2,
|
12 |
+
timeFormat: 'H:mm',
|
13 |
+
eventSources: [curSource[0]],
|
14 |
+
eventRender: function (event, element) {
|
15 |
+
show = true;
|
16 |
+
$header = jQuery("<div>").addClass("b2s-calendar-header").attr('data-b2s-id', event.b2s_id);
|
17 |
+
$isRelayPost = '';
|
18 |
+
$isCuratedPost = '';
|
19 |
+
if (event.post_type == 'b2s_ex_post') {
|
20 |
+
$isCuratedPost = ' (Curated Post)';
|
21 |
+
}
|
22 |
+
if (event.relay_primary_post_id > 0) {
|
23 |
+
$isRelayPost = ' (Retweet)';
|
24 |
+
}
|
25 |
+
$network_name = jQuery("<span>").text(event.author + $isRelayPost + $isCuratedPost).addClass("network-name").css("display", "block");
|
26 |
+
element.find(".fc-time").after($network_name);
|
27 |
+
element.html(element.html());
|
28 |
+
$parent = element.parent();
|
29 |
+
$header.append(element.find(".fc-content"));
|
30 |
+
element.append($header);
|
31 |
+
$body = jQuery("<div>").addClass("b2s-calendar-body");
|
32 |
+
$body.append(event.avatar);
|
33 |
+
if (event.status == "error") {
|
34 |
+
$body.append(jQuery('<i>').addClass('glyphicon glyphicon-warning-sign glyphicon-danger'));
|
35 |
+
}
|
36 |
+
$body.append(element.find(".fc-title"));
|
37 |
+
$body.append(jQuery("<br>"));
|
38 |
+
var $em = jQuery("<em>").css("padding-top", "5px").css("display", "block");
|
39 |
+
$em.append("<img src='" + b2s_plugin_url + "assets/images/portale/" + event.network_id + "_flat.png' style='height: 16px;width: 16px;display: inline-block;padding-right: 2px;padding-left: 2px;' />")
|
40 |
+
$em.append(event.network_name);
|
41 |
+
$em.append(jQuery("<span>").text(": " + event.profile));
|
42 |
+
$body.append($em);
|
43 |
+
element.append($body);
|
44 |
+
if (event.status != "scheduled") {
|
45 |
+
event.editable = false;
|
46 |
+
}
|
47 |
+
},
|
48 |
+
dayRender: function (date, element) {
|
49 |
+
//TODO state to load
|
50 |
+
if (!jQuery(element[0]).hasClass('fc-past')) {
|
51 |
+
var date = jQuery(element[0]).attr('data-date');
|
52 |
+
var sel_element = jQuery(element[0]).closest('div').next('div').find('td[data-date="' + date + '"]');
|
53 |
+
$header = jQuery("<a>").html("+ <span class=\"hidden-sm hidden-xs\">" + jQuery("#b2sJSTextAddPost").val() + "</span>").addClass("b2s-calendar-sched-new-post-btn").attr('href', '#');
|
54 |
+
sel_element.append($header);
|
55 |
+
}
|
56 |
+
},
|
57 |
+
eventDrop: function (event, delta, revertFunc) {
|
58 |
+
jQuery.ajax({
|
59 |
+
url: ajaxurl,
|
60 |
+
type: "POST",
|
61 |
+
dataType: "json",
|
62 |
+
cache: false,
|
63 |
+
data: {
|
64 |
+
'action': 'b2s_calendar_move_post',
|
65 |
+
'b2s_id': event.b2s_id,
|
66 |
+
'user_timezone': event.user_timezone,
|
67 |
+
'sched_date': event.start.format(),
|
68 |
+
'post_for_relay': event.post_for_relay,
|
69 |
+
'post_for_approve': event.post_for_approve,
|
70 |
+
'network_type': event.network_type,
|
71 |
+
'nework_id': event.network_id
|
72 |
+
},
|
73 |
+
success: function (data) {
|
74 |
+
refreshCalender();
|
75 |
+
wp.heartbeat.connectNow();
|
76 |
+
}
|
77 |
+
});
|
78 |
+
},
|
79 |
+
eventAllow: function (dropLocation, draggedEvent) {
|
80 |
+
return dropLocation.start.isAfter(b2s_calendar_date) && draggedEvent.start.isAfter(b2s_calendar_datetime);
|
81 |
+
},
|
82 |
+
eventClick: function (calEvent, jsEvent, view) {
|
83 |
+
if (calEvent.status == "scheduled") {
|
84 |
+
showEditSchedCalendarPost(calEvent.b2s_id, calEvent.post_id, calEvent.network_auth_id, calEvent.network_type, calEvent.network_id, calEvent.post_format, calEvent.relay_primary_post_id);
|
85 |
+
} else {
|
86 |
+
if (calEvent.publish_link != "") {
|
87 |
+
window.open(calEvent.publish_link, '_blank');
|
88 |
+
}
|
89 |
+
}
|
90 |
+
},
|
91 |
+
loading: function (bool) {
|
92 |
+
if (!bool) {
|
93 |
+
//Routing from Dashboard - loading edit post preview
|
94 |
+
var rfd = jQuery('#b2s_rfd').val();
|
95 |
+
if (rfd == 1) {
|
96 |
+
jQuery('#b2s_rfd').val("0");
|
97 |
+
jQuery('.b2s-calendar-header[data-b2s-id="' + jQuery('#b2s_rfd_b2s_id').val() + '"]').parent().trigger('click');
|
98 |
+
}
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
});
|
103 |
+
jQuery(".b2s-loading-area").hide();
|
104 |
+
});
|
105 |
+
|
106 |
+
|
107 |
+
function showEditSchedCalendarPost(b2s_id, post_id, network_auth_id, network_type, network_id, post_format, relay_primary_post_id) {
|
108 |
+
if (jQuery('#b2s-edit-event-modal-' + b2s_id).length == 1)
|
109 |
+
{
|
110 |
+
jQuery('#b2s-edit-event-modal-' + b2s_id).remove();
|
111 |
+
}
|
112 |
+
b2s_current_post_id = post_id;
|
113 |
+
jQuery("#b2sPostId").val(post_id);
|
114 |
+
var $modal = jQuery("<div>");
|
115 |
+
jQuery.ajax({
|
116 |
+
url: ajaxurl,
|
117 |
+
type: "POST",
|
118 |
+
cache: false,
|
119 |
+
async: false,
|
120 |
+
data: {
|
121 |
+
'action': 'b2s_get_post_edit_modal',
|
122 |
+
'id': b2s_id
|
123 |
+
},
|
124 |
+
success: function (data) {
|
125 |
+
$modal = $modal.html(data);
|
126 |
+
}
|
127 |
+
});
|
128 |
+
jQuery("body").append($modal);
|
129 |
+
jQuery('#b2sUserTimeZone').val(jQuery('#user_timezone').val());
|
130 |
+
jQuery('#b2s-edit-event-modal-' + b2s_id).modal('show');
|
131 |
+
activatePortal(network_auth_id);
|
132 |
+
initSceditor(network_auth_id);
|
133 |
+
if (jQuery('.b2s-post-ship-item-post-format-text[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').length > 0) {
|
134 |
+
var postFormatText = b2s_calendar_formats;
|
135 |
+
var isSetPostFormat = false;
|
136 |
+
var postFormatType = jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').attr('data-post-format-type');
|
137 |
+
//is set post format => override current condidtions by user settings for this post
|
138 |
+
if (post_format !== null) {
|
139 |
+
jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').val(post_format);
|
140 |
+
jQuery('.b2s-post-ship-item-post-format-text[data-network-auth-id="' + network_auth_id + '"]').html(postFormatText[postFormatType][post_format]);
|
141 |
+
jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + network_auth_id + '"]').val(post_format);
|
142 |
+
//edit modal select post format
|
143 |
+
jQuery('.b2s-user-network-settings-post-format[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').removeClass('b2s-settings-checked');
|
144 |
+
jQuery('.b2s-user-network-settings-post-format[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"][data-post-format="' + post_format + '"]').addClass('b2s-settings-checked');
|
145 |
+
} else {
|
146 |
+
jQuery('.b2s-post-ship-item-post-format-text[data-network-auth-id="' + network_auth_id + '"]').html(postFormatText[postFormatType][jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').val()]);
|
147 |
+
jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + network_auth_id + '"]').val(jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').val());
|
148 |
+
}
|
149 |
+
|
150 |
+
//if linkpost then show btn meta tags
|
151 |
+
var isMetaChecked = false;
|
152 |
+
if (network_id == "1" && jQuery('#isOgMetaChecked').val() == "1") {
|
153 |
+
isMetaChecked = true;
|
154 |
+
}
|
155 |
+
if (network_id == "2" && jQuery('#isCardMetaChecked').val() == "1") {
|
156 |
+
isMetaChecked = true;
|
157 |
+
}
|
158 |
+
if (isMetaChecked && jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').val() == "0") {
|
159 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", false);
|
160 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", false);
|
161 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-id="' + network_id + '"]').show();
|
162 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-id="' + network_id + '"]').trigger("click");
|
163 |
+
var dataMetaType = jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + network_auth_id + '"]').attr("data-meta-type");
|
164 |
+
if (dataMetaType == "og") {
|
165 |
+
jQuery('.b2sChangeOgMeta[data-network-auth-id="' + network_auth_id + '"]').val("1");
|
166 |
+
} else {
|
167 |
+
jQuery('.b2sChangeCardMeta[data-network-auth-id="' + network_auth_id + '"]').val("1");
|
168 |
+
}
|
169 |
+
|
170 |
+
|
171 |
+
//Facebook TOS 072018 - Instant Sharing - Image post without Text > set to readonly
|
172 |
+
if (network_id == 1 && network_type == 0) {
|
173 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", false);
|
174 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + network_auth_id + '"]').show();
|
175 |
+
jQuery('.b2s-post-item-info-area[data-network-auth-id="' + network_auth_id + '"]').show();
|
176 |
+
jQuery('.b2s-post-approve-info[data-network-auth-id="' + network_auth_id + '"]').hide();
|
177 |
+
}
|
178 |
+
|
179 |
+
|
180 |
+
} else {
|
181 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", true);
|
182 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", true);
|
183 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-id="' + network_id + '"]').hide();
|
184 |
+
|
185 |
+
//Facebook TOS 072018 - Instant Sharing - Image post without Text > set to readonly
|
186 |
+
if (network_id == 1 && network_type == 0) {
|
187 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", true);
|
188 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + network_auth_id + '"]').hide();
|
189 |
+
jQuery('.b2s-post-item-info-area[data-network-auth-id="' + network_auth_id + '"]').hide();
|
190 |
+
jQuery('.b2s-post-approve-info[data-network-auth-id="' + network_auth_id + '"]').show();
|
191 |
+
}
|
192 |
+
}
|
193 |
+
|
194 |
+
//Content Curation
|
195 |
+
if (jQuery('.b2s-post-ship-item-post-format[data-network-auth-id="' + network_auth_id + '"]').attr('data-post-wp-type') == 'ex') {
|
196 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", true);
|
197 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", true);
|
198 |
+
jQuery('.b2s-post-item-details-item-url-input[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", true);
|
199 |
+
jQuery('.b2s-load-info-meta-tag-modal[data-network-auth-id="' + network_auth_id + '"]').attr("style", "display:none !important");
|
200 |
+
if (jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + network_auth_id + '"]').val() == 0) {
|
201 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + network_auth_id + '"]').hide();
|
202 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').hide();
|
203 |
+
} else {
|
204 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + network_auth_id + '"]').show();
|
205 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').show();
|
206 |
+
}
|
207 |
+
}
|
208 |
+
|
209 |
+
|
210 |
+
if (network_id == "3") {
|
211 |
+
if (jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').val() == "0") {
|
212 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').show();
|
213 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').trigger("click");
|
214 |
+
jQuery('.linkedin-url-title[data-network-auth-id="' + network_auth_id + '"]').show();
|
215 |
+
jQuery('.linkedin-url-desc[data-network-auth-id="' + network_auth_id + '"]').hide(); //not showing on linkedin
|
216 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').hide();
|
217 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + network_auth_id + '"]').hide();
|
218 |
+
} else {
|
219 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').hide();
|
220 |
+
jQuery('.linkedin-url-title[data-network-auth-id="' + network_auth_id + '"]').hide();
|
221 |
+
jQuery('.linkedin-url-desc[data-network-auth-id="' + network_auth_id + '"]').hide();
|
222 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').show();
|
223 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + network_auth_id + '"]').show();
|
224 |
+
}
|
225 |
+
}
|
226 |
+
|
227 |
+
if (network_id == "19" && network_type == "0") {
|
228 |
+
if (jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').val() == "0") {
|
229 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').show();
|
230 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').trigger("click");
|
231 |
+
jQuery('.xing-url-title[data-network-auth-id="' + network_auth_id + '"]').show();
|
232 |
+
jQuery('.xing-url-desc[data-network-auth-id="' + network_auth_id + '"]').show();
|
233 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').hide();
|
234 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + network_auth_id + '"]').hide();
|
235 |
+
} else {
|
236 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').hide();
|
237 |
+
jQuery('.xing-url-title[data-network-auth-id="' + network_auth_id + '"]').hide();
|
238 |
+
jQuery('.xing-url-desc[data-network-auth-id="' + network_auth_id + '"]').hide();
|
239 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').show();
|
240 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + network_auth_id + '"]').show();
|
241 |
+
}
|
242 |
+
}
|
243 |
+
|
244 |
+
}
|
245 |
+
var textLimit = jQuery('.b2s-post-item-details-item-message-input[data-network-count="-1"][data-network-auth-id="' + network_auth_id + '"]').attr('data-network-text-limit');
|
246 |
+
if (textLimit != "0") {
|
247 |
+
networkLimitAll(network_auth_id, network_id, textLimit);
|
248 |
+
} else {
|
249 |
+
networkCount(network_auth_id);
|
250 |
+
}
|
251 |
+
var today = new Date();
|
252 |
+
var dateFormat = "yyyy-mm-dd";
|
253 |
+
var language = "en";
|
254 |
+
var showMeridian = true;
|
255 |
+
if (jQuery('#b2sUserLang').val() == "de") {
|
256 |
+
dateFormat = "dd.mm.yyyy";
|
257 |
+
language = "de";
|
258 |
+
showMeridian = false;
|
259 |
+
}
|
260 |
+
|
261 |
+
jQuery(".b2s-post-item-details-release-input-date").datepicker({
|
262 |
+
format: dateFormat,
|
263 |
+
language: language,
|
264 |
+
maxViewMode: 2,
|
265 |
+
todayHighlight: true,
|
266 |
+
startDate: today,
|
267 |
+
calendarWeeks: true,
|
268 |
+
autoclose: true
|
269 |
+
});
|
270 |
+
jQuery('.b2s-post-item-details-release-input-time').timepicker({
|
271 |
+
minuteStep: 15,
|
272 |
+
appendWidgetTo: 'body',
|
273 |
+
showSeconds: false,
|
274 |
+
showMeridian: showMeridian,
|
275 |
+
defaultTime: 'current',
|
276 |
+
snapToStep: true
|
277 |
+
});
|
278 |
+
jQuery(".b2s-post-item-details-release-input-date").datepicker().on('changeDate', function (e) {
|
279 |
+
checkSchedDateTime(network_auth_id);
|
280 |
+
});
|
281 |
+
jQuery('.b2s-post-item-details-release-input-time').timepicker().on('changeTime.timepicker', function (e) {
|
282 |
+
checkSchedDateTime(network_auth_id);
|
283 |
+
});
|
284 |
+
init();
|
285 |
+
|
286 |
+
//is relay post?
|
287 |
+
if (relay_primary_post_id > 0) {
|
288 |
+
jQuery('#b2s-edit-event-modal-' + b2s_id).find("input, textarea, button").each(function () {
|
289 |
+
if (!jQuery(this).hasClass('b2s-input-hidden') && !jQuery(this).hasClass('b2s-modal-close') && !jQuery(this).hasClass('b2s-post-item-details-relay-input-delay') && !jQuery(this).hasClass('b2s-edit-post-delete') && !jQuery(this).hasClass('b2s-edit-post-save-this')) {
|
290 |
+
jQuery(this).prop("disabled", true);
|
291 |
+
}
|
292 |
+
});
|
293 |
+
}
|
294 |
+
|
295 |
+
if (!b2s_has_premium)
|
296 |
+
{
|
297 |
+
jQuery('#b2s-edit-event-modal-' + b2s_id).find("input, textarea, button").each(function () {
|
298 |
+
if (!jQuery(this).hasClass('b2s-modal-close')) {
|
299 |
+
jQuery(this).prop("disabled", true);
|
300 |
+
}
|
301 |
+
});
|
302 |
+
}
|
303 |
+
}
|
304 |
+
|
305 |
+
jQuery(document).on('change', '.b2s-calendar-filter-network-btn', function () {
|
306 |
+
var filter_status = jQuery('#b2s-calendar-filter-status').val();
|
307 |
+
newSource[0] = ajaxurl + '?action=b2s_get_calendar_events&filter_network_auth=all&filter_network=' + jQuery(this).val() + '&filter_status=' + filter_status;
|
308 |
+
jQuery('#b2s_calendar').fullCalendar('removeEventSource', curSource[0]);
|
309 |
+
jQuery('#b2s_calendar').fullCalendar('addEventSource', newSource[0]);
|
310 |
+
curSource[0] = newSource[0];
|
311 |
+
|
312 |
+
jQuery('.b2s-calendar-filter-network-account-list').html("");
|
313 |
+
jQuery('.b2s-calendar-filter-network-account-list').hide();
|
314 |
+
if (jQuery(this).val() != 'all') {
|
315 |
+
jQuery.ajax({
|
316 |
+
url: ajaxurl,
|
317 |
+
type: "POST",
|
318 |
+
dataType: "json",
|
319 |
+
cache: false,
|
320 |
+
async: false,
|
321 |
+
data: {
|
322 |
+
'action': 'b2s_get_calendar_filter_network_auth',
|
323 |
+
'network_id': jQuery(this).val()
|
324 |
+
},
|
325 |
+
success: function (data) {
|
326 |
+
if (data.result == true) {
|
327 |
+
jQuery(".b2s-calendar-filter-network-account-list").show();
|
328 |
+
jQuery(".b2s-calendar-filter-network-account-list").html(data.content);
|
329 |
+
}
|
330 |
+
}
|
331 |
+
});
|
332 |
+
}
|
333 |
+
return false;
|
334 |
+
});
|
335 |
+
|
336 |
+
|
337 |
+
jQuery(document).on('change', '#b2s-calendar-filter-network-auth-sel', function () {
|
338 |
+
var filter_network_details_auth_id = jQuery(this).val();
|
339 |
+
var filter_network_id = jQuery('.b2s-calendar-filter-network-btn:checked').val();
|
340 |
+
var filter_status = jQuery('#b2s-calendar-filter-status').val();
|
341 |
+
newSource[0] = ajaxurl + '?action=b2s_get_calendar_events&filter_network_auth=' + filter_network_details_auth_id + '&filter_network=' + filter_network_id + '&filter_status=' + filter_status;
|
342 |
+
jQuery('#b2s_calendar').fullCalendar('removeEventSource', curSource[0]);
|
343 |
+
jQuery('#b2s_calendar').fullCalendar('addEventSource', newSource[0]);
|
344 |
+
curSource[0] = newSource[0];
|
345 |
+
|
346 |
+
return false;
|
347 |
+
|
348 |
+
});
|
349 |
+
|
350 |
+
jQuery(document).on('change', '#b2s-calendar-filter-status', function () {
|
351 |
+
var filter_network_id = jQuery('.b2s-calendar-filter-network-btn:checked').val();
|
352 |
+
var filter_network_details_auth_id = jQuery('#b2s-calendar-filter-network-auth-sel').val();
|
353 |
+
if (typeof filter_network_details_auth_id == 'undefined') {
|
354 |
+
filter_network_details_auth_id = 'all';
|
355 |
+
}
|
356 |
+
var filter_status = jQuery('#b2s-calendar-filter-status').val();
|
357 |
+
newSource[0] = ajaxurl + '?action=b2s_get_calendar_events&filter_network_auth=' + filter_network_details_auth_id + '&filter_network=' + filter_network_id + '&filter_status=' + filter_status;
|
358 |
+
jQuery('#b2s_calendar').fullCalendar('removeEventSource', curSource[0]);
|
359 |
+
jQuery('#b2s_calendar').fullCalendar('addEventSource', newSource[0]);
|
360 |
+
curSource[0] = newSource[0];
|
361 |
+
|
362 |
+
return false;
|
363 |
+
|
364 |
+
});
|
365 |
+
|
366 |
+
|
367 |
+
//Modal Edit Post close
|
368 |
+
jQuery(document).on('click', '.b2s-modal-close-edit-post', function (e) {
|
369 |
+
jQuery(jQuery(this).attr('data-modal-name')).remove();
|
370 |
+
return false;
|
371 |
+
});
|
372 |
+
|
373 |
+
|
374 |
+
jQuery(document).on('click', '#b2s-sort-submit-btn', function () {
|
375 |
+
jQuery('#b2sPagination').val("1");
|
376 |
+
b2sSortFormSubmit();
|
377 |
+
return false;
|
378 |
+
});
|
379 |
+
|
380 |
+
jQuery(document).on('keypress', '#b2sSortPostTitle', function (event) {
|
381 |
+
if (event.keyCode == 13) { //Hide Enter
|
382 |
+
return false;
|
383 |
+
}
|
384 |
+
});
|
385 |
+
|
386 |
+
jQuery(document).on('click', '.b2s-pagination-btn', function () {
|
387 |
+
jQuery('#b2sPagination').val(jQuery(this).attr('data-page'));
|
388 |
+
b2sSortFormSubmit();
|
389 |
+
return false;
|
390 |
+
});
|
391 |
+
|
392 |
+
jQuery(document).on('change', '.b2s-select', function () {
|
393 |
+
jQuery('#b2sPagination').val("1");
|
394 |
+
b2sSortFormSubmit();
|
395 |
+
return false;
|
396 |
+
});
|
397 |
+
|
398 |
+
jQuery(document).on('click', '#b2s-sort-reset-btn', function () {
|
399 |
+
jQuery('#b2sPagination').val("1");
|
400 |
+
jQuery('#b2sSortPostTitle').val("");
|
401 |
+
jQuery('#b2sSortPostAuthor').prop('selectedIndex', 0);
|
402 |
+
jQuery('#b2sSortPostCat').prop('selectedIndex', 0);
|
403 |
+
jQuery('#b2sSortPostType').prop('selectedIndex', 0);
|
404 |
+
jQuery('#b2sSortPostSchedDate').prop('selectedIndex', 0);
|
405 |
+
jQuery('#b2sShowByDate').val("");
|
406 |
+
jQuery('#b2sUserAuthId').val("");
|
407 |
+
jQuery('#b2sSortPostStatus').prop('selectedIndex', 0);
|
408 |
+
jQuery('#b2sSortPostPublishDate').prop('selectedIndex', 0);
|
409 |
+
b2sSortFormSubmit();
|
410 |
+
return false;
|
411 |
+
});
|
412 |
+
|
413 |
+
jQuery(document).on('click', '.b2s-calendar-sched-new-post-btn', function () {
|
414 |
+
if (jQuery('#user_version').val() == 0) {
|
415 |
+
jQuery('#b2s-sched-post-modal').modal('show');
|
416 |
+
return false;
|
417 |
+
}
|
418 |
+
jQuery('#b2s-show-post-type-modal').modal('show');
|
419 |
+
var selSchedDate = jQuery(this).parent('td').attr('data-date');
|
420 |
+
jQuery('#b2sSelSchedDate').val(selSchedDate);
|
421 |
+
return false;
|
422 |
+
});
|
423 |
+
|
424 |
+
jQuery(document).on('click', '#b2s-btn-select-blog-post', function () {
|
425 |
+
jQuery('#b2s-show-post-type-modal').modal('hide');
|
426 |
+
jQuery('#b2s-show-post-all-modal').modal('show');
|
427 |
+
if (!jQuery('#b2sSelSchedDate').length > 0) {
|
428 |
+
jQuery('.b2sSortForm input:first').after('<input value="' + jQuery('#b2sSelSchedDate').val() + '" id="b2sSelSchedDate" name="b2sSelSchedDate" type="hidden">');
|
429 |
+
}
|
430 |
+
b2sSortFormSubmit();
|
431 |
+
return false;
|
432 |
+
});
|
433 |
+
|
434 |
+
jQuery(document).on('click', '#b2s-btn-select-content-curation', function () {
|
435 |
+
window.location.href = jQuery('#b2sRedirectUrlContentCuration').val() + '&schedDate=' + jQuery('#b2sSelSchedDate').val();
|
436 |
+
return false;
|
437 |
+
});
|
438 |
+
|
439 |
+
function showFilter(typ) {
|
440 |
+
if (typ == 'show') {
|
441 |
+
jQuery('.filterShow').hide();
|
442 |
+
jQuery('.form-inline').show();
|
443 |
+
jQuery('.filterHide').show();
|
444 |
+
} else {
|
445 |
+
jQuery('.filterShow').show();
|
446 |
+
jQuery('.form-inline').hide();
|
447 |
+
jQuery('.filterHide').hide();
|
448 |
+
}
|
449 |
+
}
|
450 |
+
|
451 |
+
//b2sSortForm
|
452 |
+
function b2sSortFormSubmit() {
|
453 |
+
jQuery(".b2s-loading-area").show();
|
454 |
+
jQuery('.b2s-sort-result-item-area').html('');
|
455 |
+
jQuery('.b2s-sort-pagination-area').html('');
|
456 |
+
|
457 |
+
var data = {
|
458 |
+
'action': 'b2s_sort_data',
|
459 |
+
'b2sSortPostTitle': jQuery('#b2sSortPostTitle').val(),
|
460 |
+
'b2sSortPostAuthor': jQuery('#b2sSortPostAuthor').val(),
|
461 |
+
'b2sSortPostCat': jQuery('#b2sSortPostCat').val(),
|
462 |
+
'b2sSortPostType': jQuery('#b2sSortPostType').val(),
|
463 |
+
'b2sSortPostSchedDate': jQuery('#b2sSortPostSchedDate').val(),
|
464 |
+
'b2sUserAuthId': jQuery('#b2sUserAuthId').val(),
|
465 |
+
'b2sType': jQuery('#b2sType').val(),
|
466 |
+
'b2sShowByDate': jQuery('#b2sShowByDate').val(),
|
467 |
+
'b2sPagination': jQuery('#b2sPagination').val(),
|
468 |
+
'b2sShowPagination': jQuery('#b2sShowPagination').length > 0 ? jQuery('#b2sShowPagination').val() : 1,
|
469 |
+
'b2sSortPostStatus': jQuery('#b2sSortPostStatus').val(),
|
470 |
+
'b2sSortPostPublishDate': jQuery('#b2sSortPostPublishDate').val(),
|
471 |
+
'b2sUserLang': jQuery('#b2sUserLang').val(),
|
472 |
+
'b2sSchedDate': jQuery('#b2sSelSchedDate').val()
|
473 |
+
};
|
474 |
+
|
475 |
+
if (jQuery('#b2sPostsPerPage').length > 0) {
|
476 |
+
data['b2sPostsPerPage'] = jQuery('#b2sPostsPerPage').val();
|
477 |
+
}
|
478 |
+
|
479 |
+
jQuery.ajax({
|
480 |
+
url: ajaxurl,
|
481 |
+
type: "POST",
|
482 |
+
dataType: "json",
|
483 |
+
cache: false,
|
484 |
+
data: data,
|
485 |
+
error: function () {
|
486 |
+
jQuery('.b2s-server-connection-fail').show();
|
487 |
+
return false;
|
488 |
+
},
|
489 |
+
success: function (data) {
|
490 |
+
if (typeof data === 'undefined' || data === null) {
|
491 |
+
jQuery('.b2s-server-connection-fail').show();
|
492 |
+
return false;
|
493 |
+
}
|
494 |
+
if (data.result == true) {
|
495 |
+
jQuery('.b2s-loading-area').hide();
|
496 |
+
jQuery('.b2s-sort-result-item-area').html(data.content).show();
|
497 |
+
jQuery('.b2s-sort-pagination-area').html(data.pagination).show();
|
498 |
+
} else {
|
499 |
+
jQuery('.b2s-server-connection-fail').show();
|
500 |
+
return false;
|
501 |
+
}
|
502 |
+
}
|
503 |
+
});
|
504 |
+
return false;
|
505 |
+
}
|
506 |
+
//Overlay second modal
|
507 |
+
jQuery('#b2s-show-post-type-modal').on('hidden.bs.modal', function () {
|
508 |
+
jQuery('body').addClass('modal-open');
|
509 |
+
});
|
510 |
+
|
511 |
+
//Overlay second modal
|
512 |
+
jQuery('#b2s-network-select-image').on('hidden.bs.modal', function () {
|
513 |
+
jQuery('body').addClass('modal-open');
|
514 |
+
});
|
515 |
+
|
516 |
+
//Overlay second modal
|
517 |
+
jQuery('#b2s-post-ship-item-post-format-modal').on('hidden.bs.modal', function () {
|
518 |
+
jQuery('body').addClass('modal-open');
|
519 |
+
});
|
520 |
+
|
521 |
+
jQuery(document).on('click', '.b2s-select-image-modal-open', function () {
|
522 |
+
jQuery('.b2s-network-select-image-content').html("");
|
523 |
+
jQuery.ajax({
|
524 |
+
url: ajaxurl,
|
525 |
+
type: "POST",
|
526 |
+
cache: false,
|
527 |
+
async: false,
|
528 |
+
data: {
|
529 |
+
'action': 'b2s_get_image_modal',
|
530 |
+
'id': jQuery(this).data('post-id'),
|
531 |
+
'image_url': jQuery(this).data('image-url')
|
532 |
+
},
|
533 |
+
success: function (data) {
|
534 |
+
jQuery(".b2s-network-select-image-content").html(data);
|
535 |
+
}
|
536 |
+
});
|
537 |
+
var authId = jQuery(this).data('network-auth-id');
|
538 |
+
jQuery('.b2s-image-change-this-network').attr('data-network-auth-id', authId);
|
539 |
+
jQuery('.b2s-upload-image').attr('data-network-auth-id', authId);
|
540 |
+
var content = "<img class='b2s-post-item-network-image-selected-account' height='22px' src='" + jQuery('.b2s-post-item-network-image[data-network-auth-id="' + authId + '"]').attr('src') + "' /> " + jQuery('.b2s-post-item-details-network-display-name[data-network-auth-id="' + authId + '"]').html();
|
541 |
+
jQuery('.b2s-selected-network-for-image-info').html(content);
|
542 |
+
jQuery('#b2sInsertImageType').val("0");
|
543 |
+
jQuery('.networkImage').each(function () {
|
544 |
+
var width = this.naturalWidth;
|
545 |
+
var height = this.naturalHeight;
|
546 |
+
jQuery(this).parents('.b2s-image-item').find('.b2s-image-item-caption-resolution').html(width + 'x' + height);
|
547 |
+
});
|
548 |
+
jQuery('#b2s-network-select-image').modal('show');
|
549 |
+
return false;
|
550 |
+
});
|
551 |
+
jQuery(document).on("click", ".b2s-edit-post-delete", function () {
|
552 |
+
var id = jQuery(this).data("b2s-id");
|
553 |
+
var post_id = jQuery(this).data("post-id");
|
554 |
+
var post_for_relay = jQuery(this).data("data-post-for-relay");
|
555 |
+
var post_for_approve = jQuery(this).data("data-post-for-approve");
|
556 |
+
jQuery.ajax({
|
557 |
+
url: ajaxurl,
|
558 |
+
type: "POST",
|
559 |
+
dataType: "json",
|
560 |
+
cache: false,
|
561 |
+
data: {
|
562 |
+
'action': 'b2s_delete_post',
|
563 |
+
'b2s_id': id,
|
564 |
+
'post_id': post_id,
|
565 |
+
'post_for_relay': post_for_relay,
|
566 |
+
'post_for_approve': post_for_approve
|
567 |
+
},
|
568 |
+
success: function (data) {
|
569 |
+
jQuery('#b2s-edit-event-modal-' + id).modal('hide');
|
570 |
+
refreshCalender();
|
571 |
+
wp.heartbeat.connectNow();
|
572 |
+
}
|
573 |
+
});
|
574 |
+
});
|
575 |
+
|
576 |
+
/*jQuery(document).on("click", ".b2s-calendar-save-all", function (e) {
|
577 |
+
jQuery('#save_method').val("apply-all");
|
578 |
+
e.preventDefault();
|
579 |
+
var id = jQuery(this).data("b2s-id");
|
580 |
+
jQuery.ajax({
|
581 |
+
url: ajaxurl,
|
582 |
+
type: "POST",
|
583 |
+
dataType: "json",
|
584 |
+
cache: false,
|
585 |
+
data: jQuery(this).closest("form").serialize(),
|
586 |
+
success: function (data) {
|
587 |
+
jQuery('#b2s-edit-event-modal-' + id).modal('hide');
|
588 |
+
refreshCalender();
|
589 |
+
jQuery('#b2s-edit-event-modal-' + id).remove();
|
590 |
+
wp.heartbeat.connectNow();
|
591 |
+
}
|
592 |
+
});
|
593 |
+
});*/
|
594 |
+
|
595 |
+
jQuery(document).on("click", ".b2s-edit-post-save-this", function (e) {
|
596 |
+
e.preventDefault();
|
597 |
+
jQuery('#save_method').val("apply-this");
|
598 |
+
var id = jQuery(this).data("b2s-id");
|
599 |
+
jQuery.ajax({
|
600 |
+
url: ajaxurl,
|
601 |
+
type: "POST",
|
602 |
+
dataType: "json",
|
603 |
+
cache: false,
|
604 |
+
data: jQuery(this).closest("form").serialize(),
|
605 |
+
success: function (data) {
|
606 |
+
jQuery('#b2s-edit-event-modal-' + id).modal('hide');
|
607 |
+
refreshCalender();
|
608 |
+
jQuery('#b2s-edit-event-modal-' + id).remove();
|
609 |
+
jQuery('body').removeClass('modal-open');
|
610 |
+
jQuery('body').removeAttr('style');
|
611 |
+
wp.heartbeat.connectNow();
|
612 |
+
}
|
613 |
+
});
|
614 |
+
});
|
615 |
+
jQuery(document).on("click", ".release_locks", function () {
|
616 |
+
jQuery.ajax({
|
617 |
+
url: ajaxurl,
|
618 |
+
type: "POST",
|
619 |
+
cache: false,
|
620 |
+
async: false,
|
621 |
+
data: {
|
622 |
+
'action': 'b2s_get_calendar_release_locks',
|
623 |
+
'post_id': jQuery('#post_id').val()
|
624 |
+
},
|
625 |
+
success: function (data) {
|
626 |
+
wp.heartbeat.connectNow();
|
627 |
+
}
|
628 |
+
});
|
629 |
+
});
|
630 |
+
function refreshCalender() {
|
631 |
+
jQuery('#b2s_calendar').fullCalendar('refetchEvents');
|
632 |
+
}
|
633 |
+
|
634 |
+
jQuery('#b2s-info-meta-tag-modal').on('hidden.bs.modal', function (e) {
|
635 |
+
jQuery('body').addClass('modal-open');
|
636 |
+
});
|
637 |
+
jQuery('#b2s-network-select-image').on('hidden.bs.modal', function (e) {
|
638 |
+
jQuery('body').addClass('modal-open');
|
639 |
+
});
|
640 |
+
jQuery('#b2s-post-ship-item-post-format-modal').on('hidden.bs.modal', function (e) {
|
641 |
+
jQuery('body').addClass('modal-open');
|
642 |
+
});
|
643 |
+
jQuery('#b2s-info-change-meta-tag-modal').on('hidden.bs.modal', function () {
|
644 |
+
jQuery('body').addClass('modal-open');
|
645 |
+
});
|
646 |
+
//jQuery(this).attr('data-network-auth-id')
|
647 |
+
function checkSchedDateTime(dataNetworkAuthId) {
|
648 |
+
var dateElement = '.b2s-post-item-details-release-input-date[data-network-auth-id="' + dataNetworkAuthId + '"]';
|
649 |
+
var timeElement = '.b2s-post-item-details-release-input-time[data-network-auth-id="' + dataNetworkAuthId + '"]';
|
650 |
+
var dateStr = jQuery(dateElement).val();
|
651 |
+
var minStr = jQuery(timeElement).val();
|
652 |
+
var timeZone = parseInt(jQuery('#user_timezone').val()) * (-1);
|
653 |
+
if (jQuery('#b2sUserLang').val() == 'de') {
|
654 |
+
dateStr = dateStr.substring(6, 10) + '-' + dateStr.substring(3, 5) + '-' + dateStr.substring(0, 2);
|
655 |
+
} else {
|
656 |
+
var minParts = minStr.split(' ');
|
657 |
+
var minParts2 = minParts[0].split(':');
|
658 |
+
if (minParts[1] == 'PM') {
|
659 |
+
minParts2[0] = parseInt(minParts2[0]) + 12;
|
660 |
+
}
|
661 |
+
minStr = minParts2[0] + ':' + minParts2[1];
|
662 |
+
}
|
663 |
+
|
664 |
+
var minParts3 = minStr.split(':');
|
665 |
+
if (minParts3[0] < 10) {
|
666 |
+
minParts3[0] = '0' + minParts3[0];
|
667 |
+
}
|
668 |
+
var dateParts = dateStr.split('-');
|
669 |
+
//utc current time
|
670 |
+
var now = new Date();
|
671 |
+
//offset between utc und user
|
672 |
+
var offset = (parseInt(now.getTimezoneOffset()) / 60) * (-1);
|
673 |
+
//enter hour to user time
|
674 |
+
var hour = parseInt(minParts3[0]) + timeZone + offset;
|
675 |
+
//calculate datetime in utc
|
676 |
+
var enter = new Date(dateParts[0], dateParts[1] - 1, dateParts[2], hour, minParts3[1]);
|
677 |
+
//compare enter date time with allowed user time
|
678 |
+
if (enter.getTime() < now.getTime()) {
|
679 |
+
//enter set on next 15 minutes and calculate on user timezone
|
680 |
+
enter.setTime(now.getTime() + (900000 - (now.getTime() % 900000)) - (3600000 * (timeZone + offset)));
|
681 |
+
jQuery(dateElement).datepicker('update', enter);
|
682 |
+
jQuery(timeElement).timepicker('setTime', enter);
|
683 |
+
}
|
684 |
+
}
|
685 |
+
|
686 |
+
|
687 |
+
function printDateFormat(dataNetworkAuthId) {
|
688 |
+
var dateElement = '.b2s-post-item-details-release-input-date[data-network-auth-id="' + dataNetworkAuthId + '"]';
|
689 |
+
var dateStr = jQuery(dateElement).val();
|
690 |
+
dateStr = dateStr.substring(8, 10) + '.' + dateStr.substring(5, 7) + '.' + dateStr.substring(0, 4);
|
691 |
+
jQuery(dateElement).val(dateStr);
|
692 |
+
}
|
693 |
+
|
assets/js/b2s/curation.draft.js
CHANGED
@@ -84,6 +84,57 @@ function b2sSortFormSubmit() {
|
|
84 |
});
|
85 |
}
|
86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
jQuery(document).on('click', '#b2s-sort-reset-btn', function () {
|
88 |
jQuery('#b2sPagination').val("1");
|
89 |
jQuery('#b2sSortPostTitle').val("");
|
84 |
});
|
85 |
}
|
86 |
|
87 |
+
jQuery(document).on('click', '.deleteCcDraftBtn', function () {
|
88 |
+
jQuery('#b2s-delete-confirm-post-id').val(jQuery(this).attr('data-blog-post-id'));
|
89 |
+
jQuery('.b2s-delete-cc-draft-modal').modal('show');
|
90 |
+
jQuery('.b2s-delete-cc-draft-confirm-btn').prop('disabeld', false);
|
91 |
+
|
92 |
+
});
|
93 |
+
|
94 |
+
jQuery(document).on('click', '.b2s-delete-cc-draft-confirm-btn', function () {
|
95 |
+
jQuery('.b2s-post-remove-fail').hide();
|
96 |
+
jQuery('.b2s-post-remove-success').hide();
|
97 |
+
jQuery('.b2s-delete-cc-draft-confirm-btn').prop('disabeld', true);
|
98 |
+
jQuery('.b2s-server-connection-fail').hide();
|
99 |
+
jQuery.ajax({
|
100 |
+
url: ajaxurl,
|
101 |
+
type: "POST",
|
102 |
+
dataType: "json",
|
103 |
+
cache: false,
|
104 |
+
data: {
|
105 |
+
'action': 'b2s_delete_user_cc_draft_post',
|
106 |
+
'postId': jQuery('#b2s-delete-confirm-post-id').val()
|
107 |
+
},
|
108 |
+
error: function () {
|
109 |
+
jQuery('.b2s-server-connection-fail').show();
|
110 |
+
return false;
|
111 |
+
},
|
112 |
+
success: function (data) {
|
113 |
+
jQuery('.b2s-delete-cc-draft-modal').modal('hide');
|
114 |
+
if (data.result == true) {
|
115 |
+
jQuery('.b2s-list-cc-draft[data-blog-post-id="'+data.postId+'"').remove();
|
116 |
+
/*var count = parseInt(jQuery('.b2s-approve-count[data-post-id="' + data.blogPostId + '"]').html());
|
117 |
+
var newCount = count - data.postCount;
|
118 |
+
jQuery('.b2s-approve-count[data-post-id="' + data.blogPostId + '"]').html(newCount);
|
119 |
+
if (newCount >= 1) {
|
120 |
+
jQuery.each(data.postId, function (i, id) {
|
121 |
+
jQuery('.b2s-post-approve-area-li[data-post-id="' + id + '"]').remove();
|
122 |
+
});
|
123 |
+
} else {
|
124 |
+
jQuery('.b2s-post-approve-area-li[data-post-id="' + data.postId[0] + '"]').closest('ul').closest('li').remove();
|
125 |
+
}*/
|
126 |
+
jQuery('.b2s-post-remove-success').show();
|
127 |
+
} else {
|
128 |
+
jQuery('.b2s-post-remove-fail').show();
|
129 |
+
}
|
130 |
+
|
131 |
+
return true;
|
132 |
+
}
|
133 |
+
});
|
134 |
+
});
|
135 |
+
|
136 |
+
|
137 |
+
|
138 |
jQuery(document).on('click', '#b2s-sort-reset-btn', function () {
|
139 |
jQuery('#b2sPagination').val("1");
|
140 |
jQuery('#b2sSortPostTitle').val("");
|
assets/js/b2s/general.js
CHANGED
@@ -319,3 +319,6 @@ jQuery(document).on("click", ".b2s-scroll-modal-down", function (e) {
|
|
319 |
return false;
|
320 |
});
|
321 |
|
|
|
|
|
|
319 |
return false;
|
320 |
});
|
321 |
|
322 |
+
jQuery(document).on('click', '.b2s-network-auth-info-close', function() {
|
323 |
+
jQuery(this).closest('.b2s-network-auth-info').hide();
|
324 |
+
});
|
assets/js/b2s/network.js
CHANGED
@@ -1025,6 +1025,7 @@ jQuery(window).on("load", function () {
|
|
1025 |
var newText = text.slice(0, start) + jQuery(this).html() + text.slice(end);
|
1026 |
jQuery('.b2s-edit-template-post-content[data-network-type="' + networkType + '"]').val(newText);
|
1027 |
jQuery('.b2s-edit-template-post-content').focus();
|
|
|
1028 |
event.preventDefault();
|
1029 |
return false;
|
1030 |
});
|
@@ -1033,6 +1034,7 @@ jQuery(window).on("load", function () {
|
|
1033 |
var networkType = jQuery(this).attr('data-network-type');
|
1034 |
jQuery('.b2s-edit-template-post-content[data-network-type="' + networkType + '"]').val("");
|
1035 |
jQuery('.b2s-edit-template-post-content').focus();
|
|
|
1036 |
event.preventDefault();
|
1037 |
return false;
|
1038 |
});
|
1025 |
var newText = text.slice(0, start) + jQuery(this).html() + text.slice(end);
|
1026 |
jQuery('.b2s-edit-template-post-content[data-network-type="' + networkType + '"]').val(newText);
|
1027 |
jQuery('.b2s-edit-template-post-content').focus();
|
1028 |
+
jQuery('.b2s-edit-template-post-content').trigger('keyup');
|
1029 |
event.preventDefault();
|
1030 |
return false;
|
1031 |
});
|
1034 |
var networkType = jQuery(this).attr('data-network-type');
|
1035 |
jQuery('.b2s-edit-template-post-content[data-network-type="' + networkType + '"]').val("");
|
1036 |
jQuery('.b2s-edit-template-post-content').focus();
|
1037 |
+
jQuery('.b2s-edit-template-post-content').trigger('keyup');
|
1038 |
event.preventDefault();
|
1039 |
return false;
|
1040 |
});
|
assets/js/b2s/post.js
CHANGED
@@ -1,888 +1,958 @@
|
|
1 |
-
jQuery.noConflict();
|
2 |
-
|
3 |
-
if (typeof wp.heartbeat !== "undefined") {
|
4 |
-
jQuery(document).on('heartbeat-send', function (e, data) {
|
5 |
-
data['b2s_heartbeat'] = 'b2s_listener';
|
6 |
-
});
|
7 |
-
wp.heartbeat.connectNow();
|
8 |
-
}
|
9 |
-
jQuery(window).on("load", function () {
|
10 |
-
jQuery('#b2sPagination').val("1");
|
11 |
-
b2sSortFormSubmit();
|
12 |
-
|
13 |
-
/*if (jQuery('#b2sType').val() != "sched") {
|
14 |
-
jQuery('.b2s-sched-calendar-btn').hide();
|
15 |
-
}*/
|
16 |
-
jQuery('#b2s-sched-calendar-area').hide();
|
17 |
-
|
18 |
-
});
|
19 |
-
|
20 |
-
|
21 |
-
function wopApprove(blogPostId, postId, url, name) {
|
22 |
-
var location = encodeURI(window.location.protocol + '//' + window.location.hostname);
|
23 |
-
var win = window.open(url + '&location=' + location, name, "width=650,height=900,scrollbars=yes,toolbar=no,status=no,resizable=no,menubar=no,location=no,directories=no,top=20,left=20");
|
24 |
-
if (postId > 0) {
|
25 |
-
function checkIfWinClosed(intervalID) {
|
26 |
-
if (win.closed) {
|
27 |
-
clearInterval(intervalID);
|
28 |
-
//Show Modal
|
29 |
-
jQuery('.b2s-publish-approve-modal').modal('show');
|
30 |
-
jQuery('#b2s-approve-post-id').val(postId);
|
31 |
-
jQuery('#b2s-approve-blog-post-id').val(blogPostId);
|
32 |
-
}
|
33 |
-
}
|
34 |
-
var interval = setInterval(function () {
|
35 |
-
checkIfWinClosed(interval);
|
36 |
-
}, 500);
|
37 |
-
}
|
38 |
-
}
|
39 |
-
|
40 |
-
|
41 |
-
jQuery(document).on('click', '.b2s-sched-calendar-btn', function () {
|
42 |
-
if (jQuery('#b2s-sched-calendar-area').is(":visible")) {
|
43 |
-
jQuery('#b2s-sched-calendar-btn-text').text(jQuery(this).attr('data-show-calendar-btn-title'));
|
44 |
-
jQuery('#b2s-sched-calendar-area').hide();
|
45 |
-
} else {
|
46 |
-
jQuery('#b2s-sched-calendar-btn-text').text(jQuery(this).attr('data-hide-calendar-btn-title'));
|
47 |
-
jQuery('#b2s-sched-calendar-area').show();
|
48 |
-
}
|
49 |
-
});
|
50 |
-
|
51 |
-
//Overlay second modal
|
52 |
-
jQuery('#b2s-network-select-image').on('hidden.bs.modal', function () {
|
53 |
-
jQuery('body').addClass('modal-open');
|
54 |
-
});
|
55 |
-
//Overlay second modal
|
56 |
-
jQuery('#b2s-post-ship-item-post-format-modal').on('hidden.bs.modal', function () {
|
57 |
-
jQuery('body').addClass('modal-open');
|
58 |
-
});
|
59 |
-
jQuery('#b2s-info-change-meta-tag-modal').on('hidden.bs.modal', function () {
|
60 |
-
jQuery('body').addClass('modal-open');
|
61 |
-
});
|
62 |
-
|
63 |
-
|
64 |
-
jQuery(document).on('click', '.b2sDetailsPublishPostBtn', function () {
|
65 |
-
var postId = jQuery(this).attr('data-post-id');
|
66 |
-
var showByDate = jQuery(this).attr('data-search-date');
|
67 |
-
if (!jQuery(this).find('i').hasClass('isload')) {
|
68 |
-
jQuery('.b2s-server-connection-fail').hide();
|
69 |
-
jQuery.ajax({
|
70 |
-
url: ajaxurl,
|
71 |
-
type: "POST",
|
72 |
-
dataType: "json",
|
73 |
-
cache: false,
|
74 |
-
data: {
|
75 |
-
'action': 'b2s_publish_post_data',
|
76 |
-
'postId': postId,
|
77 |
-
'type': jQuery('#b2sType').val(),
|
78 |
-
'showByDate': showByDate
|
79 |
-
},
|
80 |
-
error: function () {
|
81 |
-
jQuery('.b2s-server-connection-fail').show();
|
82 |
-
return false;
|
83 |
-
},
|
84 |
-
success: function (data) {
|
85 |
-
if (data.result == true) {
|
86 |
-
jQuery('.b2s-post-publish-area[data-post-id="' + data.postId + '"]').html(data.content);
|
87 |
-
}
|
88 |
-
wp.heartbeat.connectNow();
|
89 |
-
}
|
90 |
-
});
|
91 |
-
jQuery(this).find('i').removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-up').addClass('isload').addClass('isShow');
|
92 |
-
} else {
|
93 |
-
if (jQuery(this).find('i').hasClass('isShow')) {
|
94 |
-
jQuery('.b2s-post-publish-area[data-post-id="' + postId + '"]').hide();
|
95 |
-
jQuery(this).find('i').removeClass('isShow').addClass('isHide').removeClass('glyphicon-chevron-up').addClass('glyphicon-chevron-down');
|
96 |
-
} else {
|
97 |
-
jQuery('.b2s-post-publish-area[data-post-id="' + postId + '"]').show();
|
98 |
-
jQuery(this).find('i').removeClass('isHide').addClass('isShow').removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-up');
|
99 |
-
}
|
100 |
-
}
|
101 |
-
});
|
102 |
-
|
103 |
-
jQuery(document).on('click', '.b2sDetailsApprovePostBtn', function () {
|
104 |
-
var postId = jQuery(this).attr('data-post-id');
|
105 |
-
var showByDate = jQuery(this).attr('data-search-date');
|
106 |
-
if (!jQuery(this).find('i').hasClass('isload')) {
|
107 |
-
jQuery('.b2s-server-connection-fail').hide();
|
108 |
-
jQuery.ajax({
|
109 |
-
url: ajaxurl,
|
110 |
-
type: "POST",
|
111 |
-
dataType: "json",
|
112 |
-
cache: false,
|
113 |
-
data: {
|
114 |
-
'action': 'b2s_approve_post_data',
|
115 |
-
'postId': postId,
|
116 |
-
'showByDate': showByDate
|
117 |
-
},
|
118 |
-
error: function () {
|
119 |
-
jQuery('.b2s-server-connection-fail').show();
|
120 |
-
return false;
|
121 |
-
},
|
122 |
-
success: function (data) {
|
123 |
-
if (data.result == true) {
|
124 |
-
jQuery('.b2s-post-approve-area[data-post-id="' + data.postId + '"]').html(data.content);
|
125 |
-
}
|
126 |
-
}
|
127 |
-
});
|
128 |
-
jQuery(this).find('i').removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-up').addClass('isload').addClass('isShow');
|
129 |
-
} else {
|
130 |
-
if (jQuery(this).find('i').hasClass('isShow')) {
|
131 |
-
jQuery('.b2s-post-approve-area[data-post-id="' + postId + '"]').hide();
|
132 |
-
jQuery(this).find('i').removeClass('isShow').addClass('isHide').removeClass('glyphicon-chevron-up').addClass('glyphicon-chevron-down');
|
133 |
-
} else {
|
134 |
-
jQuery('.b2s-post-approve-area[data-post-id="' + postId + '"]').show();
|
135 |
-
jQuery(this).find('i').removeClass('isHide').addClass('isShow').removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-up');
|
136 |
-
}
|
137 |
-
}
|
138 |
-
});
|
139 |
-
|
140 |
-
|
141 |
-
jQuery(document).on('click', '#b2s-sort-submit-btn', function () {
|
142 |
-
jQuery('#b2sPagination').val("1");
|
143 |
-
b2sSortFormSubmit();
|
144 |
-
return false;
|
145 |
-
});
|
146 |
-
|
147 |
-
|
148 |
-
jQuery(document).on('keypress', '#b2sSortPostTitle', function (event) {
|
149 |
-
if (event.keyCode == 13) { //Hide Enter
|
150 |
-
return false;
|
151 |
-
}
|
152 |
-
});
|
153 |
-
|
154 |
-
jQuery(document).on('click', '.b2s-pagination-btn', function () {
|
155 |
-
jQuery('#b2sPagination').val(jQuery(this).attr('data-page'));
|
156 |
-
b2sSortFormSubmit();
|
157 |
-
return false;
|
158 |
-
});
|
159 |
-
|
160 |
-
jQuery(document).on('change', '.b2s-select', function () {
|
161 |
-
jQuery('#b2sPagination').val("1");
|
162 |
-
b2sSortFormSubmit();
|
163 |
-
return false;
|
164 |
-
});
|
165 |
-
|
166 |
-
jQuery(document).on('click', '#b2s-sort-reset-btn', function () {
|
167 |
-
jQuery('#b2sPagination').val("1");
|
168 |
-
jQuery('#b2sSortPostTitle').val("");
|
169 |
-
jQuery('#b2sSortPostAuthor').prop('selectedIndex', 0);
|
170 |
-
jQuery('#b2sSortPostCat').prop('selectedIndex', 0);
|
171 |
-
jQuery('#b2sSortPostType').prop('selectedIndex', 0);
|
172 |
-
jQuery('#b2sSortPostSchedDate').prop('selectedIndex', 0);
|
173 |
-
jQuery('#b2sShowByDate').val("");
|
174 |
-
jQuery('#b2sUserAuthId').val("");
|
175 |
-
jQuery('#b2sPostBlogId').val("");
|
176 |
-
jQuery('#b2sShowByNetwork').val("0");
|
177 |
-
jQuery('#b2sSortPostStatus').prop('selectedIndex', 0);
|
178 |
-
jQuery('#b2sSortPostShareStatus').prop('selectedIndex', 0);
|
179 |
-
jQuery('#b2sSortPostPublishDate').prop('selectedIndex', 0);
|
180 |
-
b2sSortFormSubmit();
|
181 |
-
return false;
|
182 |
-
});
|
183 |
-
|
184 |
-
|
185 |
-
function b2sSortFormSubmit(sched_dates) {
|
186 |
-
jQuery('.b2s-server-connection-fail').hide();
|
187 |
-
jQuery('.b2s-loading-area').show();
|
188 |
-
jQuery('.b2s-sort-result-area').hide();
|
189 |
-
jQuery('.b2s-sort-result-item-area').html("").hide();
|
190 |
-
jQuery('.b2s-sort-pagination-area').html("").hide();
|
191 |
-
|
192 |
-
var currentType = jQuery('#b2sType').val();
|
193 |
-
if (currentType != "undefined") {
|
194 |
-
jQuery('.b2s-post-btn').removeClass('btn-primary').addClass('btn-link');
|
195 |
-
jQuery('.b2s-post-' + currentType).removeClass('btn-link').addClass('btn-primary');
|
196 |
-
}
|
197 |
-
|
198 |
-
var data = {
|
199 |
-
'action': 'b2s_sort_data',
|
200 |
-
'b2sSortPostTitle': jQuery('#b2sSortPostTitle').val(),
|
201 |
-
'b2sSortPostAuthor': jQuery('#b2sSortPostAuthor').val(),
|
202 |
-
'b2sSortPostCat': jQuery('#b2sSortPostCat').val(),
|
203 |
-
'b2sSortPostType': jQuery('#b2sSortPostType').val(),
|
204 |
-
'b2sSortPostSchedDate': jQuery('#b2sSortPostSchedDate').val(),
|
205 |
-
'b2sUserAuthId': jQuery('#b2sUserAuthId').val(),
|
206 |
-
'b2sPostBlogId': jQuery('#b2sPostBlogId').val(),
|
207 |
-
'b2sType': jQuery('#b2sType').val(),
|
208 |
-
'b2sShowByDate': jQuery('#b2sShowByDate').val(),
|
209 |
-
'b2sShowByNetwork': jQuery('#b2sShowByNetwork').val(),
|
210 |
-
'b2sPagination': jQuery('#b2sPagination').val(),
|
211 |
-
'b2sShowPagination': jQuery('#b2sShowPagination').length > 0 ? jQuery('#b2sShowPagination').val() : 1,
|
212 |
-
'b2sSortPostStatus': jQuery('#b2sSortPostStatus').val(),
|
213 |
-
'b2sSortPostShareStatus': jQuery('#b2sSortPostShareStatus').val(),
|
214 |
-
'b2sSortPostPublishDate': jQuery('#b2sSortPostPublishDate').val(),
|
215 |
-
'b2sUserLang': jQuery('#b2sUserLang').val()
|
216 |
-
};
|
217 |
-
|
218 |
-
if (jQuery('#b2sPostsPerPage').length > 0) {
|
219 |
-
data['b2sPostsPerPage'] = jQuery('#b2sPostsPerPage').val();
|
220 |
-
}
|
221 |
-
|
222 |
-
var legacyMode = true;
|
223 |
-
if (jQuery('#isLegacyMode').val() !== undefined) {
|
224 |
-
if (jQuery('#isLegacyMode').val() == "1") {
|
225 |
-
legacyMode = false; // loading is sync (stack)
|
226 |
-
}
|
227 |
-
}
|
228 |
-
|
229 |
-
|
230 |
-
jQuery.ajax({
|
231 |
-
url: ajaxurl,
|
232 |
-
type: "POST",
|
233 |
-
dataType: "json",
|
234 |
-
async: legacyMode,
|
235 |
-
cache: false,
|
236 |
-
data: data,
|
237 |
-
error: function () {
|
238 |
-
jQuery('.b2s-server-connection-fail').show();
|
239 |
-
return false;
|
240 |
-
},
|
241 |
-
success: function (data) {
|
242 |
-
if (typeof data === 'undefined' || data === null) {
|
243 |
-
jQuery('.b2s-server-connection-fail').show();
|
244 |
-
return false;
|
245 |
-
}
|
246 |
-
if (data.result == true) {
|
247 |
-
jQuery('.b2s-loading-area').hide();
|
248 |
-
jQuery('.b2s-sort-result-area').show();
|
249 |
-
jQuery('.b2s-sort-result-item-area').html(data.content).show();
|
250 |
-
jQuery('.b2s-sort-pagination-area').html(data.pagination).show();
|
251 |
-
|
252 |
-
//extern - Routing from dashboard
|
253 |
-
if (jQuery('#b2sPostBlogId').val() !== undefined) {
|
254 |
-
if (jQuery('#b2sPostBlogId').val() != "") {
|
255 |
-
jQuery('.b2sDetailsSchedPostBtn[data-post-id="' + jQuery('#b2sPostBlogId').val() + '"]').trigger('click');
|
256 |
-
}
|
257 |
-
}
|
258 |
-
} else {
|
259 |
-
jQuery('.b2s-server-connection-fail').show();
|
260 |
-
return false;
|
261 |
-
}
|
262 |
-
}
|
263 |
-
});
|
264 |
-
}
|
265 |
-
|
266 |
-
jQuery(document).on('click', '.b2sDetailsSchedPostBtn', function () {
|
267 |
-
var postId = jQuery(this).attr('data-post-id');
|
268 |
-
var showByDate = jQuery(this).attr('data-search-date');
|
269 |
-
var showByNetwork = jQuery(this).attr('data-search-network');
|
270 |
-
var userAuthId = jQuery('#b2sUserAuthId').val();
|
271 |
-
if (!jQuery(this).find('i').hasClass('isload')) {
|
272 |
-
jQuery('.b2s-server-connection-fail').hide();
|
273 |
-
jQuery.ajax({
|
274 |
-
url: ajaxurl,
|
275 |
-
type: "POST",
|
276 |
-
dataType: "json",
|
277 |
-
cache: false,
|
278 |
-
data: {
|
279 |
-
'action': 'b2s_sched_post_data',
|
280 |
-
'postId': postId,
|
281 |
-
'showByDate': showByDate,
|
282 |
-
'showByNetwork': showByNetwork,
|
283 |
-
'userAuthId': userAuthId
|
284 |
-
},
|
285 |
-
error: function () {
|
286 |
-
jQuery('.b2s-server-connection-fail').show();
|
287 |
-
return false;
|
288 |
-
},
|
289 |
-
success: function (data) {
|
290 |
-
if (data.result == true) {
|
291 |
-
jQuery('.b2s-post-sched-area[data-post-id="' + data.postId + '"]').html(data.content);
|
292 |
-
}
|
293 |
-
}
|
294 |
-
});
|
295 |
-
jQuery(this).find('i').removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-up').addClass('isload').addClass('isShow');
|
296 |
-
} else {
|
297 |
-
if (jQuery(this).find('i').hasClass('isShow')) {
|
298 |
-
jQuery('.b2s-post-sched-area[data-post-id="' + postId + '"]').hide();
|
299 |
-
jQuery(this).find('i').removeClass('isShow').addClass('isHide').removeClass('glyphicon-chevron-up').addClass('glyphicon-chevron-down');
|
300 |
-
} else {
|
301 |
-
jQuery('.b2s-post-sched-area[data-post-id="' + postId + '"]').show();
|
302 |
-
jQuery(this).find('i').removeClass('isHide').addClass('isShow').removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-up');
|
303 |
-
}
|
304 |
-
}
|
305 |
-
|
306 |
-
});
|
307 |
-
jQuery(document).on('click', '.b2sDetailsPublishPostTriggerLink', function () {
|
308 |
-
jQuery(this).parent().prev().find('button').trigger('click');
|
309 |
-
return false;
|
310 |
-
});
|
311 |
-
|
312 |
-
jQuery(document).on('click', '.b2sDetailsApprovePostTriggerLink', function () {
|
313 |
-
jQuery(this).parent().prev().find('button').trigger('click');
|
314 |
-
return false;
|
315 |
-
});
|
316 |
-
|
317 |
-
jQuery(document).on('click', '.b2sDetailsSchedPostTriggerLink', function () {
|
318 |
-
if (jQuery('#b2s-redirect-url-sched-post').val() == undefined || jQuery('#b2s-redirect-url-sched-post').val() === null) {
|
319 |
-
//self page blog2social-sched
|
320 |
-
jQuery(this).parent().prev().find('button').trigger('click');
|
321 |
-
} else {
|
322 |
-
//extern - routing from dashboard
|
323 |
-
if (jQuery(this).children('span').attr('data-post-id').length > 0) {
|
324 |
-
window.location.href = jQuery('#b2s-redirect-url-sched-post').val() + "&b2sPostBlogId=" + jQuery(this).children('span').attr('data-post-id');
|
325 |
-
}
|
326 |
-
}
|
327 |
-
return false;
|
328 |
-
});
|
329 |
-
jQuery(document).on('click', '.checkbox-all', function () {
|
330 |
-
if (jQuery('.checkbox-all').is(":checked")) {
|
331 |
-
jQuery('.checkboxes[data-blog-post-id="' + jQuery(this).attr('data-blog-post-id') + '"]').prop("checked", true);
|
332 |
-
} else {
|
333 |
-
jQuery('.checkboxes[data-blog-post-id="' + jQuery('.checkbox-all').attr('data-blog-post-id') + '"]').prop("checked", false);
|
334 |
-
}
|
335 |
-
});
|
336 |
-
jQuery(document).on('click', '.checkbox-post-sched-all-btn', function () {
|
337 |
-
var checkboxes = jQuery('.checkboxes[data-blog-post-id="' + jQuery(this).attr('data-blog-post-id') + '"]:checked');
|
338 |
-
if (checkboxes.length > 0) {
|
339 |
-
var items = [];
|
340 |
-
jQuery(checkboxes).each(function (i, selected) {
|
341 |
-
items[i] = jQuery(selected).val();
|
342 |
-
});
|
343 |
-
jQuery('#b2s-delete-confirm-post-id').val(items.join());
|
344 |
-
jQuery('#b2s-delete-confirm-post-count').html(items.length);
|
345 |
-
jQuery('.b2s-delete-sched-modal').modal('show');
|
346 |
-
jQuery('.b2s-sched-delete-confirm-btn').prop('disabeld', false);
|
347 |
-
}
|
348 |
-
});
|
349 |
-
jQuery(document).on('click', '.b2s-post-sched-area-drop-btn', function () {
|
350 |
-
jQuery('#b2s-delete-confirm-post-id').val(jQuery(this).attr('data-post-id'));
|
351 |
-
jQuery('#b2s-delete-confirm-post-count').html('1');
|
352 |
-
jQuery('.b2s-delete-sched-modal').modal('show');
|
353 |
-
jQuery('.b2s-sched-delete-confirm-btn').prop('disabeld', false);
|
354 |
-
});
|
355 |
-
jQuery(document).on('click', '.b2s-sched-delete-confirm-btn', function () {
|
356 |
-
jQuery('.b2s-post-remove-fail').hide();
|
357 |
-
jQuery('.b2s-post-remove-success').hide();
|
358 |
-
jQuery('.b2s-sched-delete-confirm-btn').prop('disabeld', true);
|
359 |
-
jQuery('.b2s-server-connection-fail').hide();
|
360 |
-
jQuery.ajax({
|
361 |
-
url: ajaxurl,
|
362 |
-
type: "POST",
|
363 |
-
dataType: "json",
|
364 |
-
cache: false,
|
365 |
-
data: {
|
366 |
-
'action': 'b2s_delete_user_sched_post',
|
367 |
-
'postId': jQuery('#b2s-delete-confirm-post-id').val()
|
368 |
-
},
|
369 |
-
error: function () {
|
370 |
-
jQuery('.b2s-server-connection-fail').show();
|
371 |
-
return false;
|
372 |
-
},
|
373 |
-
success: function (data) {
|
374 |
-
jQuery('.b2s-delete-sched-modal').modal('hide');
|
375 |
-
if (data.result == true) {
|
376 |
-
var count = parseInt(jQuery('.b2s-sched-count[data-post-id="' + data.blogPostId + '"]').html());
|
377 |
-
var newCount = count - data.postCount;
|
378 |
-
jQuery('.b2s-sched-count[data-post-id="' + data.blogPostId + '"]').html(newCount);
|
379 |
-
if (newCount >= 1) {
|
380 |
-
jQuery.each(data.postId, function (i, id) {
|
381 |
-
jQuery('.b2s-post-sched-area-li[data-post-id="' + id + '"]').remove();
|
382 |
-
});
|
383 |
-
} else {
|
384 |
-
jQuery('.b2s-post-sched-area-li[data-post-id="' + data.postId[0] + '"]').closest('ul').closest('li').remove();
|
385 |
-
}
|
386 |
-
jQuery('.b2s-post-remove-success').show();
|
387 |
-
} else {
|
388 |
-
jQuery('.b2s-post-remove-fail').show();
|
389 |
-
}
|
390 |
-
wp.heartbeat.connectNow();
|
391 |
-
return true;
|
392 |
-
}
|
393 |
-
});
|
394 |
-
});
|
395 |
-
|
396 |
-
jQuery(document).on('click', '.checkbox-post-publish-all-btn', function () {
|
397 |
-
var checkboxes = jQuery('.checkboxes[data-blog-post-id="' + jQuery(this).attr('data-blog-post-id') + '"]:checked');
|
398 |
-
if (checkboxes.length > 0) {
|
399 |
-
var items = [];
|
400 |
-
jQuery(checkboxes).each(function (i, selected) {
|
401 |
-
items[i] = jQuery(selected).val();
|
402 |
-
});
|
403 |
-
jQuery('#b2s-delete-confirm-post-id').val(items.join());
|
404 |
-
jQuery('#b2s-delete-confirm-post-count').html(items.length);
|
405 |
-
jQuery('.b2s-delete-publish-modal').modal('show');
|
406 |
-
jQuery('.b2s-publish-delete-confirm-btn').prop('disabeld', false);
|
407 |
-
}
|
408 |
-
});
|
409 |
-
|
410 |
-
|
411 |
-
jQuery(document).on('click', '.checkbox-post-approve-all-btn', function () {
|
412 |
-
var checkboxes = jQuery('.checkboxes[data-blog-post-id="' + jQuery(this).attr('data-blog-post-id') + '"]:checked');
|
413 |
-
if (checkboxes.length > 0) {
|
414 |
-
var items = [];
|
415 |
-
jQuery(checkboxes).each(function (i, selected) {
|
416 |
-
items[i] = jQuery(selected).val();
|
417 |
-
});
|
418 |
-
jQuery('#b2s-delete-confirm-post-id').val(items.join());
|
419 |
-
jQuery('#b2s-delete-confirm-post-count').html(items.length);
|
420 |
-
jQuery('.b2s-delete-approve-modal').modal('show');
|
421 |
-
jQuery('.b2s-approve-delete-confirm-btn').prop('disabeld', false);
|
422 |
-
}
|
423 |
-
});
|
424 |
-
|
425 |
-
jQuery(document).on('click', '.b2s-approve-publish-confirm-btn', function () {
|
426 |
-
jQuery('.b2s-post-remove-fail').hide();
|
427 |
-
jQuery('.b2s-post-remove-success').hide();
|
428 |
-
jQuery('.b2s-server-connection-fail').hide();
|
429 |
-
|
430 |
-
var postId = jQuery('#b2s-approve-post-id').val();
|
431 |
-
var blogPostId = jQuery('#b2s-approve-blog-post-id').val();
|
432 |
-
if (postId > 0) {
|
433 |
-
var count = parseInt(jQuery('.b2s-approve-count[data-post-id="' + blogPostId + '"]').html());
|
434 |
-
var newCount = count - 1;
|
435 |
-
jQuery('.b2s-approve-count[data-post-id="' + blogPostId + '"]').html(newCount);
|
436 |
-
if (newCount >= 1) {
|
437 |
-
jQuery('.b2s-post-approve-area-li[data-post-id="' + postId + '"]').remove();
|
438 |
-
} else {
|
439 |
-
jQuery('.b2s-post-approve-area-li[data-post-id="' + postId + '"]').closest('ul').closest('li').remove();
|
440 |
-
}
|
441 |
-
jQuery('.b2s-publish-approve-modal').modal('hide');
|
442 |
-
jQuery.ajax({
|
443 |
-
url: ajaxurl,
|
444 |
-
type: "POST",
|
445 |
-
cache: false,
|
446 |
-
async: false,
|
447 |
-
data: {
|
448 |
-
'action': 'b2s_update_approve_post',
|
449 |
-
'post_id': postId,
|
450 |
-
'publish_link': "",
|
451 |
-
'publish_error_code': "",
|
452 |
-
},
|
453 |
-
success: function (data) {
|
454 |
-
}
|
455 |
-
});
|
456 |
-
}
|
457 |
-
});
|
458 |
-
|
459 |
-
|
460 |
-
jQuery(document).on('click', '.b2s-approve-delete-confirm-btn', function () {
|
461 |
-
jQuery('.b2s-post-remove-fail').hide();
|
462 |
-
jQuery('.b2s-post-remove-success').hide();
|
463 |
-
jQuery('.b2s-approve-delete-confirm-btn').prop('disabeld', true);
|
464 |
-
jQuery('.b2s-server-connection-fail').hide();
|
465 |
-
jQuery.ajax({
|
466 |
-
url: ajaxurl,
|
467 |
-
type: "POST",
|
468 |
-
dataType: "json",
|
469 |
-
cache: false,
|
470 |
-
data: {
|
471 |
-
'action': 'b2s_delete_user_approve_post',
|
472 |
-
'postId': jQuery('#b2s-delete-confirm-post-id').val()
|
473 |
-
},
|
474 |
-
error: function () {
|
475 |
-
jQuery('.b2s-server-connection-fail').show();
|
476 |
-
return false;
|
477 |
-
},
|
478 |
-
success: function (data) {
|
479 |
-
jQuery('.b2s-delete-approve-modal').modal('hide');
|
480 |
-
if (data.result == true) {
|
481 |
-
var count = parseInt(jQuery('.b2s-approve-count[data-post-id="' + data.blogPostId + '"]').html());
|
482 |
-
var newCount = count - data.postCount;
|
483 |
-
jQuery('.b2s-approve-count[data-post-id="' + data.blogPostId + '"]').html(newCount);
|
484 |
-
if (newCount >= 1) {
|
485 |
-
jQuery.each(data.postId, function (i, id) {
|
486 |
-
jQuery('.b2s-post-approve-area-li[data-post-id="' + id + '"]').remove();
|
487 |
-
});
|
488 |
-
} else {
|
489 |
-
jQuery('.b2s-post-approve-area-li[data-post-id="' + data.postId[0] + '"]').closest('ul').closest('li').remove();
|
490 |
-
}
|
491 |
-
jQuery('.b2s-post-remove-success').show();
|
492 |
-
} else {
|
493 |
-
jQuery('.b2s-post-remove-fail').show();
|
494 |
-
}
|
495 |
-
wp.heartbeat.connectNow();
|
496 |
-
return true;
|
497 |
-
}
|
498 |
-
});
|
499 |
-
});
|
500 |
-
|
501 |
-
//Modal Edit Post close
|
502 |
-
jQuery(document).on('click', '.b2s-modal-close-edit-post', function (e) {
|
503 |
-
jQuery(jQuery(this).attr('data-modal-name')).remove();
|
504 |
-
return false;
|
505 |
-
});
|
506 |
-
|
507 |
-
jQuery(document).on('click', '.b2s-post-approve-area-drop-btn', function () {
|
508 |
-
jQuery('#b2s-delete-confirm-post-id').val(jQuery(this).attr('data-post-id'));
|
509 |
-
jQuery('#b2s-delete-confirm-post-count').html('1');
|
510 |
-
jQuery('.b2s-delete-approve-modal').modal('show');
|
511 |
-
jQuery('.b2s-approve-delete-confirm-btn').prop('disabeld', false);
|
512 |
-
});
|
513 |
-
|
514 |
-
jQuery(document).on('click', '.b2s-post-publish-area-drop-btn', function () {
|
515 |
-
jQuery('#b2s-delete-confirm-post-id').val(jQuery(this).attr('data-post-id'));
|
516 |
-
jQuery('#b2s-delete-confirm-post-count').html('1');
|
517 |
-
jQuery('.b2s-delete-publish-modal').modal('show');
|
518 |
-
jQuery('.b2s-publish-delete-confirm-btn').prop('disabeld', false);
|
519 |
-
});
|
520 |
-
|
521 |
-
jQuery(document).on('click', '.b2s-publish-delete-confirm-btn', function () {
|
522 |
-
jQuery('.b2s-post-remove-fail').hide();
|
523 |
-
jQuery('.b2s-post-remove-success').hide();
|
524 |
-
jQuery('.b2s-publish-delete-confirm-btn').prop('disabeld', true);
|
525 |
-
jQuery('.b2s-server-connection-fail').hide();
|
526 |
-
jQuery.ajax({
|
527 |
-
url: ajaxurl,
|
528 |
-
type: "POST",
|
529 |
-
dataType: "json",
|
530 |
-
cache: false,
|
531 |
-
data: {
|
532 |
-
'action': 'b2s_delete_user_publish_post',
|
533 |
-
'postId': jQuery('#b2s-delete-confirm-post-id').val()
|
534 |
-
},
|
535 |
-
error: function () {
|
536 |
-
jQuery('.b2s-server-connection-fail').show();
|
537 |
-
return false;
|
538 |
-
},
|
539 |
-
success: function (data) {
|
540 |
-
jQuery('.b2s-delete-publish-modal').modal('hide');
|
541 |
-
if (data.result == true) {
|
542 |
-
var count = parseInt(jQuery('.b2s-publish-count[data-post-id="' + data.blogPostId + '"]').html());
|
543 |
-
var newCount = count - data.postCount;
|
544 |
-
jQuery('.b2s-publish-count[data-post-id="' + data.blogPostId + '"]').html(newCount);
|
545 |
-
if (newCount >= 1) {
|
546 |
-
jQuery.each(data.postId, function (i, id) {
|
547 |
-
jQuery('.b2s-post-publish-area-li[data-post-id="' + id + '"]').remove();
|
548 |
-
});
|
549 |
-
} else {
|
550 |
-
jQuery('.b2s-post-publish-area-li[data-post-id="' + data.postId[0] + '"]').closest('ul').closest('li').remove();
|
551 |
-
}
|
552 |
-
jQuery('.b2s-post-remove-success').show();
|
553 |
-
} else {
|
554 |
-
jQuery('.b2s-post-remove-fail').show();
|
555 |
-
}
|
556 |
-
wp.heartbeat.connectNow();
|
557 |
-
return true;
|
558 |
-
}
|
559 |
-
});
|
560 |
-
});
|
561 |
-
|
562 |
-
|
563 |
-
jQuery(document).on('click', '.b2s-post-edit-sched-btn', function () {
|
564 |
-
showEditSchedPost(jQuery(this).attr('data-b2s-id'), jQuery(this).attr('data-post-id'), jQuery(this).attr('data-network-auth-id'), jQuery(this).attr('data-network-type'), jQuery(this).attr('data-network-id'), jQuery(this).attr('data-relay-primary-post-id'));
|
565 |
-
|
566 |
-
});
|
567 |
-
|
568 |
-
//Customize
|
569 |
-
function showEditSchedPost(b2s_id, post_id, network_auth_id, network_type, network_id, relay_primary_post_id) {
|
570 |
-
if (jQuery('#b2s-edit-event-modal-' + b2s_id).length == 1)
|
571 |
-
{
|
572 |
-
jQuery('#b2s-edit-event-modal-' + b2s_id).remove();
|
573 |
-
}
|
574 |
-
jQuery("#b2sPostId").val(post_id);
|
575 |
-
var $modal = jQuery("<div>");
|
576 |
-
jQuery.ajax({
|
577 |
-
url: ajaxurl,
|
578 |
-
type: "POST",
|
579 |
-
cache: false,
|
580 |
-
async: false,
|
581 |
-
data: {
|
582 |
-
'action': 'b2s_get_post_edit_modal',
|
583 |
-
'id': b2s_id
|
584 |
-
},
|
585 |
-
success: function (data) {
|
586 |
-
$modal = $modal.html(data);
|
587 |
-
}
|
588 |
-
});
|
589 |
-
b2s_current_post_id = post_id;
|
590 |
-
jQuery("body").append($modal);
|
591 |
-
jQuery(".b2s-edit-post-delete").hide();
|
592 |
-
jQuery('#b2sUserTimeZone').val(jQuery('#user_timezone').val());
|
593 |
-
jQuery('#b2s-edit-event-modal-' + b2s_id).modal('show');
|
594 |
-
var post_format = jQuery('#b2sCurrentPostFormat').val();
|
595 |
-
activatePortal(network_auth_id);
|
596 |
-
initSceditor(network_auth_id);
|
597 |
-
|
598 |
-
|
599 |
-
var
|
600 |
-
var
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
jQuery('.
|
605 |
-
jQuery('.b2s-post-
|
606 |
-
|
607 |
-
|
608 |
-
jQuery('.b2s-user-network-settings-post-format[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').
|
609 |
-
|
610 |
-
|
611 |
-
jQuery('.b2s-post-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
jQuery('.b2s-post-item-details-preview-
|
625 |
-
jQuery('.b2s-post-item-details-preview-
|
626 |
-
jQuery('.b2s-post-item-details-preview-url-reload[data-network-id="' + network_id + '"]').
|
627 |
-
jQuery('.b2s-post-item-details-preview-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + network_auth_id + '"]').
|
638 |
-
jQuery('.b2s-post-item-
|
639 |
-
jQuery('.b2s-post-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
jQuery('.b2s-post-item-details-preview-
|
645 |
-
jQuery('.b2s-post-item-details-preview-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + network_auth_id + '"]').
|
651 |
-
jQuery('.b2s-post-item-
|
652 |
-
jQuery('.b2s-post-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
jQuery('.b2s-post-item-details-preview-
|
660 |
-
jQuery('.b2s-post-item-details-
|
661 |
-
jQuery('.b2s-
|
662 |
-
jQuery('.b2s-
|
663 |
-
|
664 |
-
jQuery('.b2s-
|
665 |
-
|
666 |
-
|
667 |
-
jQuery('.b2s-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
}
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
jQuery(
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
jQuery('
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
}
|
781 |
-
|
782 |
-
jQuery.
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
});
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
jQuery(
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery.noConflict();
|
2 |
+
|
3 |
+
if (typeof wp.heartbeat !== "undefined") {
|
4 |
+
jQuery(document).on('heartbeat-send', function (e, data) {
|
5 |
+
data['b2s_heartbeat'] = 'b2s_listener';
|
6 |
+
});
|
7 |
+
wp.heartbeat.connectNow();
|
8 |
+
}
|
9 |
+
jQuery(window).on("load", function () {
|
10 |
+
jQuery('#b2sPagination').val("1");
|
11 |
+
b2sSortFormSubmit();
|
12 |
+
|
13 |
+
/*if (jQuery('#b2sType').val() != "sched") {
|
14 |
+
jQuery('.b2s-sched-calendar-btn').hide();
|
15 |
+
}*/
|
16 |
+
jQuery('#b2s-sched-calendar-area').hide();
|
17 |
+
|
18 |
+
});
|
19 |
+
|
20 |
+
|
21 |
+
function wopApprove(blogPostId, postId, url, name) {
|
22 |
+
var location = encodeURI(window.location.protocol + '//' + window.location.hostname);
|
23 |
+
var win = window.open(url + '&location=' + location, name, "width=650,height=900,scrollbars=yes,toolbar=no,status=no,resizable=no,menubar=no,location=no,directories=no,top=20,left=20");
|
24 |
+
if (postId > 0) {
|
25 |
+
function checkIfWinClosed(intervalID) {
|
26 |
+
if (win.closed) {
|
27 |
+
clearInterval(intervalID);
|
28 |
+
//Show Modal
|
29 |
+
jQuery('.b2s-publish-approve-modal').modal('show');
|
30 |
+
jQuery('#b2s-approve-post-id').val(postId);
|
31 |
+
jQuery('#b2s-approve-blog-post-id').val(blogPostId);
|
32 |
+
}
|
33 |
+
}
|
34 |
+
var interval = setInterval(function () {
|
35 |
+
checkIfWinClosed(interval);
|
36 |
+
}, 500);
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
|
41 |
+
jQuery(document).on('click', '.b2s-sched-calendar-btn', function () {
|
42 |
+
if (jQuery('#b2s-sched-calendar-area').is(":visible")) {
|
43 |
+
jQuery('#b2s-sched-calendar-btn-text').text(jQuery(this).attr('data-show-calendar-btn-title'));
|
44 |
+
jQuery('#b2s-sched-calendar-area').hide();
|
45 |
+
} else {
|
46 |
+
jQuery('#b2s-sched-calendar-btn-text').text(jQuery(this).attr('data-hide-calendar-btn-title'));
|
47 |
+
jQuery('#b2s-sched-calendar-area').show();
|
48 |
+
}
|
49 |
+
});
|
50 |
+
|
51 |
+
//Overlay second modal
|
52 |
+
jQuery('#b2s-network-select-image').on('hidden.bs.modal', function () {
|
53 |
+
jQuery('body').addClass('modal-open');
|
54 |
+
});
|
55 |
+
//Overlay second modal
|
56 |
+
jQuery('#b2s-post-ship-item-post-format-modal').on('hidden.bs.modal', function () {
|
57 |
+
jQuery('body').addClass('modal-open');
|
58 |
+
});
|
59 |
+
jQuery('#b2s-info-change-meta-tag-modal').on('hidden.bs.modal', function () {
|
60 |
+
jQuery('body').addClass('modal-open');
|
61 |
+
});
|
62 |
+
|
63 |
+
|
64 |
+
jQuery(document).on('click', '.b2sDetailsPublishPostBtn', function () {
|
65 |
+
var postId = jQuery(this).attr('data-post-id');
|
66 |
+
var showByDate = jQuery(this).attr('data-search-date');
|
67 |
+
if (!jQuery(this).find('i').hasClass('isload')) {
|
68 |
+
jQuery('.b2s-server-connection-fail').hide();
|
69 |
+
jQuery.ajax({
|
70 |
+
url: ajaxurl,
|
71 |
+
type: "POST",
|
72 |
+
dataType: "json",
|
73 |
+
cache: false,
|
74 |
+
data: {
|
75 |
+
'action': 'b2s_publish_post_data',
|
76 |
+
'postId': postId,
|
77 |
+
'type': jQuery('#b2sType').val(),
|
78 |
+
'showByDate': showByDate
|
79 |
+
},
|
80 |
+
error: function () {
|
81 |
+
jQuery('.b2s-server-connection-fail').show();
|
82 |
+
return false;
|
83 |
+
},
|
84 |
+
success: function (data) {
|
85 |
+
if (data.result == true) {
|
86 |
+
jQuery('.b2s-post-publish-area[data-post-id="' + data.postId + '"]').html(data.content);
|
87 |
+
}
|
88 |
+
wp.heartbeat.connectNow();
|
89 |
+
}
|
90 |
+
});
|
91 |
+
jQuery(this).find('i').removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-up').addClass('isload').addClass('isShow');
|
92 |
+
} else {
|
93 |
+
if (jQuery(this).find('i').hasClass('isShow')) {
|
94 |
+
jQuery('.b2s-post-publish-area[data-post-id="' + postId + '"]').hide();
|
95 |
+
jQuery(this).find('i').removeClass('isShow').addClass('isHide').removeClass('glyphicon-chevron-up').addClass('glyphicon-chevron-down');
|
96 |
+
} else {
|
97 |
+
jQuery('.b2s-post-publish-area[data-post-id="' + postId + '"]').show();
|
98 |
+
jQuery(this).find('i').removeClass('isHide').addClass('isShow').removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-up');
|
99 |
+
}
|
100 |
+
}
|
101 |
+
});
|
102 |
+
|
103 |
+
jQuery(document).on('click', '.b2sDetailsApprovePostBtn', function () {
|
104 |
+
var postId = jQuery(this).attr('data-post-id');
|
105 |
+
var showByDate = jQuery(this).attr('data-search-date');
|
106 |
+
if (!jQuery(this).find('i').hasClass('isload')) {
|
107 |
+
jQuery('.b2s-server-connection-fail').hide();
|
108 |
+
jQuery.ajax({
|
109 |
+
url: ajaxurl,
|
110 |
+
type: "POST",
|
111 |
+
dataType: "json",
|
112 |
+
cache: false,
|
113 |
+
data: {
|
114 |
+
'action': 'b2s_approve_post_data',
|
115 |
+
'postId': postId,
|
116 |
+
'showByDate': showByDate
|
117 |
+
},
|
118 |
+
error: function () {
|
119 |
+
jQuery('.b2s-server-connection-fail').show();
|
120 |
+
return false;
|
121 |
+
},
|
122 |
+
success: function (data) {
|
123 |
+
if (data.result == true) {
|
124 |
+
jQuery('.b2s-post-approve-area[data-post-id="' + data.postId + '"]').html(data.content);
|
125 |
+
}
|
126 |
+
}
|
127 |
+
});
|
128 |
+
jQuery(this).find('i').removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-up').addClass('isload').addClass('isShow');
|
129 |
+
} else {
|
130 |
+
if (jQuery(this).find('i').hasClass('isShow')) {
|
131 |
+
jQuery('.b2s-post-approve-area[data-post-id="' + postId + '"]').hide();
|
132 |
+
jQuery(this).find('i').removeClass('isShow').addClass('isHide').removeClass('glyphicon-chevron-up').addClass('glyphicon-chevron-down');
|
133 |
+
} else {
|
134 |
+
jQuery('.b2s-post-approve-area[data-post-id="' + postId + '"]').show();
|
135 |
+
jQuery(this).find('i').removeClass('isHide').addClass('isShow').removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-up');
|
136 |
+
}
|
137 |
+
}
|
138 |
+
});
|
139 |
+
|
140 |
+
|
141 |
+
jQuery(document).on('click', '#b2s-sort-submit-btn', function () {
|
142 |
+
jQuery('#b2sPagination').val("1");
|
143 |
+
b2sSortFormSubmit();
|
144 |
+
return false;
|
145 |
+
});
|
146 |
+
|
147 |
+
|
148 |
+
jQuery(document).on('keypress', '#b2sSortPostTitle', function (event) {
|
149 |
+
if (event.keyCode == 13) { //Hide Enter
|
150 |
+
return false;
|
151 |
+
}
|
152 |
+
});
|
153 |
+
|
154 |
+
jQuery(document).on('click', '.b2s-pagination-btn', function () {
|
155 |
+
jQuery('#b2sPagination').val(jQuery(this).attr('data-page'));
|
156 |
+
b2sSortFormSubmit();
|
157 |
+
return false;
|
158 |
+
});
|
159 |
+
|
160 |
+
jQuery(document).on('change', '.b2s-select', function () {
|
161 |
+
jQuery('#b2sPagination').val("1");
|
162 |
+
b2sSortFormSubmit();
|
163 |
+
return false;
|
164 |
+
});
|
165 |
+
|
166 |
+
jQuery(document).on('click', '#b2s-sort-reset-btn', function () {
|
167 |
+
jQuery('#b2sPagination').val("1");
|
168 |
+
jQuery('#b2sSortPostTitle').val("");
|
169 |
+
jQuery('#b2sSortPostAuthor').prop('selectedIndex', 0);
|
170 |
+
jQuery('#b2sSortPostCat').prop('selectedIndex', 0);
|
171 |
+
jQuery('#b2sSortPostType').prop('selectedIndex', 0);
|
172 |
+
jQuery('#b2sSortPostSchedDate').prop('selectedIndex', 0);
|
173 |
+
jQuery('#b2sShowByDate').val("");
|
174 |
+
jQuery('#b2sUserAuthId').val("");
|
175 |
+
jQuery('#b2sPostBlogId').val("");
|
176 |
+
jQuery('#b2sShowByNetwork').val("0");
|
177 |
+
jQuery('#b2sSortPostStatus').prop('selectedIndex', 0);
|
178 |
+
jQuery('#b2sSortPostShareStatus').prop('selectedIndex', 0);
|
179 |
+
jQuery('#b2sSortPostPublishDate').prop('selectedIndex', 0);
|
180 |
+
b2sSortFormSubmit();
|
181 |
+
return false;
|
182 |
+
});
|
183 |
+
|
184 |
+
|
185 |
+
function b2sSortFormSubmit(sched_dates) {
|
186 |
+
jQuery('.b2s-server-connection-fail').hide();
|
187 |
+
jQuery('.b2s-loading-area').show();
|
188 |
+
jQuery('.b2s-sort-result-area').hide();
|
189 |
+
jQuery('.b2s-sort-result-item-area').html("").hide();
|
190 |
+
jQuery('.b2s-sort-pagination-area').html("").hide();
|
191 |
+
|
192 |
+
var currentType = jQuery('#b2sType').val();
|
193 |
+
if (currentType != "undefined") {
|
194 |
+
jQuery('.b2s-post-btn').removeClass('btn-primary').addClass('btn-link');
|
195 |
+
jQuery('.b2s-post-' + currentType).removeClass('btn-link').addClass('btn-primary');
|
196 |
+
}
|
197 |
+
|
198 |
+
var data = {
|
199 |
+
'action': 'b2s_sort_data',
|
200 |
+
'b2sSortPostTitle': jQuery('#b2sSortPostTitle').val(),
|
201 |
+
'b2sSortPostAuthor': jQuery('#b2sSortPostAuthor').val(),
|
202 |
+
'b2sSortPostCat': jQuery('#b2sSortPostCat').val(),
|
203 |
+
'b2sSortPostType': jQuery('#b2sSortPostType').val(),
|
204 |
+
'b2sSortPostSchedDate': jQuery('#b2sSortPostSchedDate').val(),
|
205 |
+
'b2sUserAuthId': jQuery('#b2sUserAuthId').val(),
|
206 |
+
'b2sPostBlogId': jQuery('#b2sPostBlogId').val(),
|
207 |
+
'b2sType': jQuery('#b2sType').val(),
|
208 |
+
'b2sShowByDate': jQuery('#b2sShowByDate').val(),
|
209 |
+
'b2sShowByNetwork': jQuery('#b2sShowByNetwork').val(),
|
210 |
+
'b2sPagination': jQuery('#b2sPagination').val(),
|
211 |
+
'b2sShowPagination': jQuery('#b2sShowPagination').length > 0 ? jQuery('#b2sShowPagination').val() : 1,
|
212 |
+
'b2sSortPostStatus': jQuery('#b2sSortPostStatus').val(),
|
213 |
+
'b2sSortPostShareStatus': jQuery('#b2sSortPostShareStatus').val(),
|
214 |
+
'b2sSortPostPublishDate': jQuery('#b2sSortPostPublishDate').val(),
|
215 |
+
'b2sUserLang': jQuery('#b2sUserLang').val()
|
216 |
+
};
|
217 |
+
|
218 |
+
if (jQuery('#b2sPostsPerPage').length > 0) {
|
219 |
+
data['b2sPostsPerPage'] = jQuery('#b2sPostsPerPage').val();
|
220 |
+
}
|
221 |
+
|
222 |
+
var legacyMode = true;
|
223 |
+
if (jQuery('#isLegacyMode').val() !== undefined) {
|
224 |
+
if (jQuery('#isLegacyMode').val() == "1") {
|
225 |
+
legacyMode = false; // loading is sync (stack)
|
226 |
+
}
|
227 |
+
}
|
228 |
+
|
229 |
+
|
230 |
+
jQuery.ajax({
|
231 |
+
url: ajaxurl,
|
232 |
+
type: "POST",
|
233 |
+
dataType: "json",
|
234 |
+
async: legacyMode,
|
235 |
+
cache: false,
|
236 |
+
data: data,
|
237 |
+
error: function () {
|
238 |
+
jQuery('.b2s-server-connection-fail').show();
|
239 |
+
return false;
|
240 |
+
},
|
241 |
+
success: function (data) {
|
242 |
+
if (typeof data === 'undefined' || data === null) {
|
243 |
+
jQuery('.b2s-server-connection-fail').show();
|
244 |
+
return false;
|
245 |
+
}
|
246 |
+
if (data.result == true) {
|
247 |
+
jQuery('.b2s-loading-area').hide();
|
248 |
+
jQuery('.b2s-sort-result-area').show();
|
249 |
+
jQuery('.b2s-sort-result-item-area').html(data.content).show();
|
250 |
+
jQuery('.b2s-sort-pagination-area').html(data.pagination).show();
|
251 |
+
|
252 |
+
//extern - Routing from dashboard
|
253 |
+
if (jQuery('#b2sPostBlogId').val() !== undefined) {
|
254 |
+
if (jQuery('#b2sPostBlogId').val() != "") {
|
255 |
+
jQuery('.b2sDetailsSchedPostBtn[data-post-id="' + jQuery('#b2sPostBlogId').val() + '"]').trigger('click');
|
256 |
+
}
|
257 |
+
}
|
258 |
+
} else {
|
259 |
+
jQuery('.b2s-server-connection-fail').show();
|
260 |
+
return false;
|
261 |
+
}
|
262 |
+
}
|
263 |
+
});
|
264 |
+
}
|
265 |
+
|
266 |
+
jQuery(document).on('click', '.b2sDetailsSchedPostBtn', function () {
|
267 |
+
var postId = jQuery(this).attr('data-post-id');
|
268 |
+
var showByDate = jQuery(this).attr('data-search-date');
|
269 |
+
var showByNetwork = jQuery(this).attr('data-search-network');
|
270 |
+
var userAuthId = jQuery('#b2sUserAuthId').val();
|
271 |
+
if (!jQuery(this).find('i').hasClass('isload')) {
|
272 |
+
jQuery('.b2s-server-connection-fail').hide();
|
273 |
+
jQuery.ajax({
|
274 |
+
url: ajaxurl,
|
275 |
+
type: "POST",
|
276 |
+
dataType: "json",
|
277 |
+
cache: false,
|
278 |
+
data: {
|
279 |
+
'action': 'b2s_sched_post_data',
|
280 |
+
'postId': postId,
|
281 |
+
'showByDate': showByDate,
|
282 |
+
'showByNetwork': showByNetwork,
|
283 |
+
'userAuthId': userAuthId
|
284 |
+
},
|
285 |
+
error: function () {
|
286 |
+
jQuery('.b2s-server-connection-fail').show();
|
287 |
+
return false;
|
288 |
+
},
|
289 |
+
success: function (data) {
|
290 |
+
if (data.result == true) {
|
291 |
+
jQuery('.b2s-post-sched-area[data-post-id="' + data.postId + '"]').html(data.content);
|
292 |
+
}
|
293 |
+
}
|
294 |
+
});
|
295 |
+
jQuery(this).find('i').removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-up').addClass('isload').addClass('isShow');
|
296 |
+
} else {
|
297 |
+
if (jQuery(this).find('i').hasClass('isShow')) {
|
298 |
+
jQuery('.b2s-post-sched-area[data-post-id="' + postId + '"]').hide();
|
299 |
+
jQuery(this).find('i').removeClass('isShow').addClass('isHide').removeClass('glyphicon-chevron-up').addClass('glyphicon-chevron-down');
|
300 |
+
} else {
|
301 |
+
jQuery('.b2s-post-sched-area[data-post-id="' + postId + '"]').show();
|
302 |
+
jQuery(this).find('i').removeClass('isHide').addClass('isShow').removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-up');
|
303 |
+
}
|
304 |
+
}
|
305 |
+
|
306 |
+
});
|
307 |
+
jQuery(document).on('click', '.b2sDetailsPublishPostTriggerLink', function () {
|
308 |
+
jQuery(this).parent().prev().find('button').trigger('click');
|
309 |
+
return false;
|
310 |
+
});
|
311 |
+
|
312 |
+
jQuery(document).on('click', '.b2sDetailsApprovePostTriggerLink', function () {
|
313 |
+
jQuery(this).parent().prev().find('button').trigger('click');
|
314 |
+
return false;
|
315 |
+
});
|
316 |
+
|
317 |
+
jQuery(document).on('click', '.b2sDetailsSchedPostTriggerLink', function () {
|
318 |
+
if (jQuery('#b2s-redirect-url-sched-post').val() == undefined || jQuery('#b2s-redirect-url-sched-post').val() === null) {
|
319 |
+
//self page blog2social-sched
|
320 |
+
jQuery(this).parent().prev().find('button').trigger('click');
|
321 |
+
} else {
|
322 |
+
//extern - routing from dashboard
|
323 |
+
if (jQuery(this).children('span').attr('data-post-id').length > 0) {
|
324 |
+
window.location.href = jQuery('#b2s-redirect-url-sched-post').val() + "&b2sPostBlogId=" + jQuery(this).children('span').attr('data-post-id');
|
325 |
+
}
|
326 |
+
}
|
327 |
+
return false;
|
328 |
+
});
|
329 |
+
jQuery(document).on('click', '.checkbox-all', function () {
|
330 |
+
if (jQuery('.checkbox-all').is(":checked")) {
|
331 |
+
jQuery('.checkboxes[data-blog-post-id="' + jQuery(this).attr('data-blog-post-id') + '"]').prop("checked", true);
|
332 |
+
} else {
|
333 |
+
jQuery('.checkboxes[data-blog-post-id="' + jQuery('.checkbox-all').attr('data-blog-post-id') + '"]').prop("checked", false);
|
334 |
+
}
|
335 |
+
});
|
336 |
+
jQuery(document).on('click', '.checkbox-post-sched-all-btn', function () {
|
337 |
+
var checkboxes = jQuery('.checkboxes[data-blog-post-id="' + jQuery(this).attr('data-blog-post-id') + '"]:checked');
|
338 |
+
if (checkboxes.length > 0) {
|
339 |
+
var items = [];
|
340 |
+
jQuery(checkboxes).each(function (i, selected) {
|
341 |
+
items[i] = jQuery(selected).val();
|
342 |
+
});
|
343 |
+
jQuery('#b2s-delete-confirm-post-id').val(items.join());
|
344 |
+
jQuery('#b2s-delete-confirm-post-count').html(items.length);
|
345 |
+
jQuery('.b2s-delete-sched-modal').modal('show');
|
346 |
+
jQuery('.b2s-sched-delete-confirm-btn').prop('disabeld', false);
|
347 |
+
}
|
348 |
+
});
|
349 |
+
jQuery(document).on('click', '.b2s-post-sched-area-drop-btn', function () {
|
350 |
+
jQuery('#b2s-delete-confirm-post-id').val(jQuery(this).attr('data-post-id'));
|
351 |
+
jQuery('#b2s-delete-confirm-post-count').html('1');
|
352 |
+
jQuery('.b2s-delete-sched-modal').modal('show');
|
353 |
+
jQuery('.b2s-sched-delete-confirm-btn').prop('disabeld', false);
|
354 |
+
});
|
355 |
+
jQuery(document).on('click', '.b2s-sched-delete-confirm-btn', function () {
|
356 |
+
jQuery('.b2s-post-remove-fail').hide();
|
357 |
+
jQuery('.b2s-post-remove-success').hide();
|
358 |
+
jQuery('.b2s-sched-delete-confirm-btn').prop('disabeld', true);
|
359 |
+
jQuery('.b2s-server-connection-fail').hide();
|
360 |
+
jQuery.ajax({
|
361 |
+
url: ajaxurl,
|
362 |
+
type: "POST",
|
363 |
+
dataType: "json",
|
364 |
+
cache: false,
|
365 |
+
data: {
|
366 |
+
'action': 'b2s_delete_user_sched_post',
|
367 |
+
'postId': jQuery('#b2s-delete-confirm-post-id').val()
|
368 |
+
},
|
369 |
+
error: function () {
|
370 |
+
jQuery('.b2s-server-connection-fail').show();
|
371 |
+
return false;
|
372 |
+
},
|
373 |
+
success: function (data) {
|
374 |
+
jQuery('.b2s-delete-sched-modal').modal('hide');
|
375 |
+
if (data.result == true) {
|
376 |
+
var count = parseInt(jQuery('.b2s-sched-count[data-post-id="' + data.blogPostId + '"]').html());
|
377 |
+
var newCount = count - data.postCount;
|
378 |
+
jQuery('.b2s-sched-count[data-post-id="' + data.blogPostId + '"]').html(newCount);
|
379 |
+
if (newCount >= 1) {
|
380 |
+
jQuery.each(data.postId, function (i, id) {
|
381 |
+
jQuery('.b2s-post-sched-area-li[data-post-id="' + id + '"]').remove();
|
382 |
+
});
|
383 |
+
} else {
|
384 |
+
jQuery('.b2s-post-sched-area-li[data-post-id="' + data.postId[0] + '"]').closest('ul').closest('li').remove();
|
385 |
+
}
|
386 |
+
jQuery('.b2s-post-remove-success').show();
|
387 |
+
} else {
|
388 |
+
jQuery('.b2s-post-remove-fail').show();
|
389 |
+
}
|
390 |
+
wp.heartbeat.connectNow();
|
391 |
+
return true;
|
392 |
+
}
|
393 |
+
});
|
394 |
+
});
|
395 |
+
|
396 |
+
jQuery(document).on('click', '.checkbox-post-publish-all-btn', function () {
|
397 |
+
var checkboxes = jQuery('.checkboxes[data-blog-post-id="' + jQuery(this).attr('data-blog-post-id') + '"]:checked');
|
398 |
+
if (checkboxes.length > 0) {
|
399 |
+
var items = [];
|
400 |
+
jQuery(checkboxes).each(function (i, selected) {
|
401 |
+
items[i] = jQuery(selected).val();
|
402 |
+
});
|
403 |
+
jQuery('#b2s-delete-confirm-post-id').val(items.join());
|
404 |
+
jQuery('#b2s-delete-confirm-post-count').html(items.length);
|
405 |
+
jQuery('.b2s-delete-publish-modal').modal('show');
|
406 |
+
jQuery('.b2s-publish-delete-confirm-btn').prop('disabeld', false);
|
407 |
+
}
|
408 |
+
});
|
409 |
+
|
410 |
+
|
411 |
+
jQuery(document).on('click', '.checkbox-post-approve-all-btn', function () {
|
412 |
+
var checkboxes = jQuery('.checkboxes[data-blog-post-id="' + jQuery(this).attr('data-blog-post-id') + '"]:checked');
|
413 |
+
if (checkboxes.length > 0) {
|
414 |
+
var items = [];
|
415 |
+
jQuery(checkboxes).each(function (i, selected) {
|
416 |
+
items[i] = jQuery(selected).val();
|
417 |
+
});
|
418 |
+
jQuery('#b2s-delete-confirm-post-id').val(items.join());
|
419 |
+
jQuery('#b2s-delete-confirm-post-count').html(items.length);
|
420 |
+
jQuery('.b2s-delete-approve-modal').modal('show');
|
421 |
+
jQuery('.b2s-approve-delete-confirm-btn').prop('disabeld', false);
|
422 |
+
}
|
423 |
+
});
|
424 |
+
|
425 |
+
jQuery(document).on('click', '.b2s-approve-publish-confirm-btn', function () {
|
426 |
+
jQuery('.b2s-post-remove-fail').hide();
|
427 |
+
jQuery('.b2s-post-remove-success').hide();
|
428 |
+
jQuery('.b2s-server-connection-fail').hide();
|
429 |
+
|
430 |
+
var postId = jQuery('#b2s-approve-post-id').val();
|
431 |
+
var blogPostId = jQuery('#b2s-approve-blog-post-id').val();
|
432 |
+
if (postId > 0) {
|
433 |
+
var count = parseInt(jQuery('.b2s-approve-count[data-post-id="' + blogPostId + '"]').html());
|
434 |
+
var newCount = count - 1;
|
435 |
+
jQuery('.b2s-approve-count[data-post-id="' + blogPostId + '"]').html(newCount);
|
436 |
+
if (newCount >= 1) {
|
437 |
+
jQuery('.b2s-post-approve-area-li[data-post-id="' + postId + '"]').remove();
|
438 |
+
} else {
|
439 |
+
jQuery('.b2s-post-approve-area-li[data-post-id="' + postId + '"]').closest('ul').closest('li').remove();
|
440 |
+
}
|
441 |
+
jQuery('.b2s-publish-approve-modal').modal('hide');
|
442 |
+
jQuery.ajax({
|
443 |
+
url: ajaxurl,
|
444 |
+
type: "POST",
|
445 |
+
cache: false,
|
446 |
+
async: false,
|
447 |
+
data: {
|
448 |
+
'action': 'b2s_update_approve_post',
|
449 |
+
'post_id': postId,
|
450 |
+
'publish_link': "",
|
451 |
+
'publish_error_code': "",
|
452 |
+
},
|
453 |
+
success: function (data) {
|
454 |
+
}
|
455 |
+
});
|
456 |
+
}
|
457 |
+
});
|
458 |
+
|
459 |
+
|
460 |
+
jQuery(document).on('click', '.b2s-approve-delete-confirm-btn', function () {
|
461 |
+
jQuery('.b2s-post-remove-fail').hide();
|
462 |
+
jQuery('.b2s-post-remove-success').hide();
|
463 |
+
jQuery('.b2s-approve-delete-confirm-btn').prop('disabeld', true);
|
464 |
+
jQuery('.b2s-server-connection-fail').hide();
|
465 |
+
jQuery.ajax({
|
466 |
+
url: ajaxurl,
|
467 |
+
type: "POST",
|
468 |
+
dataType: "json",
|
469 |
+
cache: false,
|
470 |
+
data: {
|
471 |
+
'action': 'b2s_delete_user_approve_post',
|
472 |
+
'postId': jQuery('#b2s-delete-confirm-post-id').val()
|
473 |
+
},
|
474 |
+
error: function () {
|
475 |
+
jQuery('.b2s-server-connection-fail').show();
|
476 |
+
return false;
|
477 |
+
},
|
478 |
+
success: function (data) {
|
479 |
+
jQuery('.b2s-delete-approve-modal').modal('hide');
|
480 |
+
if (data.result == true) {
|
481 |
+
var count = parseInt(jQuery('.b2s-approve-count[data-post-id="' + data.blogPostId + '"]').html());
|
482 |
+
var newCount = count - data.postCount;
|
483 |
+
jQuery('.b2s-approve-count[data-post-id="' + data.blogPostId + '"]').html(newCount);
|
484 |
+
if (newCount >= 1) {
|
485 |
+
jQuery.each(data.postId, function (i, id) {
|
486 |
+
jQuery('.b2s-post-approve-area-li[data-post-id="' + id + '"]').remove();
|
487 |
+
});
|
488 |
+
} else {
|
489 |
+
jQuery('.b2s-post-approve-area-li[data-post-id="' + data.postId[0] + '"]').closest('ul').closest('li').remove();
|
490 |
+
}
|
491 |
+
jQuery('.b2s-post-remove-success').show();
|
492 |
+
} else {
|
493 |
+
jQuery('.b2s-post-remove-fail').show();
|
494 |
+
}
|
495 |
+
wp.heartbeat.connectNow();
|
496 |
+
return true;
|
497 |
+
}
|
498 |
+
});
|
499 |
+
});
|
500 |
+
|
501 |
+
//Modal Edit Post close
|
502 |
+
jQuery(document).on('click', '.b2s-modal-close-edit-post', function (e) {
|
503 |
+
jQuery(jQuery(this).attr('data-modal-name')).remove();
|
504 |
+
return false;
|
505 |
+
});
|
506 |
+
|
507 |
+
jQuery(document).on('click', '.b2s-post-approve-area-drop-btn', function () {
|
508 |
+
jQuery('#b2s-delete-confirm-post-id').val(jQuery(this).attr('data-post-id'));
|
509 |
+
jQuery('#b2s-delete-confirm-post-count').html('1');
|
510 |
+
jQuery('.b2s-delete-approve-modal').modal('show');
|
511 |
+
jQuery('.b2s-approve-delete-confirm-btn').prop('disabeld', false);
|
512 |
+
});
|
513 |
+
|
514 |
+
jQuery(document).on('click', '.b2s-post-publish-area-drop-btn', function () {
|
515 |
+
jQuery('#b2s-delete-confirm-post-id').val(jQuery(this).attr('data-post-id'));
|
516 |
+
jQuery('#b2s-delete-confirm-post-count').html('1');
|
517 |
+
jQuery('.b2s-delete-publish-modal').modal('show');
|
518 |
+
jQuery('.b2s-publish-delete-confirm-btn').prop('disabeld', false);
|
519 |
+
});
|
520 |
+
|
521 |
+
jQuery(document).on('click', '.b2s-publish-delete-confirm-btn', function () {
|
522 |
+
jQuery('.b2s-post-remove-fail').hide();
|
523 |
+
jQuery('.b2s-post-remove-success').hide();
|
524 |
+
jQuery('.b2s-publish-delete-confirm-btn').prop('disabeld', true);
|
525 |
+
jQuery('.b2s-server-connection-fail').hide();
|
526 |
+
jQuery.ajax({
|
527 |
+
url: ajaxurl,
|
528 |
+
type: "POST",
|
529 |
+
dataType: "json",
|
530 |
+
cache: false,
|
531 |
+
data: {
|
532 |
+
'action': 'b2s_delete_user_publish_post',
|
533 |
+
'postId': jQuery('#b2s-delete-confirm-post-id').val()
|
534 |
+
},
|
535 |
+
error: function () {
|
536 |
+
jQuery('.b2s-server-connection-fail').show();
|
537 |
+
return false;
|
538 |
+
},
|
539 |
+
success: function (data) {
|
540 |
+
jQuery('.b2s-delete-publish-modal').modal('hide');
|
541 |
+
if (data.result == true) {
|
542 |
+
var count = parseInt(jQuery('.b2s-publish-count[data-post-id="' + data.blogPostId + '"]').html());
|
543 |
+
var newCount = count - data.postCount;
|
544 |
+
jQuery('.b2s-publish-count[data-post-id="' + data.blogPostId + '"]').html(newCount);
|
545 |
+
if (newCount >= 1) {
|
546 |
+
jQuery.each(data.postId, function (i, id) {
|
547 |
+
jQuery('.b2s-post-publish-area-li[data-post-id="' + id + '"]').remove();
|
548 |
+
});
|
549 |
+
} else {
|
550 |
+
jQuery('.b2s-post-publish-area-li[data-post-id="' + data.postId[0] + '"]').closest('ul').closest('li').remove();
|
551 |
+
}
|
552 |
+
jQuery('.b2s-post-remove-success').show();
|
553 |
+
} else {
|
554 |
+
jQuery('.b2s-post-remove-fail').show();
|
555 |
+
}
|
556 |
+
wp.heartbeat.connectNow();
|
557 |
+
return true;
|
558 |
+
}
|
559 |
+
});
|
560 |
+
});
|
561 |
+
|
562 |
+
|
563 |
+
jQuery(document).on('click', '.b2s-post-edit-sched-btn', function () {
|
564 |
+
showEditSchedPost(jQuery(this).attr('data-b2s-id'), jQuery(this).attr('data-post-id'), jQuery(this).attr('data-network-auth-id'), jQuery(this).attr('data-network-type'), jQuery(this).attr('data-network-id'), jQuery(this).attr('data-relay-primary-post-id'));
|
565 |
+
|
566 |
+
});
|
567 |
+
|
568 |
+
//Customize
|
569 |
+
function showEditSchedPost(b2s_id, post_id, network_auth_id, network_type, network_id, relay_primary_post_id) {
|
570 |
+
if (jQuery('#b2s-edit-event-modal-' + b2s_id).length == 1)
|
571 |
+
{
|
572 |
+
jQuery('#b2s-edit-event-modal-' + b2s_id).remove();
|
573 |
+
}
|
574 |
+
jQuery("#b2sPostId").val(post_id);
|
575 |
+
var $modal = jQuery("<div>");
|
576 |
+
jQuery.ajax({
|
577 |
+
url: ajaxurl,
|
578 |
+
type: "POST",
|
579 |
+
cache: false,
|
580 |
+
async: false,
|
581 |
+
data: {
|
582 |
+
'action': 'b2s_get_post_edit_modal',
|
583 |
+
'id': b2s_id
|
584 |
+
},
|
585 |
+
success: function (data) {
|
586 |
+
$modal = $modal.html(data);
|
587 |
+
}
|
588 |
+
});
|
589 |
+
b2s_current_post_id = post_id;
|
590 |
+
jQuery("body").append($modal);
|
591 |
+
jQuery(".b2s-edit-post-delete").hide();
|
592 |
+
jQuery('#b2sUserTimeZone').val(jQuery('#user_timezone').val());
|
593 |
+
jQuery('#b2s-edit-event-modal-' + b2s_id).modal('show');
|
594 |
+
var post_format = jQuery('#b2sCurrentPostFormat').val();
|
595 |
+
activatePortal(network_auth_id);
|
596 |
+
initSceditor(network_auth_id);
|
597 |
+
if (jQuery('.b2s-post-ship-item-post-format-text[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').length > 0) {
|
598 |
+
var postFormatText = b2s_post_formats;
|
599 |
+
var isSetPostFormat = false;
|
600 |
+
var postFormatType = jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').attr('data-post-format-type');
|
601 |
+
//is set post format => override current condidtions by user settings for this post
|
602 |
+
if (post_format !== null) {
|
603 |
+
jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').val(post_format);
|
604 |
+
jQuery('.b2s-post-ship-item-post-format-text[data-network-auth-id="' + network_auth_id + '"]').html(postFormatText[postFormatType][post_format]);
|
605 |
+
jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + network_auth_id + '"]').val(post_format);
|
606 |
+
//edit modal select post format
|
607 |
+
jQuery('.b2s-user-network-settings-post-format[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').removeClass('b2s-settings-checked');
|
608 |
+
jQuery('.b2s-user-network-settings-post-format[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"][data-post-format="' + post_format + '"]').addClass('b2s-settings-checked');
|
609 |
+
} else {
|
610 |
+
jQuery('.b2s-post-ship-item-post-format-text[data-network-auth-id="' + network_auth_id + '"]').html(postFormatText[postFormatType][jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').val()]);
|
611 |
+
jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + network_auth_id + '"]').val(jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').val());
|
612 |
+
}
|
613 |
+
|
614 |
+
//if linkpost then show btn meta tags
|
615 |
+
var isMetaChecked = false;
|
616 |
+
if (network_id == "1" && jQuery('#isOgMetaChecked').val() == "1") {
|
617 |
+
isMetaChecked = true;
|
618 |
+
}
|
619 |
+
if (network_id == "2" && jQuery('#isCardMetaChecked').val() == "1") {
|
620 |
+
isMetaChecked = true;
|
621 |
+
}
|
622 |
+
if (isMetaChecked && jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').val() == "0") {
|
623 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", false);
|
624 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", false);
|
625 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-id="' + network_id + '"]').show();
|
626 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-id="' + network_id + '"]').trigger("click");
|
627 |
+
var dataMetaType = jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + network_auth_id + '"]').attr("data-meta-type");
|
628 |
+
if (dataMetaType == "og") {
|
629 |
+
jQuery('.b2sChangeOgMeta[data-network-auth-id="' + network_auth_id + '"]').val("1");
|
630 |
+
} else {
|
631 |
+
jQuery('.b2sChangeCardMeta[data-network-auth-id="' + network_auth_id + '"]').val("1");
|
632 |
+
}
|
633 |
+
|
634 |
+
//Facebook TOS 072018 - Instant Sharing - Image post without Text > set to readonly
|
635 |
+
if (network_id == 1 && network_type == 0) {
|
636 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", false);
|
637 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + network_auth_id + '"]').show();
|
638 |
+
jQuery('.b2s-post-item-info-area[data-network-auth-id="' + network_auth_id + '"]').show();
|
639 |
+
jQuery('.b2s-post-approve-info[data-network-auth-id="' + network_auth_id + '"]').hide();
|
640 |
+
}
|
641 |
+
|
642 |
+
} else {
|
643 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", true);
|
644 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", true);
|
645 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-id="' + network_id + '"]').hide();
|
646 |
+
|
647 |
+
//Facebook TOS 072018 - Instant Sharing - Image post without Text > set to readonly
|
648 |
+
if (network_id == 1 && network_type == 0) {
|
649 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", true);
|
650 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + network_auth_id + '"]').hide();
|
651 |
+
jQuery('.b2s-post-item-info-area[data-network-auth-id="' + network_auth_id + '"]').hide();
|
652 |
+
jQuery('.b2s-post-approve-info[data-network-auth-id="' + network_auth_id + '"]').show();
|
653 |
+
}
|
654 |
+
}
|
655 |
+
|
656 |
+
//Content Curation
|
657 |
+
if (jQuery('.b2s-post-ship-item-post-format[data-network-auth-id="' + network_auth_id + '"]').attr('data-post-wp-type') == 'ex') {
|
658 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", true);
|
659 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", true);
|
660 |
+
jQuery('.b2s-post-item-details-item-url-input[data-network-auth-id="' + network_auth_id + '"]').prop("readonly", true);
|
661 |
+
jQuery('.b2s-load-info-meta-tag-modal[data-network-auth-id="' + network_auth_id + '"]').attr("style", "display:none !important");
|
662 |
+
if (jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + network_auth_id + '"]').val() == 0) {
|
663 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + network_auth_id + '"]').hide();
|
664 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').hide();
|
665 |
+
} else {
|
666 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + network_auth_id + '"]').show();
|
667 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').show();
|
668 |
+
}
|
669 |
+
}
|
670 |
+
|
671 |
+
if (network_id == "3") {
|
672 |
+
if (jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').val() == "0") {
|
673 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').show();
|
674 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').trigger("click");
|
675 |
+
jQuery('.linkedin-url-title[data-network-auth-id="' + network_auth_id + '"]').show();
|
676 |
+
jQuery('.linkedin-url-desc[data-network-auth-id="' + network_auth_id + '"]').hide(); //not showing on linkedin
|
677 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').hide();
|
678 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + network_auth_id + '"]').hide();
|
679 |
+
} else {
|
680 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').hide();
|
681 |
+
jQuery('.linkedin-url-title[data-network-auth-id="' + network_auth_id + '"]').hide();
|
682 |
+
jQuery('.linkedin-url-desc[data-network-auth-id="' + network_auth_id + '"]').hide();
|
683 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').show();
|
684 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + network_auth_id + '"]').show();
|
685 |
+
}
|
686 |
+
}
|
687 |
+
|
688 |
+
if (network_id == "19" && network_type == "0") {
|
689 |
+
if (jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + network_type + '"][data-network-id="' + network_id + '"]').val() == "0") {
|
690 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').show();
|
691 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').trigger("click");
|
692 |
+
jQuery('.xing-url-title[data-network-auth-id="' + network_auth_id + '"]').show();
|
693 |
+
jQuery('.xing-url-desc[data-network-auth-id="' + network_auth_id + '"]').show();
|
694 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').hide();
|
695 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + network_auth_id + '"]').hide();
|
696 |
+
} else {
|
697 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + network_auth_id + '"]').hide();
|
698 |
+
jQuery('.xing-url-title[data-network-auth-id="' + network_auth_id + '"]').hide();
|
699 |
+
jQuery('.xing-url-desc[data-network-auth-id="' + network_auth_id + '"]').hide();
|
700 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + network_auth_id + '"]').show();
|
701 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + network_auth_id + '"]').show();
|
702 |
+
}
|
703 |
+
}
|
704 |
+
|
705 |
+
}
|
706 |
+
var textLimit = jQuery('.b2s-post-item-details-item-message-input[data-network-count="-1"][data-network-auth-id="' + network_auth_id + '"]').attr('data-network-text-limit');
|
707 |
+
if (textLimit != "0") {
|
708 |
+
networkLimitAll(network_auth_id, network_id, textLimit);
|
709 |
+
} else {
|
710 |
+
networkCount(network_auth_id);
|
711 |
+
}
|
712 |
+
var today = new Date();
|
713 |
+
var dateFormat = "yyyy-mm-dd";
|
714 |
+
var language = "en";
|
715 |
+
var showMeridian = true;
|
716 |
+
if (jQuery('#b2sUserLang').val() == "de") {
|
717 |
+
dateFormat = "dd.mm.yyyy";
|
718 |
+
language = "de";
|
719 |
+
showMeridian = false;
|
720 |
+
}
|
721 |
+
|
722 |
+
jQuery(".b2s-post-item-details-release-input-date").datepicker({
|
723 |
+
format: dateFormat,
|
724 |
+
language: language,
|
725 |
+
maxViewMode: 2,
|
726 |
+
todayHighlight: true,
|
727 |
+
startDate: today,
|
728 |
+
calendarWeeks: true,
|
729 |
+
autoclose: true
|
730 |
+
});
|
731 |
+
jQuery('.b2s-post-item-details-release-input-time').timepicker({
|
732 |
+
minuteStep: 15,
|
733 |
+
appendWidgetTo: 'body',
|
734 |
+
showSeconds: false,
|
735 |
+
showMeridian: showMeridian,
|
736 |
+
defaultTime: 'current',
|
737 |
+
snapToStep: true
|
738 |
+
});
|
739 |
+
jQuery(".b2s-post-item-details-release-input-date").datepicker().on('changeDate', function (e) {
|
740 |
+
checkSchedDateTime(network_auth_id);
|
741 |
+
});
|
742 |
+
jQuery('.b2s-post-item-details-release-input-time').timepicker().on('changeTime.timepicker', function (e) {
|
743 |
+
checkSchedDateTime(network_auth_id);
|
744 |
+
});
|
745 |
+
init();
|
746 |
+
|
747 |
+
//is relay post?
|
748 |
+
if (relay_primary_post_id > 0) {
|
749 |
+
jQuery('#b2s-edit-event-modal-' + b2s_id).find("input, textarea, button").each(function () {
|
750 |
+
if (!jQuery(this).hasClass('b2s-input-hidden') && !jQuery(this).hasClass('b2s-modal-close') && !jQuery(this).hasClass('b2s-post-item-details-relay-input-delay') && !jQuery(this).hasClass('b2s-edit-post-delete') && !jQuery(this).hasClass('b2s-edit-post-save-this')) {
|
751 |
+
jQuery(this).prop("disabled", true);
|
752 |
+
}
|
753 |
+
});
|
754 |
+
}
|
755 |
+
|
756 |
+
if (!b2s_has_premium)
|
757 |
+
{
|
758 |
+
jQuery('#b2s-edit-event-modal-' + b2s_id).find("input, textarea, button").each(function () {
|
759 |
+
if (!jQuery(this).hasClass('b2s-modal-close')) {
|
760 |
+
jQuery(this).prop("disabled", true);
|
761 |
+
}
|
762 |
+
});
|
763 |
+
}
|
764 |
+
}
|
765 |
+
|
766 |
+
jQuery(document).on('click', '.b2s-select-image-modal-open', function () {
|
767 |
+
jQuery('.b2s-network-select-image-content').html("");
|
768 |
+
jQuery.ajax({
|
769 |
+
url: ajaxurl,
|
770 |
+
type: "POST",
|
771 |
+
cache: false,
|
772 |
+
async: false,
|
773 |
+
data: {
|
774 |
+
'action': 'b2s_get_image_modal',
|
775 |
+
'id': jQuery(this).data('post-id'),
|
776 |
+
'image_url': jQuery(this).data('image-url')
|
777 |
+
},
|
778 |
+
success: function (data) {
|
779 |
+
jQuery(".b2s-network-select-image-content").html(data);
|
780 |
+
}
|
781 |
+
});
|
782 |
+
var authId = jQuery(this).data('network-auth-id');
|
783 |
+
jQuery('.b2s-image-change-this-network').attr('data-network-auth-id', authId);
|
784 |
+
jQuery('.b2s-upload-image').attr('data-network-auth-id', authId);
|
785 |
+
var content = "<img class='b2s-post-item-network-image-selected-account' height='22px' src='" + jQuery('.b2s-post-item-network-image[data-network-auth-id="' + authId + '"]').attr('src') + "' /> " + jQuery('.b2s-post-item-details-network-display-name[data-network-auth-id="' + authId + '"]').html();
|
786 |
+
jQuery('.b2s-selected-network-for-image-info').html(content);
|
787 |
+
jQuery('#b2sInsertImageType').val("0");
|
788 |
+
jQuery('.networkImage').each(function () {
|
789 |
+
var width = this.naturalWidth;
|
790 |
+
var height = this.naturalHeight;
|
791 |
+
jQuery(this).parents('.b2s-image-item').find('.b2s-image-item-caption-resolution').html(width + 'x' + height);
|
792 |
+
});
|
793 |
+
jQuery('#b2s-network-select-image').modal('show');
|
794 |
+
return false;
|
795 |
+
});
|
796 |
+
|
797 |
+
jQuery(document).on("click", ".b2s-edit-post-save-this", function (e) {
|
798 |
+
e.preventDefault();
|
799 |
+
jQuery('#save_method').val("apply-this");
|
800 |
+
var id = jQuery(this).data("b2s-id");
|
801 |
+
jQuery.ajax({
|
802 |
+
url: ajaxurl,
|
803 |
+
type: "POST",
|
804 |
+
dataType: "json",
|
805 |
+
cache: false,
|
806 |
+
data: jQuery(this).closest("form").serialize(),
|
807 |
+
success: function (data) {
|
808 |
+
jQuery('#b2s-edit-event-modal-' + id).modal('hide');
|
809 |
+
jQuery('#b2s-edit-event-modal-' + id).remove();
|
810 |
+
jQuery('body').removeClass('modal-open');
|
811 |
+
jQuery('body').removeAttr('style');
|
812 |
+
if (data.date != "") {
|
813 |
+
jQuery('.b2s-post-sched-area-sched-time[data-post-id="' + id + '"]').html(data.date);
|
814 |
+
}
|
815 |
+
jQuery('.b2s-post-edit-success').show();
|
816 |
+
wp.heartbeat.connectNow();
|
817 |
+
}
|
818 |
+
});
|
819 |
+
});
|
820 |
+
jQuery(document).on("click", ".release_locks", function () {
|
821 |
+
jQuery.ajax({
|
822 |
+
url: ajaxurl,
|
823 |
+
type: "POST",
|
824 |
+
cache: false,
|
825 |
+
async: false,
|
826 |
+
data: {
|
827 |
+
'action': 'b2s_get_calendar_release_locks',
|
828 |
+
'post_id': jQuery('#post_id').val()
|
829 |
+
},
|
830 |
+
success: function (data) {
|
831 |
+
wp.heartbeat.connectNow();
|
832 |
+
}
|
833 |
+
});
|
834 |
+
});
|
835 |
+
|
836 |
+
|
837 |
+
|
838 |
+
function showFilter(typ) {
|
839 |
+
if (typ == 'show') {
|
840 |
+
jQuery('.filterShow').hide();
|
841 |
+
jQuery('.form-inline').show();
|
842 |
+
jQuery('.filterHide').show();
|
843 |
+
} else {
|
844 |
+
jQuery('.filterShow').show();
|
845 |
+
jQuery('.form-inline').hide();
|
846 |
+
jQuery('.filterHide').hide();
|
847 |
+
}
|
848 |
+
}
|
849 |
+
|
850 |
+
function padDate(n) {
|
851 |
+
return ("0" + n).slice(-2);
|
852 |
+
}
|
853 |
+
|
854 |
+
|
855 |
+
function checkSchedDateTime() {
|
856 |
+
var dateElement = '#b2s-change-date';
|
857 |
+
var timeElement = '#b2s-change-time';
|
858 |
+
var dateStr = jQuery(dateElement).val();
|
859 |
+
var minStr = jQuery(timeElement).val();
|
860 |
+
var timeZone = parseInt(jQuery('#user_timezone').val()) * (-1);
|
861 |
+
|
862 |
+
if (jQuery('#b2sUserLang').val() == 'de') {
|
863 |
+
dateStr = dateStr.substring(6, 10) + '-' + dateStr.substring(3, 5) + '-' + dateStr.substring(0, 2);
|
864 |
+
} else {
|
865 |
+
var minParts = minStr.split(' ');
|
866 |
+
var minParts2 = minParts[0].split(':');
|
867 |
+
if (minParts[1] == 'PM') {
|
868 |
+
minParts2[0] = parseInt(minParts2[0]) + 12;
|
869 |
+
}
|
870 |
+
minStr = minParts2[0] + ':' + minParts2[1];
|
871 |
+
}
|
872 |
+
|
873 |
+
var minParts3 = minStr.split(':');
|
874 |
+
if (minParts3[0] < 10) {
|
875 |
+
minParts3[0] = '0' + minParts3[0];
|
876 |
+
}
|
877 |
+
var dateParts = dateStr.split('-');
|
878 |
+
|
879 |
+
//utc current time
|
880 |
+
var now = new Date();
|
881 |
+
//offset between utc und user
|
882 |
+
var offset = (parseInt(now.getTimezoneOffset()) / 60) * (-1);
|
883 |
+
//enter hour to user time
|
884 |
+
var hour = parseInt(minParts3[0]) + timeZone + offset;
|
885 |
+
//calculate datetime in utc
|
886 |
+
var enter = new Date(dateParts[0], dateParts[1] - 1, dateParts[2], hour, minParts3[1]);
|
887 |
+
//compare enter date time with allowed user time
|
888 |
+
if (enter.getTime() < now.getTime()) {
|
889 |
+
//enter set on next 15 minutes and calculate on user timezone
|
890 |
+
enter.setTime(now.getTime() + (900000 - (now.getTime() % 900000)) - (3600000 * (timeZone + offset)));
|
891 |
+
jQuery(dateElement).datepicker('update', enter);
|
892 |
+
jQuery(timeElement).timepicker('setTime', enter);
|
893 |
+
}
|
894 |
+
}
|
895 |
+
|
896 |
+
|
897 |
+
window.addEventListener('message', function (e) {
|
898 |
+
if (e.origin == jQuery('#b2sServerUrl').val()) {
|
899 |
+
var data = JSON.parse(e.data);
|
900 |
+
if (data.action == 'approve') {
|
901 |
+
var count = parseInt(jQuery('.b2s-approve-count[data-post-id="' + data.blog_post_id + '"]').html());
|
902 |
+
var newCount = count - 1;
|
903 |
+
jQuery('.b2s-approve-count[data-post-id="' + data.blog_post_id + '"]').html(newCount);
|
904 |
+
if (newCount >= 1) {
|
905 |
+
jQuery('.b2s-post-approve-area-li[data-post-id="' + data.post_id + '"]').remove();
|
906 |
+
} else {
|
907 |
+
jQuery('.b2s-post-approve-area-li[data-post-id="' + data.post_id + '"]').closest('ul').closest('li').remove();
|
908 |
+
}
|
909 |
+
jQuery.ajax({
|
910 |
+
url: ajaxurl,
|
911 |
+
type: "POST",
|
912 |
+
cache: false,
|
913 |
+
async: false,
|
914 |
+
data: {
|
915 |
+
'action': 'b2s_update_approve_post',
|
916 |
+
'post_id': data.post_id,
|
917 |
+
'publish_link': data.publish_link,
|
918 |
+
'publish_error_code': data.publish_error_code,
|
919 |
+
},
|
920 |
+
success: function (data) {
|
921 |
+
|
922 |
+
}
|
923 |
+
});
|
924 |
+
}
|
925 |
+
}
|
926 |
+
});
|
927 |
+
|
928 |
+
jQuery(document).on('click', '.deleteDraftBtn', function () {
|
929 |
+
jQuery('#b2s-delete-confirm-draft-id').val(jQuery(this).attr('data-b2s-draft-id'));
|
930 |
+
jQuery('.b2s-delete-draft-modal').modal('show');
|
931 |
+
});
|
932 |
+
|
933 |
+
jQuery(document).on('click', '.b2s-draft-delete-confirm-btn', function () {
|
934 |
+
jQuery.ajax({
|
935 |
+
url: ajaxurl,
|
936 |
+
type: "POST",
|
937 |
+
dataType: "json",
|
938 |
+
cache: false,
|
939 |
+
data: {
|
940 |
+
'action': 'b2s_delete_user_draft',
|
941 |
+
'draftId': jQuery('#b2s-delete-confirm-draft-id').val()
|
942 |
+
},
|
943 |
+
error: function () {
|
944 |
+
jQuery('.b2s-server-connection-fail').show();
|
945 |
+
return false;
|
946 |
+
},
|
947 |
+
success: function (data) {
|
948 |
+
jQuery('.b2s-delete-draft-modal').modal('hide');
|
949 |
+
if (data.result == true) {
|
950 |
+
jQuery('.b2s-draft-list-entry[data-b2s-draft-id="' + jQuery('#b2s-delete-confirm-draft-id').val() + '"]').remove();
|
951 |
+
jQuery('.b2s-post-remove-success').show();
|
952 |
+
} else {
|
953 |
+
jQuery('.b2s-post-remove-fail').show();
|
954 |
+
}
|
955 |
+
return true;
|
956 |
+
}
|
957 |
+
});
|
958 |
+
});
|
assets/js/b2s/ship.js
CHANGED
@@ -1,3143 +1,3476 @@
|
|
1 |
-
jQuery.noConflict();
|
2 |
-
|
3 |
-
var b2sTosXingGroupCount = 0;
|
4 |
-
|
5 |
-
jQuery(document).on('heartbeat-send', function (e, data) {
|
6 |
-
data['b2s_heartbeat'] = 'b2s_listener';
|
7 |
-
});
|
8 |
-
|
9 |
-
jQuery.xhrPool = [];
|
10 |
-
|
11 |
-
jQuery(window).on("load", function () {
|
12 |
-
init(true);
|
13 |
-
imageSize();
|
14 |
-
if (jQuery('.toggelbutton').is(':visible') && !jQuery("#b2s-wrapper").hasClass("toggled")) {
|
15 |
-
jQuery('.btn-toggle-menu').trigger('click');
|
16 |
-
}
|
17 |
-
});
|
18 |
-
|
19 |
-
//Stop duplicate posts by page refreshing during the post process
|
20 |
-
jQuery(document).on('keydown', '#b2sNetworkSent', function (event) {
|
21 |
-
if (event.keyCode == 116) {
|
22 |
-
event.preventDefault();
|
23 |
-
return false;
|
24 |
-
}
|
25 |
-
});
|
26 |
-
|
27 |
-
jQuery(document).on('click', '.btn-toggle-menu', function () {
|
28 |
-
if (jQuery('.toggelbutton').is(':visible')) {
|
29 |
-
jQuery("#b2s-wrapper").toggleClass("toggled");
|
30 |
-
if (jQuery("#b2s-wrapper").hasClass("toggled")) {
|
31 |
-
jQuery(".sidebar-brand").hide();
|
32 |
-
jQuery(".btn-toggle-glyphicon").removeClass('glyphicon-chevron-right').addClass('glyphicon-chevron-left');
|
33 |
-
} else {
|
34 |
-
jQuery(".sidebar-brand").show();
|
35 |
-
jQuery(".btn-toggle-glyphicon").removeClass('glyphicon-chevron-left').addClass('glyphicon-chevron-right');
|
36 |
-
}
|
37 |
-
}
|
38 |
-
});
|
39 |
-
|
40 |
-
jQuery.sceditor.plugins.xhtml.allowedTags = ['h1', 'h2', 'p', 'br', 'i', 'b', 'a', 'img'];
|
41 |
-
jQuery.sceditor.command.set(
|
42 |
-
"h1", {
|
43 |
-
exec: function () {
|
44 |
-
if (this.currentBlockNode() == undefined || this.currentBlockNode().nodeName != 'H1') {
|
45 |
-
this.wysiwygEditorInsertHtml('<h1>', '</h1>');
|
46 |
-
} else {
|
47 |
-
jQuery(this.currentBlockNode()).replaceWith(this.currentBlockNode().innerText);
|
48 |
-
}
|
49 |
-
},
|
50 |
-
txtExec: ["<h1>", "</h1>"],
|
51 |
-
tooltip: "H1"
|
52 |
-
});
|
53 |
-
jQuery.sceditor.command.set(
|
54 |
-
"h2", {
|
55 |
-
exec: function () {
|
56 |
-
if (this.currentBlockNode() == undefined || this.currentBlockNode().nodeName != 'H2') {
|
57 |
-
this.wysiwygEditorInsertHtml('<h2>', '</h2>');
|
58 |
-
} else {
|
59 |
-
jQuery(this.currentBlockNode()).replaceWith(this.currentBlockNode().innerText);
|
60 |
-
}
|
61 |
-
},
|
62 |
-
txtExec: ["<h2>", "</h2>"], tooltip: "H2"});
|
63 |
-
|
64 |
-
jQuery.sceditor.command.set(
|
65 |
-
"custom-image", {
|
66 |
-
exec: function () {
|
67 |
-
var me = this;
|
68 |
-
if (typeof (b2s_is_calendar) != "undefined" && b2s_is_calendar)
|
69 |
-
{
|
70 |
-
jQuery('.b2s-network-select-image-content').html("");
|
71 |
-
jQuery.ajax({
|
72 |
-
url: ajaxurl,
|
73 |
-
type: "POST",
|
74 |
-
cache: false,
|
75 |
-
async: false,
|
76 |
-
data: {
|
77 |
-
'action': 'b2s_get_image_modal',
|
78 |
-
'id': b2s_current_post_id,
|
79 |
-
'image_url': ''
|
80 |
-
},
|
81 |
-
success: function (data) {
|
82 |
-
jQuery(".b2s-network-select-image-content").html(data);
|
83 |
-
}
|
84 |
-
});
|
85 |
-
}
|
86 |
-
var networkAuthId = jQuery(this.getContentAreaContainer()).parents('.b2s-post-item-details').find('.b2s-post-item-details-network-display-name').attr('data-network-auth-id');
|
87 |
-
jQuery('.b2s-image-change-this-network').attr('data-network-auth-id', networkAuthId);
|
88 |
-
jQuery('.b2s-upload-image').attr('data-network-auth-id', networkAuthId);
|
89 |
-
var content = "<img class='b2s-post-item-network-image-selected-account' height='22px' src='" + jQuery('.b2s-post-item-network-image[data-network-auth-id="' + networkAuthId + '"]').attr('src') + "' /> " + jQuery('.b2s-post-item-details-network-display-name[data-network-auth-id="' + networkAuthId + '"]').html();
|
90 |
-
jQuery('.b2s-selected-network-for-image-info').html(content);
|
91 |
-
jQuery('#b2s-network-select-image').modal('show');
|
92 |
-
jQuery('#b2sInsertImageType').val("1");
|
93 |
-
imageSize();
|
94 |
-
|
95 |
-
},
|
96 |
-
txtExec: function () {
|
97 |
-
var networkAuthId = jQuery(this.getContentAreaContainer()).parents('.b2s-post-item-details').find('.b2s-post-item-details-network-display-name').attr('data-network-auth-id');
|
98 |
-
jQuery('.b2s-image-change-this-network').attr('data-network-auth-id', networkAuthId);
|
99 |
-
jQuery('.b2s-upload-image').attr('data-network-auth-id', networkAuthId);
|
100 |
-
var content = "<img class='b2s-post-item-network-image-selected-account' height='22px' src='" + jQuery('.b2s-post-item-network-image[data-network-auth-id="' + networkAuthId + '"]').attr('src') + "' /> " + jQuery('.b2s-post-item-details-network-display-name[data-network-auth-id="' + networkAuthId + '"]').html();
|
101 |
-
jQuery('.b2s-selected-network-for-image-info').html(content);
|
102 |
-
jQuery('#b2s-network-select-image').modal('show');
|
103 |
-
jQuery('#b2sInsertImageType').val("1");
|
104 |
-
imageSize();
|
105 |
-
}, tooltip: "Image"});
|
106 |
-
|
107 |
-
|
108 |
-
jQuery(document).on('click', '.b2s-toogle-calendar-btn', function () {
|
109 |
-
|
110 |
-
var networkAuthId = jQuery(this).attr('data-network-auth-id');
|
111 |
-
var networkId = jQuery(this).attr('data-network-id');
|
112 |
-
var toogleBtnText = jQuery(this).attr('data-toogle-text-btn');
|
113 |
-
var currentBtnText = jQuery(this).text();
|
114 |
-
|
115 |
-
jQuery(this).text(toogleBtnText);
|
116 |
-
jQuery(this).attr('data-toogle-text-btn', currentBtnText);
|
117 |
-
|
118 |
-
//change to show
|
119 |
-
var calendar = jQuery('.b2s-post-item-calendar-area[data-network-auth-id="' + networkAuthId + '"]');
|
120 |
-
if (calendar.hasClass('hide')) {
|
121 |
-
calendar.removeClass('hide');
|
122 |
-
calendar.addClass('show');
|
123 |
-
jQuery('.b2s-calendar-filter-area[data-network-auth-id="' + networkAuthId + '"]').removeClass('hide');
|
124 |
-
|
125 |
-
if (calendar.is(':empty')) {
|
126 |
-
b2s_cur_source_ship_calendar[0] = ajaxurl + '?action=b2s_get_calendar_events&filter_network_auth=all&filter_network=' + networkId + '&filter_status=2';
|
127 |
-
|
128 |
-
jQuery('.b2s-post-item-calendar-area[data-network-auth-id="' + networkAuthId + '"]').fullCalendar({
|
129 |
-
editable: false,
|
130 |
-
locale: b2s_calendar_locale,
|
131 |
-
eventLimit: 2,
|
132 |
-
contentHeight: 530,
|
133 |
-
timeFormat: 'H:mm',
|
134 |
-
eventSources: [b2s_cur_source_ship_calendar[0]],
|
135 |
-
eventRender: function (event, element) {
|
136 |
-
show = true;
|
137 |
-
$header = jQuery("<div>").addClass("b2s-calendar-header");
|
138 |
-
$isRelayPost = '';
|
139 |
-
$isCuratedPost = '';
|
140 |
-
if (event.post_type == 'b2s_ex_post') {
|
141 |
-
$isCuratedPost = ' (Curated Post)';
|
142 |
-
}
|
143 |
-
if (event.relay_primary_post_id > 0) {
|
144 |
-
$isRelayPost = ' (Retweet)';
|
145 |
-
}
|
146 |
-
$network_name = jQuery("<span>").text(event.author + $isRelayPost + $isCuratedPost).addClass("network-name").css("display", "block");
|
147 |
-
element.find(".fc-time").after($network_name);
|
148 |
-
element.html(element.html());
|
149 |
-
$parent = element.parent();
|
150 |
-
$header.append(element.find(".fc-content"));
|
151 |
-
element.append($header);
|
152 |
-
$body = jQuery("<div>").addClass("b2s-calendar-body");
|
153 |
-
$body.append(event.avatar);
|
154 |
-
$body.append(element.find(".fc-title"));
|
155 |
-
$body.append(jQuery("<br>"));
|
156 |
-
var $em = jQuery("<em>").css("padding-top", "5px").css("display", "block");
|
157 |
-
$em.append("<img src='" + b2s_plugin_url + "assets/images/portale/" + event.network_id + "_flat.png' style='height: 16px;width: 16px;display: inline-block;padding-right: 2px;padding-left: 2px;' />")
|
158 |
-
$em.append(event.network_name);
|
159 |
-
$em.append(jQuery("<span>").text(": " + event.profile));
|
160 |
-
$body.append($em);
|
161 |
-
element.append($body);
|
162 |
-
},
|
163 |
-
dayRender: function (date, element) {
|
164 |
-
if (!jQuery(element[0]).hasClass('fc-past')) {
|
165 |
-
var date = jQuery(element[0]).attr('data-date');
|
166 |
-
var sel_element = jQuery(element[0]).closest('div').next('div').find('td[data-date="' + date + '"]');
|
167 |
-
$header = jQuery("<a>").html("+ <span class=\"hidden-sm hidden-xs\">" + jQuery("#b2sJSTextAddSchedule").val() + "</span>").addClass("b2s-calendar-add-schedule-btn").attr('href', '#').attr('data-network-auth-id', networkAuthId);
|
168 |
-
sel_element.append($header);
|
169 |
-
}
|
170 |
-
}
|
171 |
-
});
|
172 |
-
} else {
|
173 |
-
jQuery('.b2s-post-item-calendar-area[data-network-auth-id="' + networkAuthId + '"]').fullCalendar('refetchEvents');
|
174 |
-
}
|
175 |
-
|
176 |
-
} else {
|
177 |
-
calendar.removeClass('show');
|
178 |
-
calendar.addClass('hide');
|
179 |
-
jQuery('.b2s-calendar-filter-area[data-network-auth-id="' + networkAuthId + '"]').addClass('hide');
|
180 |
-
|
181 |
-
}
|
182 |
-
|
183 |
-
return false;
|
184 |
-
|
185 |
-
});
|
186 |
-
|
187 |
-
jQuery(document).on('click', '.b2s-calendar-add-schedule-btn', function () {
|
188 |
-
var selSchedDate = jQuery(this).parent('td').attr('data-date');
|
189 |
-
var networkAuthId = jQuery(this).attr('data-network-auth-id');
|
190 |
-
|
191 |
-
if (jQuery('#user_version').val() == 0) {
|
192 |
-
jQuery('.b2s-post-item-details-release-input-date-select-reset[data-network-auth-id="' + networkAuthId + '"]').val('0');
|
193 |
-
jQuery('#b2s-sched-post-modal').modal('show');
|
194 |
-
return false;
|
195 |
-
}
|
196 |
-
|
197 |
-
if (jQuery('#b2sUserLang').val() == 'de') {
|
198 |
-
selSchedDate = selSchedDate.substring(8, 10) + '.' + selSchedDate.substring(5, 7) + '.' + selSchedDate.substring(0, 4);
|
199 |
-
}
|
200 |
-
|
201 |
-
//isfirst
|
202 |
-
if (!jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"] option[value="1"]:selected').length > 0) {
|
203 |
-
jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').val('1').trigger("change");
|
204 |
-
jQuery('.b2s-post-item-details-release-input-date[data-network-count="0"][data-network-auth-id="' + networkAuthId + '"]').val(selSchedDate);
|
205 |
-
} else {
|
206 |
-
//add
|
207 |
-
var curSel = jQuery('.b2s-post-item-details-release-input-add[data-network-auth-id="' + networkAuthId + '"]').filter(':visible');
|
208 |
-
if (curSel.length > 0) {
|
209 |
-
curSel.trigger('click');
|
210 |
-
netCountNext = parseInt(curSel.attr('data-network-count')) + 1;
|
211 |
-
jQuery('.b2s-post-item-details-release-input-date[data-network-count="' + netCountNext + '"][data-network-auth-id="' + networkAuthId + '"]').val(selSchedDate);
|
212 |
-
} else {
|
213 |
-
//do not adding write to first
|
214 |
-
jQuery('.b2s-post-item-details-release-input-date[data-network-count="0"][data-network-auth-id="' + networkAuthId + '"]').val(selSchedDate);
|
215 |
-
}
|
216 |
-
}
|
217 |
-
return false;
|
218 |
-
});
|
219 |
-
|
220 |
-
jQuery(document).on('change', '.b2s-calendar-filter-network-sel', function () {
|
221 |
-
var newSource = ajaxurl + '?action=b2s_get_calendar_events&filter_network_auth=all&filter_network=' + jQuery(this).val() + '&filter_status=2';
|
222 |
-
var oldSource = ajaxurl + '?action=b2s_get_calendar_events&filter_network_auth=all&filter_network=' + jQuery(this).attr('data-last-sel') + '&filter_status=2';
|
223 |
-
jQuery(this).attr('data-last-sel', jQuery(this).val());
|
224 |
-
jQuery('.b2s-post-item-calendar-area[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').fullCalendar('removeEventSource', oldSource);
|
225 |
-
jQuery('.b2s-post-item-calendar-area[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').fullCalendar('addEventSource', newSource);
|
226 |
-
return false;
|
227 |
-
});
|
228 |
-
|
229 |
-
|
230 |
-
jQuery(document).on('click', '.b2s-get-settings-sched-time-default', function () {
|
231 |
-
jQuery('.b2s-server-connection-fail').hide();
|
232 |
-
jQuery.ajax({
|
233 |
-
url: ajaxurl,
|
234 |
-
type: "POST",
|
235 |
-
dataType: "json",
|
236 |
-
cache: false,
|
237 |
-
data: {
|
238 |
-
'action': 'b2s_get_settings_sched_time_default',
|
239 |
-
},
|
240 |
-
error: function () {
|
241 |
-
jQuery('.b2s-server-connection-fail').show();
|
242 |
-
return false;
|
243 |
-
},
|
244 |
-
success: function (data) {
|
245 |
-
if (data.result == true) {
|
246 |
-
var tomorrow = new Date();
|
247 |
-
if (jQuery('#b2sBlogPostSchedDate').length > 0) {
|
248 |
-
tomorrow.setTime(jQuery('#b2sBlogPostSchedDate').val());
|
249 |
-
}
|
250 |
-
tomorrow.setDate(tomorrow.getDate() + 1);
|
251 |
-
var tomorrowMonth = ("0" + (tomorrow.getMonth() + 1)).slice(-2);
|
252 |
-
var tomorrowDate = ("0" + tomorrow.getDate()).slice(-2);
|
253 |
-
var dateTomorrow = tomorrow.getFullYear() + "-" + tomorrowMonth + "-" + tomorrowDate;
|
254 |
-
var today = new Date();
|
255 |
-
if (jQuery('#b2sBlogPostSchedDate').length > 0) {
|
256 |
-
today.setTime(jQuery('#b2sBlogPostSchedDate').val());
|
257 |
-
}
|
258 |
-
|
259 |
-
var todayMonth = ("0" + (today.getMonth() + 1)).slice(-2);
|
260 |
-
var todayDate = ("0" + today.getDate()).slice(-2);
|
261 |
-
var dateToday = today.getFullYear() + "-" + todayMonth + "-" + todayDate;
|
262 |
-
var lang = jQuery('#b2sUserLang').val();
|
263 |
-
if (lang == "de") {
|
264 |
-
dateTomorrow = tomorrowDate + "." + tomorrowMonth + "." + tomorrow.getFullYear();
|
265 |
-
dateToday = todayDate + "." + todayMonth + "." + today.getFullYear();
|
266 |
-
}
|
267 |
-
|
268 |
-
jQuery.each(data.times, function (network_id, time) {
|
269 |
-
if (jQuery('.b2s-post-item[data-network-id="' + network_id + '"]').is(":visible")) {
|
270 |
-
time.forEach(function (network_type_time, count) {
|
271 |
-
if (network_type_time != "") {
|
272 |
-
jQuery('.b2s-post-item-details-release-input-date-select[data-network-id="' + network_id + '"][data-network-type="' + count + '"]').each(function () {
|
273 |
-
if (jQuery(this).is(':not(:disabled)')) {
|
274 |
-
var networkAuthId = jQuery(this).attr('data-network-auth-id');
|
275 |
-
//is not set special dates
|
276 |
-
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"]').val() == '0') {
|
277 |
-
jQuery('.b2s-post-item-details-release-input-date-select[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"]').val('1').trigger("change");
|
278 |
-
}
|
279 |
-
jQuery('.b2s-post-item-details-release-input-time[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').val(network_type_time);
|
280 |
-
jQuery('.b2s-post-item-details-release-input-time[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').timepicker('setTime', network_type_time);
|
281 |
-
var hours = network_type_time.substring(0, 2);
|
282 |
-
if (lang == "en") {
|
283 |
-
var timeparts = network_type_time.split(' ');
|
284 |
-
hours = (timeparts[1] == 'AM') ? hours : (parseInt(hours) + 12);
|
285 |
-
}
|
286 |
-
if (hours < today.getHours()) {
|
287 |
-
jQuery('.b2s-post-item-details-release-input-date[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').val(dateTomorrow);
|
288 |
-
jQuery('.b2s-post-item-details-release-input-date[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').datepicker('update', dateTomorrow);
|
289 |
-
} else {
|
290 |
-
jQuery('.b2s-post-item-details-release-input-date[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').val(dateToday);
|
291 |
-
jQuery('.b2s-post-item-details-release-input-date[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').datepicker('update', dateToday);
|
292 |
-
}
|
293 |
-
}
|
294 |
-
});
|
295 |
-
count++;
|
296 |
-
}
|
297 |
-
});
|
298 |
-
}
|
299 |
-
});
|
300 |
-
}
|
301 |
-
}
|
302 |
-
});
|
303 |
-
return false;
|
304 |
-
});
|
305 |
-
|
306 |
-
|
307 |
-
function formatAMPM(date) {
|
308 |
-
var hours = date.getHours();
|
309 |
-
var minutes = date.getMinutes();
|
310 |
-
var ampm = hours >= 12 ? 'pm' : 'am';
|
311 |
-
hours = hours % 12;
|
312 |
-
hours = hours ? hours : 12; // the hour '0' should be '12'
|
313 |
-
minutes = minutes < 10 ? '0' + minutes : minutes;
|
314 |
-
var strTime = hours + ':' + minutes + ' ' + ampm;
|
315 |
-
return strTime;
|
316 |
-
}
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
jQuery(document).on('click', '.b2s-sidbar-network-auth-btn', function () {
|
321 |
-
jQuery('#b2s-network-list-modal').modal('show');
|
322 |
-
return false;
|
323 |
-
});
|
324 |
-
jQuery(document).on('click', '.change-meta-tag', function () {
|
325 |
-
var attr = jQuery(this).attr('readonly');
|
326 |
-
if (typeof attr !== typeof undefined && attr !== false) {
|
327 |
-
var networkAuthId = jQuery(this).attr("data-network-auth-id");
|
328 |
-
//Content cuation
|
329 |
-
var postType = jQuery('.b2s-post-ship-item-post-format[data-network-auth-id=' + networkAuthId + ']').attr('data-post-wp-type');
|
330 |
-
if (postType != "ex") {
|
331 |
-
jQuery('.meta-text').hide();
|
332 |
-
var postFormat = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').val();
|
333 |
-
var networkId = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').attr("data-network-id");
|
334 |
-
var isMetaChecked = false;
|
335 |
-
if (networkId == "1" && jQuery('#isOgMetaChecked').val() == "1") {
|
336 |
-
isMetaChecked = true;
|
337 |
-
}
|
338 |
-
if (networkId == "2" && jQuery('#isCardMetaChecked').val() == "1") {
|
339 |
-
isMetaChecked = true;
|
340 |
-
}
|
341 |
-
var showDefault = true;
|
342 |
-
if (postFormat == "0" && !isMetaChecked) { //isLinkPost
|
343 |
-
showDefault = false;
|
344 |
-
if (networkId == "1") {
|
345 |
-
jQuery('.isOgMetaChecked').show();
|
346 |
-
} else {
|
347 |
-
jQuery('.isCardMetaChecked').show();
|
348 |
-
}
|
349 |
-
}
|
350 |
-
if (showDefault) {
|
351 |
-
jQuery('.isLinkPost').show();
|
352 |
-
}
|
353 |
-
jQuery('#b2s-info-change-meta-tag-modal').modal('show');
|
354 |
-
}
|
355 |
-
}
|
356 |
-
return false;
|
357 |
-
});
|
358 |
-
// Linkpost change Meta Tags title + desc
|
359 |
-
jQuery(document).on('keyup', '.change-meta-tag', function () {
|
360 |
-
var currentText = jQuery(this).val();
|
361 |
-
var metaTag = jQuery(this).attr('data-meta');
|
362 |
-
var networkAuthId = jQuery(this).attr('data-network-auth-id');
|
363 |
-
var postFormat = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').val();
|
364 |
-
var networkId = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').attr('data-network-id');
|
365 |
-
if (typeof postFormat !== typeof undefined && postFormat !== false) {
|
366 |
-
if (postFormat == "0") { //if linkpost
|
367 |
-
jQuery('.b2s-post-item-details-post-format[data-network-id=' + networkId + ']').each(function () {
|
368 |
-
if (jQuery(this).val() == "0" && jQuery('.b2s-post-ship-item-post-format[data-network-auth-id=' + jQuery(this).attr('data-network-auth-id') + ']').is(":visible") && jQuery(this).attr('data-network-auth-id') != networkAuthId) { //other Linkpost by same network
|
369 |
-
//override this content with current content by keyup
|
370 |
-
jQuery('.' + metaTag + '[data-network-auth-id=' + jQuery(this).attr('data-network-auth-id') + ']').val(currentText);
|
371 |
-
}
|
372 |
-
});
|
373 |
-
}
|
374 |
-
}
|
375 |
-
return false;
|
376 |
-
});
|
377 |
-
jQuery(document).on('click', '.b2s-get-settings-sched-time-user', function () {
|
378 |
-
jQuery('.b2s-server-connection-fail').hide();
|
379 |
-
jQuery.ajax({
|
380 |
-
url: ajaxurl,
|
381 |
-
type: "POST",
|
382 |
-
dataType: "json",
|
383 |
-
cache: false,
|
384 |
-
data: {
|
385 |
-
'action': 'b2s_get_settings_sched_time_user',
|
386 |
-
},
|
387 |
-
error: function () {
|
388 |
-
jQuery('.b2s-server-connection-fail').show();
|
389 |
-
return false;
|
390 |
-
},
|
391 |
-
success: function (data) {
|
392 |
-
var tomorrow = new Date();
|
393 |
-
if (jQuery('#b2sBlogPostSchedDate').length > 0) {
|
394 |
-
tomorrow.setTime(jQuery('#b2sBlogPostSchedDate').val());
|
395 |
-
}
|
396 |
-
|
397 |
-
tomorrow.setDate(tomorrow.getDate() + 1);
|
398 |
-
var tomorrowMonth = ("0" + (tomorrow.getMonth() + 1)).slice(-2);
|
399 |
-
var tomorrowDate = ("0" + tomorrow.getDate()).slice(-2);
|
400 |
-
var dateTomorrow = tomorrow.getFullYear() + "-" + tomorrowMonth + "-" + tomorrowDate;
|
401 |
-
var today = new Date();
|
402 |
-
if (jQuery('#b2sBlogPostSchedDate').length > 0) {
|
403 |
-
today.setTime(jQuery('#b2sBlogPostSchedDate').val());
|
404 |
-
}
|
405 |
-
|
406 |
-
var todayMonth = ("0" + (today.getMonth() + 1)).slice(-2);
|
407 |
-
var todayDate = ("0" + today.getDate()).slice(-2);
|
408 |
-
var dateToday = today.getFullYear() + "-" + todayMonth + "-" + todayDate;
|
409 |
-
var lang = jQuery('#b2sUserLang').val();
|
410 |
-
if (lang == "de") {
|
411 |
-
dateTomorrow = tomorrowDate + "." + tomorrowMonth + "." + tomorrow.getFullYear();
|
412 |
-
dateToday = todayDate + "." + todayMonth + "." + today.getFullYear();
|
413 |
-
}
|
414 |
-
if (data.result == true) {
|
415 |
-
//V5.1.0 seeding
|
416 |
-
if (data.type == 'new') {
|
417 |
-
//new
|
418 |
-
jQuery.each(data.times, function (network_auth_id, time) {
|
419 |
-
if (jQuery('.b2s-post-item[data-network-auth-id="' + network_auth_id + '"]').is(":visible")) {
|
420 |
-
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + network_auth_id + '"]').is(':not(:disabled)')) {
|
421 |
-
//is not set special dates
|
422 |
-
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + network_auth_id + '"]').val() == '0') {
|
423 |
-
jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + network_auth_id + '"]').val('1').trigger("change");
|
424 |
-
}
|
425 |
-
jQuery('.b2s-post-item-details-release-input-time[data-network-auth-id="' + network_auth_id + '"][data-network-count="0"]').val(time);
|
426 |
-
jQuery('.b2s-post-item-details-release-input-time[data-network-auth-id="' + network_auth_id + '"][data-network-count="0"]').timepicker('setTime', time);
|
427 |
-
var hours = time.substring(0, 2);
|
428 |
-
if (lang == "en") {
|
429 |
-
var timeparts = time.split(' ');
|
430 |
-
hours = (timeparts[1] == 'AM') ? hours : (parseInt(hours) + 12);
|
431 |
-
}
|
432 |
-
|
433 |
-
var isDelay = false;
|
434 |
-
var delayDay = data.delay_day[network_auth_id];
|
435 |
-
if (delayDay != undefined) {
|
436 |
-
if (delayDay > 0) {
|
437 |
-
var delay = new Date();
|
438 |
-
delay.setDate(today.getDate() + parseInt(delayDay));
|
439 |
-
var delayMonth = ("0" + (delay.getMonth() + 1)).slice(-2);
|
440 |
-
var delayDate = ("0" + delay.getDate()).slice(-2);
|
441 |
-
var dateDelay = delay.getFullYear() + "-" + delayMonth + "-" + delayDate;
|
442 |
-
if (lang == 'de') {
|
443 |
-
dateDelay = delayDate + '.' + delayMonth + "." + delay.getFullYear();
|
444 |
-
}
|
445 |
-
jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + network_auth_id + '"][data-network-count="0"]').val(dateDelay);
|
446 |
-
isDelay = true;
|
447 |
-
|
448 |
-
jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + network_auth_id + '"][data-network-count="0"]').datepicker('update', dateDelay);
|
449 |
-
}
|
450 |
-
}
|
451 |
-
if (!isDelay) {
|
452 |
-
if (hours < today.getHours()) {
|
453 |
-
jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + network_auth_id + '"][data-network-count="0"]').val(dateTomorrow);
|
454 |
-
jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + network_auth_id + '"][data-network-count="0"]').datepicker('update', dateTomorrow);
|
455 |
-
} else {
|
456 |
-
jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + network_auth_id + '"][data-network-count="0"]').val(dateToday);
|
457 |
-
jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + network_auth_id + '"][data-network-count="0"]').datepicker('update', dateToday);
|
458 |
-
}
|
459 |
-
}
|
460 |
-
}
|
461 |
-
}
|
462 |
-
});
|
463 |
-
} else {
|
464 |
-
//old
|
465 |
-
jQuery.each(data.times, function (network_id, time) {
|
466 |
-
if (jQuery('.b2s-post-item[data-network-id="' + network_id + '"]').is(":visible")) {
|
467 |
-
time.forEach(function (network_type_time, count) {
|
468 |
-
if (network_type_time != "") {
|
469 |
-
jQuery('.b2s-post-item-details-release-input-date-select[data-network-id="' + network_id + '"][data-network-type="' + count + '"]').each(function () {
|
470 |
-
if (jQuery(this).is(':not(:disabled)')) {
|
471 |
-
var networkAuthId = jQuery(this).attr('data-network-auth-id');
|
472 |
-
//is not set special dates
|
473 |
-
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"]').val() != '1') {
|
474 |
-
jQuery('.b2s-post-item-details-release-input-date-select[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"]').val('1').trigger("change");
|
475 |
-
}
|
476 |
-
jQuery('.b2s-post-item-details-release-input-time[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').val(network_type_time);
|
477 |
-
jQuery('.b2s-post-item-details-release-input-time[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').timepicker('setTime', network_type_time);
|
478 |
-
var hours = network_type_time.substring(0, 2);
|
479 |
-
if (lang == "en") {
|
480 |
-
var timeparts = network_type_time.split(' ');
|
481 |
-
hours = (timeparts[1] == 'AM') ? hours : (parseInt(hours) + 12);
|
482 |
-
}
|
483 |
-
if (hours < today.getHours()) {
|
484 |
-
jQuery('.b2s-post-item-details-release-input-date[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').val(dateTomorrow);
|
485 |
-
jQuery('.b2s-post-item-details-release-input-date[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').datepicker('update', dateTomorrow);
|
486 |
-
} else {
|
487 |
-
jQuery('.b2s-post-item-details-release-input-date[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').val(dateToday);
|
488 |
-
jQuery('.b2s-post-item-details-release-input-date[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').datepicker('update', dateToday);
|
489 |
-
}
|
490 |
-
}
|
491 |
-
});
|
492 |
-
count++;
|
493 |
-
}
|
494 |
-
});
|
495 |
-
}
|
496 |
-
});
|
497 |
-
}
|
498 |
-
} else {
|
499 |
-
//default load best Times
|
500 |
-
//jQuery('.b2s-get-settings-sched-time-default').trigger('click');
|
501 |
-
//set current time
|
502 |
-
jQuery('.b2s-post-item:visible').each(function () {
|
503 |
-
var networkAuthId = jQuery(this).attr('data-network-auth-id');
|
504 |
-
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').is(':not(:disabled)')) {
|
505 |
-
//is not set special dates
|
506 |
-
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').val() != '1') {
|
507 |
-
jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').val('1').trigger("change");
|
508 |
-
}
|
509 |
-
}
|
510 |
-
});
|
511 |
-
}
|
512 |
-
}
|
513 |
-
});
|
514 |
-
return false;
|
515 |
-
});
|
516 |
-
jQuery('#b2sPreFeatureModal').on('show.bs.modal', function () {
|
517 |
-
jQuery('.b2s-post-item-details-release-input-date-select-reset').val('0');
|
518 |
-
});
|
519 |
-
jQuery(document).on('click', '.b2s-network-list-add-btn-profeature', function () {
|
520 |
-
jQuery('#b2s-network-list-modal').modal('hide');
|
521 |
-
});
|
522 |
-
jQuery(document).on('click', '.b2s-post-item-details-release-area-sched-for-all', function () {
|
523 |
-
var dataNetworkAuthId = jQuery(this).attr('data-network-auth-id');
|
524 |
-
var dataNetworkCount = 0;
|
525 |
-
var selMode = jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + dataNetworkAuthId + '"]').val();
|
526 |
-
if (jQuery('.b2s-post-item-details-release-area-details-row[data-network-auth-id="' + dataNetworkAuthId + '"][data-network-count="1"]').is(":visible")) {
|
527 |
-
dataNetworkCount = 1;
|
528 |
-
}
|
529 |
-
if (jQuery('.b2s-post-item-details-release-area-details-row[data-network-auth-id="' + dataNetworkAuthId + '"][data-network-count="2"]').is(":visible")) {
|
530 |
-
dataNetworkCount = 2;
|
531 |
-
}
|
532 |
-
|
533 |
-
jQuery('.b2s-post-item-details-release-input-date-select').each(function () {
|
534 |
-
if (jQuery(this).attr('data-network-auth-id') != dataNetworkAuthId && jQuery(this).has('option[value="' + jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + dataNetworkAuthId + '"]').val() + '"]').length > 0) {
|
535 |
-
jQuery(this).val(jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + dataNetworkAuthId + '"]').val());
|
536 |
-
//view elements
|
537 |
-
releaseChoose(jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + dataNetworkAuthId + '"]').val(), jQuery(this).attr('data-network-auth-id'), dataNetworkCount);
|
538 |
-
//view elements interval
|
539 |
-
if (selMode == 2) {
|
540 |
-
for (var i = 0; i <= dataNetworkCount; i++) {
|
541 |
-
var curInterval = jQuery('.b2s-post-item-details-release-input-interval-select[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"]').val();
|
542 |
-
releaseChooseInterval(curInterval, '[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]', i);
|
543 |
-
}
|
544 |
-
}
|
545 |
-
}
|
546 |
-
});
|
547 |
-
//set values
|
548 |
-
for (var i = 0; i <= dataNetworkCount; i++) {
|
549 |
-
jQuery('.b2s-post-item-details-release-input-time[data-network-count="' + i + '"]').val(jQuery('.b2s-post-item-details-release-input-time[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"]').val());
|
550 |
-
jQuery('.b2s-post-item-details-release-input-date[data-network-count="' + i + '"]').val(jQuery('.b2s-post-item-details-release-input-date[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"]').val());
|
551 |
-
if (selMode == 2) {
|
552 |
-
var curInterval = jQuery('.b2s-post-item-details-release-input-interval-select[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"]').val();
|
553 |
-
jQuery('.b2s-post-item-details-release-input-interval-select[data-network-count="' + i + '"]').val(curInterval);
|
554 |
-
if (curInterval == 0) {
|
555 |
-
jQuery('.b2s-post-item-details-release-input-weeks[data-network-count="' + i + '"]').val(jQuery('.b2s-post-item-details-release-input-weeks[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"]').val());
|
556 |
-
jQuery('.b2s-post-item-details-release-input-lable-day-mo[data-network-count="' + i + '"]').prop('checked', jQuery('.b2s-post-item-details-release-input-lable-day-mo[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"').prop('checked'));
|
557 |
-
jQuery('.b2s-post-item-details-release-input-lable-day-di[data-network-count="' + i + '"]').prop('checked', jQuery('.b2s-post-item-details-release-input-lable-day-di[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"').prop('checked'));
|
558 |
-
jQuery('.b2s-post-item-details-release-input-lable-day-mi[data-network-count="' + i + '"]').prop('checked', jQuery('.b2s-post-item-details-release-input-lable-day-mi[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"').prop('checked'));
|
559 |
-
jQuery('.b2s-post-item-details-release-input-lable-day-do[data-network-count="' + i + '"]').prop('checked', jQuery('.b2s-post-item-details-release-input-lable-day-do[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"').prop('checked'));
|
560 |
-
jQuery('.b2s-post-item-details-release-input-lable-day-fr[data-network-count="' + i + '"]').prop('checked', jQuery('.b2s-post-item-details-release-input-lable-day-fr[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"').prop('checked'));
|
561 |
-
jQuery('.b2s-post-item-details-release-input-lable-day-sa[data-network-count="' + i + '"]').prop('checked', jQuery('.b2s-post-item-details-release-input-lable-day-sa[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"').prop('checked'));
|
562 |
-
jQuery('.b2s-post-item-details-release-input-lable-day-so[data-network-count="' + i + '"]').prop('checked', jQuery('.b2s-post-item-details-release-input-lable-day-so[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"').prop('checked'));
|
563 |
-
}
|
564 |
-
if (curInterval == 1) {
|
565 |
-
jQuery('.b2s-post-item-details-release-input-months[data-network-count="' + i + '"]').val(jQuery('.b2s-post-item-details-release-input-months[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"]').val());
|
566 |
-
jQuery('.b2s-post-item-details-release-input-select-day[data-network-count="' + i + '"]').val(jQuery('.b2s-post-item-details-release-input-select-day[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"]').val());
|
567 |
-
}
|
568 |
-
if (curInterval == 2) {
|
569 |
-
jQuery('.b2s-post-item-details-release-input-times[data-network-count="' + i + '"]').val(jQuery('.b2s-post-item-details-release-input-times[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"]').val());
|
570 |
-
jQuery('.b2s-post-item-details-release-input-select-timespan[data-network-count="' + i + '"]').val(jQuery('.b2s-post-item-details-release-input-select-timespan[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"]').val());
|
571 |
-
}
|
572 |
-
}
|
573 |
-
}
|
574 |
-
|
575 |
-
if (dataNetworkCount == 2) {
|
576 |
-
jQuery('.b2s-post-item-details-release-input-add[data-network-count="0"]').hide();
|
577 |
-
jQuery('.b2s-post-item-details-release-input-add[data-network-count="1"]').hide();
|
578 |
-
jQuery('.b2s-post-item-details-release-input-hide[data-network-count="1"]').hide();
|
579 |
-
jQuery('.b2s-post-item-details-release-input-hide[data-network-count="2"]').show();
|
580 |
-
} else if (dataNetworkCount == 1) {
|
581 |
-
jQuery('.b2s-post-item-details-release-input-add[data-network-count="0"]').hide();
|
582 |
-
jQuery('.b2s-post-item-details-release-input-hide[data-network-count="1"]').show();
|
583 |
-
}
|
584 |
-
|
585 |
-
return false;
|
586 |
-
});
|
587 |
-
jQuery(document).on("click", ".b2s-user-network-settings-post-format", function () {
|
588 |
-
jQuery('.b2s-settings-user-success').hide();
|
589 |
-
jQuery('.b2s-settings-user-error').hide();
|
590 |
-
jQuery('.b2s-server-connection-fail').hide();
|
591 |
-
var networkId = jQuery(this).attr("data-network-id");
|
592 |
-
var networkType = jQuery(this).attr("data-network-type");
|
593 |
-
var postFormat = jQuery(this).val();
|
594 |
-
var networkAuthId = jQuery(this).attr("data-network-auth-id");
|
595 |
-
var postFormatType = jQuery(this).attr("data-post-format-type");
|
596 |
-
var postType = jQuery(this).attr("data-post-wp-type");
|
597 |
-
jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').val(postFormat);
|
598 |
-
//PostFormat
|
599 |
-
if (jQuery('.b2s-post-ship-item-post-format-text[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').length > 0) {
|
600 |
-
var postFormatText = JSON.parse(jQuery('.b2sNetworkSettingsPostFormatText').val());
|
601 |
-
if (jQuery('#user_version').val() >= 2) {
|
602 |
-
jQuery('.b2s-post-ship-item-post-format-text[data-network-auth-id="' + networkAuthId + '"]').html(postFormatText[postFormatType][postFormat]);
|
603 |
-
jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + networkAuthId + '"]').val(postFormat);
|
604 |
-
} else {
|
605 |
-
jQuery('.b2s-post-ship-item-post-format-text[data-network-id="' + networkId + '"]').html(postFormatText[postFormatType][postFormat]);
|
606 |
-
jQuery('.b2s-post-item-details-post-format[data-network-id="' + networkId + '"]').val(postFormat);
|
607 |
-
}
|
608 |
-
}
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
}
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
if (
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
jQuery('.b2s-post-item-details-
|
660 |
-
jQuery('.b2s-post-item-details-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
jQuery('.b2s-
|
702 |
-
|
703 |
-
|
704 |
-
jQuery('.
|
705 |
-
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').hide();
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
jQuery('.b2s-
|
712 |
-
jQuery('.b2s-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
jQuery(
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
'
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
jQuery('.
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
jQuery(
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
jQuery('
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
jQuery('.b2s-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
jQuery('.b2s-post-item-details-
|
885 |
-
jQuery('.b2s-post-item-
|
886 |
-
|
887 |
-
|
888 |
-
jQuery('.b2s-post-item-details-
|
889 |
-
jQuery('.b2s-post-item-details-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
}
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
'
|
957 |
-
'
|
958 |
-
'
|
959 |
-
'
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
if (
|
968 |
-
jQuery.
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
jQuery('.b2s-
|
1060 |
-
}
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
jQuery('.b2s-post-item-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
jQuery('.b2s-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
jQuery(
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
jQuery(
|
1268 |
-
|
1269 |
-
|
1270 |
-
jQuery(
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
jQuery(
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
jQuery
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
jQuery(
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
jQuery(
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
jQuery('.b2s-post-item-details-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
jQuery('.b2s-
|
1506 |
-
|
1507 |
-
|
1508 |
-
jQuery('
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
jQuery('.b2s-post-item-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
jQuery(
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
jQuery(
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
jQuery(
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
jQuery(
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
jQuery('.
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
}
|
1636 |
-
}
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
jQuery('
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
jQuery('
|
1652 |
-
jQuery('.
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
if (
|
1677 |
-
jQuery('
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
var
|
1697 |
-
var
|
1698 |
-
var
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
1734 |
-
|
1735 |
-
|
1736 |
-
|
1737 |
-
|
1738 |
-
|
1739 |
-
|
1740 |
-
|
1741 |
-
|
1742 |
-
|
1743 |
-
|
1744 |
-
|
1745 |
-
|
1746 |
-
|
1747 |
-
|
1748 |
-
|
1749 |
-
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
jQuery('.b2s-
|
1756 |
-
jQuery('.b2s-
|
1757 |
-
jQuery('.b2s-
|
1758 |
-
jQuery('
|
1759 |
-
|
1760 |
-
|
1761 |
-
jQuery(
|
1762 |
-
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
jQuery('.b2s-post-item-
|
1768 |
-
|
1769 |
-
|
1770 |
-
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
jQuery(
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
|
1794 |
-
|
1795 |
-
|
1796 |
-
|
1797 |
-
|
1798 |
-
jQuery('.b2s-post-item-details-
|
1799 |
-
jQuery(
|
1800 |
-
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
|
1840 |
-
|
1841 |
-
}
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
-
|
1847 |
-
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
1852 |
-
|
1853 |
-
jQuery('.b2s-post-item-details-
|
1854 |
-
|
1855 |
-
jQuery('
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
|
1860 |
-
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
|
1878 |
-
|
1879 |
-
|
1880 |
-
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
|
1885 |
-
|
1886 |
-
|
1887 |
-
|
1888 |
-
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
1892 |
-
|
1893 |
-
|
1894 |
-
|
1895 |
-
|
1896 |
-
|
1897 |
-
|
1898 |
-
|
1899 |
-
|
1900 |
-
|
1901 |
-
|
1902 |
-
|
1903 |
-
|
1904 |
-
|
1905 |
-
|
1906 |
-
|
1907 |
-
|
1908 |
-
|
1909 |
-
|
1910 |
-
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
jQuery('.b2s-
|
1915 |
-
|
1916 |
-
|
1917 |
-
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
|
1926 |
-
|
1927 |
-
}
|
1928 |
-
|
1929 |
-
|
1930 |
-
});
|
1931 |
-
jQuery(
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
|
1937 |
-
|
1938 |
-
|
1939 |
-
jQuery.
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
jQuery.
|
1944 |
-
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
1948 |
-
|
1949 |
-
|
1950 |
-
|
1951 |
-
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
if (
|
1956 |
-
|
1957 |
-
}
|
1958 |
-
if (jQuery.
|
1959 |
-
jQuery('
|
1960 |
-
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
|
1968 |
-
|
1969 |
-
|
1970 |
-
|
1971 |
-
jQuery.
|
1972 |
-
|
1973 |
-
|
1974 |
-
jQuery.
|
1975 |
-
|
1976 |
-
|
1977 |
-
|
1978 |
-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
|
1994 |
-
|
1995 |
-
|
1996 |
-
|
1997 |
-
|
1998 |
-
jQuery.
|
1999 |
-
jQuery.
|
2000 |
-
jQuery.
|
2001 |
-
|
2002 |
-
|
2003 |
-
|
2004 |
-
|
2005 |
-
|
2006 |
-
|
2007 |
-
|
2008 |
-
|
2009 |
-
|
2010 |
-
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
2017 |
-
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
|
2022 |
-
|
2023 |
-
|
2024 |
-
|
2025 |
-
|
2026 |
-
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
jQuery(
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
-
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
|
2091 |
-
|
2092 |
-
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
|
2107 |
-
|
2108 |
-
|
2109 |
-
|
2110 |
-
|
2111 |
-
|
2112 |
-
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
2137 |
-
'
|
2138 |
-
|
2139 |
-
|
2140 |
-
|
2141 |
-
|
2142 |
-
|
2143 |
-
|
2144 |
-
|
2145 |
-
|
2146 |
-
|
2147 |
-
|
2148 |
-
|
2149 |
-
|
2150 |
-
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
|
2157 |
-
|
2158 |
-
|
2159 |
-
|
2160 |
-
|
2161 |
-
|
2162 |
-
|
2163 |
-
|
2164 |
-
|
2165 |
-
|
2166 |
-
|
2167 |
-
|
2168 |
-
|
2169 |
-
|
2170 |
-
|
2171 |
-
});
|
2172 |
-
|
2173 |
-
|
2174 |
-
|
2175 |
-
|
2176 |
-
|
2177 |
-
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
2181 |
-
|
2182 |
-
|
2183 |
-
|
2184 |
-
|
2185 |
-
|
2186 |
-
|
2187 |
-
|
2188 |
-
|
2189 |
-
|
2190 |
-
|
2191 |
-
|
2192 |
-
|
2193 |
-
|
2194 |
-
|
2195 |
-
|
2196 |
-
|
2197 |
-
jQuery(
|
2198 |
-
|
2199 |
-
|
2200 |
-
|
2201 |
-
|
2202 |
-
jQuery('.b2s-
|
2203 |
-
|
2204 |
-
|
2205 |
-
|
2206 |
-
|
2207 |
-
|
2208 |
-
|
2209 |
-
|
2210 |
-
|
2211 |
-
|
2212 |
-
|
2213 |
-
|
2214 |
-
|
2215 |
-
|
2216 |
-
|
2217 |
-
|
2218 |
-
|
2219 |
-
|
2220 |
-
|
2221 |
-
|
2222 |
-
|
2223 |
-
|
2224 |
-
|
2225 |
-
|
2226 |
-
|
2227 |
-
}
|
2228 |
-
|
2229 |
-
|
2230 |
-
|
2231 |
-
|
2232 |
-
|
2233 |
-
|
2234 |
-
|
2235 |
-
|
2236 |
-
|
2237 |
-
|
2238 |
-
|
2239 |
-
|
2240 |
-
|
2241 |
-
+ '
|
2242 |
-
|
2243 |
-
|
2244 |
-
+ '
|
2245 |
-
|
2246 |
-
|
2247 |
-
|
2248 |
-
|
2249 |
-
|
2250 |
-
|
2251 |
-
|
2252 |
-
|
2253 |
-
|
2254 |
-
}
|
2255 |
-
|
2256 |
-
|
2257 |
-
|
2258 |
-
|
2259 |
-
|
2260 |
-
|
2261 |
-
|
2262 |
-
|
2263 |
-
|
2264 |
-
|
2265 |
-
|
2266 |
-
|
2267 |
-
|
2268 |
-
|
2269 |
-
|
2270 |
-
|
2271 |
-
|
2272 |
-
|
2273 |
-
|
2274 |
-
|
2275 |
-
|
2276 |
-
|
2277 |
-
|
2278 |
-
|
2279 |
-
|
2280 |
-
|
2281 |
-
|
2282 |
-
|
2283 |
-
|
2284 |
-
|
2285 |
-
|
2286 |
-
|
2287 |
-
|
2288 |
-
|
2289 |
-
|
2290 |
-
|
2291 |
-
|
2292 |
-
|
2293 |
-
|
2294 |
-
|
2295 |
-
|
2296 |
-
|
2297 |
-
|
2298 |
-
|
2299 |
-
|
2300 |
-
|
2301 |
-
|
2302 |
-
|
2303 |
-
|
2304 |
-
|
2305 |
-
|
2306 |
-
|
2307 |
-
|
2308 |
-
|
2309 |
-
|
2310 |
-
|
2311 |
-
|
2312 |
-
|
2313 |
-
|
2314 |
-
|
2315 |
-
|
2316 |
-
|
2317 |
-
|
2318 |
-
|
2319 |
-
|
2320 |
-
|
2321 |
-
|
2322 |
-
|
2323 |
-
|
2324 |
-
|
2325 |
-
|
2326 |
-
|
2327 |
-
|
2328 |
-
|
2329 |
-
|
2330 |
-
|
2331 |
-
|
2332 |
-
|
2333 |
-
|
2334 |
-
|
2335 |
-
|
2336 |
-
|
2337 |
-
|
2338 |
-
|
2339 |
-
|
2340 |
-
|
2341 |
-
|
2342 |
-
|
2343 |
-
|
2344 |
-
|
2345 |
-
|
2346 |
-
|
2347 |
-
var
|
2348 |
-
if (
|
2349 |
-
|
2350 |
-
|
2351 |
-
|
2352 |
-
|
2353 |
-
|
2354 |
-
|
2355 |
-
|
2356 |
-
|
2357 |
-
}
|
2358 |
-
|
2359 |
-
|
2360 |
-
|
2361 |
-
|
2362 |
-
function
|
2363 |
-
|
2364 |
-
|
2365 |
-
|
2366 |
-
|
2367 |
-
|
2368 |
-
|
2369 |
-
|
2370 |
-
|
2371 |
-
|
2372 |
-
|
2373 |
-
|
2374 |
-
|
2375 |
-
|
2376 |
-
|
2377 |
-
|
2378 |
-
|
2379 |
-
|
2380 |
-
|
2381 |
-
|
2382 |
-
|
2383 |
-
|
2384 |
-
|
2385 |
-
|
2386 |
-
|
2387 |
-
|
2388 |
-
|
2389 |
-
|
2390 |
-
|
2391 |
-
|
2392 |
-
|
2393 |
-
|
2394 |
-
|
2395 |
-
|
2396 |
-
|
2397 |
-
|
2398 |
-
|
2399 |
-
|
2400 |
-
|
2401 |
-
|
2402 |
-
|
2403 |
-
|
2404 |
-
}
|
2405 |
-
|
2406 |
-
|
2407 |
-
|
2408 |
-
|
2409 |
-
|
2410 |
-
|
2411 |
-
|
2412 |
-
|
2413 |
-
|
2414 |
-
|
2415 |
-
|
2416 |
-
|
2417 |
-
|
2418 |
-
|
2419 |
-
|
2420 |
-
|
2421 |
-
|
2422 |
-
|
2423 |
-
|
2424 |
-
|
2425 |
-
|
2426 |
-
|
2427 |
-
|
2428 |
-
|
2429 |
-
|
2430 |
-
|
2431 |
-
|
2432 |
-
|
2433 |
-
|
2434 |
-
|
2435 |
-
|
2436 |
-
|
2437 |
-
|
2438 |
-
|
2439 |
-
|
2440 |
-
jQuery
|
2441 |
-
|
2442 |
-
|
2443 |
-
|
2444 |
-
|
2445 |
-
|
2446 |
-
|
2447 |
-
|
2448 |
-
|
2449 |
-
|
2450 |
-
|
2451 |
-
|
2452 |
-
}
|
2453 |
-
|
2454 |
-
|
2455 |
-
|
2456 |
-
|
2457 |
-
|
2458 |
-
|
2459 |
-
|
2460 |
-
|
2461 |
-
|
2462 |
-
|
2463 |
-
|
2464 |
-
|
2465 |
-
|
2466 |
-
|
2467 |
-
|
2468 |
-
|
2469 |
-
|
2470 |
-
|
2471 |
-
|
2472 |
-
|
2473 |
-
|
2474 |
-
|
2475 |
-
|
2476 |
-
|
2477 |
-
|
2478 |
-
|
2479 |
-
|
2480 |
-
|
2481 |
-
|
2482 |
-
|
2483 |
-
|
2484 |
-
|
2485 |
-
|
2486 |
-
|
2487 |
-
|
2488 |
-
|
2489 |
-
|
2490 |
-
|
2491 |
-
|
2492 |
-
|
2493 |
-
|
2494 |
-
|
2495 |
-
|
2496 |
-
|
2497 |
-
|
2498 |
-
|
2499 |
-
|
2500 |
-
|
2501 |
-
|
2502 |
-
|
2503 |
-
|
2504 |
-
|
2505 |
-
|
2506 |
-
|
2507 |
-
|
2508 |
-
|
2509 |
-
|
2510 |
-
|
2511 |
-
|
2512 |
-
|
2513 |
-
|
2514 |
-
|
2515 |
-
|
2516 |
-
|
2517 |
-
|
2518 |
-
|
2519 |
-
|
2520 |
-
|
2521 |
-
|
2522 |
-
|
2523 |
-
|
2524 |
-
|
2525 |
-
|
2526 |
-
|
2527 |
-
|
2528 |
-
|
2529 |
-
|
2530 |
-
|
2531 |
-
|
2532 |
-
|
2533 |
-
|
2534 |
-
|
2535 |
-
|
2536 |
-
|
2537 |
-
|
2538 |
-
|
2539 |
-
|
2540 |
-
|
2541 |
-
|
2542 |
-
|
2543 |
-
|
2544 |
-
|
2545 |
-
|
2546 |
-
|
2547 |
-
|
2548 |
-
|
2549 |
-
|
2550 |
-
|
2551 |
-
|
2552 |
-
|
2553 |
-
|
2554 |
-
jQuery(
|
2555 |
-
|
2556 |
-
|
2557 |
-
jQuery('.b2s-post-item-details-release-
|
2558 |
-
|
2559 |
-
|
2560 |
-
|
2561 |
-
|
2562 |
-
jQuery(
|
2563 |
-
|
2564 |
-
|
2565 |
-
|
2566 |
-
|
2567 |
-
|
2568 |
-
|
2569 |
-
|
2570 |
-
|
2571 |
-
|
2572 |
-
|
2573 |
-
|
2574 |
-
|
2575 |
-
|
2576 |
-
|
2577 |
-
|
2578 |
-
|
2579 |
-
|
2580 |
-
|
2581 |
-
|
2582 |
-
|
2583 |
-
|
2584 |
-
|
2585 |
-
|
2586 |
-
|
2587 |
-
jQuery('.b2s-post-item-details-
|
2588 |
-
|
2589 |
-
|
2590 |
-
|
2591 |
-
|
2592 |
-
|
2593 |
-
|
2594 |
-
|
2595 |
-
|
2596 |
-
|
2597 |
-
|
2598 |
-
|
2599 |
-
|
2600 |
-
|
2601 |
-
jQuery('.b2s-
|
2602 |
-
|
2603 |
-
|
2604 |
-
jQuery(
|
2605 |
-
|
2606 |
-
|
2607 |
-
|
2608 |
-
|
2609 |
-
|
2610 |
-
|
2611 |
-
|
2612 |
-
|
2613 |
-
jQuery('.b2s-
|
2614 |
-
|
2615 |
-
|
2616 |
-
|
2617 |
-
|
2618 |
-
|
2619 |
-
|
2620 |
-
|
2621 |
-
|
2622 |
-
|
2623 |
-
|
2624 |
-
|
2625 |
-
|
2626 |
-
|
2627 |
-
|
2628 |
-
|
2629 |
-
|
2630 |
-
|
2631 |
-
|
2632 |
-
|
2633 |
-
|
2634 |
-
|
2635 |
-
|
2636 |
-
|
2637 |
-
|
2638 |
-
|
2639 |
-
|
2640 |
-
|
2641 |
-
|
2642 |
-
|
2643 |
-
|
2644 |
-
|
2645 |
-
|
2646 |
-
|
2647 |
-
jQuery(
|
2648 |
-
|
2649 |
-
|
2650 |
-
|
2651 |
-
|
2652 |
-
|
2653 |
-
|
2654 |
-
|
2655 |
-
|
2656 |
-
|
2657 |
-
|
2658 |
-
|
2659 |
-
|
2660 |
-
|
2661 |
-
|
2662 |
-
|
2663 |
-
|
2664 |
-
|
2665 |
-
|
2666 |
-
|
2667 |
-
|
2668 |
-
|
2669 |
-
|
2670 |
-
jQuery(
|
2671 |
-
|
2672 |
-
|
2673 |
-
|
2674 |
-
|
2675 |
-
|
2676 |
-
|
2677 |
-
jQuery('.b2s-
|
2678 |
-
jQuery('.b2s-post-item-details-
|
2679 |
-
|
2680 |
-
|
2681 |
-
|
2682 |
-
|
2683 |
-
|
2684 |
-
jQuery('.b2s-post-item-details-
|
2685 |
-
|
2686 |
-
|
2687 |
-
|
2688 |
-
|
2689 |
-
|
2690 |
-
|
2691 |
-
|
2692 |
-
|
2693 |
-
|
2694 |
-
|
2695 |
-
|
2696 |
-
|
2697 |
-
|
2698 |
-
|
2699 |
-
|
2700 |
-
jQuery('.b2s-
|
2701 |
-
jQuery('.b2s-
|
2702 |
-
jQuery('.b2s-
|
2703 |
-
|
2704 |
-
|
2705 |
-
jQuery('.b2s-
|
2706 |
-
jQuery('.b2s-
|
2707 |
-
|
2708 |
-
|
2709 |
-
|
2710 |
-
|
2711 |
-
|
2712 |
-
|
2713 |
-
|
2714 |
-
|
2715 |
-
|
2716 |
-
|
2717 |
-
|
2718 |
-
|
2719 |
-
|
2720 |
-
|
2721 |
-
|
2722 |
-
|
2723 |
-
|
2724 |
-
}
|
2725 |
-
|
2726 |
-
|
2727 |
-
|
2728 |
-
|
2729 |
-
|
2730 |
-
|
2731 |
-
|
2732 |
-
|
2733 |
-
|
2734 |
-
|
2735 |
-
|
2736 |
-
|
2737 |
-
|
2738 |
-
|
2739 |
-
|
2740 |
-
|
2741 |
-
|
2742 |
-
|
2743 |
-
|
2744 |
-
|
2745 |
-
|
2746 |
-
|
2747 |
-
|
2748 |
-
|
2749 |
-
|
2750 |
-
|
2751 |
-
|
2752 |
-
|
2753 |
-
|
2754 |
-
//
|
2755 |
-
jQuery('.b2s-post-item-details-release-
|
2756 |
-
|
2757 |
-
|
2758 |
-
|
2759 |
-
|
2760 |
-
|
2761 |
-
|
2762 |
-
|
2763 |
-
|
2764 |
-
|
2765 |
-
|
2766 |
-
|
2767 |
-
|
2768 |
-
|
2769 |
-
|
2770 |
-
|
2771 |
-
|
2772 |
-
|
2773 |
-
jQuery('.b2s-post-item-details-release-
|
2774 |
-
jQuery('.b2s-post-item-
|
2775 |
-
|
2776 |
-
jQuery('.b2s-post-item-details-release-
|
2777 |
-
jQuery('.b2s-post-item-details-release-
|
2778 |
-
jQuery('.b2s-post-item-details-release-input-weeks
|
2779 |
-
jQuery('.b2s-post-item-details-release-input-weeks
|
2780 |
-
|
2781 |
-
jQuery('.b2s-post-item-details-release-
|
2782 |
-
jQuery('.b2s-post-item-details-release-
|
2783 |
-
|
2784 |
-
jQuery('.b2s-post-item-details-release-
|
2785 |
-
|
2786 |
-
jQuery('.b2s-post-item-details-release-
|
2787 |
-
jQuery('.b2s-post-item-details-release-input-
|
2788 |
-
|
2789 |
-
|
2790 |
-
|
2791 |
-
|
2792 |
-
//
|
2793 |
-
|
2794 |
-
jQuery('.b2s-post-item-details-release-area-
|
2795 |
-
jQuery('.b2s-post-item-details-release-
|
2796 |
-
jQuery('.b2s-post-item-details-release-input-times
|
2797 |
-
|
2798 |
-
|
2799 |
-
jQuery('.b2s-post-item-details-release-
|
2800 |
-
jQuery('.b2s-post-item-details-release-input-select-timespan
|
2801 |
-
jQuery('.b2s-post-item-details-release-input-
|
2802 |
-
|
2803 |
-
|
2804 |
-
jQuery('.
|
2805 |
-
jQuery('.b2s-post-item-details-release-
|
2806 |
-
|
2807 |
-
jQuery('.b2s-post-item-details-release-
|
2808 |
-
jQuery('.b2s-post-item-details-release-area-label-duration
|
2809 |
-
jQuery('.b2s-post-item-details-release-
|
2810 |
-
jQuery('.b2s-post-item-details-release-
|
2811 |
-
|
2812 |
-
jQuery('.b2s-post-item-details-release-area-
|
2813 |
-
jQuery('.b2s-post-item-details-release-area-
|
2814 |
-
jQuery('.b2s-post-item-details-release-
|
2815 |
-
jQuery('.b2s-post-item-details-release-
|
2816 |
-
|
2817 |
-
jQuery('.b2s-post-item-details-release-area-
|
2818 |
-
|
2819 |
-
|
2820 |
-
|
2821 |
-
|
2822 |
-
|
2823 |
-
|
2824 |
-
|
2825 |
-
|
2826 |
-
|
2827 |
-
|
2828 |
-
|
2829 |
-
|
2830 |
-
|
2831 |
-
|
2832 |
-
|
2833 |
-
|
2834 |
-
|
2835 |
-
jQuery(
|
2836 |
-
|
2837 |
-
|
2838 |
-
|
2839 |
-
|
2840 |
-
|
2841 |
-
|
2842 |
-
|
2843 |
-
|
2844 |
-
|
2845 |
-
|
2846 |
-
|
2847 |
-
|
2848 |
-
|
2849 |
-
|
2850 |
-
|
2851 |
-
|
2852 |
-
|
2853 |
-
|
2854 |
-
|
2855 |
-
|
2856 |
-
|
2857 |
-
|
2858 |
-
|
2859 |
-
|
2860 |
-
|
2861 |
-
|
2862 |
-
|
2863 |
-
|
2864 |
-
|
2865 |
-
|
2866 |
-
|
2867 |
-
|
2868 |
-
|
2869 |
-
|
2870 |
-
|
2871 |
-
|
2872 |
-
|
2873 |
-
|
2874 |
-
|
2875 |
-
|
2876 |
-
|
2877 |
-
|
2878 |
-
|
2879 |
-
|
2880 |
-
jQuery(
|
2881 |
-
|
2882 |
-
|
2883 |
-
|
2884 |
-
|
2885 |
-
|
2886 |
-
|
2887 |
-
|
2888 |
-
|
2889 |
-
|
2890 |
-
|
2891 |
-
|
2892 |
-
|
2893 |
-
|
2894 |
-
|
2895 |
-
|
2896 |
-
|
2897 |
-
|
2898 |
-
|
2899 |
-
|
2900 |
-
|
2901 |
-
|
2902 |
-
|
2903 |
-
url
|
2904 |
-
jQuery(
|
2905 |
-
|
2906 |
-
|
2907 |
-
|
2908 |
-
|
2909 |
-
|
2910 |
-
|
2911 |
-
|
2912 |
-
|
2913 |
-
|
2914 |
-
|
2915 |
-
|
2916 |
-
|
2917 |
-
|
2918 |
-
|
2919 |
-
|
2920 |
-
|
2921 |
-
|
2922 |
-
|
2923 |
-
|
2924 |
-
|
2925 |
-
|
2926 |
-
|
2927 |
-
|
2928 |
-
|
2929 |
-
|
2930 |
-
|
2931 |
-
|
2932 |
-
|
2933 |
-
|
2934 |
-
|
2935 |
-
|
2936 |
-
|
2937 |
-
|
2938 |
-
|
2939 |
-
|
2940 |
-
|
2941 |
-
|
2942 |
-
|
2943 |
-
|
2944 |
-
|
2945 |
-
|
2946 |
-
|
2947 |
-
|
2948 |
-
|
2949 |
-
jQuery(
|
2950 |
-
|
2951 |
-
}
|
2952 |
-
|
2953 |
-
jQuery(
|
2954 |
-
|
2955 |
-
|
2956 |
-
|
2957 |
-
|
2958 |
-
|
2959 |
-
|
2960 |
-
|
2961 |
-
|
2962 |
-
|
2963 |
-
|
2964 |
-
|
2965 |
-
|
2966 |
-
|
2967 |
-
|
2968 |
-
|
2969 |
-
|
2970 |
-
|
2971 |
-
|
2972 |
-
|
2973 |
-
|
2974 |
-
|
2975 |
-
|
2976 |
-
|
2977 |
-
|
2978 |
-
|
2979 |
-
|
2980 |
-
|
2981 |
-
|
2982 |
-
|
2983 |
-
|
2984 |
-
|
2985 |
-
|
2986 |
-
|
2987 |
-
|
2988 |
-
jQuery(
|
2989 |
-
jQuery(
|
2990 |
-
|
2991 |
-
|
2992 |
-
|
2993 |
-
|
2994 |
-
jQuery(
|
2995 |
-
|
2996 |
-
|
2997 |
-
|
2998 |
-
|
2999 |
-
|
3000 |
-
|
3001 |
-
|
3002 |
-
|
3003 |
-
|
3004 |
-
|
3005 |
-
|
3006 |
-
|
3007 |
-
|
3008 |
-
|
3009 |
-
|
3010 |
-
|
3011 |
-
|
3012 |
-
|
3013 |
-
|
3014 |
-
|
3015 |
-
|
3016 |
-
|
3017 |
-
|
3018 |
-
|
3019 |
-
|
3020 |
-
|
3021 |
-
|
3022 |
-
|
3023 |
-
|
3024 |
-
|
3025 |
-
|
3026 |
-
|
3027 |
-
|
3028 |
-
|
3029 |
-
|
3030 |
-
|
3031 |
-
|
3032 |
-
|
3033 |
-
|
3034 |
-
|
3035 |
-
|
3036 |
-
|
3037 |
-
|
3038 |
-
|
3039 |
-
|
3040 |
-
|
3041 |
-
|
3042 |
-
|
3043 |
-
|
3044 |
-
|
3045 |
-
|
3046 |
-
|
3047 |
-
|
3048 |
-
|
3049 |
-
jQuery('.b2s-
|
3050 |
-
jQuery.
|
3051 |
-
|
3052 |
-
|
3053 |
-
|
3054 |
-
|
3055 |
-
|
3056 |
-
|
3057 |
-
|
3058 |
-
|
3059 |
-
|
3060 |
-
|
3061 |
-
|
3062 |
-
|
3063 |
-
|
3064 |
-
|
3065 |
-
|
3066 |
-
|
3067 |
-
|
3068 |
-
|
3069 |
-
|
3070 |
-
|
3071 |
-
|
3072 |
-
|
3073 |
-
|
3074 |
-
|
3075 |
-
|
3076 |
-
|
3077 |
-
|
3078 |
-
|
3079 |
-
|
3080 |
-
|
3081 |
-
|
3082 |
-
|
3083 |
-
|
3084 |
-
|
3085 |
-
var
|
3086 |
-
var
|
3087 |
-
var
|
3088 |
-
|
3089 |
-
if (
|
3090 |
-
|
3091 |
-
|
3092 |
-
|
3093 |
-
|
3094 |
-
|
3095 |
-
|
3096 |
-
|
3097 |
-
|
3098 |
-
|
3099 |
-
|
3100 |
-
|
3101 |
-
|
3102 |
-
|
3103 |
-
|
3104 |
-
|
3105 |
-
|
3106 |
-
|
3107 |
-
|
3108 |
-
|
3109 |
-
|
3110 |
-
|
3111 |
-
|
3112 |
-
|
3113 |
-
|
3114 |
-
|
3115 |
-
|
3116 |
-
|
3117 |
-
|
3118 |
-
|
3119 |
-
|
3120 |
-
|
3121 |
-
|
3122 |
-
|
3123 |
-
|
3124 |
-
var
|
3125 |
-
|
3126 |
-
|
3127 |
-
|
3128 |
-
|
3129 |
-
|
3130 |
-
|
3131 |
-
|
3132 |
-
|
3133 |
-
|
3134 |
-
|
3135 |
-
var
|
3136 |
-
if (
|
3137 |
-
|
3138 |
-
|
3139 |
-
|
3140 |
-
|
3141 |
-
|
3142 |
-
|
3143 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery.noConflict();
|
2 |
+
|
3 |
+
var b2sTosXingGroupCount = 0;
|
4 |
+
|
5 |
+
jQuery(document).on('heartbeat-send', function (e, data) {
|
6 |
+
data['b2s_heartbeat'] = 'b2s_listener';
|
7 |
+
});
|
8 |
+
|
9 |
+
jQuery.xhrPool = [];
|
10 |
+
|
11 |
+
jQuery(window).on("load", function () {
|
12 |
+
init(true);
|
13 |
+
imageSize();
|
14 |
+
if (jQuery('.toggelbutton').is(':visible') && !jQuery("#b2s-wrapper").hasClass("toggled")) {
|
15 |
+
jQuery('.btn-toggle-menu').trigger('click');
|
16 |
+
}
|
17 |
+
});
|
18 |
+
|
19 |
+
//Stop duplicate posts by page refreshing during the post process
|
20 |
+
jQuery(document).on('keydown', '#b2sNetworkSent', function (event) {
|
21 |
+
if (event.keyCode == 116) {
|
22 |
+
event.preventDefault();
|
23 |
+
return false;
|
24 |
+
}
|
25 |
+
});
|
26 |
+
|
27 |
+
jQuery(document).on('click', '.btn-toggle-menu', function () {
|
28 |
+
if (jQuery('.toggelbutton').is(':visible')) {
|
29 |
+
jQuery("#b2s-wrapper").toggleClass("toggled");
|
30 |
+
if (jQuery("#b2s-wrapper").hasClass("toggled")) {
|
31 |
+
jQuery(".sidebar-brand").hide();
|
32 |
+
jQuery(".btn-toggle-glyphicon").removeClass('glyphicon-chevron-right').addClass('glyphicon-chevron-left');
|
33 |
+
} else {
|
34 |
+
jQuery(".sidebar-brand").show();
|
35 |
+
jQuery(".btn-toggle-glyphicon").removeClass('glyphicon-chevron-left').addClass('glyphicon-chevron-right');
|
36 |
+
}
|
37 |
+
}
|
38 |
+
});
|
39 |
+
|
40 |
+
jQuery.sceditor.plugins.xhtml.allowedTags = ['h1', 'h2', 'p', 'br', 'i', 'b', 'a', 'img'];
|
41 |
+
jQuery.sceditor.command.set(
|
42 |
+
"h1", {
|
43 |
+
exec: function () {
|
44 |
+
if (this.currentBlockNode() == undefined || this.currentBlockNode().nodeName != 'H1') {
|
45 |
+
this.wysiwygEditorInsertHtml('<h1>', '</h1>');
|
46 |
+
} else {
|
47 |
+
jQuery(this.currentBlockNode()).replaceWith(this.currentBlockNode().innerText);
|
48 |
+
}
|
49 |
+
},
|
50 |
+
txtExec: ["<h1>", "</h1>"],
|
51 |
+
tooltip: "H1"
|
52 |
+
});
|
53 |
+
jQuery.sceditor.command.set(
|
54 |
+
"h2", {
|
55 |
+
exec: function () {
|
56 |
+
if (this.currentBlockNode() == undefined || this.currentBlockNode().nodeName != 'H2') {
|
57 |
+
this.wysiwygEditorInsertHtml('<h2>', '</h2>');
|
58 |
+
} else {
|
59 |
+
jQuery(this.currentBlockNode()).replaceWith(this.currentBlockNode().innerText);
|
60 |
+
}
|
61 |
+
},
|
62 |
+
txtExec: ["<h2>", "</h2>"], tooltip: "H2"});
|
63 |
+
|
64 |
+
jQuery.sceditor.command.set(
|
65 |
+
"custom-image", {
|
66 |
+
exec: function () {
|
67 |
+
var me = this;
|
68 |
+
if (typeof (b2s_is_calendar) != "undefined" && b2s_is_calendar)
|
69 |
+
{
|
70 |
+
jQuery('.b2s-network-select-image-content').html("");
|
71 |
+
jQuery.ajax({
|
72 |
+
url: ajaxurl,
|
73 |
+
type: "POST",
|
74 |
+
cache: false,
|
75 |
+
async: false,
|
76 |
+
data: {
|
77 |
+
'action': 'b2s_get_image_modal',
|
78 |
+
'id': b2s_current_post_id,
|
79 |
+
'image_url': ''
|
80 |
+
},
|
81 |
+
success: function (data) {
|
82 |
+
jQuery(".b2s-network-select-image-content").html(data);
|
83 |
+
}
|
84 |
+
});
|
85 |
+
}
|
86 |
+
var networkAuthId = jQuery(this.getContentAreaContainer()).parents('.b2s-post-item-details').find('.b2s-post-item-details-network-display-name').attr('data-network-auth-id');
|
87 |
+
jQuery('.b2s-image-change-this-network').attr('data-network-auth-id', networkAuthId);
|
88 |
+
jQuery('.b2s-upload-image').attr('data-network-auth-id', networkAuthId);
|
89 |
+
var content = "<img class='b2s-post-item-network-image-selected-account' height='22px' src='" + jQuery('.b2s-post-item-network-image[data-network-auth-id="' + networkAuthId + '"]').attr('src') + "' /> " + jQuery('.b2s-post-item-details-network-display-name[data-network-auth-id="' + networkAuthId + '"]').html();
|
90 |
+
jQuery('.b2s-selected-network-for-image-info').html(content);
|
91 |
+
jQuery('#b2s-network-select-image').modal('show');
|
92 |
+
jQuery('#b2sInsertImageType').val("1");
|
93 |
+
imageSize();
|
94 |
+
|
95 |
+
},
|
96 |
+
txtExec: function () {
|
97 |
+
var networkAuthId = jQuery(this.getContentAreaContainer()).parents('.b2s-post-item-details').find('.b2s-post-item-details-network-display-name').attr('data-network-auth-id');
|
98 |
+
jQuery('.b2s-image-change-this-network').attr('data-network-auth-id', networkAuthId);
|
99 |
+
jQuery('.b2s-upload-image').attr('data-network-auth-id', networkAuthId);
|
100 |
+
var content = "<img class='b2s-post-item-network-image-selected-account' height='22px' src='" + jQuery('.b2s-post-item-network-image[data-network-auth-id="' + networkAuthId + '"]').attr('src') + "' /> " + jQuery('.b2s-post-item-details-network-display-name[data-network-auth-id="' + networkAuthId + '"]').html();
|
101 |
+
jQuery('.b2s-selected-network-for-image-info').html(content);
|
102 |
+
jQuery('#b2s-network-select-image').modal('show');
|
103 |
+
jQuery('#b2sInsertImageType').val("1");
|
104 |
+
imageSize();
|
105 |
+
}, tooltip: "Image"});
|
106 |
+
|
107 |
+
|
108 |
+
jQuery(document).on('click', '.b2s-toogle-calendar-btn', function () {
|
109 |
+
|
110 |
+
var networkAuthId = jQuery(this).attr('data-network-auth-id');
|
111 |
+
var networkId = jQuery(this).attr('data-network-id');
|
112 |
+
var toogleBtnText = jQuery(this).attr('data-toogle-text-btn');
|
113 |
+
var currentBtnText = jQuery(this).text();
|
114 |
+
|
115 |
+
jQuery(this).text(toogleBtnText);
|
116 |
+
jQuery(this).attr('data-toogle-text-btn', currentBtnText);
|
117 |
+
|
118 |
+
//change to show
|
119 |
+
var calendar = jQuery('.b2s-post-item-calendar-area[data-network-auth-id="' + networkAuthId + '"]');
|
120 |
+
if (calendar.hasClass('hide')) {
|
121 |
+
calendar.removeClass('hide');
|
122 |
+
calendar.addClass('show');
|
123 |
+
jQuery('.b2s-calendar-filter-area[data-network-auth-id="' + networkAuthId + '"]').removeClass('hide');
|
124 |
+
|
125 |
+
if (calendar.is(':empty')) {
|
126 |
+
b2s_cur_source_ship_calendar[0] = ajaxurl + '?action=b2s_get_calendar_events&filter_network_auth=all&filter_network=' + networkId + '&filter_status=2';
|
127 |
+
|
128 |
+
jQuery('.b2s-post-item-calendar-area[data-network-auth-id="' + networkAuthId + '"]').fullCalendar({
|
129 |
+
editable: false,
|
130 |
+
locale: b2s_calendar_locale,
|
131 |
+
eventLimit: 2,
|
132 |
+
contentHeight: 530,
|
133 |
+
timeFormat: 'H:mm',
|
134 |
+
eventSources: [b2s_cur_source_ship_calendar[0]],
|
135 |
+
eventRender: function (event, element) {
|
136 |
+
show = true;
|
137 |
+
$header = jQuery("<div>").addClass("b2s-calendar-header");
|
138 |
+
$isRelayPost = '';
|
139 |
+
$isCuratedPost = '';
|
140 |
+
if (event.post_type == 'b2s_ex_post') {
|
141 |
+
$isCuratedPost = ' (Curated Post)';
|
142 |
+
}
|
143 |
+
if (event.relay_primary_post_id > 0) {
|
144 |
+
$isRelayPost = ' (Retweet)';
|
145 |
+
}
|
146 |
+
$network_name = jQuery("<span>").text(event.author + $isRelayPost + $isCuratedPost).addClass("network-name").css("display", "block");
|
147 |
+
element.find(".fc-time").after($network_name);
|
148 |
+
element.html(element.html());
|
149 |
+
$parent = element.parent();
|
150 |
+
$header.append(element.find(".fc-content"));
|
151 |
+
element.append($header);
|
152 |
+
$body = jQuery("<div>").addClass("b2s-calendar-body");
|
153 |
+
$body.append(event.avatar);
|
154 |
+
$body.append(element.find(".fc-title"));
|
155 |
+
$body.append(jQuery("<br>"));
|
156 |
+
var $em = jQuery("<em>").css("padding-top", "5px").css("display", "block");
|
157 |
+
$em.append("<img src='" + b2s_plugin_url + "assets/images/portale/" + event.network_id + "_flat.png' style='height: 16px;width: 16px;display: inline-block;padding-right: 2px;padding-left: 2px;' />")
|
158 |
+
$em.append(event.network_name);
|
159 |
+
$em.append(jQuery("<span>").text(": " + event.profile));
|
160 |
+
$body.append($em);
|
161 |
+
element.append($body);
|
162 |
+
},
|
163 |
+
dayRender: function (date, element) {
|
164 |
+
if (!jQuery(element[0]).hasClass('fc-past')) {
|
165 |
+
var date = jQuery(element[0]).attr('data-date');
|
166 |
+
var sel_element = jQuery(element[0]).closest('div').next('div').find('td[data-date="' + date + '"]');
|
167 |
+
$header = jQuery("<a>").html("+ <span class=\"hidden-sm hidden-xs\">" + jQuery("#b2sJSTextAddSchedule").val() + "</span>").addClass("b2s-calendar-add-schedule-btn").attr('href', '#').attr('data-network-auth-id', networkAuthId);
|
168 |
+
sel_element.append($header);
|
169 |
+
}
|
170 |
+
}
|
171 |
+
});
|
172 |
+
} else {
|
173 |
+
jQuery('.b2s-post-item-calendar-area[data-network-auth-id="' + networkAuthId + '"]').fullCalendar('refetchEvents');
|
174 |
+
}
|
175 |
+
|
176 |
+
} else {
|
177 |
+
calendar.removeClass('show');
|
178 |
+
calendar.addClass('hide');
|
179 |
+
jQuery('.b2s-calendar-filter-area[data-network-auth-id="' + networkAuthId + '"]').addClass('hide');
|
180 |
+
|
181 |
+
}
|
182 |
+
|
183 |
+
return false;
|
184 |
+
|
185 |
+
});
|
186 |
+
|
187 |
+
jQuery(document).on('click', '.b2s-calendar-add-schedule-btn', function () {
|
188 |
+
var selSchedDate = jQuery(this).parent('td').attr('data-date');
|
189 |
+
var networkAuthId = jQuery(this).attr('data-network-auth-id');
|
190 |
+
|
191 |
+
if (jQuery('#user_version').val() == 0) {
|
192 |
+
jQuery('.b2s-post-item-details-release-input-date-select-reset[data-network-auth-id="' + networkAuthId + '"]').val('0');
|
193 |
+
jQuery('#b2s-sched-post-modal').modal('show');
|
194 |
+
return false;
|
195 |
+
}
|
196 |
+
|
197 |
+
if (jQuery('#b2sUserLang').val() == 'de') {
|
198 |
+
selSchedDate = selSchedDate.substring(8, 10) + '.' + selSchedDate.substring(5, 7) + '.' + selSchedDate.substring(0, 4);
|
199 |
+
}
|
200 |
+
|
201 |
+
//isfirst
|
202 |
+
if (!jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"] option[value="1"]:selected').length > 0) {
|
203 |
+
jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').val('1').trigger("change");
|
204 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-count="0"][data-network-auth-id="' + networkAuthId + '"]').val(selSchedDate);
|
205 |
+
} else {
|
206 |
+
//add
|
207 |
+
var curSel = jQuery('.b2s-post-item-details-release-input-add[data-network-auth-id="' + networkAuthId + '"]').filter(':visible');
|
208 |
+
if (curSel.length > 0) {
|
209 |
+
curSel.trigger('click');
|
210 |
+
netCountNext = parseInt(curSel.attr('data-network-count')) + 1;
|
211 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-count="' + netCountNext + '"][data-network-auth-id="' + networkAuthId + '"]').val(selSchedDate);
|
212 |
+
} else {
|
213 |
+
//do not adding write to first
|
214 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-count="0"][data-network-auth-id="' + networkAuthId + '"]').val(selSchedDate);
|
215 |
+
}
|
216 |
+
}
|
217 |
+
return false;
|
218 |
+
});
|
219 |
+
|
220 |
+
jQuery(document).on('change', '.b2s-calendar-filter-network-sel', function () {
|
221 |
+
var newSource = ajaxurl + '?action=b2s_get_calendar_events&filter_network_auth=all&filter_network=' + jQuery(this).val() + '&filter_status=2';
|
222 |
+
var oldSource = ajaxurl + '?action=b2s_get_calendar_events&filter_network_auth=all&filter_network=' + jQuery(this).attr('data-last-sel') + '&filter_status=2';
|
223 |
+
jQuery(this).attr('data-last-sel', jQuery(this).val());
|
224 |
+
jQuery('.b2s-post-item-calendar-area[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').fullCalendar('removeEventSource', oldSource);
|
225 |
+
jQuery('.b2s-post-item-calendar-area[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').fullCalendar('addEventSource', newSource);
|
226 |
+
return false;
|
227 |
+
});
|
228 |
+
|
229 |
+
|
230 |
+
jQuery(document).on('click', '.b2s-get-settings-sched-time-default', function () {
|
231 |
+
jQuery('.b2s-server-connection-fail').hide();
|
232 |
+
jQuery.ajax({
|
233 |
+
url: ajaxurl,
|
234 |
+
type: "POST",
|
235 |
+
dataType: "json",
|
236 |
+
cache: false,
|
237 |
+
data: {
|
238 |
+
'action': 'b2s_get_settings_sched_time_default',
|
239 |
+
},
|
240 |
+
error: function () {
|
241 |
+
jQuery('.b2s-server-connection-fail').show();
|
242 |
+
return false;
|
243 |
+
},
|
244 |
+
success: function (data) {
|
245 |
+
if (data.result == true) {
|
246 |
+
var tomorrow = new Date();
|
247 |
+
if (jQuery('#b2sBlogPostSchedDate').length > 0) {
|
248 |
+
tomorrow.setTime(jQuery('#b2sBlogPostSchedDate').val());
|
249 |
+
}
|
250 |
+
tomorrow.setDate(tomorrow.getDate() + 1);
|
251 |
+
var tomorrowMonth = ("0" + (tomorrow.getMonth() + 1)).slice(-2);
|
252 |
+
var tomorrowDate = ("0" + tomorrow.getDate()).slice(-2);
|
253 |
+
var dateTomorrow = tomorrow.getFullYear() + "-" + tomorrowMonth + "-" + tomorrowDate;
|
254 |
+
var today = new Date();
|
255 |
+
if (jQuery('#b2sBlogPostSchedDate').length > 0) {
|
256 |
+
today.setTime(jQuery('#b2sBlogPostSchedDate').val());
|
257 |
+
}
|
258 |
+
|
259 |
+
var todayMonth = ("0" + (today.getMonth() + 1)).slice(-2);
|
260 |
+
var todayDate = ("0" + today.getDate()).slice(-2);
|
261 |
+
var dateToday = today.getFullYear() + "-" + todayMonth + "-" + todayDate;
|
262 |
+
var lang = jQuery('#b2sUserLang').val();
|
263 |
+
if (lang == "de") {
|
264 |
+
dateTomorrow = tomorrowDate + "." + tomorrowMonth + "." + tomorrow.getFullYear();
|
265 |
+
dateToday = todayDate + "." + todayMonth + "." + today.getFullYear();
|
266 |
+
}
|
267 |
+
|
268 |
+
jQuery.each(data.times, function (network_id, time) {
|
269 |
+
if (jQuery('.b2s-post-item[data-network-id="' + network_id + '"]').is(":visible")) {
|
270 |
+
time.forEach(function (network_type_time, count) {
|
271 |
+
if (network_type_time != "") {
|
272 |
+
jQuery('.b2s-post-item-details-release-input-date-select[data-network-id="' + network_id + '"][data-network-type="' + count + '"]').each(function () {
|
273 |
+
if (jQuery(this).is(':not(:disabled)')) {
|
274 |
+
var networkAuthId = jQuery(this).attr('data-network-auth-id');
|
275 |
+
//is not set special dates
|
276 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"]').val() == '0') {
|
277 |
+
jQuery('.b2s-post-item-details-release-input-date-select[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"]').val('1').trigger("change");
|
278 |
+
}
|
279 |
+
jQuery('.b2s-post-item-details-release-input-time[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').val(network_type_time);
|
280 |
+
jQuery('.b2s-post-item-details-release-input-time[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').timepicker('setTime', network_type_time);
|
281 |
+
var hours = network_type_time.substring(0, 2);
|
282 |
+
if (lang == "en") {
|
283 |
+
var timeparts = network_type_time.split(' ');
|
284 |
+
hours = (timeparts[1] == 'AM') ? hours : (parseInt(hours) + 12);
|
285 |
+
}
|
286 |
+
if (hours < today.getHours()) {
|
287 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').val(dateTomorrow);
|
288 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').datepicker('update', dateTomorrow);
|
289 |
+
} else {
|
290 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').val(dateToday);
|
291 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').datepicker('update', dateToday);
|
292 |
+
}
|
293 |
+
}
|
294 |
+
});
|
295 |
+
count++;
|
296 |
+
}
|
297 |
+
});
|
298 |
+
}
|
299 |
+
});
|
300 |
+
}
|
301 |
+
}
|
302 |
+
});
|
303 |
+
return false;
|
304 |
+
});
|
305 |
+
|
306 |
+
|
307 |
+
function formatAMPM(date) {
|
308 |
+
var hours = date.getHours();
|
309 |
+
var minutes = date.getMinutes();
|
310 |
+
var ampm = hours >= 12 ? 'pm' : 'am';
|
311 |
+
hours = hours % 12;
|
312 |
+
hours = hours ? hours : 12; // the hour '0' should be '12'
|
313 |
+
minutes = minutes < 10 ? '0' + minutes : minutes;
|
314 |
+
var strTime = hours + ':' + minutes + ' ' + ampm;
|
315 |
+
return strTime;
|
316 |
+
}
|
317 |
+
|
318 |
+
|
319 |
+
|
320 |
+
jQuery(document).on('click', '.b2s-sidbar-network-auth-btn', function () {
|
321 |
+
jQuery('#b2s-network-list-modal').modal('show');
|
322 |
+
return false;
|
323 |
+
});
|
324 |
+
jQuery(document).on('click', '.change-meta-tag', function () {
|
325 |
+
var attr = jQuery(this).attr('readonly');
|
326 |
+
if (typeof attr !== typeof undefined && attr !== false) {
|
327 |
+
var networkAuthId = jQuery(this).attr("data-network-auth-id");
|
328 |
+
//Content cuation
|
329 |
+
var postType = jQuery('.b2s-post-ship-item-post-format[data-network-auth-id=' + networkAuthId + ']').attr('data-post-wp-type');
|
330 |
+
if (postType != "ex") {
|
331 |
+
jQuery('.meta-text').hide();
|
332 |
+
var postFormat = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').val();
|
333 |
+
var networkId = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').attr("data-network-id");
|
334 |
+
var isMetaChecked = false;
|
335 |
+
if (networkId == "1" && jQuery('#isOgMetaChecked').val() == "1") {
|
336 |
+
isMetaChecked = true;
|
337 |
+
}
|
338 |
+
if (networkId == "2" && jQuery('#isCardMetaChecked').val() == "1") {
|
339 |
+
isMetaChecked = true;
|
340 |
+
}
|
341 |
+
var showDefault = true;
|
342 |
+
if (postFormat == "0" && !isMetaChecked) { //isLinkPost
|
343 |
+
showDefault = false;
|
344 |
+
if (networkId == "1") {
|
345 |
+
jQuery('.isOgMetaChecked').show();
|
346 |
+
} else {
|
347 |
+
jQuery('.isCardMetaChecked').show();
|
348 |
+
}
|
349 |
+
}
|
350 |
+
if (showDefault) {
|
351 |
+
jQuery('.isLinkPost').show();
|
352 |
+
}
|
353 |
+
jQuery('#b2s-info-change-meta-tag-modal').modal('show');
|
354 |
+
}
|
355 |
+
}
|
356 |
+
return false;
|
357 |
+
});
|
358 |
+
// Linkpost change Meta Tags title + desc
|
359 |
+
jQuery(document).on('keyup', '.change-meta-tag', function () {
|
360 |
+
var currentText = jQuery(this).val();
|
361 |
+
var metaTag = jQuery(this).attr('data-meta');
|
362 |
+
var networkAuthId = jQuery(this).attr('data-network-auth-id');
|
363 |
+
var postFormat = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').val();
|
364 |
+
var networkId = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').attr('data-network-id');
|
365 |
+
if (typeof postFormat !== typeof undefined && postFormat !== false) {
|
366 |
+
if (postFormat == "0") { //if linkpost
|
367 |
+
jQuery('.b2s-post-item-details-post-format[data-network-id=' + networkId + ']').each(function () {
|
368 |
+
if (jQuery(this).val() == "0" && jQuery('.b2s-post-ship-item-post-format[data-network-auth-id=' + jQuery(this).attr('data-network-auth-id') + ']').is(":visible") && jQuery(this).attr('data-network-auth-id') != networkAuthId) { //other Linkpost by same network
|
369 |
+
//override this content with current content by keyup
|
370 |
+
jQuery('.' + metaTag + '[data-network-auth-id=' + jQuery(this).attr('data-network-auth-id') + ']').val(currentText);
|
371 |
+
}
|
372 |
+
});
|
373 |
+
}
|
374 |
+
}
|
375 |
+
return false;
|
376 |
+
});
|
377 |
+
jQuery(document).on('click', '.b2s-get-settings-sched-time-user', function () {
|
378 |
+
jQuery('.b2s-server-connection-fail').hide();
|
379 |
+
jQuery.ajax({
|
380 |
+
url: ajaxurl,
|
381 |
+
type: "POST",
|
382 |
+
dataType: "json",
|
383 |
+
cache: false,
|
384 |
+
data: {
|
385 |
+
'action': 'b2s_get_settings_sched_time_user',
|
386 |
+
},
|
387 |
+
error: function () {
|
388 |
+
jQuery('.b2s-server-connection-fail').show();
|
389 |
+
return false;
|
390 |
+
},
|
391 |
+
success: function (data) {
|
392 |
+
var tomorrow = new Date();
|
393 |
+
if (jQuery('#b2sBlogPostSchedDate').length > 0) {
|
394 |
+
tomorrow.setTime(jQuery('#b2sBlogPostSchedDate').val());
|
395 |
+
}
|
396 |
+
|
397 |
+
tomorrow.setDate(tomorrow.getDate() + 1);
|
398 |
+
var tomorrowMonth = ("0" + (tomorrow.getMonth() + 1)).slice(-2);
|
399 |
+
var tomorrowDate = ("0" + tomorrow.getDate()).slice(-2);
|
400 |
+
var dateTomorrow = tomorrow.getFullYear() + "-" + tomorrowMonth + "-" + tomorrowDate;
|
401 |
+
var today = new Date();
|
402 |
+
if (jQuery('#b2sBlogPostSchedDate').length > 0) {
|
403 |
+
today.setTime(jQuery('#b2sBlogPostSchedDate').val());
|
404 |
+
}
|
405 |
+
|
406 |
+
var todayMonth = ("0" + (today.getMonth() + 1)).slice(-2);
|
407 |
+
var todayDate = ("0" + today.getDate()).slice(-2);
|
408 |
+
var dateToday = today.getFullYear() + "-" + todayMonth + "-" + todayDate;
|
409 |
+
var lang = jQuery('#b2sUserLang').val();
|
410 |
+
if (lang == "de") {
|
411 |
+
dateTomorrow = tomorrowDate + "." + tomorrowMonth + "." + tomorrow.getFullYear();
|
412 |
+
dateToday = todayDate + "." + todayMonth + "." + today.getFullYear();
|
413 |
+
}
|
414 |
+
if (data.result == true) {
|
415 |
+
//V5.1.0 seeding
|
416 |
+
if (data.type == 'new') {
|
417 |
+
//new
|
418 |
+
jQuery.each(data.times, function (network_auth_id, time) {
|
419 |
+
if (jQuery('.b2s-post-item[data-network-auth-id="' + network_auth_id + '"]').is(":visible")) {
|
420 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + network_auth_id + '"]').is(':not(:disabled)')) {
|
421 |
+
//is not set special dates
|
422 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + network_auth_id + '"]').val() == '0') {
|
423 |
+
jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + network_auth_id + '"]').val('1').trigger("change");
|
424 |
+
}
|
425 |
+
jQuery('.b2s-post-item-details-release-input-time[data-network-auth-id="' + network_auth_id + '"][data-network-count="0"]').val(time);
|
426 |
+
jQuery('.b2s-post-item-details-release-input-time[data-network-auth-id="' + network_auth_id + '"][data-network-count="0"]').timepicker('setTime', time);
|
427 |
+
var hours = time.substring(0, 2);
|
428 |
+
if (lang == "en") {
|
429 |
+
var timeparts = time.split(' ');
|
430 |
+
hours = (timeparts[1] == 'AM') ? hours : (parseInt(hours) + 12);
|
431 |
+
}
|
432 |
+
|
433 |
+
var isDelay = false;
|
434 |
+
var delayDay = data.delay_day[network_auth_id];
|
435 |
+
if (delayDay != undefined) {
|
436 |
+
if (delayDay > 0) {
|
437 |
+
var delay = new Date();
|
438 |
+
delay.setDate(today.getDate() + parseInt(delayDay));
|
439 |
+
var delayMonth = ("0" + (delay.getMonth() + 1)).slice(-2);
|
440 |
+
var delayDate = ("0" + delay.getDate()).slice(-2);
|
441 |
+
var dateDelay = delay.getFullYear() + "-" + delayMonth + "-" + delayDate;
|
442 |
+
if (lang == 'de') {
|
443 |
+
dateDelay = delayDate + '.' + delayMonth + "." + delay.getFullYear();
|
444 |
+
}
|
445 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + network_auth_id + '"][data-network-count="0"]').val(dateDelay);
|
446 |
+
isDelay = true;
|
447 |
+
|
448 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + network_auth_id + '"][data-network-count="0"]').datepicker('update', dateDelay);
|
449 |
+
}
|
450 |
+
}
|
451 |
+
if (!isDelay) {
|
452 |
+
if (hours < today.getHours()) {
|
453 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + network_auth_id + '"][data-network-count="0"]').val(dateTomorrow);
|
454 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + network_auth_id + '"][data-network-count="0"]').datepicker('update', dateTomorrow);
|
455 |
+
} else {
|
456 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + network_auth_id + '"][data-network-count="0"]').val(dateToday);
|
457 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + network_auth_id + '"][data-network-count="0"]').datepicker('update', dateToday);
|
458 |
+
}
|
459 |
+
}
|
460 |
+
}
|
461 |
+
}
|
462 |
+
});
|
463 |
+
} else {
|
464 |
+
//old
|
465 |
+
jQuery.each(data.times, function (network_id, time) {
|
466 |
+
if (jQuery('.b2s-post-item[data-network-id="' + network_id + '"]').is(":visible")) {
|
467 |
+
time.forEach(function (network_type_time, count) {
|
468 |
+
if (network_type_time != "") {
|
469 |
+
jQuery('.b2s-post-item-details-release-input-date-select[data-network-id="' + network_id + '"][data-network-type="' + count + '"]').each(function () {
|
470 |
+
if (jQuery(this).is(':not(:disabled)')) {
|
471 |
+
var networkAuthId = jQuery(this).attr('data-network-auth-id');
|
472 |
+
//is not set special dates
|
473 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"]').val() != '1') {
|
474 |
+
jQuery('.b2s-post-item-details-release-input-date-select[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"]').val('1').trigger("change");
|
475 |
+
}
|
476 |
+
jQuery('.b2s-post-item-details-release-input-time[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').val(network_type_time);
|
477 |
+
jQuery('.b2s-post-item-details-release-input-time[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').timepicker('setTime', network_type_time);
|
478 |
+
var hours = network_type_time.substring(0, 2);
|
479 |
+
if (lang == "en") {
|
480 |
+
var timeparts = network_type_time.split(' ');
|
481 |
+
hours = (timeparts[1] == 'AM') ? hours : (parseInt(hours) + 12);
|
482 |
+
}
|
483 |
+
if (hours < today.getHours()) {
|
484 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').val(dateTomorrow);
|
485 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').datepicker('update', dateTomorrow);
|
486 |
+
} else {
|
487 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').val(dateToday);
|
488 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').datepicker('update', dateToday);
|
489 |
+
}
|
490 |
+
}
|
491 |
+
});
|
492 |
+
count++;
|
493 |
+
}
|
494 |
+
});
|
495 |
+
}
|
496 |
+
});
|
497 |
+
}
|
498 |
+
} else {
|
499 |
+
//default load best Times
|
500 |
+
//jQuery('.b2s-get-settings-sched-time-default').trigger('click');
|
501 |
+
//set current time
|
502 |
+
jQuery('.b2s-post-item:visible').each(function () {
|
503 |
+
var networkAuthId = jQuery(this).attr('data-network-auth-id');
|
504 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').is(':not(:disabled)')) {
|
505 |
+
//is not set special dates
|
506 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').val() != '1') {
|
507 |
+
jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').val('1').trigger("change");
|
508 |
+
}
|
509 |
+
}
|
510 |
+
});
|
511 |
+
}
|
512 |
+
}
|
513 |
+
});
|
514 |
+
return false;
|
515 |
+
});
|
516 |
+
jQuery('#b2sPreFeatureModal').on('show.bs.modal', function () {
|
517 |
+
jQuery('.b2s-post-item-details-release-input-date-select-reset').val('0');
|
518 |
+
});
|
519 |
+
jQuery(document).on('click', '.b2s-network-list-add-btn-profeature', function () {
|
520 |
+
jQuery('#b2s-network-list-modal').modal('hide');
|
521 |
+
});
|
522 |
+
jQuery(document).on('click', '.b2s-post-item-details-release-area-sched-for-all', function () {
|
523 |
+
var dataNetworkAuthId = jQuery(this).attr('data-network-auth-id');
|
524 |
+
var dataNetworkCount = 0;
|
525 |
+
var selMode = jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + dataNetworkAuthId + '"]').val();
|
526 |
+
if (jQuery('.b2s-post-item-details-release-area-details-row[data-network-auth-id="' + dataNetworkAuthId + '"][data-network-count="1"]').is(":visible")) {
|
527 |
+
dataNetworkCount = 1;
|
528 |
+
}
|
529 |
+
if (jQuery('.b2s-post-item-details-release-area-details-row[data-network-auth-id="' + dataNetworkAuthId + '"][data-network-count="2"]').is(":visible")) {
|
530 |
+
dataNetworkCount = 2;
|
531 |
+
}
|
532 |
+
|
533 |
+
jQuery('.b2s-post-item-details-release-input-date-select').each(function () {
|
534 |
+
if (jQuery(this).attr('data-network-auth-id') != dataNetworkAuthId && jQuery(this).has('option[value="' + jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + dataNetworkAuthId + '"]').val() + '"]').length > 0) {
|
535 |
+
jQuery(this).val(jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + dataNetworkAuthId + '"]').val());
|
536 |
+
//view elements
|
537 |
+
releaseChoose(jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + dataNetworkAuthId + '"]').val(), jQuery(this).attr('data-network-auth-id'), dataNetworkCount);
|
538 |
+
//view elements interval
|
539 |
+
if (selMode == 2) {
|
540 |
+
for (var i = 0; i <= dataNetworkCount; i++) {
|
541 |
+
var curInterval = jQuery('.b2s-post-item-details-release-input-interval-select[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"]').val();
|
542 |
+
releaseChooseInterval(curInterval, '[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]', i);
|
543 |
+
}
|
544 |
+
}
|
545 |
+
}
|
546 |
+
});
|
547 |
+
//set values
|
548 |
+
for (var i = 0; i <= dataNetworkCount; i++) {
|
549 |
+
jQuery('.b2s-post-item-details-release-input-time[data-network-count="' + i + '"]').val(jQuery('.b2s-post-item-details-release-input-time[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"]').val());
|
550 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-count="' + i + '"]').val(jQuery('.b2s-post-item-details-release-input-date[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"]').val());
|
551 |
+
if (selMode == 2) {
|
552 |
+
var curInterval = jQuery('.b2s-post-item-details-release-input-interval-select[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"]').val();
|
553 |
+
jQuery('.b2s-post-item-details-release-input-interval-select[data-network-count="' + i + '"]').val(curInterval);
|
554 |
+
if (curInterval == 0) {
|
555 |
+
jQuery('.b2s-post-item-details-release-input-weeks[data-network-count="' + i + '"]').val(jQuery('.b2s-post-item-details-release-input-weeks[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"]').val());
|
556 |
+
jQuery('.b2s-post-item-details-release-input-lable-day-mo[data-network-count="' + i + '"]').prop('checked', jQuery('.b2s-post-item-details-release-input-lable-day-mo[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"').prop('checked'));
|
557 |
+
jQuery('.b2s-post-item-details-release-input-lable-day-di[data-network-count="' + i + '"]').prop('checked', jQuery('.b2s-post-item-details-release-input-lable-day-di[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"').prop('checked'));
|
558 |
+
jQuery('.b2s-post-item-details-release-input-lable-day-mi[data-network-count="' + i + '"]').prop('checked', jQuery('.b2s-post-item-details-release-input-lable-day-mi[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"').prop('checked'));
|
559 |
+
jQuery('.b2s-post-item-details-release-input-lable-day-do[data-network-count="' + i + '"]').prop('checked', jQuery('.b2s-post-item-details-release-input-lable-day-do[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"').prop('checked'));
|
560 |
+
jQuery('.b2s-post-item-details-release-input-lable-day-fr[data-network-count="' + i + '"]').prop('checked', jQuery('.b2s-post-item-details-release-input-lable-day-fr[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"').prop('checked'));
|
561 |
+
jQuery('.b2s-post-item-details-release-input-lable-day-sa[data-network-count="' + i + '"]').prop('checked', jQuery('.b2s-post-item-details-release-input-lable-day-sa[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"').prop('checked'));
|
562 |
+
jQuery('.b2s-post-item-details-release-input-lable-day-so[data-network-count="' + i + '"]').prop('checked', jQuery('.b2s-post-item-details-release-input-lable-day-so[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"').prop('checked'));
|
563 |
+
}
|
564 |
+
if (curInterval == 1) {
|
565 |
+
jQuery('.b2s-post-item-details-release-input-months[data-network-count="' + i + '"]').val(jQuery('.b2s-post-item-details-release-input-months[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"]').val());
|
566 |
+
jQuery('.b2s-post-item-details-release-input-select-day[data-network-count="' + i + '"]').val(jQuery('.b2s-post-item-details-release-input-select-day[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"]').val());
|
567 |
+
}
|
568 |
+
if (curInterval == 2) {
|
569 |
+
jQuery('.b2s-post-item-details-release-input-times[data-network-count="' + i + '"]').val(jQuery('.b2s-post-item-details-release-input-times[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"]').val());
|
570 |
+
jQuery('.b2s-post-item-details-release-input-select-timespan[data-network-count="' + i + '"]').val(jQuery('.b2s-post-item-details-release-input-select-timespan[data-network-count="' + i + '"][data-network-auth-id="' + dataNetworkAuthId + '"]').val());
|
571 |
+
}
|
572 |
+
}
|
573 |
+
}
|
574 |
+
|
575 |
+
if (dataNetworkCount == 2) {
|
576 |
+
jQuery('.b2s-post-item-details-release-input-add[data-network-count="0"]').hide();
|
577 |
+
jQuery('.b2s-post-item-details-release-input-add[data-network-count="1"]').hide();
|
578 |
+
jQuery('.b2s-post-item-details-release-input-hide[data-network-count="1"]').hide();
|
579 |
+
jQuery('.b2s-post-item-details-release-input-hide[data-network-count="2"]').show();
|
580 |
+
} else if (dataNetworkCount == 1) {
|
581 |
+
jQuery('.b2s-post-item-details-release-input-add[data-network-count="0"]').hide();
|
582 |
+
jQuery('.b2s-post-item-details-release-input-hide[data-network-count="1"]').show();
|
583 |
+
}
|
584 |
+
|
585 |
+
return false;
|
586 |
+
});
|
587 |
+
jQuery(document).on("click", ".b2s-user-network-settings-post-format", function () {
|
588 |
+
jQuery('.b2s-settings-user-success').hide();
|
589 |
+
jQuery('.b2s-settings-user-error').hide();
|
590 |
+
jQuery('.b2s-server-connection-fail').hide();
|
591 |
+
var networkId = jQuery(this).attr("data-network-id");
|
592 |
+
var networkType = jQuery(this).attr("data-network-type");
|
593 |
+
var postFormat = jQuery(this).val();
|
594 |
+
var networkAuthId = jQuery(this).attr("data-network-auth-id");
|
595 |
+
var postFormatType = jQuery(this).attr("data-post-format-type");
|
596 |
+
var postType = jQuery(this).attr("data-post-wp-type");
|
597 |
+
jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').val(postFormat);
|
598 |
+
//PostFormat
|
599 |
+
if (jQuery('.b2s-post-ship-item-post-format-text[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').length > 0) {
|
600 |
+
var postFormatText = JSON.parse(jQuery('.b2sNetworkSettingsPostFormatText').val());
|
601 |
+
if (jQuery('#user_version').val() >= 2) {
|
602 |
+
jQuery('.b2s-post-ship-item-post-format-text[data-network-auth-id="' + networkAuthId + '"]').html(postFormatText[postFormatType][postFormat]);
|
603 |
+
jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + networkAuthId + '"]').val(postFormat);
|
604 |
+
} else {
|
605 |
+
jQuery('.b2s-post-ship-item-post-format-text[data-network-id="' + networkId + '"]').html(postFormatText[postFormatType][postFormat]);
|
606 |
+
jQuery('.b2s-post-item-details-post-format[data-network-id="' + networkId + '"]').val(postFormat);
|
607 |
+
}
|
608 |
+
}
|
609 |
+
var textLimit = jQuery('.b2s-post-item-details-item-message-input[data-network-count="-1"][data-network-auth-id="' + networkAuthId + '"]').attr('data-network-text-limit');
|
610 |
+
if (textLimit != "0") {
|
611 |
+
networkLimitAll(networkAuthId, networkId, textLimit);
|
612 |
+
} else {
|
613 |
+
networkCount(networkAuthId);
|
614 |
+
}
|
615 |
+
|
616 |
+
//Edit Meta Tags
|
617 |
+
var isMetaChecked = false;
|
618 |
+
if (networkId == "1" && jQuery('#isOgMetaChecked').val() == "1") {
|
619 |
+
isMetaChecked = true;
|
620 |
+
}
|
621 |
+
if (networkId == "2" && jQuery('#isCardMetaChecked').val() == "1") {
|
622 |
+
isMetaChecked = true;
|
623 |
+
}
|
624 |
+
if (isMetaChecked && postFormat == '0' && jQuery('#user_version').val() > 0) { //If linkpost
|
625 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", false);
|
626 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", false);
|
627 |
+
var dataMetaType = jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + networkAuthId + '"]').attr("data-meta-type");
|
628 |
+
if (dataMetaType == "og") {
|
629 |
+
jQuery('#b2sChangeOgMeta').val("1");
|
630 |
+
} else {
|
631 |
+
jQuery('#b2sChangeCardMeta').val("1");
|
632 |
+
}
|
633 |
+
|
634 |
+
//Copy from further item meta tags by same network
|
635 |
+
jQuery('.b2s-post-item-details-post-format[data-network-id=' + networkId + ']').each(function () {
|
636 |
+
if (jQuery(this).val() == "0" && jQuery('.b2s-post-ship-item-post-format[data-network-auth-id=' + jQuery(this).attr('data-network-auth-id') + ']').is(":visible") && jQuery(this).attr('data-network-auth-id') != networkAuthId) { //other Linkpost by same network
|
637 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + networkAuthId + '"]').val(jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
|
638 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + networkAuthId + '"]').val(jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
|
639 |
+
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + networkAuthId + '"]').attr('src', jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').attr('src'));
|
640 |
+
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val(jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
|
641 |
+
if (jQuery('.b2s-image-remove-btn[data-network-count="-1"][data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]:visible').length == 1) {
|
642 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="-1"]').show();
|
643 |
+
} else {
|
644 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="-1"]').hide();
|
645 |
+
}
|
646 |
+
|
647 |
+
return true;
|
648 |
+
}
|
649 |
+
});
|
650 |
+
|
651 |
+
//Set & Check Link
|
652 |
+
if (typeof jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]') !== undefined) {
|
653 |
+
//Facebook + Twitter && Linkpost
|
654 |
+
if (networkId == 1 || networkId == 2 && postFormat == 0) {
|
655 |
+
if (jQuery('.b2s-post-item-details-item-url-input[data-network-auth-id="' + networkAuthId + '"]').val() == "") {
|
656 |
+
jQuery('.b2s-post-item-details-item-url-input[data-network-auth-id="' + networkAuthId + '"]').val(jQuery('#b2sDefault_url').val());
|
657 |
+
}
|
658 |
+
}
|
659 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').show();
|
660 |
+
if (!jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').hasClass('disabled')) {
|
661 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').trigger("click");
|
662 |
+
} else {
|
663 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').removeClass('disabled');
|
664 |
+
}
|
665 |
+
}
|
666 |
+
|
667 |
+
//Facebook TOS 072018 - Instant Sharing - Image post without Text > set to readonly
|
668 |
+
if (networkId == 1 && networkType == 0) {
|
669 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", false);
|
670 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + networkAuthId + '"]').show();
|
671 |
+
jQuery('.b2s-post-item-info-area[data-network-auth-id="' + networkAuthId + '"]').show();
|
672 |
+
jQuery('.b2s-post-approve-info[data-network-auth-id="' + networkAuthId + '"]').hide();
|
673 |
+
|
674 |
+
}
|
675 |
+
|
676 |
+
} else {
|
677 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", true);
|
678 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", true);
|
679 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').hide();
|
680 |
+
|
681 |
+
//Facebook TOS 072018 - Instant Sharing - Image post without Text > set to readonly
|
682 |
+
if (networkId == 1 && networkType == 0) {
|
683 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", true);
|
684 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + networkAuthId + '"]').hide();
|
685 |
+
jQuery('.b2s-post-item-info-area[data-network-auth-id="' + networkAuthId + '"]').hide();
|
686 |
+
jQuery('.b2s-post-approve-info[data-network-auth-id="' + networkAuthId + '"]').show();
|
687 |
+
}
|
688 |
+
}
|
689 |
+
|
690 |
+
//Content Curation V5.0.0
|
691 |
+
if (postType == "ex") {
|
692 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", true);
|
693 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", true);
|
694 |
+
jQuery('.b2s-post-item-details-item-url-input[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", true);
|
695 |
+
jQuery('.b2s-load-info-meta-tag-modal[data-network-auth-id="' + networkAuthId + '"]').attr("style", "display:none !important");
|
696 |
+
if (postFormat == '0') {
|
697 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"]').hide();
|
698 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').hide();
|
699 |
+
} else {
|
700 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"]').show();
|
701 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').show();
|
702 |
+
}
|
703 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').val() == 1) {
|
704 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
|
705 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
|
706 |
+
}
|
707 |
+
}
|
708 |
+
|
709 |
+
if (networkId == "3") {
|
710 |
+
if (postFormat == '0' && jQuery('#user_version').val() > 0) {
|
711 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').show();
|
712 |
+
if (!jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').hasClass('disabled')) {
|
713 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').trigger("click");
|
714 |
+
} else {
|
715 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').removeClass('disabled');
|
716 |
+
}
|
717 |
+
jQuery('.linkedin-url-title[data-network-auth-id="' + networkAuthId + '"]').show();
|
718 |
+
jQuery('.linkedin-url-desc[data-network-auth-id="' + networkAuthId + '"]').hide(); //not showing on linkedin
|
719 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').hide();
|
720 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"]').hide();
|
721 |
+
} else {
|
722 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').hide();
|
723 |
+
jQuery('.linkedin-url-title[data-network-auth-id="' + networkAuthId + '"]').hide();
|
724 |
+
jQuery('.linkedin-url-desc[data-network-auth-id="' + networkAuthId + '"]').hide();
|
725 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').show();
|
726 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"]').show();
|
727 |
+
}
|
728 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').val() == 1) {
|
729 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
|
730 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
|
731 |
+
}
|
732 |
+
}
|
733 |
+
|
734 |
+
if (networkId == "19" && networkType == "0") {
|
735 |
+
if (postFormat == '0' && jQuery('#user_version').val() > 0) {
|
736 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').show();
|
737 |
+
if (!jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').hasClass('disabled')) {
|
738 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').trigger("click");
|
739 |
+
} else {
|
740 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').removeClass('disabled');
|
741 |
+
}
|
742 |
+
jQuery('.xing-url-title[data-network-auth-id="' + networkAuthId + '"]').show();
|
743 |
+
jQuery('.xing-url-desc[data-network-auth-id="' + networkAuthId + '"]').show();
|
744 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').hide();
|
745 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"]').hide();
|
746 |
+
} else {
|
747 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').hide();
|
748 |
+
jQuery('.xing-url-title[data-network-auth-id="' + networkAuthId + '"]').hide();
|
749 |
+
jQuery('.xing-url-desc[data-network-auth-id="' + networkAuthId + '"]').hide();
|
750 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').show();
|
751 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"]').show();
|
752 |
+
}
|
753 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').val() == 1) {
|
754 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
|
755 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
|
756 |
+
}
|
757 |
+
}
|
758 |
+
|
759 |
+
jQuery('.b2s-user-network-settings-post-format[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').removeClass('b2s-settings-checked');
|
760 |
+
jQuery(this).addClass('b2s-settings-checked');
|
761 |
+
jQuery('#b2s-post-ship-item-post-format-modal').modal('hide');
|
762 |
+
return false;
|
763 |
+
});
|
764 |
+
jQuery(document).on("click", ".b2s-post-ship-item-full-text", function () {
|
765 |
+
jQuery('.b2s-server-connection-fail').hide();
|
766 |
+
var curSchedCount = jQuery(this).attr('data-network-count');
|
767 |
+
jQuery.ajax({
|
768 |
+
url: ajaxurl,
|
769 |
+
type: "POST",
|
770 |
+
dataType: "json",
|
771 |
+
cache: false,
|
772 |
+
data: {
|
773 |
+
'action': 'b2s_ship_item_full_text',
|
774 |
+
'postId': jQuery('#b2sPostId').val(),
|
775 |
+
'userLang': jQuery('#b2sUserLang').val(),
|
776 |
+
'networkAuthId': jQuery(this).attr('data-network-auth-id'),
|
777 |
+
'networkId': jQuery(this).attr('data-network-id'),
|
778 |
+
},
|
779 |
+
error: function () {
|
780 |
+
jQuery('.b2s-server-connection-fail').show();
|
781 |
+
return false;
|
782 |
+
},
|
783 |
+
success: function (data) {
|
784 |
+
if (data.result == true) {
|
785 |
+
messageInput = jQuery('.b2s-post-item-details-item-message-input[data-network-count="' + curSchedCount + '"][data-network-auth-id="' + data.networkAuthId + '"]');
|
786 |
+
messageInput.val(data.text);
|
787 |
+
networkCount(data.networkAuthId);
|
788 |
+
networkTextLimit = messageInput.attr('data-network-text-limit');
|
789 |
+
if (typeof networkTextLimit != undefined) {
|
790 |
+
if (parseInt(networkTextLimit) > 0 && parseInt(data.networkId) > 0) {
|
791 |
+
networkLimitAll(data.networkAuthId, data.networkId, networkTextLimit);
|
792 |
+
}
|
793 |
+
}
|
794 |
+
}
|
795 |
+
}
|
796 |
+
});
|
797 |
+
return false;
|
798 |
+
});
|
799 |
+
jQuery(document).on("click", ".b2s-post-ship-item-message-delete", function () {
|
800 |
+
var networkAuthId = jQuery(this).attr('data-network-auth-id');
|
801 |
+
var networkCountId = jQuery(this).attr('data-network-count');
|
802 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-count="' + networkCountId + '"][data-network-auth-id="' + networkAuthId + '"]').val("");
|
803 |
+
initSceditor(networkAuthId);
|
804 |
+
networkCount(networkAuthId);
|
805 |
+
return false;
|
806 |
+
});
|
807 |
+
jQuery(document).on("click", ".b2s-post-ship-item-copy-original-text", function () {
|
808 |
+
var networkAuthId = jQuery(this).attr('data-network-auth-id');
|
809 |
+
var networkCountId = jQuery(this).attr('data-network-count');
|
810 |
+
var networkId = jQuery(this).attr('data-network-id');
|
811 |
+
var text = jQuery('.b2s-post-item-details-item-message-input[data-network-count="-1"][data-network-auth-id="' + networkAuthId + '"]').val();
|
812 |
+
if (text == "" && networkId == 2) {
|
813 |
+
text = jQuery('#b2sTwitterOrginalPost').val();
|
814 |
+
}
|
815 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-count="' + networkCountId + '"][data-network-auth-id="' + networkAuthId + '"]').val(text);
|
816 |
+
networkCount(networkAuthId);
|
817 |
+
return false;
|
818 |
+
});
|
819 |
+
jQuery(document).on("click", ".b2s-network-select-btn", function () {
|
820 |
+
var networkAuthId = jQuery(this).attr('data-network-auth-id');
|
821 |
+
var networkId = jQuery(this).attr('data-network-id');
|
822 |
+
var networkType = jQuery(this).attr('data-network-type');
|
823 |
+
|
824 |
+
//doppelklick Schutz
|
825 |
+
if (!jQuery(this).hasClass('b2s-network-select-btn-deactivate')) {
|
826 |
+
//active?
|
827 |
+
if (!jQuery(this).children().hasClass('active')) {
|
828 |
+
//TOS XING Groups
|
829 |
+
if ((networkId == 8 || networkId == 19) && networkType == 2) {
|
830 |
+
if ((b2sTosXingGroupCount == jQuery('#b2sTosXingGroupCrosspostingLimit').val()) || (networkId == 19 && jQuery('.b2s-network-select-btn[data-network-id="' + networkId + '"][data-network-type="' + networkType + '"][data-network-tos-group-id="' + jQuery(this).attr('data-network-tos-group-id') + '"]').children().hasClass('active'))) {
|
831 |
+
jQuery('#b2s-tos-xing-group-modal').modal('show');
|
832 |
+
return false;
|
833 |
+
} else {
|
834 |
+
b2sTosXingGroupCount++;
|
835 |
+
}
|
836 |
+
}
|
837 |
+
//schon vorhanden?
|
838 |
+
if (jQuery('.b2s-post-item[data-network-auth-id="' + networkAuthId + '"]').length > 0 && !jQuery('.b2s-post-item[data-network-auth-id="' + networkAuthId + '"]').hasClass('b2s-post-item-connection-fail-dummy')) {
|
839 |
+
activatePortal(networkAuthId);
|
840 |
+
//PostFormat
|
841 |
+
if (jQuery('.b2s-post-ship-item-post-format-text[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').length > 0) {
|
842 |
+
var postFormatText = JSON.parse(jQuery('.b2sNetworkSettingsPostFormatText').val());
|
843 |
+
var postFormatType = jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').attr('data-post-format-type');
|
844 |
+
if (jQuery('#user_version').val() >= 2) {
|
845 |
+
jQuery('.b2s-post-ship-item-post-format-text[data-network-auth-id="' + networkAuthId + '"]').html(postFormatText[postFormatType][jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').val()]);
|
846 |
+
jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + networkAuthId + '"]').val(jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').val());
|
847 |
+
//if linkpost then show btn meta tags
|
848 |
+
var isMetaChecked = false;
|
849 |
+
if (networkId == "1" && jQuery('#isOgMetaChecked').val() == "1") {
|
850 |
+
isMetaChecked = true;
|
851 |
+
}
|
852 |
+
if (networkId == "2" && jQuery('#isCardMetaChecked').val() == "1") {
|
853 |
+
isMetaChecked = true;
|
854 |
+
}
|
855 |
+
if (isMetaChecked && jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').val() == "0") {
|
856 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", false);
|
857 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", false);
|
858 |
+
var dataMetaType = jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + networkAuthId + '"]').attr("data-meta-type");
|
859 |
+
if (dataMetaType == "og") {
|
860 |
+
jQuery('#b2sChangeOgMeta').val("1");
|
861 |
+
} else {
|
862 |
+
jQuery('#b2sChangeCardMeta').val("1");
|
863 |
+
}
|
864 |
+
|
865 |
+
//Copy from further item meta tags by same network
|
866 |
+
jQuery('.b2s-post-item-details-post-format[data-network-id=' + networkId + ']').each(function () {
|
867 |
+
if (jQuery(this).val() == "0" && jQuery('.b2s-post-ship-item-post-format[data-network-auth-id=' + jQuery(this).attr('data-network-auth-id') + ']').is(":visible") && jQuery(this).attr('data-network-auth-id') != networkAuthId) { //other Linkpost by same network
|
868 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + networkAuthId + '"]').val(jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
|
869 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + networkAuthId + '"]').val(jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
|
870 |
+
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + networkAuthId + '"]').attr('src', jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').attr('src'));
|
871 |
+
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val(jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
|
872 |
+
if (jQuery('.b2s-image-remove-btn[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').is(":visible")) {
|
873 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').show();
|
874 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val() == 1) {
|
875 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
|
876 |
+
}
|
877 |
+
} else {
|
878 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').hide();
|
879 |
+
}
|
880 |
+
|
881 |
+
return true;
|
882 |
+
}
|
883 |
+
});
|
884 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').show();
|
885 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').trigger("click");
|
886 |
+
} else {
|
887 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", true);
|
888 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", true);
|
889 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').hide();
|
890 |
+
}
|
891 |
+
|
892 |
+
if (networkId == "3") {
|
893 |
+
if (jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').val() == "0") {
|
894 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').show();
|
895 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').trigger("click");
|
896 |
+
jQuery('.linkedin-url-title[data-network-auth-id="' + networkAuthId + '"]').show();
|
897 |
+
jQuery('.linkedin-url-desc[data-network-auth-id="' + networkAuthId + '"]').hide(); //not showing on linkedin
|
898 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').hide();
|
899 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"]').hide();
|
900 |
+
} else {
|
901 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').hide();
|
902 |
+
jQuery('.linkedin-url-title[data-network-auth-id="' + networkAuthId + '"]').hide();
|
903 |
+
jQuery('.linkedin-url-desc[data-network-auth-id="' + networkAuthId + '"]').hide();
|
904 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').show();
|
905 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"]').show();
|
906 |
+
}
|
907 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').val() == 1) {
|
908 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
|
909 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
|
910 |
+
}
|
911 |
+
}
|
912 |
+
|
913 |
+
if (networkId == "19" && networkType == "0") {
|
914 |
+
if (jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').val() == "0") {
|
915 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').show();
|
916 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').trigger("click");
|
917 |
+
jQuery('.xing-url-title[data-network-auth-id="' + networkAuthId + '"]').show();
|
918 |
+
jQuery('.xing-url-desc[data-network-auth-id="' + networkAuthId + '"]').show();
|
919 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').hide();
|
920 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"]').hide();
|
921 |
+
} else {
|
922 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + networkAuthId + '"]').hide();
|
923 |
+
jQuery('.xing-url-title[data-network-auth-id="' + networkAuthId + '"]').hide();
|
924 |
+
jQuery('.xing-url-desc[data-network-auth-id="' + networkAuthId + '"]').hide();
|
925 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').show();
|
926 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"]').show();
|
927 |
+
}
|
928 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').val() == 1) {
|
929 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
|
930 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
|
931 |
+
}
|
932 |
+
}
|
933 |
+
|
934 |
+
} else {
|
935 |
+
jQuery('.b2s-post-ship-item-post-format-text[data-network-id="' + networkId + '"]').html(postFormatText[postFormatType][jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').val()]);
|
936 |
+
jQuery('.b2s-post-item-details-post-format[data-network-id="' + networkId + '"]').val(jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + networkType + '"][data-network-id="' + networkId + '"]').val());
|
937 |
+
}
|
938 |
+
|
939 |
+
//Facebook TOS 072018 - Instant Sharing - Image post without Text > set to readonly
|
940 |
+
if (networkId == 1 && networkType == 0) {
|
941 |
+
if (jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + networkAuthId + '"]').val() == "1") {
|
942 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", true);
|
943 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + networkAuthId + '"]').hide();
|
944 |
+
jQuery('.b2s-post-item-info-area[data-network-auth-id="' + networkAuthId + '"]').hide();
|
945 |
+
jQuery('.b2s-post-approve-info[data-network-auth-id="' + networkAuthId + '"]').show();
|
946 |
+
} else {
|
947 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", false);
|
948 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + networkAuthId + '"]').show();
|
949 |
+
jQuery('.b2s-post-item-info-area[data-network-auth-id="' + networkAuthId + '"]').show();
|
950 |
+
jQuery('.b2s-post-approve-info[data-network-auth-id="' + networkAuthId + '"]').hide();
|
951 |
+
}
|
952 |
+
}
|
953 |
+
|
954 |
+
//Content Curation
|
955 |
+
if (jQuery('.b2s-post-ship-item-post-format[data-network-auth-id="' + networkAuthId + '"]').attr('data-post-wp-type') == 'ex') {
|
956 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", true);
|
957 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", true);
|
958 |
+
jQuery('.b2s-post-item-details-item-url-input[data-network-auth-id="' + networkAuthId + '"]').prop("readonly", true);
|
959 |
+
jQuery('.b2s-load-info-meta-tag-modal[data-network-auth-id="' + networkAuthId + '"]').attr("style", "display:none !important");
|
960 |
+
if (jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + networkAuthId + '"]').val() == 0) {
|
961 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"]').hide();
|
962 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').hide();
|
963 |
+
} else {
|
964 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"]').show();
|
965 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').show();
|
966 |
+
}
|
967 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').val() == 1) {
|
968 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
|
969 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
|
970 |
+
}
|
971 |
+
}
|
972 |
+
}
|
973 |
+
|
974 |
+
//XING TOS Group
|
975 |
+
jQuery('.b2s-content-info[data-network-auth-id="' + networkAuthId + '"').show();
|
976 |
+
|
977 |
+
//Twitter TOS 032018 - protected multiple accounts with same content to same time
|
978 |
+
//delete comment field one more
|
979 |
+
if (networkId == 2) {
|
980 |
+
if (jQuery('.tw-textarea-input[data-network-id="' + networkId + '"]:visible').length == 1) {
|
981 |
+
jQuery('.tw-textarea-input[data-network-auth-id="' + networkAuthId + '"]').text(jQuery('#b2sTwitterOrginalPost').val());
|
982 |
+
} else {
|
983 |
+
jQuery('.tw-textarea-input[data-network-auth-id="' + networkAuthId + '"]').text("");
|
984 |
+
}
|
985 |
+
}
|
986 |
+
|
987 |
+
} else {
|
988 |
+
jQuery(this).addClass('b2s-network-select-btn-deactivate');
|
989 |
+
jQuery('.b2s-network-status-img-loading[data-network-auth-id="' + networkAuthId + '"]').show();
|
990 |
+
jQuery('.b2s-empty-area').hide();
|
991 |
+
loadingDummyShow(networkAuthId, jQuery(this).attr('data-network-id'));
|
992 |
+
jQuery('.b2s-server-connection-fail').hide();
|
993 |
+
var networkId = jQuery(this).attr('data-network-id');
|
994 |
+
var legacyMode = jQuery('#isLegacyMode').val();
|
995 |
+
if (legacyMode == "1") {
|
996 |
+
legacyMode = false; // loading is sync (stack)
|
997 |
+
} else {
|
998 |
+
legacyMode = true; // loading is async (parallel)
|
999 |
+
}
|
1000 |
+
jQuery.ajax({
|
1001 |
+
url: ajaxurl,
|
1002 |
+
type: "POST",
|
1003 |
+
dataType: "json",
|
1004 |
+
async: legacyMode,
|
1005 |
+
cache: false,
|
1006 |
+
data: {
|
1007 |
+
'action': 'b2s_ship_item',
|
1008 |
+
'networkAuthId': networkAuthId,
|
1009 |
+
'networkType': jQuery(this).attr('data-network-type'),
|
1010 |
+
'networkKind': jQuery(this).attr('data-network-kind'),
|
1011 |
+
'networkId': networkId,
|
1012 |
+
'networkDisplayName': jQuery(this).attr('data-network-display-name'),
|
1013 |
+
'instantSharing': jQuery(this).attr('data-instant-sharing'),
|
1014 |
+
'networkTosGroupId': jQuery(this).attr('data-network-tos-group-id'),
|
1015 |
+
'userLang': jQuery('#b2sUserLang').val(),
|
1016 |
+
'postId': jQuery('#b2sPostId').val(),
|
1017 |
+
'relayCount': jQuery('#b2sRelayCount').val(),
|
1018 |
+
'selSchedDate': jQuery('#selSchedDate').val(),
|
1019 |
+
'b2sPostType': jQuery('#b2sPostType').val(),
|
1020 |
+
'b2sDraftData': jQuery('#b2sDraftData').val()
|
1021 |
+
},
|
1022 |
+
beforeSend: function (jqXHR) { // before jQuery send the request we will push it to our array
|
1023 |
+
jQuery.xhrPool.push(jqXHR);
|
1024 |
+
},
|
1025 |
+
complete: function (jqXHR) { // when some of the requests completed it will splice from the array
|
1026 |
+
var index = jQuery.xhrPool.indexOf(jqXHR);
|
1027 |
+
if (index > -1) {
|
1028 |
+
jQuery.xhrPool.splice(index, 1);
|
1029 |
+
}
|
1030 |
+
},
|
1031 |
+
error: function (jqXHR) {
|
1032 |
+
var index = jQuery.xhrPool.indexOf(jqXHR);
|
1033 |
+
if (index > -1) {
|
1034 |
+
jQuery.xhrPool.splice(index, 1);
|
1035 |
+
}
|
1036 |
+
loadingDummyConnectionFail(networkAuthId, networkId);
|
1037 |
+
jQuery('.b2s-network-status-img-loading[data-network-auth-id="' + networkAuthId + '"]').hide();
|
1038 |
+
jQuery('.b2s-network-select-btn[data-network-auth-id="' + networkAuthId + '"]').removeClass('b2s-network-select-btn-deactivate');
|
1039 |
+
jQuery('.b2s-server-connection-fail').show();
|
1040 |
+
return true;
|
1041 |
+
},
|
1042 |
+
success: function (data) {
|
1043 |
+
if (data != undefined) {
|
1044 |
+
jQuery('.b2s-network-status-img-loading[data-network-auth-id="' + data.networkAuthId + '"]').hide();
|
1045 |
+
jQuery('.b2s-network-select-btn[data-network-auth-id="' + data.networkAuthId + '"]').removeClass('b2s-network-select-btn-deactivate');
|
1046 |
+
if (data.result == true) {
|
1047 |
+
jQuery('.b2s-post-item-loading-dummy[data-network-auth-id="' + data.networkAuthId + '"]').remove();
|
1048 |
+
var order = jQuery.parseJSON(jQuery('.b2s-network-navbar-order').val());
|
1049 |
+
var pos = order.indexOf(data.networkAuthId.toString());
|
1050 |
+
var add = false;
|
1051 |
+
for (var i = pos; i >= 0; i--) {
|
1052 |
+
if (jQuery('.b2s-post-item[data-network-auth-id="' + order[i] + '"]').length > 0) {
|
1053 |
+
jQuery('.b2s-post-item[data-network-auth-id="' + order[i] + '"]').after(data.content);
|
1054 |
+
i = -1;
|
1055 |
+
add = true;
|
1056 |
+
}
|
1057 |
+
}
|
1058 |
+
if (add == false) {
|
1059 |
+
jQuery('.b2s-post-list').prepend(data.content);
|
1060 |
+
}
|
1061 |
+
|
1062 |
+
activatePortal(data.networkAuthId);
|
1063 |
+
var dateFormat = "yyyy-mm-dd";
|
1064 |
+
var language = "en";
|
1065 |
+
var showMeridian = true;
|
1066 |
+
if (jQuery('#b2sUserLang').val() == "de") {
|
1067 |
+
dateFormat = "dd.mm.yyyy";
|
1068 |
+
language = "de";
|
1069 |
+
showMeridian = false;
|
1070 |
+
}
|
1071 |
+
var today = new Date();
|
1072 |
+
if (jQuery('#b2sBlogPostSchedDate').length > 0) {
|
1073 |
+
today.setTime(jQuery('#b2sBlogPostSchedDate').val());
|
1074 |
+
}
|
1075 |
+
|
1076 |
+
jQuery(".b2s-post-item-details-release-input-date").datepicker({
|
1077 |
+
format: dateFormat,
|
1078 |
+
language: language,
|
1079 |
+
maxViewMode: 2,
|
1080 |
+
todayHighlight: true,
|
1081 |
+
startDate: today,
|
1082 |
+
calendarWeeks: true,
|
1083 |
+
autoclose: true
|
1084 |
+
});
|
1085 |
+
jQuery('.b2s-post-item-details-release-input-time').timepicker({
|
1086 |
+
minuteStep: 15,
|
1087 |
+
appendWidgetTo: 'body',
|
1088 |
+
showSeconds: false,
|
1089 |
+
showMeridian: showMeridian,
|
1090 |
+
defaultTime: today, //'current',
|
1091 |
+
snapToStep: true
|
1092 |
+
});
|
1093 |
+
jQuery(".b2s-post-item-details-release-input-date").datepicker().on('changeDate', function (e) {
|
1094 |
+
checkSchedDateTime(jQuery(this).attr('data-network-auth-id'));
|
1095 |
+
});
|
1096 |
+
jQuery('.b2s-post-item-details-release-input-time').timepicker().on('changeTime.timepicker', function (e) {
|
1097 |
+
checkSchedDateTime(jQuery(this).attr('data-network-auth-id'));
|
1098 |
+
});
|
1099 |
+
//Check Text Limit
|
1100 |
+
var textLimit = jQuery('.b2s-post-item-details-item-message-input[data-network-count="-1"][data-network-auth-id="' + data.networkAuthId + '"]').attr('data-network-text-limit');
|
1101 |
+
if (textLimit != "0") {
|
1102 |
+
networkLimitAll(data.networkAuthId, data.networkId, textLimit);
|
1103 |
+
} else {
|
1104 |
+
networkCount(data.networkAuthId);
|
1105 |
+
}
|
1106 |
+
jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + data.networkAuthId + '"]').trigger("change");
|
1107 |
+
initSceditor(data.networkAuthId);
|
1108 |
+
//Bild setzen
|
1109 |
+
if (jQuery('#b2s_blog_default_image').val() != "") {
|
1110 |
+
if (jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').length > 0) {
|
1111 |
+
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').attr('src', jQuery('#b2s_blog_default_image').val());
|
1112 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + data.networkAuthId + '"]').val() == 1) {
|
1113 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').hide();
|
1114 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="0"]').show();
|
1115 |
+
} else {
|
1116 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"]').show();
|
1117 |
+
}
|
1118 |
+
}
|
1119 |
+
jQuery('.b2s-image-url-hidden-field').val(jQuery('#b2s_blog_default_image').val());
|
1120 |
+
}
|
1121 |
+
|
1122 |
+
//Time zone
|
1123 |
+
jQuery('.b2s-settings-time-zone-text').html(jQuery('#user_timezone_text').val());
|
1124 |
+
//PostFormat
|
1125 |
+
if (jQuery('.b2s-post-ship-item-post-format-text[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').length > 0) {
|
1126 |
+
var postFormatText = JSON.parse(jQuery('.b2sNetworkSettingsPostFormatText').val());
|
1127 |
+
var postFormatType = jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').attr('data-post-format-type');
|
1128 |
+
if (jQuery('#user_version').val() >= 2) {
|
1129 |
+
jQuery('.b2s-post-ship-item-post-format-text[data-network-auth-id="' + data.networkAuthId + '"]').html(postFormatText[postFormatType][jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').val()]);
|
1130 |
+
jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + data.networkAuthId + '"]').val(jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').val());
|
1131 |
+
var isMetaChecked = false;
|
1132 |
+
if (data.networkId == "1" && jQuery('#isOgMetaChecked').val() == "1") {
|
1133 |
+
isMetaChecked = true;
|
1134 |
+
}
|
1135 |
+
if (data.networkId == "2" && jQuery('#isCardMetaChecked').val() == "1") {
|
1136 |
+
isMetaChecked = true;
|
1137 |
+
}
|
1138 |
+
|
1139 |
+
if (isMetaChecked && jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').val() == "0") {
|
1140 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + data.networkAuthId + '"]').prop("readonly", false);
|
1141 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + data.networkAuthId + '"]').prop("readonly", false);
|
1142 |
+
var dataMetaType = jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + data.networkAuthId + '"]').attr("data-meta-type");
|
1143 |
+
if (dataMetaType == "og") {
|
1144 |
+
jQuery('#b2sChangeOgMeta').val("1");
|
1145 |
+
} else {
|
1146 |
+
jQuery('#b2sChangeCardMeta').val("1");
|
1147 |
+
}
|
1148 |
+
|
1149 |
+
//Copy from further item meta tags by same network
|
1150 |
+
jQuery('.b2s-post-item-details-post-format[data-network-id=' + data.networkId + ']').each(function () {
|
1151 |
+
if (jQuery(this).val() == "0" && jQuery('.b2s-post-ship-item-post-format[data-network-auth-id=' + jQuery(this).attr('data-network-auth-id') + ']').is(":visible") && jQuery(this).attr('data-network-auth-id') != data.networkAuthId) { //other Linkpost by same network
|
1152 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + data.networkAuthId + '"]').val(jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
|
1153 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + data.networkAuthId + '"]').val(jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
|
1154 |
+
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').attr('src', jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').attr('src'));
|
1155 |
+
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + data.networkAuthId + '"]').val(jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val());
|
1156 |
+
|
1157 |
+
if (jQuery('.b2s-image-remove-btn[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').is(":visible")) {
|
1158 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"]').show();
|
1159 |
+
} else {
|
1160 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"]').hide();
|
1161 |
+
}
|
1162 |
+
return true;
|
1163 |
+
}
|
1164 |
+
});
|
1165 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + data.networkAuthId + '"]').show();
|
1166 |
+
if (data.draft == false) {
|
1167 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + data.networkAuthId + '"]').trigger("click");
|
1168 |
+
}
|
1169 |
+
} else {
|
1170 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + data.networkAuthId + '"]').prop("readonly", true);
|
1171 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + data.networkAuthId + '"]').prop("readonly", true);
|
1172 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + data.networkAuthId + '"]').hide();
|
1173 |
+
}
|
1174 |
+
|
1175 |
+
if (data.networkId == "3") {
|
1176 |
+
if (jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').val() == "0") {
|
1177 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + data.networkAuthId + '"]').show();
|
1178 |
+
if (data.draft == false) {
|
1179 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + data.networkAuthId + '"]').trigger("click");
|
1180 |
+
}
|
1181 |
+
jQuery('.linkedin-url-title[data-network-auth-id="' + data.networkAuthId + '"]').show();
|
1182 |
+
jQuery('.linkedin-url-desc[data-network-auth-id="' + data.networkAuthId + '"]').hide(); // not showing on linkedin
|
1183 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"]').hide();
|
1184 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + data.networkAuthId + '"]').hide();
|
1185 |
+
} else {
|
1186 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + data.networkAuthId + '"]').hide();
|
1187 |
+
jQuery('.linkedin-url-title[data-network-auth-id="' + data.networkAuthId + '"]').hide();
|
1188 |
+
jQuery('.linkedin-url-desc[data-network-auth-id="' + data.networkAuthId + '"]').hide();
|
1189 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"]').show();
|
1190 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + data.networkAuthId + '"]').show();
|
1191 |
+
}
|
1192 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + data.networkAuthId + '"]').val() == 1) {
|
1193 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').hide();
|
1194 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').hide();
|
1195 |
+
}
|
1196 |
+
}
|
1197 |
+
if (data.networkId == "19" && data.networkType == "0") {
|
1198 |
+
if (jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').val() == "0") {
|
1199 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + data.networkAuthId + '"]').show();
|
1200 |
+
if (data.draft == false) {
|
1201 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + data.networkAuthId + '"]').trigger("click");
|
1202 |
+
}
|
1203 |
+
jQuery('.xing-url-title[data-network-auth-id="' + data.networkAuthId + '"]').show();
|
1204 |
+
jQuery('.xing-url-desc[data-network-auth-id="' + data.networkAuthId + '"]').show();
|
1205 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"]').hide();
|
1206 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + data.networkAuthId + '"]').hide();
|
1207 |
+
} else {
|
1208 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + data.networkAuthId + '"]').hide();
|
1209 |
+
jQuery('.xing-url-title[data-network-auth-id="' + data.networkAuthId + '"]').hide();
|
1210 |
+
jQuery('.xing-url-desc[data-network-auth-id="' + data.networkAuthId + '"]').hide();
|
1211 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"]').show();
|
1212 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + data.networkAuthId + '"]').show();
|
1213 |
+
}
|
1214 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + data.networkAuthId + '"]').val() == 1) {
|
1215 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').hide();
|
1216 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').hide();
|
1217 |
+
}
|
1218 |
+
}
|
1219 |
+
|
1220 |
+
} else {
|
1221 |
+
jQuery('.b2s-post-ship-item-post-format-text[data-network-id="' + data.networkId + '"]').html(postFormatText[postFormatType][jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').val()]);
|
1222 |
+
jQuery('.b2s-post-item-details-post-format[data-network-id="' + data.networkId + '"]').val(jQuery('.b2sNetworkSettingsPostFormatCurrent[data-network-type="' + data.networkType + '"][data-network-id="' + data.networkId + '"]').val());
|
1223 |
+
}
|
1224 |
+
|
1225 |
+
|
1226 |
+
if (jQuery('#selSchedDate').val() != "") {
|
1227 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').hide();
|
1228 |
+
}
|
1229 |
+
|
1230 |
+
|
1231 |
+
//Facebook TOS 072018 - Instant Sharing - Image post without Text > set to readonly
|
1232 |
+
if (data.networkId == 1 && data.networkType == 0) {
|
1233 |
+
if (jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + data.networkAuthId + '"]').val() == "1") {
|
1234 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + data.networkAuthId + '"]').prop("readonly", true);
|
1235 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + networkAuthId + '"]').hide();
|
1236 |
+
jQuery('.b2s-post-item-info-area[data-network-auth-id="' + networkAuthId + '"]').hide();
|
1237 |
+
jQuery('.b2s-post-approve-info[data-network-auth-id="' + data.networkAuthId + '"]').show();
|
1238 |
+
} else {
|
1239 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + data.networkAuthId + '"]').prop("readonly", false);
|
1240 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + networkAuthId + '"]').show();
|
1241 |
+
jQuery('.b2s-post-item-info-area[data-network-auth-id="' + networkAuthId + '"]').show();
|
1242 |
+
jQuery('.b2s-post-approve-info[data-network-auth-id="' + data.networkAuthId + '"]').hide();
|
1243 |
+
}
|
1244 |
+
}
|
1245 |
+
|
1246 |
+
//Twitter TOS 032018 - protected multiple accounts with same content to same time
|
1247 |
+
//delete comment field one more
|
1248 |
+
if (data.networkId == 2) {
|
1249 |
+
if (jQuery('.tw-textarea-input[data-network-id="' + data.networkId + '"]:visible').length > 1) {
|
1250 |
+
var firstAuth = jQuery('.b2s-post-item[data-network-id="' + data.networkId + '"]:first').attr('data-network-auth-id');
|
1251 |
+
if (firstAuth != data.networkAuthId) {
|
1252 |
+
jQuery('.tw-textarea-input[data-network-auth-id="' + data.networkAuthId + '"]').text("");
|
1253 |
+
} else {
|
1254 |
+
if (jQuery('.tw-textarea-input[data-network-id="' + data.networkId + '"]:visible').length > 2) {
|
1255 |
+
jQuery('.tw-textarea-input[data-network-auth-id="' + data.networkAuthId + '"]').text("");
|
1256 |
+
}
|
1257 |
+
}
|
1258 |
+
} else {
|
1259 |
+
//set original post
|
1260 |
+
jQuery('#b2sTwitterOrginalPost').val(jQuery('.tw-textarea-input[data-network-auth-id="' + data.networkAuthId + '"]').val());
|
1261 |
+
}
|
1262 |
+
}
|
1263 |
+
|
1264 |
+
//Content Curation
|
1265 |
+
if (jQuery('.b2s-post-ship-item-post-format[data-network-auth-id="' + data.networkAuthId + '"]').attr('data-post-wp-type') == 'ex') {
|
1266 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + data.networkAuthId + '"]').prop("readonly", true);
|
1267 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + data.networkAuthId + '"]').prop("readonly", true);
|
1268 |
+
jQuery('.b2s-post-item-details-item-url-input[data-network-auth-id="' + data.networkAuthId + '"]').prop("readonly", true);
|
1269 |
+
jQuery('.b2s-load-info-meta-tag-modal[data-network-auth-id="' + data.networkAuthId + '"]').attr("style", "display:none !important");
|
1270 |
+
if (jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + data.networkAuthId + '"]').val() == 0) {
|
1271 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + data.networkAuthId + '"]').hide();
|
1272 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"]').hide();
|
1273 |
+
} else {
|
1274 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + data.networkAuthId + '"]').show();
|
1275 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"]').show();
|
1276 |
+
}
|
1277 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + data.networkAuthId + '"]').val() == 1) {
|
1278 |
+
jQuery('.b2s-select-image-modal-open[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').hide();
|
1279 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').hide();
|
1280 |
+
}
|
1281 |
+
}
|
1282 |
+
|
1283 |
+
}
|
1284 |
+
|
1285 |
+
//Draft
|
1286 |
+
if (data.draft == true) {
|
1287 |
+
if (data.draftActions.post_format == "0" || data.draftActions.post_format == "1") {
|
1288 |
+
jQuery('.b2s-post-ship-item-post-format[data-network-auth-id="' + data.networkAuthId + '"]').trigger('click');
|
1289 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + data.networkAuthId + '"]').addClass('disabled');
|
1290 |
+
jQuery('.b2s-user-network-settings-post-format[value="' + data.draftActions.post_format + '"][data-network-auth-id="' + data.networkAuthId + '"][data-network-id="' + networkId + '"][data-network-type="' + networkType + '"]').trigger('click');
|
1291 |
+
}
|
1292 |
+
|
1293 |
+
jQuery.each(data.draftActions.sched_image_url, function (index, value) {
|
1294 |
+
if (value == "") {
|
1295 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + index + '"]').hide();
|
1296 |
+
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').attr('src', jQuery('.b2s-network-default-image').val());
|
1297 |
+
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').val("");
|
1298 |
+
} else {
|
1299 |
+
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').attr('src', value);
|
1300 |
+
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').val(value);
|
1301 |
+
}
|
1302 |
+
});
|
1303 |
+
|
1304 |
+
if (data.draftActions.releaseSelect == "1") {
|
1305 |
+
jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + data.networkAuthId + '"]').val(data.draftActions.releaseSelect);
|
1306 |
+
jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + data.networkAuthId + '"]').trigger('change');
|
1307 |
+
|
1308 |
+
jQuery.each(data.draftActions.date, function (index, value) {
|
1309 |
+
if (index == "1" || index == "2") {
|
1310 |
+
jQuery('.b2s-post-item-details-release-input-add[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + (index - 1) + '"]').trigger('click');
|
1311 |
+
}
|
1312 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').val(value);
|
1313 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').trigger('change');
|
1314 |
+
});
|
1315 |
+
jQuery.each(data.draftActions.time, function (index, value) {
|
1316 |
+
jQuery('.b2s-post-item-details-release-input-time[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').val(value);
|
1317 |
+
jQuery('.b2s-post-item-details-release-input-time[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').trigger('change');
|
1318 |
+
});
|
1319 |
+
jQuery.each(data.draftActions.sched_content, function (index, value) {
|
1320 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').val(value);
|
1321 |
+
});
|
1322 |
+
}
|
1323 |
+
if (data.draftActions.releaseSelect == "2") {
|
1324 |
+
jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + data.networkAuthId + '"]').val(data.draftActions.releaseSelect);
|
1325 |
+
jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + data.networkAuthId + '"]').trigger('change');
|
1326 |
+
|
1327 |
+
jQuery.each(data.draftActions.intervalSelect, function (index, value) {
|
1328 |
+
if (index == "1" || index == "2") {
|
1329 |
+
jQuery('.b2s-post-item-details-release-input-add[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + (index - 1) + '"]').trigger('click');
|
1330 |
+
}
|
1331 |
+
jQuery('.b2s-post-item-details-release-input-interval-select[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').val(value);
|
1332 |
+
jQuery('.b2s-post-item-details-release-input-interval-select[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').trigger('change');
|
1333 |
+
});
|
1334 |
+
jQuery.each(data.draftActions.weeks, function (index, value) {
|
1335 |
+
jQuery('.b2s-post-item-details-release-input-weeks[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').val(value);
|
1336 |
+
jQuery('.b2s-post-item-details-release-input-weeks[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').trigger('change');
|
1337 |
+
});
|
1338 |
+
jQuery.each(data.draftActions.duration_month, function (index, value) {
|
1339 |
+
jQuery('.b2s-post-item-details-release-input-months[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').val(value);
|
1340 |
+
jQuery('.b2s-post-item-details-release-input-months[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').trigger('change');
|
1341 |
+
});
|
1342 |
+
jQuery.each(data.draftActions.duration_time, function (index, value) {
|
1343 |
+
jQuery('.b2s-post-item-details-release-input-times[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').val(value);
|
1344 |
+
jQuery('.b2s-post-item-details-release-input-times[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').trigger('change');
|
1345 |
+
});
|
1346 |
+
jQuery.each(data.draftActions.select_day, function (index, value) {
|
1347 |
+
jQuery('.b2s-post-item-details-release-input-select-day[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').val(value);
|
1348 |
+
jQuery('.b2s-post-item-details-release-input-select-day[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').trigger('change');
|
1349 |
+
});
|
1350 |
+
jQuery.each(data.draftActions.select_timespan, function (index, value) {
|
1351 |
+
jQuery('.b2s-post-item-details-release-input-select-timespan[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').val(value);
|
1352 |
+
jQuery('.b2s-post-item-details-release-input-select-timespan[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').trigger('change');
|
1353 |
+
});
|
1354 |
+
jQuery.each(data.draftActions.mo, function (index, value) {
|
1355 |
+
jQuery('.b2s-post-item-details-release-input-lable-day-mo[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').attr('checked', true);
|
1356 |
+
});
|
1357 |
+
jQuery.each(data.draftActions.di, function (index, value) {
|
1358 |
+
jQuery('.b2s-post-item-details-release-input-lable-day-di[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').attr('checked', true);
|
1359 |
+
});
|
1360 |
+
jQuery.each(data.draftActions.mi, function (index, value) {
|
1361 |
+
jQuery('.b2s-post-item-details-release-input-lable-day-mi[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').attr('checked', true);
|
1362 |
+
});
|
1363 |
+
jQuery.each(data.draftActions.do, function (index, value) {
|
1364 |
+
jQuery('.b2s-post-item-details-release-input-lable-day-do[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').attr('checked', true);
|
1365 |
+
});
|
1366 |
+
jQuery.each(data.draftActions.fr, function (index, value) {
|
1367 |
+
jQuery('.b2s-post-item-details-release-input-lable-day-fr[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').attr('checked', true);
|
1368 |
+
});
|
1369 |
+
jQuery.each(data.draftActions.sa, function (index, value) {
|
1370 |
+
jQuery('.b2s-post-item-details-release-input-lable-day-sa[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').attr('checked', true);
|
1371 |
+
});
|
1372 |
+
jQuery.each(data.draftActions.so, function (index, value) {
|
1373 |
+
jQuery('.b2s-post-item-details-release-input-lable-day-so[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').attr('checked', true);
|
1374 |
+
});
|
1375 |
+
jQuery.each(data.draftActions.date, function (index, value) {
|
1376 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').val(value);
|
1377 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').trigger('change');
|
1378 |
+
});
|
1379 |
+
jQuery.each(data.draftActions.time, function (index, value) {
|
1380 |
+
jQuery('.b2s-post-item-details-release-input-time[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').val(value);
|
1381 |
+
jQuery('.b2s-post-item-details-release-input-time[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').trigger('change');
|
1382 |
+
});
|
1383 |
+
}
|
1384 |
+
|
1385 |
+
if (data.draftActions.post_relay == "1") {
|
1386 |
+
jQuery('.b2s-post-item-details-relay[data-network-auth-id="' + data.networkAuthId + '"]').attr('checked', true);
|
1387 |
+
jQuery('.b2s-post-item-details-relay[data-network-auth-id="' + data.networkAuthId + '"]').trigger('change');
|
1388 |
+
|
1389 |
+
jQuery.each(data.draftActions.post_relay_account, function (index, value) {
|
1390 |
+
if (index >= 1) {
|
1391 |
+
jQuery('.b2s-post-item-details-relay-input-add[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + (index - 1) + '"]').trigger('click');
|
1392 |
+
}
|
1393 |
+
jQuery('.b2s-post-item-details-relay-input-account[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').val(value);
|
1394 |
+
jQuery('.b2s-post-item-details-relay-input-account[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').trigger('change');
|
1395 |
+
});
|
1396 |
+
jQuery.each(data.draftActions.post_relay_delay, function (index, value) {
|
1397 |
+
jQuery('.b2s-post-item-details-relay-input-delay[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').val(value);
|
1398 |
+
jQuery('.b2s-post-item-details-relay-input-delay[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="' + index + '"]').trigger('change');
|
1399 |
+
});
|
1400 |
+
}
|
1401 |
+
|
1402 |
+
jQuery.each(data.draftActions.tags, function (index, value) {
|
1403 |
+
if (index >= 1) {
|
1404 |
+
jQuery('.ad-tag-btn[data-network-auth-id="' + data.networkAuthId + '"]').trigger('click');
|
1405 |
+
}
|
1406 |
+
jQuery('.b2s-post-item-details-tag-input-elem[data-network-auth-id="' + data.networkAuthId + '"]').last().val(value);
|
1407 |
+
});
|
1408 |
+
|
1409 |
+
jQuery('.b2s-post-item-details-item-title-input[data-network-auth-id="' + data.networkAuthId + '"]').val(data.draftActions.custom_title);
|
1410 |
+
|
1411 |
+
jQuery('.b2s-post-item-details-item-url-input[data-network-auth-id="' + data.networkAuthId + '"]').val(data.draftActions.url);
|
1412 |
+
jQuery('.b2s-post-item-details-item-url-input[data-network-auth-id="' + data.networkAuthId + '"]').removeClass('error');
|
1413 |
+
|
1414 |
+
|
1415 |
+
if (data.networkId == 1) {
|
1416 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + data.networkAuthId + '"]').val(data.draftActions.og_title);
|
1417 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + data.networkAuthId + '"]').val(data.draftActions.og_desc);
|
1418 |
+
}
|
1419 |
+
|
1420 |
+
if (data.networkId == 2) {
|
1421 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + data.networkAuthId + '"]').val(data.draftActions.card_title);
|
1422 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + data.networkAuthId + '"]').val(data.draftActions.card_desc);
|
1423 |
+
}
|
1424 |
+
|
1425 |
+
if (data.draftActions.image_url == "") {
|
1426 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
|
1427 |
+
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').attr('src', jQuery('.b2s-network-default-image').val());
|
1428 |
+
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').val("");
|
1429 |
+
} else {
|
1430 |
+
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').attr('src', data.draftActions.image_url);
|
1431 |
+
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + data.networkAuthId + '"][data-network-count="-1"]').val(data.draftActions.image_url);
|
1432 |
+
}
|
1433 |
+
checkSchedDateTime(data.networkAuthId);
|
1434 |
+
}
|
1435 |
+
|
1436 |
+
//XING Groups
|
1437 |
+
if (data.networkId == 19 && data.networkType == 2) {
|
1438 |
+
if (jQuery('.networkKind[data-network-auth-id="' + data.networkAuthId + '"]').val() == '3') {
|
1439 |
+
jQuery('.marketplace_area[data-network-auth-id="' + data.networkAuthId + '"][data-network-id="' + data.networkId + '"]').show();
|
1440 |
+
}
|
1441 |
+
}
|
1442 |
+
//XING TOS Group
|
1443 |
+
jQuery('.b2s-content-info[data-network-auth-id="' + data.networkAuthId + '"').show();
|
1444 |
+
|
1445 |
+
} else {
|
1446 |
+
//TOS XING Groups
|
1447 |
+
if (typeof data.reason !== "undefined") {
|
1448 |
+
if (data.reason == 'tos_xing_group_exists') {
|
1449 |
+
b2sTosXingGroupCount--;
|
1450 |
+
deactivatePortal(data.networkAuthId);
|
1451 |
+
jQuery('.b2s-post-item-loading-dummy[data-network-auth-id="' + data.networkAuthId + '"]').remove();
|
1452 |
+
jQuery('#b2s-tos-xing-group-modal').modal('show');
|
1453 |
+
return false;
|
1454 |
+
}
|
1455 |
+
}
|
1456 |
+
}
|
1457 |
+
|
1458 |
+
}
|
1459 |
+
}
|
1460 |
+
});
|
1461 |
+
}
|
1462 |
+
} else {
|
1463 |
+
//TOS XING Groups
|
1464 |
+
if ((networkId == 8 || networkId == 19) && networkType == 2) {
|
1465 |
+
b2sTosXingGroupCount--;
|
1466 |
+
}
|
1467 |
+
deactivatePortal(networkAuthId);
|
1468 |
+
}
|
1469 |
+
}
|
1470 |
+
return false;
|
1471 |
+
});
|
1472 |
+
jQuery(document).on('click', '.b2s-post-item-details-url-image', function () {
|
1473 |
+
var networkAuthId = jQuery(this).attr("data-network-auth-id");
|
1474 |
+
var networkCountId = jQuery(this).attr("data-network-count");
|
1475 |
+
if (jQuery('.b2s-select-image-modal-open[data-network-count="' + networkCountId + '"][data-network-auth-id="' + networkAuthId + '"]').is(":visible")) {
|
1476 |
+
|
1477 |
+
var postFormat = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').val();
|
1478 |
+
var networkId = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').attr("data-network-id");
|
1479 |
+
var isMetaChecked = false;
|
1480 |
+
if (networkId == "1" && jQuery('#isOgMetaChecked').val() == "1") {
|
1481 |
+
isMetaChecked = true;
|
1482 |
+
}
|
1483 |
+
if (networkId == "2" && jQuery('#isCardMetaChecked').val() == "1") {
|
1484 |
+
isMetaChecked = true;
|
1485 |
+
}
|
1486 |
+
|
1487 |
+
if (postFormat == "0" && (networkId == "1" || networkId == "2")) { //isLinkPost for Faceboo or Twitter
|
1488 |
+
jQuery('.meta-text').hide();
|
1489 |
+
if (!isMetaChecked) {
|
1490 |
+
if (networkId == "1") {
|
1491 |
+
jQuery('.isOgMetaChecked').show();
|
1492 |
+
} else {
|
1493 |
+
jQuery('.isCardMetaChecked').show();
|
1494 |
+
}
|
1495 |
+
jQuery('#b2s-info-change-meta-tag-modal').modal('show');
|
1496 |
+
return false;
|
1497 |
+
}
|
1498 |
+
}
|
1499 |
+
|
1500 |
+
jQuery('.b2s-select-image-modal-open[data-network-count="' + networkCountId + '"][data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').trigger('click');
|
1501 |
+
}
|
1502 |
+
return false;
|
1503 |
+
});
|
1504 |
+
jQuery(document).on('click', '.b2s-submit-btn-scroll', function () {
|
1505 |
+
jQuery('.b2s-submit-btn').trigger('click');
|
1506 |
+
});
|
1507 |
+
jQuery(document).on('click', '.b2s-post-ship-item-post-format', function () {
|
1508 |
+
if (jQuery('#user_version').val() >= 1) {
|
1509 |
+
jQuery('.b2s-user-network-settings-post-format-area').hide();
|
1510 |
+
jQuery('.b2s-user-network-settings-post-format-area[data-network-type="' + jQuery(this).attr('data-network-type') + '"][data-network-id="' + jQuery(this).attr('data-network-id') + '"]').show();
|
1511 |
+
jQuery('#b2s-post-ship-item-post-format-network-title').html(jQuery('.b2s-user-network-settings-post-format-area[data-network-id="' + jQuery(this).attr('data-network-id') + '"]').attr('data-network-title'));
|
1512 |
+
if (jQuery('#user_version').val() >= 2) {
|
1513 |
+
jQuery('.b2s-user-network-settings-post-format[data-network-type="' + jQuery(this).attr('data-network-type') + '"][data-network-id="' + jQuery(this).attr('data-network-id') + '"]').removeClass('b2s-settings-checked');
|
1514 |
+
var currentPostFormat = jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val();
|
1515 |
+
jQuery('.b2s-user-network-settings-post-format[data-network-type="' + jQuery(this).attr('data-network-type') + '"][data-network-id="' + jQuery(this).attr('data-network-id') + '"][data-post-format="' + currentPostFormat + '"]').addClass('b2s-settings-checked');
|
1516 |
+
jQuery('#b2s-post-ship-item-post-format-network-display-name').html(jQuery('.b2s-post-item-details-network-display-name[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').text().toUpperCase());
|
1517 |
+
}
|
1518 |
+
jQuery('.b2s-post-format-settings-info').hide();
|
1519 |
+
jQuery('.b2s-post-format-settings-info[data-network-id="' + jQuery(this).attr('data-network-id') + '"]').show();
|
1520 |
+
jQuery('#b2s-post-ship-item-post-format-modal').modal('show');
|
1521 |
+
jQuery('.b2s-user-network-settings-post-format').attr('data-network-auth-id', jQuery(this).attr('data-network-auth-id'));
|
1522 |
+
jQuery('.b2s-user-network-settings-post-format').attr('data-post-wp-type', jQuery(this).attr('data-post-wp-type'));
|
1523 |
+
} else {
|
1524 |
+
jQuery('#b2sInfoFormatModal').modal('show');
|
1525 |
+
}
|
1526 |
+
return false;
|
1527 |
+
});
|
1528 |
+
jQuery(document).on('click', '.b2s-btn-trigger-post-ship-item-post-format', function () {
|
1529 |
+
jQuery('.b2s-post-ship-item-post-format[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').trigger('click');
|
1530 |
+
return false;
|
1531 |
+
});
|
1532 |
+
jQuery(document).on('click', '.b2s-post-item-details-release-input-days', function () {
|
1533 |
+
jQuery('.b2s-post-item-details-release-input-days[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').removeClass('error');
|
1534 |
+
});
|
1535 |
+
jQuery(document).on('change', '.b2s-post-item-details-release-input-time', function () {
|
1536 |
+
jQuery('.b2s-post-item-details-release-input-time[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').removeClass('error');
|
1537 |
+
});
|
1538 |
+
jQuery(document).on('change', '.b2s-post-item-details-release-input-date', function () {
|
1539 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').removeClass('error');
|
1540 |
+
});
|
1541 |
+
jQuery('.b2s-network-details-mandant-select').change(function () {
|
1542 |
+
hideDuplicateAuths();
|
1543 |
+
chooseMandant();
|
1544 |
+
});
|
1545 |
+
jQuery(document).on('change', '.b2s-post-item-details-item-group-select', function () {
|
1546 |
+
if (jQuery(this).attr('data-change-network-display-name') == 'true') {
|
1547 |
+
var label = jQuery(this.options[this.selectedIndex]).closest('optgroup').prop('label');
|
1548 |
+
jQuery('.b2s-post-item-details-network-display-name[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').html(label);
|
1549 |
+
jQuery('.b2s-post-ship-network-display-name[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val(label);
|
1550 |
+
}
|
1551 |
+
//Xing groups
|
1552 |
+
if (jQuery(this).attr('data-network-id') == '19') {
|
1553 |
+
var option = jQuery('option:selected', this).attr('data-network-kind');
|
1554 |
+
if (option == '3') { //Marketplace
|
1555 |
+
jQuery('.marketplace_area[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-id="' + jQuery(this).attr('data-network-id') + '"]').show();
|
1556 |
+
} else {
|
1557 |
+
jQuery('.marketplace_area[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-id="' + jQuery(this).attr('data-network-id') + '"]').hide();
|
1558 |
+
}
|
1559 |
+
jQuery('.networkKind[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val(option);
|
1560 |
+
}
|
1561 |
+
|
1562 |
+
return false;
|
1563 |
+
});
|
1564 |
+
//select recurrent sched interval mode
|
1565 |
+
jQuery(document).on('change', '.b2s-post-item-details-release-input-interval-select', function () {
|
1566 |
+
var interval = jQuery(this).val();
|
1567 |
+
var selectorInput = '[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]';
|
1568 |
+
var dataCount = jQuery(this).attr('data-network-count');
|
1569 |
+
releaseChooseInterval(interval, selectorInput, dataCount);
|
1570 |
+
return false;
|
1571 |
+
});
|
1572 |
+
//select shipping mode
|
1573 |
+
jQuery(document).on('change', '.b2s-post-item-details-release-input-date-select', function () {
|
1574 |
+
var dataNetworkCount = 0;
|
1575 |
+
if (jQuery(this).val() == 0) {
|
1576 |
+
//TOS Twitter 032018 - none multiple accounts post same content to same time
|
1577 |
+
if (jQuery(this).attr('data-network-id') == 2) {
|
1578 |
+
jQuery('.b2s-network-tos-sched-warning[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').hide();
|
1579 |
+
}
|
1580 |
+
}
|
1581 |
+
if (jQuery(this).val() == 2) {
|
1582 |
+
if (jQuery(this).attr('data-user-version') == 0) {
|
1583 |
+
jQuery('#b2s-sched-post-modal').modal('show');
|
1584 |
+
return false;
|
1585 |
+
} else {
|
1586 |
+
//TOS Twitter 032018 - none multiple accounts post same content to same time
|
1587 |
+
if (jQuery(this).attr('data-network-id') == 2) {
|
1588 |
+
jQuery('.b2s-network-tos-sched-warning[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').show();
|
1589 |
+
}
|
1590 |
+
|
1591 |
+
for (var i = 1; i <= 2; i++) {
|
1592 |
+
jQuery('.b2s-post-item-details-release-input-days[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + i + '"]').each(function () {
|
1593 |
+
if (jQuery(this).prop('checked')) {
|
1594 |
+
dataNetworkCount = 1;
|
1595 |
+
}
|
1596 |
+
});
|
1597 |
+
}
|
1598 |
+
if (dataNetworkCount == 2) {
|
1599 |
+
jQuery('.b2s-post-item-details-release-input-add[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="0"]').hide();
|
1600 |
+
jQuery('.b2s-post-item-details-release-input-add[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="1"]').hide();
|
1601 |
+
jQuery('.b2s-post-item-details-release-input-hide[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="1"').hide();
|
1602 |
+
jQuery('.b2s-post-item-details-release-input-hide[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="2"').show();
|
1603 |
+
} else if (dataNetworkCount == 1) {
|
1604 |
+
jQuery('.b2s-post-item-details-release-input-add[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="0"]').hide();
|
1605 |
+
jQuery('.b2s-post-item-details-release-input-hide[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="1"').show();
|
1606 |
+
}
|
1607 |
+
}
|
1608 |
+
}
|
1609 |
+
if (jQuery(this).val() == 1) {
|
1610 |
+
if (jQuery(this).attr('data-user-version') == 0) {
|
1611 |
+
jQuery('#b2s-sched-post-modal').modal('show');
|
1612 |
+
return false;
|
1613 |
+
} else {
|
1614 |
+
|
1615 |
+
//TOS Twitter 032018 - none multiple accounts post same content to same time
|
1616 |
+
if (jQuery(this).attr('data-network-id') == 2) {
|
1617 |
+
jQuery('.b2s-network-tos-sched-warning[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').hide();
|
1618 |
+
} else {
|
1619 |
+
//set orginal edit content for customize sched content
|
1620 |
+
var content = jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="-1"]').val();
|
1621 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val(content);
|
1622 |
+
|
1623 |
+
}
|
1624 |
+
|
1625 |
+
checkSchedDateTime(jQuery(this).attr('data-network-auth-id'));
|
1626 |
+
if (dataNetworkCount == 2) {
|
1627 |
+
jQuery('.b2s-post-item-details-release-input-add[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="0"]').hide();
|
1628 |
+
jQuery('.b2s-post-item-details-release-input-add[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="1"]').hide();
|
1629 |
+
jQuery('.b2s-post-item-details-release-input-hide[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="1"').hide();
|
1630 |
+
jQuery('.b2s-post-item-details-release-input-hide[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="2"').show();
|
1631 |
+
} else if (dataNetworkCount == 1) {
|
1632 |
+
jQuery('.b2s-post-item-details-release-input-add[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="0"]').hide();
|
1633 |
+
jQuery('.b2s-post-item-details-release-input-hide[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="1"').show();
|
1634 |
+
}
|
1635 |
+
}
|
1636 |
+
}
|
1637 |
+
releaseChoose(jQuery(this).val(), jQuery(this).attr('data-network-auth-id'), dataNetworkCount);
|
1638 |
+
});
|
1639 |
+
jQuery(document).on('click', '#b2s-network-sched-post-info-ignore', function () {
|
1640 |
+
jQuery('#b2sSchedPostInfoIgnore').val("1");
|
1641 |
+
jQuery('.b2s-submit-btn').trigger("click");
|
1642 |
+
return false;
|
1643 |
+
});
|
1644 |
+
jQuery(document).on('click', '.b2s-re-share-btn', function () {
|
1645 |
+
jQuery('.panel-group').removeClass('b2s-border-color-warning');
|
1646 |
+
jQuery(".b2s-settings-user-sched-time-area").show();
|
1647 |
+
jQuery('#b2s-sidebar-wrapper').show();
|
1648 |
+
jQuery('.b2s-post-item-info-area').show();
|
1649 |
+
jQuery('.b2s-post-item-details-message-info').show();
|
1650 |
+
jQuery('.b2s-post-item-details-edit-area').show();
|
1651 |
+
jQuery('.b2s-post-item-details-message-result').hide();
|
1652 |
+
jQuery('.b2s-post-item-details-message-result').html("");
|
1653 |
+
jQuery(".b2s-post-area").show();
|
1654 |
+
jQuery('.b2s-publish-area').show();
|
1655 |
+
jQuery('.b2s-footer-menu').show();
|
1656 |
+
window.scrollTo(0, 0);
|
1657 |
+
jQuery('.b2s-reporting-btn-area').hide();
|
1658 |
+
jQuery('#b2sSchedPostInfoIgnore').val("0");
|
1659 |
+
//Calendar close for resfresh
|
1660 |
+
jQuery('.b2s-toogle-calendar-btn').each(function () {
|
1661 |
+
if (!jQuery(this).hasClass('hide')) {
|
1662 |
+
var toogleBtnText = jQuery(this).attr('data-toogle-text-btn');
|
1663 |
+
var currentBtnText = jQuery(this).text();
|
1664 |
+
jQuery(this).text(toogleBtnText);
|
1665 |
+
jQuery(this).attr('data-toogle-text-btn', currentBtnText);
|
1666 |
+
var networkAuthId = jQuery(this).attr('data-network-auth-id');
|
1667 |
+
var calendar = jQuery('.b2s-post-item-calendar-area[data-network-auth-id="' + networkAuthId + '"]');
|
1668 |
+
calendar.removeClass('show');
|
1669 |
+
calendar.addClass('hide');
|
1670 |
+
jQuery('.b2s-calendar-filter-area[data-network-auth-id="' + networkAuthId + '"]').addClass('hide');
|
1671 |
+
}
|
1672 |
+
});
|
1673 |
+
|
1674 |
+
//TOS XING Group
|
1675 |
+
jQuery('.b2s-network-select-btn').each(function () {
|
1676 |
+
if (jQuery(this).children().hasClass('active')) {
|
1677 |
+
if (jQuery(this).attr('data-network-id') == "19" && jQuery(this).attr('data-network-type') == "2") {
|
1678 |
+
b2sTosXingGroupCount--;
|
1679 |
+
deactivatePortal(jQuery(this).attr('data-network-auth-id'));
|
1680 |
+
jQuery('.b2s-network-select-btn[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').addClass('b2s-network-select-btn-deactivate');
|
1681 |
+
jQuery('.b2s-post-item-loading-dummy[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').remove();
|
1682 |
+
}
|
1683 |
+
}
|
1684 |
+
});
|
1685 |
+
|
1686 |
+
//Approve
|
1687 |
+
jQuery('.b2s-post-item-details-post-format').each(function () {
|
1688 |
+
if (jQuery(this).attr('data-network-id') == "1" && jQuery(this).attr('data-network-type') == '0' && jQuery(this).val() == "1") {
|
1689 |
+
jQuery('.b2s-post-approve-info[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"').show();
|
1690 |
+
}
|
1691 |
+
});
|
1692 |
+
|
1693 |
+
return false;
|
1694 |
+
});
|
1695 |
+
jQuery(document).on('click', '.b2s-post-item-details-release-input-add', function () {
|
1696 |
+
var networkAuthId = jQuery(this).attr('data-network-auth-id');
|
1697 |
+
var netCount = jQuery(this).attr('data-network-count');
|
1698 |
+
var networkId = jQuery(this).attr('data-network-id');
|
1699 |
+
var networkType = jQuery(this).attr('data-network-type');
|
1700 |
+
var netCountNext = parseInt(netCount) + 1;
|
1701 |
+
var curMode = jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').val();
|
1702 |
+
jQuery(this).hide();
|
1703 |
+
jQuery('.b2s-post-item-details-release-input-hide[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCount + '"]').hide();
|
1704 |
+
jQuery('.b2s-post-item-details-release-input-hide[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCountNext + '"]').show();
|
1705 |
+
jQuery('.b2s-post-item-details-release-area-details-row[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCountNext + '"]').show();
|
1706 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCountNext + '"]').show();
|
1707 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCountNext + '"]').removeAttr('disabled');
|
1708 |
+
jQuery('.b2s-post-item-details-release-input-time[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCountNext + '"]').show();
|
1709 |
+
jQuery('.b2s-post-item-details-release-input-time[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCountNext + '"]').removeAttr('disabled');
|
1710 |
+
|
1711 |
+
if (curMode == 1) {
|
1712 |
+
//since 4.9.0 custom content
|
1713 |
+
jQuery('.b2s-post-item-details-release-customize-sched-area-details-row[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCountNext + '"]').show();
|
1714 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCountNext + '"]').removeAttr('disabled');
|
1715 |
+
}
|
1716 |
+
//recurrently
|
1717 |
+
if (curMode == 2) {
|
1718 |
+
jQuery('.b2s-post-item-details-release-input-interval-select[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCountNext + '"]').show();
|
1719 |
+
jQuery('.b2s-post-item-details-release-input-interval-select[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCountNext + '"]').removeAttr('disabled');
|
1720 |
+
jQuery('.b2s-post-item-details-release-area-label-duration[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCountNext + '"]').show();
|
1721 |
+
jQuery('.b2s-post-item-details-release-area-div-duration[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCountNext + '"]').show();
|
1722 |
+
jQuery('.b2s-post-item-details-release-input-weeks[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCountNext + '"]').show();
|
1723 |
+
jQuery('.b2s-post-item-details-release-input-weeks[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCountNext + '"]').removeAttr('disabled');
|
1724 |
+
jQuery('.b2s-post-item-details-release-input-weeks[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCountNext + '"]').val('1');
|
1725 |
+
jQuery('.b2s-post-item-details-release-area-label-day[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCountNext + '"]').show();
|
1726 |
+
jQuery('.b2s-post-item-details-release-input-days[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCountNext + '"]').removeAttr('disabled');
|
1727 |
+
//since 4.9.0 custom content
|
1728 |
+
jQuery('.b2s-post-item-details-release-customize-sched-area-details-row[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCountNext + '"]').hide();
|
1729 |
+
}
|
1730 |
+
|
1731 |
+
return false;
|
1732 |
+
});
|
1733 |
+
jQuery(document).on('click', '.b2s-post-item-details-release-input-hide', function () {
|
1734 |
+
var networkAuthId = jQuery(this).attr('data-network-auth-id');
|
1735 |
+
var netCount = jQuery(this).attr('data-network-count');
|
1736 |
+
var netCountBevor = parseInt(netCount) - 1;
|
1737 |
+
var selectorInput = '[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCount + '"]'
|
1738 |
+
jQuery('.b2s-post-item-details-release-area-details-row' + selectorInput).hide();
|
1739 |
+
jQuery('.b2s-post-item-details-release-input-hide[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCountBevor + '"]').show();
|
1740 |
+
jQuery('.b2s-post-item-details-release-input-add[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + netCountBevor + '"]').show();
|
1741 |
+
//clean all fields
|
1742 |
+
jQuery('.b2s-post-item-details-release-input-date' + selectorInput).prop('disabled', true);
|
1743 |
+
jQuery('.b2s-post-item-details-release-input-time' + selectorInput).prop('disabled', true);
|
1744 |
+
jQuery('.b2s-post-item-details-release-input-weeks' + selectorInput).val('');
|
1745 |
+
jQuery('.b2s-post-item-details-release-input-weeks' + selectorInput).prop('disabled', true);
|
1746 |
+
jQuery('.b2s-post-item-details-release-input-days' + selectorInput).prop('checked', false);
|
1747 |
+
jQuery('.b2s-post-item-details-release-input-days' + selectorInput).prop('disabled', true);
|
1748 |
+
//since 4.9.0 custom content
|
1749 |
+
jQuery('.b2s-post-item-details-item-message-input' + selectorInput).prop('disabled', true);
|
1750 |
+
jQuery('.b2s-post-item-details-item-message-input' + selectorInput).removeClass('error');
|
1751 |
+
jQuery('.b2s-post-item-details-release-customize-sched-area-details-row' + selectorInput).hide();
|
1752 |
+
jQuery('.b2s-post-item-details-release-input-interval-select' + selectorInput).prop('disabled', true);
|
1753 |
+
jQuery('.b2s-post-item-details-release-input-interval-select' + selectorInput).val("0");
|
1754 |
+
jQuery('.b2s-post-item-details-release-area-label-duration-month' + selectorInput).hide();
|
1755 |
+
jQuery('.b2s-post-item-details-release-area-div-duration-month' + selectorInput).hide();
|
1756 |
+
jQuery('.b2s-post-item-details-release-input-months' + selectorInput).prop('disabled', true);
|
1757 |
+
jQuery('.b2s-post-item-details-release-input-months' + selectorInput).val("1");
|
1758 |
+
jQuery('.b2s-post-item-details-release-area-label-select-day' + selectorInput).hide();
|
1759 |
+
jQuery('.b2s-post-item-details-release-input-select-day' + selectorInput).prop('disabled', true);
|
1760 |
+
jQuery('.b2s-post-item-details-release-input-select-day' + selectorInput).val("1");
|
1761 |
+
jQuery('.b2s-post-item-details-release-area-label-duration-time' + selectorInput).hide();
|
1762 |
+
jQuery('.b2s-post-item-details-release-area-div-duration-time' + selectorInput).hide();
|
1763 |
+
jQuery('.b2s-post-item-details-release-input-times' + selectorInput).prop('disabled', true);
|
1764 |
+
jQuery('.b2s-post-item-details-release-input-times' + selectorInput).val("1");
|
1765 |
+
jQuery('.b2s-post-item-details-release-area-label-select-timespan' + selectorInput).hide();
|
1766 |
+
jQuery('.b2s-post-item-details-release-input-select-timespan' + selectorInput).prop('disabled', true);
|
1767 |
+
jQuery('.b2s-post-item-details-release-input-select-timespan' + selectorInput).val("1");
|
1768 |
+
return false;
|
1769 |
+
});
|
1770 |
+
jQuery(document).on("keyup", ".complete_network_url", function () {
|
1771 |
+
var url = jQuery(this).val();
|
1772 |
+
jQuery(this).removeClass("error");
|
1773 |
+
if (url.length != "0") {
|
1774 |
+
if (url.indexOf("http://") == -1 && url.indexOf("https://") == -1) {
|
1775 |
+
url = "http://" + url;
|
1776 |
+
jQuery(this).val(url);
|
1777 |
+
}
|
1778 |
+
} else if (jQuery(this).hasClass("required_network_url")) {
|
1779 |
+
if (!(jQuery(this).attr('data-network-id') == 1 && jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + jQuery(this).attr('data-network-auth-id') + ']').val() == 1)) { //Facebook Imagepost don't require Link
|
1780 |
+
url = jQuery("#b2sDefault_url").val();
|
1781 |
+
jQuery(this).val(url);
|
1782 |
+
}
|
1783 |
+
}
|
1784 |
+
});
|
1785 |
+
jQuery(document).on('click', '.scroll-to-top', function () {
|
1786 |
+
window.scrollTo(0, 0);
|
1787 |
+
return false;
|
1788 |
+
});
|
1789 |
+
jQuery(document).on('click', '.scroll-to-bottom', function () {
|
1790 |
+
window.scrollTo(0, document.body.scrollHeight);
|
1791 |
+
return false;
|
1792 |
+
});
|
1793 |
+
jQuery(document).on('click', '.b2s-post-item-details-preview-url-reload', function () {
|
1794 |
+
var re = new RegExp(/^(https?:\/\/)+[a-zA-Z0-99ÄÖÜöäü-]+(?:\.[a-zA-Z0-99ÄÖÜöäü-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=%.]+$/);
|
1795 |
+
var networkAuthId = jQuery(this).attr('data-network-auth-id');
|
1796 |
+
var url = jQuery('.b2s-post-item-details-item-url-input[data-network-auth-id="' + networkAuthId + '"]').val();
|
1797 |
+
if (re.test(url)) {
|
1798 |
+
jQuery('.b2s-post-item-details-item-url-input[data-network-auth-id="' + networkAuthId + '"]').removeClass('error');
|
1799 |
+
jQuery(this).addClass('glyphicon-refresh-animate');
|
1800 |
+
jQuery('.b2s-server-connection-fail').hide();
|
1801 |
+
jQuery.ajax({
|
1802 |
+
url: ajaxurl,
|
1803 |
+
type: "POST",
|
1804 |
+
dataType: "json",
|
1805 |
+
cache: false,
|
1806 |
+
data: {
|
1807 |
+
'action': 'b2s_ship_item_reload_url',
|
1808 |
+
'networkId': jQuery(this).attr('data-network-id'),
|
1809 |
+
'networkAuthId': networkAuthId,
|
1810 |
+
'postId': jQuery('#b2sPostId').val(),
|
1811 |
+
'defaultUrl': jQuery('#b2sDefault_url').val(),
|
1812 |
+
'url': url
|
1813 |
+
},
|
1814 |
+
error: function () {
|
1815 |
+
jQuery('.b2s-server-connection-fail').show();
|
1816 |
+
return false;
|
1817 |
+
},
|
1818 |
+
success: function (data) {
|
1819 |
+
jQuery('.b2s-post-item-details-preview-url-reload[data-network-auth-id="' + data.networkAuthId + '"]').removeClass('glyphicon-refresh-animate');
|
1820 |
+
if (data.result == true) {
|
1821 |
+
if (data.networkId == 3 || data.networkId == 19) { // LI,XI
|
1822 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + data.networkAuthId + '"]').html(data.title);
|
1823 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + data.networkAuthId + '"]').html(data.description);
|
1824 |
+
} else {
|
1825 |
+
jQuery('.b2s-post-item-details-preview-title[data-network-auth-id="' + data.networkAuthId + '"]').val(data.title);
|
1826 |
+
jQuery('.b2s-post-item-details-preview-desc[data-network-auth-id="' + data.networkAuthId + '"]').val(data.description);
|
1827 |
+
}
|
1828 |
+
if (jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').attr('data-network-image-change') == '0') {
|
1829 |
+
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').attr('src', data.image);
|
1830 |
+
}
|
1831 |
+
if (jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').attr('data-network-image-change') == '1') {
|
1832 |
+
if (data.image != "") {
|
1833 |
+
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').attr('src', data.image);
|
1834 |
+
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + data.networkAuthId + '"]').val(data.image);
|
1835 |
+
} else {
|
1836 |
+
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + data.networkAuthId + '"]').attr('src', jQuery('#b2sDefaultNoImage').val());
|
1837 |
+
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + data.networkAuthId + '"]').val(jQuery('#b2sDefaultNoImage').val());
|
1838 |
+
}
|
1839 |
+
}
|
1840 |
+
}
|
1841 |
+
}
|
1842 |
+
|
1843 |
+
});
|
1844 |
+
} else {
|
1845 |
+
jQuery('.b2s-post-item-details-item-url-input[data-network-auth-id="' + networkAuthId + '"]').addClass('error');
|
1846 |
+
}
|
1847 |
+
});
|
1848 |
+
jQuery(document).on('click', '.b2s-select-image-modal-open', function () {
|
1849 |
+
var metaType = jQuery(this).attr('data-meta-type');
|
1850 |
+
var authId = jQuery(this).attr('data-network-auth-id');
|
1851 |
+
var countId = jQuery(this).attr('data-network-count');
|
1852 |
+
var postFormat = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + authId + ']').val();
|
1853 |
+
var networkId = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + authId + ']').attr("data-network-id");
|
1854 |
+
var isMetaChecked = false;
|
1855 |
+
if (networkId == "1" && jQuery('#isOgMetaChecked').val() == "1") {
|
1856 |
+
isMetaChecked = true;
|
1857 |
+
}
|
1858 |
+
if (networkId == "2" && jQuery('#isCardMetaChecked').val() == "1") {
|
1859 |
+
isMetaChecked = true;
|
1860 |
+
}
|
1861 |
+
|
1862 |
+
if (postFormat == "0" && (networkId == "1" || networkId == "2")) { //isLinkPost for Facebook or Twitter
|
1863 |
+
jQuery('.meta-text').hide();
|
1864 |
+
if (!isMetaChecked) {
|
1865 |
+
if (networkId == "1") {
|
1866 |
+
jQuery('.isOgMetaChecked').show();
|
1867 |
+
} else {
|
1868 |
+
jQuery('.isCardMetaChecked').show();
|
1869 |
+
}
|
1870 |
+
jQuery('#b2s-info-change-meta-tag-modal').modal('show');
|
1871 |
+
return false;
|
1872 |
+
}
|
1873 |
+
}
|
1874 |
+
|
1875 |
+
jQuery('.b2s-image-change-this-network').attr('data-network-auth-id', authId).attr('data-network-count', countId).attr('data-network-id', networkId);
|
1876 |
+
jQuery('.b2s-image-change-all-network').attr('data-network-count', countId).attr('data-network-id', networkId);
|
1877 |
+
jQuery('.b2s-upload-image').attr('data-network-auth-id', authId).attr('data-network-count', countId);
|
1878 |
+
var content = "<img class='b2s-post-item-network-image-selected-account' height='22px' src='" + jQuery('.b2s-post-item-network-image[data-network-auth-id="' + authId + '"]').attr('src') + "' /> " + jQuery('.b2s-post-item-details-network-display-name[data-network-auth-id="' + authId + '"]').html();
|
1879 |
+
jQuery('.b2s-selected-network-for-image-info').html(content);
|
1880 |
+
jQuery('#b2sInsertImageType').val("0");
|
1881 |
+
if (typeof metaType !== 'undefined') {
|
1882 |
+
jQuery('.b2s-image-change-this-network').attr('data-meta-type', metaType);
|
1883 |
+
} else {
|
1884 |
+
jQuery('.b2s-image-change-this-network').attr('data-meta-type', "");
|
1885 |
+
}
|
1886 |
+
//set selected image
|
1887 |
+
var selImageVal = jQuery('.b2s-post-item-details-url-image[data-network-count="' + countId + '"][data-network-auth-id="' + authId + '"]').attr('src');
|
1888 |
+
jQuery('#b2s-network-select-image').modal('show');
|
1889 |
+
jQuery('.checkNetworkImage[data-src="' + selImageVal + '"]').attr('checked', 'checked');
|
1890 |
+
imageSize();
|
1891 |
+
return false;
|
1892 |
+
});
|
1893 |
+
jQuery(document).on('click', '.b2s-image-remove-btn', function () {
|
1894 |
+
var networkAuthId = jQuery(this).attr('data-network-auth-id');
|
1895 |
+
var networkCountId = jQuery(this).attr('data-network-count');
|
1896 |
+
var defaultImage = jQuery('#b2sDefaultNoImage').val();
|
1897 |
+
//default
|
1898 |
+
if (networkCountId == -1) {
|
1899 |
+
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + networkAuthId + '"]').attr('src', defaultImage);
|
1900 |
+
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val("");
|
1901 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').hide();
|
1902 |
+
} else {
|
1903 |
+
//customize sched content
|
1904 |
+
jQuery('.b2s-post-item-details-url-image[data-network-count="' + networkCountId + '"][data-network-auth-id="' + networkAuthId + '"]').attr('src', defaultImage);
|
1905 |
+
jQuery('.b2s-image-url-hidden-field[data-network-count="' + networkCountId + '"][data-network-auth-id="' + networkAuthId + '"]').val("");
|
1906 |
+
jQuery('.b2s-image-remove-btn[data-network-count="' + networkCountId + '"][data-network-auth-id="' + networkAuthId + '"]').hide();
|
1907 |
+
}
|
1908 |
+
|
1909 |
+
//add check linkpost change meta tag image for this network
|
1910 |
+
var postFormat = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').val();
|
1911 |
+
var networkId = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').attr('data-network-id');
|
1912 |
+
if (typeof postFormat !== typeof undefined && postFormat !== false) {
|
1913 |
+
if (postFormat == "0") { //if linkpost
|
1914 |
+
jQuery('.b2s-post-item-details-post-format[data-network-id=' + networkId + ']').each(function () {
|
1915 |
+
if (jQuery(this).val() == "0" && jQuery('.b2s-post-ship-item-post-format[data-network-auth-id=' + jQuery(this).attr('data-network-auth-id') + ']').is(":visible") && jQuery(this).attr('data-network-auth-id') != networkAuthId) { //other Linkpost by same network
|
1916 |
+
//override this image with current image
|
1917 |
+
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').attr('src', defaultImage);
|
1918 |
+
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val("");
|
1919 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').hide();
|
1920 |
+
}
|
1921 |
+
});
|
1922 |
+
//customize sched content
|
1923 |
+
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + networkAuthId + '"]').attr('src', defaultImage);
|
1924 |
+
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val("");
|
1925 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').hide();
|
1926 |
+
}
|
1927 |
+
}
|
1928 |
+
|
1929 |
+
return false;
|
1930 |
+
});
|
1931 |
+
jQuery(document).on('click', '.b2s-image-change-this-network', function () {
|
1932 |
+
var networkAuthId = jQuery(this).attr('data-network-auth-id');
|
1933 |
+
var networkCountId = jQuery(this).attr('data-network-count');
|
1934 |
+
var networkId = jQuery(this).attr('data-network-id');
|
1935 |
+
var currentImage = jQuery('input[name=image_url]:checked').val();
|
1936 |
+
if (jQuery('#b2sInsertImageType').val() == '1') { //HTML-Network
|
1937 |
+
var sceditor = jQuery('.b2s-post-item-details-item-message-input-allow-html[data-network-auth-id="' + networkAuthId + '"]').sceditor('instance');
|
1938 |
+
sceditor.insert("<br /><img src='" + currentImage + "'/><br />");
|
1939 |
+
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val(currentImage); //Torial
|
1940 |
+
} else {
|
1941 |
+
//default
|
1942 |
+
if (networkCountId == -1) {
|
1943 |
+
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + networkAuthId + '"]').attr('src', currentImage);
|
1944 |
+
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + networkAuthId + '"]').removeClass('b2s-img-required');
|
1945 |
+
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val(currentImage);
|
1946 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').show();
|
1947 |
+
} else {
|
1948 |
+
//customize sched content
|
1949 |
+
jQuery('.b2s-post-item-details-url-image[data-network-count="' + networkCountId + '"][data-network-auth-id="' + networkAuthId + '"]').attr('src', currentImage);
|
1950 |
+
jQuery('.b2s-post-item-details-url-image[data-network-count="' + networkCountId + '"][data-network-auth-id="' + networkAuthId + '"]').removeClass('b2s-img-required');
|
1951 |
+
jQuery('.b2s-image-url-hidden-field[data-network-count="' + networkCountId + '"][data-network-auth-id="' + networkAuthId + '"]').val(currentImage);
|
1952 |
+
jQuery('.b2s-image-remove-btn[data-network-count="' + networkCountId + '"][data-network-auth-id="' + networkAuthId + '"]').show();
|
1953 |
+
}
|
1954 |
+
|
1955 |
+
if (jQuery(this).attr('data-meta-type') == "og") {
|
1956 |
+
jQuery('#b2sChangeOgMeta').val("1");
|
1957 |
+
}
|
1958 |
+
if (jQuery(this).attr('data-meta-type') == "card") {
|
1959 |
+
jQuery('#b2sChangeCardMeta').val("1");
|
1960 |
+
}
|
1961 |
+
|
1962 |
+
//add check linkpost change meta tag image for this network
|
1963 |
+
var postFormat = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').val();
|
1964 |
+
var networkId = jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').attr('data-network-id');
|
1965 |
+
if (typeof postFormat !== typeof undefined && postFormat !== false) {
|
1966 |
+
if (networkId != 12) { // ignore for instagram
|
1967 |
+
if (postFormat == "0") { //if linkpost
|
1968 |
+
jQuery('.b2s-post-item-details-post-format[data-network-id=' + networkId + ']').each(function () {
|
1969 |
+
if (jQuery(this).val() == "0" && jQuery('.b2s-post-ship-item-post-format[data-network-auth-id=' + jQuery(this).attr('data-network-auth-id') + ']').is(":visible") && jQuery(this).attr('data-network-auth-id') != networkAuthId) { //other Linkpost by same network
|
1970 |
+
//override this image with current image
|
1971 |
+
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').attr('src', currentImage);
|
1972 |
+
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').removeClass('b2s-img-required');
|
1973 |
+
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val(currentImage);
|
1974 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').show();
|
1975 |
+
if (networkCountId >= 0) {
|
1976 |
+
jQuery('.b2s-image-remove-btn[data-network-count="-1"][data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').hide();
|
1977 |
+
}
|
1978 |
+
}
|
1979 |
+
});
|
1980 |
+
//customize sched content
|
1981 |
+
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + networkAuthId + '"]').attr('src', currentImage);
|
1982 |
+
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + networkAuthId + '"]').removeClass('b2s-img-required');
|
1983 |
+
jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + networkAuthId + '"]').val(currentImage);
|
1984 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"]').show();
|
1985 |
+
if (networkCountId >= 0) {
|
1986 |
+
jQuery('.b2s-image-remove-btn[data-network-count="-1"][data-network-auth-id="' + networkAuthId + '"]').hide();
|
1987 |
+
}
|
1988 |
+
}
|
1989 |
+
}
|
1990 |
+
}
|
1991 |
+
}
|
1992 |
+
jQuery('.b2s-upload-image-invalid-extension').hide();
|
1993 |
+
jQuery('.b2s-upload-image-no-permission').hide();
|
1994 |
+
jQuery('.b2s-upload-image-free-version-info').hide();
|
1995 |
+
jQuery('#b2s-network-select-image').modal('hide');
|
1996 |
+
return false;
|
1997 |
+
});
|
1998 |
+
jQuery(document).on('change', '.b2s-post-item-details-relay', function () {
|
1999 |
+
if (jQuery(this).attr('data-user-version') == 0) {
|
2000 |
+
jQuery(this).prop("checked", false);
|
2001 |
+
jQuery('#b2sInfoPostRelayModal').modal('show');
|
2002 |
+
return false;
|
2003 |
+
}
|
2004 |
+
jQuery('.b2s-post-item-relay-area-details-row[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').hide();
|
2005 |
+
if (jQuery(this).is(":checked")) {
|
2006 |
+
|
2007 |
+
if (jQuery('#b2sRelayAccountData').val() != "") {
|
2008 |
+
jQuery('.b2s-post-item-relay-area-details-ul[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').show();
|
2009 |
+
jQuery('.b2s-post-item-relay-area-details-row[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="0"]').show();
|
2010 |
+
jQuery('.b2s-post-item-details-relay-area-label-account[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="0"]').show();
|
2011 |
+
jQuery('.b2s-post-item-details-relay-area-label-delay[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="0"]').show();
|
2012 |
+
jQuery('.b2s-post-item-details-relay-input-account[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="0"]').show();
|
2013 |
+
jQuery('.b2s-post-item-details-relay-input-delay[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="0"]').show();
|
2014 |
+
jQuery('.b2s-post-item-details-relay-input-account[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="0"]').removeAttr('disabled');
|
2015 |
+
jQuery('.b2s-post-item-details-relay-input-delay[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="0"]').removeAttr('disabled');
|
2016 |
+
jQuery('.b2s-post-item-details-relay-input-add[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="0"]').show();
|
2017 |
+
//Relay Html Data
|
2018 |
+
if (jQuery('.b2s-post-item-details-relay-input-account[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="0"]').has('option').length == 0) {
|
2019 |
+
var optionData = window.atob(jQuery('#b2sRelayAccountData').val());
|
2020 |
+
jQuery('.b2s-post-item-details-relay-input-account[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="0"]').append(optionData);
|
2021 |
+
}
|
2022 |
+
|
2023 |
+
} else {
|
2024 |
+
jQuery(this).prop("checked", false);
|
2025 |
+
}
|
2026 |
+
|
2027 |
+
} else {
|
2028 |
+
jQuery('.b2s-post-item-relay-area-details-ul[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').hide();
|
2029 |
+
jQuery('.b2s-post-item-relay-area-details-row[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').hide();
|
2030 |
+
jQuery('.b2s-post-item-details-relay-area-label-account[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').hide();
|
2031 |
+
jQuery('.b2s-post-item-details-relay-area-label-delay[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').hide();
|
2032 |
+
jQuery('.b2s-post-item-details-relay-input-account[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').hide();
|
2033 |
+
jQuery('.b2s-post-item-details-relay-input-delay[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').prop('disabled', true);
|
2034 |
+
jQuery('.b2s-post-item-details-relay-input-account[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').prop('disabled', true);
|
2035 |
+
jQuery('.b2s-post-item-details-relay-input-delay[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').hide();
|
2036 |
+
jQuery('.b2s-post-item-details-relay-input-add[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').hide();
|
2037 |
+
}
|
2038 |
+
return false;
|
2039 |
+
});
|
2040 |
+
jQuery(document).on('click', '.b2s-post-item-details-relay-input-add', function () {
|
2041 |
+
var netCount = jQuery(this).attr('data-network-count');
|
2042 |
+
var netCountNext = parseInt(netCount) + 1;
|
2043 |
+
jQuery(this).hide();
|
2044 |
+
jQuery('.b2s-post-item-relay-area-details-row[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + netCountNext + '"]').show();
|
2045 |
+
jQuery('.b2s-post-item-details-relay-area-label-account[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + netCountNext + '"]').show();
|
2046 |
+
jQuery('.b2s-post-item-details-relay-area-label-delay[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + netCountNext + '"]').show();
|
2047 |
+
jQuery('.b2s-post-item-details-relay-input-account[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + netCountNext + '"]').show();
|
2048 |
+
jQuery('.b2s-post-item-details-relay-input-delay[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + netCountNext + '"]').show();
|
2049 |
+
jQuery('.b2s-post-item-details-relay-input-account[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + netCountNext + '"]').removeAttr('disabled');
|
2050 |
+
jQuery('.b2s-post-item-details-relay-input-delay[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + netCountNext + '"]').removeAttr('disabled');
|
2051 |
+
jQuery('.b2s-post-item-details-relay-input-add[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + netCountNext + '"]').show();
|
2052 |
+
jQuery('.b2s-post-item-details-relay-input-hide[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + netCountNext + '"]').show();
|
2053 |
+
//Relay Html Data
|
2054 |
+
if (jQuery('.b2s-post-item-details-relay-input-account[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + netCountNext + '"]').has('option').length == 0) {
|
2055 |
+
var optionData = window.atob(jQuery('#b2sRelayAccountData').val());
|
2056 |
+
jQuery('.b2s-post-item-details-relay-input-account[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + netCountNext + '"]').append(optionData);
|
2057 |
+
}
|
2058 |
+
|
2059 |
+
return false;
|
2060 |
+
});
|
2061 |
+
jQuery(document).on('click', '.b2s-post-item-details-relay-input-hide', function () {
|
2062 |
+
var netCount = jQuery(this).attr('data-network-count');
|
2063 |
+
jQuery('.b2s-post-item-relay-area-details-row[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + netCount + '"]').hide();
|
2064 |
+
jQuery('.b2s-post-item-details-relay-area-label-account[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + netCount + '"]').hide();
|
2065 |
+
jQuery('.b2s-post-item-details-relay-area-label-delay[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + netCount + '"]').hide();
|
2066 |
+
jQuery('.b2s-post-item-details-relay-input-account[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + netCount + '"]').hide();
|
2067 |
+
jQuery('.b2s-post-item-details-relay-input-delay[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + netCount + '"]').hide();
|
2068 |
+
jQuery('.b2s-post-item-details-relay-input-account[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + netCount + '"]').prop('disabled', true);
|
2069 |
+
jQuery('.b2s-post-item-details-relay-input-delay[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + netCount + '"]').prop('disabled', true);
|
2070 |
+
jQuery('.b2s-post-item-details-relay-input-add[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + netCount + '"]').hide()
|
2071 |
+
jQuery('.b2s-post-item-details-relay-input-hide[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + netCount + '"]').hide();
|
2072 |
+
if (netCount >= 1) {
|
2073 |
+
var before = netCount - 1;
|
2074 |
+
jQuery('.b2s-post-item-details-relay-input-add[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"][data-network-count="' + before + '"]').show();
|
2075 |
+
}
|
2076 |
+
|
2077 |
+
return false;
|
2078 |
+
});
|
2079 |
+
jQuery(document).on('click', '.b2s-image-change-all-network', function () {
|
2080 |
+
jQuery('.b2s-post-item-details-item-message-input-allow-html').each(function () {
|
2081 |
+
var sce = jQuery(this).sceditor('instance');
|
2082 |
+
if (typeof sce !== 'undefined' && typeof sce.insert !== 'undefined') {
|
2083 |
+
if (sce.getBody().find(".b2s-post-item-details-image-html-src").length > 0) {
|
2084 |
+
sce.getBody().find(".b2s-post-item-details-image-html-src").attr('src', jQuery('input[name=image_url]:checked').val());
|
2085 |
+
} else {
|
2086 |
+
sce.insert("<br /><img class='b2s-post-item-details-image-html-src' src='" + jQuery('input[name=image_url]:checked').val() + "'/><br />");
|
2087 |
+
}
|
2088 |
+
}
|
2089 |
+
});
|
2090 |
+
jQuery('.b2s-post-item-details-url-image[data-network-image-change="1"]').attr('src', jQuery('input[name=image_url]:checked').val());
|
2091 |
+
jQuery('#b2s_blog_default_image').val(jQuery('input[name=image_url]:checked').val());
|
2092 |
+
jQuery('.b2s-post-item-details-url-image').removeClass('b2s-img-required');
|
2093 |
+
jQuery('.b2s-image-url-hidden-field').val(jQuery('input[name=image_url]:checked').val());
|
2094 |
+
jQuery('.b2s-image-remove-btn').show();
|
2095 |
+
var networkCountId = jQuery(this).attr('data-network-count');
|
2096 |
+
if (networkCountId >= 0) {
|
2097 |
+
jQuery('.b2s-image-remove-btn[data-network-count="-1"]').hide();
|
2098 |
+
}
|
2099 |
+
|
2100 |
+
jQuery('.b2s-upload-image-invalid-extension').hide();
|
2101 |
+
jQuery('.b2s-upload-image-no-permission').hide();
|
2102 |
+
jQuery('.b2s-upload-image-free-version-info').hide();
|
2103 |
+
jQuery('.b2sChangeOgMeta').val("1");
|
2104 |
+
jQuery('.b2sChangeCardMeta').val("1");
|
2105 |
+
jQuery('#b2s-network-select-image').modal('hide');
|
2106 |
+
return false;
|
2107 |
+
});
|
2108 |
+
jQuery(document).on('click', '.b2s-upload-image', function () {
|
2109 |
+
if (typeof wp !== 'undefined' && wp.media && wp.media.editor) {
|
2110 |
+
jQuery('#b2s-network-select-image').modal('hide');
|
2111 |
+
wpMedia = wp.media({
|
2112 |
+
title: jQuery('#b2s_wp_media_headline').val(),
|
2113 |
+
button: {
|
2114 |
+
text: jQuery('#b2s_wp_media_btn').val(),
|
2115 |
+
},
|
2116 |
+
multiple: false,
|
2117 |
+
library: {type: 'image'}
|
2118 |
+
});
|
2119 |
+
wpMedia.open();
|
2120 |
+
wpMedia.on('select', function () {
|
2121 |
+
var validExtensions = ['jpg', 'jpeg', 'png'];
|
2122 |
+
var attachment = wpMedia.state().get('selection').first().toJSON();
|
2123 |
+
var attachmenUrl = attachment.url;
|
2124 |
+
var attachmenUrlExt = attachmenUrl.substr(attachmenUrl.lastIndexOf('.') + 1);
|
2125 |
+
attachmenUrlExt = attachmenUrlExt.toLowerCase();
|
2126 |
+
if (jQuery.inArray(attachmenUrlExt, validExtensions) == -1) {
|
2127 |
+
jQuery('#b2s-network-select-image').modal('show');
|
2128 |
+
jQuery('.b2s-upload-image-invalid-extension').show();
|
2129 |
+
jQuery('#b2s-upload-image-invalid-extension-file-name').html('<span class="glyphicon glyphicon-ban-circle"></span> ' + attachment.name + '.' + attachmenUrlExt + '<br>');
|
2130 |
+
jQuery('.b2s-choose-image-no-image-info-text').hide();
|
2131 |
+
jQuery('.b2s-choose-image-no-image-extra-btn').hide();
|
2132 |
+
return false;
|
2133 |
+
}
|
2134 |
+
var count = parseInt(jQuery('.b2s-choose-image-count').val());
|
2135 |
+
count = count + 1;
|
2136 |
+
jQuery('.b2s-choose-image-count').val(count);
|
2137 |
+
var content = '<div class="b2s-image-item">' +
|
2138 |
+
'<div class="b2s-image-item-thumb">' +
|
2139 |
+
'<label for="b2s-image-count-' + count + '">' +
|
2140 |
+
'<img class="img-thumbnail networkImage" alt="blogImage" src="' + attachment.url + '">' +
|
2141 |
+
'</label>' +
|
2142 |
+
'</div>' +
|
2143 |
+
'<div class="b2s-image-item-caption text-center">' +
|
2144 |
+
'<div class="b2s-image-item-caption-resolution clearfix small"></div>' +
|
2145 |
+
'<input type="radio" value="' + attachment.url + '" data-src="' + attachment.url + '" class="checkNetworkImage" name="image_url" id="b2s-image-count-' + count + '">' +
|
2146 |
+
'</div>' +
|
2147 |
+
'</div>';
|
2148 |
+
jQuery('.b2s-image-choose-area').html(jQuery('.b2s-image-choose-area').html() + content);
|
2149 |
+
jQuery('.b2s-image-change-btn-area').show();
|
2150 |
+
jQuery('.b2s-choose-image-no-image-info-text').hide();
|
2151 |
+
jQuery('.b2s-choose-image-no-image-extra-btn').hide();
|
2152 |
+
jQuery('.b2s-upload-image-invalid-extension').hide();
|
2153 |
+
jQuery('input[name=image_url]:last').prop("checked", true);
|
2154 |
+
jQuery('#b2s-network-select-image').modal('show');
|
2155 |
+
imageSize();
|
2156 |
+
});
|
2157 |
+
wpMedia.on('close', function () {
|
2158 |
+
jQuery('#b2s-network-select-image').modal('show');
|
2159 |
+
});
|
2160 |
+
} else {
|
2161 |
+
jQuery('.b2s-upload-image-no-permission').show();
|
2162 |
+
}
|
2163 |
+
return false;
|
2164 |
+
});
|
2165 |
+
jQuery(document).on('click', '.b2s-upload-image-free-version', function () {
|
2166 |
+
jQuery('.b2s-upload-image-free-version-info').show();
|
2167 |
+
});
|
2168 |
+
jQuery("#b2sNetworkSent").keypress(function (e) {
|
2169 |
+
if (e.keyCode == 13 && e.target.tagName == "INPUT")
|
2170 |
+
return false;
|
2171 |
+
});
|
2172 |
+
jQuery.validator.addMethod("checkUrl", function (value, element, regexp) {
|
2173 |
+
var re = new RegExp(regexp);
|
2174 |
+
return this.optional(element) || re.test(value);
|
2175 |
+
}, "Invalid Url");
|
2176 |
+
jQuery.validator.addClassRules("b2s-post-item-details-item-url-input", {
|
2177 |
+
checkUrl: /^(https?:\/\/)+[a-zA-Z0-99ÄÖÜöäü-]+(?:\.[a-zA-Z0-99ÄÖÜöäü-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=%.]+$/
|
2178 |
+
});
|
2179 |
+
//Twitter TOS 032018 - protected multiple accounts with same content to same time ( by all connections)
|
2180 |
+
jQuery.validator.addMethod("unique", function (value, element, params) {
|
2181 |
+
var curNetworkAuthId = jQuery(element).attr('data-network-auth-id');
|
2182 |
+
var curNetworkId = jQuery(element).attr('data-network-id');
|
2183 |
+
var prefix = params;
|
2184 |
+
var selector = jQuery.validator.format("[name!='{0}'][unique='{1}']", element.name, prefix);
|
2185 |
+
var matches = new Array();
|
2186 |
+
|
2187 |
+
jQuery('.b2s-unique-content[data-network-id="' + curNetworkId + '"]').hide();
|
2188 |
+
jQuery('.tw-textarea-input').removeClass('error');
|
2189 |
+
|
2190 |
+
jQuery(selector).each(function (index, item) {
|
2191 |
+
//none disabled elements || ignore default content if curSchedMode=1
|
2192 |
+
if (!jQuery(item).is(':not(:disabled)') || !jQuery(item).is(':visible') || !jQuery('.b2s-post-item[data-network-auth-id="' + jQuery(item).attr('data-network-auth-id') + '"]').is(':visible') || (jQuery(item).attr('data-network-count') == -1 && jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + jQuery(item).attr('data-network-auth-id') + '"] option[value="1"]:selected').length > 0)) {
|
2193 |
+
return true;
|
2194 |
+
}
|
2195 |
+
if (jQuery.trim(value) == jQuery.trim(jQuery(item).val())) {
|
2196 |
+
jQuery('.b2s-unique-content[data-network-auth-id="' + jQuery(item).attr('data-network-auth-id') + '"]').show();
|
2197 |
+
jQuery('.tw-textarea-input[data-network-auth-id="' + jQuery(item).attr('data-network-auth-id') + '"]').addClass('error');
|
2198 |
+
matches.push(item);
|
2199 |
+
}
|
2200 |
+
});
|
2201 |
+
if (matches.length != 0) {
|
2202 |
+
jQuery('.b2s-unique-content[data-network-auth-id="' + curNetworkAuthId + '"]').show();
|
2203 |
+
}
|
2204 |
+
return matches.length == 0;
|
2205 |
+
});
|
2206 |
+
|
2207 |
+
|
2208 |
+
jQuery.validator.classRuleSettings.unique = {
|
2209 |
+
unique: true
|
2210 |
+
};
|
2211 |
+
jQuery.validator.addMethod("checkTags", function (value, element, test) {
|
2212 |
+
var allowed_tags = ['p', 'h1', 'h2', 'br', 'i', 'b', 'a', 'img'];
|
2213 |
+
var tags = value.match(/(<([^>]+)>)/ig);
|
2214 |
+
if (tags !== null && tags.length > 0) {
|
2215 |
+
if (jQuery(element).hasClass('b2s-post-item-details-item-message-input-allow-html')) {
|
2216 |
+
for (var i = 0; i < tags.length; i++) {
|
2217 |
+
var allowed_count = 0;
|
2218 |
+
for (var e = 0; e < allowed_tags.length; e++) {
|
2219 |
+
var regex = new RegExp("<\s*(\/)?" + allowed_tags[e] + "(( [^>]*>)|[>])");
|
2220 |
+
if (tags[i].match(regex) != null) {
|
2221 |
+
allowed_count = 1;
|
2222 |
+
}
|
2223 |
+
}
|
2224 |
+
if (allowed_count == 0) {
|
2225 |
+
return false;
|
2226 |
+
}
|
2227 |
+
}
|
2228 |
+
} else {
|
2229 |
+
return false;
|
2230 |
+
}
|
2231 |
+
}
|
2232 |
+
return true;
|
2233 |
+
});
|
2234 |
+
jQuery.validator.addClassRules('b2s-post-item-details-item-message-input', {'checkTags': true});
|
2235 |
+
jQuery.validator.addClassRules('b2s-post-item-details-release-input-date-select', {'checkSched': true});
|
2236 |
+
jQuery.validator.addClassRules('b2s-post-item-details-item-title-input', {required: true});
|
2237 |
+
jQuery.validator.addMethod('checkSched', function (value, element, rest) {
|
2238 |
+
if (jQuery(element).is(':not(:disabled)') && jQuery(element).val() != 0) {
|
2239 |
+
var networkAuthId = jQuery(element).attr('data-network-auth-id');
|
2240 |
+
if (jQuery('.b2s-post-item-details-release-input-time[data-network-auth-id="' + networkAuthId + '"]').val() == "") {
|
2241 |
+
jQuery('.b2s-post-item-details-release-input-time[data-network-auth-id="' + networkAuthId + '"]').addClass('error');
|
2242 |
+
return false;
|
2243 |
+
} else {
|
2244 |
+
jQuery('.b2s-post-item-details-release-input-time[data-network-auth-id="' + networkAuthId + '"]').removeClass('error');
|
2245 |
+
}
|
2246 |
+
if (jQuery(element).val() == 1) {
|
2247 |
+
if (jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + networkAuthId + '"]').val() == "") {
|
2248 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + networkAuthId + '"]').addClass('error');
|
2249 |
+
return false;
|
2250 |
+
} else {
|
2251 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-auth-id="' + networkAuthId + '"]').removeClass('error');
|
2252 |
+
}
|
2253 |
+
|
2254 |
+
} else {
|
2255 |
+
var maxCount = jQuery('.b2s-post-item-details-release-input-daySelect[data-network-auth-id="' + networkAuthId + '"]').length;
|
2256 |
+
jQuery('.b2s-post-item-details-release-input-days[data-network-auth-id="' + networkAuthId + '"]').removeClass('error');
|
2257 |
+
var daySelect = false;
|
2258 |
+
var daySelectErrorCount = 0;
|
2259 |
+
for (var count = 0; count < maxCount; count++) {
|
2260 |
+
if (jQuery('.b2s-post-item-details-release-input-lable-day-mo[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + count + '"]').is(':not(:disabled)')) {
|
2261 |
+
daySelect = false;
|
2262 |
+
jQuery('.b2s-post-item-details-release-input-days[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + count + '"]').each(function () {
|
2263 |
+
if (jQuery(this).is(':checked')) {
|
2264 |
+
daySelect = true;
|
2265 |
+
}
|
2266 |
+
});
|
2267 |
+
if (daySelect === false) {
|
2268 |
+
daySelectErrorCount += 1;
|
2269 |
+
jQuery('.b2s-post-item-details-release-input-days[data-network-auth-id="' + networkAuthId + '"][data-network-count="' + count + '"]').addClass('error');
|
2270 |
+
}
|
2271 |
+
}
|
2272 |
+
}
|
2273 |
+
if (daySelectErrorCount != 0) {
|
2274 |
+
return false;
|
2275 |
+
}
|
2276 |
+
}
|
2277 |
+
}
|
2278 |
+
return true;
|
2279 |
+
});
|
2280 |
+
jQuery("#b2sNetworkSent").validate({
|
2281 |
+
ignore: "",
|
2282 |
+
errorPlacement: function () {
|
2283 |
+
return false;
|
2284 |
+
},
|
2285 |
+
submitHandler: function (form) {
|
2286 |
+
if (checkNetworkSelected() == false) {
|
2287 |
+
return false;
|
2288 |
+
}
|
2289 |
+
if (checkPostSchedOnBlog() == false) {
|
2290 |
+
return false;
|
2291 |
+
}
|
2292 |
+
if (checkImageByImageNetworks() == false) {
|
2293 |
+
return false;
|
2294 |
+
}
|
2295 |
+
|
2296 |
+
var userDate = new Date();
|
2297 |
+
var pubDate = userDate.getFullYear() + "-" + padDate(userDate.getMonth() + 1) + "-" + padDate(userDate.getDate()) + " " + padDate(userDate.getHours()) + ":" + padDate(userDate.getMinutes()) + ":" + padDate(userDate.getSeconds());
|
2298 |
+
jQuery('#publish_date').val(pubDate);
|
2299 |
+
jQuery(".b2s-loading-area").show();
|
2300 |
+
jQuery(".b2s-post-area").hide();
|
2301 |
+
jQuery(".b2s-settings-user-sched-time-area").hide();
|
2302 |
+
jQuery('#b2s-sidebar-wrapper').hide();
|
2303 |
+
jQuery('.b2s-post-item-info-area').hide();
|
2304 |
+
jQuery.xhrPool.abortAll();
|
2305 |
+
jQuery('.b2s-server-connection-fail').hide();
|
2306 |
+
jQuery.ajax({
|
2307 |
+
processData: false,
|
2308 |
+
url: ajaxurl,
|
2309 |
+
type: "POST",
|
2310 |
+
dataType: "json",
|
2311 |
+
cache: false,
|
2312 |
+
data: jQuery(form).serialize(),
|
2313 |
+
error: function () {
|
2314 |
+
jQuery('.b2s-server-connection-fail').show();
|
2315 |
+
return false;
|
2316 |
+
},
|
2317 |
+
success: function (data) {
|
2318 |
+
var content = data.content;
|
2319 |
+
jQuery(".b2s-loading-area").hide();
|
2320 |
+
for (var i = 0; i < content.length; i++) {
|
2321 |
+
jQuery('.b2s-post-item-details-message-info[data-network-auth-id="' + content[i]['networkAuthId'] + '"]').hide();
|
2322 |
+
jQuery('.b2s-post-item-details-edit-area[data-network-auth-id="' + content[i]['networkAuthId'] + '"]').hide();
|
2323 |
+
jQuery('.b2s-post-item-details-message-result[data-network-auth-id="' + content[i]['networkAuthId'] + '"]').show();
|
2324 |
+
jQuery('.b2s-post-item-details-message-result[data-network-auth-id="' + content[i]['networkAuthId'] + '"]').html(content[i]['html']);
|
2325 |
+
jQuery('.b2s-post-approve-info').hide();
|
2326 |
+
jQuery('.b2s-content-info').hide();
|
2327 |
+
if (typeof content[i]['approve'] !== typeof undefined) {
|
2328 |
+
jQuery('.panel-group[data-network-auth-id="' + content[i]['networkAuthId'] + '"]').addClass('b2s-border-color-warning');
|
2329 |
+
}
|
2330 |
+
}
|
2331 |
+
jQuery(".b2s-post-area").show();
|
2332 |
+
jQuery('.b2s-publish-area').hide();
|
2333 |
+
jQuery('.b2s-footer-menu').hide();
|
2334 |
+
window.scrollTo(0, 0);
|
2335 |
+
jQuery('.b2s-empty-area').hide();
|
2336 |
+
jQuery('.b2s-reporting-btn-area').show();
|
2337 |
+
wp.heartbeat.connectNow();
|
2338 |
+
}
|
2339 |
+
});
|
2340 |
+
return false;
|
2341 |
+
}
|
2342 |
+
});
|
2343 |
+
jQuery('#b2s-network-list-modal').on('show.bs.modal', function (e) {
|
2344 |
+
jQuery('.b2s-network-list-modal-mandant').html(jQuery(".b2s-network-details-mandant-select option:selected").text());
|
2345 |
+
});
|
2346 |
+
jQuery(window).on("load", function () {
|
2347 |
+
var showMeridian = true;
|
2348 |
+
if (jQuery('#b2sUserLang').val() == 'de') {
|
2349 |
+
showMeridian = false;
|
2350 |
+
}
|
2351 |
+
jQuery('.b2s-settings-sched-item-input-time').timepicker({
|
2352 |
+
minuteStep: 30,
|
2353 |
+
appendWidgetTo: 'body',
|
2354 |
+
showSeconds: false,
|
2355 |
+
showMeridian: showMeridian,
|
2356 |
+
defaultTime: 'current'
|
2357 |
+
});
|
2358 |
+
});
|
2359 |
+
|
2360 |
+
jQuery(document).on('click', '.b2s-loading-area-save-profile-change', function () {
|
2361 |
+
var selectedAuth = new Array();
|
2362 |
+
jQuery('.b2s-network-list.active').each(function () {
|
2363 |
+
selectedAuth.push(jQuery(this).parents('.b2s-network-select-btn').attr('data-network-auth-id'));
|
2364 |
+
});
|
2365 |
+
jQuery('.b2s-server-connection-fail').hide();
|
2366 |
+
jQuery.ajax({
|
2367 |
+
url: ajaxurl,
|
2368 |
+
type: "POST",
|
2369 |
+
dataType: "json",
|
2370 |
+
cache: false,
|
2371 |
+
data: {
|
2372 |
+
'action': 'b2s_ship_navbar_save_settings',
|
2373 |
+
'mandantId': jQuery('.b2s-network-details-mandant-select').val(),
|
2374 |
+
'selectedAuth': selectedAuth
|
2375 |
+
},
|
2376 |
+
error: function () {
|
2377 |
+
jQuery('.b2s-server-connection-fail').show();
|
2378 |
+
return false;
|
2379 |
+
},
|
2380 |
+
success: function (data) {
|
2381 |
+
if (data.result == true) {
|
2382 |
+
jQuery('.b2s-ship-settings-save').show();
|
2383 |
+
window.scrollTo(0, 0);
|
2384 |
+
var mandantId = jQuery('.b2s-network-details-mandant-select').val();
|
2385 |
+
jQuery('.b2s-network-list').each(function () {
|
2386 |
+
var jsonMandantIds = jQuery(this).parents('.b2s-sidbar-wrapper-nav-li').attr('data-mandant-id');
|
2387 |
+
if (jsonMandantIds !== undefined) {
|
2388 |
+
var jsonMandantIds = jQuery.parseJSON(jsonMandantIds);
|
2389 |
+
if (jsonMandantIds.indexOf(mandantId) !== -1 && !jQuery(this).hasClass('active')) {
|
2390 |
+
//remove
|
2391 |
+
var newMandant = new Array();
|
2392 |
+
jQuery(jsonMandantIds).each(function (index, item) {
|
2393 |
+
if (item !== mandantId) {
|
2394 |
+
newMandant.push(item);
|
2395 |
+
}
|
2396 |
+
});
|
2397 |
+
jQuery(this).parents('.b2s-sidbar-wrapper-nav-li').attr('data-mandant-id', JSON.stringify(newMandant));
|
2398 |
+
} else if (jsonMandantIds.indexOf(mandantId) == -1 && jQuery(this).hasClass('active')) {
|
2399 |
+
//add
|
2400 |
+
jsonMandantIds.push(mandantId);
|
2401 |
+
jQuery(this).parents('.b2s-sidbar-wrapper-nav-li').attr('data-mandant-id', JSON.stringify(jsonMandantIds));
|
2402 |
+
}
|
2403 |
+
}
|
2404 |
+
});
|
2405 |
+
}
|
2406 |
+
}
|
2407 |
+
});
|
2408 |
+
});
|
2409 |
+
window.addEventListener('message', function (e) {
|
2410 |
+
if (e.origin == jQuery('#b2sServerUrl').val()) {
|
2411 |
+
var data = JSON.parse(e.data);
|
2412 |
+
if (typeof data.action !== typeof undefined && data.action == 'approve') {
|
2413 |
+
jQuery('.b2s-post-item-details-message-result[data-network-auth-id="' + data.networkAuthId + '"]').html("<br><span class=\"text-success\"><i class=\"glyphicon glyphicon-ok-circle\"></i> " + jQuery("#b2sJsTextPublish").val() + " </span>");
|
2414 |
+
jQuery.ajax({
|
2415 |
+
url: ajaxurl,
|
2416 |
+
type: "POST",
|
2417 |
+
cache: false,
|
2418 |
+
async: false,
|
2419 |
+
data: {
|
2420 |
+
'action': 'b2s_update_approve_post',
|
2421 |
+
'post_id': data.post_id,
|
2422 |
+
'publish_link': data.publish_link,
|
2423 |
+
'publish_error_code': data.publish_error_code,
|
2424 |
+
},
|
2425 |
+
success: function (data) {
|
2426 |
+
}
|
2427 |
+
});
|
2428 |
+
} else {
|
2429 |
+
loginSuccess(data.networkId, data.networkType, data.displayName, data.networkAuthId, data.mandandId);
|
2430 |
+
}
|
2431 |
+
}
|
2432 |
+
});
|
2433 |
+
|
2434 |
+
jQuery(document).on('click', '.b2s-approve-publish-confirm-btn', function () {
|
2435 |
+
var postId = jQuery('#b2s-approve-post-id').val();
|
2436 |
+
var networkAuthId = jQuery('#b2s-approve-network-auth-id').val();
|
2437 |
+
if (postId > 0) {
|
2438 |
+
jQuery('.b2s-post-item-details-message-result[data-network-auth-id="' + networkAuthId + '"]').html("<br><span class=\"text-success\"><i class=\"glyphicon glyphicon-ok-circle\"></i> " + jQuery("#b2sJsTextPublish").val() + " </span>");
|
2439 |
+
jQuery('.b2s-publish-approve-modal').modal('hide');
|
2440 |
+
jQuery.ajax({
|
2441 |
+
url: ajaxurl,
|
2442 |
+
type: "POST",
|
2443 |
+
cache: false,
|
2444 |
+
async: false,
|
2445 |
+
data: {
|
2446 |
+
'action': 'b2s_update_approve_post',
|
2447 |
+
'post_id': postId,
|
2448 |
+
'publish_link': "",
|
2449 |
+
'publish_error_code': "",
|
2450 |
+
},
|
2451 |
+
success: function (data) {
|
2452 |
+
}
|
2453 |
+
});
|
2454 |
+
}
|
2455 |
+
});
|
2456 |
+
|
2457 |
+
|
2458 |
+
|
2459 |
+
jQuery.xhrPool.abortAll = function () { // our abort function
|
2460 |
+
jQuery(this).each(function (idx, jqXHR) {
|
2461 |
+
jqXHR.abort();
|
2462 |
+
});
|
2463 |
+
jQuery.xhrPool.length = 0
|
2464 |
+
};
|
2465 |
+
function loadingDummyShow(networkAuthId, networkId) {
|
2466 |
+
jQuery('.b2s-post-item-connection-fail-dummy[data-network-auth-id="' + networkAuthId + '"]').remove();
|
2467 |
+
var html = '<div class="b2s-post-item b2s-post-item-loading-dummy" data-network-auth-id="' + networkAuthId + '">'
|
2468 |
+
+ '<div class="panel panel-group">'
|
2469 |
+
+ '<div class="panel-body">'
|
2470 |
+
+ '<div class="b2s-post-item-area">'
|
2471 |
+
+ '<div class="b2s-post-item-details">'
|
2472 |
+
+ '<div class="b2s-loader-impulse b2s-loader-impulse-md b2s-post-item-loading-impulse-area">'
|
2473 |
+
+ '<img class="img-responsive" src="' + jQuery('#b2sPortalImagePath').val() + networkId + '_flat.png" alt="">'
|
2474 |
+
+ '</div>'
|
2475 |
+
+ '<div class="clearfix"></div>'
|
2476 |
+
+ '<div class="text-center"><small>'
|
2477 |
+
+ jQuery('#b2sJsTextLoading').val()
|
2478 |
+
+ '</small></div>'
|
2479 |
+
+ '</div>'
|
2480 |
+
+ '</div>'
|
2481 |
+
+ '</div>'
|
2482 |
+
+ '</div>';
|
2483 |
+
var order = jQuery.parseJSON(jQuery('.b2s-network-navbar-order').val());
|
2484 |
+
var pos = order.indexOf(networkAuthId.toString());
|
2485 |
+
var add = false;
|
2486 |
+
for (var i = pos; i >= 0; i--) {
|
2487 |
+
if (jQuery('.b2s-post-item[data-network-auth-id="' + order[i] + '"]').length > 0) {
|
2488 |
+
jQuery('.b2s-post-item[data-network-auth-id="' + order[i] + '"]').after(html);
|
2489 |
+
i = -1;
|
2490 |
+
add = true;
|
2491 |
+
}
|
2492 |
+
}
|
2493 |
+
if (add == false) {
|
2494 |
+
jQuery('.b2s-post-list').prepend(html);
|
2495 |
+
}
|
2496 |
+
}
|
2497 |
+
|
2498 |
+
function loadingDummyConnectionFail(networkAuthId, networkId) {
|
2499 |
+
var html = '<div class="b2s-post-item b2s-post-item-connection-fail-dummy" data-network-auth-id="' + networkAuthId + '">'
|
2500 |
+
+ '<div class="panel panel-group">'
|
2501 |
+
+ '<div class="panel-body">'
|
2502 |
+
+ '<div class="b2s-post-item-area">'
|
2503 |
+
+ '<div class="b2s-post-item-details">'
|
2504 |
+
+ '<div class="b2s-post-item-details-portal-img-area">'
|
2505 |
+
+ '<img class="img-responsive" src="' + jQuery('#b2sPortalImagePath').val() + networkId + '_flat.png" alt="">'
|
2506 |
+
+ '</div>'
|
2507 |
+
+ '<div class="clearfix"></div>'
|
2508 |
+
+ '<div class="text-center"><small>'
|
2509 |
+
+ jQuery('#b2sJsTextConnectionFail').val()
|
2510 |
+
+ '</small>'
|
2511 |
+
+ '<br/>'
|
2512 |
+
+ '<a class="btn btn-link btn-sm" target="_blank" href="' + jQuery('#b2sJsTextConnectionFailLink').val() + '">' + jQuery('#b2sJsTextConnectionFailLinkText').val() + '</a>'
|
2513 |
+
+ '</div>'
|
2514 |
+
+ '</div>'
|
2515 |
+
+ '</div>'
|
2516 |
+
+ '</div>'
|
2517 |
+
+ '</div>';
|
2518 |
+
jQuery('.b2s-post-item-loading-dummy[data-network-auth-id="' + networkAuthId + '"]').replaceWith(html);
|
2519 |
+
}
|
2520 |
+
|
2521 |
+
function init(firstrun) {
|
2522 |
+
var dateFormat = "yyyy-mm-dd";
|
2523 |
+
var language = "en";
|
2524 |
+
var showMeridian = true;
|
2525 |
+
if (jQuery('#b2sUserLang').val() == "de") {
|
2526 |
+
dateFormat = "dd.mm.yyyy";
|
2527 |
+
language = "de";
|
2528 |
+
showMeridian = false;
|
2529 |
+
}
|
2530 |
+
var today = new Date();
|
2531 |
+
if (jQuery('#b2sBlogPostSchedDate').length > 0) {
|
2532 |
+
today.setTime(jQuery('#b2sBlogPostSchedDate').val());
|
2533 |
+
}
|
2534 |
+
jQuery(".b2s-post-item-details-release-input-date").datepicker({
|
2535 |
+
format: dateFormat,
|
2536 |
+
language: language,
|
2537 |
+
maxViewMode: 2,
|
2538 |
+
todayHighlight: true,
|
2539 |
+
startDate: today,
|
2540 |
+
calendarWeeks: true,
|
2541 |
+
autoclose: true
|
2542 |
+
});
|
2543 |
+
jQuery('.b2s-post-item-details-release-input-time').timepicker({
|
2544 |
+
minuteStep: 15,
|
2545 |
+
appendWidgetTo: 'body',
|
2546 |
+
showSeconds: false,
|
2547 |
+
showMeridian: showMeridian,
|
2548 |
+
defaultTime: 'current',
|
2549 |
+
snapToStep: true
|
2550 |
+
});
|
2551 |
+
checkNetworkSelected();
|
2552 |
+
//imageCheck();
|
2553 |
+
if (firstrun == true) {
|
2554 |
+
jQuery(window).scroll(function () {
|
2555 |
+
submitArea();
|
2556 |
+
});
|
2557 |
+
jQuery('.b2s-post-item-details-release-input-date-select').each(function () {
|
2558 |
+
releaseChoose(jQuery(this).val(), jQuery(this).attr('data-network-auth-id'), 0);
|
2559 |
+
});
|
2560 |
+
|
2561 |
+
//V5.0.0 Content Curation set selected Profile
|
2562 |
+
if (jQuery(".b2s-network-details-mandant-select option[value='" + jQuery('#selProfile').val() + "']").length > 0) {
|
2563 |
+
jQuery('.b2s-network-details-mandant-select').val(jQuery('#selProfile').val());
|
2564 |
+
}
|
2565 |
+
hideDuplicateAuths();
|
2566 |
+
chooseMandant();
|
2567 |
+
}
|
2568 |
+
}
|
2569 |
+
|
2570 |
+
|
2571 |
+
|
2572 |
+
function initSceditor(networkAuthId) {
|
2573 |
+
var sceditor = jQuery('.b2s-post-item-details-item-message-input-allow-html[data-network-auth-id="' + networkAuthId + '"]').sceditor('instance');
|
2574 |
+
if (typeof sceditor !== 'undefined' && typeof sceditor.destroy == 'function') {
|
2575 |
+
sceditor.destroy();
|
2576 |
+
}
|
2577 |
+
|
2578 |
+
jQuery('.b2s-post-item-details-item-message-input-allow-html[data-network-auth-id="' + networkAuthId + '"]').sceditor({
|
2579 |
+
plugins: 'xhtml',
|
2580 |
+
toolbar: "h1,h2,bold,italic,link,unlink,custom-image|source",
|
2581 |
+
autoUpdate: true,
|
2582 |
+
emoticonsEnabled: false
|
2583 |
+
});
|
2584 |
+
var sceditor = jQuery('.b2s-post-item-details-item-message-input-allow-html[data-network-auth-id="' + networkAuthId + '"]').sceditor('instance');
|
2585 |
+
if (typeof sceditor !== 'undefined' && typeof sceditor.destroy == 'function') {
|
2586 |
+
sceditor.keyUp(function () {
|
2587 |
+
jQuery(this).parents('.b2s-post-item-details').find('.b2s-post-item-countChar').html(jQuery(this).prev('.b2s-post-item-details-item-message-input').sceditor('instance').getBody().text().length);
|
2588 |
+
});
|
2589 |
+
jQuery('.b2s-post-item-details-item-message-input-allow-html[data-network-auth-id="' + networkAuthId + '"]').next('.sceditor-container').find('textarea').on('keyup', function () {
|
2590 |
+
var tmp = document.createElement("DIV");
|
2591 |
+
tmp.innerHTML = jQuery(this).val();
|
2592 |
+
jQuery(this).parents('.b2s-post-item-details').find('.b2s-post-item-countChar').html(tmp.innerText.length);
|
2593 |
+
});
|
2594 |
+
}
|
2595 |
+
|
2596 |
+
|
2597 |
+
}
|
2598 |
+
|
2599 |
+
function submitArea() {
|
2600 |
+
if (jQuery('.b2s-publish-area').length > 0) {
|
2601 |
+
if (jQuery(window).scrollTop() + jQuery(window.top).height() >= jQuery('.b2s-publish-area').offset().top) {
|
2602 |
+
jQuery(".b2s-footer-menu").hide();
|
2603 |
+
} else {
|
2604 |
+
jQuery(".b2s-footer-menu").show();
|
2605 |
+
}
|
2606 |
+
}
|
2607 |
+
}
|
2608 |
+
|
2609 |
+
function imageSize() {
|
2610 |
+
jQuery('.networkImage').each(function () {
|
2611 |
+
var width = this.naturalWidth;
|
2612 |
+
var height = this.naturalHeight;
|
2613 |
+
jQuery(this).parents('.b2s-image-item').find('.b2s-image-item-caption-resolution').html(width + 'x' + height);
|
2614 |
+
if (width == 0)
|
2615 |
+
{
|
2616 |
+
setTimeout(function () {
|
2617 |
+
imageSize();
|
2618 |
+
}, 50);
|
2619 |
+
}
|
2620 |
+
});
|
2621 |
+
}
|
2622 |
+
|
2623 |
+
function navbarDeactivatePortal(reason) {
|
2624 |
+
if (reason == "image") {
|
2625 |
+
var portale = Array(6, 7, 12);
|
2626 |
+
for (var i = 0; i <= portale.length; i++) {
|
2627 |
+
jQuery('.b2s-network-select-btn[data-network-id="' + portale[i] + '"]').addClass('b2s-network-select-btn-deactivate');
|
2628 |
+
jQuery('.b2s-network-status-no-img[data-network-id="' + portale[i] + '"]').show();
|
2629 |
+
}
|
2630 |
+
}
|
2631 |
+
}
|
2632 |
+
|
2633 |
+
function navbarActivatePortal(reason) {
|
2634 |
+
if (reason == "image") {
|
2635 |
+
var portale = Array(6, 7, 12);
|
2636 |
+
for (var i = 0; i <= portale.length; i++) {
|
2637 |
+
jQuery('.b2s-network-select-btn[data-network-id="' + portale[i] + '"]').removeClass('b2s-network-select-btn-deactivate');
|
2638 |
+
jQuery('.b2s-network-status-no-img[data-network-id="' + portale[i] + '"]').hide();
|
2639 |
+
}
|
2640 |
+
}
|
2641 |
+
}
|
2642 |
+
|
2643 |
+
function deactivatePortal(networkAuthId) {
|
2644 |
+
var selector = '.b2s-post-item[data-network-auth-id="' + networkAuthId + '"]';
|
2645 |
+
jQuery(selector).hide();
|
2646 |
+
jQuery(selector).find('.form-control').each(function () {
|
2647 |
+
jQuery(this).attr("disabled", "disabled");
|
2648 |
+
});
|
2649 |
+
jQuery('.b2s-network-select-btn[data-network-auth-id="' + networkAuthId + '"]').children().removeClass('active').find('.b2s-network-status-img').addClass('b2s-network-hide');
|
2650 |
+
checkNetworkSelected();
|
2651 |
+
submitArea();
|
2652 |
+
return true;
|
2653 |
+
}
|
2654 |
+
|
2655 |
+
function activatePortal(networkAuthId, check) {
|
2656 |
+
var selector = '.b2s-post-item[data-network-auth-id="' + networkAuthId + '"]';
|
2657 |
+
jQuery(selector).show();
|
2658 |
+
jQuery(selector).find('.form-control').each(function () {
|
2659 |
+
|
2660 |
+
if (!jQuery(this).hasClass('b2s-post-item-details-item-message-input')) {
|
2661 |
+
jQuery(this).removeAttr("disabled", "disabled");
|
2662 |
+
}
|
2663 |
+
|
2664 |
+
if ((jQuery(this).hasClass('b2s-post-item-details-release-input-weeks')) ||
|
2665 |
+
(jQuery(this).hasClass('b2s-post-item-details-release-input-date')) ||
|
2666 |
+
(jQuery(this).hasClass('b2s-post-item-details-release-input-time')) ||
|
2667 |
+
(jQuery(this).hasClass('b2s-post-item-details-release-input-days')) ||
|
2668 |
+
(jQuery(this).hasClass('b2s-post-item-details-relay-input-delay')) ||
|
2669 |
+
(jQuery(this).hasClass('b2s-post-item-details-relay-input-account'))) {
|
2670 |
+
if (!jQuery(this).is(':visible')) {
|
2671 |
+
jQuery(this).prop('disabled', true);
|
2672 |
+
}
|
2673 |
+
}
|
2674 |
+
});
|
2675 |
+
//Customize Content
|
2676 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + networkAuthId + '"]').val() == 1) {
|
2677 |
+
jQuery('.b2s-image-remove-btn[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').hide();
|
2678 |
+
jQuery(selector).find('.b2s-post-item-details-item-message-input').each(function () {
|
2679 |
+
if (jQuery(this).is(':visible')) {
|
2680 |
+
jQuery(this).removeAttr("disabled", "disabled");
|
2681 |
+
}
|
2682 |
+
});
|
2683 |
+
} else {
|
2684 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-auth-id="' + networkAuthId + '"][data-network-count="-1"]').removeAttr("disabled", "disabled");
|
2685 |
+
}
|
2686 |
+
jQuery('.b2s-network-select-btn[data-network-auth-id="' + networkAuthId + '"]').children().addClass('active').find('.b2s-network-hide').removeClass('b2s-network-hide');
|
2687 |
+
checkNetworkSelected();
|
2688 |
+
submitArea();
|
2689 |
+
}
|
2690 |
+
|
2691 |
+
function checkNetworkSelected() {
|
2692 |
+
//überprüfen ob mindestens ein PostItem vorhanden und sichtbar ist
|
2693 |
+
var visible = false;
|
2694 |
+
jQuery('.b2s-post-list').find('.b2s-post-item').each(function () {
|
2695 |
+
if (jQuery(this).is(":visible")) {
|
2696 |
+
visible = true;
|
2697 |
+
}
|
2698 |
+
});
|
2699 |
+
if (jQuery('.b2s-post-list').text().trim() == "" || visible == false) {
|
2700 |
+
jQuery('.b2s-publish-area').hide();
|
2701 |
+
jQuery('.b2s-footer-menu').hide();
|
2702 |
+
jQuery('.b2s-empty-area').show();
|
2703 |
+
return false;
|
2704 |
+
} else {
|
2705 |
+
jQuery('.b2s-publish-area').show();
|
2706 |
+
if (jQuery('.b2s-publish-area').length > 0) {
|
2707 |
+
if (jQuery(window).scrollTop() + jQuery(window.top).height() < jQuery('.b2s-publish-area').offset().top) {
|
2708 |
+
jQuery('.b2s-footer-menu').show();
|
2709 |
+
}
|
2710 |
+
}
|
2711 |
+
jQuery('.b2s-empty-area').hide();
|
2712 |
+
return true;
|
2713 |
+
}
|
2714 |
+
}
|
2715 |
+
|
2716 |
+
function checkPostSchedOnBlog() {
|
2717 |
+
if (jQuery('#b2sBlogPostSchedDate').length > 0 && jQuery('#b2sPostType').val() == "") {
|
2718 |
+
if (jQuery('#b2sSchedPostInfoIgnore').val() == "0") {
|
2719 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select option[value="0"]:selected').length > 0) {
|
2720 |
+
jQuery('#b2s-network-sched-post-info').modal("show");
|
2721 |
+
return false;
|
2722 |
+
}
|
2723 |
+
}
|
2724 |
+
}
|
2725 |
+
return true;
|
2726 |
+
}
|
2727 |
+
|
2728 |
+
function checkImageByImageNetworks() {
|
2729 |
+
var result = true;
|
2730 |
+
jQuery('.b2sOnlyWithImage').each(function () {
|
2731 |
+
if (jQuery(this).is(":visible")) {
|
2732 |
+
if (jQuery('.b2s-image-url-hidden-field[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').val() == "") {
|
2733 |
+
if (!jQuery('#b2s-network-select-image').hasClass('in')) {
|
2734 |
+
jQuery('.b2s-post-item-details-url-image[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"]').addClass('b2s-img-required');
|
2735 |
+
jQuery('.b2s-image-change-this-network').attr('data-network-auth-id', jQuery(this).attr('data-network-auth-id'));
|
2736 |
+
jQuery('.b2s-upload-image').attr('data-network-auth-id', jQuery(this).attr('data-network-auth-id'));
|
2737 |
+
jQuery('#b2s-network-select-image').modal('show');
|
2738 |
+
imageSize();
|
2739 |
+
window.scrollTo(0, (jQuery(this).offset().top - 45));
|
2740 |
+
}
|
2741 |
+
result = false;
|
2742 |
+
}
|
2743 |
+
}
|
2744 |
+
});
|
2745 |
+
return result;
|
2746 |
+
}
|
2747 |
+
|
2748 |
+
|
2749 |
+
function releaseChoose(choose, dataNetworkAuthId, dataNetworkCount) {
|
2750 |
+
var selectorInput = '[data-network-auth-id="' + dataNetworkAuthId + '"]';
|
2751 |
+
jQuery('.b2s-post-item-details-release-area-details-row' + selectorInput).hide();
|
2752 |
+
if (choose == 0) {
|
2753 |
+
|
2754 |
+
//since 4.8.0 customize content
|
2755 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select' + selectorInput).attr('data-network-customize-content') == "1") {
|
2756 |
+
jQuery('.b2s-post-item-details-item-message-input' + selectorInput + '[data-network-count="-1"]').removeAttr('disabled');
|
2757 |
+
|
2758 |
+
//Facebook TOS
|
2759 |
+
if (jQuery('.b2s-post-item-details-item-message-input' + selectorInput + '[data-network-count="-1"]').attr('readonly')) {
|
2760 |
+
jQuery('.b2s-post-item-details-item-message-input' + selectorInput + '[data-network-count="-1"]').hide();
|
2761 |
+
} else {
|
2762 |
+
jQuery('.b2s-post-item-details-item-message-input' + selectorInput + '[data-network-count="-1"]').show();
|
2763 |
+
}
|
2764 |
+
|
2765 |
+
jQuery('.b2s-post-item-details-url-image' + selectorInput + '[data-network-count="-1"]').show();
|
2766 |
+
jQuery('.b2s-select-image-modal-open' + selectorInput + '[data-network-count="-1"]').show();
|
2767 |
+
jQuery('.b2s-image-remove-btn' + selectorInput + '[data-network-count="-1"]').show();
|
2768 |
+
jQuery('.b2s-post-original-area' + selectorInput).addClass('col-sm-7').addClass('col-lg-9');
|
2769 |
+
jQuery('.b2s-post-tool-area' + selectorInput).show();
|
2770 |
+
}
|
2771 |
+
|
2772 |
+
jQuery('.b2s-post-item-details-release-input-date' + selectorInput).prop('disabled', true);
|
2773 |
+
jQuery('.b2s-post-item-details-release-customize-sched-area-details-row' + selectorInput).hide();
|
2774 |
+
jQuery('.b2s-post-item-sched-customize-text' + selectorInput).prop('disabled', true);
|
2775 |
+
jQuery('.b2s-post-item-details-release-input-date' + selectorInput).hide();
|
2776 |
+
jQuery('.b2s-post-item-details-release-input-time' + selectorInput).hide();
|
2777 |
+
jQuery('.b2s-post-item-details-release-input-time' + selectorInput).prop('disabled', true);
|
2778 |
+
jQuery('.b2s-post-item-details-release-input-weeks' + selectorInput).hide();
|
2779 |
+
jQuery('.b2s-post-item-details-release-input-weeks' + selectorInput).prop('disabled', true);
|
2780 |
+
jQuery('.b2s-post-item-details-release-input-interval-select' + selectorInput).hide();
|
2781 |
+
jQuery('.b2s-post-item-details-release-input-interval-select' + selectorInput).prop('disabled', true);
|
2782 |
+
jQuery('.b2s-post-item-details-release-input-interval-select' + selectorInput).val("0");
|
2783 |
+
//monthly- duration month
|
2784 |
+
jQuery('.b2s-post-item-details-release-area-div-duration-month' + selectorInput).hide();
|
2785 |
+
jQuery('.b2s-post-item-details-release-area-label-duration-month' + selectorInput).hide();
|
2786 |
+
jQuery('.b2s-post-item-details-release-input-months' + selectorInput).hide();
|
2787 |
+
jQuery('.b2s-post-item-details-release-input-months' + selectorInput).prop('disabled');
|
2788 |
+
//monthly- publish day (select-day)
|
2789 |
+
jQuery('.b2s-post-item-details-release-area-label-select-day' + selectorInput).hide();
|
2790 |
+
jQuery('.b2s-post-item-details-release-input-select-day' + selectorInput).prop('disabled');
|
2791 |
+
jQuery('.b2s-post-item-details-release-input-select-day' + selectorInput).hide();
|
2792 |
+
//own period- duration times
|
2793 |
+
jQuery('.b2s-post-item-details-release-area-div-duration-time' + selectorInput).hide();
|
2794 |
+
jQuery('.b2s-post-item-details-release-area-label-duration-time' + selectorInput).hide();
|
2795 |
+
jQuery('.b2s-post-item-details-release-input-times' + selectorInput).hide();
|
2796 |
+
jQuery('.b2s-post-item-details-release-input-times' + selectorInput).prop('disabled');
|
2797 |
+
//own period- timespan
|
2798 |
+
jQuery('.b2s-post-item-details-release-area-label-select-timespan' + selectorInput).hide();
|
2799 |
+
jQuery('.b2s-post-item-details-release-input-select-timespan' + selectorInput).hide();
|
2800 |
+
jQuery('.b2s-post-item-details-release-input-select-timespan' + selectorInput).prop('disabled');
|
2801 |
+
jQuery('.b2s-post-item-details-release-input-days' + selectorInput).prop('disabled');
|
2802 |
+
jQuery('.b2s-post-item-details-release-input-daySelect' + selectorInput).hide();
|
2803 |
+
jQuery('.b2s-post-item-details-release-input-add' + selectorInput).hide();
|
2804 |
+
jQuery('.2s-post-item-details-release-area-details-ul' + selectorInput).hide();
|
2805 |
+
jQuery('.b2s-post-item-details-release-save-settings' + selectorInput).prop('disabled', true);
|
2806 |
+
jQuery('.b2s-post-item-details-release-area-details-ul' + selectorInput).hide();
|
2807 |
+
jQuery('.b2s-post-item-details-release-save-settings-label' + selectorInput).hide();
|
2808 |
+
jQuery('.b2s-post-item-details-release-area-label-duration' + selectorInput).hide();
|
2809 |
+
jQuery('.b2s-post-item-details-release-area-label-interval' + selectorInput).hide();
|
2810 |
+
jQuery('.b2s-post-item-details-release-area-label-date' + selectorInput).hide();
|
2811 |
+
jQuery('.b2s-post-item-details-release-area-label-time' + selectorInput).hide();
|
2812 |
+
jQuery('.b2s-post-item-details-release-area-label-day' + selectorInput).hide();
|
2813 |
+
jQuery('.b2s-post-item-details-release-area-div-duration' + selectorInput).hide();
|
2814 |
+
jQuery('.b2s-post-item-details-release-area-div-interval' + selectorInput).hide();
|
2815 |
+
jQuery('.b2s-post-item-details-release-area-div-date' + selectorInput).hide();
|
2816 |
+
jQuery('.b2s-post-item-details-release-area-div-time' + selectorInput).hide();
|
2817 |
+
jQuery('.b2s-post-item-details-release-area-div-day' + selectorInput).hide();
|
2818 |
+
} else if (choose == 1) {
|
2819 |
+
|
2820 |
+
//since 4.8.0 customize content
|
2821 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select' + selectorInput).attr('data-network-customize-content') == "1") {
|
2822 |
+
jQuery('.b2s-post-item-details-item-message-input' + selectorInput + '[data-network-count="-1"]').prop('disabled', true);
|
2823 |
+
jQuery('.b2s-post-item-details-item-message-input' + selectorInput + '[data-network-count="-1"]').hide();
|
2824 |
+
jQuery('.b2s-post-item-details-url-image' + selectorInput + '[data-network-count="-1"]').hide();
|
2825 |
+
jQuery('.b2s-select-image-modal-open' + selectorInput + '[data-network-count="-1"]').hide();
|
2826 |
+
jQuery('.b2s-image-remove-btn' + selectorInput + '[data-network-count="-1"]').hide();
|
2827 |
+
jQuery('.b2s-post-original-area' + selectorInput).removeClass('col-sm-7').removeClass('col-lg-9');
|
2828 |
+
jQuery('.b2s-post-tool-area' + selectorInput).hide();
|
2829 |
+
//TOS Network Twitter
|
2830 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select' + selectorInput).attr('data-network-id') == "2") {
|
2831 |
+
jQuery('.b2s-post-ship-item-copy-original-text' + selectorInput + '[data-network-count="0"]').trigger('click');
|
2832 |
+
}
|
2833 |
+
}
|
2834 |
+
|
2835 |
+
jQuery('.b2s-post-item-details-release-area-details-row' + selectorInput).hide();
|
2836 |
+
jQuery('.b2s-post-item-details-release-input-date' + selectorInput).hide();
|
2837 |
+
jQuery('.b2s-post-item-details-release-input-date' + selectorInput).prop('disabled', true);
|
2838 |
+
jQuery('.b2s-post-item-details-release-input-time' + selectorInput).hide();
|
2839 |
+
jQuery('.b2s-post-item-details-release-input-time' + selectorInput).prop('disabled', true);
|
2840 |
+
for (var i = 0; i <= dataNetworkCount; i++) {
|
2841 |
+
jQuery('.b2s-post-item-details-release-area-details-row[data-network-count="' + i + '"]' + selectorInput).show();
|
2842 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-count="' + i + '"]' + selectorInput).show();
|
2843 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-count="' + i + '"]' + selectorInput).removeAttr('disabled');
|
2844 |
+
jQuery('.b2s-post-item-details-release-input-time[data-network-count="' + i + '"]' + selectorInput).show();
|
2845 |
+
jQuery('.b2s-post-item-details-release-input-time[data-network-count="' + i + '"]' + selectorInput).removeAttr('disabled');
|
2846 |
+
//since 4.8.0 customize content
|
2847 |
+
jQuery('.b2s-post-item-details-release-customize-sched-area-details-row[data-network-count="' + i + '"]' + selectorInput).show();
|
2848 |
+
jQuery('.b2s-post-item-details-item-message-input[data-network-count="' + i + '"]' + selectorInput).removeAttr('disabled');
|
2849 |
+
}
|
2850 |
+
jQuery('.b2s-post-item-details-release-input-weeks' + selectorInput).hide();
|
2851 |
+
jQuery('.b2s-post-item-details-release-input-weeks' + selectorInput).prop('disabled');
|
2852 |
+
//monthly- duration month
|
2853 |
+
jQuery('.b2s-post-item-details-release-area-div-duration-month' + selectorInput).hide();
|
2854 |
+
jQuery('.b2s-post-item-details-release-area-label-duration-month' + selectorInput).hide();
|
2855 |
+
jQuery('.b2s-post-item-details-release-input-months' + selectorInput).hide();
|
2856 |
+
jQuery('.b2s-post-item-details-release-input-months' + selectorInput).prop('disabled');
|
2857 |
+
//monthly- publish day (select-day)
|
2858 |
+
jQuery('.b2s-post-item-details-release-area-label-select-day' + selectorInput).hide();
|
2859 |
+
jQuery('.b2s-post-item-details-release-input-select-day' + selectorInput).prop('disabled');
|
2860 |
+
jQuery('.b2s-post-item-details-release-input-select-day' + selectorInput).hide();
|
2861 |
+
//own period- duration times
|
2862 |
+
jQuery('.b2s-post-item-details-release-area-div-duration-time' + selectorInput).hide();
|
2863 |
+
jQuery('.b2s-post-item-details-release-area-label-duration-time' + selectorInput).hide();
|
2864 |
+
jQuery('.b2s-post-item-details-release-input-times' + selectorInput).hide();
|
2865 |
+
jQuery('.b2s-post-item-details-release-input-times' + selectorInput).prop('disabled');
|
2866 |
+
//own period- timespan
|
2867 |
+
jQuery('.b2s-post-item-details-release-area-label-select-timespan' + selectorInput).hide();
|
2868 |
+
jQuery('.b2s-post-item-details-release-input-select-timespan' + selectorInput).hide();
|
2869 |
+
jQuery('.b2s-post-item-details-release-input-select-timespan' + selectorInput).prop('disabled');
|
2870 |
+
//new since v.4.5.0
|
2871 |
+
jQuery('.b2s-post-item-details-release-area-label-duration' + selectorInput).hide();
|
2872 |
+
jQuery('.b2s-post-item-details-release-input-interval-select' + selectorInput).hide();
|
2873 |
+
jQuery('.b2s-post-item-details-release-input-interval-select' + selectorInput).prop('disabled', true);
|
2874 |
+
jQuery('.b2s-post-item-details-release-input-interval-select' + selectorInput).val("0");
|
2875 |
+
jQuery('.b2s-post-item-details-release-input-daySelect' + selectorInput).hide();
|
2876 |
+
jQuery('.b2s-post-item-details-release-input-days' + selectorInput).prop('disabled', true);
|
2877 |
+
jQuery('.b2s-post-item-details-release-input-add' + selectorInput).show();
|
2878 |
+
jQuery('.b2s-post-item-details-release-area-details-ul' + selectorInput).show();
|
2879 |
+
jQuery('.b2s-post-item-details-release-save-settings' + selectorInput).prop('disabled', false);
|
2880 |
+
jQuery('.b2s-post-item-details-release-save-settings-label' + selectorInput).show();
|
2881 |
+
jQuery('.b2s-post-item-details-release-area-label-interval' + selectorInput).hide();
|
2882 |
+
jQuery('.b2s-post-item-details-release-area-label-date' + selectorInput).show();
|
2883 |
+
jQuery('.b2s-post-item-details-release-area-label-time' + selectorInput).show();
|
2884 |
+
jQuery('.b2s-post-item-details-release-area-label-day' + selectorInput).hide();
|
2885 |
+
jQuery('.b2s-post-item-details-release-area-div-duration' + selectorInput).hide();
|
2886 |
+
jQuery('.b2s-post-item-details-release-area-div-interval' + selectorInput).hide();
|
2887 |
+
jQuery('.b2s-post-item-details-release-area-div-date' + selectorInput).show();
|
2888 |
+
jQuery('.b2s-post-item-details-release-area-div-time' + selectorInput).show();
|
2889 |
+
jQuery('.b2s-post-item-details-release-area-div-day' + selectorInput).hide();
|
2890 |
+
} else if (choose == 2) {
|
2891 |
+
|
2892 |
+
//since 4.8.0 customize content
|
2893 |
+
if (jQuery('.b2s-post-item-details-release-input-date-select' + selectorInput).attr('data-network-customize-content') == "1") {
|
2894 |
+
jQuery('.b2s-post-item-details-item-message-input' + selectorInput + '[data-network-count="-1"]').removeAttr('disabled');
|
2895 |
+
|
2896 |
+
//Facebook TOS
|
2897 |
+
if (jQuery('.b2s-post-item-details-item-message-input' + selectorInput + '[data-network-count="-1"]').attr('readonly')) {
|
2898 |
+
jQuery('.b2s-post-item-details-item-message-input' + selectorInput + '[data-network-count="-1"]').hide();
|
2899 |
+
} else {
|
2900 |
+
jQuery('.b2s-post-item-details-item-message-input' + selectorInput + '[data-network-count="-1"]').show();
|
2901 |
+
}
|
2902 |
+
|
2903 |
+
jQuery('.b2s-post-item-details-url-image' + selectorInput + '[data-network-count="-1"]').show();
|
2904 |
+
jQuery('.b2s-select-image-modal-open' + selectorInput + '[data-network-count="-1"]').show();
|
2905 |
+
jQuery('.b2s-image-remove-btn' + selectorInput + '[data-network-count="-1"]').show();
|
2906 |
+
jQuery('.b2s-post-original-area' + selectorInput).addClass('col-sm-7').addClass('col-lg-9');
|
2907 |
+
jQuery('.b2s-post-tool-area' + selectorInput).show();
|
2908 |
+
}
|
2909 |
+
|
2910 |
+
jQuery('.b2s-post-item-details-release-area-details-row' + selectorInput).hide();
|
2911 |
+
jQuery('.b2s-post-item-details-release-customize-sched-area-details-row' + selectorInput).hide();
|
2912 |
+
jQuery('.b2s-post-item-sched-customize-text' + selectorInput).prop('disabled', true);
|
2913 |
+
jQuery('.b2s-post-item-details-release-input-date' + selectorInput).hide();
|
2914 |
+
jQuery('.b2s-post-item-details-release-input-date' + selectorInput).prop('disabled', true);
|
2915 |
+
jQuery('.b2s-post-item-details-release-input-time' + selectorInput).hide();
|
2916 |
+
jQuery('.b2s-post-item-details-release-input-time' + selectorInput).prop('disabled', true);
|
2917 |
+
jQuery('.b2s-post-item-details-release-input-add' + selectorInput).show();
|
2918 |
+
jQuery('.b2s-post-item-details-release-input-daySelect' + selectorInput).show();
|
2919 |
+
jQuery('.b2s-post-item-details-release-area-details-ul' + selectorInput).show();
|
2920 |
+
jQuery('.b2s-post-item-details-release-save-settings' + selectorInput).prop('disabled', false);
|
2921 |
+
jQuery('.b2s-post-item-details-release-save-settings-label' + selectorInput).hide();
|
2922 |
+
for (var i = 0; i <= dataNetworkCount; i++) {
|
2923 |
+
jQuery('.b2s-post-item-details-release-area-details-row[data-network-count="' + i + '"]' + selectorInput).show();
|
2924 |
+
//new since v4.5.0
|
2925 |
+
jQuery('.b2s-post-item-details-release-input-interval-select[data-network-count="' + i + '"]' + selectorInput).show();
|
2926 |
+
jQuery('.b2s-post-item-details-release-input-interval-select[data-network-count="' + i + '"]' + selectorInput).removeAttr('disabled');
|
2927 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-count="' + i + '"]' + selectorInput).show();
|
2928 |
+
jQuery('.b2s-post-item-details-release-input-date[data-network-count="' + i + '"]' + selectorInput).removeAttr('disabled');
|
2929 |
+
jQuery('.b2s-post-item-details-release-input-daySelect[data-network-count="' + i + '"]' + selectorInput).show();
|
2930 |
+
jQuery('.b2s-post-item-details-release-input-time[data-network-count="' + i + '"]' + selectorInput).show();
|
2931 |
+
jQuery('.b2s-post-item-details-release-input-time[data-network-count="' + i + '"]' + selectorInput).removeAttr('disabled');
|
2932 |
+
jQuery('.b2s-post-item-details-release-input-weeks[data-network-count="' + i + '"]' + selectorInput).show();
|
2933 |
+
jQuery('.b2s-post-item-details-release-input-weeks[data-network-count="' + i + '"]' + selectorInput).removeAttr('disabled');
|
2934 |
+
jQuery('.b2s-post-item-details-release-input-days[data-network-count="' + i + '"]' + selectorInput).removeAttr('disabled');
|
2935 |
+
}
|
2936 |
+
jQuery('.b2s-post-item-details-release-area-label-duration' + selectorInput).show();
|
2937 |
+
jQuery('.b2s-post-item-details-release-area-label-interval' + selectorInput).show();
|
2938 |
+
jQuery('.b2s-post-item-details-release-area-label-date' + selectorInput).show();
|
2939 |
+
jQuery('.b2s-post-item-details-release-area-label-time' + selectorInput).show();
|
2940 |
+
jQuery('.b2s-post-item-details-release-area-label-day' + selectorInput).show();
|
2941 |
+
jQuery('.b2s-post-item-details-release-area-div-duration' + selectorInput).show();
|
2942 |
+
jQuery('.b2s-post-item-details-release-area-div-interval' + selectorInput).show();
|
2943 |
+
jQuery('.b2s-post-item-details-release-area-div-date' + selectorInput).hide();
|
2944 |
+
jQuery('.b2s-post-item-details-release-area-div-time' + selectorInput).show();
|
2945 |
+
jQuery('.b2s-post-item-details-release-area-div-day' + selectorInput).show();
|
2946 |
+
}
|
2947 |
+
|
2948 |
+
var showMeridian = true;
|
2949 |
+
if (jQuery('#b2sUserLang').val() == 'de') {
|
2950 |
+
showMeridian = false;
|
2951 |
+
}
|
2952 |
+
|
2953 |
+
jQuery('.b2s-post-item-details-release-input-time').timepicker({
|
2954 |
+
minuteStep: 15,
|
2955 |
+
appendWidgetTo: 'body',
|
2956 |
+
showSeconds: false,
|
2957 |
+
showMeridian: showMeridian,
|
2958 |
+
defaultTime: 'current',
|
2959 |
+
snapToStep: true
|
2960 |
+
});
|
2961 |
+
}
|
2962 |
+
|
2963 |
+
|
2964 |
+
function releaseChooseInterval(interval, selectorInput, dataCount) {
|
2965 |
+
//change view
|
2966 |
+
if (interval == 0) { //weekly,default
|
2967 |
+
// show
|
2968 |
+
//select days
|
2969 |
+
jQuery('.b2s-post-item-details-release-input-days[data-network-count="' + dataCount + '"]' + selectorInput).removeAttr('disabled');
|
2970 |
+
jQuery('.b2s-post-item-details-release-area-label-day[data-network-count="' + dataCount + '"]' + selectorInput).show();
|
2971 |
+
//duration weeks
|
2972 |
+
jQuery('.b2s-post-item-details-release-area-div-duration[data-network-count="' + dataCount + '"]' + selectorInput).show();
|
2973 |
+
jQuery('.b2s-post-item-details-release-area-label-duration[data-network-count="' + dataCount + '"]' + selectorInput).show();
|
2974 |
+
jQuery('.b2s-post-item-details-release-input-weeks[data-network-count="' + dataCount + '"]' + selectorInput).show();
|
2975 |
+
jQuery('.b2s-post-item-details-release-input-weeks[data-network-count="' + dataCount + '"]' + selectorInput).removeAttr('disabled');
|
2976 |
+
//hide
|
2977 |
+
//monthly- duration month
|
2978 |
+
jQuery('.b2s-post-item-details-release-area-div-duration-month[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
2979 |
+
jQuery('.b2s-post-item-details-release-area-label-duration-month[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
2980 |
+
jQuery('.b2s-post-item-details-release-input-months[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
2981 |
+
jQuery('.b2s-post-item-details-release-input-months[data-network-count="' + dataCount + '"]' + selectorInput).prop('disabled');
|
2982 |
+
//monthly- publish day (select-day)
|
2983 |
+
jQuery('.b2s-post-item-details-release-area-label-select-day[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
2984 |
+
jQuery('.b2s-post-item-details-release-input-select-day[data-network-count="' + dataCount + '"]' + selectorInput).prop('disabled');
|
2985 |
+
jQuery('.b2s-post-item-details-release-input-select-day[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
2986 |
+
//own period- duration times
|
2987 |
+
jQuery('.b2s-post-item-details-release-area-div-duration-time[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
2988 |
+
jQuery('.b2s-post-item-details-release-area-label-duration-time[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
2989 |
+
jQuery('.b2s-post-item-details-release-input-times[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
2990 |
+
jQuery('.b2s-post-item-details-release-input-times[data-network-count="' + dataCount + '"]' + selectorInput).prop('disabled');
|
2991 |
+
//own period- timespan
|
2992 |
+
jQuery('.b2s-post-item-details-release-area-label-select-timespan[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
2993 |
+
jQuery('.b2s-post-item-details-release-input-select-timespan[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
2994 |
+
jQuery('.b2s-post-item-details-release-input-select-timespan[data-network-count="' + dataCount + '"]' + selectorInput).prop('disabled');
|
2995 |
+
}
|
2996 |
+
|
2997 |
+
if (interval == 1) { //monthly
|
2998 |
+
// show
|
2999 |
+
//duration month
|
3000 |
+
jQuery('.b2s-post-item-details-release-area-div-duration-month[data-network-count="' + dataCount + '"]' + selectorInput).show();
|
3001 |
+
jQuery('.b2s-post-item-details-release-area-label-duration-month[data-network-count="' + dataCount + '"]' + selectorInput).show();
|
3002 |
+
jQuery('.b2s-post-item-details-release-input-months[data-network-count="' + dataCount + '"]' + selectorInput).show();
|
3003 |
+
jQuery('.b2s-post-item-details-release-input-months[data-network-count="' + dataCount + '"]' + selectorInput).removeAttr('disabled');
|
3004 |
+
//publish day (select-day)
|
3005 |
+
jQuery('.b2s-post-item-details-release-area-label-select-day[data-network-count="' + dataCount + '"]' + selectorInput).show();
|
3006 |
+
jQuery('.b2s-post-item-details-release-input-select-day[data-network-count="' + dataCount + '"]' + selectorInput).removeAttr('disabled');
|
3007 |
+
jQuery('.b2s-post-item-details-release-input-select-day[data-network-count="' + dataCount + '"]' + selectorInput).show();
|
3008 |
+
//hide
|
3009 |
+
//weekly - select days
|
3010 |
+
jQuery('.b2s-post-item-details-release-input-days[data-network-count="' + dataCount + '"]' + selectorInput).prop('disabled', true);
|
3011 |
+
jQuery('.b2s-post-item-details-release-area-label-day[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
3012 |
+
//weekly- duration weeks
|
3013 |
+
jQuery('.b2s-post-item-details-release-area-div-duration[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
3014 |
+
jQuery('.b2s-post-item-details-release-area-label-duration[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
3015 |
+
jQuery('.b2s-post-item-details-release-input-weeks[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
3016 |
+
jQuery('.b2s-post-item-details-release-input-weeks[data-network-count="' + dataCount + '"]' + selectorInput).prop('disabled');
|
3017 |
+
//own period- duration times
|
3018 |
+
jQuery('.b2s-post-item-details-release-area-div-duration-time[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
3019 |
+
jQuery('.b2s-post-item-details-release-area-label-duration-time[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
3020 |
+
jQuery('.b2s-post-item-details-release-input-times[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
3021 |
+
jQuery('.b2s-post-item-details-release-input-times[data-network-count="' + dataCount + '"]' + selectorInput).prop('disabled');
|
3022 |
+
//own period- timespan
|
3023 |
+
jQuery('.b2s-post-item-details-release-area-label-select-timespan[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
3024 |
+
jQuery('.b2s-post-item-details-release-input-select-timespan[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
3025 |
+
jQuery('.b2s-post-item-details-release-input-select-timespan[data-network-count="' + dataCount + '"]' + selectorInput).prop('disabled');
|
3026 |
+
}
|
3027 |
+
|
3028 |
+
if (interval == 2) { //own period
|
3029 |
+
// show
|
3030 |
+
//duration times
|
3031 |
+
jQuery('.b2s-post-item-details-release-area-div-duration-time[data-network-count="' + dataCount + '"]' + selectorInput).show();
|
3032 |
+
jQuery('.b2s-post-item-details-release-area-label-duration-time[data-network-count="' + dataCount + '"]' + selectorInput).show();
|
3033 |
+
jQuery('.b2s-post-item-details-release-input-times[data-network-count="' + dataCount + '"]' + selectorInput).show(); //select
|
3034 |
+
jQuery('.b2s-post-item-details-release-input-times[data-network-count="' + dataCount + '"]' + selectorInput).removeAttr('disabled'); //select
|
3035 |
+
//timespan
|
3036 |
+
jQuery('.b2s-post-item-details-release-area-label-select-timespan[data-network-count="' + dataCount + '"]' + selectorInput).show();
|
3037 |
+
jQuery('.b2s-post-item-details-release-input-select-timespan[data-network-count="' + dataCount + '"]' + selectorInput).show();
|
3038 |
+
jQuery('.b2s-post-item-details-release-input-select-timespan[data-network-count="' + dataCount + '"]' + selectorInput).removeAttr('disabled');
|
3039 |
+
//hide
|
3040 |
+
//weekly - select days
|
3041 |
+
jQuery('.b2s-post-item-details-release-input-days[data-network-count="' + dataCount + '"]' + selectorInput).prop('disabled', true);
|
3042 |
+
jQuery('.b2s-post-item-details-release-area-label-day[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
3043 |
+
//weekly- duration weeks
|
3044 |
+
jQuery('.b2s-post-item-details-release-area-div-duration[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
3045 |
+
jQuery('.b2s-post-item-details-release-area-label-duration[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
3046 |
+
jQuery('.b2s-post-item-details-release-input-weeks[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
3047 |
+
jQuery('.b2s-post-item-details-release-input-weeks[data-network-count="' + dataCount + '"]' + selectorInput).prop('disabled');
|
3048 |
+
//monthly- duration month
|
3049 |
+
jQuery('.b2s-post-item-details-release-area-div-duration-month[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
3050 |
+
jQuery('.b2s-post-item-details-release-area-label-duration-month[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
3051 |
+
jQuery('.b2s-post-item-details-release-input-months[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
3052 |
+
jQuery('.b2s-post-item-details-release-input-months[data-network-count="' + dataCount + '"]' + selectorInput).prop('disabled');
|
3053 |
+
//monthly- publish day (select-day)
|
3054 |
+
jQuery('.b2s-post-item-details-release-area-label-select-day[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
3055 |
+
jQuery('.b2s-post-item-details-release-input-select-day[data-network-count="' + dataCount + '"]' + selectorInput).prop('disabled');
|
3056 |
+
jQuery('.b2s-post-item-details-release-input-select-day[data-network-count="' + dataCount + '"]' + selectorInput).hide();
|
3057 |
+
}
|
3058 |
+
}
|
3059 |
+
|
3060 |
+
|
3061 |
+
|
3062 |
+
function addTag(networkAuthId) {
|
3063 |
+
var selector = ".b2s-post-item-details-tag-input-elem[data-network-auth-id='" + networkAuthId + "']";
|
3064 |
+
jQuery(selector).last().after('<input class="form-control b2s-post-item-details-tag-input-elem" data-network-auth-id="' + networkAuthId + '" value="" name="b2s[' + networkAuthId + '][tags][]">');
|
3065 |
+
jQuery(".remove-tag-btn[data-network-auth-id='" + networkAuthId + "'").show();
|
3066 |
+
}
|
3067 |
+
|
3068 |
+
function removeTag(networkAuthId) {
|
3069 |
+
var selector = ".b2s-post-item-details-tag-input-elem[data-network-auth-id='" + networkAuthId + "']";
|
3070 |
+
jQuery(selector).last().remove();
|
3071 |
+
if (jQuery(selector).length === 1)
|
3072 |
+
jQuery(".remove-tag-btn[data-network-auth-id='" + networkAuthId + "'").hide();
|
3073 |
+
}
|
3074 |
+
|
3075 |
+
function networkLimitAll(networkAuthId, networkId, limit) {
|
3076 |
+
|
3077 |
+
var networkCountId = -1; //default;
|
3078 |
+
if (jQuery(':focus').length > 0) {
|
3079 |
+
var attr = jQuery(':focus').attr('data-network-count');
|
3080 |
+
if (typeof attr !== typeof undefined && attr !== false) {
|
3081 |
+
networkCountId = attr;
|
3082 |
+
}
|
3083 |
+
}
|
3084 |
+
|
3085 |
+
var regX = /(<([^>]+)>)/ig;
|
3086 |
+
var url = jQuery(".b2s-post-item-details-item-url-input[data-network-auth-id='" + networkAuthId + "']").val();
|
3087 |
+
var text = jQuery(".b2s-post-item-details-item-message-input[data-network-count='" + networkCountId + "'][data-network-auth-id='" + networkAuthId + "']").val();
|
3088 |
+
jQuery(".b2s-post-item-details-item-url-input[data-network-auth-id='" + networkAuthId + "']").removeClass("error");
|
3089 |
+
if (url.length != "0") {
|
3090 |
+
if (url.indexOf("http://") == -1 && url.indexOf("https://") == -1) {
|
3091 |
+
url = "http://" + url;
|
3092 |
+
jQuery(".b2s-post-item-details-item-url-input[data-network-auth-id='" + networkAuthId + "']").val(url);
|
3093 |
+
}
|
3094 |
+
} else if (jQuery(".b2s-post-item-details-item-url-input[data-network-auth-id='" + networkAuthId + "']").hasClass("required_network_url")) {
|
3095 |
+
if (!(jQuery(".b2s-post-item-details-item-url-input[data-network-auth-id='" + networkAuthId + "']").attr('data-network-id') == 1 && jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').val() == 1)) { //Facebook Imagepost don't require Link
|
3096 |
+
url = jQuery("#b2sDefault_url").val();
|
3097 |
+
jQuery(".b2s-post-item-details-item-url-input[data-network-auth-id='" + networkAuthId + "']").val(url);
|
3098 |
+
}
|
3099 |
+
}
|
3100 |
+
|
3101 |
+
var textLength = text.length;
|
3102 |
+
var newText = text;
|
3103 |
+
if (networkId == "2") { //twitter
|
3104 |
+
if (url.length != "0") {
|
3105 |
+
limit = limit - 24;
|
3106 |
+
}
|
3107 |
+
}
|
3108 |
+
if (networkId == "3") { //linkedin
|
3109 |
+
if (url.length != "0") {
|
3110 |
+
limit = limit - url.length;
|
3111 |
+
}
|
3112 |
+
}
|
3113 |
+
if (networkId == "19" && jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + networkAuthId + '"]').attr('data-network-type') == 0 && jQuery('.b2s-post-item-details-post-format[data-network-auth-id="' + networkAuthId + '"]').val() == 1) { //xing
|
3114 |
+
if (url.length != "0") {
|
3115 |
+
limit = limit - url.length;
|
3116 |
+
}
|
3117 |
+
}
|
3118 |
+
|
3119 |
+
if (textLength >= limit) {
|
3120 |
+
newText = text.substring(0, limit);
|
3121 |
+
var pos = getCaretPos(this);
|
3122 |
+
jQuery(".b2s-post-item-details-item-message-input[data-network-count='" + networkCountId + "'][data-network-auth-id='" + networkAuthId + "']").val(newText.replace(regX, ""));
|
3123 |
+
setCaretPos(this, pos);
|
3124 |
+
var text = jQuery(".b2s-post-item-details-item-message-input[data-network-count='" + networkCountId + "'][data-network-auth-id='" + networkAuthId + "']").val();
|
3125 |
+
var textLength = text.length;
|
3126 |
+
}
|
3127 |
+
var newLen = limit - textLength;
|
3128 |
+
jQuery(".b2s-post-item-countChar[data-network-count='" + networkCountId + "'][data-network-auth-id='" + networkAuthId + "']").html(newLen);
|
3129 |
+
}
|
3130 |
+
|
3131 |
+
function networkCount(networkAuthId) {
|
3132 |
+
|
3133 |
+
var networkCountId = -1; //default;
|
3134 |
+
if (jQuery(':focus').length > 0) {
|
3135 |
+
var attr = jQuery(':focus').attr('data-network-count');
|
3136 |
+
if (typeof attr !== typeof undefined && attr !== false) {
|
3137 |
+
networkCountId = attr;
|
3138 |
+
}
|
3139 |
+
}
|
3140 |
+
var url = jQuery(".b2s-post-item-details-item-url-input[data-network-auth-id='" + networkAuthId + "']").val();
|
3141 |
+
var text = jQuery(".b2s-post-item-details-item-message-input[data-network-count='" + networkCountId + "'][data-network-auth-id='" + networkAuthId + "']").val();
|
3142 |
+
jQuery(".b2s-post-item-details-item-url-input[data-network-auth-id='" + networkAuthId + "']").removeClass("error");
|
3143 |
+
if (url.length != "0") {
|
3144 |
+
if (url.indexOf("http://") == -1 && url.indexOf("https://") == -1) {
|
3145 |
+
url = "http://" + url;
|
3146 |
+
jQuery(".b2s-post-item-details-item-url-input[data-network-auth-id='" + networkAuthId + "']").val(url);
|
3147 |
+
}
|
3148 |
+
} else if (jQuery(".b2s-post-item-details-item-url-input[data-network-auth-id='" + networkAuthId + "']").hasClass("required_network_url")) {
|
3149 |
+
if (!(jQuery(".b2s-post-item-details-item-url-input[data-network-auth-id='" + networkAuthId + "']").attr('data-network-id') == 1 && jQuery('.b2s-post-item-details-post-format[data-network-auth-id=' + networkAuthId + ']').val() == 1)) { //Facebook Imagepost don't require Link
|
3150 |
+
url = jQuery("#b2sDefault_url").val();
|
3151 |
+
jQuery(".b2s-post-item-details-item-url-input[data-network-auth-id='" + networkAuthId + "']").val(url);
|
3152 |
+
}
|
3153 |
+
}
|
3154 |
+
var textLength = text.length;
|
3155 |
+
jQuery(".b2s-post-item-countChar[data-network-count='" + networkCountId + "'][data-network-auth-id='" + networkAuthId + "']").html(textLength);
|
3156 |
+
}
|
3157 |
+
|
3158 |
+
|
3159 |
+
function getCaretPos(domElem) {
|
3160 |
+
var pos;
|
3161 |
+
if (document.selection) {
|
3162 |
+
domElem.focus();
|
3163 |
+
var sel = document.selection.createRange();
|
3164 |
+
sel.moveStart("character", -domElem.value.length);
|
3165 |
+
pos = sel.text.length;
|
3166 |
+
} else if (domElem.selectionStart || domElem.selectionStart == "0")
|
3167 |
+
pos = domElem.selectionStart;
|
3168 |
+
return pos;
|
3169 |
+
}
|
3170 |
+
|
3171 |
+
function setCaretPos(domElem, pos) {
|
3172 |
+
if (domElem.setSelectionRange) {
|
3173 |
+
domElem.focus();
|
3174 |
+
domElem.setSelectionRange(pos, pos);
|
3175 |
+
} else if (domElem.createTextRange) {
|
3176 |
+
var range = domElem.createTextRange();
|
3177 |
+
range.collapse(true);
|
3178 |
+
range.moveEnd("character", pos);
|
3179 |
+
range.moveStart("character", pos);
|
3180 |
+
range.select();
|
3181 |
+
}
|
3182 |
+
}
|
3183 |
+
|
3184 |
+
function ucfirst(str) {
|
3185 |
+
str += '';
|
3186 |
+
return str.charAt(0).toUpperCase() + str.substr(1);
|
3187 |
+
}
|
3188 |
+
|
3189 |
+
|
3190 |
+
function hideDuplicateAuths() {
|
3191 |
+
jQuery(".b2s-sidbar-wrapper-nav-li").each(function () {
|
3192 |
+
jQuery(this).show();
|
3193 |
+
});
|
3194 |
+
var mandantId = jQuery('.b2s-network-details-mandant-select').val();
|
3195 |
+
jQuery(".b2s-sidbar-wrapper-nav-li").each(function () {
|
3196 |
+
if (jQuery(this).is(":visible")) {
|
3197 |
+
var dataNetworkDisplayName = jQuery(this).children('.b2s-network-select-btn').attr('data-network-display-name');
|
3198 |
+
var dataNetworkId = jQuery(this).children('.b2s-network-select-btn').attr('data-network-id');
|
3199 |
+
var dataNetworkType = jQuery(this).children('.b2s-network-select-btn').attr('data-network-type');
|
3200 |
+
var dataNetworkAuthId = jQuery(this).children('.b2s-network-select-btn').attr('data-network-auth-id');
|
3201 |
+
jQuery('.b2s-network-select-btn[data-network-display-name="' + dataNetworkDisplayName + '"][data-network-id="' + dataNetworkId + '"][data-network-type="' + dataNetworkType + '"][data-network-auth-id!="' + dataNetworkAuthId + '"]').each(function () {
|
3202 |
+
var selectedDataMandantId = jQuery.parseJSON(jQuery(this).parents('.b2s-sidbar-wrapper-nav-li').attr('data-mandant-id'));
|
3203 |
+
if (jQuery(this).parents('.b2s-sidbar-wrapper-nav-li').attr('data-mandant-default-id') != mandantId && selectedDataMandantId.indexOf(mandantId) == -1) {
|
3204 |
+
jQuery(this).parents('.b2s-sidbar-wrapper-nav-li').hide();
|
3205 |
+
}
|
3206 |
+
});
|
3207 |
+
}
|
3208 |
+
});
|
3209 |
+
}
|
3210 |
+
|
3211 |
+
function chooseMandant() {
|
3212 |
+
//Laden abbrechen und anzeige zurück setzten
|
3213 |
+
jQuery.xhrPool.abortAll();
|
3214 |
+
jQuery('.b2s-post-item-loading-dummy').remove();
|
3215 |
+
jQuery('.b2s-network-status-img-loading').hide();
|
3216 |
+
jQuery('.b2s-network-select-btn-deactivate').removeClass('b2s-network-select-btn-deactivate');
|
3217 |
+
//imageCheck();
|
3218 |
+
//TOS XING Groups
|
3219 |
+
b2sTosXingGroupCount = 0;
|
3220 |
+
//expiredDate wieder setzten
|
3221 |
+
jQuery('.b2s-network-status-expiredDate').each(function () {
|
3222 |
+
if (jQuery(this).is(':visible')) {
|
3223 |
+
jQuery('.b2s-network-select-btn[data-network-auth-id="' + jQuery(this).attr('data-network-auth-id') + '"').addClass('b2s-network-select-btn-deactivate');
|
3224 |
+
}
|
3225 |
+
});
|
3226 |
+
jQuery('.b2s-network-select-btn-deactivate')
|
3227 |
+
var mandantId = jQuery('.b2s-network-details-mandant-select').val();
|
3228 |
+
jQuery('.b2s-post-item').hide();
|
3229 |
+
jQuery('.b2s-post-item').find('.form-control').each(function () {
|
3230 |
+
jQuery(this).attr("disabled", "disabled");
|
3231 |
+
jQuery(this).removeClass('error');
|
3232 |
+
});
|
3233 |
+
jQuery('.b2s-network-select-btn').children().removeClass('active').find('.b2s-network-status-img').addClass('b2s-network-hide');
|
3234 |
+
//Check IS RE-PUBLISH
|
3235 |
+
if (jQuery('#b2sSelectedNetworkAuthId').val() > 0 && jQuery(".b2s-network-select-btn[data-network-auth-id='" + jQuery('#b2sSelectedNetworkAuthId').val() + "']").length > 0) { //exisits?
|
3236 |
+
jQuery(".b2s-network-select-btn[data-network-auth-id='" + jQuery('#b2sSelectedNetworkAuthId').val() + "']").trigger('click');
|
3237 |
+
var mandantId = jQuery(".b2s-network-select-btn[data-network-auth-id='" + jQuery('#b2sSelectedNetworkAuthId').val() + "']").parent('.b2s-sidbar-wrapper-nav-li').attr('data-mandant-id');
|
3238 |
+
jQuery('.b2s-network-details-mandant-select').val(mandantId);
|
3239 |
+
jQuery('#b2sSelectedNetworkAuthId').val("0");
|
3240 |
+
} else {
|
3241 |
+
jQuery(".b2s-sidbar-wrapper-nav-li").each(function () {
|
3242 |
+
var mandantIds = jQuery.parseJSON(jQuery(this).attr('data-mandant-id'));
|
3243 |
+
if (mandantIds.indexOf(mandantId) != -1 && !jQuery(this).children('.b2s-network-select-btn').hasClass('b2s-network-select-btn-deactivate')) {
|
3244 |
+
jQuery(this).children('.b2s-network-select-btn').trigger('click');
|
3245 |
+
}
|
3246 |
+
});
|
3247 |
+
}
|
3248 |
+
|
3249 |
+
checkNetworkSelected();
|
3250 |
+
}
|
3251 |
+
|
3252 |
+
function padDate(n) {
|
3253 |
+
return ("0" + n).slice(-2);
|
3254 |
+
}
|
3255 |
+
|
3256 |
+
function wop(url, name) {
|
3257 |
+
jQuery('.b2s-network-auth-success').hide();
|
3258 |
+
var location = window.location.protocol + '//' + window.location.hostname;
|
3259 |
+
url = encodeURI(url + '&mandant_id=' + jQuery('.b2s-network-details-mandant-select').val() + '&location=' + location);
|
3260 |
+
window.open(url, name, "width=650,height=900,scrollbars=yes,toolbar=no,status=no,resizable=no,menubar=no,location=no,directories=no,top=20,left=20");
|
3261 |
+
}
|
3262 |
+
|
3263 |
+
|
3264 |
+
function wopApprove(networkAuthId, postId, url, name) {
|
3265 |
+
var location = encodeURI(window.location.protocol + '//' + window.location.hostname);
|
3266 |
+
var win = window.open(url + '&location=' + location, name, "width=650,height=900,scrollbars=yes,toolbar=no,status=no,resizable=no,menubar=no,location=no,directories=no,top=20,left=20");
|
3267 |
+
if (postId > 0) {
|
3268 |
+
function checkIfWinClosed(intervalID) {
|
3269 |
+
if (win.closed) {
|
3270 |
+
clearInterval(intervalID);
|
3271 |
+
//Show Modal
|
3272 |
+
jQuery('.b2s-publish-approve-modal').modal('show');
|
3273 |
+
jQuery('#b2s-approve-post-id').val(postId);
|
3274 |
+
jQuery('#b2s-approve-network-auth-id').val(networkAuthId);
|
3275 |
+
}
|
3276 |
+
}
|
3277 |
+
var interval = setInterval(function () {
|
3278 |
+
checkIfWinClosed(interval);
|
3279 |
+
}, 500);
|
3280 |
+
}
|
3281 |
+
}
|
3282 |
+
|
3283 |
+
|
3284 |
+
function loginSuccess(networkId, networkType, displayName, networkAuthId, mandandId) {
|
3285 |
+
jQuery('.b2s-network-auth-success').show();
|
3286 |
+
jQuery('#b2s-network-list-modal').modal('hide');
|
3287 |
+
jQuery('#b2s-network-list-modal').hide();
|
3288 |
+
jQuery('body').removeClass('modal-open');
|
3289 |
+
jQuery('body').removeAttr('style');
|
3290 |
+
if (jQuery('.b2s-network-select-btn[data-network-auth-id="' + networkAuthId + '"]').length == 0) {
|
3291 |
+
jQuery('.b2s-server-connection-fail').hide();
|
3292 |
+
jQuery.ajax({
|
3293 |
+
url: ajaxurl,
|
3294 |
+
type: "POST",
|
3295 |
+
dataType: "json",
|
3296 |
+
cache: false,
|
3297 |
+
data: {
|
3298 |
+
'action': 'b2s_ship_navbar_item',
|
3299 |
+
'networkId': networkId,
|
3300 |
+
'networkType': networkType,
|
3301 |
+
'displayName': displayName,
|
3302 |
+
'networkAuthId': networkAuthId,
|
3303 |
+
'mandandId': mandandId
|
3304 |
+
},
|
3305 |
+
error: function () {
|
3306 |
+
jQuery('.b2s-server-connection-fail').show();
|
3307 |
+
return false;
|
3308 |
+
},
|
3309 |
+
success: function (data) {
|
3310 |
+
if (data.result == true) {
|
3311 |
+
jQuery(data.content).insertAfter('.b2s-sidbar-network-auth-btn');
|
3312 |
+
jQuery('.b2s-network-select-btn[data-network-auth-id="' + data.networkAuthId + '"]').trigger('click');
|
3313 |
+
}
|
3314 |
+
}
|
3315 |
+
});
|
3316 |
+
} else {
|
3317 |
+
jQuery('.b2s-network-status-expiredDate[data-network-auth-id="' + networkAuthId + '"]').remove();
|
3318 |
+
jQuery('.b2s-network-select-btn[data-network-auth-id="' + networkAuthId + '"]').removeClass('b2s-network-select-btn-deactivate');
|
3319 |
+
jQuery('.b2s-network-select-btn[data-network-auth-id="' + networkAuthId + '"]').removeAttr('onclick');
|
3320 |
+
jQuery('.b2s-network-select-btn[data-network-auth-id="' + networkAuthId + '"]').attr('data-network-display-name', displayName);
|
3321 |
+
jQuery('.b2s-network-select-btn[data-network-auth-id="' + networkAuthId + '"] > .b2s-network-list > .b2s-network-details > h4').text(displayName);
|
3322 |
+
jQuery('.b2s-network-select-btn[data-network-auth-id="' + networkAuthId + '"]').trigger('click');
|
3323 |
+
}
|
3324 |
+
}
|
3325 |
+
|
3326 |
+
//jQuery(this).attr('data-network-auth-id')
|
3327 |
+
function checkSchedDateTime(dataNetworkAuthId) {
|
3328 |
+
var dateElement = '.b2s-post-item-details-release-input-date[data-network-auth-id="' + dataNetworkAuthId + '"]';
|
3329 |
+
var timeElement = '.b2s-post-item-details-release-input-time[data-network-auth-id="' + dataNetworkAuthId + '"]';
|
3330 |
+
var dateStr = jQuery(dateElement).val();
|
3331 |
+
var minStr = jQuery(timeElement).val();
|
3332 |
+
var timeZone = parseInt(jQuery('#user_timezone').val()) * (-1);
|
3333 |
+
if (jQuery('#b2sUserLang').val() == 'de') {
|
3334 |
+
dateStr = dateStr.substring(6, 10) + '-' + dateStr.substring(3, 5) + '-' + dateStr.substring(0, 2);
|
3335 |
+
} else {
|
3336 |
+
var minParts = minStr.split(' ');
|
3337 |
+
var minParts2 = minParts[0].split(':');
|
3338 |
+
if (minParts[1] == 'PM') {
|
3339 |
+
minParts2[0] = parseInt(minParts2[0]) + 12;
|
3340 |
+
}
|
3341 |
+
minStr = minParts2[0] + ':' + minParts2[1];
|
3342 |
+
}
|
3343 |
+
|
3344 |
+
var minParts3 = minStr.split(':');
|
3345 |
+
if (minParts3[0] < 10) {
|
3346 |
+
minParts3[0] = '0' + minParts3[0];
|
3347 |
+
}
|
3348 |
+
var dateParts = dateStr.split('-');
|
3349 |
+
//utc current time
|
3350 |
+
var now = new Date();
|
3351 |
+
//offset between utc und user
|
3352 |
+
var offset = (parseInt(now.getTimezoneOffset()) / 60) * (-1);
|
3353 |
+
//enter hour to user time
|
3354 |
+
var hour = parseInt(minParts3[0]) + timeZone + offset;
|
3355 |
+
//calculate datetime in utc
|
3356 |
+
var enter = new Date(dateParts[0], dateParts[1] - 1, dateParts[2], hour, minParts3[1]);
|
3357 |
+
//compare enter date time with allowed user time
|
3358 |
+
if (enter.getTime() < now.getTime()) {
|
3359 |
+
//enter set on next 15 minutes and calculate on user timezone
|
3360 |
+
enter.setTime(now.getTime() + (900000 - (now.getTime() % 900000)) - (3600000 * (timeZone + offset)));
|
3361 |
+
jQuery(dateElement).datepicker('update', enter);
|
3362 |
+
jQuery(timeElement).timepicker('setTime', enter);
|
3363 |
+
}
|
3364 |
+
|
3365 |
+
//network deprecated
|
3366 |
+
if (jQuery(dateElement).attr('data-network-id') == '8') {
|
3367 |
+
var deprecatedDate = new Date('2019-03-30T23:59:59');
|
3368 |
+
var count = jQuery(dateElement).attr('data-network-count');
|
3369 |
+
if (enter.getTime() > deprecatedDate.getTime()) {
|
3370 |
+
jQuery('.network-tos-deprecated-warning[data-network-auth-id="' + dataNetworkAuthId + '"][data-network-count="' + count + '"]').show();
|
3371 |
+
jQuery(dateElement).datepicker('update', now);
|
3372 |
+
jQuery(timeElement).timepicker('setTime', now);
|
3373 |
+
}
|
3374 |
+
}
|
3375 |
+
|
3376 |
+
//network deprecated
|
3377 |
+
if (jQuery(dateElement).attr('data-network-id') == '10') {
|
3378 |
+
var deprecatedDate = new Date('2019-04-01T23:59:59');
|
3379 |
+
var count = jQuery(dateElement).attr('data-network-count');
|
3380 |
+
if (enter.getTime() > deprecatedDate.getTime()) {
|
3381 |
+
jQuery('.network-tos-deprecated-warning[data-network-auth-id="' + dataNetworkAuthId + '"][data-network-count="' + count + '"]').show();
|
3382 |
+
jQuery(dateElement).datepicker('update', now);
|
3383 |
+
jQuery(timeElement).timepicker('setTime', now);
|
3384 |
+
}
|
3385 |
+
}
|
3386 |
+
|
3387 |
+
}
|
3388 |
+
|
3389 |
+
jQuery(document).on("click", ".b2s-draft-btn", function (event) {
|
3390 |
+
event.preventDefault();
|
3391 |
+
jQuery('.b2s-loader-btn-ship').css('display', 'inline-block');
|
3392 |
+
jQuery('.b2s-submit-btn').prop('disabled', true);
|
3393 |
+
jQuery('.b2s-submit-btn-scroll').prop('disabled', true);
|
3394 |
+
jQuery('.b2s-post-draft-saved-success').hide();
|
3395 |
+
jQuery('.b2s-post-draft-saved-fail').hide();
|
3396 |
+
jQuery('.b2s-server-connection-fail').hide();
|
3397 |
+
|
3398 |
+
jQuery.ajax({
|
3399 |
+
url: ajaxurl,
|
3400 |
+
type: "GET",
|
3401 |
+
cache: false,
|
3402 |
+
data: {
|
3403 |
+
action: 'b2s_check_draft_exists',
|
3404 |
+
postId: jQuery('#post_id').val()
|
3405 |
+
},
|
3406 |
+
error: function () {
|
3407 |
+
saveDraft();
|
3408 |
+
return false;
|
3409 |
+
},
|
3410 |
+
success: function (data) {
|
3411 |
+
result = JSON.parse(data);
|
3412 |
+
if (result.result == true) {
|
3413 |
+
jQuery('#b2s-save-draft-modal').modal('show');
|
3414 |
+
return true;
|
3415 |
+
}
|
3416 |
+
saveDraft();
|
3417 |
+
return false;
|
3418 |
+
}
|
3419 |
+
});
|
3420 |
+
|
3421 |
+
});
|
3422 |
+
|
3423 |
+
jQuery(document).on('click', '.b2s-draft-btn-scroll', function () {
|
3424 |
+
jQuery('.b2s-draft-btn').trigger('click');
|
3425 |
+
});
|
3426 |
+
|
3427 |
+
function saveDraft() {
|
3428 |
+
jQuery('#action').val('b2s_save_draft_data');
|
3429 |
+
var data = jQuery('#b2sNetworkSent').serialize();
|
3430 |
+
jQuery('#action').val('b2s_save_ship_data');
|
3431 |
+
jQuery.ajax({
|
3432 |
+
url: ajaxurl,
|
3433 |
+
type: "POST",
|
3434 |
+
cache: false,
|
3435 |
+
data: data,
|
3436 |
+
error: function () {
|
3437 |
+
jQuery('.b2s-loader-btn-ship').css('display', 'none');
|
3438 |
+
jQuery('.b2s-submit-btn').removeAttr('disabled');
|
3439 |
+
jQuery('.b2s-submit-btn-scroll').removeAttr('disabled');
|
3440 |
+
jQuery('.b2s-server-connection-fail').show();
|
3441 |
+
window.scrollTo(0, 0);
|
3442 |
+
return false;
|
3443 |
+
},
|
3444 |
+
success: function (data) {
|
3445 |
+
jQuery('.b2s-loader-btn-ship').css('display', 'none');
|
3446 |
+
jQuery('.b2s-submit-btn').removeAttr('disabled');
|
3447 |
+
jQuery('.b2s-submit-btn-scroll').removeAttr('disabled');
|
3448 |
+
result = JSON.parse(data);
|
3449 |
+
if (result.result == true) {
|
3450 |
+
jQuery('.b2s-post-draft-saved-success').show();
|
3451 |
+
window.setTimeout(function () {
|
3452 |
+
jQuery('.b2s-post-draft-saved-success').fadeOut();
|
3453 |
+
}, 5000);
|
3454 |
+
} else {
|
3455 |
+
jQuery('.b2s-post-draft-saved-fail').show();
|
3456 |
+
window.setTimeout(function () {
|
3457 |
+
jQuery('.b2s-post-draft-saved-fail').fadeOut();
|
3458 |
+
}, 5000);
|
3459 |
+
}
|
3460 |
+
window.scrollTo(0, 0);
|
3461 |
+
return true;
|
3462 |
+
}
|
3463 |
+
});
|
3464 |
+
}
|
3465 |
+
|
3466 |
+
jQuery('#b2s-save-draft-modal').on('hidden.bs.modal', function () {
|
3467 |
+
jQuery('.b2s-loader-btn-ship').css('display', 'none');
|
3468 |
+
jQuery('.b2s-submit-btn').removeAttr('disabled');
|
3469 |
+
jQuery('.b2s-submit-btn-scroll').removeAttr('disabled');
|
3470 |
+
});
|
3471 |
+
|
3472 |
+
jQuery(document).on('click', '.b2s-save-draft-confirm-btn', function () {
|
3473 |
+
saveDraft();
|
3474 |
+
jQuery('#b2s-save-draft-modal').modal('hide');
|
3475 |
+
return true;
|
3476 |
+
});
|
blog2social.php
CHANGED
@@ -2,16 +2,16 @@
|
|
2 |
/*
|
3 |
* Plugin Name:Blog2Social: Social Media Auto Post & Scheduler
|
4 |
* Plugin URI: https://www.blog2social.com
|
5 |
-
* Description:Auto publish, schedule & share posts on social media: Facebook, Twitter,
|
6 |
* Author: Blog2Social, Adenion
|
7 |
* Text Domain: blog2social
|
8 |
* Domain Path: /languages
|
9 |
-
* Version: 5.
|
10 |
* Author URI: https://www.blog2social.com
|
11 |
* License: GPL2+
|
12 |
*/
|
13 |
|
14 |
-
define('B2S_PLUGIN_VERSION', '
|
15 |
define('B2S_PLUGIN_LANGUAGE', serialize(array('de_DE', 'en_US')));
|
16 |
define('B2S_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
17 |
define('B2S_PLUGIN_URL', plugin_dir_url(__FILE__));
|
2 |
/*
|
3 |
* Plugin Name:Blog2Social: Social Media Auto Post & Scheduler
|
4 |
* Plugin URI: https://www.blog2social.com
|
5 |
+
* Description:Auto publish, schedule & share posts on social media: Facebook, Twitter, XING, LinkedIn, Instagram, ... crosspost to pages & groups
|
6 |
* Author: Blog2Social, Adenion
|
7 |
* Text Domain: blog2social
|
8 |
* Domain Path: /languages
|
9 |
+
* Version: 5.7.0
|
10 |
* Author URI: https://www.blog2social.com
|
11 |
* License: GPL2+
|
12 |
*/
|
13 |
|
14 |
+
define('B2S_PLUGIN_VERSION', '570');
|
15 |
define('B2S_PLUGIN_LANGUAGE', serialize(array('de_DE', 'en_US')));
|
16 |
define('B2S_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
17 |
define('B2S_PLUGIN_URL', plugin_dir_url(__FILE__));
|
includes/Ajax/Get.php
CHANGED
@@ -1,543 +1,578 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Ajax_Get {
|
4 |
-
|
5 |
-
static private $instance = null;
|
6 |
-
|
7 |
-
static public function getInstance() {
|
8 |
-
if (null === self::$instance) {
|
9 |
-
self::$instance = new self;
|
10 |
-
}
|
11 |
-
return self::$instance;
|
12 |
-
}
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
add_action('wp_ajax_b2s_ship_item', array($this, 'getShipItem'));
|
16 |
-
add_action('wp_ajax_b2s_sort_data', array($this, 'getSortData'));
|
17 |
-
add_action('wp_ajax_b2s_get_sched_posts_by_user_auth', array($this, 'getSchedPostsByUserAuth'));
|
18 |
-
add_action('wp_ajax_b2s_get_network_board_and_group', array($this, 'getNetworkBoardAndGroup'));
|
19 |
-
add_action('wp_ajax_b2s_publish_post_data', array($this, 'getPublishPostData'));
|
20 |
-
add_action('wp_ajax_b2s_sched_post_data', array($this, 'getSchedPostData'));
|
21 |
-
add_action('wp_ajax_b2s_approve_post_data', array($this, 'getApprovePostData'));
|
22 |
-
add_action('wp_ajax_b2s_ship_navbar_item', array($this, 'getNavbarItem'));
|
23 |
-
add_action('wp_ajax_b2s_post_meta_box', array($this, 'getPostMetaBox'));
|
24 |
-
add_action('wp_ajax_b2s_scrape_url', array($this, 'scrapeUrl'));
|
25 |
-
add_action('wp_ajax_b2s_get_settings_sched_time_default', array($this, 'getSettingsSchedTimeDefault'));
|
26 |
-
add_action('wp_ajax_b2s_get_settings_sched_time_user', array($this, 'getUserTimeSettings'));
|
27 |
-
add_action('wp_ajax_b2s_ship_item_full_text', array($this, 'getShipItemFullText'));
|
28 |
-
add_action('wp_ajax_b2s_ship_item_reload_url', array($this, 'getShipItemReloadUrl'));
|
29 |
-
add_action('wp_ajax_b2s_get_faq_entries', array($this, 'getFaqEntries'));
|
30 |
-
add_action('wp_ajax_b2s_get_calendar_events', array($this, 'getCalendarEvents'));
|
31 |
-
add_action('wp_ajax_b2s_get_post_edit_modal', array($this, 'getPostEditModal'));
|
32 |
-
add_action('wp_ajax_b2s_get_calendar_filter_network_auth', array($this, 'getCalendarFilterNetworkAuth'));
|
33 |
-
add_action('wp_ajax_b2s_get_image_modal', array($this, 'getImageModal'));
|
34 |
-
add_action('wp_ajax_b2s_get_multi_widget_content', array($this, 'getMultiWidgetContent'));
|
35 |
-
add_action('wp_ajax_b2s_get_stats', array($this, 'getStats'));
|
36 |
-
add_action('wp_ajax_b2s_get_blog_post_status', array($this, 'getBlogPostStatus'));
|
37 |
-
add_action('wp_ajax_b2s_support_systemrequirements', array($this, 'b2sSupportSystemRequirements'));
|
38 |
-
add_action('wp_ajax_b2s_search_user', array($this, 'searchUser'));
|
39 |
-
add_action('wp_ajax_b2s_get_select_mandant_user', array($this, 'getSelectMandantUser'));
|
40 |
-
add_action('wp_ajax_b2s_get_edit_template', array($this, 'getEditTemplateForm'));
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
$
|
53 |
-
|
54 |
-
|
55 |
-
$
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
require_once (B2S_PLUGIN_DIR . 'includes/
|
78 |
-
|
79 |
-
|
80 |
-
$
|
81 |
-
$
|
82 |
-
$
|
83 |
-
$
|
84 |
-
$
|
85 |
-
$
|
86 |
-
$
|
87 |
-
$
|
88 |
-
$
|
89 |
-
$
|
90 |
-
$
|
91 |
-
$
|
92 |
-
$
|
93 |
-
$
|
94 |
-
$
|
95 |
-
$
|
96 |
-
$
|
97 |
-
|
98 |
-
|
99 |
-
$
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
$
|
153 |
-
|
154 |
-
|
155 |
-
$
|
156 |
-
$
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
$
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
'
|
182 |
-
'
|
183 |
-
'
|
184 |
-
'
|
185 |
-
'
|
186 |
-
|
187 |
-
$
|
188 |
-
$
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
wp_die();
|
211 |
-
}
|
212 |
-
|
213 |
-
public function
|
214 |
-
if ((int) $_POST['postId']) {
|
215 |
-
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Item.php');
|
216 |
-
require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
|
217 |
-
$postData = new B2S_Post_Item();
|
218 |
-
$showByDate = isset($_POST['showByDate']) ? trim($_POST['showByDate']) : '';
|
219 |
-
$
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
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 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
require_once (B2S_PLUGIN_DIR . '
|
286 |
-
|
287 |
-
$
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
$
|
292 |
-
'
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
$
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
require_once (B2S_PLUGIN_DIR . 'includes/
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
echo json_encode(array('result' =>
|
496 |
-
wp_die();
|
497 |
-
}
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
$
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ajax_Get {
|
4 |
+
|
5 |
+
static private $instance = null;
|
6 |
+
|
7 |
+
static public function getInstance() {
|
8 |
+
if (null === self::$instance) {
|
9 |
+
self::$instance = new self;
|
10 |
+
}
|
11 |
+
return self::$instance;
|
12 |
+
}
|
13 |
+
|
14 |
+
public function __construct() {
|
15 |
+
add_action('wp_ajax_b2s_ship_item', array($this, 'getShipItem'));
|
16 |
+
add_action('wp_ajax_b2s_sort_data', array($this, 'getSortData'));
|
17 |
+
add_action('wp_ajax_b2s_get_sched_posts_by_user_auth', array($this, 'getSchedPostsByUserAuth'));
|
18 |
+
add_action('wp_ajax_b2s_get_network_board_and_group', array($this, 'getNetworkBoardAndGroup'));
|
19 |
+
add_action('wp_ajax_b2s_publish_post_data', array($this, 'getPublishPostData'));
|
20 |
+
add_action('wp_ajax_b2s_sched_post_data', array($this, 'getSchedPostData'));
|
21 |
+
add_action('wp_ajax_b2s_approve_post_data', array($this, 'getApprovePostData'));
|
22 |
+
add_action('wp_ajax_b2s_ship_navbar_item', array($this, 'getNavbarItem'));
|
23 |
+
add_action('wp_ajax_b2s_post_meta_box', array($this, 'getPostMetaBox'));
|
24 |
+
add_action('wp_ajax_b2s_scrape_url', array($this, 'scrapeUrl'));
|
25 |
+
add_action('wp_ajax_b2s_get_settings_sched_time_default', array($this, 'getSettingsSchedTimeDefault'));
|
26 |
+
add_action('wp_ajax_b2s_get_settings_sched_time_user', array($this, 'getUserTimeSettings'));
|
27 |
+
add_action('wp_ajax_b2s_ship_item_full_text', array($this, 'getShipItemFullText'));
|
28 |
+
add_action('wp_ajax_b2s_ship_item_reload_url', array($this, 'getShipItemReloadUrl'));
|
29 |
+
add_action('wp_ajax_b2s_get_faq_entries', array($this, 'getFaqEntries'));
|
30 |
+
add_action('wp_ajax_b2s_get_calendar_events', array($this, 'getCalendarEvents'));
|
31 |
+
add_action('wp_ajax_b2s_get_post_edit_modal', array($this, 'getPostEditModal'));
|
32 |
+
add_action('wp_ajax_b2s_get_calendar_filter_network_auth', array($this, 'getCalendarFilterNetworkAuth'));
|
33 |
+
add_action('wp_ajax_b2s_get_image_modal', array($this, 'getImageModal'));
|
34 |
+
add_action('wp_ajax_b2s_get_multi_widget_content', array($this, 'getMultiWidgetContent'));
|
35 |
+
add_action('wp_ajax_b2s_get_stats', array($this, 'getStats'));
|
36 |
+
add_action('wp_ajax_b2s_get_blog_post_status', array($this, 'getBlogPostStatus'));
|
37 |
+
add_action('wp_ajax_b2s_support_systemrequirements', array($this, 'b2sSupportSystemRequirements'));
|
38 |
+
add_action('wp_ajax_b2s_search_user', array($this, 'searchUser'));
|
39 |
+
add_action('wp_ajax_b2s_get_select_mandant_user', array($this, 'getSelectMandantUser'));
|
40 |
+
add_action('wp_ajax_b2s_get_edit_template', array($this, 'getEditTemplateForm'));
|
41 |
+
add_action('wp_ajax_b2s_check_draft_exists', array($this, 'checkDraftExists'));
|
42 |
+
}
|
43 |
+
|
44 |
+
public function getBlogPostStatus() {
|
45 |
+
$status = ($_GET['post_id'] > 0) ? get_post_status($_GET['post_id']) : '';
|
46 |
+
echo json_encode($status);
|
47 |
+
wp_die();
|
48 |
+
}
|
49 |
+
|
50 |
+
public function scrapeUrl() {
|
51 |
+
if (isset($_POST['url']) && !empty($_POST['url'])) {
|
52 |
+
$data = B2S_Util::scrapeUrl($_POST['url']);
|
53 |
+
$scrapeError = ($data !== false) ? false : true;
|
54 |
+
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Curation/View.php');
|
55 |
+
$curation = new B2S_Curation_View();
|
56 |
+
$preview = $curation->getCurationPreviewHtml($_POST['url'], $data);
|
57 |
+
if (!empty($preview)) {
|
58 |
+
if (isset($_POST['loadSettings']) && filter_var($_POST['loadSettings'], FILTER_VALIDATE_BOOLEAN)) {
|
59 |
+
$result = json_decode(B2S_Api_Post::post(B2S_PLUGIN_API_ENDPOINT, array('action' => 'getProfileUserAuth', 'token' => B2S_PLUGIN_TOKEN)));
|
60 |
+
if (isset($result->result) && (int) $result->result == 1 && isset($result->data) && !empty($result->data) && isset($result->data->mandant) && isset($result->data->auth) && !empty($result->data->mandant) && !empty($result->data->auth)) {
|
61 |
+
echo json_encode(array('result' => true, 'preview' => $preview, 'scrapeError' => $scrapeError, 'settings' => $curation->getShippingDetails($result->data->mandant, $result->data->auth)));
|
62 |
+
wp_die();
|
63 |
+
}
|
64 |
+
echo json_encode(array('result' => false, 'preview' => $preview, 'scrapeError' => $scrapeError, 'error' => 'NO_AUTH'));
|
65 |
+
wp_die();
|
66 |
+
} else {
|
67 |
+
echo json_encode(array('result' => true, 'preview' => $preview, 'scrapeError' => $scrapeError));
|
68 |
+
wp_die();
|
69 |
+
}
|
70 |
+
}
|
71 |
+
}
|
72 |
+
echo json_encode(array('result' => false, 'preview' => '', 'scrapeError' => false, 'error' => 'NO_PREVIEW'));
|
73 |
+
wp_die();
|
74 |
+
}
|
75 |
+
|
76 |
+
public function getSortData() {
|
77 |
+
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Item.php');
|
78 |
+
require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
|
79 |
+
/* Sort */
|
80 |
+
$b2sType = isset($_POST['b2sType']) ? trim($_POST['b2sType']) : "";
|
81 |
+
$b2sPagination = (int) isset($_POST['b2sPagination']) ? $_POST['b2sPagination'] : 1;
|
82 |
+
$b2sShowPagination = !isset($_POST['b2sShowPagination']) || $_POST['b2sShowPagination'] == 1;
|
83 |
+
$b2sSortPostTitle = isset($_POST['b2sSortPostTitle']) ? trim(strip_tags($_POST['b2sSortPostTitle'])) : "";
|
84 |
+
$b2sSortPostAuthor = isset($_POST['b2sSortPostAuthor']) ? trim($_POST['b2sSortPostAuthor']) : "";
|
85 |
+
$b2sSortPostSchedDate = isset($_POST['b2sSortPostSchedDate']) ? (in_array(trim($_POST['b2sSortPostSchedDate']), array('desc', 'asc')) ? trim($_POST['b2sSortPostSchedDate']) : "") : "";
|
86 |
+
$b2sSortPostPublishDate = isset($_POST['b2sSortPostPublishDate']) ? (in_array(trim($_POST['b2sSortPostPublishDate']), array('desc', 'asc')) ? trim($_POST['b2sSortPostPublishDate']) : "") : "";
|
87 |
+
$b2sSortPostStatus = isset($_POST['b2sSortPostStatus']) ? trim($_POST['b2sSortPostStatus']) : "";
|
88 |
+
$b2sSortPostShareStatus = isset($_POST['b2sSortPostShareStatus']) ? trim($_POST['b2sSortPostShareStatus']) : "";
|
89 |
+
$b2sShowByDate = isset($_POST['b2sShowByDate']) ? (preg_match("#^[0-9\-.\]]+$#", trim($_POST['b2sShowByDate'])) ? trim($_POST['b2sShowByDate']) : "") : ""; //YYYY-mm-dd
|
90 |
+
$b2sShowByNetwork = isset($_POST['b2sShowByNetwork']) ? (int) $_POST['b2sShowByNetwork'] : 0;
|
91 |
+
$b2sUserAuthId = isset($_POST['b2sUserAuthId']) ? (int) $_POST['b2sUserAuthId'] : 0;
|
92 |
+
$b2sPostBlogId = isset($_POST['b2sPostBlogId']) ? (int) $_POST['b2sPostBlogId'] : 0;
|
93 |
+
$b2sSortPostCat = isset($_POST['b2sSortPostCat']) ? trim($_POST['b2sSortPostCat']) : "";
|
94 |
+
$b2sSortPostType = isset($_POST['b2sSortPostType']) ? trim($_POST['b2sSortPostType']) : "";
|
95 |
+
$b2sSelectSchedDate = isset($_POST['b2sSchedDate']) ? (preg_match("#^[0-9\-.\]]+$#", trim($_POST['b2sSchedDate'])) ? trim($_POST['b2sSchedDate']) : "") : "";
|
96 |
+
$b2sUserLang = isset($_POST['b2sUserLang']) ? trim(strip_tags($_POST['b2sUserLang'])) : strtolower(substr(B2S_LANGUAGE, 0, 2));
|
97 |
+
$b2sResultsPerPage = isset($_POST['b2sPostsPerPage']) && intval($_POST['b2sPostsPerPage']) > 0 ? intval($_POST['b2sPostsPerPage']) : B2S_PLUGIN_POSTPERPAGE;
|
98 |
+
if (!empty($b2sType) && in_array($b2sType, array('all', 'sched', 'publish', 'notice', 'approve', 'draft', 'draft-post'))) {
|
99 |
+
$postItem = new B2S_Post_Item($b2sType, $b2sSortPostTitle, $b2sSortPostAuthor, $b2sSortPostStatus, $b2sSortPostShareStatus, $b2sSortPostPublishDate, $b2sSortPostSchedDate, $b2sShowByDate, $b2sShowByNetwork, $b2sUserAuthId, $b2sPostBlogId, $b2sPagination, $b2sSortPostCat, $b2sSortPostType, $b2sUserLang, $b2sResultsPerPage);
|
100 |
+
$result = array('result' => true, 'content' => $postItem->getItemHtml($b2sSelectSchedDate), 'schedDates' => json_encode($postItem->getCalendarSchedDate()));
|
101 |
+
if ($b2sShowPagination) {
|
102 |
+
$result['pagination'] = $postItem->getPaginationHtml();
|
103 |
+
}
|
104 |
+
echo json_encode($result);
|
105 |
+
wp_die();
|
106 |
+
}
|
107 |
+
echo json_encode(array('result' => false, 'content' => '', 'schedDates' => 0, 'pagination' => ''));
|
108 |
+
wp_die();
|
109 |
+
}
|
110 |
+
|
111 |
+
public function getNetworkBoardAndGroup() {
|
112 |
+
if (isset($_POST['networkId']) && !empty($_POST['networkId']) && isset($_POST['networkAuthId']) && !empty($_POST['networkAuthId'])) {
|
113 |
+
$result = json_decode(B2S_Api_Post::post(B2S_PLUGIN_API_ENDPOINT, array('action' => 'getNetworkBoardAndGroup', 'token' => B2S_PLUGIN_TOKEN, 'networkAuthId' => $_POST['networkAuthId'], 'networkId' => $_POST['networkId'], 'lang' => substr(B2S_LANGUAGE, 0, 2))));
|
114 |
+
if (is_object($result) && !empty($result) && isset($result->data) && !empty($result->data) && isset($result->result) && (int) $result->result == 1) {
|
115 |
+
require_once B2S_PLUGIN_DIR . 'includes/Form.php';
|
116 |
+
echo json_encode(array('result' => true, 'content' => B2S_Form::getNetworkBoardAndGroupHtml($result->data, $_POST['networkId'])));
|
117 |
+
wp_die();
|
118 |
+
}
|
119 |
+
}
|
120 |
+
echo json_encode(array('result' => false, 'content' => ''));
|
121 |
+
wp_die();
|
122 |
+
}
|
123 |
+
|
124 |
+
public function getFaqEntries() {
|
125 |
+
$result = json_decode(B2S_Api_Post::post(B2S_PLUGIN_API_ENDPOINT, array('action' => 'getFaqEntries', 'lang' => substr(B2S_LANGUAGE, 0, 2), 'token' => B2S_PLUGIN_TOKEN)));
|
126 |
+
if (isset($result->result) && isset($result->content) && !empty($result->content)) {
|
127 |
+
echo json_encode(array('result' => true, 'content' => B2S_Notice::getFaqEntriesHtml($result->content)));
|
128 |
+
wp_die();
|
129 |
+
}
|
130 |
+
echo json_encode(array('result' => false, 'content' => ''));
|
131 |
+
wp_die();
|
132 |
+
}
|
133 |
+
|
134 |
+
public function getPostMetaBox() {
|
135 |
+
$result = json_decode(B2S_Api_Post::post(B2S_PLUGIN_API_ENDPOINT, array('action' => 'getProfileUserAuth', 'token' => B2S_PLUGIN_TOKEN)));
|
136 |
+
if (isset($result->result) && (int) $result->result == 1 && isset($result->data) && !empty($result->data) && isset($result->data->mandant) && isset($result->data->auth) && !empty($result->data->mandant)) {
|
137 |
+
if (!empty($result->data->auth)) {
|
138 |
+
$postBox = new B2S_PostBox();
|
139 |
+
echo json_encode(array('result' => true, 'content' => $postBox->getPostBoxAutoHtml($result->data->mandant, $result->data->auth)));
|
140 |
+
wp_die();
|
141 |
+
} else {
|
142 |
+
echo json_encode(array('result' => false, 'content' => 'no_auth'));
|
143 |
+
wp_die();
|
144 |
+
}
|
145 |
+
}
|
146 |
+
echo json_encode(array('result' => false, 'content' => ''));
|
147 |
+
wp_die();
|
148 |
+
}
|
149 |
+
|
150 |
+
public function getShipItemFullText() {
|
151 |
+
if (isset($_POST['postId']) && (int) $_POST['postId'] > 0 && isset($_POST['networkAuthId']) && (int) $_POST['networkAuthId'] > 0) {
|
152 |
+
$userLang = isset($_POST['userLang']) ? trim($_POST['userLang']) : strtolower(substr(B2S_LANGUAGE, 0, 2));
|
153 |
+
$data = get_post((int) $_POST['postId']);
|
154 |
+
if (isset($data->post_content)) {
|
155 |
+
$postUrl = (get_permalink($data->ID) !== false) ? get_permalink($data->ID) : $data->guid;
|
156 |
+
$content = trim(B2S_Util::prepareContent($data->ID, $data->post_content, $postUrl, '', false, $userLang));
|
157 |
+
$networkId = isset($_POST['networkId']) ? (int) $_POST['networkId'] : 0;
|
158 |
+
echo json_encode(array('result' => true, 'text' => trim(strip_tags($content)), 'networkAuthId' => (int) $_POST['networkAuthId'], 'networkId' => $networkId));
|
159 |
+
wp_die();
|
160 |
+
}
|
161 |
+
}
|
162 |
+
echo json_encode(array('result' => false));
|
163 |
+
wp_die();
|
164 |
+
}
|
165 |
+
|
166 |
+
public function getShipItem() {
|
167 |
+
if (isset($_POST['postId']) && (int) $_POST['postId'] > 0 && isset($_POST['networkAuthId']) && (int) $_POST['networkAuthId'] > 0) {
|
168 |
+
//TOS XING Group
|
169 |
+
if ((int) $_POST['networkId'] == 19 && isset($_POST['networkTosGroupId']) && !empty($_POST['networkTosGroupId'])) {
|
170 |
+
$options = new B2S_Options(0, 'B2S_PLUGIN_TOS_XING_GROUP_CROSSPOSTING');
|
171 |
+
if ($options->existsValueByKey($_POST['postId'], $_POST['networkTosGroupId'])) {
|
172 |
+
echo json_encode(array('result' => false, 'reason' => 'tos_xing_group_exists', 'networkAuthId' => (int) $_POST['networkAuthId']));
|
173 |
+
wp_die();
|
174 |
+
}
|
175 |
+
}
|
176 |
+
|
177 |
+
$userLang = isset($_POST['userLang']) ? trim($_POST['userLang']) : strtolower(substr(B2S_LANGUAGE, 0, 2));
|
178 |
+
$relayCount = isset($_POST['relayCount']) ? (int) $_POST['relayCount'] : 0;
|
179 |
+
require_once B2S_PLUGIN_DIR . 'includes/B2S/Ship/Item.php';
|
180 |
+
$itemData = array('networkAuthId' => (int) $_POST['networkAuthId'],
|
181 |
+
'networkId' => (int) $_POST['networkId'],
|
182 |
+
'networkKind' => (int) $_POST['networkKind'],
|
183 |
+
'networkTosGroupId' => ((isset($_POST['networkTosGroupId']) && !empty($_POST['networkTosGroupId'])) ? trim($_POST['networkTosGroupId']) : ''),
|
184 |
+
'instantSharing' => (isset($_POST['instantSharing']) ? (int) $_POST['instantSharing'] : 0),
|
185 |
+
'network_display_name' => strip_tags(stripslashes($_POST['networkDisplayName'])),
|
186 |
+
'networkType' => (int) $_POST['networkType']);
|
187 |
+
$selSchedDate = (isset($_POST['selSchedDate']) && !empty($_POST['selSchedDate'])) ? $_POST['selSchedDate'] : ""; //routing from calendar
|
188 |
+
$b2sPostType = (isset($_POST['b2sPostType']) && $_POST['b2sPostType'] == 'ex') ? 'ex' : ""; //Content Curation
|
189 |
+
|
190 |
+
$b2sDraftData = array();
|
191 |
+
if (isset($_POST['b2sDraftData']) && !empty($_POST['b2sDraftData'])) {
|
192 |
+
$drafts = unserialize(urldecode($_POST['b2sDraftData']));
|
193 |
+
if (isset($drafts['b2s']) && !empty($drafts['b2s']) && array_key_exists($_POST['networkAuthId'], $drafts['b2s'])) {
|
194 |
+
$b2sDraftData = $drafts['b2s'][$_POST['networkAuthId']];
|
195 |
+
if (!empty($b2sDraftData) && is_array($b2sDraftData)) {
|
196 |
+
foreach ($b2sDraftData as $key => $value) {
|
197 |
+
if (!is_array($value)) {
|
198 |
+
$b2sDraftData[$key] = stripslashes($value);
|
199 |
+
}
|
200 |
+
}
|
201 |
+
}
|
202 |
+
}
|
203 |
+
}
|
204 |
+
|
205 |
+
$item = new B2S_Ship_Item((int) $_POST['postId'], $userLang, $selSchedDate, $b2sPostType, $relayCount);
|
206 |
+
echo json_encode(array('result' => true, 'networkAuthId' => (int) $_POST['networkAuthId'], 'networkType' => (int) $_POST['networkType'], 'networkId' => (int) $_POST['networkId'], 'content' => $item->getItemHtml((object) $itemData, true, $b2sDraftData), 'draft' => !empty($b2sDraftData), 'draftActions' => $b2sDraftData));
|
207 |
+
} else {
|
208 |
+
echo json_encode(array('result' => false));
|
209 |
+
}
|
210 |
+
wp_die();
|
211 |
+
}
|
212 |
+
|
213 |
+
public function getPublishPostData() {
|
214 |
+
if ((int) $_POST['postId']) {
|
215 |
+
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Item.php');
|
216 |
+
require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
|
217 |
+
$postData = new B2S_Post_Item();
|
218 |
+
$showByDate = isset($_POST['showByDate']) ? trim($_POST['showByDate']) : '';
|
219 |
+
$type = (isset($_POST['type']) && in_array($_POST['type'], array('publish', 'notice'))) ? $_POST['type'] : 'publish';
|
220 |
+
$result = $postData->getPublishPostDataHtml((int) $_POST['postId'], $type, $showByDate);
|
221 |
+
if ($result !== false) {
|
222 |
+
echo json_encode(array('result' => true, 'postId' => (int) $_POST['postId'], 'content' => $result));
|
223 |
+
wp_die();
|
224 |
+
}
|
225 |
+
}
|
226 |
+
echo json_encode(array('result' => false));
|
227 |
+
wp_die();
|
228 |
+
}
|
229 |
+
|
230 |
+
public function getApprovePostData() {
|
231 |
+
if ((int) $_POST['postId']) {
|
232 |
+
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Item.php');
|
233 |
+
require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
|
234 |
+
$postData = new B2S_Post_Item();
|
235 |
+
$showByDate = isset($_POST['showByDate']) ? trim($_POST['showByDate']) : '';
|
236 |
+
$result = $postData->getApprovePostDataHtml((int) $_POST['postId'], $showByDate);
|
237 |
+
if ($result !== false) {
|
238 |
+
echo json_encode(array('result' => true, 'postId' => (int) $_POST['postId'], 'content' => $result));
|
239 |
+
wp_die();
|
240 |
+
}
|
241 |
+
}
|
242 |
+
echo json_encode(array('result' => false));
|
243 |
+
wp_die();
|
244 |
+
}
|
245 |
+
|
246 |
+
public function getSchedPostsByUserAuth() {
|
247 |
+
if ((int) $_POST['networkAuthId']) {
|
248 |
+
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Network/Item.php');
|
249 |
+
$networkData = new B2S_Network_Item(false);
|
250 |
+
global $wpdb;
|
251 |
+
$blogUserTokenResult = $wpdb->get_results("SELECT token FROM `b2s_user`");
|
252 |
+
$blogUserToken = array();
|
253 |
+
foreach ($blogUserTokenResult as $k => $row) {
|
254 |
+
array_push($blogUserToken, $row->token);
|
255 |
+
}
|
256 |
+
$data = array('action' => 'getTeamAssignUserAuth', 'token' => B2S_PLUGIN_TOKEN, 'networkAuthId' => (int) $_POST['networkAuthId'], 'blogUser' => $blogUserToken);
|
257 |
+
$networkAuthAssignment = json_decode(B2S_Api_Post::post(B2S_PLUGIN_API_ENDPOINT, $data, 30), true);
|
258 |
+
$count = $networkData->getCountSchedPostsByUserAuth((int) $_POST['networkAuthId']);
|
259 |
+
if ($networkAuthAssignment['result'] == true) {
|
260 |
+
$assignCount = 0;
|
261 |
+
$assignList = array();
|
262 |
+
foreach ($networkAuthAssignment['assignList'] as $k => $v) {
|
263 |
+
$assignList[$v['assign_blog_user_id']] = (int) $v['assign_network_auth_id'];
|
264 |
+
$authCount = $networkData->getCountSchedPostsByUserAuth((int) $v['assign_network_auth_id']);
|
265 |
+
if ($authCount !== false) {
|
266 |
+
$assignCount += $authCount;
|
267 |
+
}
|
268 |
+
}
|
269 |
+
echo json_encode(array('result' => true, 'count' => ($count !== false) ? $count : 0, 'assignCount' => $assignCount, 'assignListCount' => count($networkAuthAssignment['assignList']), 'assignList' => serialize($assignList)));
|
270 |
+
wp_die();
|
271 |
+
} else {
|
272 |
+
if ($count !== false) {
|
273 |
+
echo json_encode(array('result' => true, 'count' => $count));
|
274 |
+
wp_die();
|
275 |
+
}
|
276 |
+
}
|
277 |
+
}
|
278 |
+
echo json_encode(array('result' => false, 'count' => 0));
|
279 |
+
wp_die();
|
280 |
+
}
|
281 |
+
|
282 |
+
public function getSchedPostData() {
|
283 |
+
if ((int) $_POST['postId']) {
|
284 |
+
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Item.php');
|
285 |
+
require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
|
286 |
+
$postData = new B2S_Post_Item();
|
287 |
+
$showByDate = isset($_POST['showByDate']) ? trim($_POST['showByDate']) : '';
|
288 |
+
$showByNetwork = isset($_POST['showByNetwork']) ? trim($_POST['showByNetwork']) : '';
|
289 |
+
$userAuthId = isset($_POST['userAuthId']) ? (int) $_POST['userAuthId'] : 0;
|
290 |
+
$result = $postData->getSchedPostDataHtml((int) $_POST['postId'], $showByDate, $showByNetwork, $userAuthId);
|
291 |
+
if ($result !== false) {
|
292 |
+
echo json_encode(array('result' => true, 'postId' => (int) $_POST['postId'], 'content' => $result));
|
293 |
+
wp_die();
|
294 |
+
}
|
295 |
+
}
|
296 |
+
echo json_encode(array('result' => false));
|
297 |
+
wp_die();
|
298 |
+
}
|
299 |
+
|
300 |
+
public function getNavbarItem() {
|
301 |
+
if (isset($_POST['networkId']) && isset($_POST['networkAuthId']) && isset($_POST['networkType']) && isset($_POST['displayName']) && isset($_POST['mandandId'])) {
|
302 |
+
require_once (B2S_PLUGIN_DIR . '/includes/B2S/Ship/Navbar.php');
|
303 |
+
global $wpdb;
|
304 |
+
$mandantCount = $wpdb->get_var($wpdb->prepare("SELECT COUNT(mandant_id)FROM b2s_user_network_settings WHERE mandant_id =%d AND blog_user_id=%d ", $_POST['mandandId'], B2S_PLUGIN_BLOG_USER_ID));
|
305 |
+
if ($mandantCount > 0) {
|
306 |
+
$wpdb->insert('b2s_user_network_settings', array('blog_user_id' => B2S_PLUGIN_BLOG_USER_ID, 'mandant_id' => $_POST['mandandId'], 'network_auth_id' => $_POST['networkAuthId']), array('%d', '%d', '%d'));
|
307 |
+
}
|
308 |
+
$data = array(
|
309 |
+
'networkId' => isset($_POST['networkId']) ? (int) $_POST['networkId'] : 0,
|
310 |
+
'networkAuthId' => isset($_POST['networkAuthId']) ? (int) $_POST['networkAuthId'] : 0,
|
311 |
+
'networkType' => isset($_POST['networkType']) ? (int) $_POST['networkType'] : 0,
|
312 |
+
'networkUserName' => isset($_POST['displayName']) ? strip_tags($_POST['displayName']) : '',
|
313 |
+
'mandantId' => isset($_POST['mandandId']) ? (int) $_POST['mandandId'] : 0,
|
314 |
+
'networkKind' => isset($_POST['networkKind']) ? (int) $_POST['networkKind'] : 0,
|
315 |
+
'networkTosGroupId' => isset($_POST['networkTosGroupId']) ? (int) $_POST['networkTosGroupId'] : '',
|
316 |
+
'expiredDate' => date('Y-m-d', strtotime('+3 days')));
|
317 |
+
|
318 |
+
$navbar = new B2S_Ship_Navbar();
|
319 |
+
echo json_encode(array('result' => true, 'networkAuthId' => (int) $_POST['networkAuthId'], 'content' => $navbar->getItemHtml((object) $data)));
|
320 |
+
wp_die();
|
321 |
+
}
|
322 |
+
echo json_encode(array('result' => false));
|
323 |
+
wp_die();
|
324 |
+
}
|
325 |
+
|
326 |
+
public function getSettingsSchedTimeDefault() {
|
327 |
+
$userTimes = B2S_Tools::getRandomBestTimeSettings();
|
328 |
+
if (!empty($userTimes) && is_array($userTimes)) {
|
329 |
+
echo json_encode(array('result' => true, 'times' => $userTimes));
|
330 |
+
wp_die();
|
331 |
+
}
|
332 |
+
echo json_encode(array('result' => false));
|
333 |
+
wp_die();
|
334 |
+
}
|
335 |
+
|
336 |
+
//NEW V5.1.0
|
337 |
+
public function getUserTimeSettings() {
|
338 |
+
$lang = substr(B2S_LANGUAGE, 0, 2);
|
339 |
+
$options = new B2S_Options(get_current_user_id());
|
340 |
+
$userSchedData = $options->_getOption('auth_sched_time');
|
341 |
+
if (isset($userSchedData['time'])) {
|
342 |
+
if (is_array($userSchedData) && isset($userSchedData['delay_day']) && isset($userSchedData['time']) && is_array($userSchedData['time'])) {
|
343 |
+
foreach ($userSchedData['time'] as $k => $v) {
|
344 |
+
$slug = ($lang == 'en') ? 'h:i A' : 'H:i';
|
345 |
+
$userSchedData['time'][$k] = date($slug, strtotime(date('Y-m-d ' . $v . ':00')));
|
346 |
+
}
|
347 |
+
echo json_encode(array('result' => true, 'type' => 'new', 'delay_day' => $userSchedData['delay_day'], 'times' => $userSchedData['time']));
|
348 |
+
wp_die();
|
349 |
+
}
|
350 |
+
//load old setttings >5.1.0
|
351 |
+
} else {
|
352 |
+
global $wpdb;
|
353 |
+
//if exists
|
354 |
+
if ($wpdb->get_var("SHOW TABLES LIKE 'b2s_post_sched_settings'") == 'b2s_post_sched_settings') {
|
355 |
+
$userTimes = array();
|
356 |
+
$saveSchedData = $wpdb->get_results($wpdb->prepare("SELECT network_id, network_type, sched_time FROM b2s_post_sched_settings WHERE blog_user_id= %d", B2S_PLUGIN_BLOG_USER_ID));
|
357 |
+
if (!empty($saveSchedData) && is_array($saveSchedData)) {
|
358 |
+
foreach ($saveSchedData as $k => $v) {
|
359 |
+
$slug = ($lang == 'en') ? 'h:i A' : 'H:i';
|
360 |
+
$userTimes[$v->network_id][$v->network_type] = date($slug, strtotime(date('Y-m-d ' . $v->sched_time . ':00')));
|
361 |
+
}
|
362 |
+
if (!empty($userTimes)) {
|
363 |
+
echo json_encode(array('result' => true, 'type' => 'old', 'times' => $userTimes));
|
364 |
+
wp_die();
|
365 |
+
}
|
366 |
+
}
|
367 |
+
}
|
368 |
+
}
|
369 |
+
echo json_encode(array('result' => false));
|
370 |
+
wp_die();
|
371 |
+
}
|
372 |
+
|
373 |
+
public function getShipItemReloadUrl() {
|
374 |
+
if (isset($_POST['networkId']) && (int) $_POST['networkId'] > 0 && isset($_POST['networkAuthId']) && (int) $_POST['networkAuthId'] > 0 && isset($_POST['url']) && !empty($_POST['url'])) {
|
375 |
+
if (isset($_POST['postId']) && (int) $_POST['postId'] > 0 && isset($_POST['defaultUrl']) && $_POST['defaultUrl'] == $_POST['url']) {
|
376 |
+
$postData = get_post($_POST['postId']);
|
377 |
+
if ($postData->post_status != 'publish') {
|
378 |
+
$postUrl = (get_permalink($postData->ID) !== false ? get_permalink($postData->ID) : $postData->guid);
|
379 |
+
$metaInfo = array('title' => B2S_Util::getExcerpt(B2S_Util::remove4byte($postData->post_title), 50) . ' - ' . get_option('blogname'), 'description' => B2S_Util::getExcerpt(B2S_Util::prepareContent($postData->ID, $postData->post_content, $postUrl, false, false), 150));
|
380 |
+
} else {
|
381 |
+
$metaInfo = B2S_Util::getMetaTags((int) $_POST['postId'], strip_tags($_POST['url']), (int) $_POST['networkId']);
|
382 |
+
}
|
383 |
+
} else {
|
384 |
+
$metaInfo = B2S_Util::getMetaTags(0, strip_tags($_POST['url']), (int) $_POST['networkId']);
|
385 |
+
}
|
386 |
+
echo json_encode(array('result' => true, 'networkId' => (int) $_POST['networkId'], 'networkAuthId' => $_POST['networkAuthId'], 'title' => isset($metaInfo['title']) ? $metaInfo['title'] : '', 'description' => isset($metaInfo['description']) ? $metaInfo['description'] : '', 'image' => isset($metaInfo['image']) ? $metaInfo['image'] : ''));
|
387 |
+
wp_die();
|
388 |
+
}
|
389 |
+
echo json_encode(array('result' => false));
|
390 |
+
wp_die();
|
391 |
+
}
|
392 |
+
|
393 |
+
public function getCalendarEvents() {
|
394 |
+
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Calendar/Filter.php');
|
395 |
+
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Ship/Image.php');
|
396 |
+
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Settings/Item.php');
|
397 |
+
require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
|
398 |
+
|
399 |
+
//Filter Network
|
400 |
+
$network_id = (isset($_GET['filter_network']) && (int) $_GET['filter_network'] >= 1) ? (int) $_GET['filter_network'] : 0; // 0=all
|
401 |
+
//Filter Network Details
|
402 |
+
$network_details_id = (isset($_GET['filter_network_auth']) && (int) $_GET['filter_network_auth'] >= 1) ? (int) $_GET['filter_network_auth'] : 0; // 0=all
|
403 |
+
//Filter Status
|
404 |
+
$status = (isset($_GET['filter_status']) && (int) $_GET['filter_status'] >= 0) ? (int) $_GET['filter_status'] : 0; // 0=all,1=publish, 2=scheduled
|
405 |
+
|
406 |
+
if (isset($_GET['start'])) {
|
407 |
+
$calendar = B2S_Calendar_Filter::getByTimespam($_GET['start'] . " 00:00:00", $_GET['end'] . " 23:59:59", $network_id, $network_details_id, $status);
|
408 |
+
} else {
|
409 |
+
$calendar = B2S_Calendar_Filter::getAll($network_id, $network_details_id);
|
410 |
+
}
|
411 |
+
echo json_encode($calendar->asCalendarArray());
|
412 |
+
wp_die();
|
413 |
+
}
|
414 |
+
|
415 |
+
public function getCalendarFilterNetworkAuth() {
|
416 |
+
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Calendar/Filter.php');
|
417 |
+
$network_id = (isset($_POST['network_id']) && (int) $_POST['network_id'] >= 1) ? (int) $_POST['network_id'] : 0; // 0=all
|
418 |
+
if ($network_id != 0) {
|
419 |
+
$result = B2S_Calendar_Filter::getFilterNetworkAuthHtml($network_id);
|
420 |
+
if ($result !== false) {
|
421 |
+
echo json_encode(array('result' => true, 'content' => $result));
|
422 |
+
wp_die();
|
423 |
+
}
|
424 |
+
}
|
425 |
+
echo json_encode(array('result' => false));
|
426 |
+
wp_die();
|
427 |
+
}
|
428 |
+
|
429 |
+
public function getPostEditModal() {
|
430 |
+
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Calendar/Filter.php');
|
431 |
+
if (isset($_POST['id']) && (int) $_POST['id'] > 0) {
|
432 |
+
$item = B2S_Calendar_Filter::getById((int) $_POST['id']);
|
433 |
+
if ($item != null) {
|
434 |
+
$lock_user_id = get_option("B2S_PLUGIN_CALENDAR_BLOCKED_" . $_POST['id']);
|
435 |
+
if (!$lock_user_id) {
|
436 |
+
update_option("B2S_PLUGIN_CALENDAR_BLOCKED_" . $_POST['id'], get_current_user_id(), false);
|
437 |
+
$options = new B2S_Options(get_current_user_id());
|
438 |
+
$block_old = $options->_getOption("B2S_PLUGIN_USER_CALENDAR_BLOCKED");
|
439 |
+
|
440 |
+
if ($block_old) {
|
441 |
+
delete_option("B2S_PLUGIN_CALENDAR_BLOCKED_" . $block_old);
|
442 |
+
}
|
443 |
+
$options->_setOption("B2S_PLUGIN_USER_CALENDAR_BLOCKED", $_POST['id']);
|
444 |
+
}
|
445 |
+
if ($lock_user_id) {
|
446 |
+
$lock_user = get_userdata($lock_user_id);
|
447 |
+
}
|
448 |
+
include (B2S_PLUGIN_DIR . 'views/b2s/partials/post-edit-modal.php');
|
449 |
+
wp_die();
|
450 |
+
}
|
451 |
+
}
|
452 |
+
echo "0";
|
453 |
+
wp_die();
|
454 |
+
}
|
455 |
+
|
456 |
+
public function getImageModal() {
|
457 |
+
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Ship/Image.php');
|
458 |
+
if (isset($_POST['id']) && (int) $_POST['id'] > 0) {
|
459 |
+
$postData = get_post((int) $_POST['id']);
|
460 |
+
if (isset($postData->ID)) {
|
461 |
+
$postUrl = (get_permalink($postData->ID) !== false ? get_permalink($postData->ID) : $postData->guid);
|
462 |
+
include (B2S_PLUGIN_DIR . 'views/b2s/partials/calendar-image-modal.php');
|
463 |
+
wp_die();
|
464 |
+
}
|
465 |
+
}
|
466 |
+
echo "0";
|
467 |
+
wp_die();
|
468 |
+
}
|
469 |
+
|
470 |
+
public function getMultiWidgetContent() {
|
471 |
+
$option = get_option("B2S_MULTI_WIDGET");
|
472 |
+
if ($option !== false) {
|
473 |
+
if (is_array($option) && isset($option['timestamp']) && isset($option['content']) && !empty($option['content']) && $option['timestamp'] > date('Y-m-d H:i:s', strtotime("-1 hours"))) {
|
474 |
+
die($option['content']);
|
475 |
+
}
|
476 |
+
}
|
477 |
+
$content = B2S_Api_Post::post(B2S_PLUGIN_API_ENDPOINT, array('action' => 'getNews', 'version' => B2S_PLUGIN_VERSION, 'lang' => strtolower(substr(get_locale(), 0, 2)), 'token' => B2S_PLUGIN_TOKEN));
|
478 |
+
update_option("B2S_MULTI_WIDGET", array("timestamp" => date("Y-m-d H:i:s"), "content" => $content), false);
|
479 |
+
echo $content;
|
480 |
+
wp_die();
|
481 |
+
}
|
482 |
+
|
483 |
+
public function getStats() {
|
484 |
+
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Stats.php');
|
485 |
+
$stats = new B2S_Stats();
|
486 |
+
if (isset($_GET['from']) && !empty($_GET['from'])) {
|
487 |
+
$stats->set_from($_GET['from']);
|
488 |
+
}
|
489 |
+
echo json_encode($stats->get_result());
|
490 |
+
wp_die();
|
491 |
+
}
|
492 |
+
|
493 |
+
public function b2sSupportSystemRequirements() {
|
494 |
+
if (!current_user_can('administrator')) {
|
495 |
+
echo json_encode(array('result' => false, 'error' => 'admin'));
|
496 |
+
wp_die();
|
497 |
+
}
|
498 |
+
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Support/Check/System.php');
|
499 |
+
$support = new B2S_Support_Check_System();
|
500 |
+
$htmlData = $support->htmlData();
|
501 |
+
$blogData = $support->blogData();
|
502 |
+
if (empty($htmlData) || empty($blogData)) {
|
503 |
+
$result = array('result' => false);
|
504 |
+
} else {
|
505 |
+
$result = array('result' => true, 'htmlData' => $htmlData, "blogData" => $blogData);
|
506 |
+
}
|
507 |
+
echo json_encode($result);
|
508 |
+
wp_die();
|
509 |
+
}
|
510 |
+
|
511 |
+
public function searchUser() {
|
512 |
+
if (isset($_GET['search_user']) && !empty($_GET['search_user'])) {
|
513 |
+
$options = B2S_Tools::searchUser($_GET['search_user']);
|
514 |
+
echo json_encode(array('result' => true, 'options' => $options));
|
515 |
+
wp_die();
|
516 |
+
}
|
517 |
+
echo json_encode(array('result' => false));
|
518 |
+
wp_die();
|
519 |
+
}
|
520 |
+
|
521 |
+
public function getSelectMandantUser() {
|
522 |
+
if (isset($_GET['owner']) && (int) $_GET['owner'] > 0) {
|
523 |
+
$owner = stripslashes(get_user_by('id', $_GET['owner'])->display_name);
|
524 |
+
$owner = (empty($owner) || $owner == false) ? __("Unknown username", "blog2social") : $owner;
|
525 |
+
echo json_encode(array('result' => true, 'ownerName' => $owner));
|
526 |
+
wp_die();
|
527 |
+
} else {
|
528 |
+
$networkAuthId = (isset($_GET['networkAuthId']) && (int) $_GET['networkAuthId'] > 0) ? $_GET['networkAuthId'] : 0;
|
529 |
+
$networkId = (isset($_GET['networkId']) && (int) $_GET['networkId'] > 0) ? $_GET['networkId'] : 0;
|
530 |
+
$networkType = (isset($_GET['networkType']) && (int) $_GET['networkType'] >= 0) ? $_GET['networkType'] : 0;
|
531 |
+
if ($networkAuthId > 0 && $networkId > 0) {
|
532 |
+
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Network/Item.php');
|
533 |
+
$networkItem = new B2S_Network_Item();
|
534 |
+
$networkAuthAssignment = $networkItem->getNetworkAuthAssignment($networkAuthId, $networkId, $networkType);
|
535 |
+
if ($networkAuthAssignment['result'] !== false) {
|
536 |
+
$userSelect = $networkAuthAssignment['userSelect'];
|
537 |
+
$assignList = $networkAuthAssignment['assignList'];
|
538 |
+
|
539 |
+
echo json_encode(array('result' => true, 'userSelect' => $userSelect, 'assignList' => $assignList));
|
540 |
+
wp_die();
|
541 |
+
}
|
542 |
+
}
|
543 |
+
}
|
544 |
+
echo json_encode(array('result' => false));
|
545 |
+
wp_die();
|
546 |
+
}
|
547 |
+
|
548 |
+
public function getEditTemplateForm() {
|
549 |
+
if (isset($_GET['networkId']) && (int) $_GET['networkId'] > 0) {
|
550 |
+
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Network/Item.php');
|
551 |
+
$networkItem = new B2S_Network_Item(false);
|
552 |
+
|
553 |
+
$content = $networkItem->getEditTemplateForm($_GET['networkId']);
|
554 |
+
|
555 |
+
echo json_encode(array('result' => true, 'content' => $content));
|
556 |
+
wp_die();
|
557 |
+
}
|
558 |
+
echo json_encode(array('result' => false));
|
559 |
+
wp_die();
|
560 |
+
}
|
561 |
+
|
562 |
+
public function checkDraftExists() {
|
563 |
+
if (isset($_GET['postId']) && (int) $_GET['postId'] > 0) {
|
564 |
+
global $wpdb;
|
565 |
+
if ($wpdb->get_var("SHOW TABLES LIKE 'b2s_posts_drafts'") == 'b2s_posts_drafts') {
|
566 |
+
$sqlCheckDraft = $wpdb->prepare("SELECT `id` FROM `b2s_posts_drafts` WHERE `blog_user_id` = %d AND `post_id` = %d", B2S_PLUGIN_BLOG_USER_ID, $_GET['postId']);
|
567 |
+
$draftEntry = $wpdb->get_var($sqlCheckDraft);
|
568 |
+
if ($draftEntry !== NULL && (int) $draftEntry > 0) {
|
569 |
+
echo json_encode(array('result' => true));
|
570 |
+
wp_die();
|
571 |
+
}
|
572 |
+
}
|
573 |
+
}
|
574 |
+
echo json_encode(array('result' => false));
|
575 |
+
wp_die();
|
576 |
+
}
|
577 |
+
|
578 |
+
}
|
includes/Ajax/Post.php
CHANGED
@@ -24,6 +24,7 @@ class Ajax_Post {
|
|
24 |
add_action('wp_ajax_b2s_delete_user_sched_post', array($this, 'deleteUserSchedPost'));
|
25 |
add_action('wp_ajax_b2s_delete_user_publish_post', array($this, 'deleteUserPublishPost'));
|
26 |
add_action('wp_ajax_b2s_delete_user_approve_post', array($this, 'deleteUserApprovePost'));
|
|
|
27 |
add_action('wp_ajax_b2s_user_network_settings', array($this, 'saveUserNetworkSettings'));
|
28 |
add_action('wp_ajax_b2s_save_social_meta_tags', array($this, 'saveSocialMetaTags'));
|
29 |
add_action('wp_ajax_b2s_reset_social_meta_tags', array($this, 'resetSocialMetaTags'));
|
@@ -52,6 +53,8 @@ class Ajax_Post {
|
|
52 |
add_action("wp_ajax_b2s_assign_network_user_auth", array($this, 'assignNetworkUserAuth'));
|
53 |
add_action("wp_ajax_b2s_save_post_template", array($this, 'savePostTemplate'));
|
54 |
add_action("wp_ajax_b2s_load_default_post_template", array($this, 'loadDefaultPostTemplate'));
|
|
|
|
|
55 |
}
|
56 |
|
57 |
public function curationDraft() {
|
@@ -228,11 +231,16 @@ class Ajax_Post {
|
|
228 |
}
|
229 |
|
230 |
public function curationCustomize() {
|
|
|
231 |
if (isset($_POST['title']) && !empty($_POST['title']) && isset($_POST['url']) && !empty($_POST['url'])) {
|
232 |
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Curation/Save.php');
|
233 |
-
$data = array('title' => $_POST['title'], 'url' => $_POST['url'], 'content' => (isset($_POST['comment']) ? $_POST['comment'] : ''), 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
|
234 |
$curation = new B2S_Curation_Save($data);
|
235 |
-
$
|
|
|
|
|
|
|
|
|
236 |
if ($postId !== false) {
|
237 |
$redirect_url = get_option('siteurl') . ((substr(get_option('siteurl'), -1, 1) == '/') ? '' : '/') . 'wp-admin/admin.php?page=blog2social-ship&b2sPostType=ex&postId=' . $postId;
|
238 |
if (isset($_POST['ship_type']) && (int) $_POST['ship_type'] == 1 && isset($_POST['ship_date']) && !empty($_POST['ship_date'])) {
|
@@ -718,7 +726,7 @@ class Ajax_Post {
|
|
718 |
}
|
719 |
|
720 |
public function deleteUserAuth() {
|
721 |
-
$assignList=array();
|
722 |
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Tools.php');
|
723 |
if (isset($_POST['networkAuthId']) && (int) $_POST['networkAuthId'] > 0 && isset($_POST['networkId']) && (int) $_POST['networkId'] > 0 && isset($_POST['networkType'])) {
|
724 |
global $wpdb;
|
@@ -914,6 +922,18 @@ class Ajax_Post {
|
|
914 |
wp_die();
|
915 |
}
|
916 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
917 |
public function sendTrailFeedback() {
|
918 |
require_once (B2S_PLUGIN_DIR . '/includes/Tools.php');
|
919 |
if (isset($_POST['feedback']) && !empty($_POST['feedback'])) {
|
@@ -1369,24 +1389,24 @@ class Ajax_Post {
|
|
1369 |
echo json_encode(array('result' => false, 'error_reason' => 'default'));
|
1370 |
wp_die();
|
1371 |
}
|
1372 |
-
|
1373 |
public function savePostTemplate() {
|
1374 |
-
if(isset($_POST['template_data']) && isset($_POST['networkId']) && (int) $_POST['networkId'] > 0){
|
1375 |
require_once(B2S_PLUGIN_DIR . 'includes/Options.php');
|
1376 |
$options = new B2S_Options(get_current_user_id());
|
1377 |
-
|
1378 |
$post_template_result = false;
|
1379 |
$link_no_cache_option = false;
|
1380 |
-
|
1381 |
-
if(B2S_PLUGIN_USER_VERSION >= 1) {
|
1382 |
$post_template = $options->_getOption("post_template");
|
1383 |
|
1384 |
-
if($post_template == false){
|
1385 |
$post_template = array();
|
1386 |
}
|
1387 |
|
1388 |
$new_template = array();
|
1389 |
-
foreach ($_POST['template_data'] as $type => $data){
|
1390 |
$limit = unserialize(B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT)[$_POST['networkId']][$type]['short_text']['limit'];
|
1391 |
$range_max = ((int) $limit != 0 && (int) $data['range_max'] > (int) $limit) ? (int) $limit : (int) $data['range_max'];
|
1392 |
$excerpt_range_max = ((int) $limit != 0 && (int) $data['excerpt_range_max'] > (int) $limit) ? (int) $limit : (int) $data['excerpt_range_max'];
|
@@ -1407,13 +1427,13 @@ class Ajax_Post {
|
|
1407 |
$post_template[$_POST['networkId']] = $new_template;
|
1408 |
$post_template_result = $options->_setOption("post_template", $post_template);
|
1409 |
}
|
1410 |
-
|
1411 |
-
if((int) $_POST['networkId'] == 1 && isset($_POST['link_no_cache'])){
|
1412 |
$noCache = (int) $_POST['link_no_cache'];
|
1413 |
$link_no_cache_option = $options->_setOption('link_no_cache', $noCache);
|
1414 |
}
|
1415 |
|
1416 |
-
if($post_template_result == true || $link_no_cache_option == true){
|
1417 |
echo json_encode(array('result' => true));
|
1418 |
wp_die();
|
1419 |
} else {
|
@@ -1421,14 +1441,13 @@ class Ajax_Post {
|
|
1421 |
wp_die();
|
1422 |
}
|
1423 |
}
|
1424 |
-
|
1425 |
echo json_encode(array('result' => false));
|
1426 |
wp_die();
|
1427 |
-
|
1428 |
}
|
1429 |
-
|
1430 |
public function loadDefaultPostTemplate() {
|
1431 |
-
if(isset($_POST['networkId']) && (int) $_POST['networkId'] > 0 && isset($_POST['networkType']) && isset(unserialize(B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT)[$_POST['networkId']])){
|
1432 |
$default = unserialize(B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT)[$_POST['networkId']];
|
1433 |
require_once B2S_PLUGIN_DIR . 'includes/B2S/Network/Item.php';
|
1434 |
$networkItem = new B2S_Network_Item();
|
@@ -1440,4 +1459,41 @@ class Ajax_Post {
|
|
1440 |
wp_die();
|
1441 |
}
|
1442 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1443 |
}
|
24 |
add_action('wp_ajax_b2s_delete_user_sched_post', array($this, 'deleteUserSchedPost'));
|
25 |
add_action('wp_ajax_b2s_delete_user_publish_post', array($this, 'deleteUserPublishPost'));
|
26 |
add_action('wp_ajax_b2s_delete_user_approve_post', array($this, 'deleteUserApprovePost'));
|
27 |
+
add_action('wp_ajax_b2s_delete_user_cc_draft_post', array($this, 'deleteUserCcDraftPost'));
|
28 |
add_action('wp_ajax_b2s_user_network_settings', array($this, 'saveUserNetworkSettings'));
|
29 |
add_action('wp_ajax_b2s_save_social_meta_tags', array($this, 'saveSocialMetaTags'));
|
30 |
add_action('wp_ajax_b2s_reset_social_meta_tags', array($this, 'resetSocialMetaTags'));
|
53 |
add_action("wp_ajax_b2s_assign_network_user_auth", array($this, 'assignNetworkUserAuth'));
|
54 |
add_action("wp_ajax_b2s_save_post_template", array($this, 'savePostTemplate'));
|
55 |
add_action("wp_ajax_b2s_load_default_post_template", array($this, 'loadDefaultPostTemplate'));
|
56 |
+
add_action('wp_ajax_b2s_save_draft_data', array($this, 'saveDraftData'));
|
57 |
+
add_action('wp_ajax_b2s_delete_user_draft', array($this, 'deleteDraft'));
|
58 |
}
|
59 |
|
60 |
public function curationDraft() {
|
231 |
}
|
232 |
|
233 |
public function curationCustomize() {
|
234 |
+
|
235 |
if (isset($_POST['title']) && !empty($_POST['title']) && isset($_POST['url']) && !empty($_POST['url'])) {
|
236 |
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Curation/Save.php');
|
237 |
+
$data = array('ID' => ((isset($_POST['b2s-draft-id']) && (int) $_POST['b2s-draft-id'] > 0) ? (int) $_POST['b2s-draft-id'] : 0), 'title' => $_POST['title'], 'url' => $_POST['url'], 'content' => (isset($_POST['comment']) ? $_POST['comment'] : ''), 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
|
238 |
$curation = new B2S_Curation_Save($data);
|
239 |
+
if (isset($data['ID']) && (int) $data['ID'] > 0) {
|
240 |
+
$postId = $curation->updateContent();
|
241 |
+
} else {
|
242 |
+
$postId = $curation->insertContent();
|
243 |
+
}
|
244 |
if ($postId !== false) {
|
245 |
$redirect_url = get_option('siteurl') . ((substr(get_option('siteurl'), -1, 1) == '/') ? '' : '/') . 'wp-admin/admin.php?page=blog2social-ship&b2sPostType=ex&postId=' . $postId;
|
246 |
if (isset($_POST['ship_type']) && (int) $_POST['ship_type'] == 1 && isset($_POST['ship_date']) && !empty($_POST['ship_date'])) {
|
726 |
}
|
727 |
|
728 |
public function deleteUserAuth() {
|
729 |
+
$assignList = array();
|
730 |
require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Tools.php');
|
731 |
if (isset($_POST['networkAuthId']) && (int) $_POST['networkAuthId'] > 0 && isset($_POST['networkId']) && (int) $_POST['networkId'] > 0 && isset($_POST['networkType'])) {
|
732 |
global $wpdb;
|
922 |
wp_die();
|
923 |
}
|
924 |
|
925 |
+
public function deleteUserCcDraftPost() {
|
926 |
+
if (isset($_POST['postId']) && !empty($_POST['postId']) && (int) $_POST['postId'] > 0) {
|
927 |
+
$res = wp_update_post(array('ID' => (int) $_POST['postId'], 'post_status' => 'trash'), true);
|
928 |
+
if ((int) $res > 0) {
|
929 |
+
echo json_encode(array('result' => true, 'postId' => (int) $_POST['postId']));
|
930 |
+
wp_die();
|
931 |
+
}
|
932 |
+
}
|
933 |
+
echo json_encode(array('result' => false));
|
934 |
+
wp_die();
|
935 |
+
}
|
936 |
+
|
937 |
public function sendTrailFeedback() {
|
938 |
require_once (B2S_PLUGIN_DIR . '/includes/Tools.php');
|
939 |
if (isset($_POST['feedback']) && !empty($_POST['feedback'])) {
|
1389 |
echo json_encode(array('result' => false, 'error_reason' => 'default'));
|
1390 |
wp_die();
|
1391 |
}
|
1392 |
+
|
1393 |
public function savePostTemplate() {
|
1394 |
+
if (isset($_POST['template_data']) && isset($_POST['networkId']) && (int) $_POST['networkId'] > 0) {
|
1395 |
require_once(B2S_PLUGIN_DIR . 'includes/Options.php');
|
1396 |
$options = new B2S_Options(get_current_user_id());
|
1397 |
+
|
1398 |
$post_template_result = false;
|
1399 |
$link_no_cache_option = false;
|
1400 |
+
|
1401 |
+
if (B2S_PLUGIN_USER_VERSION >= 1) {
|
1402 |
$post_template = $options->_getOption("post_template");
|
1403 |
|
1404 |
+
if ($post_template == false) {
|
1405 |
$post_template = array();
|
1406 |
}
|
1407 |
|
1408 |
$new_template = array();
|
1409 |
+
foreach ($_POST['template_data'] as $type => $data) {
|
1410 |
$limit = unserialize(B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT)[$_POST['networkId']][$type]['short_text']['limit'];
|
1411 |
$range_max = ((int) $limit != 0 && (int) $data['range_max'] > (int) $limit) ? (int) $limit : (int) $data['range_max'];
|
1412 |
$excerpt_range_max = ((int) $limit != 0 && (int) $data['excerpt_range_max'] > (int) $limit) ? (int) $limit : (int) $data['excerpt_range_max'];
|
1427 |
$post_template[$_POST['networkId']] = $new_template;
|
1428 |
$post_template_result = $options->_setOption("post_template", $post_template);
|
1429 |
}
|
1430 |
+
|
1431 |
+
if ((int) $_POST['networkId'] == 1 && isset($_POST['link_no_cache'])) {
|
1432 |
$noCache = (int) $_POST['link_no_cache'];
|
1433 |
$link_no_cache_option = $options->_setOption('link_no_cache', $noCache);
|
1434 |
}
|
1435 |
|
1436 |
+
if ($post_template_result == true || $link_no_cache_option == true) {
|
1437 |
echo json_encode(array('result' => true));
|
1438 |
wp_die();
|
1439 |
} else {
|
1441 |
wp_die();
|
1442 |
}
|
1443 |
}
|
1444 |
+
|
1445 |
echo json_encode(array('result' => false));
|
1446 |
wp_die();
|
|
|
1447 |
}
|
1448 |
+
|
1449 |
public function loadDefaultPostTemplate() {
|
1450 |
+
if (isset($_POST['networkId']) && (int) $_POST['networkId'] > 0 && isset($_POST['networkType']) && isset(unserialize(B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT)[$_POST['networkId']])) {
|
1451 |
$default = unserialize(B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT)[$_POST['networkId']];
|
1452 |
require_once B2S_PLUGIN_DIR . 'includes/B2S/Network/Item.php';
|
1453 |
$networkItem = new B2S_Network_Item();
|
1459 |
wp_die();
|
1460 |
}
|
1461 |
|
1462 |
+
public function saveDraftData() {
|
1463 |
+
if (isset($_POST['post_id']) && (int) $_POST['post_id'] > 0) {
|
1464 |
+
global $wpdb;
|
1465 |
+
if ($wpdb->get_var("SHOW TABLES LIKE 'b2s_posts_drafts'") == 'b2s_posts_drafts') {
|
1466 |
+
$options = new B2S_Options(B2S_PLUGIN_BLOG_USER_ID);
|
1467 |
+
$optionUserTimeZone = $options->_getOption('user_time_zone');
|
1468 |
+
$userTimeZone = ($optionUserTimeZone !== false) ? $optionUserTimeZone : get_option('timezone_string');
|
1469 |
+
$userTimeZoneOffset = (empty($userTimeZone)) ? get_option('gmt_offset') : B2S_Util::getOffsetToUtcByTimeZone($userTimeZone);
|
1470 |
+
$date = B2S_Util::getCustomLocaleDateTime($userTimeZoneOffset);
|
1471 |
+
|
1472 |
+
$sqlCheckDraft = $wpdb->prepare("SELECT `id` FROM `b2s_posts_drafts` WHERE `blog_user_id` = %d AND `post_id` = %d", B2S_PLUGIN_BLOG_USER_ID, $_POST['post_id']);
|
1473 |
+
$draftEntry = $wpdb->get_var($sqlCheckDraft);
|
1474 |
+
if ($draftEntry !== NULL && (int) $draftEntry > 0) {
|
1475 |
+
$wpdb->update('b2s_posts_drafts', array('data' => serialize($_POST), 'last_save_date' => $date), array('id' => (int) $draftEntry));
|
1476 |
+
} else {
|
1477 |
+
$wpdb->insert('b2s_posts_drafts', array('blog_user_id' => B2S_PLUGIN_BLOG_USER_ID, 'post_id' => $_POST['post_id'], 'data' => serialize($_POST), 'last_save_date' => $date));
|
1478 |
+
}
|
1479 |
+
|
1480 |
+
echo json_encode(array('result' => true));
|
1481 |
+
wp_die();
|
1482 |
+
}
|
1483 |
+
}
|
1484 |
+
echo json_encode(array('result' => false));
|
1485 |
+
wp_die();
|
1486 |
+
}
|
1487 |
+
|
1488 |
+
public function deleteDraft() {
|
1489 |
+
if (isset($_POST['draftId']) && (int) $_POST['draftId'] > 0) {
|
1490 |
+
global $wpdb;
|
1491 |
+
$wpdb->delete('b2s_posts_drafts', array('id' => (int) $_POST['draftId'], 'blog_user_id' => B2S_PLUGIN_BLOG_USER_ID), array('%d', '%d'));
|
1492 |
+
echo json_encode(array('result' => true));
|
1493 |
+
wp_die();
|
1494 |
+
}
|
1495 |
+
echo json_encode(array('result' => false));
|
1496 |
+
wp_die();
|
1497 |
+
}
|
1498 |
+
|
1499 |
}
|
includes/B2S/AutoPost.php
CHANGED
@@ -1,279 +1,277 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class B2S_AutoPost {
|
4 |
-
|
5 |
-
private $title;
|
6 |
-
private $contentHtml;
|
7 |
-
private $postId;
|
8 |
-
private $content;
|
9 |
-
private $excerpt;
|
10 |
-
private $url;
|
11 |
-
private $imageUrl;
|
12 |
-
private $keywords;
|
13 |
-
private $blogPostData = array();
|
14 |
-
private $myTimeSettings = array();
|
15 |
-
private $current_user_date;
|
16 |
-
private $setPreFillText;
|
17 |
-
private $optionPostFormat;
|
18 |
-
private $allowHashTag;
|
19 |
-
|
20 |
-
function __construct($postId = 0, $blogPostData = array(), $current_user_date = '0000-00-00 00:00:00', $myTimeSettings = false, $title = '', $content = '', $excerpt = '', $url = '', $imageUrl = '', $keywords = '', $b2sPostLang = 'en', $optionPostFormat = array(), $allowHashTag = true) {
|
21 |
-
$this->postId = $postId;
|
22 |
-
$this->blogPostData = $blogPostData;
|
23 |
-
$this->current_user_date = $current_user_date;
|
24 |
-
$this->myTimeSettings = $myTimeSettings;
|
25 |
-
$this->title = $title;
|
26 |
-
$this->content = B2S_Util::prepareContent($postId, $content, $url, false, true, $b2sPostLang);
|
27 |
-
$this->excerpt = B2S_Util::prepareContent($postId, $excerpt, $url, false, true, $b2sPostLang);
|
28 |
-
$this->contentHtml = B2S_Util::prepareContent($postId, $content, $url, '<p><h1><h2><br><i><b><a><img>', true, $b2sPostLang);
|
29 |
-
$this->url = $url;
|
30 |
-
$this->imageUrl = $imageUrl;
|
31 |
-
$this->keywords = $keywords;
|
32 |
-
$this->optionPostFormat = $optionPostFormat;
|
33 |
-
$this->allowHashTag = $allowHashTag;
|
34 |
-
$this->setPreFillText = array(0 => array(6 => 300, 8 => 239, 9 => 200, 10 => 442, 16 => 250, 17 => 442, 18 => 800
|
35 |
-
$this->setPreFillTextLimit = array(0 => array(6 => 400, 8 => 400, 9 => 200, 10 => 500, 18 => 1000,
|
36 |
-
}
|
37 |
-
|
38 |
-
public function prepareShareData($networkAuthId = 0, $networkId = 0, $networkType = 0) {
|
39 |
-
if ((int) $networkId > 0 && (int) $networkAuthId > 0) {
|
40 |
-
$postData = array('content' => '', 'custom_title' => '', 'tags' => array(), 'network_auth_id' => (int) $networkAuthId);
|
41 |
-
|
42 |
-
if (B2S_PLUGIN_USER_VERSION < 1 || $this->optionPostFormat == false || !isset($this->optionPostFormat[$networkId][$networkType])) {
|
43 |
-
$this->optionPostFormat = unserialize(B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT);
|
44 |
-
}
|
45 |
-
|
46 |
-
//V5.6.1
|
47 |
-
if (!isset($this->optionPostFormat[$networkId][$networkType]['short_text']['excerpt_range_max'])) {
|
48 |
-
$defaultSchema = unserialize(B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT);
|
49 |
-
$this->optionPostFormat[$networkId][$networkType]['short_text']['excerpt_range_max'] = $defaultSchema[$networkId][$networkType]['short_text']['excerpt_range_max'];
|
50 |
-
}
|
51 |
-
if (!isset($this->optionPostFormat[$networkId][$networkType]['short_text']['excerpt_range_min'])) {
|
52 |
-
$defaultSchema = unserialize(B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT);
|
53 |
-
$this->optionPostFormat[$networkId][$networkType]['short_text']['excerpt_range_min'] = $defaultSchema[$networkId][$networkType]['short_text']['excerpt_range_min'];
|
54 |
-
}
|
55 |
-
|
56 |
-
//PostFormat
|
57 |
-
if (in_array($networkId, array(1, 2, 3, 12))) {
|
58 |
-
//Get: client settings
|
59 |
-
if (isset($this->optionPostFormat[$networkId][$networkType]['format']) && ((int) $this->optionPostFormat[$networkId][$networkType]['format'] === 0 || (int) $this->optionPostFormat[$networkId][$networkType]['format'] === 1)) {
|
60 |
-
$postData['post_format'] = (int) $this->optionPostFormat[$networkId][$networkType]['format'];
|
61 |
-
} else {
|
62 |
-
//Set: default settings
|
63 |
-
$defaultPostFormat = unserialize(B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT);
|
64 |
-
$postData['post_format'] = isset($defaultPostFormat[$networkId][$networkType]['format']) ? (int) $defaultPostFormat[$networkId][$networkType]['format'] : 0;
|
65 |
-
}
|
66 |
-
}
|
67 |
-
//Special
|
68 |
-
if (in_array($networkId, array(1, 2, 3, 12))) {
|
69 |
-
if ($networkId == 12 && $this->imageUrl == false) {
|
70 |
-
return false;
|
71 |
-
}
|
72 |
-
$postData['content'] = $this->optionPostFormat[$networkId][$networkType]['content'];
|
73 |
-
|
74 |
-
$preContent = addcslashes(B2S_Util::getExcerpt($this->content, (int) $this->optionPostFormat[$networkId][$networkType]['short_text']['range_min'], (int) $this->optionPostFormat[$networkId][$networkType]['short_text']['range_max']),"\\$");
|
75 |
-
$postData['content'] = preg_replace("/\{CONTENT\}/", $preContent, $postData['content']);
|
76 |
-
|
77 |
-
$title = strip_tags($this->title);
|
78 |
-
$postData['content'] = preg_replace("/\{TITLE\}/", addcslashes($title,"\\$"), $postData['content']);
|
79 |
-
|
80 |
-
$excerpt = (isset($this->excerpt) && !empty($this->excerpt)) ? addcslashes(B2S_Util::getExcerpt($this->excerpt, (int) $this->optionPostFormat[$networkId][$networkType]['short_text']['excerpt_range_min'], (int) $this->optionPostFormat[$networkId][$networkType]['short_text']['excerpt_range_max']),"\\$") : '';
|
81 |
-
$postData['content'] = preg_replace("/\{EXCERPT\}/", $excerpt, $postData['content']);
|
82 |
-
|
83 |
-
if (strpos($postData['content'], "{KEYWORDS}") !== false) {
|
84 |
-
$hashtags = $this->getHashTagsString("");
|
85 |
-
$postData['content'] = preg_replace("/\{KEYWORDS\}/", addcslashes($hashtags,"\\$"), $postData['content']);
|
86 |
-
} else if ($this->allowHashTag
|
87 |
-
$add = ($networkId != 2) ? "\n\n" : "";
|
88 |
-
$hashtags = $this->getHashTagsString($add);
|
89 |
-
$postData['content'] .= " " . $hashtags;
|
90 |
-
}
|
91 |
-
}
|
92 |
-
|
93 |
-
if ($networkId == 4) {
|
94 |
-
$postData['custom_title'] = strip_tags($this->title);
|
95 |
-
$postData['content'] = $this->contentHtml;
|
96 |
-
if ($this->allowHashTag) {
|
97 |
-
if (is_array($this->keywords) && !empty($this->keywords)) {
|
98 |
-
foreach ($this->keywords as $tag) {
|
99 |
-
$postData['tags'][] = str_replace(" ", "", $tag->name);
|
100 |
-
}
|
101 |
-
}
|
102 |
-
}
|
103 |
-
}
|
104 |
-
|
105 |
-
if ($networkId == 6 || $networkId == 20) {
|
106 |
-
if ($this->imageUrl !== false) {
|
107 |
-
$postData['content'] = (isset($this->setPreFillText[$networkType][$networkId])) ? B2S_Util::getExcerpt($this->content, (int) $this->setPreFillText[$networkType][$networkId], (int) $this->setPreFillTextLimit[$networkType][$networkId]) : $this->content;
|
108 |
-
if ($this->allowHashTag) {
|
109 |
-
$postData['content'] .= $this->getHashTagsString();
|
110 |
-
}
|
111 |
-
} else {
|
112 |
-
return false;
|
113 |
-
}
|
114 |
-
}
|
115 |
-
|
116 |
-
if ($networkId == 7) {
|
117 |
-
if ($this->imageUrl !== false) {
|
118 |
-
$postData['custom_title'] = strip_tags($this->title);
|
119 |
-
} else {
|
120 |
-
return false;
|
121 |
-
}
|
122 |
-
}
|
123 |
-
if ($networkId == 8
|
124 |
-
$postData['content'] = (isset($this->setPreFillText[$networkType][$networkId])) ? B2S_Util::getExcerpt($this->content, (int) $this->setPreFillText[$networkType][$networkId], (int) $this->setPreFillTextLimit[$networkType][$networkId]) : $this->content;
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
$
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
//
|
190 |
-
//
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
$
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
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 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
'
|
254 |
-
'
|
255 |
-
'
|
256 |
-
'
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
$wpdb->insert('
|
261 |
-
|
262 |
-
|
263 |
-
'
|
264 |
-
'
|
265 |
-
'
|
266 |
-
'
|
267 |
-
'
|
268 |
-
'
|
269 |
-
'
|
270 |
-
'
|
271 |
-
'
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class B2S_AutoPost {
|
4 |
+
|
5 |
+
private $title;
|
6 |
+
private $contentHtml;
|
7 |
+
private $postId;
|
8 |
+
private $content;
|
9 |
+
private $excerpt;
|
10 |
+
private $url;
|
11 |
+
private $imageUrl;
|
12 |
+
private $keywords;
|
13 |
+
private $blogPostData = array();
|
14 |
+
private $myTimeSettings = array();
|
15 |
+
private $current_user_date;
|
16 |
+
private $setPreFillText;
|
17 |
+
private $optionPostFormat;
|
18 |
+
private $allowHashTag;
|
19 |
+
|
20 |
+
function __construct($postId = 0, $blogPostData = array(), $current_user_date = '0000-00-00 00:00:00', $myTimeSettings = false, $title = '', $content = '', $excerpt = '', $url = '', $imageUrl = '', $keywords = '', $b2sPostLang = 'en', $optionPostFormat = array(), $allowHashTag = true) {
|
21 |
+
$this->postId = $postId;
|
22 |
+
$this->blogPostData = $blogPostData;
|
23 |
+
$this->current_user_date = $current_user_date;
|
24 |
+
$this->myTimeSettings = $myTimeSettings;
|
25 |
+
$this->title = $title;
|
26 |
+
$this->content = B2S_Util::prepareContent($postId, $content, $url, false, true, $b2sPostLang);
|
27 |
+
$this->excerpt = B2S_Util::prepareContent($postId, $excerpt, $url, false, true, $b2sPostLang);
|
28 |
+
$this->contentHtml = B2S_Util::prepareContent($postId, $content, $url, '<p><h1><h2><br><i><b><a><img>', true, $b2sPostLang);
|
29 |
+
$this->url = $url;
|
30 |
+
$this->imageUrl = $imageUrl;
|
31 |
+
$this->keywords = $keywords;
|
32 |
+
$this->optionPostFormat = $optionPostFormat;
|
33 |
+
$this->allowHashTag = $allowHashTag;
|
34 |
+
$this->setPreFillText = array(0 => array(6 => 300, 8 => 239, 9 => 200, 10 => 442, 16 => 250, 17 => 442, 18 => 800), 1 => array(8 => 1200, 10 => 442, 17 => 442, 19 => 239), 2 => array(8 => 239, 10 => 442, 17 => 442, 19 => 239), 20 => 300);
|
35 |
+
$this->setPreFillTextLimit = array(0 => array(6 => 400, 8 => 400, 9 => 200, 10 => 500, 18 => 1000, 20 => 400), 1 => array(8 => 1200, 10 => 500, 19 => 400), 2 => array(8 => 400, 10 => 500, 19 => 9000));
|
36 |
+
}
|
37 |
+
|
38 |
+
public function prepareShareData($networkAuthId = 0, $networkId = 0, $networkType = 0) {
|
39 |
+
if ((int) $networkId > 0 && (int) $networkAuthId > 0) {
|
40 |
+
$postData = array('content' => '', 'custom_title' => '', 'tags' => array(), 'network_auth_id' => (int) $networkAuthId);
|
41 |
+
|
42 |
+
if (B2S_PLUGIN_USER_VERSION < 1 || $this->optionPostFormat == false || !isset($this->optionPostFormat[$networkId][$networkType])) {
|
43 |
+
$this->optionPostFormat = unserialize(B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT);
|
44 |
+
}
|
45 |
+
|
46 |
+
//V5.6.1
|
47 |
+
if (!isset($this->optionPostFormat[$networkId][$networkType]['short_text']['excerpt_range_max'])) {
|
48 |
+
$defaultSchema = unserialize(B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT);
|
49 |
+
$this->optionPostFormat[$networkId][$networkType]['short_text']['excerpt_range_max'] = $defaultSchema[$networkId][$networkType]['short_text']['excerpt_range_max'];
|
50 |
+
}
|
51 |
+
if (!isset($this->optionPostFormat[$networkId][$networkType]['short_text']['excerpt_range_min'])) {
|
52 |
+
$defaultSchema = unserialize(B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT);
|
53 |
+
$this->optionPostFormat[$networkId][$networkType]['short_text']['excerpt_range_min'] = $defaultSchema[$networkId][$networkType]['short_text']['excerpt_range_min'];
|
54 |
+
}
|
55 |
+
|
56 |
+
//PostFormat
|
57 |
+
if (in_array($networkId, array(1, 2, 3, 12)) || ($networkId == 19 && $networkType == 0)) {
|
58 |
+
//Get: client settings
|
59 |
+
if (isset($this->optionPostFormat[$networkId][$networkType]['format']) && ((int) $this->optionPostFormat[$networkId][$networkType]['format'] === 0 || (int) $this->optionPostFormat[$networkId][$networkType]['format'] === 1)) {
|
60 |
+
$postData['post_format'] = (int) $this->optionPostFormat[$networkId][$networkType]['format'];
|
61 |
+
} else {
|
62 |
+
//Set: default settings
|
63 |
+
$defaultPostFormat = unserialize(B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT);
|
64 |
+
$postData['post_format'] = isset($defaultPostFormat[$networkId][$networkType]['format']) ? (int) $defaultPostFormat[$networkId][$networkType]['format'] : 0;
|
65 |
+
}
|
66 |
+
}
|
67 |
+
//Special
|
68 |
+
if (in_array($networkId, array(1, 2, 3, 12)) || ($networkId == 19 && $networkType == 0)) {
|
69 |
+
if ($networkId == 12 && $this->imageUrl == false) {
|
70 |
+
return false;
|
71 |
+
}
|
72 |
+
$postData['content'] = $this->optionPostFormat[$networkId][$networkType]['content'];
|
73 |
+
|
74 |
+
$preContent = addcslashes(B2S_Util::getExcerpt($this->content, (int) $this->optionPostFormat[$networkId][$networkType]['short_text']['range_min'], (int) $this->optionPostFormat[$networkId][$networkType]['short_text']['range_max']),"\\$");
|
75 |
+
$postData['content'] = preg_replace("/\{CONTENT\}/", $preContent, $postData['content']);
|
76 |
+
|
77 |
+
$title = strip_tags($this->title);
|
78 |
+
$postData['content'] = preg_replace("/\{TITLE\}/", addcslashes($title,"\\$"), $postData['content']);
|
79 |
+
|
80 |
+
$excerpt = (isset($this->excerpt) && !empty($this->excerpt)) ? addcslashes(B2S_Util::getExcerpt($this->excerpt, (int) $this->optionPostFormat[$networkId][$networkType]['short_text']['excerpt_range_min'], (int) $this->optionPostFormat[$networkId][$networkType]['short_text']['excerpt_range_max']),"\\$") : '';
|
81 |
+
$postData['content'] = preg_replace("/\{EXCERPT\}/", $excerpt, $postData['content']);
|
82 |
+
|
83 |
+
if (strpos($postData['content'], "{KEYWORDS}") !== false) {
|
84 |
+
$hashtags = $this->getHashTagsString("");
|
85 |
+
$postData['content'] = preg_replace("/\{KEYWORDS\}/", addcslashes($hashtags,"\\$"), $postData['content']);
|
86 |
+
} else if ($this->allowHashTag) {
|
87 |
+
$add = ($networkId != 2) ? "\n\n" : "";
|
88 |
+
$hashtags = $this->getHashTagsString($add);
|
89 |
+
$postData['content'] .= " " . $hashtags;
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
if ($networkId == 4) {
|
94 |
+
$postData['custom_title'] = strip_tags($this->title);
|
95 |
+
$postData['content'] = $this->contentHtml;
|
96 |
+
if ($this->allowHashTag) {
|
97 |
+
if (is_array($this->keywords) && !empty($this->keywords)) {
|
98 |
+
foreach ($this->keywords as $tag) {
|
99 |
+
$postData['tags'][] = str_replace(" ", "", $tag->name);
|
100 |
+
}
|
101 |
+
}
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
if ($networkId == 6 || $networkId == 20) {
|
106 |
+
if ($this->imageUrl !== false) {
|
107 |
+
$postData['content'] = (isset($this->setPreFillText[$networkType][$networkId])) ? B2S_Util::getExcerpt($this->content, (int) $this->setPreFillText[$networkType][$networkId], (int) $this->setPreFillTextLimit[$networkType][$networkId]) : $this->content;
|
108 |
+
if ($this->allowHashTag) {
|
109 |
+
$postData['content'] .= $this->getHashTagsString();
|
110 |
+
}
|
111 |
+
} else {
|
112 |
+
return false;
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
if ($networkId == 7) {
|
117 |
+
if ($this->imageUrl !== false) {
|
118 |
+
$postData['custom_title'] = strip_tags($this->title);
|
119 |
+
} else {
|
120 |
+
return false;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
if ($networkId == 8 || ($networkId == 19 && $networkType != 0)) {
|
124 |
+
$postData['content'] = (isset($this->setPreFillText[$networkType][$networkId])) ? B2S_Util::getExcerpt($this->content, (int) $this->setPreFillText[$networkType][$networkId], (int) $this->setPreFillTextLimit[$networkType][$networkId]) : $this->content;
|
125 |
+
$postData['custom_title'] = strip_tags($this->title);
|
126 |
+
}
|
127 |
+
if ($networkId == 9 || $networkId == 16) {
|
128 |
+
$postData['custom_title'] = $this->title;
|
129 |
+
$postData['content'] = (isset($this->setPreFillText[$networkType][$networkId])) ? B2S_Util::getExcerpt($this->content, (int) $this->setPreFillText[$networkType][$networkId], (int) $this->setPreFillTextLimit[$networkType][$networkId]) : $this->content;
|
130 |
+
if ($this->allowHashTag) {
|
131 |
+
if (is_array($this->keywords) && !empty($this->keywords)) {
|
132 |
+
foreach ($this->keywords as $tag) {
|
133 |
+
$postData['tags'][] = str_replace(" ", "", $tag->name);
|
134 |
+
}
|
135 |
+
}
|
136 |
+
}
|
137 |
+
}
|
138 |
+
|
139 |
+
if ($networkId == 10 || $networkId == 17 || $networkId == 18) {
|
140 |
+
$postData['content'] = (isset($this->setPreFillText[$networkType][$networkId])) ? B2S_Util::getExcerpt($this->content, (int) $this->setPreFillText[$networkType][$networkId], (isset($this->setPreFillTextLimit[$networkType][$networkId]) ? (int) $this->setPreFillTextLimit[$networkType][$networkId] : false)) : $this->content;
|
141 |
+
if ($this->allowHashTag) {
|
142 |
+
$postData['content'] .= $this->getHashTagsString();
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
if ($networkId == 11 || $networkId == 14) {
|
147 |
+
$postData['custom_title'] = strip_tags($this->title);
|
148 |
+
$postData['content'] = $this->contentHtml;
|
149 |
+
}
|
150 |
+
|
151 |
+
if ($networkId == 11) {
|
152 |
+
if ($this->allowHashTag) {
|
153 |
+
if (is_array($this->keywords) && !empty($this->keywords)) {
|
154 |
+
foreach ($this->keywords as $tag) {
|
155 |
+
$postData['tags'][] = str_replace(" ", "", $tag->name);
|
156 |
+
}
|
157 |
+
}
|
158 |
+
}
|
159 |
+
}
|
160 |
+
|
161 |
+
if ($networkId == 13 || $networkId == 15) {
|
162 |
+
$postData['content'] = strip_tags($this->title);
|
163 |
+
}
|
164 |
+
return $postData;
|
165 |
+
}
|
166 |
+
return false;
|
167 |
+
}
|
168 |
+
|
169 |
+
private function getHashTagsString($add = "\n\n") {
|
170 |
+
$hashTags = '';
|
171 |
+
if (is_array($this->keywords) && !empty($this->keywords)) {
|
172 |
+
foreach ($this->keywords as $tag) {
|
173 |
+
$hashTags .= ' #' . str_replace(array(" ", "-", '"', "'", "!", "?", ",", ".", ";", ":"), "", $tag->name);
|
174 |
+
}
|
175 |
+
}
|
176 |
+
return (!empty($hashTags) ? (!empty($add) ? $add . $hashTags : $hashTags) : '');
|
177 |
+
}
|
178 |
+
|
179 |
+
public function saveShareData($shareData = array(), $network_id = 0, $network_type = 0, $network_auth_id = 0, $shareApprove = 0, $network_display_name = '') {
|
180 |
+
|
181 |
+
$sched_type = $this->blogPostData['sched_type'];
|
182 |
+
$sched_date = $this->blogPostData['sched_date'];
|
183 |
+
$sched_date_utc = $this->blogPostData['sched_date_utc'];
|
184 |
+
|
185 |
+
//Scheduling post once with user times
|
186 |
+
if ($sched_type == 2 && $this->myTimeSettings !== false && is_array($this->myTimeSettings) && isset($this->myTimeSettings['times']) && is_array($this->myTimeSettings['times']) && isset($this->myTimeSettings['type'])) {
|
187 |
+
//V 5.1.0 Seeding
|
188 |
+
//0=default(best time), 1= special per account (seeding), 2= per network (old)
|
189 |
+
//Check My Time Setting in Past
|
190 |
+
//new
|
191 |
+
if ($this->myTimeSettings['type'] == 1) {
|
192 |
+
if (isset($this->myTimeSettings['times']['delay_day'][$network_auth_id]) && isset($this->myTimeSettings['times']['time'][$network_auth_id]) && !empty($this->myTimeSettings['times']['time'][$network_auth_id])) {
|
193 |
+
$tempSchedDate = date('Y-m-d', strtotime($sched_date));
|
194 |
+
$networkSchedDate = date('Y-m-d H:i:00', strtotime($tempSchedDate . ' ' . $this->myTimeSettings['times']['time'][$network_auth_id]));
|
195 |
+
if ($this->myTimeSettings['times']['delay_day'][$network_auth_id] > 0) {
|
196 |
+
$sched_date = date('Y-m-d H:i:s', strtotime('+' . $this->myTimeSettings['times']['delay_day'][$network_auth_id] . ' days', strtotime($networkSchedDate)));
|
197 |
+
$sched_date_utc = date('Y-m-d H:i:s', strtotime(B2S_Util::getUTCForDate($sched_date, $this->blogPostData['user_timezone'] * (-1))));
|
198 |
+
} else {
|
199 |
+
if ($networkSchedDate >= $sched_date) {
|
200 |
+
//Scheduling
|
201 |
+
$sched_date = $networkSchedDate;
|
202 |
+
$sched_date_utc = date('Y-m-d H:i:s', strtotime(B2S_Util::getUTCForDate($sched_date, $this->blogPostData['user_timezone'] * (-1))));
|
203 |
+
} else {
|
204 |
+
//Scheduling on next Day by Past
|
205 |
+
$sched_date = date('Y-m-d H:i:s', strtotime('+1 days', strtotime($networkSchedDate)));
|
206 |
+
$sched_date_utc = date('Y-m-d H:i:s', strtotime(B2S_Util::getUTCForDate($sched_date, $this->blogPostData['user_timezone'] * (-1))));
|
207 |
+
}
|
208 |
+
}
|
209 |
+
}
|
210 |
+
//old or default (best time)
|
211 |
+
} else {
|
212 |
+
foreach ($this->myTimeSettings['times'] as $k => $v) {
|
213 |
+
if ($v->network_id == $network_id && $v->network_type == $network_type) {
|
214 |
+
if (isset($v->sched_time) && !empty($v->sched_time)) {
|
215 |
+
$tempSchedDate = date('Y-m-d', strtotime($sched_date));
|
216 |
+
$networkSchedDate = date('Y-m-d H:i:00', strtotime($tempSchedDate . ' ' . $v->sched_time));
|
217 |
+
if ($networkSchedDate >= $sched_date) {
|
218 |
+
//Scheduling
|
219 |
+
$sched_date = $networkSchedDate;
|
220 |
+
$sched_date_utc = date('Y-m-d H:i:s', strtotime(B2S_Util::getUTCForDate($sched_date, $this->blogPostData['user_timezone'] * (-1))));
|
221 |
+
} else {
|
222 |
+
//Scheduling on next Day by Past
|
223 |
+
$sched_date = date('Y-m-d H:i:s', strtotime('+1 days', strtotime($networkSchedDate)));
|
224 |
+
$sched_date_utc = date('Y-m-d H:i:s', strtotime(B2S_Util::getUTCForDate($sched_date, $this->blogPostData['user_timezone'] * (-1))));
|
225 |
+
}
|
226 |
+
}
|
227 |
+
}
|
228 |
+
}
|
229 |
+
}
|
230 |
+
}
|
231 |
+
|
232 |
+
global $wpdb;
|
233 |
+
$networkDetailsId = 0;
|
234 |
+
$schedDetailsId = 0;
|
235 |
+
$networkDetailsIdSelect = $wpdb->get_col($wpdb->prepare("SELECT postNetworkDetails.id FROM b2s_posts_network_details AS postNetworkDetails WHERE postNetworkDetails.network_auth_id = %s", $network_auth_id));
|
236 |
+
if (isset($networkDetailsIdSelect[0])) {
|
237 |
+
$networkDetailsId = (int) $networkDetailsIdSelect[0];
|
238 |
+
} else {
|
239 |
+
$wpdb->insert('b2s_posts_network_details', array(
|
240 |
+
'network_id' => (int) $network_id,
|
241 |
+
'network_type' => (int) $network_type,
|
242 |
+
'network_auth_id' => (int) $network_auth_id,
|
243 |
+
'network_display_name' => $network_display_name), array('%d', '%d', '%d', '%s'));
|
244 |
+
$networkDetailsId = $wpdb->insert_id;
|
245 |
+
}
|
246 |
+
|
247 |
+
if ($networkDetailsId > 0) {
|
248 |
+
//DeprecatedNetwork-8 31 march
|
249 |
+
if ($network_id == 8 && $sched_date_utc >= '2019-03-30 23:59:59') {
|
250 |
+
$wpdb->insert('b2s_posts', array(
|
251 |
+
'post_id' => $this->postId,
|
252 |
+
'blog_user_id' => $this->blogPostData['blog_user_id'],
|
253 |
+
'user_timezone' => $this->blogPostData['user_timezone'],
|
254 |
+
'publish_date' => date('Y-m-d H:i:s', strtotime(B2S_Util::getUTCForDate(gmdate('Y-m-d H:i:s'), $this->blogPostData['user_timezone'] * (-1)))),
|
255 |
+
'publish_error_code' => 'DEPRECATED_NETWORK_8',
|
256 |
+
'network_details_id' => $networkDetailsId), array('%d', '%d', '%s', '%s', '%s', '%d'));
|
257 |
+
} else {
|
258 |
+
$wpdb->insert('b2s_posts_sched_details', array('sched_data' => serialize($shareData), 'image_url' => (isset($shareData['image_url']) ? $shareData['image_url'] : '')), array('%s', '%s'));
|
259 |
+
$schedDetailsId = $wpdb->insert_id;
|
260 |
+
$wpdb->insert('b2s_posts', array(
|
261 |
+
'post_id' => $this->postId,
|
262 |
+
'blog_user_id' => $this->blogPostData['blog_user_id'],
|
263 |
+
'user_timezone' => $this->blogPostData['user_timezone'],
|
264 |
+
'publish_date' => (($sched_type == 3) ? $sched_date : "0000-00-00 00:00:00"),
|
265 |
+
'sched_details_id' => $schedDetailsId,
|
266 |
+
'sched_type' => $sched_type,
|
267 |
+
'sched_date' => $sched_date,
|
268 |
+
'sched_date_utc' => $sched_date_utc,
|
269 |
+
'network_details_id' => $networkDetailsId,
|
270 |
+
'post_for_approve' => (int) $shareApprove,
|
271 |
+
'hook_action' => (((int) $shareApprove == 0) ? 1 : 0)), array('%d', '%d', '%s', '%s', '%d', '%d', '%s', '%s', '%d', '%d', '%d'));
|
272 |
+
B2S_Rating::trigger();
|
273 |
+
}
|
274 |
+
}
|
275 |
+
}
|
276 |
+
|
277 |
+
}
|
|
|
|
includes/B2S/Calendar/Item.php
CHANGED
@@ -51,7 +51,7 @@ class B2S_Calendar_Item {
|
|
51 |
->setPostForApprove($data->post_for_approve)
|
52 |
->setPublishLink($data->publish_link);
|
53 |
|
54 |
-
if ($data->network_id == 1 || $data->network_id == 2 || $data->network_id == 3) {
|
55 |
$this->setPostFormat();
|
56 |
}
|
57 |
if ($data->network_id == 2 && isset($data->relay_primary_sched_date)) {
|
51 |
->setPostForApprove($data->post_for_approve)
|
52 |
->setPublishLink($data->publish_link);
|
53 |
|
54 |
+
if ($data->network_id == 1 || $data->network_id == 2 || $data->network_id == 3 || ($data->network_id == 19 && $data->network_type == 0)) {
|
55 |
$this->setPostFormat();
|
56 |
}
|
57 |
if ($data->network_id == 2 && isset($data->relay_primary_sched_date)) {
|
includes/B2S/Curation/View.php
CHANGED
@@ -67,7 +67,7 @@ class B2S_Curation_View {
|
|
67 |
$content .='<input type = "text" placeholder = "' . __('Date', 'blog2social') . '" name = "ship_date" id="b2s-post-curation-ship-date" class = "b2s-post-curation-ship-date form-control b2s-input" disabled = "disabled" readonly data-timepicker="true" data-language="' . substr(B2S_LANGUAGE, 0, 2) . '" data-time-format="' . $timeFormat . '" data-date-format="' . $dateFormat . '">';
|
68 |
$content .='</div>';
|
69 |
$content .='<div class="col-xs-12 col-sm-5 col-lg-3">';
|
70 |
-
$content .='<label for="b2s-curation-profile-select">' . __('Select
|
71 |
$content .='<select style="width:100%;" id="b2s-post-curation-profile-select" class="b2s-select" name="profile_select">';
|
72 |
foreach ($mandant as $k => $m) {
|
73 |
$content .= '<option value="' . $m->id . '">' . $m->name . '</option>';
|
67 |
$content .='<input type = "text" placeholder = "' . __('Date', 'blog2social') . '" name = "ship_date" id="b2s-post-curation-ship-date" class = "b2s-post-curation-ship-date form-control b2s-input" disabled = "disabled" readonly data-timepicker="true" data-language="' . substr(B2S_LANGUAGE, 0, 2) . '" data-time-format="' . $timeFormat . '" data-date-format="' . $dateFormat . '">';
|
68 |
$content .='</div>';
|
69 |
$content .='<div class="col-xs-12 col-sm-5 col-lg-3">';
|
70 |
+
$content .='<label for="b2s-curation-profile-select">' . __('Select network collection:', 'blog2social') . '</label>';
|
71 |
$content .='<select style="width:100%;" id="b2s-post-curation-profile-select" class="b2s-select" name="profile_select">';
|
72 |
foreach ($mandant as $k => $m) {
|
73 |
$content .= '<option value="' . $m->id . '">' . $m->name . '</option>';
|
includes/B2S/Network/Item.php
CHANGED
@@ -155,7 +155,7 @@ class B2S_Network_Item {
|
|
155 |
$html .= (B2S_PLUGIN_USER_VERSION > 1 || (B2S_PLUGIN_USER_VERSION == 1 && $networkId != 8)) ? '<button onclick="wop(\'' . $b2sAuthUrl . '&choose=group\', \'Blog2Social Network\'); return false;" class="btn btn-primary btn-sm b2s-network-auth-btn">+ ' . $name . '</button>' : '<a href="#" class="btn btn-primary btn-sm b2s-network-auth-btn b2s-btn-disabled" data-toggle="modal" data-title="' . __('You want to connect a social media group?', 'blog2social') . '" data-type="auth-network" data-target="#' . ((B2S_PLUGIN_USER_VERSION == 0) ? 'b2sPreFeatureModal' : 'b2sProFeatureModal') . '">+ ' . $name . ' <span class="label label-success">' . __("PREMIUM", "blog2social") . '</span></a>';
|
156 |
}
|
157 |
if (array_key_exists($networkId, unserialize(B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT))) {
|
158 |
-
$html .= (B2S_PLUGIN_USER_VERSION >= 1) ? '<button onclick="return false;" class="btn btn-primary btn-sm b2s-network-auth-btn b2s-edit-template-btn" data-network-id="' . $networkId . '"><i class="glyphicon glyphicon-pencil"></i> ' . __('Edit Post Format', 'blog2social') . '</button>' : '<button onclick="return false;" class="btn btn-primary btn-sm b2s-network-auth-btn b2s-edit-template-btn b2s-btn-disabled" data-network-id="' . $networkId . '"><i class="glyphicon glyphicon-pencil"></i> ' . __('Edit Post
|
159 |
}
|
160 |
|
161 |
$html .= '</span></h4>';
|
@@ -517,7 +517,7 @@ class B2S_Network_Item {
|
|
517 |
}
|
518 |
$html .= '<div class="row">';
|
519 |
$html .= '<div class="col-sm-12">';
|
520 |
-
if (count($schema) > 1) {
|
521 |
$html .= '<div class="pull-left ' . ((B2S_PLUGIN_USER_VERSION < 1) ? 'b2s-btn-disabled' : '') . '">';
|
522 |
$html .= '<ul class="nav nav-pills">';
|
523 |
$html .= '<li class="active"><a href="#b2s-template-profile" class="b2s-template-profile" data-toggle="tab">' . __('Profile', 'blog2social') . '</a></li>';
|
@@ -849,6 +849,57 @@ class B2S_Network_Item {
|
|
849 |
$preview .= '</div>';
|
850 |
$preview .= '</div>';
|
851 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
852 |
default:
|
853 |
break;
|
854 |
}
|
155 |
$html .= (B2S_PLUGIN_USER_VERSION > 1 || (B2S_PLUGIN_USER_VERSION == 1 && $networkId != 8)) ? '<button onclick="wop(\'' . $b2sAuthUrl . '&choose=group\', \'Blog2Social Network\'); return false;" class="btn btn-primary btn-sm b2s-network-auth-btn">+ ' . $name . '</button>' : '<a href="#" class="btn btn-primary btn-sm b2s-network-auth-btn b2s-btn-disabled" data-toggle="modal" data-title="' . __('You want to connect a social media group?', 'blog2social') . '" data-type="auth-network" data-target="#' . ((B2S_PLUGIN_USER_VERSION == 0) ? 'b2sPreFeatureModal' : 'b2sProFeatureModal') . '">+ ' . $name . ' <span class="label label-success">' . __("PREMIUM", "blog2social") . '</span></a>';
|
156 |
}
|
157 |
if (array_key_exists($networkId, unserialize(B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT))) {
|
158 |
+
$html .= (B2S_PLUGIN_USER_VERSION >= 1) ? '<button onclick="return false;" class="btn btn-primary btn-sm b2s-network-auth-btn b2s-edit-template-btn" data-network-id="' . $networkId . '"><i class="glyphicon glyphicon-pencil"></i> ' . __('Edit Post Format', 'blog2social') . '</button>' : '<button onclick="return false;" class="btn btn-primary btn-sm b2s-network-auth-btn b2s-edit-template-btn b2s-btn-disabled" data-network-id="' . $networkId . '"><i class="glyphicon glyphicon-pencil"></i> ' . __('Edit Post Template', 'blog2social') . ' <span class="label label-success">' . __("PREMIUM", "blog2social") . '</span></button>';
|
159 |
}
|
160 |
|
161 |
$html .= '</span></h4>';
|
517 |
}
|
518 |
$html .= '<div class="row">';
|
519 |
$html .= '<div class="col-sm-12">';
|
520 |
+
if (count($schema) > 1 || $networkId == 19) {
|
521 |
$html .= '<div class="pull-left ' . ((B2S_PLUGIN_USER_VERSION < 1) ? 'b2s-btn-disabled' : '') . '">';
|
522 |
$html .= '<ul class="nav nav-pills">';
|
523 |
$html .= '<li class="active"><a href="#b2s-template-profile" class="b2s-template-profile" data-toggle="tab">' . __('Profile', 'blog2social') . '</a></li>';
|
849 |
$preview .= '</div>';
|
850 |
$preview .= '</div>';
|
851 |
break;
|
852 |
+
case '19':
|
853 |
+
$preview .= '<div class="row">';
|
854 |
+
$preview .= '<div class="col-sm-2">';
|
855 |
+
$preview .= '<span class="b2s-edit-template-section-headline">' . __('Preview', 'blog2social') . ':</span>';
|
856 |
+
$preview .= '</div>';
|
857 |
+
$preview .= '<div class="col-sm-8 b2s-edit-template-preview-border b2s-edit-template-preview-border-19">';
|
858 |
+
$preview .= '<div class="row">';
|
859 |
+
$preview .= '<div class="col-sm-2">';
|
860 |
+
$preview .= '<img class="b2s-edit-template-preview-profile-img-19" src="' . plugins_url('/assets/images/b2s@64.png', B2S_PLUGIN_FILE) . '">';
|
861 |
+
$preview .= '</div>';
|
862 |
+
$preview .= '<div class="col-sm-10">';
|
863 |
+
$preview .= '<span class="b2s-edit-template-preview-profile-name-19">Blog2Social</span>';
|
864 |
+
$preview .= '</div>';
|
865 |
+
$preview .= '</div>';
|
866 |
+
$preview .= '<div class="b2s-edit-template-link-preview" data-network-type="' . $networkType . '" ' . (((int) $schema[$networkType]['format'] == 0) ? '' : 'style="display: none;"') . '>';
|
867 |
+
$preview .= '<div class="row b2s-edit-template-preview-header-19">';
|
868 |
+
$preview .= '<div class="col-sm-12 b2s-edit-template-preview-content-19">';
|
869 |
+
$preview .= '<span class="b2s-edit-template-preview-content" data-network-type="' . $networkType . '">' . preg_replace("/\n/", "<br>", $schema[$networkType]['content']) . '</span>';
|
870 |
+
$preview .= '</div>';
|
871 |
+
$preview .= '</div>';
|
872 |
+
$preview .= '<div class="row">';
|
873 |
+
$preview .= '<div class="col-sm-4 b2s-edit-template-preview-image-border-19">';
|
874 |
+
$preview .= '<img class="b2s-edit-template-preview-link-image b2s-edit-template-preview-link-image-19" src="' . plugins_url('/assets/images/no-image.png', B2S_PLUGIN_FILE) . '">';
|
875 |
+
$preview .= '</div>';
|
876 |
+
$preview .= '<div class="col-sm-8 b2s-edit-template-preview-link-meta-box-19">';
|
877 |
+
$preview .= '<span class="b2s-edit-template-preview-link-meta-box-title-19">' . $title . '</span><br>';
|
878 |
+
$preview .= '<span class="b2s-edit-template-preview-link-meta-box-desc-19">' . $desc . '</span><br>';
|
879 |
+
$preview .= '<span class="b2s-edit-template-preview-link-meta-box-domain-19">' . $domain . '</span>';
|
880 |
+
$preview .= '</div>';
|
881 |
+
$preview .= '</div>';
|
882 |
+
$preview .= '</div>';
|
883 |
+
$preview .= '<div class="b2s-edit-template-image-preview" data-network-type="' . $networkType . '" ' . (((int) $schema[$networkType]['format'] == 1) ? '' : 'style="display: none;"') . '>';
|
884 |
+
$preview .= '<div class="row">';
|
885 |
+
$preview .= '<div class="col-sm-12 b2s-edit-template-preview-content-19">';
|
886 |
+
$preview .= '<span class="b2s-edit-template-preview-content" data-network-type="' . $networkType . '">' . preg_replace("/\n/", "<br>", $schema[$networkType]['content']) . '</span>';
|
887 |
+
$preview .= '</div>';
|
888 |
+
$preview .= '</div>';
|
889 |
+
$preview .= '<div class="row">';
|
890 |
+
$preview .= '<div class="col-sm-12 b2s-edit-template-preview-image-border-19">';
|
891 |
+
$preview .= '<img class="b2s-edit-template-preview-image-image b2s-edit-template-preview-image-image-19" src="' . plugins_url('/assets/images/no-image.png', B2S_PLUGIN_FILE) . '">';
|
892 |
+
$preview .= '</div>';
|
893 |
+
$preview .= '</div>';
|
894 |
+
$preview .= '</div>';
|
895 |
+
$preview .= '<div class="row">';
|
896 |
+
$preview .= '<div class="col-sm-12">';
|
897 |
+
$preview .= '<img class="b2s-edit-template-preview-like-icons-19" src="' . plugins_url('/assets/images/settings/like-icons-19.png', B2S_PLUGIN_FILE) . '">';
|
898 |
+
$preview .= '</div>';
|
899 |
+
$preview .= '</div>';
|
900 |
+
$preview .= '</div>';
|
901 |
+
$preview .= '</div>';
|
902 |
+
break;
|
903 |
default:
|
904 |
break;
|
905 |
}
|
includes/B2S/Post/Filter.php
CHANGED
@@ -145,14 +145,14 @@ class B2S_Post_Filter {
|
|
145 |
$this->postFilter .= '<div class="form-group">
|
146 |
<input id="b2sSortPostTitle" name="b2sSortPostTitle" maxlength="30" class="form-control b2s-input input-sm" value="' . (empty($this->searchPostTitle) ? '' : $this->searchPostTitle) . '" placeholder="' . (empty($this->searchPostTitle) ? __('Search Title', 'blog2social') : '') . '" type="text">
|
147 |
</div>';
|
148 |
-
if (B2S_PLUGIN_ADMIN) {
|
149 |
$this->postFilter .= $this->getAutorHtml();
|
150 |
}
|
151 |
if($this->type != 'draft') {
|
152 |
$this->postFilter .= $this->getPostCatHtml();
|
153 |
$this->postFilter .= $this->getPostTypeHtml();
|
154 |
|
155 |
-
if ($this->type == 'all') {
|
156 |
$this->postFilter .= $this->getPostStatusHtml();
|
157 |
$this->postFilter .= $this->getPostShareStatusHtml();
|
158 |
}
|
145 |
$this->postFilter .= '<div class="form-group">
|
146 |
<input id="b2sSortPostTitle" name="b2sSortPostTitle" maxlength="30" class="form-control b2s-input input-sm" value="' . (empty($this->searchPostTitle) ? '' : $this->searchPostTitle) . '" placeholder="' . (empty($this->searchPostTitle) ? __('Search Title', 'blog2social') : '') . '" type="text">
|
147 |
</div>';
|
148 |
+
if (B2S_PLUGIN_ADMIN && $this->type != 'draft-post') {
|
149 |
$this->postFilter .= $this->getAutorHtml();
|
150 |
}
|
151 |
if($this->type != 'draft') {
|
152 |
$this->postFilter .= $this->getPostCatHtml();
|
153 |
$this->postFilter .= $this->getPostTypeHtml();
|
154 |
|
155 |
+
if ($this->type == 'all' || $this->type == 'draft-post') {
|
156 |
$this->postFilter .= $this->getPostStatusHtml();
|
157 |
$this->postFilter .= $this->getPostShareStatusHtml();
|
158 |
}
|
includes/B2S/Post/Item.php
CHANGED
@@ -223,23 +223,47 @@ class B2S_Post_Item {
|
|
223 |
}
|
224 |
|
225 |
if ($this->type == 'draft') {
|
226 |
-
$
|
|
|
227 |
FROM `$wpdb->posts` posts $leftJoin $leftJoin2
|
228 |
LEFT JOIN b2s_posts ON posts.ID = b2s_posts.post_id
|
229 |
WHERE (posts.`post_type` LIKE '%b2s_ex_post%')
|
230 |
-
AND b2s_posts.post_id IS NULL
|
231 |
$addSearchAuthorId $addSearchPostTitle $addNotAdmin $leftJoinWhere
|
232 |
ORDER BY `" . $order . "` " . $sortType . "
|
233 |
LIMIT " . (($this->currentPage - 1) * $this->results_per_page) . "," . $this->results_per_page;
|
234 |
-
|
235 |
|
236 |
-
|
237 |
FROM `$wpdb->posts` posts $leftJoin $leftJoin2
|
238 |
LEFT JOIN b2s_posts ON posts.ID = b2s_posts.post_id
|
239 |
WHERE (posts.`post_type` LIKE '%b2s_ex_post%')
|
240 |
-
AND b2s_posts.post_id IS NULL
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
$addSearchAuthorId $addSearchPostTitle $addNotAdmin $leftJoinWhere";
|
242 |
-
|
|
|
243 |
}
|
244 |
}
|
245 |
|
@@ -248,7 +272,11 @@ class B2S_Post_Item {
|
|
248 |
$postStatus = array('publish' => __('published', 'blog2social'), 'pending' => __('draft', 'blog2social'), 'future' => __('scheduled', 'blog2social'));
|
249 |
|
250 |
if (empty($this->postData)) {
|
251 |
-
|
|
|
|
|
|
|
|
|
252 |
return '<li class="list-group-item"><div class="media"><div class="media-body"></div>' . $text . '</div></li>';
|
253 |
}
|
254 |
|
@@ -368,19 +396,42 @@ class B2S_Post_Item {
|
|
368 |
$lastPublish = ($lastPublish != false) ? ' | ' . __('last shared on social media', 'blog2social') . ' ' . B2S_Util::getCustomDateFormat($lastPublish, substr(B2S_LANGUAGE, 0, 2)) : '';
|
369 |
$url = (!empty($browser)) ? get_post_meta($var->ID, "b2s_original_url", true) : $var->guid;
|
370 |
|
371 |
-
$this->postItem .= '<li class="list-group-item">
|
372 |
<div class="media">
|
373 |
<img class="post-img-10 pull-left hidden-xs" src="' . plugins_url('/assets/images/b2s/' . $postType . '-icon.png', B2S_PLUGIN_FILE) . '" alt="posttype">
|
374 |
<div class="media-body">
|
375 |
<strong><a target="_blank" href="' . $url . '">' . $postTitle . '</a></strong>' . $browser . '
|
376 |
-
<span class="pull-right b2s-publish-btn">
|
377 |
<a class="btn btn-primary btn-sm publishPostBtn" href="admin.php?page=blog2social-curation&postId=' . $var->ID . '&url=' . urlencode($url) . '&title=' . urlencode($var->post_title) . '&comment=' . urlencode($var->post_content) . '">' . __('Share on Social Media', 'blog2social') . '</a>
|
378 |
</span>
|
|
|
|
|
|
|
379 |
<p class="info hidden-xs">#' . $var->ID . ' | ' . __('Author', 'blog2social') . ' <a href="' . get_author_posts_url($var->post_author) . '">' . (isset($userInfo['nickname'][0]) ? $userInfo['nickname'][0] : '-') . '</a> | ' . __('saved', 'blog2social') . ': ' . B2S_Util::getCustomDateFormat($var->post_date, substr(B2S_LANGUAGE, 0, 2)) . $lastPublish . '</p>
|
380 |
</div>
|
381 |
</div>
|
382 |
</li>';
|
383 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
}
|
385 |
|
386 |
return html_entity_decode($this->postItem, ENT_COMPAT, 'UTF-8');
|
223 |
}
|
224 |
|
225 |
if ($this->type == 'draft') {
|
226 |
+
if ($wpdb->get_var("SHOW TABLES LIKE 'b2s_posts'") == 'b2s_posts') {
|
227 |
+
$sqlPosts = "SELECT posts.`ID`, posts.`post_author`, posts.`post_date`, posts.`post_type`, posts.`post_status`, posts.`post_title`, posts.`post_content`, posts.`guid`
|
228 |
FROM `$wpdb->posts` posts $leftJoin $leftJoin2
|
229 |
LEFT JOIN b2s_posts ON posts.ID = b2s_posts.post_id
|
230 |
WHERE (posts.`post_type` LIKE '%b2s_ex_post%')
|
231 |
+
AND b2s_posts.post_id IS NULL AND (posts.`post_status` = 'private' OR posts.`post_status` = 'draft')
|
232 |
$addSearchAuthorId $addSearchPostTitle $addNotAdmin $leftJoinWhere
|
233 |
ORDER BY `" . $order . "` " . $sortType . "
|
234 |
LIMIT " . (($this->currentPage - 1) * $this->results_per_page) . "," . $this->results_per_page;
|
235 |
+
$this->postData = $wpdb->get_results($sqlPosts);
|
236 |
|
237 |
+
$sqlPostsTotal = "SELECT COUNT(*)
|
238 |
FROM `$wpdb->posts` posts $leftJoin $leftJoin2
|
239 |
LEFT JOIN b2s_posts ON posts.ID = b2s_posts.post_id
|
240 |
WHERE (posts.`post_type` LIKE '%b2s_ex_post%')
|
241 |
+
AND b2s_posts.post_id IS NULL AND (posts.`post_status` = 'private' OR posts.`post_status` = 'draft')
|
242 |
+
$addSearchAuthorId $addSearchPostTitle $addNotAdmin $leftJoinWhere";
|
243 |
+
$this->postTotal = $wpdb->get_var($sqlPostsTotal);
|
244 |
+
}
|
245 |
+
}
|
246 |
+
|
247 |
+
if ($this->type == 'draft-post') {
|
248 |
+
if ($wpdb->get_var("SHOW TABLES LIKE 'b2s_posts_drafts'") == 'b2s_posts_drafts') {
|
249 |
+
$sqlPosts = "SELECT b2s_posts_drafts.`ID` AS draft_id, posts.`ID`, b2s_posts_drafts.`post_id`, b2s_posts_drafts.`last_save_date`, b2s_posts_drafts.`data`, posts.post_author, posts.post_type, posts.post_title
|
250 |
+
FROM `$wpdb->posts` posts LEFT JOIN b2s_posts_drafts ON b2s_posts_drafts.post_id = posts.ID $leftJoin $leftJoin2 $leftJoin3
|
251 |
+
WHERE b2s_posts_drafts.`blog_user_id` = " . B2S_PLUGIN_BLOG_USER_ID . "
|
252 |
+
AND $postTypes
|
253 |
+
AND $addSearchType
|
254 |
+
$addSearchAuthorId $addSearchPostTitle $addNotAdmin $leftJoinWhere
|
255 |
+
ORDER BY `last_save_date` " . $sortType . "
|
256 |
+
LIMIT " . (($this->currentPage - 1) * $this->results_per_page) . "," . $this->results_per_page;
|
257 |
+
$this->postData = $wpdb->get_results($sqlPosts);
|
258 |
+
|
259 |
+
$sqlPostsTotal = "SELECT COUNT(*)
|
260 |
+
FROM `$wpdb->posts` posts LEFT JOIN b2s_posts_drafts ON b2s_posts_drafts.post_id = posts.ID $leftJoin $leftJoin2 $leftJoin3
|
261 |
+
WHERE b2s_posts_drafts.`blog_user_id` = " . B2S_PLUGIN_BLOG_USER_ID . "
|
262 |
+
AND $postTypes
|
263 |
+
AND $addSearchType
|
264 |
$addSearchAuthorId $addSearchPostTitle $addNotAdmin $leftJoinWhere";
|
265 |
+
$this->postTotal = $wpdb->get_var($sqlPostsTotal);
|
266 |
+
}
|
267 |
}
|
268 |
}
|
269 |
|
272 |
$postStatus = array('publish' => __('published', 'blog2social'), 'pending' => __('draft', 'blog2social'), 'future' => __('scheduled', 'blog2social'));
|
273 |
|
274 |
if (empty($this->postData)) {
|
275 |
+
if ($this->type != 'draft-post') {
|
276 |
+
$text = __('You have no posts published or scheduled.', 'blog2social');
|
277 |
+
} else {
|
278 |
+
$text = __('You have no drafts saved.', 'blog2social');
|
279 |
+
}
|
280 |
return '<li class="list-group-item"><div class="media"><div class="media-body"></div>' . $text . '</div></li>';
|
281 |
}
|
282 |
|
396 |
$lastPublish = ($lastPublish != false) ? ' | ' . __('last shared on social media', 'blog2social') . ' ' . B2S_Util::getCustomDateFormat($lastPublish, substr(B2S_LANGUAGE, 0, 2)) : '';
|
397 |
$url = (!empty($browser)) ? get_post_meta($var->ID, "b2s_original_url", true) : $var->guid;
|
398 |
|
399 |
+
$this->postItem .= '<li class="list-group-item b2s-list-cc-draft" data-blog-post-id="' . $var->ID . '">
|
400 |
<div class="media">
|
401 |
<img class="post-img-10 pull-left hidden-xs" src="' . plugins_url('/assets/images/b2s/' . $postType . '-icon.png', B2S_PLUGIN_FILE) . '" alt="posttype">
|
402 |
<div class="media-body">
|
403 |
<strong><a target="_blank" href="' . $url . '">' . $postTitle . '</a></strong>' . $browser . '
|
404 |
+
<span class="pull-right padding-left-5 b2s-publish-btn">
|
405 |
<a class="btn btn-primary btn-sm publishPostBtn" href="admin.php?page=blog2social-curation&postId=' . $var->ID . '&url=' . urlencode($url) . '&title=' . urlencode($var->post_title) . '&comment=' . urlencode($var->post_content) . '">' . __('Share on Social Media', 'blog2social') . '</a>
|
406 |
</span>
|
407 |
+
<span class="pull-right">
|
408 |
+
<button class="btn btn-default btn-sm deleteCcDraftBtn" data-blog-post-id="' . $var->ID . '"><span class="glyphicon glyphicon glyphicon-trash "></span> ' . __('delete', 'blog2social') . '</button>
|
409 |
+
</span>
|
410 |
<p class="info hidden-xs">#' . $var->ID . ' | ' . __('Author', 'blog2social') . ' <a href="' . get_author_posts_url($var->post_author) . '">' . (isset($userInfo['nickname'][0]) ? $userInfo['nickname'][0] : '-') . '</a> | ' . __('saved', 'blog2social') . ': ' . B2S_Util::getCustomDateFormat($var->post_date, substr(B2S_LANGUAGE, 0, 2)) . $lastPublish . '</p>
|
411 |
</div>
|
412 |
</div>
|
413 |
</li>';
|
414 |
}
|
415 |
+
|
416 |
+
if ($this->type == 'draft-post') {
|
417 |
+
$userInfo = get_user_meta($var->post_author);
|
418 |
+
|
419 |
+
$this->postItem .= '<li class="list-group-item b2s-draft-list-entry" data-b2s-draft-id="' . $var->draft_id . '">
|
420 |
+
<div class="media">
|
421 |
+
<img class="post-img-10 pull-left hidden-xs" src="' . plugins_url('/assets/images/b2s/' . $postType . '-icon.png', B2S_PLUGIN_FILE) . '" alt="posttype">
|
422 |
+
<div class="media-body">
|
423 |
+
<strong><a target="_blank" href="' . get_permalink($var->post_id) . '">' . $postTitle . '</a></strong>
|
424 |
+
<span class="pull-right b2s-publish-btn">
|
425 |
+
<a class="btn btn-primary btn-sm publishPostBtn" href="admin.php?page=blog2social-ship&postId=' . $var->ID . '&type=draft">' . __('Share on Social Media', 'blog2social') . '</a>
|
426 |
+
</span>
|
427 |
+
<span class="pull-right">
|
428 |
+
<a class="btn btn-default btn-sm deleteDraftBtn" data-b2s-draft-id="' . $var->draft_id . '">' . __('delete', 'blog2social') . '</a>
|
429 |
+
</span>
|
430 |
+
<p class="info hidden-xs">#' . $var->ID . ' | ' . __('Author', 'blog2social') . ' <a href="' . get_author_posts_url($var->post_author) . '">' . (isset($userInfo['nickname'][0]) ? $userInfo['nickname'][0] : '-') . '</a> | ' . __('last saved', 'blog2social') . ': ' . B2S_Util::getCustomDateFormat($var->last_save_date, substr(B2S_LANGUAGE, 0, 2)) . '</p>
|
431 |
+
</div>
|
432 |
+
</div>
|
433 |
+
</li>';
|
434 |
+
}
|
435 |
}
|
436 |
|
437 |
return html_entity_decode($this->postItem, ENT_COMPAT, 'UTF-8');
|
includes/B2S/PostBox.php
CHANGED
@@ -174,7 +174,7 @@ class B2S_PostBox {
|
|
174 |
|
175 |
public function getPostBoxAutoHtml($mandant = array(), $auth = array()) {
|
176 |
$authContent = '';
|
177 |
-
$content = '<br><div class="b2s-meta-box-auto-post-area"><label for="b2s-post-meta-box-profil-dropdown">' . __('Select
|
178 |
<select style="width:100%;" id="b2s-post-meta-box-profil-dropdown" name="b2s-post-meta-box-profil-dropdown">';
|
179 |
foreach ($mandant as $k => $m) {
|
180 |
$content .= '<option value="' . $m->id . '">' . (($m->id == 0) ? __($m->name, 'blog2social') : $m->name) . '</option>';
|
174 |
|
175 |
public function getPostBoxAutoHtml($mandant = array(), $auth = array()) {
|
176 |
$authContent = '';
|
177 |
+
$content = '<br><div class="b2s-meta-box-auto-post-area"><label for="b2s-post-meta-box-profil-dropdown">' . __('Select network collection:', 'blog2social') . ' <div style="float:right;"><a href="' . $this->b2sSiteUrl . 'wp-admin/admin.php?page=blog2social-network' . '" target="_blank">' . __('Network settings', 'blog2social') . '</a></div></label>
|
178 |
<select style="width:100%;" id="b2s-post-meta-box-profil-dropdown" name="b2s-post-meta-box-profil-dropdown">';
|
179 |
foreach ($mandant as $k => $m) {
|
180 |
$content .= '<option value="' . $m->id . '">' . (($m->id == 0) ? __($m->name, 'blog2social') : $m->name) . '</option>';
|
includes/B2S/Settings/Item.php
CHANGED
@@ -364,7 +364,7 @@ class B2S_Settings_Item {
|
|
364 |
$content .='<hr></div>';
|
365 |
}
|
366 |
|
367 |
-
foreach (array(1, 2, 3, 12) as $n => $networkId) { //FB,TW,LI,IN
|
368 |
$type = ($networkId == 1) ? array(0, 1, 2) : (($networkId == 3) ? array(0, 1) : array(0));
|
369 |
foreach ($type as $t => $typeId) { //Profile,Page,Group
|
370 |
if(!isset($optionPostFormat[$networkId][$typeId]['format'])){
|
@@ -410,7 +410,7 @@ class B2S_Settings_Item {
|
|
410 |
public function setNetworkSettingsHtml() {
|
411 |
$optionPostFormat = $this->options->_getOption('post_template');
|
412 |
$content = "<input type='hidden' class='b2sNetworkSettingsPostFormatText' value='" . json_encode(array('post' => array(__('Link Post', 'blog2social'), __('Image Post', 'blog2social')), 'image' => array(__('Image with frame'), __('Image cut out')))) . "'/>";
|
413 |
-
foreach (array(1, 2, 3, 12) as $n => $networkId) { //FB,TW,LI,IN
|
414 |
$postFormatType = ($networkId == 12) ? 'image' : 'post';
|
415 |
$type = ($networkId == 1) ? array(0, 1, 2) : (($networkId == 3) ? array(0, 1) : array(0));
|
416 |
foreach ($type as $t => $typeId) { //Profile,Page,Group
|
364 |
$content .='<hr></div>';
|
365 |
}
|
366 |
|
367 |
+
foreach (array(1, 2, 3, 12, 19) as $n => $networkId) { //FB,TW,LI,IN
|
368 |
$type = ($networkId == 1) ? array(0, 1, 2) : (($networkId == 3) ? array(0, 1) : array(0));
|
369 |
foreach ($type as $t => $typeId) { //Profile,Page,Group
|
370 |
if(!isset($optionPostFormat[$networkId][$typeId]['format'])){
|
410 |
public function setNetworkSettingsHtml() {
|
411 |
$optionPostFormat = $this->options->_getOption('post_template');
|
412 |
$content = "<input type='hidden' class='b2sNetworkSettingsPostFormatText' value='" . json_encode(array('post' => array(__('Link Post', 'blog2social'), __('Image Post', 'blog2social')), 'image' => array(__('Image with frame'), __('Image cut out')))) . "'/>";
|
413 |
+
foreach (array(1, 2, 3, 12, 19) as $n => $networkId) { //FB,TW,LI,IN
|
414 |
$postFormatType = ($networkId == 12) ? 'image' : 'post';
|
415 |
$type = ($networkId == 1) ? array(0, 1, 2) : (($networkId == 3) ? array(0, 1) : array(0));
|
416 |
foreach ($type as $t => $typeId) { //Profile,Page,Group
|
includes/B2S/Ship/Item.php
CHANGED
@@ -16,7 +16,7 @@ class B2S_Ship_Item {
|
|
16 |
private $showTitleGroup = array(8, 11, 19);
|
17 |
private $onlyImage = array(6, 7, 12, 20);
|
18 |
private $allowNoImageProfile = array(5, 9);
|
19 |
-
private $allowNoCustomImageProfile = array(8, 15
|
20 |
private $allowNoCustomImagePage = array();
|
21 |
private $allowNoEmoji = array(9, 13, 14, 15, 16, 18);
|
22 |
private $allowNoImagePage = array(8);
|
@@ -88,8 +88,10 @@ class B2S_Ship_Item {
|
|
88 |
return $this->postId;
|
89 |
}
|
90 |
|
91 |
-
public function getItemHtml($data, $show_time = true) {
|
92 |
-
|
|
|
|
|
93 |
$this->viewMode = (isset($data->view) && !empty($data->view)) ? $data->view : null; //normal or modal(Kalendar)
|
94 |
//Override data values from edit modus
|
95 |
$schedMetaData = ($this->viewMode == 'modal') ? $this->hook_sched_data(array()) : array();
|
@@ -144,39 +146,43 @@ class B2S_Ship_Item {
|
|
144 |
$isRequiredTextarea = (in_array($data->networkId, $this->isCommentProfile)) ? '' : 'required="required"';
|
145 |
|
146 |
//ShortText
|
147 |
-
if
|
148 |
-
$message = $
|
149 |
} else {
|
150 |
-
if (
|
151 |
-
|
|
|
|
|
|
|
152 |
|
153 |
-
|
154 |
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
|
|
166 |
}
|
167 |
-
}
|
168 |
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
|
|
173 |
}
|
174 |
}
|
175 |
$message = $this->hook_message($message);
|
176 |
|
177 |
$countCharacter = 0;
|
178 |
if ($limit !== false) {
|
179 |
-
$infoCharacterCount = ($data->networkId != 2 && $data->networkId != 3) ? ' (' . __('Text only', 'blog2social') . ')' : '';
|
180 |
$textareaLimitInfo .= '<span class="b2s-post-item-countChar" data-network-count="-1" data-network-auth-id="' . $data->networkAuthId . '">' . (int) $countCharacter . '</span>/' . $limitValue . ' ' . __('characters', 'blog2social') . $infoCharacterCount . '</span>';
|
181 |
$textareaOnKeyUp = 'onkeyup="networkLimitAll(\'' . $data->networkAuthId . '\',\'' . $data->networkId . '\',\'' . $limitValue . '\');"';
|
182 |
} else {
|
@@ -196,24 +202,27 @@ class B2S_Ship_Item {
|
|
196 |
$infoImage .= (in_array($data->networkId, $this->allowNoCustomImagePage)) ? (!empty($infoImage) ? ' | ' : '') . __('Network defines image by link', 'blog2social') . '!' : '';
|
197 |
|
198 |
//ShortText
|
199 |
-
if
|
200 |
-
$message = $
|
201 |
} else {
|
202 |
-
if (
|
203 |
-
|
204 |
-
$this->setShortTextPage[$data->networkId] = (int) $this->setShortTextPage[$data->networkId] - mb_strlen($this->postUrl, 'UTF-8') - 1;
|
205 |
-
}
|
206 |
-
$message = B2S_Util::getExcerpt(B2S_Util::prepareContent($this->postId, $this->postData->post_content, $this->postUrl, false, (in_array($data->networkId, $this->allowNoEmoji) ? false : true), $this->userLang), (isset($this->setShortTextPage[$data->networkId]) ? (int) $this->setShortTextPage[$data->networkId] : false), (isset($this->setShortTextPageLimit[$data->networkId]) ? (( is_array($this->setShortTextPageLimit[$data->networkId]) && isset($this->setShortTextPageLimit[$data->networkId][$data->networkKind])) ? (int) $this->setShortTextPageLimit[$data->networkId][$data->networkKind] : (int) $this->setShortTextPageLimit[$data->networkId] ) : false));
|
207 |
} else {
|
208 |
-
|
209 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
|
211 |
-
|
212 |
-
|
213 |
-
|
|
|
214 |
}
|
215 |
}
|
216 |
-
|
217 |
$message = $this->hook_message($message);
|
218 |
|
219 |
|
@@ -232,20 +241,23 @@ class B2S_Ship_Item {
|
|
232 |
case'2':
|
233 |
//group
|
234 |
//ShortText
|
235 |
-
if
|
236 |
-
$message = $
|
237 |
} else {
|
238 |
-
if (
|
239 |
-
$message =
|
240 |
} else {
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
|
|
|
|
|
|
|
|
246 |
}
|
247 |
}
|
248 |
-
|
249 |
$message = $this->hook_message($message);
|
250 |
|
251 |
$network_display_name = $data->network_display_name;
|
@@ -290,18 +302,18 @@ class B2S_Ship_Item {
|
|
290 |
|
291 |
$content .= '<div class="pull-right hidden-xs b2s-post-item-info-area">';
|
292 |
|
293 |
-
if (in_array($data->networkId, $this->setPostFormat)) {
|
294 |
$postFormatType = ($data->networkId == 12) ? 'image' : 'post';
|
295 |
$addCSS = (B2S_PLUGIN_USER_VERSION == 0) ? 'b2s-btn-disabled' : '';
|
296 |
$content .= '<button class="btn btn-xs btn-link b2s-post-ship-item-post-format ' . $addCSS . '" data-post-wp-type="' . $this->b2sPostType . '" data-post-format-type="' . $postFormatType . '" data-network-auth-id="' . $data->networkAuthId . '" data-network-type="' . $data->networkType . '" data-network-id="' . $data->networkId . '" >' . __('post format', 'blog2social') . ': <span class="b2s-post-ship-item-post-format-text" data-post-format-type="' . $postFormatType . '" data-network-auth-id="' . $data->networkAuthId . '" data-network-type="' . $data->networkType . '" data-network-id="' . $data->networkId . '" ></span></button>';
|
297 |
if (B2S_PLUGIN_USER_VERSION > 0) {
|
298 |
-
$content .= '<input type="hidden" class="b2s-post-item-details-post-format" name="b2s[' . $data->networkAuthId . '][post_format]" data-network-auth-id="' . $data->networkAuthId . '" data-network-id="' . $data->networkId . '" data-network-type="' . $data->networkType . '" value="0" />';
|
299 |
} else {
|
300 |
$content .= '<span class="label label-success"><a target="_blank" class="btn-label-premium b2s-btn-trigger-post-ship-item-post-format" data-network-auth-id="' . $data->networkAuthId . '" href="#">PREMIUM</a></span>';
|
301 |
}
|
302 |
}
|
303 |
$content .='<span class="b2s-post-tool-area" data-network-auth-id="' . $data->networkAuthId . '">';
|
304 |
-
$content .= (in_array($data->networkId, $this->setPostFormat)) ? ' | ' : '';
|
305 |
if (in_array($data->networkId, $this->getText)) {
|
306 |
$content .= '<button class="btn btn-xs btn-link b2s-post-ship-item-full-text" data-network-id="' . $data->networkId . '" data-network-count="-1" data-network-auth-id="' . $data->networkAuthId . '" >' . __('Insert full-text', 'blog2social') . '</button> | ';
|
307 |
}
|
@@ -368,6 +380,7 @@ class B2S_Ship_Item {
|
|
368 |
$content .= '<input type="hidden" class="form-control" name="b2s[' . $data->networkAuthId . '][network_tos_group_id]" value="' . $data->networkTosGroupId . '">';
|
369 |
$content .= '<input type="hidden" class="form-control networkKind" data-network-auth-id="' . $data->networkAuthId . '" name="b2s[' . $data->networkAuthId . '][network_kind]" value="' . $data->networkKind . '">';
|
370 |
$content .= '<input type="hidden" data-network-auth-id="' . $data->networkAuthId . '" class="form-control b2s-post-ship-network-display-name" name="b2s[' . $data->networkAuthId . '][network_display_name]" value="' . $data->network_display_name . '">';
|
|
|
371 |
|
372 |
$content .= '</div>';
|
373 |
return $content;
|
@@ -468,9 +481,11 @@ class B2S_Ship_Item {
|
|
468 |
$edit = '<textarea class="form-control xing-textarea-input b2s-post-item-details-item-message-input ' . (in_array($networkId, $this->allowHtml) ? 'b2s-post-item-details-item-message-input-allow-html' : '') . '"data-network-count="-1" data-network-id="' . $networkId . '" data-network-text-limit="' . $limitValue . '" data-network-auth-id="' . $networkAuthId . '" placeholder="' . __('Write something about your post...', 'blog2social') . '" name="b2s[' . $networkAuthId . '][content]" ' . $isRequiredTextarea . ' ' . $textareaOnKeyUp . '>' . $message . '</textarea>';
|
469 |
$edit .= '<div class="row">';
|
470 |
$edit .= '<div class="' . ((isset($this->viewMode) && $this->viewMode == 'modal') ? 'col-xs-12' : 'col-xs-12 col-sm-5 col-lg-3') . '">';
|
471 |
-
$edit .= '<
|
|
|
472 |
$edit .= '<input type="hidden" class="b2s-image-url-hidden-field form-control" data-network-count="-1" data-network-id="' . $networkId . '" data-network-auth-id="' . $networkAuthId . '" value="' . ($imageUrl ? $imageUrl : "") . '" name="b2s[' . $networkAuthId . '][image_url]">';
|
473 |
$edit .= '<div class="clearfix"></div>';
|
|
|
474 |
$edit .= '</div>';
|
475 |
$edit .= '<div class="' . ((isset($this->viewMode) && $this->viewMode == 'modal') ? 'col-xs-12"' : 'col-xs-12 col-sm-7 col-lg-9 b2s-post-original-area" data-network-auth-id="' . $networkAuthId . '"') . '>';
|
476 |
$edit .= '<p class="xing-url-title b2s-post-item-details-preview-title hidden-xs" data-network-auth-id="' . $networkAuthId . '">' . (isset($meta['title']) && !empty($meta['title']) ? $meta['title'] : '') . '</p>';
|
@@ -548,8 +563,11 @@ class B2S_Ship_Item {
|
|
548 |
if (($networkId == 8 || $networkId == 19) && $networkType == 0) {
|
549 |
$edit = '<div class="row"><br>';
|
550 |
$edit .= '<div class="col-xs-12 col-sm-5 col-lg-3">';
|
551 |
-
$edit .= '<
|
|
|
552 |
$edit .= '<input type="hidden" class="b2s-image-url-hidden-field form-control" data-network-count="' . $schedCount . '" data-network-count="' . $schedCount . '" data-network-id="' . $networkId . '" data-network-auth-id="' . $networkAuthId . '" value="' . ($imageUrl ? $imageUrl : "") . '" name="b2s[' . $networkAuthId . '][sched_image_url][' . $schedCount . ']">';
|
|
|
|
|
553 |
$edit .= '</div>';
|
554 |
$edit .= '<div class="col-xs-12 col-sm-7 col-lg-9">';
|
555 |
$edit .= $infoArea;
|
@@ -723,7 +741,7 @@ class B2S_Ship_Item {
|
|
723 |
|
724 |
private function getRelayBtnHtml($networkAuthId, $networkId) {
|
725 |
$relay = '<div class="form-group b2s-post-relay-area-select pull-left"><div class="checkbox checbox-switch switch-success"><label>';
|
726 |
-
$relay .='<input type="checkbox" class="b2s-post-item-details-relay" data-user-version="' . B2S_PLUGIN_USER_VERSION . '" data-network-id="' . $networkId . '" data-network-auth-id="' . $networkAuthId . '" name="b2s[' . $networkAuthId . '][post_relay]" value="1"/>';
|
727 |
$relay .='<span></span>';
|
728 |
$relay .= __('Enable Retweets for all Tweets with the selected profile', 'blog2social') . ' <a href="#" data-toggle="modal" data-target="#b2sInfoPostRelayModal" class="btn-xs hidden-sm">' . __('Info', 'blog2social') . '</a>';
|
729 |
$relay .=' </label></div></div>';
|
16 |
private $showTitleGroup = array(8, 11, 19);
|
17 |
private $onlyImage = array(6, 7, 12, 20);
|
18 |
private $allowNoImageProfile = array(5, 9);
|
19 |
+
private $allowNoCustomImageProfile = array(8, 15);
|
20 |
private $allowNoCustomImagePage = array();
|
21 |
private $allowNoEmoji = array(9, 13, 14, 15, 16, 18);
|
22 |
private $allowNoImagePage = array(8);
|
88 |
return $this->postId;
|
89 |
}
|
90 |
|
91 |
+
public function getItemHtml($data, $show_time = true, $draftData = array()) {
|
92 |
+
|
93 |
+
$isDraft = (empty($draftData)) ? false : true;
|
94 |
+
|
95 |
$this->viewMode = (isset($data->view) && !empty($data->view)) ? $data->view : null; //normal or modal(Kalendar)
|
96 |
//Override data values from edit modus
|
97 |
$schedMetaData = ($this->viewMode == 'modal') ? $this->hook_sched_data(array()) : array();
|
146 |
$isRequiredTextarea = (in_array($data->networkId, $this->isCommentProfile)) ? '' : 'required="required"';
|
147 |
|
148 |
//ShortText
|
149 |
+
if($isDraft && isset($draftData['content'])) {
|
150 |
+
$message = $draftData['content'];
|
151 |
} else {
|
152 |
+
if ($data->networkId == 1 || $data->networkId == 2 || $data->networkId == 3 || $data->networkId == 12 || $data->networkId == 19) {
|
153 |
+
$message = $this->getMessagebyTemplate($data);
|
154 |
+
} else {
|
155 |
+
if (isset($this->setShortTextProfile[$data->networkId]) && (int) $this->setShortTextProfile[$data->networkId] > 0) {
|
156 |
+
//$preContent = ($data->networkId == 2) ? B2S_Util::getTitleByLanguage($this->postData->post_title, $this->userLang) : B2S_Util::prepareContent($this->postId, $this->postData->post_content, $this->postUrl, false, (in_array($data->networkId, $this->allowNoEmoji) ? false : true), $this->userLang);
|
157 |
|
158 |
+
$preContent = B2S_Util::prepareContent($this->postId, $this->postData->post_content, $this->postUrl, false, (in_array($data->networkId, $this->allowNoEmoji) ? false : true), $this->userLang);
|
159 |
|
160 |
+
$message = B2S_Util::getExcerpt($preContent, (int) $this->setShortTextProfile[$data->networkId], (isset($this->setShortTextProfileLimit[$data->networkId]) ? (int) $this->setShortTextProfileLimit[$data->networkId] : false));
|
161 |
+
} else {
|
162 |
+
$message = (in_array($data->networkId, $this->allowTitleProfile) ? (in_array($data->networkId, $this->allowNoEmoji) ? B2S_Util::remove4byte(B2S_Util::getTitleByLanguage($this->postData->post_title, $this->userLang)) : B2S_Util::getTitleByLanguage($this->postData->post_title, $this->userLang)) : B2S_Util::prepareContent($this->postId, $this->postData->post_content, $this->postUrl, (in_array($data->networkId, $this->allowHtml) ? '<p><h1><h2><br><i><b><a><img>' : false), (in_array($data->networkId, $this->allowNoEmoji) ? false : true), $this->userLang));
|
163 |
+
}
|
164 |
|
165 |
+
//Feature Image Html-Network
|
166 |
+
if (in_array($data->networkId, $this->allowHtml)) {
|
167 |
+
$featuredImage = wp_get_attachment_url(get_post_thumbnail_id($this->postId));
|
168 |
+
if ($featuredImage !== false) {
|
169 |
+
$title = in_array($data->networkId, $this->allowNoEmoji) ? B2S_Util::remove4byte(B2S_Util::getTitleByLanguage($this->postData->post_title, $this->userLang)) : B2S_Util::getTitleByLanguage($this->postData->post_title, $this->userLang);
|
170 |
+
$message = '<img class="b2s-post-item-details-image-html-src" src="' . $featuredImage . '" alt="' . $title . '"/><br />' . $message;
|
171 |
+
}
|
172 |
}
|
|
|
173 |
|
174 |
+
//Hashtags
|
175 |
+
if (in_array($data->networkId, $this->allowHashTags) && ($allowUserHashTag === false || $allowUserHashTag == 1)) {
|
176 |
+
$add = ($data->networkId != 2) ? "\n\n" : "";
|
177 |
+
$message .= $this->getHashTagsString($add);
|
178 |
+
}
|
179 |
}
|
180 |
}
|
181 |
$message = $this->hook_message($message);
|
182 |
|
183 |
$countCharacter = 0;
|
184 |
if ($limit !== false) {
|
185 |
+
$infoCharacterCount = ($data->networkId != 2 && $data->networkId != 3 && $data->networkId != 19) ? ' (' . __('Text only', 'blog2social') . ')' : '';
|
186 |
$textareaLimitInfo .= '<span class="b2s-post-item-countChar" data-network-count="-1" data-network-auth-id="' . $data->networkAuthId . '">' . (int) $countCharacter . '</span>/' . $limitValue . ' ' . __('characters', 'blog2social') . $infoCharacterCount . '</span>';
|
187 |
$textareaOnKeyUp = 'onkeyup="networkLimitAll(\'' . $data->networkAuthId . '\',\'' . $data->networkId . '\',\'' . $limitValue . '\');"';
|
188 |
} else {
|
202 |
$infoImage .= (in_array($data->networkId, $this->allowNoCustomImagePage)) ? (!empty($infoImage) ? ' | ' : '') . __('Network defines image by link', 'blog2social') . '!' : '';
|
203 |
|
204 |
//ShortText
|
205 |
+
if($isDraft && isset($draftData['content'])) {
|
206 |
+
$message = $draftData['content'];
|
207 |
} else {
|
208 |
+
if ($data->networkId == 1 || $data->networkId == 2 || $data->networkId == 3 || $data->networkId == 12) {
|
209 |
+
$message = $this->getMessagebyTemplate($data);
|
|
|
|
|
|
|
210 |
} else {
|
211 |
+
if (isset($this->setShortTextPage[$data->networkId]) && (int) $this->setShortTextPage[$data->networkId] > 0) {
|
212 |
+
if ($data->networkId == 8) { //Xing -1 Leerzeichen
|
213 |
+
$this->setShortTextPage[$data->networkId] = (int) $this->setShortTextPage[$data->networkId] - mb_strlen($this->postUrl, 'UTF-8') - 1;
|
214 |
+
}
|
215 |
+
$message = B2S_Util::getExcerpt(B2S_Util::prepareContent($this->postId, $this->postData->post_content, $this->postUrl, false, (in_array($data->networkId, $this->allowNoEmoji) ? false : true), $this->userLang), (isset($this->setShortTextPage[$data->networkId]) ? (int) $this->setShortTextPage[$data->networkId] : false), (isset($this->setShortTextPageLimit[$data->networkId]) ? (( is_array($this->setShortTextPageLimit[$data->networkId]) && isset($this->setShortTextPageLimit[$data->networkId][$data->networkKind])) ? (int) $this->setShortTextPageLimit[$data->networkId][$data->networkKind] : (int) $this->setShortTextPageLimit[$data->networkId] ) : false));
|
216 |
+
} else {
|
217 |
+
$message = (in_array($data->networkId, $this->allowTitlePage) ? (in_array($data->networkId, $this->allowNoEmoji) ? B2S_Util::remove4byte(B2S_Util::getTitleByLanguage($this->postData->post_title, $this->userLang)) : B2S_Util::getTitleByLanguage($this->postData->post_title, $this->userLang)) : B2S_Util::prepareContent($this->postId, $this->postData->post_content, $this->postUrl, (in_array($data->networkId, $this->allowHtml) ? '<p><h1><h2><br><i><b><a><img>' : false), (in_array($data->networkId, $this->allowNoEmoji) ? false : true), $this->userLang));
|
218 |
+
}
|
219 |
|
220 |
+
//Hashtags
|
221 |
+
if (in_array($data->networkId, $this->allowHashTags) && ($allowUserHashTag === false || $allowUserHashTag == 1)) {
|
222 |
+
$message .= $this->getHashTagsString();
|
223 |
+
}
|
224 |
}
|
225 |
}
|
|
|
226 |
$message = $this->hook_message($message);
|
227 |
|
228 |
|
241 |
case'2':
|
242 |
//group
|
243 |
//ShortText
|
244 |
+
if($isDraft && isset($draftData['content'])) {
|
245 |
+
$message = $draftData['content'];
|
246 |
} else {
|
247 |
+
if ($data->networkId == 1 || $data->networkId == 2 || $data->networkId == 3 || $data->networkId == 12) {
|
248 |
+
$message = $this->getMessagebyTemplate($data);
|
249 |
} else {
|
250 |
+
if (isset($this->setShortTextGroup[$data->networkId]) && (int) $this->setShortTextGroup[$data->networkId] > 0) {
|
251 |
+
$message = B2S_Util::getExcerpt(B2S_Util::prepareContent($this->postId, $this->postData->post_content, $this->postUrl, false, (in_array($data->networkId, $this->allowNoEmoji) ? false : true), $this->userLang), (isset($this->setShortTextGroup[$data->networkId]) ? (int) $this->setShortTextGroup[$data->networkId] : false), (isset($this->setShortTextGroupLimit[$data->networkId]) ? (int) $this->setShortTextGroupLimit[$data->networkId] : false));
|
252 |
+
} else {
|
253 |
+
$message = (in_array($data->networkId, $this->allowTitleGroup) ? (in_array($data->networkId, $this->allowNoEmoji) ? B2S_Util::remove4byte(B2S_Util::getTitleByLanguage($this->postData->post_title, $this->userLang)) : B2S_Util::getTitleByLanguage($this->postData->post_title, $this->userLang)) : B2S_Util::prepareContent($this->postId, $this->postData->post_content, $this->postUrl, (in_array($data->networkId, $this->allowHtml) ? '<p><h1><h2><br><i><b><a><img>' : false), (in_array($data->networkId, $this->allowNoEmoji) ? false : true), $this->userLang));
|
254 |
+
}
|
255 |
+
//Hashtags
|
256 |
+
if (in_array($data->networkId, $this->allowHashTags) && ($allowUserHashTag === false || $allowUserHashTag == 1)) {
|
257 |
+
$message .= $this->getHashTagsString();
|
258 |
+
}
|
259 |
}
|
260 |
}
|
|
|
261 |
$message = $this->hook_message($message);
|
262 |
|
263 |
$network_display_name = $data->network_display_name;
|
302 |
|
303 |
$content .= '<div class="pull-right hidden-xs b2s-post-item-info-area">';
|
304 |
|
305 |
+
if (in_array($data->networkId, $this->setPostFormat) || ($data->networkId == 19 && $data->networkType == 0)) {
|
306 |
$postFormatType = ($data->networkId == 12) ? 'image' : 'post';
|
307 |
$addCSS = (B2S_PLUGIN_USER_VERSION == 0) ? 'b2s-btn-disabled' : '';
|
308 |
$content .= '<button class="btn btn-xs btn-link b2s-post-ship-item-post-format ' . $addCSS . '" data-post-wp-type="' . $this->b2sPostType . '" data-post-format-type="' . $postFormatType . '" data-network-auth-id="' . $data->networkAuthId . '" data-network-type="' . $data->networkType . '" data-network-id="' . $data->networkId . '" >' . __('post format', 'blog2social') . ': <span class="b2s-post-ship-item-post-format-text" data-post-format-type="' . $postFormatType . '" data-network-auth-id="' . $data->networkAuthId . '" data-network-type="' . $data->networkType . '" data-network-id="' . $data->networkId . '" ></span></button>';
|
309 |
if (B2S_PLUGIN_USER_VERSION > 0) {
|
310 |
+
$content .= '<input type="hidden" class="b2s-post-item-details-post-format form-control" name="b2s[' . $data->networkAuthId . '][post_format]" data-network-auth-id="' . $data->networkAuthId . '" data-network-id="' . $data->networkId . '" data-network-type="' . $data->networkType . '" value="0" />';
|
311 |
} else {
|
312 |
$content .= '<span class="label label-success"><a target="_blank" class="btn-label-premium b2s-btn-trigger-post-ship-item-post-format" data-network-auth-id="' . $data->networkAuthId . '" href="#">PREMIUM</a></span>';
|
313 |
}
|
314 |
}
|
315 |
$content .='<span class="b2s-post-tool-area" data-network-auth-id="' . $data->networkAuthId . '">';
|
316 |
+
$content .= (in_array($data->networkId, $this->setPostFormat) || ($data->networkId == 19 && $data->networkType == 0)) ? ' | ' : '';
|
317 |
if (in_array($data->networkId, $this->getText)) {
|
318 |
$content .= '<button class="btn btn-xs btn-link b2s-post-ship-item-full-text" data-network-id="' . $data->networkId . '" data-network-count="-1" data-network-auth-id="' . $data->networkAuthId . '" >' . __('Insert full-text', 'blog2social') . '</button> | ';
|
319 |
}
|
380 |
$content .= '<input type="hidden" class="form-control" name="b2s[' . $data->networkAuthId . '][network_tos_group_id]" value="' . $data->networkTosGroupId . '">';
|
381 |
$content .= '<input type="hidden" class="form-control networkKind" data-network-auth-id="' . $data->networkAuthId . '" name="b2s[' . $data->networkAuthId . '][network_kind]" value="' . $data->networkKind . '">';
|
382 |
$content .= '<input type="hidden" data-network-auth-id="' . $data->networkAuthId . '" class="form-control b2s-post-ship-network-display-name" name="b2s[' . $data->networkAuthId . '][network_display_name]" value="' . $data->network_display_name . '">';
|
383 |
+
$content .= '<input type="hidden" data-network-auth-id="' . $data->networkAuthId . '" class="b2s-network-default-image" value="' . $this->defaultImage . '">';
|
384 |
|
385 |
$content .= '</div>';
|
386 |
return $content;
|
481 |
$edit = '<textarea class="form-control xing-textarea-input b2s-post-item-details-item-message-input ' . (in_array($networkId, $this->allowHtml) ? 'b2s-post-item-details-item-message-input-allow-html' : '') . '"data-network-count="-1" data-network-id="' . $networkId . '" data-network-text-limit="' . $limitValue . '" data-network-auth-id="' . $networkAuthId . '" placeholder="' . __('Write something about your post...', 'blog2social') . '" name="b2s[' . $networkAuthId . '][content]" ' . $isRequiredTextarea . ' ' . $textareaOnKeyUp . '>' . $message . '</textarea>';
|
482 |
$edit .= '<div class="row">';
|
483 |
$edit .= '<div class="' . ((isset($this->viewMode) && $this->viewMode == 'modal') ? 'col-xs-12' : 'col-xs-12 col-sm-5 col-lg-3') . '">';
|
484 |
+
$edit .= '<button class="btn btn-primary btn-circle b2s-image-remove-btn" data-network-count="-1" data-network-id="' . $networkId . '" data-network-auth-id="' . $networkAuthId . '" ' . ($imageUrl ? '' : 'style="display:none"') . '><i class="glyphicon glyphicon-trash"></i></button>';
|
485 |
+
$edit .= '<img src="' . (isset($meta['image']) && !empty($meta['image']) ? $meta['image'] : $this->defaultImage) . '" class="xing-url-image b2s-post-item-details-url-image center-block img-responsive" data-network-count="-1" data-network-id="' . $networkId . '" data-network-image-change="1" data-network-auth-id="' . $networkAuthId . '">';
|
486 |
$edit .= '<input type="hidden" class="b2s-image-url-hidden-field form-control" data-network-count="-1" data-network-id="' . $networkId . '" data-network-auth-id="' . $networkAuthId . '" value="' . ($imageUrl ? $imageUrl : "") . '" name="b2s[' . $networkAuthId . '][image_url]">';
|
487 |
$edit .= '<div class="clearfix"></div>';
|
488 |
+
$edit .= '<button class="btn btn-link btn-xs center-block b2s-select-image-modal-open" data-network-count="-1" data-network-id="' . $networkId . '" data-network-auth-id="' . $networkAuthId . '" data-post-id="' . $this->postId . '" data-image-url="' . esc_attr($imageUrl) . '">' . __('Change image', 'blog2social') . '</button>';
|
489 |
$edit .= '</div>';
|
490 |
$edit .= '<div class="' . ((isset($this->viewMode) && $this->viewMode == 'modal') ? 'col-xs-12"' : 'col-xs-12 col-sm-7 col-lg-9 b2s-post-original-area" data-network-auth-id="' . $networkAuthId . '"') . '>';
|
491 |
$edit .= '<p class="xing-url-title b2s-post-item-details-preview-title hidden-xs" data-network-auth-id="' . $networkAuthId . '">' . (isset($meta['title']) && !empty($meta['title']) ? $meta['title'] : '') . '</p>';
|
563 |
if (($networkId == 8 || $networkId == 19) && $networkType == 0) {
|
564 |
$edit = '<div class="row"><br>';
|
565 |
$edit .= '<div class="col-xs-12 col-sm-5 col-lg-3">';
|
566 |
+
$edit .= '<button class="btn btn-primary btn-circle b2s-image-remove-btn" data-network-count="' . $schedCount . '" data-network-id="' . $networkId . '" data-network-auth-id="' . $networkAuthId . '" ' . ($imageUrl ? '' : 'style="display:none"') . '><i class="glyphicon glyphicon-trash"></i></button>';
|
567 |
+
$edit .= '<img src="' . $this->defaultImage . '" class="xing-url-image b2s-post-item-details-url-image center-block img-responsive" data-network-count="' . $schedCount . '" data-network-id="' . $networkId . '" data-network-image-change="1" data-network-auth-id="' . $networkAuthId . '">';
|
568 |
$edit .= '<input type="hidden" class="b2s-image-url-hidden-field form-control" data-network-count="' . $schedCount . '" data-network-count="' . $schedCount . '" data-network-id="' . $networkId . '" data-network-auth-id="' . $networkAuthId . '" value="' . ($imageUrl ? $imageUrl : "") . '" name="b2s[' . $networkAuthId . '][sched_image_url][' . $schedCount . ']">';
|
569 |
+
$edit .= '<div class="clearfix"></div>';
|
570 |
+
$edit .= '<button class="btn btn-link btn-xs center-block b2s-select-image-modal-open" data-network-count="' . $schedCount . '" data-network-id="' . $networkId . '" data-network-auth-id="' . $networkAuthId . '" data-post-id="' . $this->postId . '" data-image-url="' . esc_attr($imageUrl) . '">' . __('Change image', 'blog2social') . '</button>';
|
571 |
$edit .= '</div>';
|
572 |
$edit .= '<div class="col-xs-12 col-sm-7 col-lg-9">';
|
573 |
$edit .= $infoArea;
|
741 |
|
742 |
private function getRelayBtnHtml($networkAuthId, $networkId) {
|
743 |
$relay = '<div class="form-group b2s-post-relay-area-select pull-left"><div class="checkbox checbox-switch switch-success"><label>';
|
744 |
+
$relay .='<input type="checkbox" class="b2s-post-item-details-relay form-control" data-user-version="' . B2S_PLUGIN_USER_VERSION . '" data-network-id="' . $networkId . '" data-network-auth-id="' . $networkAuthId . '" name="b2s[' . $networkAuthId . '][post_relay]" value="1"/>';
|
745 |
$relay .='<span></span>';
|
746 |
$relay .= __('Enable Retweets for all Tweets with the selected profile', 'blog2social') . ' <a href="#" data-toggle="modal" data-target="#b2sInfoPostRelayModal" class="btn-xs hidden-sm">' . __('Info', 'blog2social') . '</a>';
|
747 |
$relay .=' </label></div></div>';
|
includes/B2S/Ship/Navbar.php
CHANGED
@@ -4,6 +4,7 @@ class B2S_Ship_Navbar {
|
|
4 |
|
5 |
private $neworkName;
|
6 |
private $networkTypeName;
|
|
|
7 |
private $networkKindName;
|
8 |
private $authUrl;
|
9 |
private $allowProfil;
|
@@ -21,6 +22,7 @@ class B2S_Ship_Navbar {
|
|
21 |
$this->allowPage = unserialize(B2S_PLUGIN_NETWORK_ALLOW_PAGE);
|
22 |
$this->allowGroup = unserialize(B2S_PLUGIN_NETWORK_ALLOW_GROUP);
|
23 |
$this->oAuthPortal = unserialize(B2S_PLUGIN_NETWORK_OAUTH);
|
|
|
24 |
}
|
25 |
|
26 |
public function getData() {
|
@@ -42,22 +44,31 @@ class B2S_Ship_Navbar {
|
|
42 |
return $select;
|
43 |
}
|
44 |
|
45 |
-
public function getItemHtml($data) {
|
46 |
$username = stripslashes($data->networkUserName);
|
47 |
$b2sAuthUrl = $this->authUrl . '&portal_id=' . $data->networkId . '&transfer=' . (in_array($data->networkId, $this->oAuthPortal) ? 'oauth' : 'form' ) . '&mandant_id=' . $data->mandantId . '&version=3&affiliate_id='.B2S_Tools::getAffiliateId();
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
$
|
52 |
-
$userSelected = $wpdb->get_results($wpdb->prepare("SELECT mandant_id FROM b2s_user_network_settings WHERE blog_user_id =%d AND network_auth_id = %d", B2S_PLUGIN_BLOG_USER_ID, $data->networkAuthId));
|
53 |
|
54 |
$mandantIds = array();
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
-
|
60 |
-
|
|
|
|
|
|
|
|
|
|
|
61 |
}
|
62 |
//Bug: Converting json + PHP Extension
|
63 |
if (function_exists('mb_strlen') && function_exists('mb_substr')) {
|
4 |
|
5 |
private $neworkName;
|
6 |
private $networkTypeName;
|
7 |
+
private $networkTypeData;
|
8 |
private $networkKindName;
|
9 |
private $authUrl;
|
10 |
private $allowProfil;
|
22 |
$this->allowPage = unserialize(B2S_PLUGIN_NETWORK_ALLOW_PAGE);
|
23 |
$this->allowGroup = unserialize(B2S_PLUGIN_NETWORK_ALLOW_GROUP);
|
24 |
$this->oAuthPortal = unserialize(B2S_PLUGIN_NETWORK_OAUTH);
|
25 |
+
$this->networkTypeData=array('profile','page', 'group');
|
26 |
}
|
27 |
|
28 |
public function getData() {
|
44 |
return $select;
|
45 |
}
|
46 |
|
47 |
+
public function getItemHtml($data, $draftData = array()) {
|
48 |
$username = stripslashes($data->networkUserName);
|
49 |
$b2sAuthUrl = $this->authUrl . '&portal_id=' . $data->networkId . '&transfer=' . (in_array($data->networkId, $this->oAuthPortal) ? 'oauth' : 'form' ) . '&mandant_id=' . $data->mandantId . '&version=3&affiliate_id='.B2S_Tools::getAffiliateId();
|
50 |
+
|
51 |
+
$chooseData = isset($this->networkTypeData[$data->networkType]) ? $this->networkTypeData[$data->networkType] : 'profile';
|
52 |
+
|
53 |
+
$onclick = ($data->expiredDate != '0000-00-00' && $data->expiredDate <= date('Y-m-d')) ? ' onclick="wop(\'' . $b2sAuthUrl . '&choose='.$chooseData.'&update=' . $data->networkAuthId . '\', \'Blog2Social Network\'); return false;"' : '';
|
|
|
54 |
|
55 |
$mandantIds = array();
|
56 |
+
if(empty($draftData)){
|
57 |
+
global $wpdb;
|
58 |
+
$mandantCount = $wpdb->get_var($wpdb->prepare("SELECT COUNT(mandant_id)FROM b2s_user_network_settings WHERE mandant_id =%d AND blog_user_id=%d ", $data->mandantId, B2S_PLUGIN_BLOG_USER_ID));
|
59 |
+
$userSelected = $wpdb->get_results($wpdb->prepare("SELECT mandant_id FROM b2s_user_network_settings WHERE blog_user_id =%d AND network_auth_id = %d", B2S_PLUGIN_BLOG_USER_ID, $data->networkAuthId));
|
60 |
+
|
61 |
+
foreach ($userSelected as $key => $value) {
|
62 |
+
$mandantIds[] = $value->mandant_id;
|
63 |
+
}
|
64 |
|
65 |
+
if ($mandantCount == 0) {
|
66 |
+
$mandantIds[] = $data->mandantId;
|
67 |
+
}
|
68 |
+
} else {
|
69 |
+
if (array_key_exists($data->networkAuthId, $draftData['b2s'])){
|
70 |
+
$mandantIds[] = "0";
|
71 |
+
}
|
72 |
}
|
73 |
//Bug: Converting json + PHP Extension
|
74 |
if (function_exists('mb_strlen') && function_exists('mb_substr')) {
|
includes/Loader.php
CHANGED
@@ -1,1511 +1,1549 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class B2S_Loader {
|
4 |
-
|
5 |
-
public $blogUserData;
|
6 |
-
public $lastVersion;
|
7 |
-
|
8 |
-
public function __construct() {
|
9 |
-
|
10 |
-
}
|
11 |
-
|
12 |
-
public function load() {
|
13 |
-
if (!is_admin()) {
|
14 |
-
$this->call_public_hooks();
|
15 |
-
}
|
16 |
-
$this->call_global_hooks();
|
17 |
-
if (is_admin()) {
|
18 |
-
$this->call_admin_hooks();
|
19 |
-
}
|
20 |
-
}
|
21 |
-
|
22 |
-
public function call_global_hooks() {
|
23 |
-
|
24 |
-
$this->b2s_register_custom_post_type();
|
25 |
-
|
26 |
-
require_once(B2S_PLUGIN_DIR . 'includes/Options.php');
|
27 |
-
require_once(B2S_PLUGIN_DIR . 'includes/B2S/AutoPost.php');
|
28 |
-
require_once(B2S_PLUGIN_DIR . 'includes/B2S/Rating.php');
|
29 |
-
require_once(B2S_PLUGIN_DIR . 'includes/B2S/Heartbeat.php');
|
30 |
-
require_once(B2S_PLUGIN_DIR . 'includes/B2S/Api/Post.php');
|
31 |
-
require_once(B2S_PLUGIN_DIR . 'includes/B2S/Api/Get.php');
|
32 |
-
require_once(B2S_PLUGIN_DIR . 'includes/Util.php');
|
33 |
-
require_once(B2S_PLUGIN_DIR . 'includes/Tools.php');
|
34 |
-
|
35 |
-
define('B2S_PLUGIN_POSTPERPAGE', '15');
|
36 |
-
define('B2S_PLUGIN_VERSION_TYPE', serialize(array(0 => 'Free', 1 => 'Smart', 2 => 'Pro', 3 => 'Business', 4 => 'Premium')));
|
37 |
-
define('B2S_PLUGIN_NETWORK', serialize(array(1 => 'Facebook', 2 => 'Twitter', 3 => 'Linkedin', 4 => 'Tumblr', 5 => 'Storify', 6 => 'Pinterest', 7 => 'Flickr', 8 => 'Xing', 9 => 'Diigo', 10 => 'Google+', 11 => 'Medium', 12 => 'Instagram', 13 => 'Delicious', 14 => 'Torial', 15 => 'Reddit', 16 => 'Bloglovin', 17 => 'VKontakte', 18 => 'Google My Business', 19 => 'Xing', 20 => 'Pinterest')));
|
38 |
-
define('B2S_PLUGIN_SCHED_DEFAULT_TIMES', serialize(array(1 => array(18, 22), 2 => array(8, 10), 3 => array(8, 10), 4 => array(16, 22), 5 => array(), 6 => array(19, 22), 7 => array(7, 9), 8 => array(7, 10), 9 => array(16, 19), 10 => array(7, 10), 11 => array(16, 19), 12 => array(19, 22), 13 => array(11, 13), 14 => array(18, 22), 15 => array(8, 11), 16 => array(16, 19), 17 => array(19, 23), 18 => array(17, 18), 19 => array(7, 10))));
|
39 |
-
define('B2S_PLUGIN_SCHED_DEFAULT_TIMES_INFO', serialize(array(1 => array(0 => array(13, 16), 1 => array(18, 22)), 2 => array(0 => array(8, 10), 1 => array(11, 13), 2 => array(16, 19)), 3 => array(0 => array(8, 10), 1 => array(16, 18)), 4 => array(), 5 => array(), 6 => array(0 => array(12, 14), 1 => array(19, 22)), 7 => array(0 => array(7, 9), 1 => array(17, 19)), 8 => array(0 => array(7, 10), 1 => array(17, 18)), 9 => array(0 => array(8, 10), 1 => array(11, 13), 2 => array(16, 19)), 10 => array(0 => array(7, 10), 1 => array(14, 15)), 11 => array(), 12 => array(0 => array(12, 14), 1 => array(19, 22)), 13 => array(0 => array(8, 10), 1 => array(11, 13), 2 => array(16, 19)), 14 => array(), 15 => array(0 => array(8, 11)), 16 => array(0 => array(16, 19)), 17 => array(0 => array(19, 23)), 18 => array(0 => array(17, 18)), 19 => array(0 => array(7, 10), 1 => array(17, 18)), 20 => array(0 => array(12, 14), 1 => array(19, 22)))));
|
40 |
-
define('B2S_PLUGIN_NETWORK_ALLOW_PROFILE', serialize(array(1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)));
|
41 |
-
define('B2S_PLUGIN_NETWORK_ALLOW_PAGE', serialize(array(1, 3, 10, 17, 19)));
|
42 |
-
define('B2S_PLUGIN_NETWORK_ALLOW_GROUP', serialize(array(1, 10, 11, 17, 19)));
|
43 |
-
define('B2S_PLUGIN_NETWORK_CROSSPOSTING_LIMIT', serialize(array(19 => array(2 => 3)))); //2=group
|
44 |
-
define('B2S_PLUGIN_NETWORK_ALLOW_MODIFY_BOARD_AND_GROUP', serialize(array(6 => array('TYPE' => array(0), 'TITLE' => __('Modify pin board', 'blog2social')), 8 => array('TYPE' => array(2), 'TITLE' => __('Edit group settings', 'blog2social')), 15 => array('TYPE' => array(0), 'TITLE' => __('Modify subreddit', 'blog2social')), 19 => array('TYPE' => array(2), 'TITLE' => __('Modify forum', 'blog2social')), 20 => array('TYPE' => array(0), 'TITLE' => __('Modify pin board', 'blog2social')))));
|
45 |
-
define('B2S_PLUGIN_AUTO_POST_LIMIT', serialize(array(0 => 0, 1 => 25, 2 => 50, 3 => 100, 4 => 100)));
|
46 |
-
define('B2S_PLUGIN_NETWORK_OAUTH', serialize(array(1, 2, 3, 4, 7, 8, 11, 15, 17, 18, 20)));
|
47 |
-
define('B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT', serialize(array(
|
48 |
-
1 => array(0 => array('short_text' => array('active' => 0, 'range_min' => 239, 'range_max' => 400, 'excerpt_range_min' => 239, 'excerpt_range_max' => 400, 'limit' => 500), 'content' => '{CONTENT}', 'format' => 0),
|
49 |
-
1 => array('short_text' => array('active' => 0, 'range_min' => 239, 'range_max' => 400, 'excerpt_range_min' => 239, 'excerpt_range_max' => 400, 'limit' => 0), 'content' => '{CONTENT}', 'format' => 0),
|
50 |
-
2 => array('short_text' => array('active' => 0, 'range_min' => 239, 'range_max' => 400, 'excerpt_range_min' => 239, 'excerpt_range_max' => 400, 'limit' => 0), 'content' => '{CONTENT}', 'format' => 0)
|
51 |
-
),
|
52 |
-
2 => array(0 => array('short_text' => array('active' => 0, 'range_min' => 255, 'range_max' => 256, 'excerpt_range_min' => 255, 'excerpt_range_max' => 256, 'limit' => 280), 'content' => '{CONTENT}', 'format' => 1)),
|
53 |
-
3 => array(0 => array('short_text' => array('active' => 0, 'range_min' => 239, 'range_max' => 400, 'excerpt_range_min' => 239, 'excerpt_range_max' => 400, 'limit' => 1300), 'content' => '{CONTENT}', 'format' => 0),
|
54 |
-
1 => array('short_text' => array('active' => 0, 'range_min' => 239, 'range_max' => 400, 'excerpt_range_min' => 239, 'excerpt_range_max' => 400, 'limit' => 1300), 'content' => '{CONTENT}', 'format' => 0),
|
55 |
-
),
|
56 |
-
12 => array(0 => array('short_text' => array('active' => 0, 'range_min' => 240, 'range_max' => 400, 'excerpt_range_min' => 240, 'excerpt_range_max' => 400, 'limit' => 2000), 'content' => '{CONTENT}', 'format' => 1))
|
57 |
-
|
58 |
-
|
59 |
-
define('
|
60 |
-
define('
|
61 |
-
define('
|
62 |
-
define('
|
63 |
-
define('
|
64 |
-
define('
|
65 |
-
define('
|
66 |
-
define('
|
67 |
-
define('
|
68 |
-
define('
|
69 |
-
define('
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
add_action('
|
74 |
-
add_action('
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
require_once(B2S_PLUGIN_DIR . 'includes/
|
81 |
-
require_once(B2S_PLUGIN_DIR . 'includes/
|
82 |
-
require_once(B2S_PLUGIN_DIR . 'includes/
|
83 |
-
require_once(B2S_PLUGIN_DIR . 'includes/PRG/Api/
|
84 |
-
require_once(B2S_PLUGIN_DIR . 'includes/
|
85 |
-
require_once(B2S_PLUGIN_DIR . 'includes/Ajax/
|
86 |
-
require_once(B2S_PLUGIN_DIR . 'includes/
|
87 |
-
require_once(B2S_PLUGIN_DIR . 'includes/B2S/
|
88 |
-
require_once(B2S_PLUGIN_DIR . 'includes/
|
89 |
-
require_once(B2S_PLUGIN_DIR . 'includes/
|
90 |
-
|
91 |
-
|
92 |
-
define('
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
//
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
add_action('
|
103 |
-
add_action('
|
104 |
-
add_action('
|
105 |
-
add_action('
|
106 |
-
add_action('admin_notices', array(
|
107 |
-
add_action('
|
108 |
-
add_action('
|
109 |
-
add_action('
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
$this->
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
'
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
$
|
151 |
-
$
|
152 |
-
|
153 |
-
openssl_private_decrypt(base64_decode(trim($post['user']['
|
154 |
-
$
|
155 |
-
$
|
156 |
-
$
|
157 |
-
$
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
$
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
$
|
221 |
-
$
|
222 |
-
$
|
223 |
-
$
|
224 |
-
$
|
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 |
-
$
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
$
|
258 |
-
$
|
259 |
-
$
|
260 |
-
$
|
261 |
-
$
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
$
|
266 |
-
$
|
267 |
-
$
|
268 |
-
|
269 |
-
|
270 |
-
$
|
271 |
-
$
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
'
|
276 |
-
'
|
277 |
-
'
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
$
|
300 |
-
$
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
$
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
$
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
$
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
add_meta_box('b2s-post-box-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
wp_enqueue_style('
|
374 |
-
|
375 |
-
wp_enqueue_script('
|
376 |
-
wp_enqueue_script('
|
377 |
-
wp_enqueue_script('
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
$
|
382 |
-
$
|
383 |
-
$
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
wp_enqueue_style('
|
390 |
-
|
391 |
-
wp_enqueue_script('
|
392 |
-
wp_enqueue_script('
|
393 |
-
wp_enqueue_script('
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
$meta
|
418 |
-
$
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
$
|
426 |
-
$meta->setMeta('
|
427 |
-
$meta->setMeta('
|
428 |
-
$meta->
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
$meta
|
435 |
-
$
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
$
|
443 |
-
$meta->setMeta('
|
444 |
-
$meta->setMeta('
|
445 |
-
$meta->
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
$
|
457 |
-
$
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
$
|
479 |
-
$
|
480 |
-
$
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
$
|
501 |
-
$
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
$
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
$
|
524 |
-
$
|
525 |
-
$
|
526 |
-
|
527 |
-
|
528 |
-
$
|
529 |
-
$
|
530 |
-
$
|
531 |
-
$
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
'
|
536 |
-
'
|
537 |
-
'
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
$
|
549 |
-
$
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
$
|
557 |
-
$
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
//
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
$
|
594 |
-
$
|
595 |
-
|
596 |
-
|
597 |
-
//
|
598 |
-
|
599 |
-
|
600 |
-
$
|
601 |
-
$meta
|
602 |
-
|
603 |
-
|
604 |
-
$meta->
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
$
|
610 |
-
$meta
|
611 |
-
|
612 |
-
|
613 |
-
$meta->
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
$_POST['
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
$
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
define('
|
722 |
-
define('
|
723 |
-
define('
|
724 |
-
|
725 |
-
'
|
726 |
-
'
|
727 |
-
'
|
728 |
-
'
|
729 |
-
'
|
730 |
-
'
|
731 |
-
'
|
732 |
-
'
|
733 |
-
'
|
734 |
-
'
|
735 |
-
'
|
736 |
-
'
|
737 |
-
'
|
738 |
-
'
|
739 |
-
'
|
740 |
-
'
|
741 |
-
'
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
$
|
756 |
-
|
757 |
-
|
758 |
-
define('
|
759 |
-
}
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
}
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
'
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
$subPages[] = add_submenu_page('blog2social', __('
|
800 |
-
$subPages[] = add_submenu_page('blog2social', __('
|
801 |
-
$subPages[] = add_submenu_page('blog2social', __('
|
802 |
-
$subPages[] = add_submenu_page('blog2social', __('
|
803 |
-
$subPages[] = add_submenu_page('blog2social', __('
|
804 |
-
$subPages[] = add_submenu_page('blog2social', __('
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
$subPages[] = add_submenu_page(
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
$subPages[] = add_submenu_page(null, '
|
813 |
-
$subPages[] = add_submenu_page(null, '
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
$
|
833 |
-
|
834 |
-
'
|
835 |
-
'
|
836 |
-
'
|
837 |
-
));
|
838 |
-
|
839 |
-
$wp_admin_bar->add_node(array(
|
840 |
-
'id' => 'blog2social-
|
841 |
-
'title' => __('
|
842 |
-
'href' => $seo_url . 'blog2social
|
843 |
-
'parent' => 'blog2social'
|
844 |
-
));
|
845 |
-
|
846 |
-
$wp_admin_bar->add_node(array(
|
847 |
-
'id' => 'blog2social-
|
848 |
-
'title' => __('
|
849 |
-
'href' => $seo_url . 'blog2social-
|
850 |
-
'parent' => 'blog2social'
|
851 |
-
));
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
'
|
856 |
-
'
|
857 |
-
'
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
$wp_admin_bar->add_node(array(
|
862 |
-
'id' => 'blog2social-
|
863 |
-
'title' => __('
|
864 |
-
'href' => $seo_url . 'blog2social-
|
865 |
-
'parent' => 'blog2social'
|
866 |
-
));
|
867 |
-
|
868 |
-
|
869 |
-
'
|
870 |
-
'
|
871 |
-
'
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
'
|
876 |
-
'
|
877 |
-
'
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
if (
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
wp_enqueue_style('
|
912 |
-
|
913 |
-
wp_enqueue_script('
|
914 |
-
wp_enqueue_script('
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
wp_enqueue_style('
|
925 |
-
wp_enqueue_script('
|
926 |
-
|
927 |
-
|
928 |
-
require_once( B2S_PLUGIN_DIR . 'views/
|
929 |
-
}
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
wp_enqueue_style('
|
938 |
-
wp_enqueue_script('
|
939 |
-
|
940 |
-
|
941 |
-
require_once( B2S_PLUGIN_DIR . 'views/
|
942 |
-
}
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
wp_enqueue_style('
|
951 |
-
wp_enqueue_script('
|
952 |
-
|
953 |
-
wp_enqueue_script('
|
954 |
-
require_once( B2S_PLUGIN_DIR . 'views/b2s/
|
955 |
-
} else {
|
956 |
-
require_once( B2S_PLUGIN_DIR . 'views/notice.php');
|
957 |
-
}
|
958 |
-
}
|
959 |
-
|
960 |
-
//PageFunktion
|
961 |
-
public function
|
962 |
-
if (B2S_Tools::showNotice() == false) {
|
963 |
-
wp_enqueue_style('
|
964 |
-
wp_enqueue_script('
|
965 |
-
wp_enqueue_style('B2STIMEPICKERCSS');
|
966 |
-
wp_enqueue_script('B2STIMEPICKERJS');
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
//
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
wp_enqueue_script('
|
1003 |
-
wp_enqueue_script('
|
1004 |
-
wp_enqueue_script('
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
require_once( B2S_PLUGIN_DIR . 'views/
|
1025 |
-
}
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
wp_enqueue_style('
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
require_once( B2S_PLUGIN_DIR . 'views/
|
1097 |
-
}
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
wp_enqueue_style('
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
wp_enqueue_style('
|
1117 |
-
wp_enqueue_script('
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
}
|
1174 |
-
|
1175 |
-
//PageFunktion
|
1176 |
-
public function
|
1177 |
-
if (B2S_Tools::showNotice() == false) {
|
1178 |
-
wp_enqueue_style('
|
1179 |
-
wp_enqueue_script('
|
1180 |
-
wp_enqueue_script('PRGGENERALJS');
|
1181 |
-
require_once( B2S_PLUGIN_DIR . 'views/
|
1182 |
-
} else {
|
1183 |
-
require_once( B2S_PLUGIN_DIR . 'views/notice.php');
|
1184 |
-
}
|
1185 |
-
}
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
if (
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
}
|
1197 |
-
}
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
wp_register_style('
|
1231 |
-
wp_register_style('
|
1232 |
-
wp_register_style('
|
1233 |
-
wp_register_style('
|
1234 |
-
wp_register_style('
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
wp_register_script('
|
1262 |
-
wp_register_script('
|
1263 |
-
wp_register_script('
|
1264 |
-
wp_register_script('
|
1265 |
-
wp_register_script('
|
1266 |
-
wp_register_script('
|
1267 |
-
wp_register_script('
|
1268 |
-
wp_register_script('
|
1269 |
-
wp_register_script('
|
1270 |
-
wp_register_script('
|
1271 |
-
|
1272 |
-
wp_register_script('
|
1273 |
-
wp_register_script('
|
1274 |
-
wp_register_script('
|
1275 |
-
wp_register_script('
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
$
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
$
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
$
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
}
|
1411 |
-
|
1412 |
-
$
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
$
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
$
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
)
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
$
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
$
|
1503 |
-
$
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
$
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class B2S_Loader {
|
4 |
+
|
5 |
+
public $blogUserData;
|
6 |
+
public $lastVersion;
|
7 |
+
|
8 |
+
public function __construct() {
|
9 |
+
|
10 |
+
}
|
11 |
+
|
12 |
+
public function load() {
|
13 |
+
if (!is_admin()) {
|
14 |
+
$this->call_public_hooks();
|
15 |
+
}
|
16 |
+
$this->call_global_hooks();
|
17 |
+
if (is_admin()) {
|
18 |
+
$this->call_admin_hooks();
|
19 |
+
}
|
20 |
+
}
|
21 |
+
|
22 |
+
public function call_global_hooks() {
|
23 |
+
|
24 |
+
$this->b2s_register_custom_post_type();
|
25 |
+
|
26 |
+
require_once(B2S_PLUGIN_DIR . 'includes/Options.php');
|
27 |
+
require_once(B2S_PLUGIN_DIR . 'includes/B2S/AutoPost.php');
|
28 |
+
require_once(B2S_PLUGIN_DIR . 'includes/B2S/Rating.php');
|
29 |
+
require_once(B2S_PLUGIN_DIR . 'includes/B2S/Heartbeat.php');
|
30 |
+
require_once(B2S_PLUGIN_DIR . 'includes/B2S/Api/Post.php');
|
31 |
+
require_once(B2S_PLUGIN_DIR . 'includes/B2S/Api/Get.php');
|
32 |
+
require_once(B2S_PLUGIN_DIR . 'includes/Util.php');
|
33 |
+
require_once(B2S_PLUGIN_DIR . 'includes/Tools.php');
|
34 |
+
|
35 |
+
define('B2S_PLUGIN_POSTPERPAGE', '15');
|
36 |
+
define('B2S_PLUGIN_VERSION_TYPE', serialize(array(0 => 'Free', 1 => 'Smart', 2 => 'Pro', 3 => 'Business', 4 => 'Premium')));
|
37 |
+
define('B2S_PLUGIN_NETWORK', serialize(array(1 => 'Facebook', 2 => 'Twitter', 3 => 'Linkedin', 4 => 'Tumblr', 5 => 'Storify', 6 => 'Pinterest', 7 => 'Flickr', 8 => 'Xing', 9 => 'Diigo', 10 => 'Google+', 11 => 'Medium', 12 => 'Instagram', 13 => 'Delicious', 14 => 'Torial', 15 => 'Reddit', 16 => 'Bloglovin', 17 => 'VKontakte', 18 => 'Google My Business', 19 => 'Xing', 20 => 'Pinterest')));
|
38 |
+
define('B2S_PLUGIN_SCHED_DEFAULT_TIMES', serialize(array(1 => array(18, 22), 2 => array(8, 10), 3 => array(8, 10), 4 => array(16, 22), 5 => array(), 6 => array(19, 22), 7 => array(7, 9), 8 => array(7, 10), 9 => array(16, 19), 10 => array(7, 10), 11 => array(16, 19), 12 => array(19, 22), 13 => array(11, 13), 14 => array(18, 22), 15 => array(8, 11), 16 => array(16, 19), 17 => array(19, 23), 18 => array(17, 18), 19 => array(7, 10))));
|
39 |
+
define('B2S_PLUGIN_SCHED_DEFAULT_TIMES_INFO', serialize(array(1 => array(0 => array(13, 16), 1 => array(18, 22)), 2 => array(0 => array(8, 10), 1 => array(11, 13), 2 => array(16, 19)), 3 => array(0 => array(8, 10), 1 => array(16, 18)), 4 => array(), 5 => array(), 6 => array(0 => array(12, 14), 1 => array(19, 22)), 7 => array(0 => array(7, 9), 1 => array(17, 19)), 8 => array(0 => array(7, 10), 1 => array(17, 18)), 9 => array(0 => array(8, 10), 1 => array(11, 13), 2 => array(16, 19)), 10 => array(0 => array(7, 10), 1 => array(14, 15)), 11 => array(), 12 => array(0 => array(12, 14), 1 => array(19, 22)), 13 => array(0 => array(8, 10), 1 => array(11, 13), 2 => array(16, 19)), 14 => array(), 15 => array(0 => array(8, 11)), 16 => array(0 => array(16, 19)), 17 => array(0 => array(19, 23)), 18 => array(0 => array(17, 18)), 19 => array(0 => array(7, 10), 1 => array(17, 18)), 20 => array(0 => array(12, 14), 1 => array(19, 22)))));
|
40 |
+
define('B2S_PLUGIN_NETWORK_ALLOW_PROFILE', serialize(array(1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)));
|
41 |
+
define('B2S_PLUGIN_NETWORK_ALLOW_PAGE', serialize(array(1, 3, 10, 17, 19)));
|
42 |
+
define('B2S_PLUGIN_NETWORK_ALLOW_GROUP', serialize(array(1, 10, 11, 17, 19)));
|
43 |
+
define('B2S_PLUGIN_NETWORK_CROSSPOSTING_LIMIT', serialize(array(19 => array(2 => 3)))); //2=group
|
44 |
+
define('B2S_PLUGIN_NETWORK_ALLOW_MODIFY_BOARD_AND_GROUP', serialize(array(6 => array('TYPE' => array(0), 'TITLE' => __('Modify pin board', 'blog2social')), 8 => array('TYPE' => array(2), 'TITLE' => __('Edit group settings', 'blog2social')), 15 => array('TYPE' => array(0), 'TITLE' => __('Modify subreddit', 'blog2social')), 19 => array('TYPE' => array(2), 'TITLE' => __('Modify forum', 'blog2social')), 20 => array('TYPE' => array(0), 'TITLE' => __('Modify pin board', 'blog2social')))));
|
45 |
+
define('B2S_PLUGIN_AUTO_POST_LIMIT', serialize(array(0 => 0, 1 => 25, 2 => 50, 3 => 100, 4 => 100)));
|
46 |
+
define('B2S_PLUGIN_NETWORK_OAUTH', serialize(array(1, 2, 3, 4, 7, 8, 11, 15, 17, 18, 20)));
|
47 |
+
define('B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT', serialize(array(
|
48 |
+
1 => array(0 => array('short_text' => array('active' => 0, 'range_min' => 239, 'range_max' => 400, 'excerpt_range_min' => 239, 'excerpt_range_max' => 400, 'limit' => 500), 'content' => '{CONTENT}', 'format' => 0),
|
49 |
+
1 => array('short_text' => array('active' => 0, 'range_min' => 239, 'range_max' => 400, 'excerpt_range_min' => 239, 'excerpt_range_max' => 400, 'limit' => 0), 'content' => '{CONTENT}', 'format' => 0),
|
50 |
+
2 => array('short_text' => array('active' => 0, 'range_min' => 239, 'range_max' => 400, 'excerpt_range_min' => 239, 'excerpt_range_max' => 400, 'limit' => 0), 'content' => '{CONTENT}', 'format' => 0)
|
51 |
+
),
|
52 |
+
2 => array(0 => array('short_text' => array('active' => 0, 'range_min' => 255, 'range_max' => 256, 'excerpt_range_min' => 255, 'excerpt_range_max' => 256, 'limit' => 280), 'content' => '{CONTENT}', 'format' => 1)),
|
53 |
+
3 => array(0 => array('short_text' => array('active' => 0, 'range_min' => 239, 'range_max' => 400, 'excerpt_range_min' => 239, 'excerpt_range_max' => 400, 'limit' => 1300), 'content' => '{CONTENT}', 'format' => 0),
|
54 |
+
1 => array('short_text' => array('active' => 0, 'range_min' => 239, 'range_max' => 400, 'excerpt_range_min' => 239, 'excerpt_range_max' => 400, 'limit' => 1300), 'content' => '{CONTENT}', 'format' => 0),
|
55 |
+
),
|
56 |
+
12 => array(0 => array('short_text' => array('active' => 0, 'range_min' => 240, 'range_max' => 400, 'excerpt_range_min' => 240, 'excerpt_range_max' => 400, 'limit' => 2000), 'content' => '{CONTENT}', 'format' => 1)),
|
57 |
+
19 => array(0 => array('short_text' => array('active' => 0, 'range_min' => 239, 'range_max' => 320, 'excerpt_range_min' => 239, 'excerpt_range_max' => 320, 'limit' => 420), 'content' => '{CONTENT}', 'format' => 0))
|
58 |
+
)));
|
59 |
+
define('B2S_PLUGIN_SYSTEMREQUIREMENT_WORDPRESSVERSION', '4.4.2');
|
60 |
+
define('B2S_PLUGIN_SYSTEMREQUIREMENT_PHPVERSION', '5.5.3');
|
61 |
+
define('B2S_PLUGIN_SYSTEMREQUIREMENT_MYSQLVERSION', '5.5.3');
|
62 |
+
define('B2S_PLUGIN_SYSTEMREQUIREMENT_DATABASERIGHTS', true);
|
63 |
+
define('B2S_PLUGIN_SYSTEMREQUIREMENT_HEARTBEAT', true);
|
64 |
+
define('B2S_PLUGIN_SYSTEMREQUIREMENT_PHPCURL', true);
|
65 |
+
define('B2S_PLUGIN_SYSTEMREQUIREMENT_PHPDOM', true);
|
66 |
+
define('B2S_PLUGIN_SYSTEMREQUIREMENT_HOTLINKPROTECTION', true);
|
67 |
+
define('B2S_PLUGIN_SYSTEMREQUIREMENT_PLUGINWARNING_WORDS', serialize(array('hotlink', 'firewall', 'security', 'heartbeat')));
|
68 |
+
define('B2S_PLUGIN_SYSTEMREQUIREMENT_WPJSON', true);
|
69 |
+
define('B2S_PLUGIN_SYSTEMREQUIREMENT_OPENSSL', true);
|
70 |
+
define('B2S_PLUGIN_PAGE_SLUG', serialize(array('blog2social', 'blog2social-post', 'blog2social-calendar', 'blog2social-curation', 'blog2social-network', 'blog2social-settings', 'prg-post', 'blog2social-support', 'blog2social-premium', 'blog2social-sched', 'blog2social-approve', 'blog2social-publish', 'blog2social-notice', 'blog2social-ship', 'blog2social-curation-draft', 'blog2social-draft-post', 'prg-login', 'prg-ship')));
|
71 |
+
|
72 |
+
add_filter('heartbeat_received', array(B2S_Heartbeat::getInstance(), 'init'), 10, 2);
|
73 |
+
add_action('wp_logout', array($this, 'releaseLocks'));
|
74 |
+
add_action('transition_post_status', array($this, 'b2s_auto_post_import'), 9999, 3); //for Auto-Posting imported + manuell
|
75 |
+
add_action('rest_api_init', array($this, 'b2s_rest_api_init'));
|
76 |
+
}
|
77 |
+
|
78 |
+
public function call_admin_hooks() {
|
79 |
+
|
80 |
+
require_once(B2S_PLUGIN_DIR . 'includes/Meta.php');
|
81 |
+
require_once(B2S_PLUGIN_DIR . 'includes/B2S/PostBox.php');
|
82 |
+
require_once(B2S_PLUGIN_DIR . 'includes/Notice.php');
|
83 |
+
require_once(B2S_PLUGIN_DIR . 'includes/PRG/Api/Post.php');
|
84 |
+
require_once(B2S_PLUGIN_DIR . 'includes/PRG/Api/Get.php');
|
85 |
+
require_once(B2S_PLUGIN_DIR . 'includes/Ajax/Post.php');
|
86 |
+
require_once(B2S_PLUGIN_DIR . 'includes/Ajax/Get.php');
|
87 |
+
require_once(B2S_PLUGIN_DIR . 'includes/B2S/AutoPost.php');
|
88 |
+
require_once(B2S_PLUGIN_DIR . 'includes/B2S/Rating.php');
|
89 |
+
require_once(B2S_PLUGIN_DIR . 'includes/Util.php');
|
90 |
+
require_once(B2S_PLUGIN_DIR . 'includes/Tools.php');
|
91 |
+
|
92 |
+
define('B2S_PLUGIN_BLOG_USER_ID', get_current_user_id());
|
93 |
+
define('B2S_PLUGIN_ADMIN', current_user_can('edit_others_posts'));
|
94 |
+
|
95 |
+
$this->blogUserData = get_userdata(B2S_PLUGIN_BLOG_USER_ID);
|
96 |
+
|
97 |
+
//deactivated since 4.2.0
|
98 |
+
//add_action('plugins_loaded', array($this, 'update_db_check'));
|
99 |
+
|
100 |
+
$this->update_db_check();
|
101 |
+
|
102 |
+
add_action('admin_init', array($this, 'registerAssets'));
|
103 |
+
add_action('admin_enqueue_scripts', array($this, 'addBootAssets'));
|
104 |
+
add_action('admin_menu', array($this, 'createMenu'));
|
105 |
+
add_action('admin_bar_menu', array($this, 'createToolbarMenu'), 94);
|
106 |
+
add_action('admin_notices', array('B2S_Notice', 'getProVersionNotice'));
|
107 |
+
add_action('admin_notices', array($this, 'b2s_save_post_alert_meta_box'));
|
108 |
+
add_action('add_meta_boxes', array($this, 'b2s_load_post_box'));
|
109 |
+
add_action('save_post', array($this, 'b2s_save_post_box'), 1, 3);
|
110 |
+
add_action('trash_post', array($this, 'b2s_delete_sched_post'), 10);
|
111 |
+
|
112 |
+
add_action('admin_footer', array($this, 'plugin_deactivate_add_modal'));
|
113 |
+
add_filter('plugin_action_links_' . B2S_PLUGIN_BASENAME, array($this, 'override_plugin_action_links'));
|
114 |
+
|
115 |
+
Ajax_Get::getInstance();
|
116 |
+
Ajax_Post::getInstance();
|
117 |
+
|
118 |
+
if ((int) B2S_PLUGIN_BLOG_USER_ID > 0) {
|
119 |
+
$this->getToken();
|
120 |
+
$this->getUserDetails();
|
121 |
+
}
|
122 |
+
$this->plugin_init_language();
|
123 |
+
}
|
124 |
+
|
125 |
+
public function call_public_hooks() {
|
126 |
+
add_filter('wp_footer', array($this, 'b2s_get_full_content'), 99); //for shortcodes
|
127 |
+
add_action('wp_head', array($this, 'b2s_build_frontend_meta'), 1); // for MetaTags
|
128 |
+
}
|
129 |
+
|
130 |
+
public function b2s_build_frontend_meta() {
|
131 |
+
require_once(B2S_PLUGIN_DIR . 'includes/Meta.php');
|
132 |
+
B2S_Meta::getInstance()->_run();
|
133 |
+
}
|
134 |
+
|
135 |
+
public function b2s_rest_api_init() {
|
136 |
+
register_rest_route('blog2social/v1/post', '/authorize', array(
|
137 |
+
'methods' => WP_REST_Server::CREATABLE,
|
138 |
+
'callback' => array($this, 'b2s_rest_api_post_authorize')
|
139 |
+
));
|
140 |
+
}
|
141 |
+
|
142 |
+
public function b2s_rest_api_post_authorize($post = array()) {
|
143 |
+
$contentType = 'application/json';
|
144 |
+
if (isset($post['token']) && !empty($post['token']) && isset($post['user']) && !empty($post['user']) && isset($post['network_id']) && (int) $post['network_id'] > 0) {
|
145 |
+
$privateKey = B2S_PLUGIN_DIR . '/includes/B2S/Api/Network/private_key.pem';
|
146 |
+
if (function_exists('openssl_public_decrypt') && file_exists($privateKey)) {
|
147 |
+
if ((int) $post['network_id'] == 6) {
|
148 |
+
try {
|
149 |
+
require_once(B2S_PLUGIN_DIR . 'includes/B2S/Api/Network/Pinterest.php');
|
150 |
+
$user = '';
|
151 |
+
$pass = '';
|
152 |
+
$getPrivateKey = file_get_contents($privateKey);
|
153 |
+
openssl_private_decrypt(base64_decode(trim($post['user']['pass'])), $pass, $getPrivateKey);
|
154 |
+
openssl_private_decrypt(base64_decode(trim($post['user']['name'])), $user, $getPrivateKey);
|
155 |
+
$pt = new B2S_Api_Network_Pinterest();
|
156 |
+
$result = $pt->authorize($user, $pass);
|
157 |
+
$status = isset($result['cookie_data']) && !empty($result['cookie_data']) ? 200 : 400;
|
158 |
+
$response = array('code' => $status, 'result' => array_merge($result, array('token' => $post['token'], 'network_id' => (int) $post['network_id'])));
|
159 |
+
return new WP_REST_Response($response, $status, array('Content-Type: ' . $contentType));
|
160 |
+
} catch (Exception $ex) {
|
161 |
+
$response = array('code' => 500, 'result' => array('token' => $post['token'], 'network_id' => (int) $post['network_id'], 'error' => 1, 'error_pos' => 8, 'error_data' => serialize($ex->getMessage())));
|
162 |
+
return new WP_REST_Response($response, 500, array('Content-Type: ' . $contentType));
|
163 |
+
}
|
164 |
+
}
|
165 |
+
$response = array('code' => 409, 'result' => array('token' => $post['token'], 'network_id' => (int) $post['network_id'], 'error' => 1, 'error_pos' => 9, 'error_data' => 'network_not_exists'));
|
166 |
+
return new WP_REST_Response($response, 409, array('Content-Type: ' . $contentType));
|
167 |
+
}
|
168 |
+
$response = array('code' => 501, 'result' => array('token' => $post['token'], 'network_id' => (int) $post['network_id'], 'error' => 1, 'error_pos' => 9, 'error_data' => 'openssl_not_exists'));
|
169 |
+
return new WP_REST_Response($response, 501, array('Content-Type: ' . $contentType));
|
170 |
+
}
|
171 |
+
$response = array('code' => 502, 'result' => array('error' => 1, 'error_pos' => 10, 'error_data' => 'bad_request'));
|
172 |
+
return new WP_REST_Response($response, 502, array('Content-Type: ' . $contentType));
|
173 |
+
}
|
174 |
+
|
175 |
+
private function b2s_register_custom_post_type() {
|
176 |
+
if (post_type_exists("b2s_ex_post")) {
|
177 |
+
return;
|
178 |
+
}
|
179 |
+
register_post_type('b2s_ex_post', array('public' => false, 'label' => 'Related Posts for Blog2Social'));
|
180 |
+
}
|
181 |
+
|
182 |
+
public function plugin_deactivate_add_modal() {
|
183 |
+
include_once(B2S_PLUGIN_DIR . '/views/b2s/partials/plugin-deactivate-modal.php');
|
184 |
+
}
|
185 |
+
|
186 |
+
public function b2s_auto_post_import($new_status, $old_status, $post) {
|
187 |
+
|
188 |
+
//is first publish
|
189 |
+
if ($old_status != 'publish' && $old_status != 'trash' && $new_status == 'publish' && isset($post->post_author) && (int) $post->post_author > 0) {
|
190 |
+
if (wp_is_post_revision($post->ID)) {
|
191 |
+
return;
|
192 |
+
}
|
193 |
+
//is lock if manuell Auto-Posting in form
|
194 |
+
$isLock = get_option('B2S_LOCK_AUTO_POST_IMPORT_' . (int) $post->post_author);
|
195 |
+
if ($isLock === false) {
|
196 |
+
$options = new B2S_Options((int) $post->post_author);
|
197 |
+
$autoPostData = $options->_getOption('auto_post_import');
|
198 |
+
if ($autoPostData !== false && is_array($autoPostData)) {
|
199 |
+
if (isset($autoPostData['active']) && (int) $autoPostData['active'] == 1) {
|
200 |
+
|
201 |
+
//Premium
|
202 |
+
$tokenInfo = get_option('B2S_PLUGIN_USER_VERSION_' . (int) $post->post_author);
|
203 |
+
if ($tokenInfo !== false && isset($tokenInfo['B2S_PLUGIN_USER_VERSION']) && (int) $tokenInfo['B2S_PLUGIN_USER_VERSION'] >= 1) {
|
204 |
+
$filter = true;
|
205 |
+
if (isset($autoPostData['post_filter']) && (int) $autoPostData['post_filter'] == 1) {
|
206 |
+
if (isset($autoPostData['post_type']) && is_array($autoPostData['post_type']) && !empty($autoPostData['post_type'])) {
|
207 |
+
if (isset($autoPostData['post_type_state']) && (int) $autoPostData['post_type_state'] == 0) { //include
|
208 |
+
if (!in_array($post->post_type, $autoPostData['post_type'])) {
|
209 |
+
$filter = false;
|
210 |
+
}
|
211 |
+
} else { //exclude
|
212 |
+
if (in_array($post->post_type, $autoPostData['post_type'])) {
|
213 |
+
$filter = false;
|
214 |
+
}
|
215 |
+
}
|
216 |
+
}
|
217 |
+
}
|
218 |
+
if ($filter && isset($autoPostData['network_auth_id']) && !empty($autoPostData['network_auth_id']) && is_array($autoPostData['network_auth_id'])) {
|
219 |
+
//LIMIT
|
220 |
+
$limit = false;
|
221 |
+
$ship = false;
|
222 |
+
$optionUserTimeZone = $options->_getOption('user_time_zone');
|
223 |
+
$userTimeZone = ($optionUserTimeZone !== false) ? $optionUserTimeZone : get_option('timezone_string');
|
224 |
+
$userTimeZoneOffset = (empty($userTimeZone)) ? get_option('gmt_offset') : B2S_Util::getOffsetToUtcByTimeZone($userTimeZone);
|
225 |
+
$current_utc_datetime = gmdate('Y-m-d H:i:s');
|
226 |
+
$current_user_date = date('Y-m-d', strtotime(B2S_Util::getUTCForDate($current_utc_datetime, $userTimeZoneOffset)));
|
227 |
+
|
228 |
+
$autoPostCon = $options->_getOption('auto_post_import_condition');
|
229 |
+
$conData = array();
|
230 |
+
if ($autoPostCon !== false && is_array($autoPostCon) && isset($autoPostCon['count']) && isset($autoPostCon['last_call_date'])) {
|
231 |
+
$con = unserialize(B2S_PLUGIN_AUTO_POST_LIMIT);
|
232 |
+
$userVersion = (int) $tokenInfo['B2S_PLUGIN_USER_VERSION'];
|
233 |
+
$limitCount = (isset($con[$userVersion]) && !empty($con[$userVersion])) ? $con[$userVersion] : $con[1]; //25 default
|
234 |
+
if (($autoPostCon['count'] < $limitCount) || ($current_user_date != $autoPostCon['last_call_date'])) {
|
235 |
+
$limit = true;
|
236 |
+
$count = ($current_user_date != $autoPostCon['last_call_date']) ? 1 : $autoPostCon['count'] + 1;
|
237 |
+
$conData = array('count' => $count, 'last_call_date' => $current_user_date);
|
238 |
+
}
|
239 |
+
} else {
|
240 |
+
$limit = true;
|
241 |
+
$conData = array('count' => 1, 'last_call_date' => $current_user_date);
|
242 |
+
}
|
243 |
+
if (!empty($conData)) {
|
244 |
+
$options->_setOption('auto_post_import_condition', $conData);
|
245 |
+
}
|
246 |
+
|
247 |
+
if ($limit) {
|
248 |
+
global $wpdb;
|
249 |
+
$optionPostFormat = $options->_getOption('post_template');
|
250 |
+
$image_url = wp_get_attachment_url(get_post_thumbnail_id((int) $post->ID));
|
251 |
+
//WooCommerce keyword support
|
252 |
+
if ($post->post_type == 'product' && taxonomy_exists('product_tag')) {
|
253 |
+
$keywords = wp_get_post_terms((int) $post->ID, 'product_tag');
|
254 |
+
} else {
|
255 |
+
$keywords = wp_get_post_tags((int) $post->ID);
|
256 |
+
}
|
257 |
+
$url = get_permalink($post->ID);
|
258 |
+
$title = isset($post->post_title) ? B2S_Util::getTitleByLanguage(strip_tags($post->post_title)) : '';
|
259 |
+
$content = (isset($post->post_content) && !empty($post->post_content)) ? trim($post->post_content) : '';
|
260 |
+
$excerpt = (isset($post->post_excerpt) && !empty($post->post_excerpt)) ? trim($post->post_excerpt) : '';
|
261 |
+
$delay = (isset($autoPostData['ship_state']) && (int) $autoPostData['ship_state'] = 0) ? 0 : (isset($autoPostData['ship_delay_time']) ? (int) $autoPostData['ship_delay_time'] : 0);
|
262 |
+
$current_user_datetime = date('Y-m-d H:i:s', strtotime(B2S_Util::getUTCForDate($current_utc_datetime, $userTimeZoneOffset)));
|
263 |
+
|
264 |
+
//ShareNow
|
265 |
+
$sched_type = 3;
|
266 |
+
$time = ($delay == 0) ? "-30 seconds" : "+" . $delay . " minutes";
|
267 |
+
$sched_date = date('Y-m-d H:i:s', strtotime($time, strtotime($current_user_datetime)));
|
268 |
+
$sched_date_utc = date('Y-m-d H:i:s', strtotime($time, strtotime($current_user_datetime)));
|
269 |
+
|
270 |
+
$optionNoCache = $options->_getOption('link_no_cache');
|
271 |
+
$optionUserHashTag = $options->_getOption('user_allow_hashtag');
|
272 |
+
$allowHashTag = ($optionUserHashTag === false || $optionUserHashTag == 1) ? true : false;
|
273 |
+
|
274 |
+
$defaultPostData = array('default_titel' => $title,
|
275 |
+
'image_url' => ($image_url !== false) ? trim(urldecode($image_url)) : '',
|
276 |
+
'lang' => trim(strtolower(substr(B2S_LANGUAGE, 0, 2))),
|
277 |
+
'no_cache' => (($optionNoCache === false || $optionNoCache == 0) ? 0 : 1), //default inactive , 1=active 0=not
|
278 |
+
'board' => '', 'group' => '', 'url' => $url, 'user_timezone' => $userTimeZoneOffset);
|
279 |
+
|
280 |
+
$defaultBlogPostData = array('post_id' => (int) $post->ID, 'blog_user_id' => (int) $post->post_author, 'user_timezone' => $userTimeZoneOffset, 'sched_type' => $sched_type, 'sched_date' => $sched_date, 'sched_date_utc' => $sched_date_utc);
|
281 |
+
|
282 |
+
$autoShare = new B2S_AutoPost((int) $post->ID, $defaultBlogPostData, $current_user_date, false, $title, $content, $excerpt, $url, $image_url, $keywords, trim(strtolower(substr(B2S_LANGUAGE, 0, 2))), $optionPostFormat, $allowHashTag);
|
283 |
+
|
284 |
+
//TOS Twitter 032018 - none multiple Accounts - User select once
|
285 |
+
$networkTos = true;
|
286 |
+
|
287 |
+
foreach ($autoPostData['network_auth_id'] as $k => $value) {
|
288 |
+
$networkDetails = $wpdb->get_results($wpdb->prepare("SELECT postNetworkDetails.network_id, postNetworkDetails.network_type, postNetworkDetails.network_display_name FROM b2s_posts_network_details AS postNetworkDetails WHERE postNetworkDetails.network_auth_id = %s", $value));
|
289 |
+
if (is_array($networkDetails) && isset($networkDetails[0]->network_id) && isset($networkDetails[0]->network_type) && isset($networkDetails[0]->network_display_name)) {
|
290 |
+
|
291 |
+
//TOS Twitter 032018 - none multiple Accounts - User select once
|
292 |
+
if ((int) $networkDetails[0]->network_id != 2 || ( (int) $networkDetails[0]->network_id == 2 && $networkTos)) {
|
293 |
+
//at first: set one profile
|
294 |
+
if ((int) $networkDetails[0]->network_id == 2) {
|
295 |
+
$networkTos = false;
|
296 |
+
}
|
297 |
+
$res = $autoShare->prepareShareData($value, $networkDetails[0]->network_id, $networkDetails[0]->network_type);
|
298 |
+
if ($res !== false && is_array($res)) {
|
299 |
+
$ship = true;
|
300 |
+
$res = array_merge($res, $defaultPostData);
|
301 |
+
$autoShare->saveShareData($res, $networkDetails[0]->network_id, $networkDetails[0]->network_type, $value, 0, strip_tags($networkDetails[0]->network_display_name));
|
302 |
+
}
|
303 |
+
}
|
304 |
+
}
|
305 |
+
}
|
306 |
+
if ($ship) {
|
307 |
+
B2S_Heartbeat::getInstance()->postToServer();
|
308 |
+
}
|
309 |
+
}
|
310 |
+
}
|
311 |
+
}
|
312 |
+
}
|
313 |
+
}
|
314 |
+
} else {
|
315 |
+
//Unlock Auto-Post-Import
|
316 |
+
delete_option('B2S_LOCK_AUTO_POST_IMPORT_' . (int) $post->post_author);
|
317 |
+
}
|
318 |
+
}
|
319 |
+
}
|
320 |
+
|
321 |
+
public function update_db_check() {
|
322 |
+
$this->lastVersion = get_option('b2s_plugin_version');
|
323 |
+
if ($this->lastVersion == false || (int) $this->lastVersion < B2S_PLUGIN_VERSION) {
|
324 |
+
$this->activatePlugin();
|
325 |
+
update_option('b2s_plugin_version', B2S_PLUGIN_VERSION, false);
|
326 |
+
}
|
327 |
+
}
|
328 |
+
|
329 |
+
public function b2s_delete_sched_post($post_id) {
|
330 |
+
wp_enqueue_script('B2SPOSTSCHEDHEARTBEATJS');
|
331 |
+
if ((int) $post_id > 0) {
|
332 |
+
global $wpdb;
|
333 |
+
//Heartbeat => b2s_delete_sched_post
|
334 |
+
$sql = "SELECT id, post_for_approve FROM b2s_posts WHERE post_id = %d AND hook_action <= %d AND hide = %d AND sched_date_utc != %s AND publish_date = %s";
|
335 |
+
$deleteData = $wpdb->get_results($wpdb->prepare($sql, $post_id, 2, 0, "0000-00-00 00:00:00", "0000-00-00 00:00:00"), ARRAY_A);
|
336 |
+
if (is_array($deleteData) && !empty($deleteData) && isset($deleteData[0])) {
|
337 |
+
foreach ($deleteData as $k => $value) {
|
338 |
+
if ((int) $value['id'] > 0) {
|
339 |
+
if ((int) $value['post_for_approve'] == 1) {
|
340 |
+
$data = array('hook_action' => '0', 'hide' => 1);
|
341 |
+
} else {
|
342 |
+
$data = array('hook_action' => '3', 'hide' => 1);
|
343 |
+
}
|
344 |
+
$where = array('id' => (int) $value['id']);
|
345 |
+
$wpdb->update('b2s_posts', $data, $where, array('%d'), array('%d'));
|
346 |
+
}
|
347 |
+
}
|
348 |
+
}
|
349 |
+
}
|
350 |
+
}
|
351 |
+
|
352 |
+
public function b2s_get_full_content() {
|
353 |
+
if (isset($_GET['b2s_get_full_content'])) {
|
354 |
+
$b2sPostContent = do_shortcode(get_the_content());
|
355 |
+
$b2sPostId = get_the_ID();
|
356 |
+
update_option('B2S_PLUGIN_POST_CONTENT_' . $b2sPostId, $b2sPostContent, false);
|
357 |
+
}
|
358 |
+
}
|
359 |
+
|
360 |
+
public function b2s_load_post_box() {
|
361 |
+
if (defined("B2S_PLUGIN_TOKEN")) {
|
362 |
+
$post_types = get_post_types(array('public' => true));
|
363 |
+
if (is_array($post_types) && !empty($post_types)) {
|
364 |
+
foreach ($post_types as $post_type) {
|
365 |
+
add_meta_box('b2s-post-meta-box-auto', '<span style="padding: 10px 0 10px 25px; background: url(\'' . plugins_url('/assets/images/b2s_icon.png', B2S_PLUGIN_FILE) . '\') no-repeat left center;"></span>' . __('Auto-Post on Social Media', 'blog2social'), array($this, 'b2s_view_post_box'), $post_type, 'side', 'high');
|
366 |
+
add_meta_box('b2s-post-box-calendar-header', '<span style="padding: 10px 0 10px 25px; background: url(\'' . plugins_url('/assets/images/b2s_icon.png', B2S_PLUGIN_FILE) . '\') no-repeat left center;"></span>' . __('Social Media Content Calendar', 'blog2social'), array($this, 'b2s_view_post_box_calendar'), $post_type, 'normal', 'high');
|
367 |
+
}
|
368 |
+
}
|
369 |
+
}
|
370 |
+
}
|
371 |
+
|
372 |
+
public function b2s_view_post_box() {
|
373 |
+
wp_enqueue_style('B2SAIRDATEPICKERCSS');
|
374 |
+
wp_enqueue_style('B2SPOSTBOXCSS');
|
375 |
+
wp_enqueue_script('B2SAIRDATEPICKERJS');
|
376 |
+
wp_enqueue_script('B2SAIRDATEPICKERDEJS');
|
377 |
+
wp_enqueue_script('B2SAIRDATEPICKERENJS');
|
378 |
+
wp_enqueue_script('B2SPOSTBOXJS');
|
379 |
+
|
380 |
+
wp_nonce_field("b2s-meta-box-nonce-post-area", "b2s-meta-box-nonce");
|
381 |
+
$postId = (isset($_GET['post']) && (int) $_GET['post'] > 0) ? (int) $_GET['post'] : 0;
|
382 |
+
$postType = (isset($_GET['post_type']) && !empty($_GET['post_type'])) ? $_GET['post_type'] : get_post_type($postId);
|
383 |
+
$postStatus = ($postId != 0) ? get_post_status($postId) : '';
|
384 |
+
$postBox = new B2S_PostBox();
|
385 |
+
echo $postBox->getPostBox($postId, $postType, $postStatus);
|
386 |
+
}
|
387 |
+
|
388 |
+
public function b2s_view_post_box_calendar() {
|
389 |
+
wp_enqueue_style('B2SFULLCALLENDARCSS');
|
390 |
+
wp_enqueue_style('B2SCALENDARCSS');
|
391 |
+
wp_enqueue_script('B2SFULLCALENDARMOMENTJS');
|
392 |
+
wp_enqueue_script('B2SFULLCALENDARJS');
|
393 |
+
wp_enqueue_script('B2SFULLCALENDARLOCALEJS');
|
394 |
+
wp_enqueue_script('B2SLIB');
|
395 |
+
echo '<div class="b2s-post-box-calendar-content"></div>';
|
396 |
+
}
|
397 |
+
|
398 |
+
public function b2s_save_post_box() {
|
399 |
+
|
400 |
+
if (!isset($_POST['wphb-clear-cache'])) { // WP-Hummingbird BTN clear cache - protection
|
401 |
+
if (!isset($_POST['wp-preview']) || (isset($_POST['wp-preview']) && $_POST['wp-preview'] != 'dopreview')) {
|
402 |
+
if (isset($_POST['post_ID']) && (int) $_POST['post_ID'] > 0) {
|
403 |
+
//Gutenberg WP V5.0 - B2S V5.1.0 optimization
|
404 |
+
if (!isset($_POST['post_title']) || !isset($_POST['content'])) {
|
405 |
+
$content = get_post((int) $_POST['post_ID']);
|
406 |
+
if (!isset($_POST['post_title'])) {
|
407 |
+
$_POST['post_title'] = $content->post_title;
|
408 |
+
}
|
409 |
+
if (!isset($_POST['content'])) {
|
410 |
+
$_POST['content'] = $content->post_content;
|
411 |
+
}
|
412 |
+
}
|
413 |
+
|
414 |
+
$b2sPostLang = (isset($_POST['b2s-user-lang']) && !empty($_POST['b2s-user-lang'])) ? $_POST['b2s-user-lang'] : 'en';
|
415 |
+
//OgMeta
|
416 |
+
if (isset($_POST['isOgMetaChecked']) && (int) $_POST['isOgMetaChecked'] == 1 && (int) $_POST['post_ID'] > 0 && isset($_POST['content']) && isset($_POST['post_title'])) {
|
417 |
+
$meta = B2S_Meta::getInstance();
|
418 |
+
$meta->getMeta(((int) $_POST['post_ID']));
|
419 |
+
$title = B2S_Util::getTitleByLanguage(strip_tags($_POST['post_title']), strtolower($b2sPostLang));
|
420 |
+
if (has_excerpt((int) $_POST['post_ID'])) {
|
421 |
+
$desc = strip_tags(get_the_excerpt());
|
422 |
+
} else {
|
423 |
+
$desc = str_replace("\r\n", ' ', substr(strip_tags(strip_shortcodes($_POST['content'])), 0, 160));
|
424 |
+
}
|
425 |
+
$image_url = wp_get_attachment_url(get_post_thumbnail_id((int) $_POST['post_ID']));
|
426 |
+
$meta->setMeta('og_title', $title);
|
427 |
+
$meta->setMeta('og_desc', $desc);
|
428 |
+
$meta->setMeta('og_image', (($image_url !== false) ? trim(urldecode($image_url)) : ''));
|
429 |
+
$meta->updateMeta((int) $_POST['post_ID']);
|
430 |
+
}
|
431 |
+
|
432 |
+
//CardMeta
|
433 |
+
if (isset($_POST['isCardMetaChecked']) && (int) $_POST['isCardMetaChecked'] == 1 && (int) $_POST['post_ID'] > 0 && isset($_POST['content']) && isset($_POST['post_title'])) {
|
434 |
+
$meta = B2S_Meta::getInstance();
|
435 |
+
$meta->getMeta(((int) $_POST['post_ID']));
|
436 |
+
$title = B2S_Util::getTitleByLanguage(strip_tags($_POST['post_title']), strtolower($b2sPostLang));
|
437 |
+
if (has_excerpt((int) $_POST['post_ID'])) {
|
438 |
+
$desc = strip_tags(get_the_excerpt());
|
439 |
+
} else {
|
440 |
+
$desc = str_replace("\r\n", ' ', substr(strip_tags(strip_shortcodes($_POST['content'])), 0, 160));
|
441 |
+
}
|
442 |
+
$image_url = wp_get_attachment_url(get_post_thumbnail_id((int) $_POST['post_ID']));
|
443 |
+
$meta->setMeta('card_title', $title);
|
444 |
+
$meta->setMeta('card_desc', $desc);
|
445 |
+
$meta->setMeta('card_image', (($image_url !== false) ? trim(urldecode($image_url)) : ''));
|
446 |
+
$meta->updateMeta((int) $_POST['post_ID']);
|
447 |
+
}
|
448 |
+
|
449 |
+
if (isset($_POST['post_ID']) && isset($_POST['user_ID']) && (int) $_POST['post_ID'] > 0 && (int) $_POST['user_ID'] > 0 && !defined("B2S_SAVE_META_BOX_AUTO_SHARE") && !wp_is_post_autosave($_POST['post_ID']) && isset($_POST['b2s-meta-box-nonce']) && wp_verify_nonce($_POST['b2s-meta-box-nonce'], 'b2s-meta-box-nonce-post-area') && isset($_POST['post_status']) && isset($_POST['b2s-post-meta-box-time-dropdown'])) {
|
450 |
+
if (strtolower($_POST['b2s-post-meta-box-time-dropdown']) == 'publish') {
|
451 |
+
if ((strtolower($_POST['post_status']) == "publish" || strtolower($_POST['post_status']) == "future") && isset($_POST['b2s-post-meta-box-profil-dropdown'])) {
|
452 |
+
$profilId = (int) $_POST['b2s-post-meta-box-profil-dropdown'];
|
453 |
+
if (isset($_POST['b2s-post-meta-box-profil-data-' . $profilId]) && !empty($_POST['b2s-post-meta-box-profil-data-' . $profilId])) {
|
454 |
+
$networkData = json_decode(base64_decode($_POST['b2s-post-meta-box-profil-data-' . $profilId]));
|
455 |
+
if ($networkData !== false && is_array($networkData) && !empty($networkData)) {
|
456 |
+
$user_timezone = isset($_POST['b2s-user-timezone']) ? $_POST['b2s-user-timezone'] : 0;
|
457 |
+
$current_utc_date = gmdate('Y-m-d H:i:s');
|
458 |
+
$current_user_date = date('Y-m-d H:i:s', strtotime(B2S_Util::getUTCForDate($current_utc_date, $user_timezone)));
|
459 |
+
|
460 |
+
//WP User Sched Post + B2S Share NOW FRIST SAVE
|
461 |
+
$post_date = '';
|
462 |
+
if (isset($_POST['post_date']) && !empty($_POST['post_date'])) {
|
463 |
+
$post_date = date('Y-m-d H:i:s', strtotime($_POST['post_date']));
|
464 |
+
}
|
465 |
+
|
466 |
+
//WP User Sched Post + B2S Share NOW SECOND SAVE
|
467 |
+
if (empty($post_date) && strtolower($_POST['post_status']) == "future") {
|
468 |
+
if (isset($_POST['mm']) && isset($_POST['jj']) && isset($_POST['aa']) && isset($_POST['hh']) && isset($_POST['mn']) && isset($_POST['ss'])) {
|
469 |
+
$wp_user_sched_post_date = $_POST['aa'] . '-' . $_POST['mm'] . '-' . $_POST['jj'] . ' ' . $_POST['hh'] . ':' . $_POST['mn'] . ':' . $_POST['ss'];
|
470 |
+
} else {
|
471 |
+
//V5.0.0 Gutenberg Editor
|
472 |
+
$wp_user_sched_post_date = get_the_date('Y-m-d H:i:s', $_POST['post_ID']);
|
473 |
+
}
|
474 |
+
$post_date = date('Y-m-d H:i:s', strtotime($wp_user_sched_post_date));
|
475 |
+
}
|
476 |
+
|
477 |
+
//ShareNow
|
478 |
+
$sched_type = 3;
|
479 |
+
$sched_date = $current_user_date;
|
480 |
+
$sched_date_utc = date('Y-m-d H:i:s', strtotime("-30 seconds", strtotime($current_utc_date)));
|
481 |
+
$myTimeSettings = false;
|
482 |
+
|
483 |
+
//allow for User Post Date (Schedule)
|
484 |
+
if (!empty($post_date) && $current_user_date <= $post_date) {
|
485 |
+
$sched_type = 2;
|
486 |
+
|
487 |
+
if (date('i', strtotime($post_date)) <= 30) {
|
488 |
+
$sched_date = date('Y-m-d H:30:00', strtotime($post_date));
|
489 |
+
} else {
|
490 |
+
$sched_date = date('Y-m-d H:00:00', strtotime('+1 hours', strtotime($post_date)));
|
491 |
+
}
|
492 |
+
$sched_date_utc = date('Y-m-d H:i:s', strtotime(B2S_Util::getUTCForDate($sched_date, $user_timezone * (-1))));
|
493 |
+
}
|
494 |
+
|
495 |
+
//Schedule post once
|
496 |
+
if (isset($_POST['b2s-post-meta-box-sched-select']) && $_POST['b2s-post-meta-box-sched-select'] == 1) {
|
497 |
+
$user_sched_date = (isset($_POST['b2s-post-meta-box-sched-date']) && strtotime($_POST['b2s-post-meta-box-sched-date']) !== false) ? date('Y-m-d H:i:s', strtotime($_POST['b2s-post-meta-box-sched-date'])) : date('Y-m-d H:i:00', current_time('timestamp'));
|
498 |
+
//Check User Schedule Date in past!
|
499 |
+
if ($user_sched_date >= $sched_date) {
|
500 |
+
$sched_type = 2;
|
501 |
+
$sched_date = $user_sched_date;
|
502 |
+
$sched_date_utc = date('Y-m-d H:i:s', strtotime(B2S_Util::getUTCForDate($sched_date, $user_timezone * (-1))));
|
503 |
+
}
|
504 |
+
} else if (isset($_POST['b2s-post-meta-box-sched-select']) && $_POST['b2s-post-meta-box-sched-select'] == 2) {
|
505 |
+
//allow for my Time Settings
|
506 |
+
if (isset($_POST['b2s-post-meta-box-best-time-settings'])) {
|
507 |
+
$sched_type = 2;
|
508 |
+
$myTimeSettings = unserialize(stripslashes($_POST['b2s-post-meta-box-best-time-settings']));
|
509 |
+
if ($myTimeSettings !== false && is_array($myTimeSettings) && isset($myTimeSettings['times']) && isset($myTimeSettings['type'])) {
|
510 |
+
$myTimeSettings = $myTimeSettings;
|
511 |
+
}
|
512 |
+
}
|
513 |
+
}
|
514 |
+
|
515 |
+
delete_option('B2S_PLUGIN_POST_CONTENT_' . (int) $_POST['post_ID']);
|
516 |
+
$image_url = wp_get_attachment_url(get_post_thumbnail_id((int) $_POST['post_ID']));
|
517 |
+
//WooCommerce keyword support
|
518 |
+
if (get_post_type((int) $_POST['post_ID']) == 'product' && taxonomy_exists('product_tag')) {
|
519 |
+
$keywords = get_the_terms((int) $_POST['post_ID'], 'product_tag');
|
520 |
+
} else {
|
521 |
+
$keywords = get_the_tags((int) $_POST['post_ID']);
|
522 |
+
}
|
523 |
+
$url = get_permalink($_POST['post_ID']);
|
524 |
+
$title = isset($_POST['post_title']) ? B2S_Util::getTitleByLanguage(strip_tags($_POST['post_title']), strtolower($b2sPostLang)) : '';
|
525 |
+
$content = (isset($_POST['content']) && !empty($_POST['content'])) ? trim($_POST['content']) : '';
|
526 |
+
$excerpt = (isset($_POST['excerpt']) && !empty($_POST['excerpt'])) ? trim($_POST['excerpt']) : get_the_excerpt((int) $_POST['post_ID']);
|
527 |
+
|
528 |
+
$options = new B2S_Options((int) $_POST['user_ID']);
|
529 |
+
$optionPostFormat = $options->_getOption('post_template');
|
530 |
+
$optionNoCache = $options->_getOption('link_no_cache');
|
531 |
+
$optionUserHashTag = $options->_getOption('user_allow_hashtag');
|
532 |
+
$allowHashTag = ($optionUserHashTag === false || $optionUserHashTag == 1) ? true : false;
|
533 |
+
|
534 |
+
$defaultPostData = array('default_titel' => $title,
|
535 |
+
'image_url' => ($image_url !== false) ? trim(urldecode($image_url)) : '',
|
536 |
+
'lang' => trim(strtolower(substr(B2S_LANGUAGE, 0, 2))),
|
537 |
+
'no_cache' => (($optionNoCache === false || $optionNoCache == 0) ? 0 : 1), //default inactive , 1=active 0=not
|
538 |
+
'board' => '', 'group' => '', 'url' => $url, 'user_timezone' => $user_timezone); // 'publish_date' => $sched_date, OLD FOR Share Now?
|
539 |
+
|
540 |
+
$defaultBlogPostData = array('post_id' => (int) $_POST['post_ID'], 'blog_user_id' => (int) $_POST['user_ID'], 'user_timezone' => $user_timezone, 'sched_type' => $sched_type, 'sched_date' => $sched_date, 'sched_date_utc' => $sched_date_utc);
|
541 |
+
|
542 |
+
$autoShare = new B2S_AutoPost((int) $_POST['post_ID'], $defaultBlogPostData, $current_user_date, $myTimeSettings, $title, $content, $excerpt, $url, $image_url, $keywords, $b2sPostLang, $optionPostFormat, $allowHashTag);
|
543 |
+
define('B2S_SAVE_META_BOX_AUTO_SHARE', $_POST['post_ID']);
|
544 |
+
if (isset($_POST['b2s-user-last-selected-profile-id']) && (int) $_POST['b2s-user-last-selected-profile-id'] != (int) $_POST['b2s-post-meta-box-profil-dropdown'] && (int) $_POST['b2s-post-meta-box-profil-dropdown'] != 0) {
|
545 |
+
update_option('B2S_PLUGIN_SAVE_META_BOX_AUTO_SHARE_PROFILE_USER_' . $_POST['user_ID'], (int) $_POST['b2s-post-meta-box-profil-dropdown'], false);
|
546 |
+
}
|
547 |
+
|
548 |
+
$metaOg = false;
|
549 |
+
$metaCard = false;
|
550 |
+
$tosCrossPosting = unserialize(B2S_PLUGIN_NETWORK_CROSSPOSTING_LIMIT);
|
551 |
+
|
552 |
+
|
553 |
+
//>V5.6.0 Scheduling lookup existing posts - delete entries (hook_action) - merge with current networkData & insert
|
554 |
+
if ($sched_type == 2) {
|
555 |
+
global $wpdb;
|
556 |
+
$getSchedData = $wpdb->prepare("SELECT b.id as b2sPostId,d.network_id as networkId,d.network_type as networkType,d.network_auth_id as networkAuthId,d.network_display_name as networkUserName FROM b2s_posts b LEFT JOIN b2s_posts_network_details d ON (d.id = b.network_details_id) WHERE b.post_id = %d AND b.sched_type = %d AND b.publish_date = %s AND b.hide = %d", (int) $_POST['post_ID'], 2, "0000-00-00 00:00:00", 0);
|
557 |
+
$schedDataResult = $wpdb->get_results($getSchedData);
|
558 |
+
$delete_scheds = array();
|
559 |
+
foreach ($schedDataResult as $k => $value) {
|
560 |
+
$isNew = true;
|
561 |
+
foreach ($networkData as $j => $currvalue) {
|
562 |
+
if ($value->networkAuthId == $currvalue->networkAuthId) {
|
563 |
+
$isNew = false;
|
564 |
+
}
|
565 |
+
}
|
566 |
+
if ($isNew) {
|
567 |
+
array_push($networkData, $value);
|
568 |
+
}
|
569 |
+
array_push($delete_scheds, $value->b2sPostId);
|
570 |
+
}
|
571 |
+
if (!empty($delete_scheds)) {
|
572 |
+
require_once (B2S_PLUGIN_DIR . '/includes/B2S/Post/Tools.php');
|
573 |
+
B2S_Post_Tools::deleteUserSchedPost($delete_scheds);
|
574 |
+
}
|
575 |
+
}
|
576 |
+
|
577 |
+
|
578 |
+
//TOS Twitter 032018 - none multiple Accounts - User select once
|
579 |
+
$selectedTwitterProfile = (isset($_POST['b2s-post-meta-box-profil-dropdown-twitter']) && !empty($_POST['b2s-post-meta-box-profil-dropdown-twitter'])) ? (int) $_POST['b2s-post-meta-box-profil-dropdown-twitter'] : '';
|
580 |
+
foreach ($networkData as $k => $value) {
|
581 |
+
if (isset($value->networkAuthId) && (int) $value->networkAuthId > 0 && isset($value->networkId) && (int) $value->networkId > 0 && isset($value->networkType)) {
|
582 |
+
//TOS Twitter 032018 - none multiple Accounts - User select once
|
583 |
+
if ((int) $value->networkId != 2 || ((int) $value->networkId == 2 && (empty($selectedTwitterProfile) || ((int) $selectedTwitterProfile == (int) $value->networkAuthId)))) {
|
584 |
+
|
585 |
+
//TOS Crossposting ignore
|
586 |
+
//Filter: TOS Crossposting ignore
|
587 |
+
if (isset($tosCrossPosting[$value->networkId][$value->networkType])) {
|
588 |
+
continue;
|
589 |
+
}
|
590 |
+
|
591 |
+
$res = $autoShare->prepareShareData($value->networkAuthId, $value->networkId, $value->networkType);
|
592 |
+
if ($res !== false && is_array($res)) {
|
593 |
+
$res = array_merge($res, $defaultPostData);
|
594 |
+
$shareApprove = (isset($value->instant_sharing) && (int) $value->instant_sharing == 1) ? 1 : 0;
|
595 |
+
$autoShare->saveShareData($res, $value->networkId, $value->networkType, $value->networkAuthId, $shareApprove, strip_tags($value->networkUserName));
|
596 |
+
|
597 |
+
//Start - Change/Set MetaTags
|
598 |
+
//TODO Check Enable Feature
|
599 |
+
if ((int) $value->networkId == 1 && $metaOg == false && (int) $_POST['post_ID'] > 0 && isset($res['post_format']) && (int) $res['post_format'] == 0) { //LinkPost
|
600 |
+
$metaOg = true;
|
601 |
+
$meta = B2S_Meta::getInstance();
|
602 |
+
$meta->getMeta((int) $_POST['post_ID']);
|
603 |
+
if (isset($res['image_url']) && !empty($res['image_url'])) {
|
604 |
+
$meta->setMeta('og_image', trim($res['image_url']));
|
605 |
+
$meta->updateMeta((int) $_POST['post_ID']);
|
606 |
+
}
|
607 |
+
}
|
608 |
+
if ((int) $value->networkId == 2 && $metaCard == false && (int) $_POST['post_ID'] > 0 && isset($res['post_format']) && (int) $res['post_format'] == 0) { //LinkPost
|
609 |
+
$metaCard = true;
|
610 |
+
$meta = B2S_Meta::getInstance();
|
611 |
+
$meta->getMeta((int) $_POST['post_ID']);
|
612 |
+
if (isset($res['image_url']) && !empty($res['image_url'])) {
|
613 |
+
$meta->setMeta('card_image', trim($res['image_url']));
|
614 |
+
$meta->updateMeta((int) $_POST['post_ID']);
|
615 |
+
}
|
616 |
+
}
|
617 |
+
//END MetaTags
|
618 |
+
}
|
619 |
+
}
|
620 |
+
}
|
621 |
+
}
|
622 |
+
if ($sched_type != 3) {
|
623 |
+
if (isset($_POST['b2s-user-lang']) && !empty($_POST['b2s-user-lang'])) {
|
624 |
+
$dateFormat = ($_POST['b2s-user-lang'] == 'de') ? 'd.m.Y' : 'Y-m-d';
|
625 |
+
$_POST['b2s_update_publish_date'] = date($dateFormat, strtotime($sched_date));
|
626 |
+
}
|
627 |
+
}
|
628 |
+
add_filter('redirect_post_location', array($this, 'b2s_add_param_auto_share_meta_box'));
|
629 |
+
}
|
630 |
+
} else {
|
631 |
+
add_filter('redirect_post_location', array($this, 'b2s_add_param_auto_share_error_data_meta_box'));
|
632 |
+
}
|
633 |
+
} else {
|
634 |
+
if (strtolower($_POST['post_status']) == "publish" || strtolower($_POST['post_status']) == "future") {
|
635 |
+
add_filter('redirect_post_location', array($this, 'b2s_add_param_auto_share_error_meta_box'));
|
636 |
+
}
|
637 |
+
}
|
638 |
+
}
|
639 |
+
}
|
640 |
+
}
|
641 |
+
}
|
642 |
+
}
|
643 |
+
}
|
644 |
+
|
645 |
+
public function b2s_add_param_auto_share_meta_box($location) {
|
646 |
+
remove_filter('redirect_post_location', array($this, 'b2s_add_param_auto_share_meta_box'));
|
647 |
+
if (isset($_POST['b2s_update_publish_date'])) {
|
648 |
+
return add_query_arg(array('b2s_action' => 1, 'b2s_update_publish_date' => $_POST['b2s_update_publish_date']), $location);
|
649 |
+
}
|
650 |
+
return add_query_arg(array('b2s_action' => 1), $location);
|
651 |
+
}
|
652 |
+
|
653 |
+
public function b2s_add_param_auto_share_error_meta_box($location) {
|
654 |
+
remove_filter('redirect_post_location', array($this, 'b2s_add_param_auto_share_error_meta_box'));
|
655 |
+
return add_query_arg(array('b2s_action' => 2), $location);
|
656 |
+
}
|
657 |
+
|
658 |
+
public function b2s_add_param_auto_share_error_data_meta_box($location) {
|
659 |
+
remove_filter('redirect_post_location', array($this, 'b2s_add_param_auto_share_error_data_meta_box'));
|
660 |
+
return add_query_arg(array('b2s_action' => 3), $location);
|
661 |
+
}
|
662 |
+
|
663 |
+
public function b2s_save_post_alert_meta_box() {
|
664 |
+
if (isset($_GET['b2s_action'])) {
|
665 |
+
$b2sAction = $_GET['b2s_action'];
|
666 |
+
if ((int) $b2sAction == 1) {
|
667 |
+
$b2sLink = get_option('siteurl') . ((substr(get_option('siteurl'), -1, 1) == '/') ? '' : '/') . 'wp-admin/admin.php?page=';
|
668 |
+
if (isset($_GET['b2s_update_publish_date']) && !empty($_GET['b2s_update_publish_date'])) {
|
669 |
+
$publishDate = htmlspecialchars($_GET['b2s_update_publish_date']);
|
670 |
+
echo '<div class="updated"><p>' . __('This post will be shared into your social media from', 'blog2social') . ' ' . $publishDate . ' <a target="_blank" href="' . $b2sLink . 'blog2social-sched">' . __('show details', 'blog2social') . '</a></p></div>';
|
671 |
+
} else {
|
672 |
+
echo '<div class="updated"><p>' . __('This post will be shared on social media in 2-3 minutes!', 'blog2social') . ' <a target="_blank" href="' . $b2sLink . 'blog2social-publish">' . __('show details', 'blog2social') . '</a></p></div>';
|
673 |
+
}
|
674 |
+
}
|
675 |
+
if ((int) $b2sAction == 2) {
|
676 |
+
echo '<div class="error"><p>' . __('Please, make sure that your post are publish on this blog on this moment. Then you can auto post your post with Blog2social.', 'blog2social') . '</p></div>';
|
677 |
+
}
|
678 |
+
if ((int) $b2sAction == 3) {
|
679 |
+
echo '<div class="error"><p>' . __('There are no authorizations for your selected profile. Please, authorize with a social network or select a other profile.', 'blog2social') . '</p></div>';
|
680 |
+
}
|
681 |
+
}
|
682 |
+
}
|
683 |
+
|
684 |
+
public function plugin_init_language() {
|
685 |
+
load_plugin_textdomain('blog2social', false, B2S_PLUGIN_LANGUAGE_PATH);
|
686 |
+
$this->defineText();
|
687 |
+
}
|
688 |
+
|
689 |
+
public function override_plugin_action_links($links) {
|
690 |
+
if (defined("B2S_PLUGIN_USER_VERSION") && B2S_PLUGIN_USER_VERSION == 0) {
|
691 |
+
$added_link = array('<a target="_blank" style="color: rgba(10, 154, 62, 1); font-weight: bold; font-size: 13px;" href="' . B2S_Tools::getSupportLink('affiliate') . '">' . __('Upgrade to Premium', 'blog2social') . '</a>');
|
692 |
+
$links = array_merge($added_link, $links);
|
693 |
+
}
|
694 |
+
|
695 |
+
if (!isset($links['deactivate'])) {
|
696 |
+
return $links;
|
697 |
+
}//end if
|
698 |
+
|
699 |
+
if (is_network_admin()) {
|
700 |
+
return $links;
|
701 |
+
}//end if
|
702 |
+
|
703 |
+
preg_match_all('/<a[^>]+href="(.+?)"[^>]*>/i', $links['deactivate'], $matches);
|
704 |
+
if (empty($matches) || !isset($matches[1][0])) {
|
705 |
+
return $links;
|
706 |
+
}//end if
|
707 |
+
|
708 |
+
if (isset($matches[1][0])) {
|
709 |
+
$links['deactivate'] = sprintf(
|
710 |
+
'<a id="b2s-deactivate" href="%s">%s</a>', $matches[1][0], // @codingStandardsIgnoreLine
|
711 |
+
esc_html(_x('Deactivate', 'command (plugins)', 'Blog2Social'))
|
712 |
+
);
|
713 |
+
}
|
714 |
+
wp_enqueue_style('B2SPOSTBOXCSS');
|
715 |
+
wp_enqueue_script('B2SPOSTBOXJS');
|
716 |
+
|
717 |
+
return $links;
|
718 |
+
}
|
719 |
+
|
720 |
+
public function defineText() {
|
721 |
+
define('B2S_PLUGIN_PAGE_TITLE', serialize(array('blog2social-notice' => __('Notifications', 'blog2social'), 'blog2social-publish' => __('Shared Posts', 'blog2social'), 'blog2social-approve' => __('Instant Sharing', 'blog2social'), 'blog2social-draft-post' => __('Drafts', 'blog2social'), 'blog2social-sched' => __('Scheduled Posts', 'blog2social'), 'blog2social-curation-draft' => __('Content Curation Drafts', 'blog2social'),)));
|
722 |
+
define('B2S_PLUGIN_NETWORK_TYPE', serialize(array(__('Profile', 'blog2social'), __('Page', 'blog2social'), __('Group', 'blog2social'))));
|
723 |
+
define('B2S_PLUGIN_NETWORK_KIND', serialize(array(__('Company', 'blog2social'), __('Business', 'blog2social'))));
|
724 |
+
define('B2S_PLUGIN_NETWORK_ERROR', serialize(array('DEFAULT' => __('Your post could not be posted.', 'blog2social'),
|
725 |
+
'TOKEN' => __('Your authorization has expired. Please reconnect your account in the Blog2Social network settings.', 'blog2social'),
|
726 |
+
'CONTENT' => __('The network has marked the post as spam or abusive.', 'blog2social'),
|
727 |
+
'RIGHT' => __('We don\'t have the permission to publish your post. Please check your authorization.', 'blog2social'),
|
728 |
+
'LOGIN' => __('Your authorization is interrupted. Please check your authorization. Please see <a target="_blank" href="https://www.blog2social.com/en/faq/category/9/troubleshooting-for-error-messages.html">FAQ</a>.', 'blog2social'),
|
729 |
+
'LIMIT' => __('Your daily limit has been reached.', 'blog2social'),
|
730 |
+
'IMAGE' => __('Your post could not be posted, because your image is not available or the image source does not allow to publish', 'blog2social'),
|
731 |
+
'PROTECT' => __('The network has blocked your account. Please see <a target="_blank" href="https://www.blog2social.com/en/faq/category/9/troubleshooting-for-error-messages.html">FAQ</a>.', 'blog2social'),
|
732 |
+
'IMAGE_LIMIT' => __('The number of images is reached. Please see <a target="_blank" href="https://www.blog2social.com/en/faq/category/9/troubleshooting-for-error-messages.html">FAQ</a>.', 'blog2social'),
|
733 |
+
'RATE_LIMIT' => __('Your daily limit for this network has been reached. Please try again later.', 'blog2social'),
|
734 |
+
'INVALID_CONTENT' => __('The network can not publish special characters such as Emoji. Please see <a target="_blank" href="https://www.blog2social.com/en/faq/category/9/troubleshooting-for-error-messages.html">FAQ</a>.', 'blog2social'),
|
735 |
+
'EXISTS_CONTENT' => __('Your post is a duplicate.', 'blog2social'),
|
736 |
+
'URL_CONTENT' => __('The network requires a public url.', 'blog2social'),
|
737 |
+
'BLOGPOST_NOT_PUBLISHED' => __('Your blog post was not available for the network at the time of publication.', 'blog2social'),
|
738 |
+
'EXISTS_RELAY' => __('You have already retweeted this post.', 'blog2social'),
|
739 |
+
'DEPRECATED_NETWORK_8' => __('This XING API is no longer supported by XING. Please connect your XING accounts with the new XING interface to reschedule your posts. <a target="_blank" href="https://www.blog2social.com/en/faq/index.php?action=artikel&cat=2&id=146">Learn more</a>', 'blog2social'),
|
740 |
+
'IMAGE_FOR_CURATION' => __('There was no image in the meta data of the linked post. Posts without images cannot be shared on image networks.', 'blog2social'), // special for content curation V.5.0.0
|
741 |
+
'IMAGE_NETWORK' => __('Your post could not be posted, because your image can not be processed by the network.', 'blog2social'),
|
742 |
+
'TEXT_NOT_PUBLISHED_12' => __('Instagram published your post without text. Please see <a target="_blank" href="https://www.blog2social.com/en/faq/index.php?action=artikel&cat=9&id=154&artlang=en">FAQ</a>.','blog2social'),
|
743 |
+
'GROUP_CONTENT' => __('Your group can not be found by the network.', 'blog2social'))));
|
744 |
+
}
|
745 |
+
|
746 |
+
public function getToken() {
|
747 |
+
global $wpdb;
|
748 |
+
$sql = $wpdb->prepare("SELECT token FROM `b2s_user` WHERE `blog_user_id` = %d", $this->blogUserData->ID);
|
749 |
+
$userExist = $wpdb->get_row($sql);
|
750 |
+
if (empty($userExist) || !isset($userExist->token)) {
|
751 |
+
if (isset($_GET['page']) && !empty($_GET['page']) && in_array($_GET['page'], unserialize(B2S_PLUGIN_PAGE_SLUG))) {
|
752 |
+
$postData = array('action' => 'getToken', 'blog_user_id' => $this->blogUserData->ID, 'blog_url' => get_option('home'), 'email' => $this->blogUserData->user_email);
|
753 |
+
$result = json_decode(B2S_Tools::getToken($postData));
|
754 |
+
if (isset($result->result) && (int) $result->result == 1 && isset($result->token)) {
|
755 |
+
$state_url = (isset($result->state_url)) ? (int) $result->state_url : 0;
|
756 |
+
$sqlInsertToken = $wpdb->prepare("INSERT INTO `b2s_user` (`token`, `blog_user_id`,`register_date`,`state_url`) VALUES (%s,%d,%s,%d);", $result->token, (int) $this->blogUserData->ID, date('Y-m-d H:i:s'), $state_url);
|
757 |
+
$wpdb->query($sqlInsertToken);
|
758 |
+
define('B2S_PLUGIN_TOKEN', $result->token);
|
759 |
+
} else {
|
760 |
+
define('B2S_PLUGIN_NOTICE', 'CONNECTION');
|
761 |
+
}
|
762 |
+
}
|
763 |
+
} else {
|
764 |
+
define('B2S_PLUGIN_TOKEN', $userExist->token);
|
765 |
+
}
|
766 |
+
}
|
767 |
+
|
768 |
+
public function getUserDetails() {
|
769 |
+
$tokenInfo = get_option('B2S_PLUGIN_USER_VERSION_' . B2S_PLUGIN_BLOG_USER_ID);
|
770 |
+
if ($tokenInfo == false || !isset($tokenInfo['B2S_PLUGIN_USER_VERSION']) || !isset($tokenInfo['B2S_PLUGIN_VERSION']) || $tokenInfo['B2S_PLUGIN_USER_VERSION_NEXT_REQUEST'] < time() || (isset($tokenInfo['B2S_PLUGIN_VERSION']) && (int) $tokenInfo['B2S_PLUGIN_VERSION'] < (int) B2S_PLUGIN_VERSION) || (isset($tokenInfo['B2S_PLUGIN_TRAIL_END']) && strtotime($tokenInfo['B2S_PLUGIN_TRAIL_END']) < strtotime(gmdate('Y-m-d H:i:s')))) {
|
771 |
+
B2S_Tools::setUserDetails();
|
772 |
+
$this->checkUpdate();
|
773 |
+
} else {
|
774 |
+
define('B2S_PLUGIN_USER_VERSION', $tokenInfo['B2S_PLUGIN_USER_VERSION']);
|
775 |
+
if (isset($tokenInfo['B2S_PLUGIN_TRAIL_END'])) {
|
776 |
+
define('B2S_PLUGIN_TRAIL_END', $tokenInfo['B2S_PLUGIN_TRAIL_END']);
|
777 |
+
}
|
778 |
+
}
|
779 |
+
}
|
780 |
+
|
781 |
+
private function checkUpdate() {
|
782 |
+
$args = array(
|
783 |
+
'timeout' => '15',
|
784 |
+
'redirection' => '5',
|
785 |
+
'user-agent' => "Blog2Social/" . B2S_PLUGIN_VERSION . " (Wordpress/Plugin)"
|
786 |
+
);
|
787 |
+
$result = wp_remote_retrieve_body(wp_remote_get(B2S_PLUGIN_API_ENDPOINT . 'update.txt', $args));
|
788 |
+
$currentVersion = explode('#', $result);
|
789 |
+
if (isset($currentVersion[0]) && (int) $currentVersion[0] > (int) B2S_PLUGIN_VERSION) {
|
790 |
+
define('B2S_PLUGIN_NOTICE', 'UPDATE');
|
791 |
+
}
|
792 |
+
}
|
793 |
+
|
794 |
+
public function createMenu() {
|
795 |
+
$subPages = array();
|
796 |
+
//pageTitle,menutitle,$capability, $menu_slug, $function, $icon_url, $position
|
797 |
+
add_menu_page('Blog2Social', 'Blog2Social', 'read', 'blog2social', null, plugins_url('/assets/images/b2s_icon.png', B2S_PLUGIN_FILE));
|
798 |
+
//$parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function
|
799 |
+
$subPages[] = add_submenu_page('blog2social', __('Dashboard', 'blog2social'), __('Dashboard', 'blog2social'), 'read', 'blog2social', array($this, 'b2sstart'));
|
800 |
+
$subPages[] = add_submenu_page('blog2social', __('Posts & Sharing', 'blog2social'), __('Posts & Sharing', 'blog2social'), 'read', 'blog2social-post', array($this, 'b2sPost'));
|
801 |
+
$subPages[] = add_submenu_page('blog2social', __('Calendar', 'blog2social'), __('Calendar', 'blog2social'), 'read', 'blog2social-calendar', array($this, 'b2sPostCalendar'));
|
802 |
+
$subPages[] = add_submenu_page('blog2social', __('Content Curation', 'blog2social'), __('Content Curation', 'blog2social'), 'read', 'blog2social-curation', array($this, 'b2sContentCuration'));
|
803 |
+
$subPages[] = add_submenu_page('blog2social', __('Networks', 'blog2social'), __('Networks', 'blog2social'), 'read', 'blog2social-network', array($this, 'b2sNetwork'));
|
804 |
+
$subPages[] = add_submenu_page('blog2social', __('Settings', 'blog2social'), __('Settings', 'blog2social'), 'read', 'blog2social-settings', array($this, 'b2sSettings'));
|
805 |
+
if (!B2S_System::isblockedArea('B2S_MENU_ITEM_WP_PR_SERVICE', B2S_PLUGIN_ADMIN)) {
|
806 |
+
$subPages[] = add_submenu_page('blog2social', __('PR-Service', 'blog2social'), __('PR-Service', 'blog2social'), 'read', 'prg-post', array($this, 'prgPost'));
|
807 |
+
}
|
808 |
+
$subPages[] = add_submenu_page('blog2social', __('Help & Support', 'blog2social'), __('Help & Support', 'blog2social'), 'read', 'blog2social-support', array($this, 'b2sSupport'));
|
809 |
+
if (!B2S_System::isblockedArea('B2S_MENU_ITEM_WP_LICENSE', B2S_PLUGIN_ADMIN)) {
|
810 |
+
$subPages[] = add_submenu_page('blog2social', __('Premium', 'blog2social'), '<span class="dashicons dashicons-star-filled"></span> ' . __('PREMIUM', 'blog2social'), 'read', 'blog2social-premium', array($this, 'b2sPremium'));
|
811 |
+
}
|
812 |
+
$subPages[] = add_submenu_page(null, 'B2S Post Draft', 'B2S Post Draft', 'read', 'blog2social-draft-post', array($this, 'b2sPostDraft'));
|
813 |
+
$subPages[] = add_submenu_page(null, 'B2S Post Sched', 'B2S Post Sched', 'read', 'blog2social-sched', array($this, 'b2sPostSched'));
|
814 |
+
$subPages[] = add_submenu_page(null, 'B2S Post Approve', 'B2S Post Approve', 'read', 'blog2social-approve', array($this, 'b2sPostApprove'));
|
815 |
+
$subPages[] = add_submenu_page(null, 'B2S Post Publish', 'B2S Post Publish', 'read', 'blog2social-publish', array($this, 'b2sPostPublish'));
|
816 |
+
$subPages[] = add_submenu_page(null, 'B2S Post Notice', 'B2S Post Notice', 'read', 'blog2social-notice', array($this, 'b2sPostNotice')); //Error post page since 4.8.0
|
817 |
+
$subPages[] = add_submenu_page(null, 'B2S Ship', 'B2S Ship', 'read', 'blog2social-ship', array($this, 'b2sShip'));
|
818 |
+
$subPages[] = add_submenu_page(null, 'B2S Curation Drafts', 'B2S Curation Drafts', 'read', 'blog2social-curation-draft', array($this, 'b2sCurationDraft'));
|
819 |
+
$subPages[] = add_submenu_page(null, 'PRG Login', 'PRG Login', 'read', 'prg-login', array($this, 'prgLogin'));
|
820 |
+
$subPages[] = add_submenu_page(null, 'PRG Ship', 'PRG Ship', 'read', 'prg-ship', array($this, 'prgShip'));
|
821 |
+
foreach ($subPages as $var) {
|
822 |
+
add_action($var, array($this, 'addAssets'));
|
823 |
+
}
|
824 |
+
}
|
825 |
+
|
826 |
+
public function createToolbarMenu() {
|
827 |
+
if (!current_user_can('edit_posts')) {
|
828 |
+
return;
|
829 |
+
}
|
830 |
+
global $wp_admin_bar;
|
831 |
+
$seo_url = strtolower(get_admin_url(null, 'admin.php?page='));
|
832 |
+
$title = '<div id="blog2social-ab-icon" class="ab-item" style="padding-left: 25px; background-repeat: no-repeat; background-size: 16px auto; background-position: left center; background-image: url(\'' . plugins_url('/assets/images/b2s_icon.png', B2S_PLUGIN_FILE) . '\');">' . __('Blog2Social', 'blog2social') . '</div>';
|
833 |
+
$wp_admin_bar->add_node(array(
|
834 |
+
'id' => 'blog2social',
|
835 |
+
'title' => $title,
|
836 |
+
'href' => $seo_url . 'blog2social'
|
837 |
+
));
|
838 |
+
|
839 |
+
$wp_admin_bar->add_node(array(
|
840 |
+
'id' => 'blog2social-dashboard',
|
841 |
+
'title' => __('Dashboard', 'blog2social'),
|
842 |
+
'href' => $seo_url . 'blog2social',
|
843 |
+
'parent' => 'blog2social'
|
844 |
+
));
|
845 |
+
|
846 |
+
$wp_admin_bar->add_node(array(
|
847 |
+
'id' => 'blog2social-post',
|
848 |
+
'title' => __('Posts & Sharing', 'blog2social'),
|
849 |
+
'href' => $seo_url . 'blog2social-post',
|
850 |
+
'parent' => 'blog2social'
|
851 |
+
));
|
852 |
+
|
853 |
+
$wp_admin_bar->add_node(array(
|
854 |
+
'id' => 'blog2social-calendar',
|
855 |
+
'title' => __('Calendar', 'blog2social'),
|
856 |
+
'href' => $seo_url . 'blog2social-calendar',
|
857 |
+
'parent' => 'blog2social'
|
858 |
+
));
|
859 |
+
|
860 |
+
|
861 |
+
$wp_admin_bar->add_node(array(
|
862 |
+
'id' => 'blog2social-curation',
|
863 |
+
'title' => __('Content Curation', 'blog2social'),
|
864 |
+
'href' => $seo_url . 'blog2social-curation',
|
865 |
+
'parent' => 'blog2social'
|
866 |
+
));
|
867 |
+
|
868 |
+
$wp_admin_bar->add_node(array(
|
869 |
+
'id' => 'blog2social-network',
|
870 |
+
'title' => __('Networks', 'blog2social'),
|
871 |
+
'href' => $seo_url . 'blog2social-network',
|
872 |
+
'parent' => 'blog2social'
|
873 |
+
));
|
874 |
+
$wp_admin_bar->add_node(array(
|
875 |
+
'id' => 'blog2social-settings',
|
876 |
+
'title' => __('Settings', 'blog2social'),
|
877 |
+
'href' => $seo_url . 'blog2social-settings',
|
878 |
+
'parent' => 'blog2social'
|
879 |
+
));
|
880 |
+
|
881 |
+
if (!B2S_System::isblockedArea('B2S_MENU_ITEM_WP_PR_SERVICE', B2S_PLUGIN_ADMIN)) {
|
882 |
+
$wp_admin_bar->add_node(array(
|
883 |
+
'id' => 'blog2social-prg-post',
|
884 |
+
'title' => __('PR-Service', 'blog2social'),
|
885 |
+
'href' => $seo_url . 'prg-post',
|
886 |
+
'parent' => 'blog2social'
|
887 |
+
));
|
888 |
+
}
|
889 |
+
|
890 |
+
$wp_admin_bar->add_node(array(
|
891 |
+
'id' => 'blog2social-support',
|
892 |
+
'title' => __('Help & Support', 'blog2social'),
|
893 |
+
'href' => $seo_url . 'blog2social-support',
|
894 |
+
'parent' => 'blog2social'
|
895 |
+
));
|
896 |
+
|
897 |
+
if (!B2S_System::isblockedArea('B2S_MENU_ITEM_WP_LICENSE', B2S_PLUGIN_ADMIN)) {
|
898 |
+
$wp_admin_bar->add_node(array(
|
899 |
+
'id' => 'blog2social-premium',
|
900 |
+
'title' => '<span class="ab-icon dashicons dashicons-star-filled"></span> ' . __('PREMIUM', 'blog2social'),
|
901 |
+
'href' => $seo_url . 'blog2social-premium',
|
902 |
+
'parent' => 'blog2social'
|
903 |
+
));
|
904 |
+
}
|
905 |
+
}
|
906 |
+
|
907 |
+
//PageFunktion
|
908 |
+
public function b2sstart() {
|
909 |
+
|
910 |
+
if (B2S_Tools::showNotice() == false) {
|
911 |
+
wp_enqueue_style('B2SFULLCALLENDARCSS');
|
912 |
+
wp_enqueue_style('B2SCALENDARCSS');
|
913 |
+
wp_enqueue_script('B2SFULLCALENDARMOMENTJS');
|
914 |
+
wp_enqueue_script('B2SFULLCALENDARJS');
|
915 |
+
wp_enqueue_script('B2SFULLCALENDARLOCALEJS');
|
916 |
+
wp_enqueue_script('B2SLIB');
|
917 |
+
|
918 |
+
wp_enqueue_script('B2SMOMENT');
|
919 |
+
wp_enqueue_script('B2SCHARTJS');
|
920 |
+
wp_enqueue_style('B2SSTARTCSS');
|
921 |
+
wp_enqueue_script('B2SSTARTJS');
|
922 |
+
wp_enqueue_style('B2SPOSTCSS');
|
923 |
+
wp_enqueue_script('B2SPOSTJS');
|
924 |
+
wp_enqueue_style('B2SAIRDATEPICKERCSS');
|
925 |
+
wp_enqueue_script('B2SAIRDATEPICKERJS');
|
926 |
+
wp_enqueue_script('B2SAIRDATEPICKERDEJS');
|
927 |
+
wp_enqueue_script('B2SAIRDATEPICKERENJS');
|
928 |
+
require_once( B2S_PLUGIN_DIR . 'views/b2s/dashboard.php');
|
929 |
+
} else {
|
930 |
+
require_once( B2S_PLUGIN_DIR . 'views/notice.php');
|
931 |
+
}
|
932 |
+
}
|
933 |
+
|
934 |
+
//PageFunktion
|
935 |
+
public function b2sPost() {
|
936 |
+
if (B2S_Tools::showNotice() == false) {
|
937 |
+
wp_enqueue_style('B2SPOSTCSS');
|
938 |
+
wp_enqueue_script('B2SPOSTJS');
|
939 |
+
require_once( B2S_PLUGIN_DIR . 'views/b2s/post.php');
|
940 |
+
} else {
|
941 |
+
require_once( B2S_PLUGIN_DIR . 'views/notice.php');
|
942 |
+
}
|
943 |
+
}
|
944 |
+
|
945 |
+
//Page Curation
|
946 |
+
public function b2sContentCuration() {
|
947 |
+
if (B2S_Tools::showNotice() == false) {
|
948 |
+
wp_enqueue_style('B2SCURATIONCSS');
|
949 |
+
wp_enqueue_script('B2SCURATIONJS');
|
950 |
+
wp_enqueue_style('B2SAIRDATEPICKERCSS');
|
951 |
+
wp_enqueue_script('B2SAIRDATEPICKERJS');
|
952 |
+
wp_enqueue_script('B2SAIRDATEPICKERDEJS');
|
953 |
+
wp_enqueue_script('B2SAIRDATEPICKERENJS');
|
954 |
+
require_once( B2S_PLUGIN_DIR . 'views/b2s/curation.php');
|
955 |
+
} else {
|
956 |
+
require_once( B2S_PLUGIN_DIR . 'views/notice.php');
|
957 |
+
}
|
958 |
+
}
|
959 |
+
|
960 |
+
//PageFunktion
|
961 |
+
public function b2sNetwork() {
|
962 |
+
if (B2S_Tools::showNotice() == false) {
|
963 |
+
wp_enqueue_style('B2SNETWORKCSS');
|
964 |
+
wp_enqueue_script('B2SNETWORKJS');
|
965 |
+
wp_enqueue_style('B2STIMEPICKERCSS');
|
966 |
+
wp_enqueue_script('B2STIMEPICKERJS');
|
967 |
+
require_once( B2S_PLUGIN_DIR . 'views/b2s/network.php');
|
968 |
+
} else {
|
969 |
+
require_once( B2S_PLUGIN_DIR . 'views/notice.php');
|
970 |
+
}
|
971 |
+
}
|
972 |
+
|
973 |
+
//PageFunktion
|
974 |
+
public function b2sSettings() {
|
975 |
+
if (B2S_Tools::showNotice() == false) {
|
976 |
+
wp_enqueue_style('B2SSETTINGSCSS');
|
977 |
+
wp_enqueue_script('B2SSETTINGSJS');
|
978 |
+
wp_enqueue_style('B2STIMEPICKERCSS');
|
979 |
+
wp_enqueue_script('B2STIMEPICKERJS');
|
980 |
+
wp_enqueue_style('B2SBTNTOOGLECSS');
|
981 |
+
wp_enqueue_script('B2SBTNTOOGLEJS');
|
982 |
+
wp_enqueue_style('B2SCHOSENCSS');
|
983 |
+
wp_enqueue_script('B2SCHOSENJS');
|
984 |
+
|
985 |
+
if (current_user_can('upload_files')) {
|
986 |
+
//Capability by Super Admin ,Administrator ,Editor ,Author
|
987 |
+
wp_enqueue_media();
|
988 |
+
}
|
989 |
+
require_once( B2S_PLUGIN_DIR . 'views/b2s/settings.php');
|
990 |
+
} else {
|
991 |
+
require_once( B2S_PLUGIN_DIR . 'views/notice.php');
|
992 |
+
}
|
993 |
+
}
|
994 |
+
|
995 |
+
//PageFunktion
|
996 |
+
public function b2sShip() {
|
997 |
+
if (B2S_Tools::showNotice() == false) {
|
998 |
+
|
999 |
+
wp_enqueue_style('B2SFULLCALLENDARCSS');
|
1000 |
+
wp_enqueue_style('B2SCALENDARCSS');
|
1001 |
+
wp_enqueue_script('B2SFULLCALENDARMOMENTJS');
|
1002 |
+
wp_enqueue_script('B2SFULLCALENDARJS');
|
1003 |
+
wp_enqueue_script('B2SFULLCALENDARLOCALEJS');
|
1004 |
+
wp_enqueue_script('B2SLIB');
|
1005 |
+
wp_enqueue_style('B2SSHIPCSS');
|
1006 |
+
wp_enqueue_style('B2SDATEPICKERCSS');
|
1007 |
+
wp_enqueue_style('B2STIMEPICKERCSS');
|
1008 |
+
wp_enqueue_style('B2SWYSIWYGCSS');
|
1009 |
+
wp_enqueue_script('B2SWYSIWYGJS');
|
1010 |
+
if (substr(B2S_LANGUAGE, 0, 2) == 'de') {
|
1011 |
+
wp_enqueue_script('B2SWYSIWYGLANGDEJS');
|
1012 |
+
} else {
|
1013 |
+
wp_enqueue_script('B2SWYSIWYGLANGENJS');
|
1014 |
+
}
|
1015 |
+
wp_enqueue_script('B2SDATEPICKERJS');
|
1016 |
+
wp_enqueue_script('B2SDATEPICKERDEJS');
|
1017 |
+
wp_enqueue_script('B2SDATEPICKERENJS');
|
1018 |
+
wp_enqueue_script('B2STIMEPICKERJS');
|
1019 |
+
wp_enqueue_script('B2SSHIPJS');
|
1020 |
+
if (current_user_can('upload_files')) {
|
1021 |
+
//Capability by Super Admin ,Administrator ,Editor ,Author
|
1022 |
+
wp_enqueue_media();
|
1023 |
+
}
|
1024 |
+
require_once( B2S_PLUGIN_DIR . 'views/b2s/ship.php');
|
1025 |
+
} else {
|
1026 |
+
require_once( B2S_PLUGIN_DIR . 'views/notice.php');
|
1027 |
+
}
|
1028 |
+
}
|
1029 |
+
|
1030 |
+
//PageFunktion
|
1031 |
+
public function b2sCurationDraft() {
|
1032 |
+
if (B2S_Tools::showNotice() == false) {
|
1033 |
+
wp_enqueue_style('B2SCURATIONDRAFTCSS');
|
1034 |
+
wp_enqueue_script('B2SCURATIONDRAFTJS');
|
1035 |
+
require_once( B2S_PLUGIN_DIR . 'views/b2s/curation.draft.php');
|
1036 |
+
} else {
|
1037 |
+
require_once( B2S_PLUGIN_DIR . 'views/notice.php');
|
1038 |
+
}
|
1039 |
+
}
|
1040 |
+
|
1041 |
+
//PageFunktion
|
1042 |
+
public function prgLogin() {
|
1043 |
+
if (B2S_Tools::showNotice() == false) {
|
1044 |
+
$prgInfo = get_option('B2S_PLUGIN_PRG_' . B2S_PLUGIN_BLOG_USER_ID);
|
1045 |
+
if ($prgInfo != false && isset($prgInfo['B2S_PRG_ID']) && (int) $prgInfo['B2S_PRG_ID'] > 0 && isset($prgInfo['B2S_PRG_TOKEN']) && !empty($prgInfo['B2S_PRG_TOKEN'])) {
|
1046 |
+
$postId = (int) $_GET['postId'];
|
1047 |
+
echo'<script> window.location="' . admin_url('/admin.php?page=prg-ship&postId=' . $postId, 'http') . '"; </script> ';
|
1048 |
+
//wp_redirect(admin_url('/admin.php?page=prg-ship&postId=' . $postId, 'http'), 301);
|
1049 |
+
wp_die();
|
1050 |
+
} else {
|
1051 |
+
wp_enqueue_style('PRGLOGINCSS');
|
1052 |
+
wp_enqueue_script('PRGLOGINJS');
|
1053 |
+
require_once( B2S_PLUGIN_DIR . 'views/prg/login.php');
|
1054 |
+
}
|
1055 |
+
} else {
|
1056 |
+
require_once( B2S_PLUGIN_DIR . 'views/notice.php');
|
1057 |
+
}
|
1058 |
+
}
|
1059 |
+
|
1060 |
+
//PageFunktion
|
1061 |
+
public function prgShip() {
|
1062 |
+
if (B2S_Tools::showNotice() == false) {
|
1063 |
+
wp_enqueue_style('PRGSHIPCSS');
|
1064 |
+
wp_enqueue_script('PRGSHIPJS');
|
1065 |
+
wp_enqueue_script('PRGGENERALJS');
|
1066 |
+
require_once( B2S_PLUGIN_DIR . 'views/prg/ship.php');
|
1067 |
+
} else {
|
1068 |
+
require_once( B2S_PLUGIN_DIR . 'views/notice.php');
|
1069 |
+
}
|
1070 |
+
}
|
1071 |
+
|
1072 |
+
//PageFunktion
|
1073 |
+
public function b2sPostSched() {
|
1074 |
+
if (B2S_Tools::showNotice() == false) {
|
1075 |
+
wp_enqueue_script('B2SLIB');
|
1076 |
+
wp_enqueue_style('B2SPOSTSCHEDCSS');
|
1077 |
+
wp_enqueue_style('B2SDATEPICKERCSS');
|
1078 |
+
wp_enqueue_style('B2STIMEPICKERCSS');
|
1079 |
+
wp_enqueue_script('B2SDATEPICKERJS');
|
1080 |
+
wp_enqueue_script('B2SDATEPICKERDEJS');
|
1081 |
+
wp_enqueue_script('B2SDATEPICKERENJS');
|
1082 |
+
wp_enqueue_script('B2STIMEPICKERJS');
|
1083 |
+
wp_enqueue_script('B2SPOSTJS');
|
1084 |
+
wp_enqueue_style('B2SWYSIWYGCSS');
|
1085 |
+
wp_enqueue_script('B2SWYSIWYGJS');
|
1086 |
+
wp_enqueue_script('B2SSHIPJS');
|
1087 |
+
if (substr(B2S_LANGUAGE, 0, 2) == 'de') {
|
1088 |
+
wp_enqueue_script('B2SWYSIWYGLANGDEJS');
|
1089 |
+
} else {
|
1090 |
+
wp_enqueue_script('B2SWYSIWYGLANGENJS');
|
1091 |
+
}
|
1092 |
+
if (current_user_can('upload_files')) {
|
1093 |
+
//Capability by Super Admin ,Administrator ,Editor ,Author
|
1094 |
+
wp_enqueue_media();
|
1095 |
+
}
|
1096 |
+
require_once( B2S_PLUGIN_DIR . 'views/b2s/post.sched.php');
|
1097 |
+
} else {
|
1098 |
+
require_once( B2S_PLUGIN_DIR . 'views/notice.php');
|
1099 |
+
}
|
1100 |
+
}
|
1101 |
+
|
1102 |
+
//PageFunktion
|
1103 |
+
public function b2sPostApprove() {
|
1104 |
+
if (B2S_Tools::showNotice() == false) {
|
1105 |
+
wp_enqueue_style('B2SPOSTAPPROVECSS');
|
1106 |
+
wp_enqueue_script('B2SPOSTJS');
|
1107 |
+
require_once( B2S_PLUGIN_DIR . 'views/b2s/post.approve.php');
|
1108 |
+
} else {
|
1109 |
+
require_once( B2S_PLUGIN_DIR . 'views/notice.php');
|
1110 |
+
}
|
1111 |
+
}
|
1112 |
+
|
1113 |
+
//PageFunktion
|
1114 |
+
public function b2sPostDraft() {
|
1115 |
+
if (B2S_Tools::showNotice() == false) {
|
1116 |
+
wp_enqueue_style('B2SPOSTDRAFTCSS');
|
1117 |
+
wp_enqueue_script('B2SPOSTJS');
|
1118 |
+
require_once( B2S_PLUGIN_DIR . 'views/b2s/post.draft.php');
|
1119 |
+
} else {
|
1120 |
+
require_once( B2S_PLUGIN_DIR . 'views/notice.php');
|
1121 |
+
}
|
1122 |
+
}
|
1123 |
+
|
1124 |
+
//PageFunktion
|
1125 |
+
public function b2sPostCalendar() {
|
1126 |
+
if (B2S_Tools::showNotice() == false) {
|
1127 |
+
wp_enqueue_script('B2SLIB');
|
1128 |
+
wp_enqueue_style('B2SFULLCALLENDARCSS');
|
1129 |
+
wp_enqueue_style('B2SCALENDARCSS');
|
1130 |
+
wp_enqueue_style('B2SDATEPICKERCSS');
|
1131 |
+
wp_enqueue_style('B2STIMEPICKERCSS');
|
1132 |
+
wp_enqueue_script('B2SDATEPICKERJS');
|
1133 |
+
wp_enqueue_script('B2SDATEPICKERDEJS');
|
1134 |
+
wp_enqueue_script('B2SDATEPICKERENJS');
|
1135 |
+
wp_enqueue_script('B2STIMEPICKERJS');
|
1136 |
+
wp_enqueue_script('B2SCALENDARJS');
|
1137 |
+
wp_enqueue_script('B2SFULLCALENDARMOMENTJS');
|
1138 |
+
wp_enqueue_script('B2SFULLCALENDARJS');
|
1139 |
+
wp_enqueue_script('B2SFULLCALENDARLOCALEJS');
|
1140 |
+
wp_enqueue_style('B2SWYSIWYGCSS');
|
1141 |
+
wp_enqueue_script('B2SWYSIWYGJS');
|
1142 |
+
wp_enqueue_script('B2SSHIPJS');
|
1143 |
+
if (substr(B2S_LANGUAGE, 0, 2) == 'de') {
|
1144 |
+
wp_enqueue_script('B2SWYSIWYGLANGDEJS');
|
1145 |
+
} else {
|
1146 |
+
wp_enqueue_script('B2SWYSIWYGLANGENJS');
|
1147 |
+
}
|
1148 |
+
|
1149 |
+
if (current_user_can('upload_files')) {
|
1150 |
+
//Capability by Super Admin ,Administrator ,Editor ,Author
|
1151 |
+
wp_enqueue_media();
|
1152 |
+
}
|
1153 |
+
require_once( B2S_PLUGIN_DIR . 'views/b2s/post.calendar.php');
|
1154 |
+
} else {
|
1155 |
+
require_once( B2S_PLUGIN_DIR . 'views/notice.php');
|
1156 |
+
}
|
1157 |
+
}
|
1158 |
+
|
1159 |
+
//PageFunktion
|
1160 |
+
public function b2sSupport() {
|
1161 |
+
wp_enqueue_style('B2SSUPPORT');
|
1162 |
+
wp_enqueue_script('B2SSUPPORTJS');
|
1163 |
+
require_once( B2S_PLUGIN_DIR . 'views/b2s/support.php');
|
1164 |
+
}
|
1165 |
+
|
1166 |
+
//PageFunktion
|
1167 |
+
public function b2sPremium() {
|
1168 |
+
wp_enqueue_style('B2SPREMIUM');
|
1169 |
+
wp_enqueue_style('B2SCHOSENCSS');
|
1170 |
+
wp_enqueue_script('B2SCHOSENJS');
|
1171 |
+
wp_enqueue_script('B2SPREMIUMJS');
|
1172 |
+
require_once( B2S_PLUGIN_DIR . 'views/b2s/premium.php');
|
1173 |
+
}
|
1174 |
+
|
1175 |
+
//PageFunktion
|
1176 |
+
public function b2sPostPublish() {
|
1177 |
+
if (B2S_Tools::showNotice() == false) {
|
1178 |
+
wp_enqueue_style('B2SPOSTPUBLISHCSS');
|
1179 |
+
wp_enqueue_script('B2SPOSTJS');
|
1180 |
+
wp_enqueue_script('PRGGENERALJS');
|
1181 |
+
require_once( B2S_PLUGIN_DIR . 'views/b2s/post.publish.php');
|
1182 |
+
} else {
|
1183 |
+
require_once( B2S_PLUGIN_DIR . 'views/notice.php');
|
1184 |
+
}
|
1185 |
+
}
|
1186 |
+
|
1187 |
+
//PageFunktion
|
1188 |
+
public function b2sPostNotice() {
|
1189 |
+
if (B2S_Tools::showNotice() == false) {
|
1190 |
+
wp_enqueue_style('B2SPOSTNOTICECSS');
|
1191 |
+
wp_enqueue_script('B2SPOSTJS');
|
1192 |
+
wp_enqueue_script('PRGGENERALJS');
|
1193 |
+
require_once( B2S_PLUGIN_DIR . 'views/b2s/post.notice.php');
|
1194 |
+
} else {
|
1195 |
+
require_once( B2S_PLUGIN_DIR . 'views/notice.php');
|
1196 |
+
}
|
1197 |
+
}
|
1198 |
+
|
1199 |
+
//PageFunktion
|
1200 |
+
public function prgPost() {
|
1201 |
+
if (B2S_Tools::showNotice() == false) {
|
1202 |
+
wp_enqueue_style('PRGPOSTCSS');
|
1203 |
+
wp_enqueue_script('PRGPOSTJS');
|
1204 |
+
wp_enqueue_script('PRGGENERALJS');
|
1205 |
+
require_once( B2S_PLUGIN_DIR . 'views/prg/post.php');
|
1206 |
+
} else {
|
1207 |
+
require_once( B2S_PLUGIN_DIR . 'views/notice.php');
|
1208 |
+
}
|
1209 |
+
}
|
1210 |
+
|
1211 |
+
public function addBootAssets($hook) {
|
1212 |
+
wp_enqueue_script('B2SVALIDATEJS');
|
1213 |
+
if ($hook == 'edit.php') {
|
1214 |
+
wp_enqueue_script('B2SPOSTSCHEDHEARTBEATJS');
|
1215 |
+
}
|
1216 |
+
|
1217 |
+
if ($hook == 'plugins.php') {
|
1218 |
+
wp_enqueue_script('B2SPLUGINDEACTIVATEJS');
|
1219 |
+
wp_enqueue_style('B2SPLUGINDEACTIVATECSS');
|
1220 |
+
}
|
1221 |
+
}
|
1222 |
+
|
1223 |
+
public function addAssets() {
|
1224 |
+
wp_enqueue_style('B2SBOOTCSS');
|
1225 |
+
wp_enqueue_script('B2SBOOTJS');
|
1226 |
+
wp_enqueue_script('B2SGENERALJS');
|
1227 |
+
}
|
1228 |
+
|
1229 |
+
public function registerAssets() {
|
1230 |
+
wp_register_style('B2SBOOTCSS', plugins_url('assets/css/general.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1231 |
+
wp_register_style('B2SSTARTCSS', plugins_url('assets/css/b2s/start.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1232 |
+
wp_register_style('B2SPOSTCSS', plugins_url('assets/css/b2s/post.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1233 |
+
wp_register_style('B2SSHIPCSS', plugins_url('assets/css/b2s/ship.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1234 |
+
wp_register_style('B2SCURATIONCSS', plugins_url('assets/css/b2s/curation.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1235 |
+
|
1236 |
+
wp_register_style('B2SPOSTSCHEDCSS', plugins_url('assets/css/b2s/post.sched.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1237 |
+
wp_register_style('B2SPOSTDRAFTCSS', plugins_url('assets/css/b2s/post.draft.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1238 |
+
wp_register_style('B2SPOSTAPPROVECSS', plugins_url('assets/css/b2s/post.approve.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1239 |
+
wp_register_style('B2SPOSTPUBLISHCSS', plugins_url('assets/css/b2s/post.publish.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1240 |
+
wp_register_style('B2SPOSTNOTICECSS', plugins_url('assets/css/b2s/post.notice.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1241 |
+
wp_register_style('B2SNETWORKCSS', plugins_url('assets/css/b2s/network.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1242 |
+
wp_register_style('B2SSUPPORT', plugins_url('assets/css/b2s/support.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1243 |
+
wp_register_style('B2SPREMIUM', plugins_url('assets/css/b2s/premium.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1244 |
+
wp_register_style('B2SSETTINGSCSS', plugins_url('assets/css/b2s/settings.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1245 |
+
wp_register_style('PRGSHIPCSS', plugins_url('assets/css/prg/ship.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1246 |
+
wp_register_style('PRGLOGINCSS', plugins_url('assets/css/prg/login.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1247 |
+
wp_register_style('B2SDATEPICKERCSS', plugins_url('assets/lib/datepicker/css/bootstrap-datepicker3.min.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1248 |
+
wp_register_style('B2SAIRDATEPICKERCSS', plugins_url('assets/lib/air-datepicker/css/datepicker.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1249 |
+
wp_register_style('B2STIMEPICKERCSS', plugins_url('assets/lib/timepicker/timepicker.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1250 |
+
wp_register_style('PRGPOSTCSS', plugins_url('assets/css/prg/post.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1251 |
+
wp_register_style('B2SWYSIWYGCSS', plugins_url('assets/lib/wysiwyg/square.min.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1252 |
+
wp_register_style('B2SPOSTBOXCSS', plugins_url('assets/css/b2s/wp/post-box.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1253 |
+
wp_register_style('B2SNOTICECSS', plugins_url('assets/css/notice.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1254 |
+
wp_register_style('B2SFULLCALLENDARCSS', plugins_url('assets/lib/fullcalendar/fullcalendar.min.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1255 |
+
wp_register_style('B2SCALENDARCSS', plugins_url('assets/css/b2s/calendar.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1256 |
+
wp_register_style('B2SBTNTOOGLECSS', plugins_url('assets/lib/btn-toogle/bootstrap-toggle.min.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1257 |
+
wp_register_style('B2SCHOSENCSS', plugins_url('assets/lib/chosen/chosen.min.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1258 |
+
wp_register_style('B2SPLUGINDEACTIVATECSS', plugins_url('assets/css/b2s/wp/plugin-deactivate.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1259 |
+
wp_register_style('B2SCURATIONDRAFTCSS', plugins_url('assets/css/b2s/curation.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1260 |
+
|
1261 |
+
wp_register_script('B2SNETWORKJS', plugins_url('assets/js/b2s/network.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1262 |
+
wp_register_script('B2SSETTINGSJS', plugins_url('assets/js/b2s/settings.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1263 |
+
wp_register_script('B2SSTARTJS', plugins_url('assets/js/b2s/start.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1264 |
+
wp_register_script('B2SPOSTJS', plugins_url('assets/js/b2s/post.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1265 |
+
wp_register_script('B2SSHIPJS', plugins_url('assets/js/b2s/ship.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1266 |
+
wp_register_script('B2SCURATIONJS', plugins_url('assets/js/b2s/curation.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1267 |
+
wp_register_script('PRGSHIPJS', plugins_url('assets/js/prg/ship.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1268 |
+
wp_register_script('PRGLOGINJS', plugins_url('assets/js/prg/login.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1269 |
+
wp_register_script('B2SBOOTJS', plugins_url('assets/js/general.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1270 |
+
wp_register_script('B2SVALIDATEJS', plugins_url('assets/js/validate.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1271 |
+
|
1272 |
+
wp_register_script('B2SSUPPORTJS', plugins_url('assets/js/b2s/support.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1273 |
+
wp_register_script('B2SGENERALJS', plugins_url('assets/js/b2s/general.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1274 |
+
wp_register_script('B2SDATEPICKERJS', plugins_url('assets/lib/datepicker/js/bootstrap-datepicker.min.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1275 |
+
wp_register_script('B2SDATEPICKERDEJS', plugins_url('assets/lib/datepicker/locales/bootstrap-datepicker.de_DE.min.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1276 |
+
wp_register_script('B2SDATEPICKERENJS', plugins_url('assets/lib/datepicker/locales/bootstrap-datepicker.en_US.min.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1277 |
+
wp_register_script('B2SAIRDATEPICKERJS', plugins_url('assets/lib/air-datepicker/js/datepicker.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1278 |
+
wp_register_script('B2SAIRDATEPICKERDEJS', plugins_url('assets/lib/air-datepicker/js/locales/datepicker.de.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1279 |
+
wp_register_script('B2SAIRDATEPICKERENJS', plugins_url('assets/lib/air-datepicker/js/locales/datepicker.en.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1280 |
+
wp_register_script('B2SCHARTJS', plugins_url('assets/lib/chartjs/Chart.bundle.min.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1281 |
+
wp_register_script('B2SMOMENT', plugins_url('assets/lib/moment/moment-with-locales.min.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1282 |
+
wp_register_script('B2STIMEPICKERJS', plugins_url('assets/lib/timepicker/timepicker.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1283 |
+
wp_register_script('B2SNOTICEJS', plugins_url('assets/js/notice.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1284 |
+
wp_register_script('PRGPOSTJS', plugins_url('assets/js/prg/post.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1285 |
+
wp_register_script('PRGGENERALJS', plugins_url('assets/js/prg/general.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1286 |
+
wp_register_script('B2SWYSIWYGJS', plugins_url('assets/lib/wysiwyg/jquery.sceditor.xhtml.min.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1287 |
+
wp_register_script('B2SWYSIWYGLANGDEJS', plugins_url('assets/lib/wysiwyg/languages/de.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1288 |
+
wp_register_script('B2SWYSIWYGLANGENJS', plugins_url('assets/lib/wysiwyg/languages/en.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1289 |
+
wp_register_script('B2SPOSTBOXJS', plugins_url('assets/js/b2s/wp/post-box.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1290 |
+
wp_register_script('B2SPOSTSCHEDHEARTBEATJS', plugins_url('assets/js/b2s/wp/post-sched-heartbeat.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1291 |
+
wp_register_script('B2SCALENDARJS', plugins_url('assets/js/b2s/calendar.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1292 |
+
wp_register_script('B2SFULLCALENDARMOMENTJS', plugins_url('assets/lib/fullcalendar/lib/moment.min.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1293 |
+
wp_register_script('B2SFULLCALENDARJS', plugins_url('assets/lib/fullcalendar/fullcalendar.min.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1294 |
+
wp_register_script('B2SFULLCALENDARLOCALEJS', plugins_url('assets/lib/fullcalendar/locale-all.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1295 |
+
wp_register_script('B2SBTNTOOGLEJS', plugins_url('assets/lib/btn-toogle/bootstrap-toggle.min.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1296 |
+
wp_register_script('B2SCHOSENJS', plugins_url('assets/lib/chosen/chosen.jquery.min.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1297 |
+
wp_register_script('B2SLIB', plugins_url('assets/js/b2s/lib.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1298 |
+
wp_register_script('B2SPLUGINDEACTIVATEJS', plugins_url('assets/js/b2s/wp/plugin-deactivate.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1299 |
+
wp_register_script('B2SCURATIONDRAFTJS', plugins_url('assets/js/b2s/curation.draft.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1300 |
+
wp_register_script('B2SPREMIUMJS', plugins_url('assets/js/b2s/premium.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
|
1301 |
+
}
|
1302 |
+
|
1303 |
+
public function activatePlugin() {
|
1304 |
+
require_once (B2S_PLUGIN_DIR . 'includes/System.php');
|
1305 |
+
require_once(B2S_PLUGIN_DIR . 'includes/Options.php');
|
1306 |
+
$b2sSystem = new B2S_System();
|
1307 |
+
$b2sCheckBefore = $b2sSystem->check('before');
|
1308 |
+
if (is_array($b2sCheckBefore)) {
|
1309 |
+
$b2sSystem->deactivatePlugin();
|
1310 |
+
wp_die($b2sSystem->getErrorMessage($b2sCheckBefore) . ' ' . __('or', 'blog2social') . ' <a href="' . admin_url("/plugins.php", "http") . '/">' . __('back to install plugins', 'blog2social') . '</a>');
|
1311 |
+
}
|
1312 |
+
|
1313 |
+
global $wpdb;
|
1314 |
+
//Start Old Plugin
|
1315 |
+
$sqlDeleteFirst = 'DROP TABLE IF EXISTS `prg_connect_sent`';
|
1316 |
+
$wpdb->query($sqlDeleteFirst);
|
1317 |
+
$sqlDeleteSecond = 'DROP TABLE IF EXISTS `prg_connect_config`';
|
1318 |
+
$wpdb->query($sqlDeleteSecond);
|
1319 |
+
//END Old Plugin
|
1320 |
+
$sqlCreateUser = "CREATE TABLE IF NOT EXISTS `b2s_user` (
|
1321 |
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
1322 |
+
`token` varchar(255) NOT NULL,
|
1323 |
+
`blog_user_id` int(11) NOT NULL,
|
1324 |
+
`feature` TINYINT(2) NOT NULL,
|
1325 |
+
`state_url` TINYINT(2) NOT NULL,
|
1326 |
+
`register_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
1327 |
+
PRIMARY KEY (`id`), INDEX `blog_user_id` (`blog_user_id`), INDEX `token` (`token`), INDEX `feature` (`feature`)
|
1328 |
+
) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci AUTO_INCREMENT=1;";
|
1329 |
+
$wpdb->query($sqlCreateUser);
|
1330 |
+
|
1331 |
+
$b2sUserCols = $wpdb->get_results('SHOW COLUMNS FROM b2s_user');
|
1332 |
+
if (is_array($b2sUserCols) && isset($b2sUserCols[0])) {
|
1333 |
+
$b2sUserColsData = array();
|
1334 |
+
foreach ($b2sUserCols as $key => $value) {
|
1335 |
+
if (isset($value->Field) && !empty($value->Field)) {
|
1336 |
+
$b2sUserColsData[] = $value->Field;
|
1337 |
+
}
|
1338 |
+
}
|
1339 |
+
if (!in_array("register_date", $b2sUserColsData)) {
|
1340 |
+
$wpdb->query("ALTER TABLE b2s_user ADD register_date DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'");
|
1341 |
+
}
|
1342 |
+
if (!in_array("state_url", $b2sUserColsData)) {
|
1343 |
+
$wpdb->query("ALTER TABLE b2s_user ADD state_url TINYINT(2) NOT NULL DEFAULT '1'");
|
1344 |
+
}
|
1345 |
+
}
|
1346 |
+
|
1347 |
+
//Notice Rating - stop rating remember again
|
1348 |
+
//$wpdb->query('UPDATE `b2s_user` SET `feature` = 0');
|
1349 |
+
|
1350 |
+
$keys = $wpdb->get_results('SHOW INDEX FROM `b2s_user`');
|
1351 |
+
$allowIndexUser = array('PRIMARY', 'blog_user_id', 'token', 'feature');
|
1352 |
+
foreach ($keys as $k => $value) {
|
1353 |
+
if (!in_array($value->Key_name, $allowIndexUser)) {
|
1354 |
+
$wpdb->query('ALTER TABLE `b2s_user` DROP INDEX ' . $value->Key_name);
|
1355 |
+
}
|
1356 |
+
}
|
1357 |
+
|
1358 |
+
$sqlCreateUserPosts = "CREATE TABLE IF NOT EXISTS `b2s_posts` (
|
1359 |
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
1360 |
+
`post_id` int(11) NOT NULL,
|
1361 |
+
`blog_user_id` int(11) NOT NULL,
|
1362 |
+
`last_edit_blog_user_id` int(11) NOT NULL,
|
1363 |
+
`user_timezone` TINYINT NOT NULL DEFAULT '0',
|
1364 |
+
`sched_details_id` INT NOT NULL,
|
1365 |
+
`sched_type` TINYINT NOT NULL DEFAULT '0',
|
1366 |
+
`sched_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
1367 |
+
`sched_date_utc` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
1368 |
+
`publish_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
1369 |
+
`publish_link` varchar(255) NOT NULL,
|
1370 |
+
`publish_error_code` varchar(100) NOT NULL,
|
1371 |
+
`network_details_id` int(11) NOT NULL,
|
1372 |
+
`post_for_relay` TINYINT NOT NULL DEFAULT '0',
|
1373 |
+
`post_for_approve` TINYINT NOT NULL DEFAULT '0',
|
1374 |
+
`relay_primary_post_id` int(11) NOT NULL DEFAULT '0',
|
1375 |
+
`relay_delay_min` int(11) NOT NULL DEFAULT '0',
|
1376 |
+
`hook_action` TINYINT NOT NULL DEFAULT '0',
|
1377 |
+
`hide` TINYINT NOT NULL DEFAULT '0',
|
1378 |
+
`v2_id` int(11) NOT NULL DEFAULT '0',
|
1379 |
+
PRIMARY KEY (`id`), INDEX `post_id` (`post_id`), INDEX `blog_user_id` (`blog_user_id`) , INDEX `sched_details_id` (`sched_details_id`),
|
1380 |
+
INDEX `sched_date` (`sched_date`), INDEX `sched_date_utc` (`sched_date_utc`), INDEX `publish_date` (`publish_date`) , INDEX `relay_primary_post_id` (`relay_primary_post_id`) ,
|
1381 |
+
INDEX `hook_action` (`hook_action`), INDEX `hide` (`hide`)
|
1382 |
+
) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci AUTO_INCREMENT=1 ;";
|
1383 |
+
$wpdb->query($sqlCreateUserPosts);
|
1384 |
+
|
1385 |
+
//since V4.8.0
|
1386 |
+
$b2sPostsCols = $wpdb->get_results('SHOW COLUMNS FROM b2s_posts');
|
1387 |
+
if (is_array($b2sPostsCols) && isset($b2sPostsCols[0])) {
|
1388 |
+
$b2sPostsColsData = array();
|
1389 |
+
foreach ($b2sPostsCols as $key => $value) {
|
1390 |
+
if (isset($value->Field) && !empty($value->Field)) {
|
1391 |
+
$b2sPostsColsData[] = $value->Field;
|
1392 |
+
}
|
1393 |
+
}
|
1394 |
+
if (!in_array("last_edit_blog_user_id", $b2sPostsColsData)) {
|
1395 |
+
$wpdb->query("ALTER TABLE b2s_posts ADD last_edit_blog_user_id INT NOT NULL DEFAULT '0'");
|
1396 |
+
}
|
1397 |
+
if (!in_array("post_for_relay", $b2sPostsColsData)) {
|
1398 |
+
$wpdb->query("ALTER TABLE b2s_posts ADD post_for_relay TINYINT NOT NULL DEFAULT '0'");
|
1399 |
+
}
|
1400 |
+
if (!in_array("post_for_approve", $b2sPostsColsData)) {
|
1401 |
+
$wpdb->query("ALTER TABLE b2s_posts ADD post_for_approve TINYINT NOT NULL DEFAULT '0'");
|
1402 |
+
}
|
1403 |
+
if (!in_array("relay_primary_post_id", $b2sPostsColsData)) {
|
1404 |
+
$wpdb->query("ALTER TABLE b2s_posts ADD relay_primary_post_id int(11) NOT NULL DEFAULT '0'");
|
1405 |
+
$wpdb->query('ALTER TABLE `b2s_posts` ADD INDEX(`relay_primary_post_id`)');
|
1406 |
+
}
|
1407 |
+
if (!in_array("relay_delay_min", $b2sPostsColsData)) {
|
1408 |
+
$wpdb->query("ALTER TABLE b2s_posts ADD relay_delay_min int(11) NOT NULL DEFAULT '0'");
|
1409 |
+
}
|
1410 |
+
}
|
1411 |
+
|
1412 |
+
$keys = $wpdb->get_results('SHOW INDEX FROM `b2s_posts`');
|
1413 |
+
$allowIndexPosts = array('PRIMARY', 'post_id', 'blog_user_id', 'sched_details_id', 'sched_date', 'sched_date_utc', 'publish_date', 'relay_primary_post_id', 'hook_action', 'hide');
|
1414 |
+
foreach ($keys as $k => $value) {
|
1415 |
+
if (!in_array($value->Key_name, $allowIndexPosts)) {
|
1416 |
+
$wpdb->query('ALTER TABLE `b2s_posts` DROP INDEX ' . $value->Key_name);
|
1417 |
+
}
|
1418 |
+
}
|
1419 |
+
|
1420 |
+
//Change Collation >=V4.0 Emoji
|
1421 |
+
$existsTable = $wpdb->get_results('SHOW TABLES LIKE "b2s_posts_sched_details"');
|
1422 |
+
if (is_array($existsTable) && !empty($existsTable)) {
|
1423 |
+
$wpdb->query('ALTER TABLE `b2s_posts_sched_details` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
|
1424 |
+
$wpdb->query('ALTER TABLE `b2s_posts_sched_details` CHANGE sched_data sched_data TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
|
1425 |
+
$wpdb->query('REPAIR TABLE `b2s_posts_sched_details`');
|
1426 |
+
$wpdb->query('OPTIMIZE TABLE `b2s_posts_sched_details`');
|
1427 |
+
} else {
|
1428 |
+
$sqlCreateUserSchedDetails = "CREATE TABLE IF NOT EXISTS `b2s_posts_sched_details` (
|
1429 |
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
1430 |
+
`sched_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
1431 |
+
`image_url` varchar(255) NOT NULL,
|
1432 |
+
PRIMARY KEY (`id`)
|
1433 |
+
) DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci AUTO_INCREMENT=1 ;";
|
1434 |
+
$wpdb->query($sqlCreateUserSchedDetails);
|
1435 |
+
}
|
1436 |
+
|
1437 |
+
$sqlCreateUserNetworkDetails = "CREATE TABLE IF NOT EXISTS `b2s_posts_network_details` (
|
1438 |
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
1439 |
+
`network_id` TINYINT NOT NULL,
|
1440 |
+
`network_type` TINYINT NOT NULL,
|
1441 |
+
`network_auth_id` int(11) NOT NULL,
|
1442 |
+
`network_display_name` varchar(100) NOT NULL,
|
1443 |
+
PRIMARY KEY (`id`)
|
1444 |
+
) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci AUTO_INCREMENT=1 ;";
|
1445 |
+
$wpdb->query($sqlCreateUserNetworkDetails);
|
1446 |
+
|
1447 |
+
$sqlCreateUserContact = "CREATE TABLE IF NOT EXISTS `b2s_user_contact`(
|
1448 |
+
`id` int(5) NOT NULL AUTO_INCREMENT ,
|
1449 |
+
`blog_user_id` int(11) NOT NULL ,
|
1450 |
+
`name_mandant` varchar(100) NOT NULL ,
|
1451 |
+
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
1452 |
+
`name_presse` varchar(100) NOT NULL ,
|
1453 |
+
`anrede_presse` enum('0','1','2') NOT NULL DEFAULT '0' COMMENT '0=Frau,1=Herr 2=keine Angabe',
|
1454 |
+
`vorname_presse` varchar(50) NOT NULL ,
|
1455 |
+
`nachname_presse` varchar(50) NOT NULL ,
|
1456 |
+
`strasse_presse` varchar(100) NOT NULL ,
|
1457 |
+
`nummer_presse` varchar(5) NOT NULL DEFAULT '',
|
1458 |
+
`plz_presse` varchar(10) NOT NULL ,
|
1459 |
+
`ort_presse` varchar(75) NOT NULL ,
|
1460 |
+
`land_presse` varchar(3) NOT NULL DEFAULT 'DE',
|
1461 |
+
`email_presse` varchar(75) NOT NULL ,
|
1462 |
+
`telefon_presse` varchar(30) NOT NULL ,
|
1463 |
+
`fax_presse` varchar(30) NOT NULL ,
|
1464 |
+
`url_presse` varchar(150) NOT NULL ,
|
1465 |
+
PRIMARY KEY (`id`) ,
|
1466 |
+
KEY `blog_user_id`(`blog_user_id`)) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci AUTO_INCREMENT=1";
|
1467 |
+
$wpdb->query($sqlCreateUserContact);
|
1468 |
+
|
1469 |
+
|
1470 |
+
$sqlCreateNetworkSettings = 'CREATE TABLE IF NOT EXISTS `b2s_user_network_settings` (
|
1471 |
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
1472 |
+
`blog_user_id` int(11) NOT NULL,
|
1473 |
+
`mandant_id` int(11) NOT NULL,
|
1474 |
+
`network_auth_id` int(11) NOT NULL,
|
1475 |
+
PRIMARY KEY (`id`),
|
1476 |
+
INDEX `blog_user_id` (`blog_user_id`), INDEX `mandant_id` (`mandant_id`)
|
1477 |
+
) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci AUTO_INCREMENT=1;';
|
1478 |
+
$wpdb->query($sqlCreateNetworkSettings);
|
1479 |
+
|
1480 |
+
|
1481 |
+
$sqlCreateDrafts = "CREATE TABLE IF NOT EXISTS `b2s_posts_drafts` (
|
1482 |
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
1483 |
+
`last_save_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
1484 |
+
`blog_user_id` int(11) NOT NULL,
|
1485 |
+
`post_id` int(11) NOT NULL,
|
1486 |
+
`data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
1487 |
+
PRIMARY KEY (`id`),
|
1488 |
+
INDEX `blog_user_id` (`blog_user_id`), INDEX `post_id` (`post_id`)
|
1489 |
+
) DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci AUTO_INCREMENT=1;";
|
1490 |
+
$wpdb->query($sqlCreateDrafts);
|
1491 |
+
|
1492 |
+
|
1493 |
+
/*
|
1494 |
+
* SET SAFETY AUTO-INCREMENT
|
1495 |
+
*/
|
1496 |
+
|
1497 |
+
$wpdb->query("ALTER TABLE `b2s_posts` CHANGE `id` `id` INT(11) NOT NULL AUTO_INCREMENT;");
|
1498 |
+
$wpdb->query("ALTER TABLE `b2s_posts_sched_details` CHANGE `id` `id` INT(11) NOT NULL AUTO_INCREMENT;");
|
1499 |
+
$wpdb->query("ALTER TABLE `b2s_posts_network_details` CHANGE `id` `id` INT(11) NOT NULL AUTO_INCREMENT;");
|
1500 |
+
$wpdb->query("ALTER TABLE `b2s_user` CHANGE `id` `id` INT(11) NOT NULL AUTO_INCREMENT;");
|
1501 |
+
$wpdb->query("ALTER TABLE `b2s_user_contact` CHANGE `id` `id` INT(11) NOT NULL AUTO_INCREMENT;");
|
1502 |
+
$wpdb->query("ALTER TABLE `b2s_user_network_settings` CHANGE `id` `id` INT(11) NOT NULL AUTO_INCREMENT;");
|
1503 |
+
$wpdb->query("ALTER TABLE `b2s_posts_drafts` CHANGE `id` `id` INT(11) NOT NULL AUTO_INCREMENT;");
|
1504 |
+
|
1505 |
+
$b2sCheckAfter = $b2sSystem->check('after');
|
1506 |
+
if (is_array($b2sCheckAfter)) {
|
1507 |
+
$b2sSystem->deactivatePlugin();
|
1508 |
+
wp_die($b2sSystem->getErrorMessage($b2sCheckAfter) . ' ' . __('or', 'blog2social') . ' <a href="' . admin_url("/plugins.php", "http") . '/">' . __('back to install plugins', 'blog2social') . '</a>');
|
1509 |
+
}
|
1510 |
+
|
1511 |
+
//Activate Social Meta Tags
|
1512 |
+
$options = new B2S_Options(0, 'B2S_PLUGIN_GENERAL_OPTIONS');
|
1513 |
+
if ($options->_getOption('og_active') === false || $options->_getOption('card_active') === false) {
|
1514 |
+
$options->_setOption('og_active', 1);
|
1515 |
+
$options->_setOption('card_active', 1);
|
1516 |
+
}
|
1517 |
+
}
|
1518 |
+
|
1519 |
+
public function deactivatePlugin() {
|
1520 |
+
$optionDeleteSchedPosts = get_option('B2S_PLUGIN_DEACTIVATE_SCHED_POST');
|
1521 |
+
if ($optionDeleteSchedPosts !== false && (int) $optionDeleteSchedPosts == 1) {
|
1522 |
+
global $wpdb;
|
1523 |
+
$sqlPosts = "SELECT a.token FROM `b2s_user` a INNER JOIN b2s_posts ON a.`blog_user_id` = b2s_posts.`blog_user_id` where b2s_posts.`hide` = 0 AND b2s_posts.`sched_type` != 3 AND b2s_posts.`publish_date`= '0000-00-00 00:00:00' GROUP by a.blog_user_id";
|
1524 |
+
$results = $wpdb->get_results($sqlPosts, ARRAY_A);
|
1525 |
+
if (is_array($results) && !empty($results)) {
|
1526 |
+
$tempData = array('action' => 'deleteBlogSchedPost', 'host' => get_site_url(), 'data' => serialize($results));
|
1527 |
+
$result = json_decode(B2S_Api_Post::post(B2S_PLUGIN_API_ENDPOINT, $tempData));
|
1528 |
+
if (isset($result->result) && $result->result == true) {
|
1529 |
+
$data = array('hide' => '1', 'hook_action' => '0');
|
1530 |
+
$where = array('publish_date' => '0000-00-00 00:00:00', 'hide' => '0');
|
1531 |
+
$wpdb->update('b2s_posts', $data, $where, array('%d', '%d'), array('%d', '%d'));
|
1532 |
+
delete_option('B2S_PLUGIN_DEACTIVATE_SCHED_POST');
|
1533 |
+
}
|
1534 |
+
}
|
1535 |
+
}
|
1536 |
+
}
|
1537 |
+
|
1538 |
+
public function releaseLocks() {
|
1539 |
+
require_once(B2S_PLUGIN_DIR . 'includes/Options.php');
|
1540 |
+
$options = new B2S_Options(get_current_user_id());
|
1541 |
+
$lock = $options->_getOption("B2S_PLUGIN_USER_CALENDAR_BLOCKED");
|
1542 |
+
|
1543 |
+
if ($lock) {
|
1544 |
+
delete_option("B2S_PLUGIN_CALENDAR_BLOCKED_" . $lock);
|
1545 |
+
$options->_setOption("B2S_PLUGIN_USER_CALENDAR_BLOCKED", false);
|
1546 |
+
}
|
1547 |
+
}
|
1548 |
+
|
1549 |
+
}
|
includes/System.php
CHANGED
@@ -92,4 +92,44 @@ class B2S_System {
|
|
92 |
deactivate_plugins(B2S_PLUGIN_BASENAME);
|
93 |
}
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
}
|
92 |
deactivate_plugins(B2S_PLUGIN_BASENAME);
|
93 |
}
|
94 |
|
95 |
+
//V5.7.0 White-Label-Solution
|
96 |
+
public static function isblockedArea($area = '', $isAdmin = false, $general = false) {
|
97 |
+
if (defined('B2S_PLUGIN_WHITE_LABEL')) {
|
98 |
+
if (B2S_PLUGIN_WHITE_LABEL === true) {
|
99 |
+
if ($general) {
|
100 |
+
return true;
|
101 |
+
}
|
102 |
+
if (defined('B2S_PLUGIN_WHITE_LABEL_BLOCKED_AREA')) {
|
103 |
+
$blocked = unserialize(B2S_PLUGIN_WHITE_LABEL_BLOCKED_AREA);
|
104 |
+
if (is_array($blocked) && !empty($blocked)) {
|
105 |
+
if (in_array(trim($area), $blocked)) {
|
106 |
+
if ((trim($area) == 'B2S_LICENSE_MODUL_EDIT' || trim($area) == 'B2S_MENU_ITEM_LICENSE') && $isAdmin) {
|
107 |
+
return false;
|
108 |
+
}
|
109 |
+
return true;
|
110 |
+
}
|
111 |
+
}
|
112 |
+
}
|
113 |
+
}
|
114 |
+
}
|
115 |
+
return false;
|
116 |
+
}
|
117 |
+
|
118 |
+
//V5.7.0 White-Label-Solution
|
119 |
+
public static function customizeArea() {
|
120 |
+
if (defined('B2S_PLUGIN_WHITE_LABEL')) {
|
121 |
+
if (B2S_PLUGIN_WHITE_LABEL === true) {
|
122 |
+
if (defined('B2S_PLUGIN_WHITE_LABEL_LOGO')) {
|
123 |
+
if (!empty(B2S_PLUGIN_WHITE_LABEL_LOGO)) {
|
124 |
+
$file = get_home_path() . B2S_PLUGIN_WHITE_LABEL_LOGO;
|
125 |
+
if (file_exists($file)) {
|
126 |
+
return array('image_path' => $file);
|
127 |
+
}
|
128 |
+
}
|
129 |
+
}
|
130 |
+
}
|
131 |
+
}
|
132 |
+
return false;
|
133 |
+
}
|
134 |
+
|
135 |
}
|
includes/Tools.php
CHANGED
@@ -243,5 +243,9 @@ class B2S_Tools {
|
|
243 |
}
|
244 |
return $options;
|
245 |
}
|
|
|
|
|
|
|
|
|
246 |
|
247 |
}
|
243 |
}
|
244 |
return $options;
|
245 |
}
|
246 |
+
|
247 |
+
|
248 |
+
|
249 |
+
|
250 |
|
251 |
}
|
languages/blog2social-de_DE.mo
CHANGED
Binary file
|
languages/blog2social-de_DE.po
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
# This file is distributed under the same license as the Plugins - Blog2Social: Social Media Auto Post & Scheduler - Stable (latest release) package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"PO-Revision-Date: 2019-
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -11,10 +11,10 @@ msgstr ""
|
|
11 |
"Language: de_DE\n"
|
12 |
"Project-Id-Version: Plugins - Blog2Social: Social Media Auto Post & Scheduler - Stable (latest release)\n"
|
13 |
"Report-Msgid-Bugs-To: \n"
|
14 |
-
"POT-Creation-Date: 2019-
|
15 |
"Last-Translator: admin <s.buerger@adenion.de>\n"
|
16 |
"Language-Team: German\n"
|
17 |
-
"X-Loco-Version: 2.2.2; wp-5.2.3-
|
18 |
|
19 |
#: includes/Loader.php:44
|
20 |
msgid "Modify pin board"
|
@@ -32,207 +32,215 @@ msgstr "Modify subreddit"
|
|
32 |
msgid "Modify forum"
|
33 |
msgstr "Modify forum"
|
34 |
|
35 |
-
#: includes/Loader.php:
|
36 |
msgid "Auto-Post on Social Media"
|
37 |
msgstr "Automatisch auf Social Media teilen"
|
38 |
|
39 |
-
#: includes/Loader.php:
|
40 |
msgid "Social Media Content Calendar"
|
41 |
msgstr "Social Media Kalender"
|
42 |
|
43 |
-
#: includes/Loader.php:
|
44 |
msgid "This post will be shared into your social media from"
|
45 |
msgstr "Dein Beitrag ist zur Veröffentlichung in den Social Media geplant ab dem"
|
46 |
|
47 |
-
#: includes/Loader.php:
|
48 |
msgid "show details"
|
49 |
msgstr "siehe Details"
|
50 |
|
51 |
-
#: includes/Loader.php:
|
52 |
msgid "This post will be shared on social media in 2-3 minutes!"
|
53 |
msgstr "Dein Beitrag wird in ca. 2-3 Minuten in die Social Media eingestellt!"
|
54 |
|
55 |
-
#: includes/Loader.php:
|
56 |
msgid "Please, make sure that your post are publish on this blog on this moment. Then you can auto post your post with Blog2social."
|
57 |
msgstr "Bitte stelle sicher, dass Dein Beitrag in diesem Moment veröffentlicht wurde. Dann kannst Du Deinen Beitrag automatisch mit Blog2Social posten."
|
58 |
|
59 |
-
#: includes/Loader.php:
|
60 |
msgid "There are no authorizations for your selected profile. Please, authorize with a social network or select a other profile."
|
61 |
msgstr "Dein ausgewähltes Profil hat keine Autorisierungen. Bitte, verbinde Dich mit einem Netzwerk oder wähle ein anderes Profil aus. "
|
62 |
|
63 |
-
#: includes/Loader.php:
|
64 |
msgid "Upgrade to Premium"
|
65 |
msgstr "Premium freischalten"
|
66 |
|
67 |
-
#: includes/Loader.php:
|
68 |
msgid "Notifications"
|
69 |
msgstr "Benachrichtigungen"
|
70 |
|
71 |
-
#: includes/Loader.php:
|
72 |
msgid "Shared Posts"
|
73 |
msgstr "Geteilte Beiträge"
|
74 |
|
75 |
-
#: includes/Loader.php:
|
76 |
msgid "Instant Sharing"
|
77 |
msgstr "Instant Sharing"
|
78 |
|
79 |
-
#: includes/Loader.php:
|
|
|
|
|
|
|
|
|
80 |
msgid "Scheduled Posts"
|
81 |
msgstr "geplante Beiträge"
|
82 |
|
83 |
-
#: includes/Loader.php:
|
84 |
msgid "Content Curation Drafts"
|
85 |
msgstr "Content Curation Entwürfe"
|
86 |
|
87 |
-
#: includes/Loader.php:
|
88 |
msgid "Profile"
|
89 |
msgstr "Profil"
|
90 |
|
91 |
-
#: includes/Loader.php:
|
92 |
msgid "Page"
|
93 |
msgstr "Seite"
|
94 |
|
95 |
-
#: includes/Loader.php:
|
96 |
msgid "Group"
|
97 |
msgstr "Gruppe"
|
98 |
|
99 |
-
#: includes/Loader.php:
|
100 |
msgid "Company"
|
101 |
msgstr "Arbeitgeber"
|
102 |
|
103 |
-
#: includes/Loader.php:
|
104 |
msgid "Business"
|
105 |
msgstr "Business"
|
106 |
|
107 |
-
#: includes/Loader.php:
|
108 |
msgid "Your post could not be posted."
|
109 |
msgstr "Dein Post ist nicht vom Netzwerk veröffentlicht worden."
|
110 |
|
111 |
-
#: includes/Loader.php:
|
112 |
msgid "Your authorization has expired. Please reconnect your account in the Blog2Social network settings."
|
113 |
msgstr "Deine Authorisierung ist abgelaufen. Bitte verbinde Deinen Account in den Blog2Social Netzwerkeinstellungen erneut."
|
114 |
|
115 |
-
#: includes/Loader.php:
|
116 |
msgid "The network has marked the post as spam or abusive."
|
117 |
msgstr "Das Netzwerk hat Deinen Post als Spam oder missbräuchlich markiert."
|
118 |
|
119 |
-
#: includes/Loader.php:
|
120 |
msgid "We don't have the permission to publish your post. Please check your authorization."
|
121 |
msgstr "Wir haben nicht Deine Erlaubnis, den Post zu veröffentlichen. Bitte überprüfe deine Autorisierung."
|
122 |
|
123 |
-
#: includes/Loader.php:
|
124 |
msgid "Your authorization is interrupted. Please check your authorization. Please see <a target=\"_blank\" href=\"https://www.blog2social.com/en/faq/category/9/troubleshooting-for-error-messages.html\">FAQ</a>."
|
125 |
msgstr "Die Autorisierung ist unterbrochen. Bitte überprüfe deine Autorisierung. Siehe <a target=\"_blank\" href=\"https://www.blog2social.com/de/faq/category/9/fehlermeldungen-und-loesungen.html\">FAQ</a>."
|
126 |
|
127 |
-
#: includes/Loader.php:
|
128 |
msgid "Your daily limit has been reached."
|
129 |
msgstr "Dein tägliches Beitragslimit wurde erreicht."
|
130 |
|
131 |
-
#: includes/Loader.php:
|
132 |
msgid "Your post could not be posted, because your image is not available or the image source does not allow to publish"
|
133 |
msgstr "Dein Beitrag konnte nicht veröffentlicht werden, weil Dein Bild nicht verfügbar ist oder die Bildquelle es nicht erlaubt, es zu veröffentlichen."
|
134 |
|
135 |
-
#: includes/Loader.php:
|
136 |
msgid "The network has blocked your account. Please see <a target=\"_blank\" href=\"https://www.blog2social.com/en/faq/category/9/troubleshooting-for-error-messages.html\">FAQ</a>."
|
137 |
msgstr "Das Netzwerk hat deinen Account blockiert. Siehe <a target=\"_blank\" href=\"https://www.blog2social.com/de/faq/category/9/fehlermeldungen-und-loesungen.html\">FAQ</a>."
|
138 |
|
139 |
-
#: includes/Loader.php:
|
140 |
msgid "The number of images is reached. Please see <a target=\"_blank\" href=\"https://www.blog2social.com/en/faq/category/9/troubleshooting-for-error-messages.html\">FAQ</a>."
|
141 |
msgstr "Die erlaubte Anzahl von Bildern ist erreicht. Siehe <a target=\"_blank\" href=\"https://www.blog2social.com/de/faq/category/9/fehlermeldungen-und-loesungen.html\">FAQ</a>."
|
142 |
|
143 |
-
#: includes/Loader.php:
|
144 |
msgid "Your daily limit for this network has been reached. Please try again later."
|
145 |
msgstr "Dein tägliches Beitragslimit für dieses Netzwerk wurde erreicht. Bitte versuche es später noch einmal."
|
146 |
|
147 |
-
#: includes/Loader.php:
|
148 |
msgid "The network can not publish special characters such as Emoji. Please see <a target=\"_blank\" href=\"https://www.blog2social.com/en/faq/category/9/troubleshooting-for-error-messages.html\">FAQ</a>."
|
149 |
msgstr "Das Netzwerk unterstüzt keine Emojis. Siehe <a target=\"_blank\" href=\"https://www.blog2social.com/de/faq/category/9/fehlermeldungen-und-loesungen.html\">FAQ</a>."
|
150 |
|
151 |
-
#: includes/Loader.php:
|
152 |
msgid "Your post is a duplicate."
|
153 |
msgstr "Du kannst auf dem Netzwerke keine Duplikate veröffentlichen."
|
154 |
|
155 |
-
#: includes/Loader.php:
|
156 |
msgid "The network requires a public url."
|
157 |
msgstr "Das Netzwerk benötigt eine öffentlich zugängliche URL."
|
158 |
|
159 |
-
#: includes/Loader.php:
|
160 |
msgid "Your blog post was not available for the network at the time of publication."
|
161 |
msgstr "Dein Blogbeitrag war zum Zeitpunkt der Veröffentlichung für das Netzwerk nicht verfügbar."
|
162 |
|
163 |
-
#: includes/Loader.php:
|
164 |
msgid "You have already retweeted this post."
|
165 |
msgstr "Du hast diesen Post bereits retweetet."
|
166 |
|
167 |
-
#: includes/Loader.php:
|
168 |
msgid "This XING API is no longer supported by XING. Please connect your XING accounts with the new XING interface to reschedule your posts. <a target=\"_blank\" href=\"https://www.blog2social.com/en/faq/index.php?action=artikel&cat=2&id=146\">Learn more</a>"
|
169 |
msgstr ""
|
170 |
"Diese XING-Schnittstelle wird nicht weiter von XING unterstützt wird. Bitte nutze ab jetzt die neue XING-Schnittstelle, um Deine XING Posts neu zu planen. <a target=\"_blank\" href=\"https://www.blog2social.com/de/faq/index.php?action=artikel&cat=2&id=145&artlang=de\">Weitere "
|
171 |
"Informationen.</a>"
|
172 |
|
173 |
-
#: includes/Loader.php:
|
174 |
msgid "There was no image in the meta data of the linked post. Posts without images cannot be shared on image networks."
|
175 |
msgstr "Es konnte kein Bild in den Meta Daten des verlinkten Beitrags gefunden werden. Posts ohne Bilder können nicht auf Bilder-Netzwerken veröffentlicht werden. "
|
176 |
|
177 |
-
#: includes/Loader.php:
|
178 |
msgid "Your post could not be posted, because your image can not be processed by the network."
|
179 |
msgstr "Dein Beitrag konnte nicht veröffentlicht werden, da Dein Bild nicht vom Netzwerk verarbeitet werden kann."
|
180 |
|
181 |
-
#: includes/Loader.php:
|
|
|
|
|
|
|
|
|
182 |
msgid "Your group can not be found by the network."
|
183 |
msgstr "Deine Gruppe kann vom Netzwerk nicht gefunden werden."
|
184 |
|
185 |
-
#: includes/Loader.php:
|
186 |
msgid "Dashboard"
|
187 |
msgstr "Dashboard"
|
188 |
|
189 |
-
#: includes/Loader.php:
|
190 |
msgid "Posts & Sharing"
|
191 |
msgstr "Beiträge"
|
192 |
|
193 |
-
#: includes/Loader.php:
|
194 |
msgid "Calendar"
|
195 |
msgstr "Kalender"
|
196 |
|
197 |
-
#: includes/Loader.php:
|
198 |
msgid "Content Curation"
|
199 |
msgstr "Content Curation"
|
200 |
|
201 |
-
#: includes/Loader.php:
|
202 |
msgid "Networks"
|
203 |
msgstr "Netzwerke"
|
204 |
|
205 |
-
#: includes/Loader.php:
|
206 |
msgid "Settings"
|
207 |
msgstr "Einstellungen"
|
208 |
|
209 |
-
#: includes/Loader.php:
|
210 |
msgid "PR-Service"
|
211 |
msgstr "PR-Service"
|
212 |
|
213 |
-
#: includes/Loader.php:
|
214 |
msgid "Help & Support"
|
215 |
msgstr "Hilfe & Support"
|
216 |
|
217 |
-
#: includes/Loader.php:
|
218 |
msgid "Premium"
|
219 |
msgstr "Premium"
|
220 |
|
221 |
-
#: includes/Loader.php:
|
222 |
-
#: includes/B2S/Network/Item.php:158 includes/B2S/Network/Item.php:250 includes/B2S/Network/Item.php:312 includes/B2S/Network/Item.php:374 includes/B2S/Settings/Item.php:102 includes/B2S/Ship/Image.php:73 includes/B2S/Ship/Image.php:80 includes/B2S/Ship/Item.php:
|
223 |
#: includes/B2S/Ship/Portale.php:32 includes/B2S/Ship/Portale.php:35 includes/B2S/Ship/Portale.php:38 views/b2s/partials/post-edit-modal.php:9 views/b2s/widgets/posts.php:18
|
224 |
msgid "PREMIUM"
|
225 |
msgstr "PREMIUM"
|
226 |
|
227 |
-
#: includes/Loader.php:
|
228 |
msgid "Blog2Social"
|
229 |
msgstr "Blog2Social"
|
230 |
|
231 |
-
#: includes/Loader.php:
|
232 |
msgid "or"
|
233 |
msgstr "oder"
|
234 |
|
235 |
-
#: includes/Loader.php:
|
236 |
msgid "back to install plugins"
|
237 |
msgstr "zurück zur Pluginübersicht"
|
238 |
|
@@ -310,11 +318,12 @@ msgstr "Unbekannter Fehler"
|
|
310 |
msgid "<b> An unknown error occurred! </b> <br> Please contact our support!"
|
311 |
msgstr "<b> Ein unbekannter Fehler ist aufgetreten. </b> <br> Bitte kontaktiere unseren Support."
|
312 |
|
313 |
-
#: includes/Ajax/Get.php:
|
314 |
msgid "Unknown username"
|
315 |
msgstr "unbekannter Blognutzer"
|
316 |
|
317 |
-
#: includes/Ajax/Post.php:
|
|
|
318 |
msgid "delete"
|
319 |
msgstr "löschen"
|
320 |
|
@@ -326,7 +335,7 @@ msgstr "Siehe FAQ"
|
|
326 |
msgid "last auto-post:"
|
327 |
msgstr "letzter Auto-Post:"
|
328 |
|
329 |
-
#: includes/B2S/PostBox.php:76 views/b2s/ship.php:
|
330 |
msgid "The connection to the server failed. Try again!"
|
331 |
msgstr "Eine Verbindung zum Server konnte nicht hergestellt werden. Versuche es erneut!"
|
332 |
|
@@ -350,7 +359,7 @@ msgstr "Hinweis: Bitte stelle sicher, dass Dein Blog von außen erreichbar ist.
|
|
350 |
msgid "Custom Sharing & Scheduling"
|
351 |
msgstr "Anpassen & Planen"
|
352 |
|
353 |
-
#: includes/B2S/PostBox.php:97 includes/B2S/PostBox.php:101 views/b2s/ship.php:
|
354 |
msgid "Info"
|
355 |
msgstr "Info"
|
356 |
|
@@ -375,7 +384,7 @@ msgid "enable Auto-Posting"
|
|
375 |
msgstr "Auto-Posting aktivieren"
|
376 |
|
377 |
#: includes/B2S/PostBox.php:115 views/b2s/curation.draft.php:45 views/b2s/network.php:57 views/b2s/network.php:145 views/b2s/network.php:221 views/b2s/network.php:352 views/b2s/post.approve.php:50 views/b2s/post.calendar.php:59 views/b2s/post.calendar.php:238
|
378 |
-
#: views/b2s/post.notice.php:44 views/b2s/post.php:40 views/b2s/post.publish.php:44 views/b2s/post.sched.php:58 views/b2s/ship.php:
|
379 |
msgid "Loading..."
|
380 |
msgstr "Wird geladen..."
|
381 |
|
@@ -419,61 +428,61 @@ msgstr "Wenn Du Deinen Blogbeitrag an einem bestimmten Datum und zu bestimmten Z
|
|
419 |
msgid "You want to auto-post your blog post?"
|
420 |
msgstr "Du möchtest Deinen Beitrag automatisch posten?"
|
421 |
|
422 |
-
#: includes/B2S/PostBox.php:148 views/b2s/curation.php:126 views/b2s/post.calendar.php:276 views/b2s/ship.php:
|
423 |
msgid "With Blog2Social Premium you can:"
|
424 |
msgstr "Mit Blog2Social kannst Du:"
|
425 |
|
426 |
-
#: includes/B2S/PostBox.php:151 views/b2s/curation.php:129 views/b2s/post.calendar.php:279 views/b2s/ship.php:
|
427 |
msgid "Post on pages and groups"
|
428 |
msgstr "Poste auf Seiten und in Gruppen"
|
429 |
|
430 |
-
#: includes/B2S/PostBox.php:152 views/b2s/curation.php:130 views/b2s/post.calendar.php:280 views/b2s/ship.php:
|
431 |
msgid "Share on multiple profiles, pages and groups"
|
432 |
msgstr "Auf mehreren Profilen, Seiten und Gruppen teilen"
|
433 |
|
434 |
-
#: includes/B2S/PostBox.php:153 views/b2s/curation.php:131 views/b2s/post.calendar.php:281 views/b2s/ship.php:
|
435 |
msgid "Auto-post and auto-schedule new and updated blog posts"
|
436 |
msgstr " Auto-posten und Auto-planen: Beiträge automatisch bei Veröffentlichung oder Aktualisierung posten und zeitversetzt planen"
|
437 |
|
438 |
-
#: includes/B2S/PostBox.php:154 views/b2s/curation.php:132 views/b2s/post.calendar.php:282 views/b2s/ship.php:
|
439 |
msgid "Schedule your posts at the best times on each network"
|
440 |
msgstr "Plane Deine Beiträge zu den besten Zeiten für jedes Netzwerk"
|
441 |
|
442 |
-
#: includes/B2S/PostBox.php:155 views/b2s/curation.php:133 views/b2s/post.calendar.php:283 views/b2s/ship.php:
|
443 |
msgid "Best Time Manager: use predefined best time scheduler to auto-schedule your social media posts"
|
444 |
msgstr " Beste Zeiten Manager: vordefinierte Zeiten für Deine Beiträge nutzen"
|
445 |
|
446 |
-
#: includes/B2S/PostBox.php:156 views/b2s/curation.php:134 views/b2s/post.calendar.php:284 views/b2s/ship.php:
|
447 |
msgid "Schedule your post for one time, multiple times or recurrently"
|
448 |
msgstr "Veröffentlichungen zur besten Zeit pro Netzwerk planen: einmalig, mehrmalig oder nach einem regelmäßigen Muster"
|
449 |
|
450 |
-
#: includes/B2S/PostBox.php:157 views/b2s/curation.php:135 views/b2s/post.calendar.php:285 views/b2s/ship.php:
|
451 |
msgid "Schedule and re-share old posts"
|
452 |
msgstr "Plane und teile alte Beiträge"
|
453 |
|
454 |
-
#: includes/B2S/PostBox.php:158 views/b2s/curation.php:136 views/b2s/post.calendar.php:286 views/b2s/ship.php:
|
455 |
msgid "Select link format or image format for your posts"
|
456 |
msgstr "Link-Posts oder Bild-Posts als Posting-Format für Deine Beiträge auswählen"
|
457 |
|
458 |
-
#: includes/B2S/PostBox.php:159 views/b2s/curation.php:137 views/b2s/post.calendar.php:287 views/b2s/ship.php:
|
459 |
msgid "Select individual images per post"
|
460 |
msgstr "Individuelle Bilder für Deine Social Media Posts pro Netzwerk auswählen"
|
461 |
|
462 |
-
#: includes/B2S/PostBox.php:160 views/b2s/curation.php:138 views/b2s/post.calendar.php:288 views/b2s/ship.php:
|
463 |
msgid "Reporting & calendar: keep track of your published and scheduled social media posts"
|
464 |
msgstr "Reporting & Kalender: Verfolge Deine veröffentlichten und geplanten Social Media Beiträge"
|
465 |
|
466 |
-
#: includes/B2S/PostBox.php:162 views/b2s/curation.php:140 views/b2s/post.calendar.php:290 views/b2s/ship.php:
|
467 |
msgid "Upgrade to PREMIUM"
|
468 |
msgstr "Jetzt auf Premium upgraden"
|
469 |
|
470 |
-
#: includes/B2S/PostBox.php:164 views/b2s/curation.php:142 views/b2s/post.calendar.php:292 views/b2s/ship.php:
|
471 |
msgid "or <a href=\"http://service.blog2social.com/trial\" target=\"_blank\">start with free 30-days-trial of Blog2Social Premium</a> (no payment information needed)"
|
472 |
msgstr "oder <a href=\"http://service.blog2social.com/trial\" target=\"_blank\">starte Deinen kostenlosen 30-tägigen Test von Blog2Social Premium</a>(keine Zahlungsinformationen erforderlich)"
|
473 |
|
474 |
#: includes/B2S/PostBox.php:177 includes/B2S/Curation/View.php:70
|
475 |
-
msgid "Select
|
476 |
-
msgstr "
|
477 |
|
478 |
#: includes/B2S/PostBox.php:188 includes/B2S/Curation/View.php:94
|
479 |
msgid "Select Twitter profile:"
|
@@ -497,7 +506,7 @@ msgstr "Zu meinen besten Zeiten planen"
|
|
497 |
|
498 |
#: includes/B2S/PostBox.php:227
|
499 |
msgid "You want to schedule your blog post with Auto-Poster?"
|
500 |
-
msgstr "
|
501 |
|
502 |
#: includes/B2S/PostBox.php:227
|
503 |
msgid "Upgrade to PREMIUM PRO"
|
@@ -507,7 +516,7 @@ msgstr "Upgrade auf PREMIUM PRO"
|
|
507 |
msgid "Select date:"
|
508 |
msgstr "Datum auswählen:"
|
509 |
|
510 |
-
#: includes/B2S/PostBox.php:234 includes/B2S/Ship/Item.php:
|
511 |
msgid "show calendar"
|
512 |
msgstr "Planungskalender anzeigen"
|
513 |
|
@@ -531,6 +540,23 @@ msgstr "Speicher beim Surfen Links aus Deinem Browser und teile sie, wann immer
|
|
531 |
msgid "Get the Blog2Social Browser Extension"
|
532 |
msgstr " Blog2Social Browser Extension installieren"
|
533 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
534 |
#: views/b2s/curation.php:28
|
535 |
msgid "No link preview available. Please check your link."
|
536 |
msgstr "Keine Link-Vorschau verfügbar. Bitte überprüfe Deinen Link."
|
@@ -567,73 +593,69 @@ msgstr "weiter"
|
|
567 |
msgid "Load data..."
|
568 |
msgstr "Daten werden geladen..."
|
569 |
|
570 |
-
#: views/b2s/curation.php:73 views/b2s/post.calendar.php:37 views/b2s/ship.php:16 views/b2s/ship.php:
|
571 |
msgid "published"
|
572 |
msgstr "veröffentlicht"
|
573 |
|
574 |
-
#: views/b2s/curation.php:90 views/b2s/post.approve.php:101 views/b2s/ship.php:
|
575 |
msgid "Do you want to mark this post as published ?"
|
576 |
msgstr "Möchtest Du diesen Beitrag als veröffentlicht markieren?"
|
577 |
|
578 |
-
#: views/b2s/curation.php:95 views/b2s/post.approve.php:106 views/b2s/ship.php:
|
579 |
msgid "YES"
|
580 |
msgstr "JA"
|
581 |
|
582 |
-
#: views/b2s/curation.php:
|
583 |
-
msgid "NO"
|
584 |
-
msgstr "NEIN"
|
585 |
-
|
586 |
-
#: views/b2s/curation.php:109 views/b2s/post.calendar.php:259 views/b2s/ship.php:377
|
587 |
msgid "Need to schedule your posts?"
|
588 |
msgstr "Du möchtest Deine Beiträge planen?"
|
589 |
|
590 |
-
#: views/b2s/curation.php:112 views/b2s/post.calendar.php:262 views/b2s/ship.php:
|
591 |
msgid "Blog2Social Premium covers everything you need."
|
592 |
msgstr "Blog2Social Premium deckt alles ab, was Du brauchst."
|
593 |
|
594 |
-
#: views/b2s/curation.php:115 views/b2s/post.calendar.php:265 views/b2s/ship.php:
|
595 |
msgid "Schedule for specific dates"
|
596 |
msgstr "Für bestimmte Termine planen"
|
597 |
|
598 |
-
#: views/b2s/curation.php:116 views/b2s/post.calendar.php:266 views/b2s/ship.php:
|
599 |
msgid "You want to publish a post on a specific date? No problem! Just enter your desired date and you are ready to go!"
|
600 |
msgstr "Du möchtest einen Beitrag an einem ganz bestimmten Datum veröffentlichen? Kein Problem! Stelle einfach Dein Wunschdatum ein und los geht’s!"
|
601 |
|
602 |
-
#: views/b2s/curation.php:118 views/b2s/post.calendar.php:268 views/b2s/ship.php:
|
603 |
msgid "Schedule post recurrently"
|
604 |
msgstr "Beitrag mehrfach planen"
|
605 |
|
606 |
-
#: views/b2s/curation.php:119 views/b2s/post.calendar.php:269 views/b2s/ship.php:
|
607 |
msgid "You have evergreen content you want to re-share from time to time in your timeline? Schedule your evergreen content to be shared once, multiple times or recurringly at specific times."
|
608 |
msgstr "Du möchtest Deine beliebtesten Beiträge wiederholt auf den Social Media teilen? Teile Deine Evergreen Inhalte einmal, mehrmals oder in einem wiederkehrenden Rhythmus"
|
609 |
|
610 |
-
#: views/b2s/curation.php:121 views/b2s/post.calendar.php:271 views/b2s/ship.php:
|
611 |
msgid "Best Time Scheduler"
|
612 |
msgstr "Beste Zeiten Manager"
|
613 |
|
614 |
-
#: views/b2s/curation.php:122 views/b2s/post.calendar.php:272 views/b2s/ship.php:
|
615 |
msgid "Whenever you publish a post, only a fraction of your followers will actually see your post. Use the Blog2Social Best Times Scheduler to share your post at the best times for each social network. Get more outreach and extend the lifespan of your posts."
|
616 |
msgstr ""
|
617 |
"Wenn Du einen Post in den Social Media veröffentlichst, wird Dein Beitrag immer nur von einer kleinen Anzahl Deiner Follower wahrgenommen. Nutze den Beste Zeiten Manager, um Deine Beiträge zu den besten Zeiten des jeweiligen Netzwerks zu teilen. Steigere so die Reichweite, "
|
618 |
"Interaktion und Lebensdauer Deiner Posts."
|
619 |
|
620 |
-
#: views/b2s/dashboard.php:
|
621 |
msgid "What's New"
|
622 |
msgstr "Das ist neu"
|
623 |
|
624 |
-
#: views/b2s/dashboard.php:
|
625 |
msgid "Your Activity"
|
626 |
msgstr "Deine Aktivitäten"
|
627 |
|
628 |
-
#: views/b2s/dashboard.php:
|
629 |
msgid "List"
|
630 |
msgstr "Liste"
|
631 |
|
632 |
-
#: views/b2s/dashboard.php:
|
633 |
msgid "Chart"
|
634 |
msgstr "Diagramm"
|
635 |
|
636 |
-
#: views/b2s/dashboard.php:
|
637 |
msgid "Follow us"
|
638 |
msgstr "Folge uns"
|
639 |
|
@@ -653,11 +675,11 @@ msgstr "Du möchtest eine neue Kombination von Netzwerken anlegen?"
|
|
653 |
msgid "Delete"
|
654 |
msgstr "Löschen"
|
655 |
|
656 |
-
#: views/b2s/network.php:44 views/b2s/ship.php:
|
657 |
msgid "You want to schedule your posts and use the Best Time Scheduler?"
|
658 |
msgstr "Du möchtest die Veröffentlichung Deiner Posts planen und den Beste Zeiten Manager benutzen?"
|
659 |
|
660 |
-
#: views/b2s/network.php:45 views/b2s/ship.php:
|
661 |
msgid "Load Best Times"
|
662 |
msgstr "Lade beste Zeiten"
|
663 |
|
@@ -673,11 +695,7 @@ msgstr "Profil löschen"
|
|
673 |
msgid "Do you really want to delete this profile"
|
674 |
msgstr "Soll Dein Profil wirklich gelöscht werden?"
|
675 |
|
676 |
-
#: views/b2s/network.php:
|
677 |
-
msgid "YES, delete"
|
678 |
-
msgstr "Ja, löschen"
|
679 |
-
|
680 |
-
#: views/b2s/network.php:117 views/b2s/premium.php:124
|
681 |
msgid "Google My Business"
|
682 |
msgstr "Google My Business"
|
683 |
|
@@ -691,7 +709,7 @@ msgstr ""
|
|
691 |
msgid "Google currently allows access to the API for all companies with up to 9 locations in their Google My Business Listings. However, Google plans to extend the API for companies with more than 9 locations in their Google My Business listings."
|
692 |
msgstr "Google erlaubt derzeit den Zugriff auf die API für alle Unternehmen mit bis zu 9 Standorten. Google plant, den Zugriff auf die API in Zukunft auch auf Unternehmen mit mehr als 9 verbundenen Standorten in Ihren Google My Business Brancheneinträgen zu erweitern."
|
693 |
|
694 |
-
#: views/b2s/network.php:126 views/b2s/premium.php:
|
695 |
msgid "Learn more"
|
696 |
msgstr "Mehr erfahren"
|
697 |
|
@@ -758,12 +776,10 @@ msgstr "Erweiterte Verbindungseinstellungen"
|
|
758 |
#: views/b2s/network.php:228 views/b2s/network.php:310
|
759 |
msgid "Move the connection to another network collection."
|
760 |
msgstr ""
|
761 |
-
"Verbindung in eine andere Netzwerk-Gruppierung verschieben.\n"
|
762 |
|
763 |
#: views/b2s/network.php:233 views/b2s/network.php:262 views/b2s/network.php:265 views/b2s/network.php:268
|
764 |
msgid "An error occured. Please contact our support."
|
765 |
msgstr ""
|
766 |
-
"Ein Fehler ist aufgetreten. Bitte kontaktiere unseren Support.\n"
|
767 |
|
768 |
#: views/b2s/network.php:240 views/b2s/network.php:317
|
769 |
msgid "move"
|
@@ -821,13 +837,13 @@ msgstr ""
|
|
821 |
msgid "Upgrade to Blog2Social Business"
|
822 |
msgstr "Upgrade auf Blog2Social Business"
|
823 |
|
824 |
-
#: views/b2s/network.php:315 includes/B2S/Ship/Navbar.php:
|
825 |
msgid "My Profile"
|
826 |
msgstr "Mein Profil"
|
827 |
|
828 |
-
#: views/b2s/network.php:346 includes/B2S/Network/Item.php:158
|
829 |
-
msgid "Edit Post
|
830 |
-
msgstr "
|
831 |
|
832 |
#: views/b2s/network.php:358 views/b2s/settings.php:54
|
833 |
msgid "save"
|
@@ -841,69 +857,64 @@ msgstr "Instant Caching für Facebook Link-Beiträge"
|
|
841 |
msgid ""
|
842 |
"Please enable this feature, if you are using varnish caching (HTTP accelerator to relieve your website). Blog2Social will add a \"no-cache=1\" parameter to the post URL of your Facebook link posts to ensure that Facebook always pulls the current meta data of your blog post."
|
843 |
msgstr ""
|
844 |
-
"Bitte aktiviere diese Funktion, wenn Du varnish caching (HTTP-Beschleuniger zur Entlastung Deiner Website) nutzt. Blog2Social hängt dann bei Deinen Facebook Link-Beiträgen den “no-cache=1” Parameter an die Beitrags-URL, um sicherzustellen, dass Facebook immer die aktuellen "
|
845 |
-
"Meta Daten Deines Blogbeitrags zieht."
|
846 |
|
847 |
#: views/b2s/network.php:384
|
848 |
msgid "Choose your Post Format"
|
849 |
-
msgstr "
|
850 |
|
851 |
#: views/b2s/network.php:388 views/b2s/network.php:391 views/b2s/network.php:394
|
852 |
msgid "Decide in which post format you want to post your content: Link post or image post."
|
853 |
-
msgstr "
|
854 |
|
855 |
#: views/b2s/network.php:397
|
856 |
msgid "Decide in wich form you want to post your Content. Either as image with frame, or as image cut out."
|
857 |
-
msgstr "
|
858 |
|
859 |
#: views/b2s/network.php:409
|
860 |
msgid "Post Content"
|
861 |
-
msgstr "
|
862 |
|
863 |
#: views/b2s/network.php:412
|
864 |
msgid "Edit the content of your post. Move elements by drag and drop into the textarea and customize them as you like."
|
865 |
-
msgstr "
|
866 |
|
867 |
#: views/b2s/network.php:415
|
868 |
msgid "Legend"
|
869 |
-
msgstr "
|
870 |
|
871 |
#: views/b2s/network.php:417
|
872 |
msgid "The title of your post"
|
873 |
-
msgstr "
|
874 |
|
875 |
#: views/b2s/network.php:418
|
876 |
msgid "The summary of your post (you define it in the side menu of your post)."
|
877 |
-
msgstr "
|
878 |
|
879 |
#: views/b2s/network.php:419
|
880 |
msgid "The content of your post"
|
881 |
-
msgstr "
|
882 |
|
883 |
#: views/b2s/network.php:420
|
884 |
msgid "The tags you have set in your post."
|
885 |
-
msgstr "
|
886 |
|
887 |
#: views/b2s/network.php:433 includes/B2S/Network/Item.php:624
|
888 |
msgid "Character limit"
|
889 |
-
msgstr "
|
890 |
|
891 |
#: views/b2s/network.php:436
|
892 |
msgid "Define the character limit for the variables \"EXCERPT\" and \"CONTENT\" individually. Your text will be shortened after the last comma, period, or space character within your character limit."
|
893 |
-
msgstr "
|
894 |
|
895 |
#: views/b2s/network.php:437
|
896 |
msgid "An \"EXCERPT\" will only be added to your social media post if you have added a manual excerpt in the excerpt editing box of the Gutenberg side menu (document settings) of your post."
|
897 |
msgstr ""
|
898 |
-
"Ein “Textauszug” wird nur in Deinen Social-Media-Beitrag eingefügt, wenn Du einen manuellen Textauszug in der Textauszug-Box im Gutenberg Seitenmenü (Dokumenten-Einstellungen) Deines Blogbeitrages eingetragen hast. \n"
|
899 |
|
900 |
#: views/b2s/network.php:438
|
901 |
msgid ""
|
902 |
"\"TITLES\" and \"KEYWORDS\" (Hashtags) are not shortened. If you select the \"TITLE\" and \"KEYWORD\" variables for your social media posts, the character limit you define for the \"EXCERPT\" and/or \"CONTENT\" variables will be applied within the remaining available "
|
903 |
"character limit of the social network."
|
904 |
msgstr ""
|
905 |
-
"“Titel” (TITLE) und “Hashtags” (KEYWORDS) werden nicht gekürzt. Wenn Du die Variablen “Titel” und “Hashtag” für Deine Social-Media-Posts auswählst, wird die von Dir definierte Zeichenanzahl für die Variablen \"Textauszug\" und/oder \"Inhalt\" innerhalb der darüber hinaus "
|
906 |
-
"verfügbaren Zeichenanzahl des jeweiligen Social Networks berücksichtigt."
|
907 |
|
908 |
#: views/b2s/post.approve.php:81
|
909 |
msgid "Delete Social Media Posts"
|
@@ -925,7 +936,7 @@ msgstr "Sortiere nach Netzwerk"
|
|
925 |
msgid "show all"
|
926 |
msgstr "alles anzeigen"
|
927 |
|
928 |
-
#: views/b2s/post.calendar.php:38 views/b2s/ship.php:16 includes/B2S/Post/Filter.php:50 includes/B2S/Post/Item.php:
|
929 |
msgid "scheduled"
|
930 |
msgstr "geplant"
|
931 |
|
@@ -935,41 +946,41 @@ msgstr "Link-Beitrag"
|
|
935 |
|
936 |
#: views/b2s/post.calendar.php:69 views/b2s/post.sched.php:177 includes/B2S/Settings/Item.php:393 includes/B2S/Settings/Item.php:412
|
937 |
msgid "Image Post"
|
938 |
-
msgstr "
|
939 |
|
940 |
#: views/b2s/post.calendar.php:86 views/b2s/post.sched.php:164
|
941 |
msgid "add post"
|
942 |
msgstr "Beitrag hinzufügen"
|
943 |
|
944 |
-
#: views/b2s/post.calendar.php:105 views/b2s/post.sched.php:122 views/b2s/ship.php:
|
945 |
msgid "Choose your"
|
946 |
msgstr "Wähle Deinen"
|
947 |
|
948 |
-
#: views/b2s/post.calendar.php:105 views/b2s/post.sched.php:122 views/b2s/ship.php:
|
949 |
msgid "Post Format"
|
950 |
msgstr "Postformat"
|
951 |
|
952 |
-
#: views/b2s/post.calendar.php:107 views/b2s/post.sched.php:124 views/b2s/ship.php:
|
953 |
msgid "for:"
|
954 |
msgstr "für:"
|
955 |
|
956 |
-
#: views/b2s/post.calendar.php:126 views/b2s/post.sched.php:143 views/b2s/ship.php:
|
957 |
msgid "Define the default settings for the custom post format for all of your Facebook accounts in the Blog2Social settings."
|
958 |
msgstr "Speichere Dein bevorzugtes Facebook Post-Format als Standardeinstellung in den Blog2Social Einstellungen."
|
959 |
|
960 |
-
#: views/b2s/post.calendar.php:129 views/b2s/post.sched.php:146 views/b2s/ship.php:
|
961 |
msgid "Define the default settings for the custom post format for all of your Twitter accounts in the Blog2Social settings."
|
962 |
msgstr "Definiere Dein Standard-Beitragsformat für alle Deine Twitter-Verbindungen unter den Blog2Social Einstellungen."
|
963 |
|
964 |
-
#: views/b2s/post.calendar.php:132 views/b2s/post.sched.php:149 views/b2s/ship.php:
|
965 |
msgid "Define the default settings for the custom post format for all of your LinkedIn accounts in the Blog2Social settings."
|
966 |
msgstr "Definiere die Standardeinstellung für das Postformat bei LinkedIn in den Blog2Social-Einstellungen."
|
967 |
|
968 |
-
#: views/b2s/post.calendar.php:135 views/b2s/post.sched.php:152 views/b2s/ship.php:
|
969 |
msgid "Define the default settings for the custom post format for all of your Instagram accounts in the Blog2Social settings."
|
970 |
msgstr "Definiere die Standardeinstellungen für das benutzerdefinierte Postformat für alle Instagram-Konten in den Blog2Social-Einstellungen."
|
971 |
|
972 |
-
#: views/b2s/post.calendar.php:150 views/b2s/post.sched.php:103 views/b2s/ship.php:
|
973 |
msgid "Select image for"
|
974 |
msgstr "Wähle Bild aus für"
|
975 |
|
@@ -993,6 +1004,14 @@ msgstr "Teile Beiträge aus beliebigen Quellen"
|
|
993 |
msgid "Select a post"
|
994 |
msgstr "Wähle einen Beitrag aus"
|
995 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
996 |
#: views/b2s/post.notice.php:68 views/b2s/post.publish.php:68 views/b2s/widgets/posts.php:58
|
997 |
msgid "Delete entries from the reporting"
|
998 |
msgstr "Einträge aus dem Reporting löschen"
|
@@ -1013,145 +1032,145 @@ msgstr "Einträge aus der Planung löschen"
|
|
1013 |
msgid "You are sure, you want to delete entries from the scheduling?"
|
1014 |
msgstr "Bist Du sicher, dass Du Einträge aus Deiner Planung löschen möchtest?"
|
1015 |
|
1016 |
-
#: views/b2s/premium.php:
|
1017 |
msgid "Your current license:"
|
1018 |
msgstr "Deine aktuelle Lizenz:"
|
1019 |
|
1020 |
-
#: views/b2s/premium.php:
|
1021 |
msgid "Try Blog2Social Premium 30 days for free"
|
1022 |
msgstr "Teste Blog2Social Premium 30 Tage lang kostenlos."
|
1023 |
|
1024 |
-
#: views/b2s/premium.php:
|
1025 |
msgid "End of Trial"
|
1026 |
msgstr "Ende der Testzeit"
|
1027 |
|
1028 |
-
#: views/b2s/premium.php:
|
1029 |
msgid "Upgrade"
|
1030 |
msgstr "Upgrade"
|
1031 |
|
1032 |
-
#: views/b2s/premium.php:
|
1033 |
msgid "Upgrade to Blog2Social Premium and get even smarter with social media automation: Schedule your posts for the best time or recurringly with the Best Time Manager or the Social Media Calendar. Post to pages, groups and multiple accounts per network."
|
1034 |
msgstr ""
|
1035 |
"Nutze Blog2Social Premium für noch intelligentere Social Media Automatisierung: Plane Deine Beiträge voll-automatisiert mit dem Beste-Zeiten-Manager, wähle bestimmte Termine oder plane Deine Beiträge regelmäßig. Behalte den Überblick über Deine Posts mit dem Social Media "
|
1036 |
"Kalender. Veröffentliche Beiträge auf Seiten, in Gruppen und auf mehreren Konten pro Netzwerk. Arbeite mit mehr Nutzern im Team. "
|
1037 |
|
1038 |
-
#: views/b2s/premium.php:
|
1039 |
msgid "Select a user"
|
1040 |
msgstr " Blog-Benutzer auswählen"
|
1041 |
|
1042 |
-
#: views/b2s/premium.php:
|
1043 |
msgid "No User found"
|
1044 |
msgstr "Kein Blog-Benutzer gefunden"
|
1045 |
|
1046 |
-
#: views/b2s/premium.php:
|
1047 |
msgid "Enter license key and change your version"
|
1048 |
msgstr "Lizenzschlüssel eingeben und Version ändern"
|
1049 |
|
1050 |
-
#: views/b2s/premium.php:
|
1051 |
msgid "Activate License"
|
1052 |
-
msgstr "
|
1053 |
|
1054 |
-
#: views/b2s/premium.php:
|
1055 |
msgid "Go Premium and get even smarter with social media automation"
|
1056 |
msgstr "Nutze Blog2Social Premium für noch intelligentere Social Media Automatisierung"
|
1057 |
|
1058 |
-
#: views/b2s/premium.php:
|
1059 |
msgid "Pages and groups"
|
1060 |
msgstr "Seiten und Gruppen"
|
1061 |
|
1062 |
-
#: views/b2s/premium.php:
|
1063 |
msgid "Share your posts on pages and in groups on Facebook, LinkedIn, XING, VK and Medium."
|
1064 |
msgstr "Teilen Sie Ihre Beiträge auf Seiten und in Gruppen auf Facebook, LinkedIn, Xing, VK und Medium."
|
1065 |
|
1066 |
-
#: views/b2s/premium.php:
|
1067 |
msgid "More users and accounts"
|
1068 |
msgstr "Mehr Benutzer und Accounts"
|
1069 |
|
1070 |
-
#: views/b2s/premium.php:
|
1071 |
msgid "Add multiple users and accounts per network. Define sharing-profiles for selected network bundles."
|
1072 |
msgstr "Füge mehrere Benutzer und Accounts pro Netzwerk hinzu. Definiere Sharing-Profile für ausgewählte Netzwerk-Bundles."
|
1073 |
|
1074 |
-
#: views/b2s/premium.php:
|
1075 |
msgid "Social Media Calendar"
|
1076 |
msgstr "Social Media Kalender"
|
1077 |
|
1078 |
-
#: views/b2s/premium.php:
|
1079 |
msgid "See your entire schedule at a glance, with team view and network filter. Edit scheduled posts or add new social media posts per drag & drop."
|
1080 |
msgstr "Sieh Deinen gesamten Zeitplan auf einen Blick, mit Teamansicht und Netzwerkfilter. Bearbeite geplante Beiträge oder füge neue Social-Media-Beiträge per Drag & Drop hinzu."
|
1081 |
|
1082 |
-
#: views/b2s/premium.php:
|
1083 |
msgid "Best Times Manager"
|
1084 |
msgstr "Beste Zeiten Manager"
|
1085 |
|
1086 |
-
#: views/b2s/premium.php:
|
1087 |
msgid "Use the Best Times Manager to schedule your posts automatically or define your own best time scheme."
|
1088 |
msgstr "Verwende den Beste-Zeiten-Manager, um Deine Beiträge automatisch zu planen oder Dein eigenes bestes Zeitschema zu definieren."
|
1089 |
|
1090 |
-
#: views/b2s/premium.php:
|
1091 |
msgid "Auto-Posting"
|
1092 |
msgstr "Auto-Posting"
|
1093 |
|
1094 |
-
#: views/b2s/premium.php:
|
1095 |
msgid "Share your posts automatically across your preferred networks at once or at your pre-scheduled time-settings."
|
1096 |
msgstr "Teile Deine Beiträge automatisch in Deinen bevorzugten Netzwerken sofort oder zu den von Dir festgelegten Zeiten."
|
1097 |
|
1098 |
-
#: views/b2s/premium.php:
|
1099 |
msgid "RSS import & auto-post"
|
1100 |
msgstr "RSS-Import & Auto-Poster"
|
1101 |
|
1102 |
-
#: views/b2s/premium.php:
|
1103 |
msgid "Share imported RSS feeds automatically to get more variations for your content."
|
1104 |
msgstr "Teile importierte RSS-Feeds automatisch, um mehr Variationen für Deine Inhalte zu erhalten."
|
1105 |
|
1106 |
-
#: views/b2s/premium.php:
|
1107 |
msgid "Schedule and share your blog posts as Google My Business posts to update your business listing and to add fresh content for your company."
|
1108 |
msgstr "Plane und teile Deine Blogartikel als Google My Business - Beiträge und verleihe Deinem Unternehmen mit aktuellen News mehr Sichtbarkeit."
|
1109 |
|
1110 |
-
#: views/b2s/premium.php:
|
1111 |
msgid "Schedule curated content"
|
1112 |
msgstr "Kuratierte Inhalte planen"
|
1113 |
|
1114 |
-
#: views/b2s/premium.php:
|
1115 |
msgid "Schedule and share curated content from any source on your preferred networks."
|
1116 |
msgstr "Plane und teile kuratierte Inhalte aus beliebigen Quellen in Deinen bevorzugten Netzwerken."
|
1117 |
|
1118 |
-
#: views/b2s/premium.php:
|
1119 |
msgid "Custom image"
|
1120 |
msgstr "Benutzerdefinierte Bilder"
|
1121 |
|
1122 |
-
#: views/b2s/premium.php:
|
1123 |
msgid "Select individual images per post or network and select any image from your media library to create more variations for your posts."
|
1124 |
msgstr "Wähle individuelle Bilder pro Beitrag oder Netzwerk sowie ein beliebiges Bild aus Deiner Mediathek aus, um weitere Variationen für Deine Beiträge zu erstellen."
|
1125 |
|
1126 |
-
#: views/b2s/premium.php:
|
1127 |
msgid "Custom format"
|
1128 |
msgstr "Benutzerdefiniertes Format"
|
1129 |
|
1130 |
-
#: views/b2s/premium.php:
|
1131 |
msgid "Select link post or image post per network to choose the optimal format for your post."
|
1132 |
msgstr "Wähle zwischen Link- oder Bild-Post pro Netzwerk, um das optimale Format für Deinen Beitrag zu wählen"
|
1133 |
|
1134 |
-
#: views/b2s/premium.php:
|
1135 |
msgid "Open Graph and Twitter Card Tags"
|
1136 |
msgstr "Open Graph und Twitter Card Tags"
|
1137 |
|
1138 |
-
#: views/b2s/premium.php:
|
1139 |
msgid "Add and edit meta tags for Open Graph (Ex. Facebook and LinkedIn) and Twitter Cards to define the look of your link posts."
|
1140 |
msgstr "Setze und bearbeite Social-Media-Tags für Open Graph (z.B. Facebook und LinkedIn) und Twitter Cards, um das Aussehen Deiner Link-Posts festzulegen."
|
1141 |
|
1142 |
-
#: views/b2s/premium.php:
|
1143 |
msgid "Premium support"
|
1144 |
msgstr "Premium Support"
|
1145 |
|
1146 |
-
#: views/b2s/premium.php:
|
1147 |
msgid "Regular updates and priority support per e-mail and phone."
|
1148 |
msgstr "Regelmäßige Updates und bevorzugter Support per E-Mail und Telefon"
|
1149 |
|
1150 |
-
#: views/b2s/premium.php:
|
1151 |
msgid "Show me plans and prices"
|
1152 |
msgstr "Versionen und Preise anzeigen"
|
1153 |
|
1154 |
-
#: views/b2s/premium.php:
|
1155 |
msgid "Show all premium features"
|
1156 |
msgstr "Alle Premium-Features anzeigen"
|
1157 |
|
@@ -1228,107 +1247,111 @@ msgstr ""
|
|
1228 |
"Die Zeiteinstellungen zum Planen von Social Media Posts in Blog2Social basieren auf der Zeitzone, die in den allgemeinen Einstellungen Deines WordPress festgelegt ist. Du kannst aber auch eine andere Zeitzone als Basis für die Planung Deiner Social Media Posts festlegen. "
|
1229 |
"Wähle dazu die gewünschte Zeitzone aus dem Drop-Down Menü."
|
1230 |
|
1231 |
-
#: views/b2s/ship.php:16 includes/B2S/Post/Filter.php:50 includes/B2S/Post/Item.php:
|
1232 |
msgid "draft"
|
1233 |
msgstr "Entwurf"
|
1234 |
|
1235 |
-
#: views/b2s/ship.php:
|
1236 |
msgid "Social Media Scheduling & Sharing"
|
1237 |
msgstr "Beitrag auf Social Media planen und teilen"
|
1238 |
|
1239 |
-
#: views/b2s/ship.php:
|
1240 |
msgid "Title"
|
1241 |
msgstr "Titel"
|
1242 |
|
1243 |
-
#: views/b2s/ship.php:
|
1244 |
msgid "on blog"
|
1245 |
msgstr "auf dem Blog"
|
1246 |
|
1247 |
-
#: views/b2s/ship.php:
|
1248 |
msgid "scroll to bottom"
|
1249 |
msgstr "zum Seitenende"
|
1250 |
|
1251 |
-
#: views/b2s/ship.php:
|
1252 |
msgid "You want to load your time settings?"
|
1253 |
msgstr "Du möchtest Deine Zeiten laden?"
|
1254 |
|
1255 |
-
#: views/b2s/ship.php:
|
1256 |
msgid "Load My Times Settings"
|
1257 |
msgstr "Meine Zeit-Einstellungen laden"
|
1258 |
|
1259 |
-
#: views/b2s/ship.php:
|
1260 |
msgid "Social Accounts"
|
1261 |
msgstr "Social Media Konten"
|
1262 |
|
1263 |
-
#: views/b2s/ship.php:
|
1264 |
msgid "Add more..."
|
1265 |
msgstr "mehr hinzufügen"
|
1266 |
|
1267 |
-
#: views/b2s/ship.php:
|
1268 |
msgid "Profiles | Pages | Groups"
|
1269 |
msgstr "Profile | Seiten | Gruppen"
|
1270 |
|
1271 |
-
#: views/b2s/ship.php:
|
1272 |
msgid "Save network collection"
|
1273 |
-
msgstr "Netzwerk-Gruppierung
|
1274 |
|
1275 |
-
#: views/b2s/ship.php:
|
1276 |
msgid "network connected"
|
1277 |
msgstr "Netzwerk verbunden"
|
1278 |
|
1279 |
-
#: views/b2s/ship.php:
|
1280 |
msgid "requires image"
|
1281 |
msgstr "Bild benötigt"
|
1282 |
|
1283 |
-
#: views/b2s/ship.php:
|
1284 |
msgid "refresh authorization"
|
1285 |
msgstr "Autorisierung aktualisieren"
|
1286 |
|
1287 |
-
#: views/b2s/ship.php:
|
1288 |
msgid "Notice:<br><p>Please make sure, that your website address is reachable. The Social Networks do not allow postings from local installations.</p>"
|
1289 |
msgstr "Hinweis:<br><p>Bitte stelle sicher, dass Deine Webseiten-Adresse von außen erreichbar ist. Die sozialen Netzwerke erlauben keine Posts von lokalen Installationen.</p>"
|
1290 |
|
1291 |
-
#: views/b2s/ship.php:
|
1292 |
msgid "change website address"
|
1293 |
msgstr "Webseiten-Adresse ändern"
|
1294 |
|
1295 |
-
#: views/b2s/ship.php:
|
1296 |
msgid "First, connect or select network before posting"
|
1297 |
msgstr "Verbinde Dich zuerst mit einem Netzwerk oder wähle ein Netzwerk aus, bevor Du den Beitrag teilst!"
|
1298 |
|
1299 |
-
#: views/b2s/ship.php:
|
1300 |
msgid "connect"
|
1301 |
msgstr "Jetzt mit Netzwerken verbinden"
|
1302 |
|
1303 |
-
#: views/b2s/ship.php:
|
1304 |
msgid "scroll to top"
|
1305 |
msgstr "zum Seitenanfang"
|
1306 |
|
1307 |
-
#: views/b2s/ship.php:
|
1308 |
msgid "Share"
|
1309 |
msgstr "Teilen"
|
1310 |
|
1311 |
-
#: views/b2s/ship.php:
|
|
|
|
|
|
|
|
|
1312 |
msgid "Time zone"
|
1313 |
msgstr "Zeitzone"
|
1314 |
|
1315 |
-
#: views/b2s/ship.php:
|
1316 |
msgid "Re-share this post"
|
1317 |
msgstr "Diesen Beitrag nochmal teilen"
|
1318 |
|
1319 |
-
#: views/b2s/ship.php:
|
1320 |
msgid "Share new post on Social Media"
|
1321 |
msgstr "Teile einen neuen Beitrag auf Social Media"
|
1322 |
|
1323 |
-
#: views/b2s/ship.php:
|
1324 |
msgid "Connect for"
|
1325 |
msgstr "Netzwerke verbinden für"
|
1326 |
|
1327 |
-
#: views/b2s/ship.php:
|
1328 |
msgid "Re-share this Post"
|
1329 |
msgstr "Diesen Beitrag nochmal teilen"
|
1330 |
|
1331 |
-
#: views/b2s/ship.php:
|
1332 |
msgid ""
|
1333 |
"You can re-share your post for a different sharing purpose, or to share on a different choice of networks, profiles, pages or groups, or with different comments or images, or if you want to share your blog post images to image networks only, or re-share them at different "
|
1334 |
"times. You may vary your comments and images in order to produce more variations of your social media posts to share more often without sharing the same message over and over again. Whatever your choose to do for re-sharing your post, you can simply click \"Re-share this "
|
@@ -1338,15 +1361,15 @@ msgstr ""
|
|
1338 |
"oder um weitere Bilder zum Blogbeitrag nur an die Bilder-Netzwerke zu senden, oder um Deine Social Media Posts zu anderen Zeiten zu teilen. So erzielt Du mehr Variationen Deiner Social Media Posts und kannst Deinen Beitrag öfters posten, um mehr Aufmerksamkeit und Reichweite "
|
1339 |
"zu erzielen, ohne immer wieder die gleiche Mitteilung zu posten. Was auch immer Du zu teilen wünscht, klicke einfach auf \"Diesen Beitrag erneut teilen\" und Du wirst erneut zur Vorschau geführt, wo Deine Netzwerke, Texte und Bilder auswählen oder variieren kannst. "
|
1340 |
|
1341 |
-
#: views/b2s/ship.php:
|
1342 |
msgid "You want re-share your blog post?"
|
1343 |
msgstr "Du möchtest Deinen Beitrag erneut teilen?"
|
1344 |
|
1345 |
-
#: views/b2s/ship.php:
|
1346 |
msgid "Save Network Settings"
|
1347 |
msgstr "Netzwerkeinstellungen speichern"
|
1348 |
|
1349 |
-
#: views/b2s/ship.php:
|
1350 |
msgid ""
|
1351 |
"You can save your current network settings as \"Standard\" network settings for any future sharing activities or as a \"Profile\" to choose from (Premium).<br><br>Your Standard selection will show as activated upon pressing the \"share on social media\" button on the right "
|
1352 |
"hand side bar. You can change these settings any time per click, or choose another network profile (Premium).<br><br>You can also pre-define various different sets of networks, for specific social media accounts, target groups, contents or sharing purposes. For example you "
|
@@ -1359,35 +1382,43 @@ msgstr ""
|
|
1359 |
"posten, um mehr Aufmerksamkeit und Reichweite zu erzielen, ohne immer wieder die gleiche Mitteilung zu posten. Was auch immer Du zu teilen wünscht
|
2 |
# This file is distributed under the same license as the Plugins - Blog2Social: Social Media Auto Post & Scheduler - Stable (latest release) package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"PO-Revision-Date: 2019-08-27 14:11+0000\n"
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"Language: de_DE\n"
|
12 |
"Project-Id-Version: Plugins - Blog2Social: Social Media Auto Post & Scheduler - Stable (latest release)\n"
|
13 |
"Report-Msgid-Bugs-To: \n"
|
14 |
+
"POT-Creation-Date: 2019-08-27 14:08+0000\n"
|
15 |
"Last-Translator: admin <s.buerger@adenion.de>\n"
|
16 |
"Language-Team: German\n"
|
17 |
+
"X-Loco-Version: 2.2.2; wp-5.2.3-RC1-45880"
|
18 |
|
19 |
#: includes/Loader.php:44
|
20 |
msgid "Modify pin board"
|
32 |
msgid "Modify forum"
|
33 |
msgstr "Modify forum"
|
34 |
|
35 |
+
#: includes/Loader.php:365
|
36 |
msgid "Auto-Post on Social Media"
|
37 |
msgstr "Automatisch auf Social Media teilen"
|
38 |
|
39 |
+
#: includes/Loader.php:366
|
40 |
msgid "Social Media Content Calendar"
|
41 |
msgstr "Social Media Kalender"
|
42 |
|
43 |
+
#: includes/Loader.php:670
|
44 |
msgid "This post will be shared into your social media from"
|
45 |
msgstr "Dein Beitrag ist zur Veröffentlichung in den Social Media geplant ab dem"
|
46 |
|
47 |
+
#: includes/Loader.php:670 includes/Loader.php:672
|
48 |
msgid "show details"
|
49 |
msgstr "siehe Details"
|
50 |
|
51 |
+
#: includes/Loader.php:672
|
52 |
msgid "This post will be shared on social media in 2-3 minutes!"
|
53 |
msgstr "Dein Beitrag wird in ca. 2-3 Minuten in die Social Media eingestellt!"
|
54 |
|
55 |
+
#: includes/Loader.php:676
|
56 |
msgid "Please, make sure that your post are publish on this blog on this moment. Then you can auto post your post with Blog2social."
|
57 |
msgstr "Bitte stelle sicher, dass Dein Beitrag in diesem Moment veröffentlicht wurde. Dann kannst Du Deinen Beitrag automatisch mit Blog2Social posten."
|
58 |
|
59 |
+
#: includes/Loader.php:679 includes/B2S/PostBox.php:79
|
60 |
msgid "There are no authorizations for your selected profile. Please, authorize with a social network or select a other profile."
|
61 |
msgstr "Dein ausgewähltes Profil hat keine Autorisierungen. Bitte, verbinde Dich mit einem Netzwerk oder wähle ein anderes Profil aus. "
|
62 |
|
63 |
+
#: includes/Loader.php:691
|
64 |
msgid "Upgrade to Premium"
|
65 |
msgstr "Premium freischalten"
|
66 |
|
67 |
+
#: includes/Loader.php:721
|
68 |
msgid "Notifications"
|
69 |
msgstr "Benachrichtigungen"
|
70 |
|
71 |
+
#: includes/Loader.php:721
|
72 |
msgid "Shared Posts"
|
73 |
msgstr "Geteilte Beiträge"
|
74 |
|
75 |
+
#: includes/Loader.php:721
|
76 |
msgid "Instant Sharing"
|
77 |
msgstr "Instant Sharing"
|
78 |
|
79 |
+
#: includes/Loader.php:721
|
80 |
+
msgid "Drafts"
|
81 |
+
msgstr "Entwürfe"
|
82 |
+
|
83 |
+
#: includes/Loader.php:721 views/b2s/widgets/posts.php:18
|
84 |
msgid "Scheduled Posts"
|
85 |
msgstr "geplante Beiträge"
|
86 |
|
87 |
+
#: includes/Loader.php:721
|
88 |
msgid "Content Curation Drafts"
|
89 |
msgstr "Content Curation Entwürfe"
|
90 |
|
91 |
+
#: includes/Loader.php:722 includes/B2S/Network/Item.php:148 includes/B2S/Network/Item.php:148 includes/B2S/Network/Item.php:217 includes/B2S/Network/Item.php:523 includes/B2S/Settings/Item.php:244 includes/B2S/Ship/Portale.php:38 includes/B2S/Ship/Portale.php:38
|
92 |
msgid "Profile"
|
93 |
msgstr "Profil"
|
94 |
|
95 |
+
#: includes/Loader.php:722 includes/B2S/Network/Item.php:151 includes/B2S/Network/Item.php:151 includes/B2S/Network/Item.php:278 includes/B2S/Network/Item.php:525 includes/B2S/Settings/Item.php:244 includes/B2S/Ship/Portale.php:35 includes/B2S/Ship/Portale.php:35
|
96 |
msgid "Page"
|
97 |
msgstr "Seite"
|
98 |
|
99 |
+
#: includes/Loader.php:722 includes/B2S/Network/Item.php:154 includes/B2S/Network/Item.php:341 includes/B2S/Network/Item.php:528 includes/B2S/Ship/Portale.php:31 includes/B2S/Ship/Portale.php:32
|
100 |
msgid "Group"
|
101 |
msgstr "Gruppe"
|
102 |
|
103 |
+
#: includes/Loader.php:723
|
104 |
msgid "Company"
|
105 |
msgstr "Arbeitgeber"
|
106 |
|
107 |
+
#: includes/Loader.php:723
|
108 |
msgid "Business"
|
109 |
msgstr "Business"
|
110 |
|
111 |
+
#: includes/Loader.php:724
|
112 |
msgid "Your post could not be posted."
|
113 |
msgstr "Dein Post ist nicht vom Netzwerk veröffentlicht worden."
|
114 |
|
115 |
+
#: includes/Loader.php:725
|
116 |
msgid "Your authorization has expired. Please reconnect your account in the Blog2Social network settings."
|
117 |
msgstr "Deine Authorisierung ist abgelaufen. Bitte verbinde Deinen Account in den Blog2Social Netzwerkeinstellungen erneut."
|
118 |
|
119 |
+
#: includes/Loader.php:726
|
120 |
msgid "The network has marked the post as spam or abusive."
|
121 |
msgstr "Das Netzwerk hat Deinen Post als Spam oder missbräuchlich markiert."
|
122 |
|
123 |
+
#: includes/Loader.php:727
|
124 |
msgid "We don't have the permission to publish your post. Please check your authorization."
|
125 |
msgstr "Wir haben nicht Deine Erlaubnis, den Post zu veröffentlichen. Bitte überprüfe deine Autorisierung."
|
126 |
|
127 |
+
#: includes/Loader.php:728
|
128 |
msgid "Your authorization is interrupted. Please check your authorization. Please see <a target=\"_blank\" href=\"https://www.blog2social.com/en/faq/category/9/troubleshooting-for-error-messages.html\">FAQ</a>."
|
129 |
msgstr "Die Autorisierung ist unterbrochen. Bitte überprüfe deine Autorisierung. Siehe <a target=\"_blank\" href=\"https://www.blog2social.com/de/faq/category/9/fehlermeldungen-und-loesungen.html\">FAQ</a>."
|
130 |
|
131 |
+
#: includes/Loader.php:729
|
132 |
msgid "Your daily limit has been reached."
|
133 |
msgstr "Dein tägliches Beitragslimit wurde erreicht."
|
134 |
|
135 |
+
#: includes/Loader.php:730
|
136 |
msgid "Your post could not be posted, because your image is not available or the image source does not allow to publish"
|
137 |
msgstr "Dein Beitrag konnte nicht veröffentlicht werden, weil Dein Bild nicht verfügbar ist oder die Bildquelle es nicht erlaubt, es zu veröffentlichen."
|
138 |
|
139 |
+
#: includes/Loader.php:731
|
140 |
msgid "The network has blocked your account. Please see <a target=\"_blank\" href=\"https://www.blog2social.com/en/faq/category/9/troubleshooting-for-error-messages.html\">FAQ</a>."
|
141 |
msgstr "Das Netzwerk hat deinen Account blockiert. Siehe <a target=\"_blank\" href=\"https://www.blog2social.com/de/faq/category/9/fehlermeldungen-und-loesungen.html\">FAQ</a>."
|
142 |
|
143 |
+
#: includes/Loader.php:732
|
144 |
msgid "The number of images is reached. Please see <a target=\"_blank\" href=\"https://www.blog2social.com/en/faq/category/9/troubleshooting-for-error-messages.html\">FAQ</a>."
|
145 |
msgstr "Die erlaubte Anzahl von Bildern ist erreicht. Siehe <a target=\"_blank\" href=\"https://www.blog2social.com/de/faq/category/9/fehlermeldungen-und-loesungen.html\">FAQ</a>."
|
146 |
|
147 |
+
#: includes/Loader.php:733
|
148 |
msgid "Your daily limit for this network has been reached. Please try again later."
|
149 |
msgstr "Dein tägliches Beitragslimit für dieses Netzwerk wurde erreicht. Bitte versuche es später noch einmal."
|
150 |
|
151 |
+
#: includes/Loader.php:734
|
152 |
msgid "The network can not publish special characters such as Emoji. Please see <a target=\"_blank\" href=\"https://www.blog2social.com/en/faq/category/9/troubleshooting-for-error-messages.html\">FAQ</a>."
|
153 |
msgstr "Das Netzwerk unterstüzt keine Emojis. Siehe <a target=\"_blank\" href=\"https://www.blog2social.com/de/faq/category/9/fehlermeldungen-und-loesungen.html\">FAQ</a>."
|
154 |
|
155 |
+
#: includes/Loader.php:735
|
156 |
msgid "Your post is a duplicate."
|
157 |
msgstr "Du kannst auf dem Netzwerke keine Duplikate veröffentlichen."
|
158 |
|
159 |
+
#: includes/Loader.php:736
|
160 |
msgid "The network requires a public url."
|
161 |
msgstr "Das Netzwerk benötigt eine öffentlich zugängliche URL."
|
162 |
|
163 |
+
#: includes/Loader.php:737
|
164 |
msgid "Your blog post was not available for the network at the time of publication."
|
165 |
msgstr "Dein Blogbeitrag war zum Zeitpunkt der Veröffentlichung für das Netzwerk nicht verfügbar."
|
166 |
|
167 |
+
#: includes/Loader.php:738
|
168 |
msgid "You have already retweeted this post."
|
169 |
msgstr "Du hast diesen Post bereits retweetet."
|
170 |
|
171 |
+
#: includes/Loader.php:739
|
172 |
msgid "This XING API is no longer supported by XING. Please connect your XING accounts with the new XING interface to reschedule your posts. <a target=\"_blank\" href=\"https://www.blog2social.com/en/faq/index.php?action=artikel&cat=2&id=146\">Learn more</a>"
|
173 |
msgstr ""
|
174 |
"Diese XING-Schnittstelle wird nicht weiter von XING unterstützt wird. Bitte nutze ab jetzt die neue XING-Schnittstelle, um Deine XING Posts neu zu planen. <a target=\"_blank\" href=\"https://www.blog2social.com/de/faq/index.php?action=artikel&cat=2&id=145&artlang=de\">Weitere "
|
175 |
"Informationen.</a>"
|
176 |
|
177 |
+
#: includes/Loader.php:740
|
178 |
msgid "There was no image in the meta data of the linked post. Posts without images cannot be shared on image networks."
|
179 |
msgstr "Es konnte kein Bild in den Meta Daten des verlinkten Beitrags gefunden werden. Posts ohne Bilder können nicht auf Bilder-Netzwerken veröffentlicht werden. "
|
180 |
|
181 |
+
#: includes/Loader.php:741
|
182 |
msgid "Your post could not be posted, because your image can not be processed by the network."
|
183 |
msgstr "Dein Beitrag konnte nicht veröffentlicht werden, da Dein Bild nicht vom Netzwerk verarbeitet werden kann."
|
184 |
|
185 |
+
#: includes/Loader.php:742
|
186 |
+
msgid "Instagram published your post without text. Please see <a target=\"_blank\" href=\"https://www.blog2social.com/en/faq/index.php?action=artikel&cat=9&id=154&artlang=en\">FAQ</a>."
|
187 |
+
msgstr "Instagram konnte Deinen Text nicht veröffentlichen. Sehe <a target=\"_blank\" href=\"https://www.blog2social.com/de/faq/index.php?sid=417653&lang=de&action=artikel&cat=9&id=152&artlang=de\">FAQ</a>."
|
188 |
+
|
189 |
+
#: includes/Loader.php:743
|
190 |
msgid "Your group can not be found by the network."
|
191 |
msgstr "Deine Gruppe kann vom Netzwerk nicht gefunden werden."
|
192 |
|
193 |
+
#: includes/Loader.php:799 includes/Loader.php:841
|
194 |
msgid "Dashboard"
|
195 |
msgstr "Dashboard"
|
196 |
|
197 |
+
#: includes/Loader.php:800 includes/Loader.php:848
|
198 |
msgid "Posts & Sharing"
|
199 |
msgstr "Beiträge"
|
200 |
|
201 |
+
#: includes/Loader.php:801 includes/Loader.php:855 views/b2s/dashboard.php:30
|
202 |
msgid "Calendar"
|
203 |
msgstr "Kalender"
|
204 |
|
205 |
+
#: includes/Loader.php:802 includes/Loader.php:863
|
206 |
msgid "Content Curation"
|
207 |
msgstr "Content Curation"
|
208 |
|
209 |
+
#: includes/Loader.php:803 includes/Loader.php:870
|
210 |
msgid "Networks"
|
211 |
msgstr "Netzwerke"
|
212 |
|
213 |
+
#: includes/Loader.php:804 includes/Loader.php:876
|
214 |
msgid "Settings"
|
215 |
msgstr "Einstellungen"
|
216 |
|
217 |
+
#: includes/Loader.php:806 includes/Loader.php:884
|
218 |
msgid "PR-Service"
|
219 |
msgstr "PR-Service"
|
220 |
|
221 |
+
#: includes/Loader.php:808 includes/Loader.php:892
|
222 |
msgid "Help & Support"
|
223 |
msgstr "Hilfe & Support"
|
224 |
|
225 |
+
#: includes/Loader.php:810
|
226 |
msgid "Premium"
|
227 |
msgstr "Premium"
|
228 |
|
229 |
+
#: includes/Loader.php:810 includes/Loader.php:900 includes/B2S/PostBox.php:108 views/b2s/network.php:33 views/b2s/ship.php:21 includes/B2S/Curation/View.php:53 includes/B2S/Network/Item.php:148 includes/B2S/Network/Item.php:151 includes/B2S/Network/Item.php:155
|
230 |
+
#: includes/B2S/Network/Item.php:158 includes/B2S/Network/Item.php:250 includes/B2S/Network/Item.php:312 includes/B2S/Network/Item.php:374 includes/B2S/Settings/Item.php:102 includes/B2S/Ship/Image.php:73 includes/B2S/Ship/Image.php:80 includes/B2S/Ship/Item.php:805
|
231 |
#: includes/B2S/Ship/Portale.php:32 includes/B2S/Ship/Portale.php:35 includes/B2S/Ship/Portale.php:38 views/b2s/partials/post-edit-modal.php:9 views/b2s/widgets/posts.php:18
|
232 |
msgid "PREMIUM"
|
233 |
msgstr "PREMIUM"
|
234 |
|
235 |
+
#: includes/Loader.php:832
|
236 |
msgid "Blog2Social"
|
237 |
msgstr "Blog2Social"
|
238 |
|
239 |
+
#: includes/Loader.php:1310 includes/Loader.php:1508
|
240 |
msgid "or"
|
241 |
msgstr "oder"
|
242 |
|
243 |
+
#: includes/Loader.php:1310 includes/Loader.php:1508
|
244 |
msgid "back to install plugins"
|
245 |
msgstr "zurück zur Pluginübersicht"
|
246 |
|
318 |
msgid "<b> An unknown error occurred! </b> <br> Please contact our support!"
|
319 |
msgstr "<b> Ein unbekannter Fehler ist aufgetreten. </b> <br> Bitte kontaktiere unseren Support."
|
320 |
|
321 |
+
#: includes/Ajax/Get.php:524 includes/Ajax/Post.php:1376 views/b2s/network.php:5 includes/B2S/Network/Item.php:215 includes/B2S/Network/Item.php:276 includes/B2S/Network/Item.php:339 includes/B2S/Network/Item.php:465 includes/B2S/Network/Item.php:481
|
322 |
msgid "Unknown username"
|
323 |
msgstr "unbekannter Blognutzer"
|
324 |
|
325 |
+
#: includes/Ajax/Post.php:1377 includes/B2S/Network/Item.php:466 includes/B2S/Post/Item.php:408 includes/B2S/Post/Item.php:428 includes/B2S/Post/Item.php:657 includes/B2S/Post/Item.php:706 includes/B2S/Settings/Item.php:82 includes/B2S/Ship/Item.php:782
|
326 |
+
#: includes/B2S/Ship/Item.php:932
|
327 |
msgid "delete"
|
328 |
msgstr "löschen"
|
329 |
|
335 |
msgid "last auto-post:"
|
336 |
msgstr "letzter Auto-Post:"
|
337 |
|
338 |
+
#: includes/B2S/PostBox.php:76 views/b2s/ship.php:581
|
339 |
msgid "The connection to the server failed. Try again!"
|
340 |
msgstr "Eine Verbindung zum Server konnte nicht hergestellt werden. Versuche es erneut!"
|
341 |
|
359 |
msgid "Custom Sharing & Scheduling"
|
360 |
msgstr "Anpassen & Planen"
|
361 |
|
362 |
+
#: includes/B2S/PostBox.php:97 includes/B2S/PostBox.php:101 views/b2s/ship.php:74 views/b2s/ship.php:164 views/b2s/ship.php:253 includes/B2S/Network/Item.php:170 includes/B2S/Ship/Item.php:746
|
363 |
msgid "Info"
|
364 |
msgstr "Info"
|
365 |
|
384 |
msgstr "Auto-Posting aktivieren"
|
385 |
|
386 |
#: includes/B2S/PostBox.php:115 views/b2s/curation.draft.php:45 views/b2s/network.php:57 views/b2s/network.php:145 views/b2s/network.php:221 views/b2s/network.php:352 views/b2s/post.approve.php:50 views/b2s/post.calendar.php:59 views/b2s/post.calendar.php:238
|
387 |
+
#: views/b2s/post.draft.php:42 views/b2s/post.notice.php:44 views/b2s/post.php:40 views/b2s/post.publish.php:44 views/b2s/post.sched.php:58 views/b2s/ship.php:186 views/b2s/ship.php:579 views/b2s/support.php:203
|
388 |
msgid "Loading..."
|
389 |
msgstr "Wird geladen..."
|
390 |
|
428 |
msgid "You want to auto-post your blog post?"
|
429 |
msgstr "Du möchtest Deinen Beitrag automatisch posten?"
|
430 |
|
431 |
+
#: includes/B2S/PostBox.php:148 views/b2s/curation.php:126 views/b2s/post.calendar.php:276 views/b2s/ship.php:304 views/b2s/ship.php:364 views/b2s/ship.php:410
|
432 |
msgid "With Blog2Social Premium you can:"
|
433 |
msgstr "Mit Blog2Social kannst Du:"
|
434 |
|
435 |
+
#: includes/B2S/PostBox.php:151 views/b2s/curation.php:129 views/b2s/post.calendar.php:279 views/b2s/ship.php:307 views/b2s/ship.php:367 views/b2s/ship.php:413
|
436 |
msgid "Post on pages and groups"
|
437 |
msgstr "Poste auf Seiten und in Gruppen"
|
438 |
|
439 |
+
#: includes/B2S/PostBox.php:152 views/b2s/curation.php:130 views/b2s/post.calendar.php:280 views/b2s/ship.php:308 views/b2s/ship.php:368 views/b2s/ship.php:414
|
440 |
msgid "Share on multiple profiles, pages and groups"
|
441 |
msgstr "Auf mehreren Profilen, Seiten und Gruppen teilen"
|
442 |
|
443 |
+
#: includes/B2S/PostBox.php:153 views/b2s/curation.php:131 views/b2s/post.calendar.php:281 views/b2s/ship.php:309 views/b2s/ship.php:369 views/b2s/ship.php:415
|
444 |
msgid "Auto-post and auto-schedule new and updated blog posts"
|
445 |
msgstr " Auto-posten und Auto-planen: Beiträge automatisch bei Veröffentlichung oder Aktualisierung posten und zeitversetzt planen"
|
446 |
|
447 |
+
#: includes/B2S/PostBox.php:154 views/b2s/curation.php:132 views/b2s/post.calendar.php:282 views/b2s/ship.php:310 views/b2s/ship.php:370 views/b2s/ship.php:416
|
448 |
msgid "Schedule your posts at the best times on each network"
|
449 |
msgstr "Plane Deine Beiträge zu den besten Zeiten für jedes Netzwerk"
|
450 |
|
451 |
+
#: includes/B2S/PostBox.php:155 views/b2s/curation.php:133 views/b2s/post.calendar.php:283 views/b2s/ship.php:311 views/b2s/ship.php:371 views/b2s/ship.php:417
|
452 |
msgid "Best Time Manager: use predefined best time scheduler to auto-schedule your social media posts"
|
453 |
msgstr " Beste Zeiten Manager: vordefinierte Zeiten für Deine Beiträge nutzen"
|
454 |
|
455 |
+
#: includes/B2S/PostBox.php:156 views/b2s/curation.php:134 views/b2s/post.calendar.php:284 views/b2s/ship.php:312 views/b2s/ship.php:372 views/b2s/ship.php:418
|
456 |
msgid "Schedule your post for one time, multiple times or recurrently"
|
457 |
msgstr "Veröffentlichungen zur besten Zeit pro Netzwerk planen: einmalig, mehrmalig oder nach einem regelmäßigen Muster"
|
458 |
|
459 |
+
#: includes/B2S/PostBox.php:157 views/b2s/curation.php:135 views/b2s/post.calendar.php:285 views/b2s/ship.php:313 views/b2s/ship.php:373 views/b2s/ship.php:419
|
460 |
msgid "Schedule and re-share old posts"
|
461 |
msgstr "Plane und teile alte Beiträge"
|
462 |
|
463 |
+
#: includes/B2S/PostBox.php:158 views/b2s/curation.php:136 views/b2s/post.calendar.php:286 views/b2s/ship.php:314 views/b2s/ship.php:374 views/b2s/ship.php:420
|
464 |
msgid "Select link format or image format for your posts"
|
465 |
msgstr "Link-Posts oder Bild-Posts als Posting-Format für Deine Beiträge auswählen"
|
466 |
|
467 |
+
#: includes/B2S/PostBox.php:159 views/b2s/curation.php:137 views/b2s/post.calendar.php:287 views/b2s/ship.php:315 views/b2s/ship.php:375 views/b2s/ship.php:421
|
468 |
msgid "Select individual images per post"
|
469 |
msgstr "Individuelle Bilder für Deine Social Media Posts pro Netzwerk auswählen"
|
470 |
|
471 |
+
#: includes/B2S/PostBox.php:160 views/b2s/curation.php:138 views/b2s/post.calendar.php:288 views/b2s/ship.php:316 views/b2s/ship.php:376 views/b2s/ship.php:422
|
472 |
msgid "Reporting & calendar: keep track of your published and scheduled social media posts"
|
473 |
msgstr "Reporting & Kalender: Verfolge Deine veröffentlichten und geplanten Social Media Beiträge"
|
474 |
|
475 |
+
#: includes/B2S/PostBox.php:162 views/b2s/curation.php:140 views/b2s/post.calendar.php:290 views/b2s/ship.php:318 views/b2s/ship.php:378 views/b2s/ship.php:424
|
476 |
msgid "Upgrade to PREMIUM"
|
477 |
msgstr "Jetzt auf Premium upgraden"
|
478 |
|
479 |
+
#: includes/B2S/PostBox.php:164 views/b2s/curation.php:142 views/b2s/post.calendar.php:292 views/b2s/ship.php:320 views/b2s/ship.php:380 views/b2s/ship.php:426
|
480 |
msgid "or <a href=\"http://service.blog2social.com/trial\" target=\"_blank\">start with free 30-days-trial of Blog2Social Premium</a> (no payment information needed)"
|
481 |
msgstr "oder <a href=\"http://service.blog2social.com/trial\" target=\"_blank\">starte Deinen kostenlosen 30-tägigen Test von Blog2Social Premium</a>(keine Zahlungsinformationen erforderlich)"
|
482 |
|
483 |
#: includes/B2S/PostBox.php:177 includes/B2S/Curation/View.php:70
|
484 |
+
msgid "Select network collection:"
|
485 |
+
msgstr "Netzwerk-Gruppierung auswählen:"
|
486 |
|
487 |
#: includes/B2S/PostBox.php:188 includes/B2S/Curation/View.php:94
|
488 |
msgid "Select Twitter profile:"
|
506 |
|
507 |
#: includes/B2S/PostBox.php:227
|
508 |
msgid "You want to schedule your blog post with Auto-Poster?"
|
509 |
+
msgstr ""
|
510 |
|
511 |
#: includes/B2S/PostBox.php:227
|
512 |
msgid "Upgrade to PREMIUM PRO"
|
516 |
msgid "Select date:"
|
517 |
msgstr "Datum auswählen:"
|
518 |
|
519 |
+
#: includes/B2S/PostBox.php:234 includes/B2S/Ship/Item.php:359
|
520 |
msgid "show calendar"
|
521 |
msgstr "Planungskalender anzeigen"
|
522 |
|
540 |
msgid "Get the Blog2Social Browser Extension"
|
541 |
msgstr " Blog2Social Browser Extension installieren"
|
542 |
|
543 |
+
#: views/b2s/curation.draft.php:74
|
544 |
+
msgid "Delete Draft"
|
545 |
+
msgstr "Entwurf löschen"
|
546 |
+
|
547 |
+
#: views/b2s/curation.draft.php:77
|
548 |
+
msgid "Are you sure you want to delete this draft?"
|
549 |
+
msgstr "Bist Du Dir sicher, dass Du den Entwurf löschen möchtest? "
|
550 |
+
|
551 |
+
#: views/b2s/curation.draft.php:81 views/b2s/curation.php:96 views/b2s/network.php:105 views/b2s/post.approve.php:90 views/b2s/post.approve.php:107 views/b2s/post.draft.php:80 views/b2s/post.notice.php:77 views/b2s/post.publish.php:77 views/b2s/post.sched.php:91
|
552 |
+
#: views/b2s/ship.php:469 views/b2s/ship.php:548 views/prg/ship.php:92 views/b2s/widgets/posts.php:67
|
553 |
+
msgid "NO"
|
554 |
+
msgstr "NEIN"
|
555 |
+
|
556 |
+
#: views/b2s/curation.draft.php:82 views/b2s/network.php:106 views/b2s/network.php:169 views/b2s/post.approve.php:91 views/b2s/post.draft.php:81 views/b2s/post.notice.php:78 views/b2s/post.publish.php:78 views/b2s/post.sched.php:92 views/b2s/widgets/posts.php:68
|
557 |
+
msgid "YES, delete"
|
558 |
+
msgstr "Ja, löschen"
|
559 |
+
|
560 |
#: views/b2s/curation.php:28
|
561 |
msgid "No link preview available. Please check your link."
|
562 |
msgstr "Keine Link-Vorschau verfügbar. Bitte überprüfe Deinen Link."
|
593 |
msgid "Load data..."
|
594 |
msgstr "Daten werden geladen..."
|
595 |
|
596 |
+
#: views/b2s/curation.php:73 views/b2s/post.calendar.php:37 views/b2s/ship.php:16 views/b2s/ship.php:580 includes/B2S/Post/Filter.php:50 includes/B2S/Post/Item.php:272 includes/B2S/Ship/Save.php:417 includes/PRG/Post/Filter.php:41 includes/PRG/Post/Item.php:97
|
597 |
msgid "published"
|
598 |
msgstr "veröffentlicht"
|
599 |
|
600 |
+
#: views/b2s/curation.php:90 views/b2s/post.approve.php:101 views/b2s/ship.php:463
|
601 |
msgid "Do you want to mark this post as published ?"
|
602 |
msgstr "Möchtest Du diesen Beitrag als veröffentlicht markieren?"
|
603 |
|
604 |
+
#: views/b2s/curation.php:95 views/b2s/post.approve.php:106 views/b2s/ship.php:468 views/b2s/ship.php:549
|
605 |
msgid "YES"
|
606 |
msgstr "JA"
|
607 |
|
608 |
+
#: views/b2s/curation.php:109 views/b2s/post.calendar.php:259 views/b2s/ship.php:393
|
|
|
|
|
|
|
|
|
609 |
msgid "Need to schedule your posts?"
|
610 |
msgstr "Du möchtest Deine Beiträge planen?"
|
611 |
|
612 |
+
#: views/b2s/curation.php:112 views/b2s/post.calendar.php:262 views/b2s/ship.php:396
|
613 |
msgid "Blog2Social Premium covers everything you need."
|
614 |
msgstr "Blog2Social Premium deckt alles ab, was Du brauchst."
|
615 |
|
616 |
+
#: views/b2s/curation.php:115 views/b2s/post.calendar.php:265 views/b2s/ship.php:399 includes/B2S/Ship/Item.php:806
|
617 |
msgid "Schedule for specific dates"
|
618 |
msgstr "Für bestimmte Termine planen"
|
619 |
|
620 |
+
#: views/b2s/curation.php:116 views/b2s/post.calendar.php:266 views/b2s/ship.php:400
|
621 |
msgid "You want to publish a post on a specific date? No problem! Just enter your desired date and you are ready to go!"
|
622 |
msgstr "Du möchtest einen Beitrag an einem ganz bestimmten Datum veröffentlichen? Kein Problem! Stelle einfach Dein Wunschdatum ein und los geht’s!"
|
623 |
|
624 |
+
#: views/b2s/curation.php:118 views/b2s/post.calendar.php:268 views/b2s/ship.php:402
|
625 |
msgid "Schedule post recurrently"
|
626 |
msgstr "Beitrag mehrfach planen"
|
627 |
|
628 |
+
#: views/b2s/curation.php:119 views/b2s/post.calendar.php:269 views/b2s/ship.php:403
|
629 |
msgid "You have evergreen content you want to re-share from time to time in your timeline? Schedule your evergreen content to be shared once, multiple times or recurringly at specific times."
|
630 |
msgstr "Du möchtest Deine beliebtesten Beiträge wiederholt auf den Social Media teilen? Teile Deine Evergreen Inhalte einmal, mehrmals oder in einem wiederkehrenden Rhythmus"
|
631 |
|
632 |
+
#: views/b2s/curation.php:121 views/b2s/post.calendar.php:271 views/b2s/ship.php:405
|
633 |
msgid "Best Time Scheduler"
|
634 |
msgstr "Beste Zeiten Manager"
|
635 |
|
636 |
+
#: views/b2s/curation.php:122 views/b2s/post.calendar.php:272 views/b2s/ship.php:406
|
637 |
msgid "Whenever you publish a post, only a fraction of your followers will actually see your post. Use the Blog2Social Best Times Scheduler to share your post at the best times for each social network. Get more outreach and extend the lifespan of your posts."
|
638 |
msgstr ""
|
639 |
"Wenn Du einen Post in den Social Media veröffentlichst, wird Dein Beitrag immer nur von einer kleinen Anzahl Deiner Follower wahrgenommen. Nutze den Beste Zeiten Manager, um Deine Beiträge zu den besten Zeiten des jeweiligen Netzwerks zu teilen. Steigere so die Reichweite, "
|
640 |
"Interaktion und Lebensdauer Deiner Posts."
|
641 |
|
642 |
+
#: views/b2s/dashboard.php:16
|
643 |
msgid "What's New"
|
644 |
msgstr "Das ist neu"
|
645 |
|
646 |
+
#: views/b2s/dashboard.php:26
|
647 |
msgid "Your Activity"
|
648 |
msgstr "Deine Aktivitäten"
|
649 |
|
650 |
+
#: views/b2s/dashboard.php:31
|
651 |
msgid "List"
|
652 |
msgstr "Liste"
|
653 |
|
654 |
+
#: views/b2s/dashboard.php:32
|
655 |
msgid "Chart"
|
656 |
msgstr "Diagramm"
|
657 |
|
658 |
+
#: views/b2s/dashboard.php:60
|
659 |
msgid "Follow us"
|
660 |
msgstr "Folge uns"
|
661 |
|
675 |
msgid "Delete"
|
676 |
msgstr "Löschen"
|
677 |
|
678 |
+
#: views/b2s/network.php:44 views/b2s/ship.php:72 views/b2s/ship.php:363
|
679 |
msgid "You want to schedule your posts and use the Best Time Scheduler?"
|
680 |
msgstr "Du möchtest die Veröffentlichung Deiner Posts planen und den Beste Zeiten Manager benutzen?"
|
681 |
|
682 |
+
#: views/b2s/network.php:45 views/b2s/ship.php:73
|
683 |
msgid "Load Best Times"
|
684 |
msgstr "Lade beste Zeiten"
|
685 |
|
695 |
msgid "Do you really want to delete this profile"
|
696 |
msgstr "Soll Dein Profil wirklich gelöscht werden?"
|
697 |
|
698 |
+
#: views/b2s/network.php:117 views/b2s/premium.php:127
|
|
|
|
|
|
|
|
|
699 |
msgid "Google My Business"
|
700 |
msgstr "Google My Business"
|
701 |
|
709 |
msgid "Google currently allows access to the API for all companies with up to 9 locations in their Google My Business Listings. However, Google plans to extend the API for companies with more than 9 locations in their Google My Business listings."
|
710 |
msgstr "Google erlaubt derzeit den Zugriff auf die API für alle Unternehmen mit bis zu 9 Standorten. Google plant, den Zugriff auf die API in Zukunft auch auf Unternehmen mit mehr als 9 verbundenen Standorten in Ihren Google My Business Brancheneinträgen zu erweitern."
|
711 |
|
712 |
+
#: views/b2s/network.php:126 views/b2s/premium.php:36 views/b2s/ship.php:485 includes/B2S/Ship/Item.php:844 views/b2s/partials/post-edit-modal.php:48
|
713 |
msgid "Learn more"
|
714 |
msgstr "Mehr erfahren"
|
715 |
|
776 |
#: views/b2s/network.php:228 views/b2s/network.php:310
|
777 |
msgid "Move the connection to another network collection."
|
778 |
msgstr ""
|
|
|
779 |
|
780 |
#: views/b2s/network.php:233 views/b2s/network.php:262 views/b2s/network.php:265 views/b2s/network.php:268
|
781 |
msgid "An error occured. Please contact our support."
|
782 |
msgstr ""
|
|
|
783 |
|
784 |
#: views/b2s/network.php:240 views/b2s/network.php:317
|
785 |
msgid "move"
|
837 |
msgid "Upgrade to Blog2Social Business"
|
838 |
msgstr "Upgrade auf Blog2Social Business"
|
839 |
|
840 |
+
#: views/b2s/network.php:315 includes/B2S/Ship/Navbar.php:37
|
841 |
msgid "My Profile"
|
842 |
msgstr "Mein Profil"
|
843 |
|
844 |
+
#: views/b2s/network.php:346 includes/B2S/Network/Item.php:158
|
845 |
+
msgid "Edit Post Template"
|
846 |
+
msgstr "Beitragsvorlage bearbeiten"
|
847 |
|
848 |
#: views/b2s/network.php:358 views/b2s/settings.php:54
|
849 |
msgid "save"
|
857 |
msgid ""
|
858 |
"Please enable this feature, if you are using varnish caching (HTTP accelerator to relieve your website). Blog2Social will add a \"no-cache=1\" parameter to the post URL of your Facebook link posts to ensure that Facebook always pulls the current meta data of your blog post."
|
859 |
msgstr ""
|
|
|
|
|
860 |
|
861 |
#: views/b2s/network.php:384
|
862 |
msgid "Choose your Post Format"
|
863 |
+
msgstr ""
|
864 |
|
865 |
#: views/b2s/network.php:388 views/b2s/network.php:391 views/b2s/network.php:394
|
866 |
msgid "Decide in which post format you want to post your content: Link post or image post."
|
867 |
+
msgstr ""
|
868 |
|
869 |
#: views/b2s/network.php:397
|
870 |
msgid "Decide in wich form you want to post your Content. Either as image with frame, or as image cut out."
|
871 |
+
msgstr ""
|
872 |
|
873 |
#: views/b2s/network.php:409
|
874 |
msgid "Post Content"
|
875 |
+
msgstr ""
|
876 |
|
877 |
#: views/b2s/network.php:412
|
878 |
msgid "Edit the content of your post. Move elements by drag and drop into the textarea and customize them as you like."
|
879 |
+
msgstr ""
|
880 |
|
881 |
#: views/b2s/network.php:415
|
882 |
msgid "Legend"
|
883 |
+
msgstr ""
|
884 |
|
885 |
#: views/b2s/network.php:417
|
886 |
msgid "The title of your post"
|
887 |
+
msgstr ""
|
888 |
|
889 |
#: views/b2s/network.php:418
|
890 |
msgid "The summary of your post (you define it in the side menu of your post)."
|
891 |
+
msgstr ""
|
892 |
|
893 |
#: views/b2s/network.php:419
|
894 |
msgid "The content of your post"
|
895 |
+
msgstr ""
|
896 |
|
897 |
#: views/b2s/network.php:420
|
898 |
msgid "The tags you have set in your post."
|
899 |
+
msgstr ""
|
900 |
|
901 |
#: views/b2s/network.php:433 includes/B2S/Network/Item.php:624
|
902 |
msgid "Character limit"
|
903 |
+
msgstr ""
|
904 |
|
905 |
#: views/b2s/network.php:436
|
906 |
msgid "Define the character limit for the variables \"EXCERPT\" and \"CONTENT\" individually. Your text will be shortened after the last comma, period, or space character within your character limit."
|
907 |
+
msgstr ""
|
908 |
|
909 |
#: views/b2s/network.php:437
|
910 |
msgid "An \"EXCERPT\" will only be added to your social media post if you have added a manual excerpt in the excerpt editing box of the Gutenberg side menu (document settings) of your post."
|
911 |
msgstr ""
|
|
|
912 |
|
913 |
#: views/b2s/network.php:438
|
914 |
msgid ""
|
915 |
"\"TITLES\" and \"KEYWORDS\" (Hashtags) are not shortened. If you select the \"TITLE\" and \"KEYWORD\" variables for your social media posts, the character limit you define for the \"EXCERPT\" and/or \"CONTENT\" variables will be applied within the remaining available "
|
916 |
"character limit of the social network."
|
917 |
msgstr ""
|
|
|
|
|
918 |
|
919 |
#: views/b2s/post.approve.php:81
|
920 |
msgid "Delete Social Media Posts"
|
936 |
msgid "show all"
|
937 |
msgstr "alles anzeigen"
|
938 |
|
939 |
+
#: views/b2s/post.calendar.php:38 views/b2s/ship.php:16 includes/B2S/Post/Filter.php:50 includes/B2S/Post/Item.php:272 includes/PRG/Post/Filter.php:41 includes/PRG/Post/Item.php:97
|
940 |
msgid "scheduled"
|
941 |
msgstr "geplant"
|
942 |
|
946 |
|
947 |
#: views/b2s/post.calendar.php:69 views/b2s/post.sched.php:177 includes/B2S/Settings/Item.php:393 includes/B2S/Settings/Item.php:412
|
948 |
msgid "Image Post"
|
949 |
+
msgstr ""
|
950 |
|
951 |
#: views/b2s/post.calendar.php:86 views/b2s/post.sched.php:164
|
952 |
msgid "add post"
|
953 |
msgstr "Beitrag hinzufügen"
|
954 |
|
955 |
+
#: views/b2s/post.calendar.php:105 views/b2s/post.sched.php:122 views/b2s/ship.php:498
|
956 |
msgid "Choose your"
|
957 |
msgstr "Wähle Deinen"
|
958 |
|
959 |
+
#: views/b2s/post.calendar.php:105 views/b2s/post.sched.php:122 views/b2s/ship.php:498
|
960 |
msgid "Post Format"
|
961 |
msgstr "Postformat"
|
962 |
|
963 |
+
#: views/b2s/post.calendar.php:107 views/b2s/post.sched.php:124 views/b2s/ship.php:500
|
964 |
msgid "for:"
|
965 |
msgstr "für:"
|
966 |
|
967 |
+
#: views/b2s/post.calendar.php:126 views/b2s/post.sched.php:143 views/b2s/ship.php:518
|
968 |
msgid "Define the default settings for the custom post format for all of your Facebook accounts in the Blog2Social settings."
|
969 |
msgstr "Speichere Dein bevorzugtes Facebook Post-Format als Standardeinstellung in den Blog2Social Einstellungen."
|
970 |
|
971 |
+
#: views/b2s/post.calendar.php:129 views/b2s/post.sched.php:146 views/b2s/ship.php:521
|
972 |
msgid "Define the default settings for the custom post format for all of your Twitter accounts in the Blog2Social settings."
|
973 |
msgstr "Definiere Dein Standard-Beitragsformat für alle Deine Twitter-Verbindungen unter den Blog2Social Einstellungen."
|
974 |
|
975 |
+
#: views/b2s/post.calendar.php:132 views/b2s/post.sched.php:149 views/b2s/ship.php:524
|
976 |
msgid "Define the default settings for the custom post format for all of your LinkedIn accounts in the Blog2Social settings."
|
977 |
msgstr "Definiere die Standardeinstellung für das Postformat bei LinkedIn in den Blog2Social-Einstellungen."
|
978 |
|
979 |
+
#: views/b2s/post.calendar.php:135 views/b2s/post.sched.php:152 views/b2s/ship.php:527
|
980 |
msgid "Define the default settings for the custom post format for all of your Instagram accounts in the Blog2Social settings."
|
981 |
msgstr "Definiere die Standardeinstellungen für das benutzerdefinierte Postformat für alle Instagram-Konten in den Blog2Social-Einstellungen."
|
982 |
|
983 |
+
#: views/b2s/post.calendar.php:150 views/b2s/post.sched.php:103 views/b2s/ship.php:439
|
984 |
msgid "Select image for"
|
985 |
msgstr "Wähle Bild aus für"
|
986 |
|
1004 |
msgid "Select a post"
|
1005 |
msgstr "Wähle einen Beitrag aus"
|
1006 |
|
1007 |
+
#: views/b2s/post.draft.php:73
|
1008 |
+
msgid "Delete Social Media Draft"
|
1009 |
+
msgstr ""
|
1010 |
+
|
1011 |
+
#: views/b2s/post.draft.php:76
|
1012 |
+
msgid "Are you sure you want to delete this Social Media draft?"
|
1013 |
+
msgstr ""
|
1014 |
+
|
1015 |
#: views/b2s/post.notice.php:68 views/b2s/post.publish.php:68 views/b2s/widgets/posts.php:58
|
1016 |
msgid "Delete entries from the reporting"
|
1017 |
msgstr "Einträge aus dem Reporting löschen"
|
1032 |
msgid "You are sure, you want to delete entries from the scheduling?"
|
1033 |
msgstr "Bist Du sicher, dass Du Einträge aus Deiner Planung löschen möchtest?"
|
1034 |
|
1035 |
+
#: views/b2s/premium.php:14 includes/B2S/Settings/Item.php:156
|
1036 |
msgid "Your current license:"
|
1037 |
msgstr "Deine aktuelle Lizenz:"
|
1038 |
|
1039 |
+
#: views/b2s/premium.php:26
|
1040 |
msgid "Try Blog2Social Premium 30 days for free"
|
1041 |
msgstr "Teste Blog2Social Premium 30 Tage lang kostenlos."
|
1042 |
|
1043 |
+
#: views/b2s/premium.php:30
|
1044 |
msgid "End of Trial"
|
1045 |
msgstr "Ende der Testzeit"
|
1046 |
|
1047 |
+
#: views/b2s/premium.php:31 includes/B2S/Settings/Item.php:159 includes/B2S/Settings/Item.php:162
|
1048 |
msgid "Upgrade"
|
1049 |
msgstr "Upgrade"
|
1050 |
|
1051 |
+
#: views/b2s/premium.php:35
|
1052 |
msgid "Upgrade to Blog2Social Premium and get even smarter with social media automation: Schedule your posts for the best time or recurringly with the Best Time Manager or the Social Media Calendar. Post to pages, groups and multiple accounts per network."
|
1053 |
msgstr ""
|
1054 |
"Nutze Blog2Social Premium für noch intelligentere Social Media Automatisierung: Plane Deine Beiträge voll-automatisiert mit dem Beste-Zeiten-Manager, wähle bestimmte Termine oder plane Deine Beiträge regelmäßig. Behalte den Überblick über Deine Posts mit dem Social Media "
|
1055 |
"Kalender. Veröffentliche Beiträge auf Seiten, in Gruppen und auf mehreren Konten pro Netzwerk. Arbeite mit mehr Nutzern im Team. "
|
1056 |
|
1057 |
+
#: views/b2s/premium.php:41
|
1058 |
msgid "Select a user"
|
1059 |
msgstr " Blog-Benutzer auswählen"
|
1060 |
|
1061 |
+
#: views/b2s/premium.php:45
|
1062 |
msgid "No User found"
|
1063 |
msgstr "Kein Blog-Benutzer gefunden"
|
1064 |
|
1065 |
+
#: views/b2s/premium.php:48
|
1066 |
msgid "Enter license key and change your version"
|
1067 |
msgstr "Lizenzschlüssel eingeben und Version ändern"
|
1068 |
|
1069 |
+
#: views/b2s/premium.php:50
|
1070 |
msgid "Activate License"
|
1071 |
+
msgstr ""
|
1072 |
|
1073 |
+
#: views/b2s/premium.php:61
|
1074 |
msgid "Go Premium and get even smarter with social media automation"
|
1075 |
msgstr "Nutze Blog2Social Premium für noch intelligentere Social Media Automatisierung"
|
1076 |
|
1077 |
+
#: views/b2s/premium.php:70
|
1078 |
msgid "Pages and groups"
|
1079 |
msgstr "Seiten und Gruppen"
|
1080 |
|
1081 |
+
#: views/b2s/premium.php:71
|
1082 |
msgid "Share your posts on pages and in groups on Facebook, LinkedIn, XING, VK and Medium."
|
1083 |
msgstr "Teilen Sie Ihre Beiträge auf Seiten und in Gruppen auf Facebook, LinkedIn, Xing, VK und Medium."
|
1084 |
|
1085 |
+
#: views/b2s/premium.php:79
|
1086 |
msgid "More users and accounts"
|
1087 |
msgstr "Mehr Benutzer und Accounts"
|
1088 |
|
1089 |
+
#: views/b2s/premium.php:80
|
1090 |
msgid "Add multiple users and accounts per network. Define sharing-profiles for selected network bundles."
|
1091 |
msgstr "Füge mehrere Benutzer und Accounts pro Netzwerk hinzu. Definiere Sharing-Profile für ausgewählte Netzwerk-Bundles."
|
1092 |
|
1093 |
+
#: views/b2s/premium.php:88
|
1094 |
msgid "Social Media Calendar"
|
1095 |
msgstr "Social Media Kalender"
|
1096 |
|
1097 |
+
#: views/b2s/premium.php:89
|
1098 |
msgid "See your entire schedule at a glance, with team view and network filter. Edit scheduled posts or add new social media posts per drag & drop."
|
1099 |
msgstr "Sieh Deinen gesamten Zeitplan auf einen Blick, mit Teamansicht und Netzwerkfilter. Bearbeite geplante Beiträge oder füge neue Social-Media-Beiträge per Drag & Drop hinzu."
|
1100 |
|
1101 |
+
#: views/b2s/premium.php:97
|
1102 |
msgid "Best Times Manager"
|
1103 |
msgstr "Beste Zeiten Manager"
|
1104 |
|
1105 |
+
#: views/b2s/premium.php:98
|
1106 |
msgid "Use the Best Times Manager to schedule your posts automatically or define your own best time scheme."
|
1107 |
msgstr "Verwende den Beste-Zeiten-Manager, um Deine Beiträge automatisch zu planen oder Dein eigenes bestes Zeitschema zu definieren."
|
1108 |
|
1109 |
+
#: views/b2s/premium.php:109 views/b2s/settings.php:34 includes/B2S/Post/Item.php:539
|
1110 |
msgid "Auto-Posting"
|
1111 |
msgstr "Auto-Posting"
|
1112 |
|
1113 |
+
#: views/b2s/premium.php:110
|
1114 |
msgid "Share your posts automatically across your preferred networks at once or at your pre-scheduled time-settings."
|
1115 |
msgstr "Teile Deine Beiträge automatisch in Deinen bevorzugten Netzwerken sofort oder zu den von Dir festgelegten Zeiten."
|
1116 |
|
1117 |
+
#: views/b2s/premium.php:118
|
1118 |
msgid "RSS import & auto-post"
|
1119 |
msgstr "RSS-Import & Auto-Poster"
|
1120 |
|
1121 |
+
#: views/b2s/premium.php:119
|
1122 |
msgid "Share imported RSS feeds automatically to get more variations for your content."
|
1123 |
msgstr "Teile importierte RSS-Feeds automatisch, um mehr Variationen für Deine Inhalte zu erhalten."
|
1124 |
|
1125 |
+
#: views/b2s/premium.php:128
|
1126 |
msgid "Schedule and share your blog posts as Google My Business posts to update your business listing and to add fresh content for your company."
|
1127 |
msgstr "Plane und teile Deine Blogartikel als Google My Business - Beiträge und verleihe Deinem Unternehmen mit aktuellen News mehr Sichtbarkeit."
|
1128 |
|
1129 |
+
#: views/b2s/premium.php:136
|
1130 |
msgid "Schedule curated content"
|
1131 |
msgstr "Kuratierte Inhalte planen"
|
1132 |
|
1133 |
+
#: views/b2s/premium.php:137
|
1134 |
msgid "Schedule and share curated content from any source on your preferred networks."
|
1135 |
msgstr "Plane und teile kuratierte Inhalte aus beliebigen Quellen in Deinen bevorzugten Netzwerken."
|
1136 |
|
1137 |
+
#: views/b2s/premium.php:148
|
1138 |
msgid "Custom image"
|
1139 |
msgstr "Benutzerdefinierte Bilder"
|
1140 |
|
1141 |
+
#: views/b2s/premium.php:149
|
1142 |
msgid "Select individual images per post or network and select any image from your media library to create more variations for your posts."
|
1143 |
msgstr "Wähle individuelle Bilder pro Beitrag oder Netzwerk sowie ein beliebiges Bild aus Deiner Mediathek aus, um weitere Variationen für Deine Beiträge zu erstellen."
|
1144 |
|
1145 |
+
#: views/b2s/premium.php:157
|
1146 |
msgid "Custom format"
|
1147 |
msgstr "Benutzerdefiniertes Format"
|
1148 |
|
1149 |
+
#: views/b2s/premium.php:158
|
1150 |
msgid "Select link post or image post per network to choose the optimal format for your post."
|
1151 |
msgstr "Wähle zwischen Link- oder Bild-Post pro Netzwerk, um das optimale Format für Deinen Beitrag zu wählen"
|
1152 |
|
1153 |
+
#: views/b2s/premium.php:166
|
1154 |
msgid "Open Graph and Twitter Card Tags"
|
1155 |
msgstr "Open Graph und Twitter Card Tags"
|
1156 |
|
1157 |
+
#: views/b2s/premium.php:167
|
1158 |
msgid "Add and edit meta tags for Open Graph (Ex. Facebook and LinkedIn) and Twitter Cards to define the look of your link posts."
|
1159 |
msgstr "Setze und bearbeite Social-Media-Tags für Open Graph (z.B. Facebook und LinkedIn) und Twitter Cards, um das Aussehen Deiner Link-Posts festzulegen."
|
1160 |
|
1161 |
+
#: views/b2s/premium.php:175
|
1162 |
msgid "Premium support"
|
1163 |
msgstr "Premium Support"
|
1164 |
|
1165 |
+
#: views/b2s/premium.php:176
|
1166 |
msgid "Regular updates and priority support per e-mail and phone."
|
1167 |
msgstr "Regelmäßige Updates und bevorzugter Support per E-Mail und Telefon"
|
1168 |
|
1169 |
+
#: views/b2s/premium.php:181
|
1170 |
msgid "Show me plans and prices"
|
1171 |
msgstr "Versionen und Preise anzeigen"
|
1172 |
|
1173 |
+
#: views/b2s/premium.php:182
|
1174 |
msgid "Show all premium features"
|
1175 |
msgstr "Alle Premium-Features anzeigen"
|
1176 |
|
1247 |
"Die Zeiteinstellungen zum Planen von Social Media Posts in Blog2Social basieren auf der Zeitzone, die in den allgemeinen Einstellungen Deines WordPress festgelegt ist. Du kannst aber auch eine andere Zeitzone als Basis für die Planung Deiner Social Media Posts festlegen. "
|
1248 |
"Wähle dazu die gewünschte Zeitzone aus dem Drop-Down Menü."
|
1249 |
|
1250 |
+
#: views/b2s/ship.php:16 includes/B2S/Post/Filter.php:50 includes/B2S/Post/Item.php:272 includes/PRG/Post/Item.php:97
|
1251 |
msgid "draft"
|
1252 |
msgstr "Entwurf"
|
1253 |
|
1254 |
+
#: views/b2s/ship.php:50
|
1255 |
msgid "Social Media Scheduling & Sharing"
|
1256 |
msgstr "Beitrag auf Social Media planen und teilen"
|
1257 |
|
1258 |
+
#: views/b2s/ship.php:51 views/prg/ship.php:41 views/prg/ship.php:43 includes/B2S/Curation/View.php:35 includes/B2S/Settings/Item.php:317 includes/B2S/Settings/Item.php:338
|
1259 |
msgid "Title"
|
1260 |
msgstr "Titel"
|
1261 |
|
1262 |
+
#: views/b2s/ship.php:53 includes/B2S/Post/Item.php:316
|
1263 |
msgid "on blog"
|
1264 |
msgstr "auf dem Blog"
|
1265 |
|
1266 |
+
#: views/b2s/ship.php:61
|
1267 |
msgid "scroll to bottom"
|
1268 |
msgstr "zum Seitenende"
|
1269 |
|
1270 |
+
#: views/b2s/ship.php:66
|
1271 |
msgid "You want to load your time settings?"
|
1272 |
msgstr "Du möchtest Deine Zeiten laden?"
|
1273 |
|
1274 |
+
#: views/b2s/ship.php:67
|
1275 |
msgid "Load My Times Settings"
|
1276 |
msgstr "Meine Zeit-Einstellungen laden"
|
1277 |
|
1278 |
+
#: views/b2s/ship.php:103
|
1279 |
msgid "Social Accounts"
|
1280 |
msgstr "Social Media Konten"
|
1281 |
|
1282 |
+
#: views/b2s/ship.php:121
|
1283 |
msgid "Add more..."
|
1284 |
msgstr "mehr hinzufügen"
|
1285 |
|
1286 |
+
#: views/b2s/ship.php:123
|
1287 |
msgid "Profiles | Pages | Groups"
|
1288 |
msgstr "Profile | Seiten | Gruppen"
|
1289 |
|
1290 |
+
#: views/b2s/ship.php:162
|
1291 |
msgid "Save network collection"
|
1292 |
+
msgstr "Speicher Netzwerk-Gruppierung"
|
1293 |
|
1294 |
+
#: views/b2s/ship.php:171
|
1295 |
msgid "network connected"
|
1296 |
msgstr "Netzwerk verbunden"
|
1297 |
|
1298 |
+
#: views/b2s/ship.php:172
|
1299 |
msgid "requires image"
|
1300 |
msgstr "Bild benötigt"
|
1301 |
|
1302 |
+
#: views/b2s/ship.php:173
|
1303 |
msgid "refresh authorization"
|
1304 |
msgstr "Autorisierung aktualisieren"
|
1305 |
|
1306 |
+
#: views/b2s/ship.php:196
|
1307 |
msgid "Notice:<br><p>Please make sure, that your website address is reachable. The Social Networks do not allow postings from local installations.</p>"
|
1308 |
msgstr "Hinweis:<br><p>Bitte stelle sicher, dass Deine Webseiten-Adresse von außen erreichbar ist. Die sozialen Netzwerke erlauben keine Posts von lokalen Installationen.</p>"
|
1309 |
|
1310 |
+
#: views/b2s/ship.php:198
|
1311 |
msgid "change website address"
|
1312 |
msgstr "Webseiten-Adresse ändern"
|
1313 |
|
1314 |
+
#: views/b2s/ship.php:215
|
1315 |
msgid "First, connect or select network before posting"
|
1316 |
msgstr "Verbinde Dich zuerst mit einem Netzwerk oder wähle ein Netzwerk aus, bevor Du den Beitrag teilst!"
|
1317 |
|
1318 |
+
#: views/b2s/ship.php:217 includes/B2S/Settings/Item.php:81
|
1319 |
msgid "connect"
|
1320 |
msgstr "Jetzt mit Netzwerken verbinden"
|
1321 |
|
1322 |
+
#: views/b2s/ship.php:225
|
1323 |
msgid "scroll to top"
|
1324 |
msgstr "zum Seitenanfang"
|
1325 |
|
1326 |
+
#: views/b2s/ship.php:226 views/b2s/ship.php:232 includes/B2S/Curation/View.php:111
|
1327 |
msgid "Share"
|
1328 |
msgstr "Teilen"
|
1329 |
|
1330 |
+
#: views/b2s/ship.php:227 views/b2s/ship.php:231 includes/B2S/Curation/View.php:107
|
1331 |
+
msgid "Save as Draft"
|
1332 |
+
msgstr "als Entwurf speichern"
|
1333 |
+
|
1334 |
+
#: views/b2s/ship.php:241
|
1335 |
msgid "Time zone"
|
1336 |
msgstr "Zeitzone"
|
1337 |
|
1338 |
+
#: views/b2s/ship.php:255 views/b2s/ship.php:257 includes/B2S/Post/Item.php:333
|
1339 |
msgid "Re-share this post"
|
1340 |
msgstr "Diesen Beitrag nochmal teilen"
|
1341 |
|
1342 |
+
#: views/b2s/ship.php:259
|
1343 |
msgid "Share new post on Social Media"
|
1344 |
msgstr "Teile einen neuen Beitrag auf Social Media"
|
1345 |
|
1346 |
+
#: views/b2s/ship.php:281
|
1347 |
msgid "Connect for"
|
1348 |
msgstr "Netzwerke verbinden für"
|
1349 |
|
1350 |
+
#: views/b2s/ship.php:297
|
1351 |
msgid "Re-share this Post"
|
1352 |
msgstr "Diesen Beitrag nochmal teilen"
|
1353 |
|
1354 |
+
#: views/b2s/ship.php:300
|
1355 |
msgid ""
|
1356 |
"You can re-share your post for a different sharing purpose, or to share on a different choice of networks, profiles, pages or groups, or with different comments or images, or if you want to share your blog post images to image networks only, or re-share them at different "
|
1357 |
"times. You may vary your comments and images in order to produce more variations of your social media posts to share more often without sharing the same message over and over again. Whatever your choose to do for re-sharing your post, you can simply click \"Re-share this "
|
1361 |
"oder um weitere Bilder zum Blogbeitrag nur an die Bilder-Netzwerke zu senden, oder um Deine Social Media Posts zu anderen Zeiten zu teilen. So erzielt Du mehr Variationen Deiner Social Media Posts und kannst Deinen Beitrag öfters posten, um mehr Aufmerksamkeit und Reichweite "
|
1362 |
"zu erzielen, ohne immer wieder die gleiche Mitteilung zu posten. Was auch immer Du zu teilen wünscht, klicke einfach auf \"Diesen Beitrag erneut teilen\" und Du wirst erneut zur Vorschau geführt, wo Deine Netzwerke, Texte und Bilder auswählen oder variieren kannst. "
|
1363 |
|
1364 |
+
#: views/b2s/ship.php:303
|
1365 |
msgid "You want re-share your blog post?"
|
1366 |
msgstr "Du möchtest Deinen Beitrag erneut teilen?"
|
1367 |
|
1368 |
+
#: views/b2s/ship.php:331
|
1369 |
msgid "Save Network Settings"
|
1370 |
msgstr "Netzwerkeinstellungen speichern"
|
1371 |
|
1372 |
+
#: views/b2s/ship.php:334
|
1373 |
msgid ""
|
1374 |
"You can save your current network settings as \"Standard\" network settings for any future sharing activities or as a \"Profile\" to choose from (Premium).<br><br>Your Standard selection will show as activated upon pressing the \"share on social media\" button on the right "
|
1375 |
"hand side bar. You can change these settings any time per click, or choose another network profile (Premium).<br><br>You can also pre-define various different sets of networks, for specific social media accounts, target groups, contents or sharing purposes. For example you "
|
1382 |
"posten, um mehr Aufmerksamkeit und Reichweite zu erzielen, ohne immer wieder die gleiche Mitteilung zu posten. Was auch immer Du zu teilen wünscht
|