Version Description
Download this release
Release Info
Developer | saurabhshukla |
Plugin | RSS Post Importer |
Version | 2.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.10 to 2.0
- css/rss_pi.css → app/assets/css/style.css +1 -1
- {font → app/assets/font}/FontAwesome.otf +0 -0
- {font → app/assets/font}/fontawesome-webfont.eot +0 -0
- {font → app/assets/font}/fontawesome-webfont.svg +0 -0
- {font → app/assets/font}/fontawesome-webfont.ttf +0 -0
- {font → app/assets/font}/fontawesome-webfont.woff +0 -0
- app/assets/img/rss-post-importer_280x600.jpg +0 -0
- app/assets/js/main.js +84 -0
- app/class-rss-post-importer.php +122 -0
- app/classes/admin/class-rss-pi-admin-processor.php +213 -0
- app/classes/admin/class-rss-pi-admin.php +173 -0
- app/classes/helpers/class-rss-pi-featured-image.php +76 -0
- app/classes/helpers/class-rss-pi-log.php +77 -0
- app/classes/helpers/class-rss-pi-parser.php +74 -0
- app/classes/import/class-rss-pi-cron.php +41 -0
- app/classes/import/class-rss-pi-engine.php +365 -0
- app/lang/rss_pi-es_ES.mo +0 -0
- app/lang/rss_pi-es_ES.po +257 -0
- app/lang/rss_pi-sv_SE.mo +0 -0
- app/lang/rss_pi-sv_SE.po +254 -0
- app/templates/admin-ui.php +35 -0
- app/templates/feed-save-box.php +33 -0
- app/templates/feed-table-row.php +94 -0
- app/templates/feed-table.php +42 -0
- parts/rss_pi-log.php → app/templates/log.php +0 -0
- app/templates/settings-table.php +156 -0
- assets/rss-post-importer_280x600.jpg +0 -0
- index.php +64 -0
- js/rss_pi.js +0 -84
- lang/rss_pi-es_ES.mo +0 -0
- lang/rss_pi-es_ES.po +0 -212
- lang/rss_pi-sv_SE.mo +0 -0
- lang/rss_pi-sv_SE.po +0 -212
- log.txt +0 -0
- parts/table_row.php +0 -78
- readme.txt +33 -4
- rss_pi-ui.php +0 -227
- rss_pi.php +0 -436
- uninstall.php +18 -23
css/rss_pi.css → app/assets/css/style.css
RENAMED
@@ -22,4 +22,4 @@
|
|
22 |
* Email: dave@fontawesome.io
|
23 |
* Twitter: http://twitter.com/davegandy
|
24 |
* Work: Lead Product Designer @ Kyruus - http://kyruus.com
|
25 |
-
*/@font-face{font-family:FontAwesome;src:url(../font/fontawesome-webfont.eot?v=3.2.1);src:url(../font/fontawesome-webfont.eot?#iefix&v=3.2.1) format('embedded-opentype'),url(../font/fontawesome-webfont.woff?v=3.2.1) format('woff'),url(../font/fontawesome-webfont.ttf?v=3.2.1) format('truetype'),url(../font/fontawesome-webfont.svg#fontawesomeregular?v=3.2.1) format('svg');font-weight:400;font-style:normal}[class^=icon-],[class*=" icon-"]{font-family:FontAwesome;font-weight:400;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;}[class^=icon-]:before,[class*=" icon-"]:before{text-decoration:inherit;display:inline-block;speak:none}.icon-large:before{vertical-align:-10%;font-size:1.33333333em}a [class^=icon-],a [class*=" icon-"]{display:inline}[class^=icon-].icon-fixed-width,[class*=" icon-"].icon-fixed-width{display:inline-block;width:1.14285714em;text-align:right;padding-right:.28571429em}[class^=icon-].icon-fixed-width.icon-large,[class*=" icon-"].icon-fixed-width.icon-large{width:1.42857143em}.icons-ul{margin-left:2.14285714em;list-style-type:none}.icons-ul>li{position:relative}.icons-ul .icon-li{position:absolute;left:-2.14285714em;width:2.14285714em;text-align:center;line-height:inherit}[class^=icon-].hide,[class*=" icon-"].hide{display:none}.icon-muted{color:#eee}.icon-light{color:#fff}.icon-dark{color:#333}.icon-border{border:solid 1px #eee;padding:.2em .25em .15em;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.icon-2x{font-size:2em}.icon-2x.icon-border{border-width:2px;-webkit-border-top-right-radius:4px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.icon-3x{font-size:3em}.icon-3x.icon-border{border-width:3px;-webkit-border-top-right-radius:5px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:5px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:5px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.icon-4x{font-size:4em}.icon-4x.icon-border{border-width:4px;-webkit-border-top-right-radius:6px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:6px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.icon-5x{font-size:5em}.icon-5x.icon-border{border-width:5px;-webkit-border-top-right-radius:7px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:7px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:7px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.pull-right{float:right}.pull-left{float:left}[class^=icon-].pull-left,[class*=" icon-"].pull-left{margin-right:.3em}[class^=icon-].pull-right,[class*=" icon-"].pull-right{margin-left:.3em}.icon-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:-35%}.icon-stack [class^=icon-],.icon-stack [class*=" icon-"]{display:block;text-align:center;position:absolute;width:100%;height:100%;font-size:1em;line-height:inherit;}.icon-stack .icon-stack-base{font-size:2em;}.icon-spin{display:inline-block;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear}a .icon-stack,a .icon-spin{display:inline-block;text-decoration:none}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.icon-rotate-90:before{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1)}.icon-rotate-180:before{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2)}.icon-rotate-270:before{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3)}.icon-flip-horizontal:before{-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.icon-flip-vertical:before{-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}a .icon-rotate-90:before,a .icon-rotate-180:before,a .icon-rotate-270:before,a .icon-flip-horizontal:before,a .icon-flip-vertical:before{display:inline-block}.icon-glass:before{content:"\f000"}.icon-music:before{content:"\f001"}.icon-search:before{content:"\f002"}.icon-envelope-alt:before{content:"\f003"}.icon-heart:before{content:"\f004"}.icon-star:before{content:"\f005"}.icon-star-empty:before{content:"\f006"}.icon-user:before{content:"\f007"}.icon-film:before{content:"\f008"}.icon-th-large:before{content:"\f009"}.icon-th:before{content:"\f00a"}.icon-th-list:before{content:"\f00b"}.icon-ok:before{content:"\f00c"}.icon-remove:before{content:"\f00d"}.icon-zoom-in:before{content:"\f00e"}.icon-zoom-out:before{content:"\f010"}.icon-power-off:before,.icon-off:before{content:"\f011"}.icon-signal:before{content:"\f012"}.icon-gear:before,.icon-cog:before{content:"\f013"}.icon-trash:before{content:"\f014"}.icon-home:before{content:"\f015"}.icon-file-alt:before{content:"\f016"}.icon-time:before{content:"\f017"}.icon-road:before{content:"\f018"}.icon-download-alt:before{content:"\f019"}.icon-download:before{content:"\f01a"}.icon-upload:before{content:"\f01b"}.icon-inbox:before{content:"\f01c"}.icon-play-circle:before{content:"\f01d"}.icon-rotate-right:before,.icon-repeat:before{content:"\f01e"}.icon-refresh:before{content:"\f021"}.icon-list-alt:before{content:"\f022"}.icon-lock:before{content:"\f023"}.icon-flag:before{content:"\f024"}.icon-headphones:before{content:"\f025"}.icon-volume-off:before{content:"\f026"}.icon-volume-down:before{content:"\f027"}.icon-volume-up:before{content:"\f028"}.icon-qrcode:before{content:"\f029"}.icon-barcode:before{content:"\f02a"}.icon-tag:before{content:"\f02b"}.icon-tags:before{content:"\f02c"}.icon-book:before{content:"\f02d"}.icon-bookmark:before{content:"\f02e"}.icon-print:before{content:"\f02f"}.icon-camera:before{content:"\f030"}.icon-font:before{content:"\f031"}.icon-bold:before{content:"\f032"}.icon-italic:before{content:"\f033"}.icon-text-height:before{content:"\f034"}.icon-text-width:before{content:"\f035"}.icon-align-left:before{content:"\f036"}.icon-align-center:before{content:"\f037"}.icon-align-right:before{content:"\f038"}.icon-align-justify:before{content:"\f039"}.icon-list:before{content:"\f03a"}.icon-indent-left:before{content:"\f03b"}.icon-indent-right:before{content:"\f03c"}.icon-facetime-video:before{content:"\f03d"}.icon-picture:before{content:"\f03e"}.icon-pencil:before{content:"\f040"}.icon-map-marker:before{content:"\f041"}.icon-adjust:before{content:"\f042"}.icon-tint:before{content:"\f043"}.icon-edit:before{content:"\f044"}.icon-share:before{content:"\f045"}.icon-check:before{content:"\f046"}.icon-move:before{content:"\f047"}.icon-step-backward:before{content:"\f048"}.icon-fast-backward:before{content:"\f049"}.icon-backward:before{content:"\f04a"}.icon-play:before{content:"\f04b"}.icon-pause:before{content:"\f04c"}.icon-stop:before{content:"\f04d"}.icon-forward:before{content:"\f04e"}.icon-fast-forward:before{content:"\f050"}.icon-step-forward:before{content:"\f051"}.icon-eject:before{content:"\f052"}.icon-chevron-left:before{content:"\f053"}.icon-chevron-right:before{content:"\f054"}.icon-plus-sign:before{content:"\f055"}.icon-minus-sign:before{content:"\f056"}.icon-remove-sign:before{content:"\f057"}.icon-ok-sign:before{content:"\f058"}.icon-question-sign:before{content:"\f059"}.icon-info-sign:before{content:"\f05a"}.icon-screenshot:before{content:"\f05b"}.icon-remove-circle:before{content:"\f05c"}.icon-ok-circle:before{content:"\f05d"}.icon-ban-circle:before{content:"\f05e"}.icon-arrow-left:before{content:"\f060"}.icon-arrow-right:before{content:"\f061"}.icon-arrow-up:before{content:"\f062"}.icon-arrow-down:before{content:"\f063"}.icon-mail-forward:before,.icon-share-alt:before{content:"\f064"}.icon-resize-full:before{content:"\f065"}.icon-resize-small:before{content:"\f066"}.icon-plus:before{content:"\f067"}.icon-minus:before{content:"\f068"}.icon-asterisk:before{content:"\f069"}.icon-exclamation-sign:before{content:"\f06a"}.icon-gift:before{content:"\f06b"}.icon-leaf:before{content:"\f06c"}.icon-fire:before{content:"\f06d"}.icon-eye-open:before{content:"\f06e"}.icon-eye-close:before{content:"\f070"}.icon-warning-sign:before{content:"\f071"}.icon-plane:before{content:"\f072"}.icon-calendar:before{content:"\f073"}.icon-random:before{content:"\f074"}.icon-comment:before{content:"\f075"}.icon-magnet:before{content:"\f076"}.icon-chevron-up:before{content:"\f077"}.icon-chevron-down:before{content:"\f078"}.icon-retweet:before{content:"\f079"}.icon-shopping-cart:before{content:"\f07a"}.icon-folder-close:before{content:"\f07b"}.icon-folder-open:before{content:"\f07c"}.icon-resize-vertical:before{content:"\f07d"}.icon-resize-horizontal:before{content:"\f07e"}.icon-bar-chart:before{content:"\f080"}.icon-twitter-sign:before{content:"\f081"}.icon-facebook-sign:before{content:"\f082"}.icon-camera-retro:before{content:"\f083"}.icon-key:before{content:"\f084"}.icon-gears:before,.icon-cogs:before{content:"\f085"}.icon-comments:before{content:"\f086"}.icon-thumbs-up-alt:before{content:"\f087"}.icon-thumbs-down-alt:before{content:"\f088"}.icon-star-half:before{content:"\f089"}.icon-heart-empty:before{content:"\f08a"}.icon-signout:before{content:"\f08b"}.icon-linkedin-sign:before{content:"\f08c"}.icon-pushpin:before{content:"\f08d"}.icon-external-link:before{content:"\f08e"}.icon-signin:before{content:"\f090"}.icon-trophy:before{content:"\f091"}.icon-github-sign:before{content:"\f092"}.icon-upload-alt:before{content:"\f093"}.icon-lemon:before{content:"\f094"}.icon-phone:before{content:"\f095"}.icon-unchecked:before,.icon-check-empty:before{content:"\f096"}.icon-bookmark-empty:before{content:"\f097"}.icon-phone-sign:before{content:"\f098"}.icon-twitter:before{content:"\f099"}.icon-facebook:before{content:"\f09a"}.icon-github:before{content:"\f09b"}.icon-unlock:before{content:"\f09c"}.icon-credit-card:before{content:"\f09d"}.icon-rss:before{content:"\f09e"}.icon-hdd:before{content:"\f0a0"}.icon-bullhorn:before{content:"\f0a1"}.icon-bell:before{content:"\f0a2"}.icon-certificate:before{content:"\f0a3"}.icon-hand-right:before{content:"\f0a4"}.icon-hand-left:before{content:"\f0a5"}.icon-hand-up:before{content:"\f0a6"}.icon-hand-down:before{content:"\f0a7"}.icon-circle-arrow-left:before{content:"\f0a8"}.icon-circle-arrow-right:before{content:"\f0a9"}.icon-circle-arrow-up:before{content:"\f0aa"}.icon-circle-arrow-down:before{content:"\f0ab"}.icon-globe:before{content:"\f0ac"}.icon-wrench:before{content:"\f0ad"}.icon-tasks:before{content:"\f0ae"}.icon-filter:before{content:"\f0b0"}.icon-briefcase:before{content:"\f0b1"}.icon-fullscreen:before{content:"\f0b2"}.icon-group:before{content:"\f0c0"}.icon-link:before{content:"\f0c1"}.icon-cloud:before{content:"\f0c2"}.icon-beaker:before{content:"\f0c3"}.icon-cut:before{content:"\f0c4"}.icon-copy:before{content:"\f0c5"}.icon-paperclip:before,.icon-paper-clip:before{content:"\f0c6"}.icon-save:before{content:"\f0c7"}.icon-sign-blank:before{content:"\f0c8"}.icon-reorder:before{content:"\f0c9"}.icon-list-ul:before{content:"\f0ca"}.icon-list-ol:before{content:"\f0cb"}.icon-strikethrough:before{content:"\f0cc"}.icon-underline:before{content:"\f0cd"}.icon-table:before{content:"\f0ce"}.icon-magic:before{content:"\f0d0"}.icon-truck:before{content:"\f0d1"}.icon-pinterest:before{content:"\f0d2"}.icon-pinterest-sign:before{content:"\f0d3"}.icon-google-plus-sign:before{content:"\f0d4"}.icon-google-plus:before{content:"\f0d5"}.icon-money:before{content:"\f0d6"}.icon-caret-down:before{content:"\f0d7"}.icon-caret-up:before{content:"\f0d8"}.icon-caret-left:before{content:"\f0d9"}.icon-caret-right:before{content:"\f0da"}.icon-columns:before{content:"\f0db"}.icon-sort:before{content:"\f0dc"}.icon-sort-down:before{content:"\f0dd"}.icon-sort-up:before{content:"\f0de"}.icon-envelope:before{content:"\f0e0"}.icon-linkedin:before{content:"\f0e1"}.icon-rotate-left:before,.icon-undo:before{content:"\f0e2"}.icon-legal:before{content:"\f0e3"}.icon-dashboard:before{content:"\f0e4"}.icon-comment-alt:before{content:"\f0e5"}.icon-comments-alt:before{content:"\f0e6"}.icon-bolt:before{content:"\f0e7"}.icon-sitemap:before{content:"\f0e8"}.icon-umbrella:before{content:"\f0e9"}.icon-paste:before{content:"\f0ea"}.icon-lightbulb:before{content:"\f0eb"}.icon-exchange:before{content:"\f0ec"}.icon-cloud-download:before{content:"\f0ed"}.icon-cloud-upload:before{content:"\f0ee"}.icon-user-md:before{content:"\f0f0"}.icon-stethoscope:before{content:"\f0f1"}.icon-suitcase:before{content:"\f0f2"}.icon-bell-alt:before{content:"\f0f3"}.icon-coffee:before{content:"\f0f4"}.icon-food:before{content:"\f0f5"}.icon-file-text-alt:before{content:"\f0f6"}.icon-building:before{content:"\f0f7"}.icon-hospital:before{content:"\f0f8"}.icon-ambulance:before{content:"\f0f9"}.icon-medkit:before{content:"\f0fa"}.icon-fighter-jet:before{content:"\f0fb"}.icon-beer:before{content:"\f0fc"}.icon-h-sign:before{content:"\f0fd"}.icon-plus-sign-alt:before{content:"\f0fe"}.icon-double-angle-left:before{content:"\f100"}.icon-double-angle-right:before{content:"\f101"}.icon-double-angle-up:before{content:"\f102"}.icon-double-angle-down:before{content:"\f103"}.icon-angle-left:before{content:"\f104"}.icon-angle-right:before{content:"\f105"}.icon-angle-up:before{content:"\f106"}.icon-angle-down:before{content:"\f107"}.icon-desktop:before{content:"\f108"}.icon-laptop:before{content:"\f109"}.icon-tablet:before{content:"\f10a"}.icon-mobile-phone:before{content:"\f10b"}.icon-circle-blank:before{content:"\f10c"}.icon-quote-left:before{content:"\f10d"}.icon-quote-right:before{content:"\f10e"}.icon-spinner:before{content:"\f110"}.icon-circle:before{content:"\f111"}.icon-mail-reply:before,.icon-reply:before{content:"\f112"}.icon-github-alt:before{content:"\f113"}.icon-folder-close-alt:before{content:"\f114"}.icon-folder-open-alt:before{content:"\f115"}.icon-expand-alt:before{content:"\f116"}.icon-collapse-alt:before{content:"\f117"}.icon-smile:before{content:"\f118"}.icon-frown:before{content:"\f119"}.icon-meh:before{content:"\f11a"}.icon-gamepad:before{content:"\f11b"}.icon-keyboard:before{content:"\f11c"}.icon-flag-alt:before{content:"\f11d"}.icon-flag-checkered:before{content:"\f11e"}.icon-terminal:before{content:"\f120"}.icon-code:before{content:"\f121"}.icon-reply-all:before{content:"\f122"}.icon-mail-reply-all:before{content:"\f122"}.icon-star-half-full:before,.icon-star-half-empty:before{content:"\f123"}.icon-location-arrow:before{content:"\f124"}.icon-crop:before{content:"\f125"}.icon-code-fork:before{content:"\f126"}.icon-unlink:before{content:"\f127"}.icon-question:before{content:"\f128"}.icon-info:before{content:"\f129"}.icon-exclamation:before{content:"\f12a"}.icon-superscript:before{content:"\f12b"}.icon-subscript:before{content:"\f12c"}.icon-eraser:before{content:"\f12d"}.icon-puzzle-piece:before{content:"\f12e"}.icon-microphone:before{content:"\f130"}.icon-microphone-off:before{content:"\f131"}.icon-shield:before{content:"\f132"}.icon-calendar-empty:before{content:"\f133"}.icon-fire-extinguisher:before{content:"\f134"}.icon-rocket:before{content:"\f135"}.icon-maxcdn:before{content:"\f136"}.icon-chevron-sign-left:before{content:"\f137"}.icon-chevron-sign-right:before{content:"\f138"}.icon-chevron-sign-up:before{content:"\f139"}.icon-chevron-sign-down:before{content:"\f13a"}.icon-html5:before{content:"\f13b"}.icon-css3:before{content:"\f13c"}.icon-anchor:before{content:"\f13d"}.icon-unlock-alt:before{content:"\f13e"}.icon-bullseye:before{content:"\f140"}.icon-ellipsis-horizontal:before{content:"\f141"}.icon-ellipsis-vertical:before{content:"\f142"}.icon-rss-sign:before{content:"\f143"}.icon-play-sign:before{content:"\f144"}.icon-ticket:before{content:"\f145"}.icon-minus-sign-alt:before{content:"\f146"}.icon-check-minus:before{content:"\f147"}.icon-level-up:before{content:"\f148"}.icon-level-down:before{content:"\f149"}.icon-check-sign:before{content:"\f14a"}.icon-edit-sign:before{content:"\f14b"}.icon-external-link-sign:before{content:"\f14c"}.icon-share-sign:before{content:"\f14d"}.icon-compass:before{content:"\f14e"}.icon-collapse:before{content:"\f150"}.icon-collapse-top:before{content:"\f151"}.icon-expand:before{content:"\f152"}.icon-euro:before,.icon-eur:before{content:"\f153"}.icon-gbp:before{content:"\f154"}.icon-dollar:before,.icon-usd:before{content:"\f155"}.icon-rupee:before,.icon-inr:before{content:"\f156"}.icon-yen:before,.icon-jpy:before{content:"\f157"}.icon-renminbi:before,.icon-cny:before{content:"\f158"}.icon-won:before,.icon-krw:before{content:"\f159"}.icon-bitcoin:before,.icon-btc:before{content:"\f15a"}.icon-file:before{content:"\f15b"}.icon-file-text:before{content:"\f15c"}.icon-sort-by-alphabet:before{content:"\f15d"}.icon-sort-by-alphabet-alt:before{content:"\f15e"}.icon-sort-by-attributes:before{content:"\f160"}.icon-sort-by-attributes-alt:before{content:"\f161"}.icon-sort-by-order:before{content:"\f162"}.icon-sort-by-order-alt:before{content:"\f163"}.icon-thumbs-up:before{content:"\f164"}.icon-thumbs-down:before{content:"\f165"}.icon-youtube-sign:before{content:"\f166"}.icon-youtube:before{content:"\f167"}.icon-xing:before{content:"\f168"}.icon-xing-sign:before{content:"\f169"}.icon-youtube-play:before{content:"\f16a"}.icon-dropbox:before{content:"\f16b"}.icon-stackexchange:before{content:"\f16c"}.icon-instagram:before{content:"\f16d"}.icon-flickr:before{content:"\f16e"}.icon-adn:before{content:"\f170"}.icon-bitbucket:before{content:"\f171"}.icon-bitbucket-sign:before{content:"\f172"}.icon-tumblr:before{content:"\f173"}.icon-tumblr-sign:before{content:"\f174"}.icon-long-arrow-down:before{content:"\f175"}.icon-long-arrow-up:before{content:"\f176"}.icon-long-arrow-left:before{content:"\f177"}.icon-long-arrow-right:before{content:"\f178"}.icon-apple:before{content:"\f179"}.icon-windows:before{content:"\f17a"}.icon-android:before{content:"\f17b"}.icon-linux:before{content:"\f17c"}.icon-dribbble:before{content:"\f17d"}.icon-skype:before{content:"\f17e"}.icon-foursquare:before{content:"\f180"}.icon-trello:before{content:"\f181"}.icon-female:before{content:"\f182"}.icon-male:before{content:"\f183"}.icon-gittip:before{content:"\f184"}.icon-sun:before{content:"\f185"}.icon-moon:before{content:"\f186"}.icon-archive:before{content:"\f187"}.icon-bug:before{content:"\f188"}.icon-vk:before{content:"\f189"}.icon-weibo:before{content:"\f18a"}.icon-renren:before{content:"\f18b"}#postbox-container-1 h3.version{font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;background:0 0;margin-bottom:10px;border-bottom:0 none;padding:7px 0;-webkit-box-shadow:0 0 0 #fff;-moz-box-shadow:0 0 0 #fff;box-shadow:0 0 0 #fff}#postbox-container-1 ul li i{font-size:1.2em;margin-right:10px}.log{margin:40px 0}.log code{font-size:1.2em;line-height:1.2em}.loader{margin-top:20px}.rate-box h4{font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;font-weight:400;font-size:1.2em}.rate-box i{color:#fcd237;text-shadow:0 0 1px #c59e43;font-size:1.9em;margin-bottom:10px;display:inline-block}.rate-box a{font-size:.8em;text-decoration:none;font-style:normal}.rss_pi-table{margin-bottom:20px}.rss_pi-table tbody tr.edit-row{display:none}.rss_pi-table tbody tr.edit-row.show{display:table-row}.rss_pi-table tbody tr.edit-row>td{padding:0;border-top:0 none}.rss_pi-table tbody tr.edit-row table{border:0 none;margin:0}.rss_pi-table tbody tr.edit-row table tr td{border:0 none;border-top:1px solid #F0F0F0;background:#fff}.rss_pi-table tbody tr.edit-row table tr td:first-child{background:#F9F9F9;border-right:1px solid #E1E1E1;width:440px}.rss_pi-table tbody tr.edit-row table tr td label{font-weight:700}.rss_pi-table tbody tr.edit-row table tr td p.description{color:#9f9f9f;font-size:.8em;line-height:2em;font-style:normal}.rss_pi-table tbody tr.edit-row table tr td input,.rss_pi-table tbody tr.edit-row table tr td textarea{padding:8px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%}.rss_pi-table tbody tr.edit-row table tr td .radiolist li label{font-weight:400;display:inline-block}.rss_pi-table tbody tr.edit-row table tr td .radiolist li label input{display:inline-block;width:auto;margin-right:10px}.rss_pi-table tbody tr.data-row.show td{background:#2a95c5;background:-webkit-gradient(linear,left bottom,left top,color-stop(0,#185571),color-stop(1,#2a95c5));background:-ms-linear-gradient(bottom,#185571,#2a95c5);background:-moz-linear-gradient(center bottom,#185571 0,#2a95c5 100%);background:-o-linear-gradient(#2a95c5,#185571);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#2a95c5', endColorstr='#185571', GradientType=0);border-top:1px solid #2a95c5;color:#fff;text-shadow:0 1px 1px rgba(0,0,0,.5)}.rss_pi-table tbody tr.data-row.show td a{color:#fff;text-shadow:0 1px 1px rgba(0,0,0,.5)}.rss_pi-table tbody tr td{border-bottom:1px solid #E1E1E1;padding:10px}.rss_pi-table tbody tr td .row-options{visibility:hidden}.rss_pi-table tbody tr td:hover .row-options{visibility:visible}.rss_pi-table tfoot tr td{padding:10px;text-align:right}.rss_pi-table code{display:block;float:left;clear:both;margin:5px 0;padding:5px 10px;}
|
22 |
* Email: dave@fontawesome.io
|
23 |
* Twitter: http://twitter.com/davegandy
|
24 |
* Work: Lead Product Designer @ Kyruus - http://kyruus.com
|
25 |
+
*/@font-face{font-family:FontAwesome;src:url(../font/fontawesome-webfont.eot?v=3.2.1);src:url(../font/fontawesome-webfont.eot?#iefix&v=3.2.1) format('embedded-opentype'),url(../font/fontawesome-webfont.woff?v=3.2.1) format('woff'),url(../font/fontawesome-webfont.ttf?v=3.2.1) format('truetype'),url(../font/fontawesome-webfont.svg#fontawesomeregular?v=3.2.1) format('svg');font-weight:400;font-style:normal}[class^=icon-],[class*=" icon-"]{font-family:FontAwesome;font-weight:400;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;}[class^=icon-]:before,[class*=" icon-"]:before{text-decoration:inherit;display:inline-block;speak:none}.icon-large:before{vertical-align:-10%;font-size:1.33333333em}a [class^=icon-],a [class*=" icon-"]{display:inline}[class^=icon-].icon-fixed-width,[class*=" icon-"].icon-fixed-width{display:inline-block;width:1.14285714em;text-align:right;padding-right:.28571429em}[class^=icon-].icon-fixed-width.icon-large,[class*=" icon-"].icon-fixed-width.icon-large{width:1.42857143em}.icons-ul{margin-left:2.14285714em;list-style-type:none}.icons-ul>li{position:relative}.icons-ul .icon-li{position:absolute;left:-2.14285714em;width:2.14285714em;text-align:center;line-height:inherit}[class^=icon-].hide,[class*=" icon-"].hide{display:none}.icon-muted{color:#eee}.icon-light{color:#fff}.icon-dark{color:#333}.icon-border{border:solid 1px #eee;padding:.2em .25em .15em;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.icon-2x{font-size:2em}.icon-2x.icon-border{border-width:2px;-webkit-border-top-right-radius:4px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.icon-3x{font-size:3em}.icon-3x.icon-border{border-width:3px;-webkit-border-top-right-radius:5px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:5px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:5px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.icon-4x{font-size:4em}.icon-4x.icon-border{border-width:4px;-webkit-border-top-right-radius:6px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:6px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.icon-5x{font-size:5em}.icon-5x.icon-border{border-width:5px;-webkit-border-top-right-radius:7px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:7px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:7px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.pull-right{float:right}.pull-left{float:left}[class^=icon-].pull-left,[class*=" icon-"].pull-left{margin-right:.3em}[class^=icon-].pull-right,[class*=" icon-"].pull-right{margin-left:.3em}.icon-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:-35%}.icon-stack [class^=icon-],.icon-stack [class*=" icon-"]{display:block;text-align:center;position:absolute;width:100%;height:100%;font-size:1em;line-height:inherit;}.icon-stack .icon-stack-base{font-size:2em;}.icon-spin{display:inline-block;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear}a .icon-stack,a .icon-spin{display:inline-block;text-decoration:none}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.icon-rotate-90:before{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1)}.icon-rotate-180:before{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2)}.icon-rotate-270:before{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3)}.icon-flip-horizontal:before{-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.icon-flip-vertical:before{-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}a .icon-rotate-90:before,a .icon-rotate-180:before,a .icon-rotate-270:before,a .icon-flip-horizontal:before,a .icon-flip-vertical:before{display:inline-block}.icon-glass:before{content:"\f000"}.icon-music:before{content:"\f001"}.icon-search:before{content:"\f002"}.icon-envelope-alt:before{content:"\f003"}.icon-heart:before{content:"\f004"}.icon-star:before{content:"\f005"}.icon-star-empty:before{content:"\f006"}.icon-user:before{content:"\f007"}.icon-film:before{content:"\f008"}.icon-th-large:before{content:"\f009"}.icon-th:before{content:"\f00a"}.icon-th-list:before{content:"\f00b"}.icon-ok:before{content:"\f00c"}.icon-remove:before{content:"\f00d"}.icon-zoom-in:before{content:"\f00e"}.icon-zoom-out:before{content:"\f010"}.icon-power-off:before,.icon-off:before{content:"\f011"}.icon-signal:before{content:"\f012"}.icon-gear:before,.icon-cog:before{content:"\f013"}.icon-trash:before{content:"\f014"}.icon-home:before{content:"\f015"}.icon-file-alt:before{content:"\f016"}.icon-time:before{content:"\f017"}.icon-road:before{content:"\f018"}.icon-download-alt:before{content:"\f019"}.icon-download:before{content:"\f01a"}.icon-upload:before{content:"\f01b"}.icon-inbox:before{content:"\f01c"}.icon-play-circle:before{content:"\f01d"}.icon-rotate-right:before,.icon-repeat:before{content:"\f01e"}.icon-refresh:before{content:"\f021"}.icon-list-alt:before{content:"\f022"}.icon-lock:before{content:"\f023"}.icon-flag:before{content:"\f024"}.icon-headphones:before{content:"\f025"}.icon-volume-off:before{content:"\f026"}.icon-volume-down:before{content:"\f027"}.icon-volume-up:before{content:"\f028"}.icon-qrcode:before{content:"\f029"}.icon-barcode:before{content:"\f02a"}.icon-tag:before{content:"\f02b"}.icon-tags:before{content:"\f02c"}.icon-book:before{content:"\f02d"}.icon-bookmark:before{content:"\f02e"}.icon-print:before{content:"\f02f"}.icon-camera:before{content:"\f030"}.icon-font:before{content:"\f031"}.icon-bold:before{content:"\f032"}.icon-italic:before{content:"\f033"}.icon-text-height:before{content:"\f034"}.icon-text-width:before{content:"\f035"}.icon-align-left:before{content:"\f036"}.icon-align-center:before{content:"\f037"}.icon-align-right:before{content:"\f038"}.icon-align-justify:before{content:"\f039"}.icon-list:before{content:"\f03a"}.icon-indent-left:before{content:"\f03b"}.icon-indent-right:before{content:"\f03c"}.icon-facetime-video:before{content:"\f03d"}.icon-picture:before{content:"\f03e"}.icon-pencil:before{content:"\f040"}.icon-map-marker:before{content:"\f041"}.icon-adjust:before{content:"\f042"}.icon-tint:before{content:"\f043"}.icon-edit:before{content:"\f044"}.icon-share:before{content:"\f045"}.icon-check:before{content:"\f046"}.icon-move:before{content:"\f047"}.icon-step-backward:before{content:"\f048"}.icon-fast-backward:before{content:"\f049"}.icon-backward:before{content:"\f04a"}.icon-play:before{content:"\f04b"}.icon-pause:before{content:"\f04c"}.icon-stop:before{content:"\f04d"}.icon-forward:before{content:"\f04e"}.icon-fast-forward:before{content:"\f050"}.icon-step-forward:before{content:"\f051"}.icon-eject:before{content:"\f052"}.icon-chevron-left:before{content:"\f053"}.icon-chevron-right:before{content:"\f054"}.icon-plus-sign:before{content:"\f055"}.icon-minus-sign:before{content:"\f056"}.icon-remove-sign:before{content:"\f057"}.icon-ok-sign:before{content:"\f058"}.icon-question-sign:before{content:"\f059"}.icon-info-sign:before{content:"\f05a"}.icon-screenshot:before{content:"\f05b"}.icon-remove-circle:before{content:"\f05c"}.icon-ok-circle:before{content:"\f05d"}.icon-ban-circle:before{content:"\f05e"}.icon-arrow-left:before{content:"\f060"}.icon-arrow-right:before{content:"\f061"}.icon-arrow-up:before{content:"\f062"}.icon-arrow-down:before{content:"\f063"}.icon-mail-forward:before,.icon-share-alt:before{content:"\f064"}.icon-resize-full:before{content:"\f065"}.icon-resize-small:before{content:"\f066"}.icon-plus:before{content:"\f067"}.icon-minus:before{content:"\f068"}.icon-asterisk:before{content:"\f069"}.icon-exclamation-sign:before{content:"\f06a"}.icon-gift:before{content:"\f06b"}.icon-leaf:before{content:"\f06c"}.icon-fire:before{content:"\f06d"}.icon-eye-open:before{content:"\f06e"}.icon-eye-close:before{content:"\f070"}.icon-warning-sign:before{content:"\f071"}.icon-plane:before{content:"\f072"}.icon-calendar:before{content:"\f073"}.icon-random:before{content:"\f074"}.icon-comment:before{content:"\f075"}.icon-magnet:before{content:"\f076"}.icon-chevron-up:before{content:"\f077"}.icon-chevron-down:before{content:"\f078"}.icon-retweet:before{content:"\f079"}.icon-shopping-cart:before{content:"\f07a"}.icon-folder-close:before{content:"\f07b"}.icon-folder-open:before{content:"\f07c"}.icon-resize-vertical:before{content:"\f07d"}.icon-resize-horizontal:before{content:"\f07e"}.icon-bar-chart:before{content:"\f080"}.icon-twitter-sign:before{content:"\f081"}.icon-facebook-sign:before{content:"\f082"}.icon-camera-retro:before{content:"\f083"}.icon-key:before{content:"\f084"}.icon-gears:before,.icon-cogs:before{content:"\f085"}.icon-comments:before{content:"\f086"}.icon-thumbs-up-alt:before{content:"\f087"}.icon-thumbs-down-alt:before{content:"\f088"}.icon-star-half:before{content:"\f089"}.icon-heart-empty:before{content:"\f08a"}.icon-signout:before{content:"\f08b"}.icon-linkedin-sign:before{content:"\f08c"}.icon-pushpin:before{content:"\f08d"}.icon-external-link:before{content:"\f08e"}.icon-signin:before{content:"\f090"}.icon-trophy:before{content:"\f091"}.icon-github-sign:before{content:"\f092"}.icon-upload-alt:before{content:"\f093"}.icon-lemon:before{content:"\f094"}.icon-phone:before{content:"\f095"}.icon-unchecked:before,.icon-check-empty:before{content:"\f096"}.icon-bookmark-empty:before{content:"\f097"}.icon-phone-sign:before{content:"\f098"}.icon-twitter:before{content:"\f099"}.icon-facebook:before{content:"\f09a"}.icon-github:before{content:"\f09b"}.icon-unlock:before{content:"\f09c"}.icon-credit-card:before{content:"\f09d"}.icon-rss:before{content:"\f09e"}.icon-hdd:before{content:"\f0a0"}.icon-bullhorn:before{content:"\f0a1"}.icon-bell:before{content:"\f0a2"}.icon-certificate:before{content:"\f0a3"}.icon-hand-right:before{content:"\f0a4"}.icon-hand-left:before{content:"\f0a5"}.icon-hand-up:before{content:"\f0a6"}.icon-hand-down:before{content:"\f0a7"}.icon-circle-arrow-left:before{content:"\f0a8"}.icon-circle-arrow-right:before{content:"\f0a9"}.icon-circle-arrow-up:before{content:"\f0aa"}.icon-circle-arrow-down:before{content:"\f0ab"}.icon-globe:before{content:"\f0ac"}.icon-wrench:before{content:"\f0ad"}.icon-tasks:before{content:"\f0ae"}.icon-filter:before{content:"\f0b0"}.icon-briefcase:before{content:"\f0b1"}.icon-fullscreen:before{content:"\f0b2"}.icon-group:before{content:"\f0c0"}.icon-link:before{content:"\f0c1"}.icon-cloud:before{content:"\f0c2"}.icon-beaker:before{content:"\f0c3"}.icon-cut:before{content:"\f0c4"}.icon-copy:before{content:"\f0c5"}.icon-paperclip:before,.icon-paper-clip:before{content:"\f0c6"}.icon-save:before{content:"\f0c7"}.icon-sign-blank:before{content:"\f0c8"}.icon-reorder:before{content:"\f0c9"}.icon-list-ul:before{content:"\f0ca"}.icon-list-ol:before{content:"\f0cb"}.icon-strikethrough:before{content:"\f0cc"}.icon-underline:before{content:"\f0cd"}.icon-table:before{content:"\f0ce"}.icon-magic:before{content:"\f0d0"}.icon-truck:before{content:"\f0d1"}.icon-pinterest:before{content:"\f0d2"}.icon-pinterest-sign:before{content:"\f0d3"}.icon-google-plus-sign:before{content:"\f0d4"}.icon-google-plus:before{content:"\f0d5"}.icon-money:before{content:"\f0d6"}.icon-caret-down:before{content:"\f0d7"}.icon-caret-up:before{content:"\f0d8"}.icon-caret-left:before{content:"\f0d9"}.icon-caret-right:before{content:"\f0da"}.icon-columns:before{content:"\f0db"}.icon-sort:before{content:"\f0dc"}.icon-sort-down:before{content:"\f0dd"}.icon-sort-up:before{content:"\f0de"}.icon-envelope:before{content:"\f0e0"}.icon-linkedin:before{content:"\f0e1"}.icon-rotate-left:before,.icon-undo:before{content:"\f0e2"}.icon-legal:before{content:"\f0e3"}.icon-dashboard:before{content:"\f0e4"}.icon-comment-alt:before{content:"\f0e5"}.icon-comments-alt:before{content:"\f0e6"}.icon-bolt:before{content:"\f0e7"}.icon-sitemap:before{content:"\f0e8"}.icon-umbrella:before{content:"\f0e9"}.icon-paste:before{content:"\f0ea"}.icon-lightbulb:before{content:"\f0eb"}.icon-exchange:before{content:"\f0ec"}.icon-cloud-download:before{content:"\f0ed"}.icon-cloud-upload:before{content:"\f0ee"}.icon-user-md:before{content:"\f0f0"}.icon-stethoscope:before{content:"\f0f1"}.icon-suitcase:before{content:"\f0f2"}.icon-bell-alt:before{content:"\f0f3"}.icon-coffee:before{content:"\f0f4"}.icon-food:before{content:"\f0f5"}.icon-file-text-alt:before{content:"\f0f6"}.icon-building:before{content:"\f0f7"}.icon-hospital:before{content:"\f0f8"}.icon-ambulance:before{content:"\f0f9"}.icon-medkit:before{content:"\f0fa"}.icon-fighter-jet:before{content:"\f0fb"}.icon-beer:before{content:"\f0fc"}.icon-h-sign:before{content:"\f0fd"}.icon-plus-sign-alt:before{content:"\f0fe"}.icon-double-angle-left:before{content:"\f100"}.icon-double-angle-right:before{content:"\f101"}.icon-double-angle-up:before{content:"\f102"}.icon-double-angle-down:before{content:"\f103"}.icon-angle-left:before{content:"\f104"}.icon-angle-right:before{content:"\f105"}.icon-angle-up:before{content:"\f106"}.icon-angle-down:before{content:"\f107"}.icon-desktop:before{content:"\f108"}.icon-laptop:before{content:"\f109"}.icon-tablet:before{content:"\f10a"}.icon-mobile-phone:before{content:"\f10b"}.icon-circle-blank:before{content:"\f10c"}.icon-quote-left:before{content:"\f10d"}.icon-quote-right:before{content:"\f10e"}.icon-spinner:before{content:"\f110"}.icon-circle:before{content:"\f111"}.icon-mail-reply:before,.icon-reply:before{content:"\f112"}.icon-github-alt:before{content:"\f113"}.icon-folder-close-alt:before{content:"\f114"}.icon-folder-open-alt:before{content:"\f115"}.icon-expand-alt:before{content:"\f116"}.icon-collapse-alt:before{content:"\f117"}.icon-smile:before{content:"\f118"}.icon-frown:before{content:"\f119"}.icon-meh:before{content:"\f11a"}.icon-gamepad:before{content:"\f11b"}.icon-keyboard:before{content:"\f11c"}.icon-flag-alt:before{content:"\f11d"}.icon-flag-checkered:before{content:"\f11e"}.icon-terminal:before{content:"\f120"}.icon-code:before{content:"\f121"}.icon-reply-all:before{content:"\f122"}.icon-mail-reply-all:before{content:"\f122"}.icon-star-half-full:before,.icon-star-half-empty:before{content:"\f123"}.icon-location-arrow:before{content:"\f124"}.icon-crop:before{content:"\f125"}.icon-code-fork:before{content:"\f126"}.icon-unlink:before{content:"\f127"}.icon-question:before{content:"\f128"}.icon-info:before{content:"\f129"}.icon-exclamation:before{content:"\f12a"}.icon-superscript:before{content:"\f12b"}.icon-subscript:before{content:"\f12c"}.icon-eraser:before{content:"\f12d"}.icon-puzzle-piece:before{content:"\f12e"}.icon-microphone:before{content:"\f130"}.icon-microphone-off:before{content:"\f131"}.icon-shield:before{content:"\f132"}.icon-calendar-empty:before{content:"\f133"}.icon-fire-extinguisher:before{content:"\f134"}.icon-rocket:before{content:"\f135"}.icon-maxcdn:before{content:"\f136"}.icon-chevron-sign-left:before{content:"\f137"}.icon-chevron-sign-right:before{content:"\f138"}.icon-chevron-sign-up:before{content:"\f139"}.icon-chevron-sign-down:before{content:"\f13a"}.icon-html5:before{content:"\f13b"}.icon-css3:before{content:"\f13c"}.icon-anchor:before{content:"\f13d"}.icon-unlock-alt:before{content:"\f13e"}.icon-bullseye:before{content:"\f140"}.icon-ellipsis-horizontal:before{content:"\f141"}.icon-ellipsis-vertical:before{content:"\f142"}.icon-rss-sign:before{content:"\f143"}.icon-play-sign:before{content:"\f144"}.icon-ticket:before{content:"\f145"}.icon-minus-sign-alt:before{content:"\f146"}.icon-check-minus:before{content:"\f147"}.icon-level-up:before{content:"\f148"}.icon-level-down:before{content:"\f149"}.icon-check-sign:before{content:"\f14a"}.icon-edit-sign:before{content:"\f14b"}.icon-external-link-sign:before{content:"\f14c"}.icon-share-sign:before{content:"\f14d"}.icon-compass:before{content:"\f14e"}.icon-collapse:before{content:"\f150"}.icon-collapse-top:before{content:"\f151"}.icon-expand:before{content:"\f152"}.icon-euro:before,.icon-eur:before{content:"\f153"}.icon-gbp:before{content:"\f154"}.icon-dollar:before,.icon-usd:before{content:"\f155"}.icon-rupee:before,.icon-inr:before{content:"\f156"}.icon-yen:before,.icon-jpy:before{content:"\f157"}.icon-renminbi:before,.icon-cny:before{content:"\f158"}.icon-won:before,.icon-krw:before{content:"\f159"}.icon-bitcoin:before,.icon-btc:before{content:"\f15a"}.icon-file:before{content:"\f15b"}.icon-file-text:before{content:"\f15c"}.icon-sort-by-alphabet:before{content:"\f15d"}.icon-sort-by-alphabet-alt:before{content:"\f15e"}.icon-sort-by-attributes:before{content:"\f160"}.icon-sort-by-attributes-alt:before{content:"\f161"}.icon-sort-by-order:before{content:"\f162"}.icon-sort-by-order-alt:before{content:"\f163"}.icon-thumbs-up:before{content:"\f164"}.icon-thumbs-down:before{content:"\f165"}.icon-youtube-sign:before{content:"\f166"}.icon-youtube:before{content:"\f167"}.icon-xing:before{content:"\f168"}.icon-xing-sign:before{content:"\f169"}.icon-youtube-play:before{content:"\f16a"}.icon-dropbox:before{content:"\f16b"}.icon-stackexchange:before{content:"\f16c"}.icon-instagram:before{content:"\f16d"}.icon-flickr:before{content:"\f16e"}.icon-adn:before{content:"\f170"}.icon-bitbucket:before{content:"\f171"}.icon-bitbucket-sign:before{content:"\f172"}.icon-tumblr:before{content:"\f173"}.icon-tumblr-sign:before{content:"\f174"}.icon-long-arrow-down:before{content:"\f175"}.icon-long-arrow-up:before{content:"\f176"}.icon-long-arrow-left:before{content:"\f177"}.icon-long-arrow-right:before{content:"\f178"}.icon-apple:before{content:"\f179"}.icon-windows:before{content:"\f17a"}.icon-android:before{content:"\f17b"}.icon-linux:before{content:"\f17c"}.icon-dribbble:before{content:"\f17d"}.icon-skype:before{content:"\f17e"}.icon-foursquare:before{content:"\f180"}.icon-trello:before{content:"\f181"}.icon-female:before{content:"\f182"}.icon-male:before{content:"\f183"}.icon-gittip:before{content:"\f184"}.icon-sun:before{content:"\f185"}.icon-moon:before{content:"\f186"}.icon-archive:before{content:"\f187"}.icon-bug:before{content:"\f188"}.icon-vk:before{content:"\f189"}.icon-weibo:before{content:"\f18a"}.icon-renren:before{content:"\f18b"}#postbox-container-1 h3.version{font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;background:0 0;margin-bottom:10px;border-bottom:0 none;padding:7px 0;-webkit-box-shadow:0 0 0 #fff;-moz-box-shadow:0 0 0 #fff;box-shadow:0 0 0 #fff}#postbox-container-1 ul li i{font-size:1.2em;margin-right:10px}.log{margin:40px 0}.log code{font-size:1.2em;line-height:1.2em}.loader{margin-top:20px}.rate-box h4{font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;font-weight:400;font-size:1.2em}.rate-box i{color:#fcd237;text-shadow:0 0 1px #c59e43;font-size:1.9em;margin-bottom:10px;display:inline-block}.rate-box a{font-size:.8em;text-decoration:none;font-style:normal}.rss_pi-table{margin-bottom:20px}.rss_pi-table tbody tr.edit-row{display:none}.rss_pi-table tbody tr.edit-row.show{display:table-row}.rss_pi-table tbody tr.edit-row>td{padding:0;border-top:0 none}.rss_pi-table tbody tr.edit-row table{border:0 none;margin:0}.rss_pi-table tbody tr.edit-row table tr td{border:0 none;border-top:1px solid #F0F0F0;background:#fff}.rss_pi-table tbody tr.edit-row table tr td:first-child{background:#F9F9F9;border-right:1px solid #E1E1E1;width:440px}.rss_pi-table tbody tr.edit-row table tr td label{font-weight:700}.rss_pi-table tbody tr.edit-row table tr td p.description{color:#9f9f9f;font-size:.8em;line-height:2em;font-style:normal}.rss_pi-table tbody tr.edit-row table tr td input,.rss_pi-table tbody tr.edit-row table tr td textarea{padding:8px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%}.rss_pi-table tbody tr.edit-row table tr td .radiolist li label{font-weight:400;display:inline-block}.rss_pi-table tbody tr.edit-row table tr td .radiolist li label input{display:inline-block;width:auto;margin-right:10px}.rss_pi-table tbody tr.data-row.show td{background:#2a95c5;background:-webkit-gradient(linear,left bottom,left top,color-stop(0,#185571),color-stop(1,#2a95c5));background:-ms-linear-gradient(bottom,#185571,#2a95c5);background:-moz-linear-gradient(center bottom,#185571 0,#2a95c5 100%);background:-o-linear-gradient(#2a95c5,#185571);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#2a95c5', endColorstr='#185571', GradientType=0);border-top:1px solid #2a95c5;color:#fff;text-shadow:0 1px 1px rgba(0,0,0,.5)}.rss_pi-table tbody tr.data-row.show td a{color:#fff;text-shadow:0 1px 1px rgba(0,0,0,.5)}.rss_pi-table tbody tr td{border-bottom:1px solid #E1E1E1;padding:10px}.rss_pi-table tbody tr td .row-options{visibility:hidden}.rss_pi-table tbody tr:hover .row-options{visibility:visible}.rss_pi-table tfoot tr td{padding:10px;text-align:right}.rss_pi-table code{display: block;float: left;clear: both;padding: 3px 5px;font-size: 0.9em;background: none;border: 1px #eaeaea solid;}a.delete-row {color: #a00;}a.delete-row:hover{color: red;}.rss-pi-error{margin: 5px 0 15px;border-left: 4px solid #dd3d36;background: #fff;box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);padding: 1px 12px;}
|
{font → app/assets/font}/FontAwesome.otf
RENAMED
File without changes
|
{font → app/assets/font}/fontawesome-webfont.eot
RENAMED
File without changes
|
{font → app/assets/font}/fontawesome-webfont.svg
RENAMED
File without changes
|
{font → app/assets/font}/fontawesome-webfont.ttf
RENAMED
File without changes
|
{font → app/assets/font}/fontawesome-webfont.woff
RENAMED
File without changes
|
app/assets/img/rss-post-importer_280x600.jpg
ADDED
Binary file
|
app/assets/js/main.js
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery('document').ready(function(){
|
2 |
+
|
3 |
+
// Edit-buttons
|
4 |
+
jQuery('body').on('click', 'a.toggle-edit', function() {
|
5 |
+
jQuery('#edit_' + jQuery(this).attr('data-target')).toggleClass('show');
|
6 |
+
jQuery('#display_' + jQuery(this).attr('data-target')).toggleClass('show');
|
7 |
+
return false;
|
8 |
+
});
|
9 |
+
|
10 |
+
// Delete-buttons
|
11 |
+
jQuery('body').on( 'click', 'a.delete-row', function() {
|
12 |
+
jQuery('#edit_' + jQuery(this).attr('data-target')).remove();
|
13 |
+
jQuery('#display_' + jQuery(this).attr('data-target')).remove();
|
14 |
+
update_ids();
|
15 |
+
return false;
|
16 |
+
});
|
17 |
+
|
18 |
+
|
19 |
+
jQuery('a.add-row').on('click', function() {
|
20 |
+
jQuery.ajax({
|
21 |
+
type: 'POST',
|
22 |
+
url: rss_pi.ajaxurl,
|
23 |
+
data: ({
|
24 |
+
action: 'rss_pi_add_row'
|
25 |
+
}),
|
26 |
+
success: function(data) {
|
27 |
+
jQuery('.rss-rows').append( data );
|
28 |
+
jQuery('.empty_table').remove();
|
29 |
+
update_ids();
|
30 |
+
}
|
31 |
+
});
|
32 |
+
return false;
|
33 |
+
});
|
34 |
+
|
35 |
+
jQuery('#save_and_import').on('click', function() {
|
36 |
+
jQuery('#save_to_db').val('true');
|
37 |
+
});
|
38 |
+
|
39 |
+
jQuery('a.load-log').on('click', function() {
|
40 |
+
jQuery('#main_ui').hide();
|
41 |
+
jQuery('.ajax_content').html( '<img src="/wp-admin/images/wpspin_light.gif" alt="" class="loader" />' );
|
42 |
+
jQuery.ajax({
|
43 |
+
type: 'POST',
|
44 |
+
url: rss_pi.ajaxurl,
|
45 |
+
data: ({
|
46 |
+
action: 'rss_pi_load_log'
|
47 |
+
}),
|
48 |
+
success: function(data) {
|
49 |
+
jQuery('.ajax_content').html( data );
|
50 |
+
}
|
51 |
+
});
|
52 |
+
return false;
|
53 |
+
});
|
54 |
+
|
55 |
+
jQuery('body').delegate('a.show-main-ui', 'click', function() {
|
56 |
+
jQuery('#main_ui').show();
|
57 |
+
jQuery('.ajax_content').html('');
|
58 |
+
return false;
|
59 |
+
});
|
60 |
+
|
61 |
+
jQuery('body').delegate('a.clear-log', 'click', function() {
|
62 |
+
jQuery.ajax({
|
63 |
+
type: 'POST',
|
64 |
+
url: rss_pi.ajaxurl,
|
65 |
+
data: ({
|
66 |
+
action: 'rss_pi_clear_log'
|
67 |
+
}),
|
68 |
+
success: function(data) {
|
69 |
+
jQuery('.log').html( data );
|
70 |
+
}
|
71 |
+
});
|
72 |
+
return false;
|
73 |
+
});
|
74 |
+
|
75 |
+
});
|
76 |
+
|
77 |
+
function update_ids()
|
78 |
+
{
|
79 |
+
ids = jQuery('input[name="id"]').map(function() {
|
80 |
+
return jQuery(this).val();
|
81 |
+
}).get().join();
|
82 |
+
|
83 |
+
jQuery('#ids').val(ids);
|
84 |
+
}
|
app/class-rss-post-importer.php
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* One class to rule them all
|
4 |
+
*
|
5 |
+
* @author Saurabh Shukla <saurabh@yapapaya.com>
|
6 |
+
*/
|
7 |
+
class rssPostImporter {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* A var to store the options in
|
11 |
+
* @var array
|
12 |
+
*/
|
13 |
+
public $options = array();
|
14 |
+
|
15 |
+
/**
|
16 |
+
* To initialise the admin and cron classes
|
17 |
+
*
|
18 |
+
* @var object
|
19 |
+
*/
|
20 |
+
private $admin, $cron;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Start
|
24 |
+
*/
|
25 |
+
function __construct() {
|
26 |
+
|
27 |
+
// populate the options first
|
28 |
+
$this->load_options();
|
29 |
+
|
30 |
+
// hook translations
|
31 |
+
add_action('plugins_loaded', array($this, 'localize'));
|
32 |
+
|
33 |
+
add_filter( 'plugin_action_links_' . RSS_PI_BASENAME, array($this, 'settings_link') );
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Load options from the db
|
38 |
+
*/
|
39 |
+
public function load_options() {
|
40 |
+
|
41 |
+
$default_settings = array(
|
42 |
+
'enable_logging' => false,
|
43 |
+
'feeds_api_key' => false,
|
44 |
+
'frequency' => 0,
|
45 |
+
'post_template' => "{\$content}\nSource: {\$feed_title}",
|
46 |
+
'post_status' => 'publish',
|
47 |
+
'author_id' => 1,
|
48 |
+
'allow_comments' => true,
|
49 |
+
'keywords' => array()
|
50 |
+
);
|
51 |
+
|
52 |
+
$options = get_option('rss_pi_feeds', array());
|
53 |
+
|
54 |
+
if (!isset($options['settings'])) {
|
55 |
+
$options['settings'] = array();
|
56 |
+
}
|
57 |
+
|
58 |
+
$options['settings'] = wp_parse_args($options['settings'], $default_settings);
|
59 |
+
|
60 |
+
if (!array_key_exists('imports', $options)) {
|
61 |
+
$options['imports'] = 0;
|
62 |
+
}
|
63 |
+
|
64 |
+
$this->options = $options;
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Load translations
|
69 |
+
*/
|
70 |
+
public function localize() {
|
71 |
+
|
72 |
+
load_plugin_textdomain('rss_pi', false, RSS_PI_PATH . 'app/lang/');
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Initialise
|
77 |
+
*/
|
78 |
+
public function init() {
|
79 |
+
|
80 |
+
// initialise admin and cron
|
81 |
+
$this->cron = new rssPICron();
|
82 |
+
|
83 |
+
$this->admin = new rssPIAdmin();
|
84 |
+
$this->admin->init();
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Check if a given API key is valid
|
89 |
+
*
|
90 |
+
* @param string $key
|
91 |
+
* @return boolean
|
92 |
+
*/
|
93 |
+
public function is_valid_key($key) {
|
94 |
+
|
95 |
+
if (empty($key)) {
|
96 |
+
return false;
|
97 |
+
}
|
98 |
+
|
99 |
+
$url = "http://www.feedsapi.org/fetch.php?key=$key&url=http://dummyurl.com";
|
100 |
+
$content = file_get_contents($url);
|
101 |
+
|
102 |
+
if (trim($content) == "A valid key must be supplied") {
|
103 |
+
return false;
|
104 |
+
}
|
105 |
+
|
106 |
+
return true;
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Adds a settings link
|
111 |
+
*
|
112 |
+
* @param array $links EXisting links
|
113 |
+
* @return type
|
114 |
+
*/
|
115 |
+
public function settings_link($links) {
|
116 |
+
$settings_link = array(
|
117 |
+
'<a href="' . admin_url('options-general.php?page=rss_pi') . '">Settings</a>',
|
118 |
+
);
|
119 |
+
return array_merge($settings_link, $links);
|
120 |
+
}
|
121 |
+
|
122 |
+
}
|
app/classes/admin/class-rss-pi-admin-processor.php
ADDED
@@ -0,0 +1,213 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Processes the admin screen form submissions
|
5 |
+
*
|
6 |
+
* @author Saurabh Shukla <saurabh@yapapaya.com>
|
7 |
+
*/
|
8 |
+
class rssPIAdminProcessor {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* If we have a valid api key
|
12 |
+
*
|
13 |
+
* @var boolean
|
14 |
+
*/
|
15 |
+
var $is_key_valid;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Process the form result
|
19 |
+
*
|
20 |
+
* @return null
|
21 |
+
*/
|
22 |
+
function process() {
|
23 |
+
|
24 |
+
// if there's nothing for processing or invalid data, bail
|
25 |
+
if (!isset($_POST['info_update']) || !wp_verify_nonce($_POST['rss_pi_nonce'], 'settings_page')) {
|
26 |
+
return;
|
27 |
+
}
|
28 |
+
|
29 |
+
// Get ids of feed-rows
|
30 |
+
$ids = explode(",", $_POST['ids']);
|
31 |
+
|
32 |
+
// formulate the settings array
|
33 |
+
$settings = $this->process_settings();
|
34 |
+
|
35 |
+
// update cron settings
|
36 |
+
$this->update_cron($settings['frequency']);
|
37 |
+
|
38 |
+
// formulate the feeds array
|
39 |
+
$feeds = $this->process_feeds($ids);
|
40 |
+
|
41 |
+
// save and reload the options
|
42 |
+
$this->save_reload_options($settings, $feeds);
|
43 |
+
|
44 |
+
// display a success message
|
45 |
+
?>
|
46 |
+
<div id="message" class="updated">
|
47 |
+
<p><strong><?php _e('Settings saved.', 'rss_pi') ?></strong></p>
|
48 |
+
</div>
|
49 |
+
<?php
|
50 |
+
// check if we need to and import feeds
|
51 |
+
$this->import();
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Process submitted data to formulate settings array
|
56 |
+
*
|
57 |
+
* @global object $rss_post_importer
|
58 |
+
* @return array
|
59 |
+
*/
|
60 |
+
private function process_settings() {
|
61 |
+
|
62 |
+
// Get selected settings for all imported posts
|
63 |
+
$settings = array(
|
64 |
+
'frequency' => $_POST['frequency'],
|
65 |
+
'feeds_api_key' => $_POST['feeds_api_key'],
|
66 |
+
'post_template' => stripslashes_deep($_POST['post_template']),
|
67 |
+
'post_status' => $_POST['post_status'],
|
68 |
+
'author_id' => $_POST['author_id'],
|
69 |
+
'allow_comments' => $_POST['allow_comments'],
|
70 |
+
'enable_logging' => $_POST['enable_logging'],
|
71 |
+
'keywords' => array()
|
72 |
+
);
|
73 |
+
|
74 |
+
global $rss_post_importer;
|
75 |
+
|
76 |
+
// check if submitted api key is valid
|
77 |
+
$this->is_key_valid = $rss_post_importer->is_valid_key($settings['feeds_api_key']);
|
78 |
+
|
79 |
+
// filter the settings and then send them back for saving
|
80 |
+
return $this->filter($settings);
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Update the frequency of the import cron job
|
85 |
+
*
|
86 |
+
* @param string $frequency
|
87 |
+
*/
|
88 |
+
private function update_cron($frequency) {
|
89 |
+
|
90 |
+
// If cron settings have changed
|
91 |
+
if (wp_get_schedule('rss_pi_cron') != $frequency) {
|
92 |
+
|
93 |
+
// Reset cron
|
94 |
+
wp_clear_scheduled_hook('rss_pi_cron');
|
95 |
+
wp_schedule_event(time(), $frequency, 'rss_pi_cron');
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Forms the feeds array from submitted data
|
101 |
+
*
|
102 |
+
* @param array $ids feeds ids
|
103 |
+
* @return array
|
104 |
+
*/
|
105 |
+
private function process_feeds($ids) {
|
106 |
+
|
107 |
+
$feeds = array();
|
108 |
+
|
109 |
+
foreach ($ids as $id) {
|
110 |
+
if ($id) {
|
111 |
+
array_push($feeds, array(
|
112 |
+
'id' => $id,
|
113 |
+
'url' => strtolower($_POST[$id . '-url']),
|
114 |
+
'name' => $_POST[$id . '-name'],
|
115 |
+
'max_posts' => $_POST[$id . '-max_posts'],
|
116 |
+
// different author ids depending on valid API keys
|
117 |
+
'author_id' => $this->is_key_valid ? $_POST[$id . '-author_id'] : $_POST['author_id'],
|
118 |
+
'category_id' => $_POST[$id . '-category_id'],
|
119 |
+
'strip_html' => $_POST[$id . '-strip_html']
|
120 |
+
));
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
return $feeds;
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Update options and reload global options
|
129 |
+
*
|
130 |
+
* @global type $rss_post_importer
|
131 |
+
* @param array $settings
|
132 |
+
* @param array $feeds
|
133 |
+
*/
|
134 |
+
private function save_reload_options($settings, $feeds) {
|
135 |
+
|
136 |
+
global $rss_post_importer;
|
137 |
+
|
138 |
+
// existing options
|
139 |
+
$options = $rss_post_importer->options;
|
140 |
+
|
141 |
+
// new data
|
142 |
+
$new_options = array(
|
143 |
+
'feeds' => $feeds,
|
144 |
+
'settings' => $settings,
|
145 |
+
'latest_import' => $options['latest_import'],
|
146 |
+
'imports' => $options['imports']
|
147 |
+
);
|
148 |
+
|
149 |
+
// update in db
|
150 |
+
update_option('rss_pi_feeds', $new_options);
|
151 |
+
|
152 |
+
// reload so that the new options are used henceforth
|
153 |
+
$rss_post_importer->load_options();
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Import feeds
|
158 |
+
*
|
159 |
+
* @return null
|
160 |
+
*/
|
161 |
+
private function import() {
|
162 |
+
|
163 |
+
// if we don't need to import anything, bail
|
164 |
+
if ($_POST['save_to_db'] != 'true') {
|
165 |
+
return;
|
166 |
+
}
|
167 |
+
|
168 |
+
// initialise the engine and import
|
169 |
+
$engine = new rssPIEngine();
|
170 |
+
$imported = $engine->import_feed();
|
171 |
+
?>
|
172 |
+
<div id="message" class="updated">
|
173 |
+
<p><strong><?php echo($imported); ?> <?php _e('new posts imported.', 'rss_pi') ?></strong></p>
|
174 |
+
</div>
|
175 |
+
<?php
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Filter settings for API key vs non-API key installs
|
180 |
+
*
|
181 |
+
* @param array $settings
|
182 |
+
* @return array
|
183 |
+
*/
|
184 |
+
private function filter($settings) {
|
185 |
+
|
186 |
+
// if the key is not fine
|
187 |
+
if (!empty($settings['feeds_api_key']) && !$this->is_key_valid) {
|
188 |
+
|
189 |
+
// unset from settings
|
190 |
+
unset($settings['feeds_api_key']);
|
191 |
+
echo '<div class="error">
|
192 |
+
<p>' . __('Invalid API key!', 'rss_api') . '</p>
|
193 |
+
</div>';
|
194 |
+
}
|
195 |
+
|
196 |
+
// if the key is valid
|
197 |
+
if ($this->is_key_valid) {
|
198 |
+
|
199 |
+
// set up keywords (otherwise don't)
|
200 |
+
$keyword_str = $_POST['keyword_filter'];
|
201 |
+
|
202 |
+
$keywords = array();
|
203 |
+
|
204 |
+
if (!empty($keyword_str)) {
|
205 |
+
$keywords = explode(',', $keyword_str);
|
206 |
+
}
|
207 |
+
$settings['keywords'] = $keywords;
|
208 |
+
}
|
209 |
+
|
210 |
+
return $settings;
|
211 |
+
}
|
212 |
+
|
213 |
+
}
|
app/classes/admin/class-rss-pi-admin.php
ADDED
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* The class that handles the admin screen
|
5 |
+
*
|
6 |
+
* @author saurabhshukla
|
7 |
+
*/
|
8 |
+
class rssPIAdmin {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Whether the API key is valid
|
12 |
+
*
|
13 |
+
* @var boolean
|
14 |
+
*/
|
15 |
+
var $is_key_valid;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* The options
|
19 |
+
*
|
20 |
+
* @var array
|
21 |
+
*/
|
22 |
+
var $options;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Aprompt for invalid/absent API keys
|
26 |
+
* @var string
|
27 |
+
*/
|
28 |
+
var $key_prompt;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Start
|
32 |
+
*
|
33 |
+
* @global object $rss_post_importer
|
34 |
+
*/
|
35 |
+
public function __construct() {
|
36 |
+
|
37 |
+
$this->load_options();
|
38 |
+
|
39 |
+
// add a key prompt
|
40 |
+
$this->key_prompt = __('You need a <a href="http://www.feedsapi.com/?utm_source=rsspi-full-rss-key-here" target="_blank">Full Text RSS Key</a> to activate this section, please <a href="http://www.feedsapi.com/?utm_source=rsspi-full-rss-key-here" target="_blank">get one and try it free</a> for the next 14 days to see how it goes.', 'rss_pi');
|
41 |
+
|
42 |
+
// initialise logging
|
43 |
+
$this->log = new rssPILog();
|
44 |
+
$this->log->init();
|
45 |
+
|
46 |
+
// load the form processor
|
47 |
+
$this->processor = new rssPIAdminProcessor();
|
48 |
+
}
|
49 |
+
|
50 |
+
private function load_options(){
|
51 |
+
global $rss_post_importer;
|
52 |
+
|
53 |
+
// add options
|
54 |
+
$this->options = $rss_post_importer->options;
|
55 |
+
|
56 |
+
// check if key is valid
|
57 |
+
$this->is_key_valid = $rss_post_importer->is_valid_key($this->options['settings']['feeds_api_key']);
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Initialise and hook all actions
|
62 |
+
*/
|
63 |
+
public function init() {
|
64 |
+
|
65 |
+
// add to admin menu
|
66 |
+
add_action('admin_menu', array($this, 'admin_menu'));
|
67 |
+
|
68 |
+
// load scripts and styles we need
|
69 |
+
add_action('admin_enqueue_scripts', array($this, 'enqueue'));
|
70 |
+
|
71 |
+
// the ajax for adding new feeds (table rows)
|
72 |
+
add_action('wp_ajax_rss_pi_add_row', array($this, 'add_row'));
|
73 |
+
|
74 |
+
// disable the feed author dropdown for invalid/absent API keys
|
75 |
+
add_filter('wp_dropdown_users', array($this, 'disable_user_dropdown'));
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Add to admin menu
|
80 |
+
*/
|
81 |
+
function admin_menu() {
|
82 |
+
|
83 |
+
add_options_page('Rss Post Importer', 'Rss Post Importer', 'manage_options', 'rss_pi', array($this, 'screen'));
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Enqueue our admin css and js
|
88 |
+
*
|
89 |
+
* @param string $hook The current screens hook
|
90 |
+
* @return null
|
91 |
+
*/
|
92 |
+
public function enqueue($hook) {
|
93 |
+
|
94 |
+
// don't load if it isn't our screen
|
95 |
+
if ($hook != 'settings_page_rss_pi') {
|
96 |
+
return;
|
97 |
+
}
|
98 |
+
|
99 |
+
// register scripts & styles
|
100 |
+
wp_enqueue_script('rss-pi', RSS_PI_URL . 'app/assets/js/main.js', array('jquery'), RSS_PI_VERSION);
|
101 |
+
wp_enqueue_style('rss-pi', RSS_PI_URL . 'app/assets/css/style.css', array(), RSS_PI_VERSION);
|
102 |
+
|
103 |
+
// localise ajaxuel for use
|
104 |
+
$localise_args = array(
|
105 |
+
'ajaxurl' => admin_url('admin-ajax.php')
|
106 |
+
);
|
107 |
+
wp_localize_script('rss-pi', 'rss_pi', $localise_args);
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Display the screen/ui
|
112 |
+
*/
|
113 |
+
function screen() {
|
114 |
+
|
115 |
+
// load the form processor first
|
116 |
+
$this->processor->process();
|
117 |
+
// it'll process any submitted form data
|
118 |
+
|
119 |
+
// reload the options just in case
|
120 |
+
$this->load_options();
|
121 |
+
|
122 |
+
// include the template for the ui
|
123 |
+
include( RSS_PI_PATH . 'app/templates/admin-ui.php');
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Display errors
|
128 |
+
*
|
129 |
+
* @param string $error The error message
|
130 |
+
* @param boolean $inline Whether the error is inline or shown like regular wp errors
|
131 |
+
*/
|
132 |
+
function key_error($error, $inline = false) {
|
133 |
+
|
134 |
+
$class = ($inline) ? 'rss-pi-error' : 'error';
|
135 |
+
|
136 |
+
echo '<div class="' . $class . '"><p>' . $error . '</p></div>';
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Add a new row for a new feed
|
141 |
+
*/
|
142 |
+
function add_row() {
|
143 |
+
|
144 |
+
include( RSS_PI_PATH . 'app/templates/feed-table-row.php');
|
145 |
+
die();
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Disable the user dropdwon for each feed
|
150 |
+
*
|
151 |
+
* @param string $output The html of the select dropdown
|
152 |
+
* @return string
|
153 |
+
*/
|
154 |
+
function disable_user_dropdown($output) {
|
155 |
+
|
156 |
+
// if we have a valid key we don't need to disable anything
|
157 |
+
if ($this->is_key_valid) {
|
158 |
+
return $output;
|
159 |
+
}
|
160 |
+
|
161 |
+
// check if this is the feed dropdown (and not any other)
|
162 |
+
preg_match('/rss-pi-specific-feed-author/i', $output, $matched);
|
163 |
+
|
164 |
+
// this is not our dropdown, no need to disable
|
165 |
+
if (empty($matched)) {
|
166 |
+
return $output;
|
167 |
+
}
|
168 |
+
|
169 |
+
// otherwise just disable the dropdown
|
170 |
+
return str_replace('<select ', '<select disabled="disabled" ', $output);
|
171 |
+
}
|
172 |
+
|
173 |
+
}
|
app/classes/helpers/class-rss-pi-featured-image.php
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Sets a featured image
|
4 |
+
*
|
5 |
+
* @author Saurabh Shukla <saurabh@yapapaya.com>
|
6 |
+
*/
|
7 |
+
class rssPIFeaturedImage {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Sets featured image
|
11 |
+
*
|
12 |
+
* @param object $item Feed item
|
13 |
+
* @param int $post_id Post id
|
14 |
+
* @return boolean
|
15 |
+
*/
|
16 |
+
function _set($item, $post_id) {
|
17 |
+
|
18 |
+
$content = $item->get_content() != "" ? $item->get_content() : $item->get_description();
|
19 |
+
|
20 |
+
// get the first image from content
|
21 |
+
preg_match('/<img.+?src="(.+?)"[^}]+>/i', $content, $matches);
|
22 |
+
$img_url = (is_array($matches) && !empty($matches)) ? $matches[1] : '';
|
23 |
+
|
24 |
+
if (empty($img_url)) {
|
25 |
+
return false;
|
26 |
+
}
|
27 |
+
|
28 |
+
// sideload it
|
29 |
+
$featured_id = $this->_sideload($img_url, $post_id, '');
|
30 |
+
|
31 |
+
add_action('set_rss_pi_featured_image', $featured_id, $post_id);
|
32 |
+
|
33 |
+
// set as featured image
|
34 |
+
return $meta_id = set_post_thumbnail($post_id, $featured_id);
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Modification of default media_sideload_image
|
39 |
+
*
|
40 |
+
* @param type $file
|
41 |
+
* @param type $post_id
|
42 |
+
* @param type $desc
|
43 |
+
* @return type
|
44 |
+
*/
|
45 |
+
private function _sideload($file, $post_id, $desc = null) {
|
46 |
+
$id = 0;
|
47 |
+
|
48 |
+
if (!empty($file)) {
|
49 |
+
// Set variables for storage, fix file filename for query strings.
|
50 |
+
preg_match('/[^\?]+\.(jpe?g|jpe|gif|png)\b/i', $file, $matches);
|
51 |
+
$file_array = array();
|
52 |
+
$file_array['name'] = basename($file);
|
53 |
+
|
54 |
+
// Download file to temp location.
|
55 |
+
$file_array['tmp_name'] = download_url($file);
|
56 |
+
|
57 |
+
// If error storing temporarily, return the error.
|
58 |
+
if (is_wp_error($file_array['tmp_name'])) {
|
59 |
+
return $file_array['tmp_name'];
|
60 |
+
}
|
61 |
+
|
62 |
+
// Do the validation and storage stuff.
|
63 |
+
$id = media_handle_sideload($file_array, $post_id, $desc);
|
64 |
+
|
65 |
+
// If error storing permanently, unlink.
|
66 |
+
if (is_wp_error($id)) {
|
67 |
+
@unlink($file_array['tmp_name']);
|
68 |
+
return $id;
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
return $id;
|
73 |
+
}
|
74 |
+
|
75 |
+
|
76 |
+
}
|
app/classes/helpers/class-rss-pi-log.php
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Manipulates log files
|
5 |
+
*
|
6 |
+
* @author Saurabh Shukla <saurabh@yapapaya.com>
|
7 |
+
*/
|
8 |
+
class rssPILog {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Initialise
|
12 |
+
*/
|
13 |
+
public function init() {
|
14 |
+
|
15 |
+
// hook ajax for loading and clearing log on admin screen
|
16 |
+
add_action('wp_ajax_rss_pi_load_log', array($this, 'load_log'));
|
17 |
+
add_action('wp_ajax_rss_pi_clear_log', array($this, 'clear_log'));
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Loads log contents
|
22 |
+
*/
|
23 |
+
function load_log() {
|
24 |
+
|
25 |
+
// get the log file's contents
|
26 |
+
$log = file_get_contents(RSS_PI_LOG_PATH . 'log.txt');
|
27 |
+
|
28 |
+
// include the template to display it
|
29 |
+
include( RSS_PI_PATH . 'app/templates/log.php');
|
30 |
+
die();
|
31 |
+
}
|
32 |
+
|
33 |
+
function clear_log() {
|
34 |
+
|
35 |
+
// get the log file
|
36 |
+
$log_file = RSS_PI_LOG_PATH . 'log.txt';
|
37 |
+
|
38 |
+
if (!file_exists($log_file)) {
|
39 |
+
die();
|
40 |
+
}
|
41 |
+
|
42 |
+
// empty it
|
43 |
+
file_put_contents($log_file, '');
|
44 |
+
?>
|
45 |
+
<div id="message" class="updated">
|
46 |
+
<p><strong><?php _e('Log has been cleared.', "rss_pi"); ?></strong></p>
|
47 |
+
</div>
|
48 |
+
<?php
|
49 |
+
die();
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Static method to add log messages
|
54 |
+
*
|
55 |
+
* @global object $rss_post_importer Global object
|
56 |
+
* @param int $post_count Number of posts imported
|
57 |
+
* @return null
|
58 |
+
*/
|
59 |
+
static function log($post_count) {
|
60 |
+
|
61 |
+
global $rss_post_importer;
|
62 |
+
|
63 |
+
// if logging is disabled, return early
|
64 |
+
if ($rss_post_importer->options['settings']['enable_logging'] != 'true') {
|
65 |
+
return;
|
66 |
+
}
|
67 |
+
|
68 |
+
// prepare the log entry
|
69 |
+
$log = date("Y-m-d H:i:s") . "\t Imported " . $post_count . " new posts. \n";
|
70 |
+
|
71 |
+
$log_file = RSS_PI_LOG_PATH . 'log.txt';
|
72 |
+
|
73 |
+
// add it to the log file
|
74 |
+
file_put_contents($log_file, $log, FILE_APPEND);
|
75 |
+
}
|
76 |
+
|
77 |
+
}
|
app/classes/helpers/class-rss-pi-parser.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Parses content according to settings
|
4 |
+
*
|
5 |
+
* @author Saurabh Shukla <saurabh@yapapaya.com>
|
6 |
+
*/
|
7 |
+
class rssPIParser {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Parse content
|
11 |
+
*
|
12 |
+
* @global object $rss_post_importer
|
13 |
+
* @param object $item Feed item
|
14 |
+
* @param string $feed_title Feed title
|
15 |
+
* @param boolean $strip_html whether to strio html tags
|
16 |
+
* @return type
|
17 |
+
*/
|
18 |
+
function _parse($item, $feed_title, $strip_html) {
|
19 |
+
|
20 |
+
global $rss_post_importer;
|
21 |
+
|
22 |
+
// get the saved template
|
23 |
+
$post_template = $rss_post_importer->options['settings']['post_template'];
|
24 |
+
|
25 |
+
// get the content
|
26 |
+
$c = $item->get_content() != "" ? $item->get_content() : $item->get_description();
|
27 |
+
|
28 |
+
$c = apply_filters('pre_rss_pi_parse_content', $c);
|
29 |
+
|
30 |
+
// do all the replacements
|
31 |
+
$parsed_content = preg_replace('/\{\$content\}/i', $c, $post_template);
|
32 |
+
$parsed_content = preg_replace('/\{\$permalink\}/i', '<a href="' . esc_url($item->get_permalink()) . '" target="_blank">' . $item->get_title() . '</a>', $parsed_content);
|
33 |
+
$parsed_content = preg_replace('/\{\$feed_title\}/i', $feed_title, $parsed_content);
|
34 |
+
$parsed_content = preg_replace('/\{\$title\}/i', $item->get_title(), $parsed_content);
|
35 |
+
|
36 |
+
// check if we need an excerpt
|
37 |
+
$parsed_content = $this->_excerpt($parsed_content);
|
38 |
+
|
39 |
+
// strip html, if needed
|
40 |
+
if ($strip_html == 'true') {
|
41 |
+
$parsed_content = strip_tags($parsed_content);
|
42 |
+
}
|
43 |
+
|
44 |
+
$parsed_content = apply_filters('after_rss_pi_parse_content', $parsed_content);
|
45 |
+
|
46 |
+
return $parsed_content;
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Checks and creates an excerpts
|
51 |
+
*
|
52 |
+
* @param string $content Content
|
53 |
+
* @return string
|
54 |
+
*/
|
55 |
+
private function _excerpt($content){
|
56 |
+
|
57 |
+
// if there's an excerpt placeholder
|
58 |
+
preg_match('/\{\$excerpt\:(\d+)\}/i', $content, $matches);
|
59 |
+
|
60 |
+
// if there's a wordcount
|
61 |
+
$e_size = (is_array($matches) && !empty($matches)) ? $matches[1] : 0;
|
62 |
+
|
63 |
+
// cut it down and replace the placeholder
|
64 |
+
if ($e_size) {
|
65 |
+
$trimmed_c = preg_replace('/<!--(.|\s)*?-->/', '', $c);
|
66 |
+
// compulsorily strip html otherwise there'll be broken html all over
|
67 |
+
$stripped_c = strip_tags($trimmed_c);
|
68 |
+
$content = preg_replace('/\{\$excerpt\:\d+\}/i', wp_trim_words($stripped_c, $e_size), $content);
|
69 |
+
}
|
70 |
+
|
71 |
+
return $content;
|
72 |
+
|
73 |
+
}
|
74 |
+
}
|
app/classes/import/class-rss-pi-cron.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Handles cron jobs
|
5 |
+
*
|
6 |
+
* @author Saurabh Shukla <saurabh@yapapaya.com>
|
7 |
+
*/
|
8 |
+
class rssPICron {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Initialise
|
12 |
+
*/
|
13 |
+
public function init() {
|
14 |
+
|
15 |
+
// hook up scheduled events
|
16 |
+
add_action('wp', array(&$this, 'schedule'));
|
17 |
+
|
18 |
+
add_action('rss_pi_cron', array(&$this, 'do_hourly'));
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Check and confirm scheduling
|
23 |
+
*/
|
24 |
+
function schedule() {
|
25 |
+
|
26 |
+
if (!wp_next_scheduled('rss_pi_cron')) {
|
27 |
+
|
28 |
+
wp_schedule_event(time(), 'hourly', 'rss_pi_cron');
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Import the feeds on schedule
|
34 |
+
*/
|
35 |
+
function do_hourly() {
|
36 |
+
|
37 |
+
$engine = new rssPIEngine();
|
38 |
+
$engine->import_feed();
|
39 |
+
}
|
40 |
+
|
41 |
+
}
|
app/classes/import/class-rss-pi-engine.php
ADDED
@@ -0,0 +1,365 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Main import engine
|
5 |
+
*
|
6 |
+
* @author Saurabh Shukla <saurabh@yapapaya.com>
|
7 |
+
*/
|
8 |
+
class rssPIEngine {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* The options
|
12 |
+
*
|
13 |
+
* @var array
|
14 |
+
*/
|
15 |
+
var $options = array();
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Start the engine
|
19 |
+
*
|
20 |
+
* @global type $rss_post_importer
|
21 |
+
*/
|
22 |
+
public function __construct() {
|
23 |
+
|
24 |
+
global $rss_post_importer;
|
25 |
+
|
26 |
+
// load options
|
27 |
+
$this->options = $rss_post_importer->options;
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Import feeds
|
32 |
+
*
|
33 |
+
* @return int
|
34 |
+
*/
|
35 |
+
public function import_feed() {
|
36 |
+
|
37 |
+
$post_count = 0;
|
38 |
+
|
39 |
+
// filter cache lifetime
|
40 |
+
add_filter('wp_feed_cache_transient_lifetime', array($this, 'frequency'));
|
41 |
+
|
42 |
+
foreach ($this->options['feeds'] as $f) {
|
43 |
+
|
44 |
+
// prepare and import each feed
|
45 |
+
$items = $this->prepare_import($f);
|
46 |
+
$post_count += count($items);
|
47 |
+
}
|
48 |
+
|
49 |
+
// reformulate import count
|
50 |
+
$imports = intval($this->options['imports']) + $post_count;
|
51 |
+
|
52 |
+
// update options
|
53 |
+
update_option('rss_pi_feeds', array(
|
54 |
+
'feeds' => $this->options['feeds'],
|
55 |
+
'settings' => $this->options['settings'],
|
56 |
+
'latest_import' => date("Y-m-d H:i:s"),
|
57 |
+
'imports' => $imports
|
58 |
+
));
|
59 |
+
|
60 |
+
global $rss_post_importer;
|
61 |
+
// reload options
|
62 |
+
$rss_post_importer->load_options();
|
63 |
+
|
64 |
+
remove_filter('wp_feed_cache_transient_lifetime', array($this, 'frequency'));
|
65 |
+
|
66 |
+
// log this
|
67 |
+
rssPILog::log($post_count);
|
68 |
+
|
69 |
+
return $post_count;
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Dummy function for filtering because we can't use anon ones yet
|
74 |
+
* @return string
|
75 |
+
*/
|
76 |
+
public function frequency() {
|
77 |
+
return $this->options['settings']['frequency'];
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Prepares arguments and imports
|
82 |
+
*
|
83 |
+
* @param array $f feed array
|
84 |
+
* @return array
|
85 |
+
*/
|
86 |
+
private function prepare_import($f) {
|
87 |
+
$args = array(
|
88 |
+
'feed_title' => $f['name'],
|
89 |
+
'max_posts' => $f['max_posts'],
|
90 |
+
'author_id' => $f['author_id'],
|
91 |
+
'category_id' => $f['category_id'],
|
92 |
+
'strip_html' => $f['strip_html'],
|
93 |
+
'save_to_db' => true
|
94 |
+
);
|
95 |
+
return $this->_import($f['url'], $args);
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Import feeds from url
|
100 |
+
*
|
101 |
+
* @param string $url The remote feed url
|
102 |
+
* @param array $args Arguments for the import
|
103 |
+
* @return null|array
|
104 |
+
*/
|
105 |
+
private function _import($url = '', $args = array()) {
|
106 |
+
|
107 |
+
if (empty($url)) {
|
108 |
+
return;
|
109 |
+
}
|
110 |
+
|
111 |
+
$defaults = array(
|
112 |
+
'feed_title' => '',
|
113 |
+
'max_posts' => 5,
|
114 |
+
'author_id' => 1,
|
115 |
+
'category_id' => 0,
|
116 |
+
'strip_html' => true,
|
117 |
+
'save_to_db' => true
|
118 |
+
);
|
119 |
+
|
120 |
+
$args = wp_parse_args($args, $defaults);
|
121 |
+
|
122 |
+
// include the default WP feed processing functions
|
123 |
+
include_once( ABSPATH . WPINC . '/feed.php' );
|
124 |
+
|
125 |
+
// get the right url for fetching (premium vs free)
|
126 |
+
$url = $this->url($url);
|
127 |
+
|
128 |
+
// fetch the feed
|
129 |
+
$feed = fetch_feed($url);
|
130 |
+
|
131 |
+
// save as posts
|
132 |
+
$posts = $this->save($feed, $args);
|
133 |
+
|
134 |
+
return $posts;
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Formulate the right url
|
139 |
+
*
|
140 |
+
* @param string $url
|
141 |
+
* @return string
|
142 |
+
*/
|
143 |
+
private function url($url) {
|
144 |
+
|
145 |
+
$key = $this->options['settings']["feeds_api_key"];
|
146 |
+
|
147 |
+
//if api key has been saved by user and is not empty
|
148 |
+
if (isset($key) && !empty($key)) {
|
149 |
+
|
150 |
+
$api_url = "http://www.feedsapi.org/fetch.php?key=" . $key . "&url=" . $url;
|
151 |
+
|
152 |
+
return $api_url;
|
153 |
+
}
|
154 |
+
|
155 |
+
return $url;
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Save the feed
|
160 |
+
*
|
161 |
+
* @param object $feed The feed object
|
162 |
+
* @param array $args The arguments
|
163 |
+
* @return boolean
|
164 |
+
*/
|
165 |
+
private function save($feed, $args = array()) {
|
166 |
+
if (is_wp_error($feed)) {
|
167 |
+
return false;
|
168 |
+
}
|
169 |
+
// filter the feed and get feed items
|
170 |
+
$feed_items = $this->filter($feed, $args);
|
171 |
+
|
172 |
+
// if we are saving
|
173 |
+
if ($args['save_to_db']) {
|
174 |
+
// insert and return
|
175 |
+
$saved_posts = $this->insert($feed_items, $args);
|
176 |
+
return $saved_posts;
|
177 |
+
}
|
178 |
+
|
179 |
+
// otherwsie return the feed items
|
180 |
+
return $feed_items;
|
181 |
+
}
|
182 |
+
|
183 |
+
/**
|
184 |
+
* Filter the feed based on keywords
|
185 |
+
*
|
186 |
+
* @param object $feed The feed object
|
187 |
+
* @param array $args Arguments
|
188 |
+
* @return array
|
189 |
+
*/
|
190 |
+
private function filter($feed, $args) {
|
191 |
+
|
192 |
+
// the count of keyword matched items
|
193 |
+
$got = 0;
|
194 |
+
|
195 |
+
// the current index of the items aray
|
196 |
+
$index = 0;
|
197 |
+
|
198 |
+
$filtered = array();
|
199 |
+
|
200 |
+
// till we have as many as the posts needed
|
201 |
+
while ($got < $args['max_posts']) {
|
202 |
+
|
203 |
+
// get only one item at the current index
|
204 |
+
$feed_item = $feed->get_items($index, 1);
|
205 |
+
|
206 |
+
// if this is empty, get out of the while
|
207 |
+
if (empty($feed_item)) {
|
208 |
+
break;
|
209 |
+
}
|
210 |
+
// else be in a forever loop
|
211 |
+
// get the content
|
212 |
+
$content = $feed_item[0]->get_content();
|
213 |
+
|
214 |
+
// test it against the keywords
|
215 |
+
$tested = $this->test($content);
|
216 |
+
|
217 |
+
// if this is good for us
|
218 |
+
if ($tested) {
|
219 |
+
$got++;
|
220 |
+
|
221 |
+
array_push($filtered, $feed_item[0]);
|
222 |
+
}
|
223 |
+
// shift the index
|
224 |
+
$index++;
|
225 |
+
}
|
226 |
+
|
227 |
+
return $filtered;
|
228 |
+
}
|
229 |
+
|
230 |
+
/**
|
231 |
+
* Test a piece of content against keywords
|
232 |
+
*
|
233 |
+
* @param string $content
|
234 |
+
* @return boolean
|
235 |
+
*/
|
236 |
+
function test($content) {
|
237 |
+
$keywords = $this->options['settings']['keywords'];
|
238 |
+
|
239 |
+
if (empty($keywords)) {
|
240 |
+
return true;
|
241 |
+
}
|
242 |
+
|
243 |
+
$match = false;
|
244 |
+
|
245 |
+
// loop through keywords
|
246 |
+
foreach ($keywords as $keyword) {
|
247 |
+
|
248 |
+
// if the keyword is not a regex, make it one
|
249 |
+
if (!$this->is_regex($keyword)) {
|
250 |
+
$keyword = '/' . $keyword . '/i';
|
251 |
+
}
|
252 |
+
|
253 |
+
// look for keyword in content
|
254 |
+
preg_match($keyword, $content, $tested);
|
255 |
+
|
256 |
+
// if it's there, we are good
|
257 |
+
if (!empty($tested)) {
|
258 |
+
$match = true;
|
259 |
+
// no need to test anymore
|
260 |
+
break;
|
261 |
+
}
|
262 |
+
}
|
263 |
+
|
264 |
+
|
265 |
+
return $match;
|
266 |
+
}
|
267 |
+
|
268 |
+
/**
|
269 |
+
* Check if a string is regex
|
270 |
+
*
|
271 |
+
* @param string $str The string to check
|
272 |
+
* @return boolean
|
273 |
+
*/
|
274 |
+
private function is_regex($str) {
|
275 |
+
|
276 |
+
// check regex with a regex!
|
277 |
+
$regex = "/^\/[\s\S]+\/$/";
|
278 |
+
preg_match($regex, $str, $matched);
|
279 |
+
return !empty($matched);
|
280 |
+
}
|
281 |
+
|
282 |
+
/**
|
283 |
+
* Insert feed items as posts
|
284 |
+
*
|
285 |
+
* @param array $items Fetched feed items
|
286 |
+
* @param array $args arguments
|
287 |
+
* @return array
|
288 |
+
*/
|
289 |
+
private function insert($items, $args = array()) {
|
290 |
+
$saved_posts = array();
|
291 |
+
|
292 |
+
// Initialise the content parser
|
293 |
+
$parser = new rssPIParser($this->options);
|
294 |
+
|
295 |
+
// Featured Image setter
|
296 |
+
$thumbnail = new rssPIFeaturedImage();
|
297 |
+
|
298 |
+
foreach ($items as $item) {
|
299 |
+
if (!$this->post_exists($item->get_permalink())) {
|
300 |
+
$post = array(
|
301 |
+
'post_title' => $item->get_title(),
|
302 |
+
// parse the content
|
303 |
+
'post_content' => $parser->_parse($item, $args['feed_title'], $args['strip_html']),
|
304 |
+
'post_status' => $this->options['settings']['post_status'],
|
305 |
+
'post_author' => $args['author_id'],
|
306 |
+
'post_category' => array($args['category_id']),
|
307 |
+
'comment_status' => $this->options['settings']['allow_comments'],
|
308 |
+
'post_date' => $item->get_date('Y-m-d H:i:s')
|
309 |
+
);
|
310 |
+
|
311 |
+
// insert as post
|
312 |
+
$post_id = $this->_insert($post, $item->get_permalink());
|
313 |
+
|
314 |
+
// set thumbnail
|
315 |
+
$thumbnail->_set($item, $post_id);
|
316 |
+
|
317 |
+
array_push($saved_posts, $post);
|
318 |
+
}
|
319 |
+
}
|
320 |
+
|
321 |
+
return $saved_posts;
|
322 |
+
}
|
323 |
+
|
324 |
+
/**
|
325 |
+
* Check if a feed ite is alreday imported
|
326 |
+
*
|
327 |
+
* @param string $permalink
|
328 |
+
* @return boolean
|
329 |
+
*/
|
330 |
+
private function post_exists($permalink) {
|
331 |
+
|
332 |
+
// get all posts where the meta is stored
|
333 |
+
$args = array(
|
334 |
+
'post_status' => 'any',
|
335 |
+
'meta_key' => 'rss_pi_source_url',
|
336 |
+
'meta_value' => esc_url($permalink)
|
337 |
+
);
|
338 |
+
|
339 |
+
$posts = get_posts($args);
|
340 |
+
|
341 |
+
// Not already imported
|
342 |
+
return(count($posts) > 0);
|
343 |
+
}
|
344 |
+
|
345 |
+
/**
|
346 |
+
* Insert feed item as post
|
347 |
+
*
|
348 |
+
* @param array $post Post array
|
349 |
+
* @param string $url source url meta
|
350 |
+
* @return int
|
351 |
+
*/
|
352 |
+
private function _insert($post, $url) {
|
353 |
+
|
354 |
+
$_post = apply_filters('pre_rss_pi_insert_post', $post);
|
355 |
+
|
356 |
+
$post_id = wp_insert_post($_post);
|
357 |
+
|
358 |
+
add_action('save_rss_pi_post', $post_id);
|
359 |
+
|
360 |
+
add_post_meta($post_id, 'rss_pi_source_url', esc_url($url));
|
361 |
+
|
362 |
+
return $post_id;
|
363 |
+
}
|
364 |
+
|
365 |
+
}
|
app/lang/rss_pi-es_ES.mo
ADDED
Binary file
|
app/lang/rss_pi-es_ES.po
ADDED
@@ -0,0 +1,257 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Rss Post Importer v1.0.3\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2014-12-09 19:12+0530\n"
|
6 |
+
"PO-Revision-Date: 2014-12-09 19:12+0530\n"
|
7 |
+
"Last-Translator: admin <jens@simmalugnt.se>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"Language: es_ES\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
14 |
+
"X-Generator: Poedit 1.6.10\n"
|
15 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
17 |
+
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
18 |
+
"X-Poedit-Basepath: ../\n"
|
19 |
+
"X-Textdomain-Support: yes\n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
|
22 |
+
# @ default
|
23 |
+
#: classes/admin/class-rss-pi-admin-processor.php:47
|
24 |
+
msgid "Settings saved."
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
# @ default
|
28 |
+
#: classes/admin/class-rss-pi-admin-processor.php:173
|
29 |
+
msgid "new posts imported."
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: classes/admin/class-rss-pi-admin-processor.php:192
|
33 |
+
msgid "Invalid API key!"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: classes/admin/class-rss-pi-admin.php:40
|
37 |
+
msgid ""
|
38 |
+
"You need a <a href=\"http://www.feedsapi.com/?utm_source=rsspi-full-rss-key-"
|
39 |
+
"here\" target=\"_blank\">Full Text RSS Key</a> to activate this section, "
|
40 |
+
"please <a href=\"http://www.feedsapi.com/?utm_source=rsspi-full-rss-key-here"
|
41 |
+
"\" target=\"_blank\">get one and try it free</a> for the next 14 days to see "
|
42 |
+
"how it goes."
|
43 |
+
msgstr ""
|
44 |
+
|
45 |
+
# @ rss_pi
|
46 |
+
#: classes/helpers/class-rss-pi-log.php:46
|
47 |
+
msgid "Log has been cleared."
|
48 |
+
msgstr "Iniciar ha sido borrada."
|
49 |
+
|
50 |
+
# @ rss_pi
|
51 |
+
#: templates/admin-ui.php:4
|
52 |
+
msgid "Rss Post Importer Settings"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
# @ rss_pi
|
56 |
+
#: templates/feed-save-box.php:7
|
57 |
+
msgid "Latest import:"
|
58 |
+
msgstr "Últimas importación:"
|
59 |
+
|
60 |
+
# @ rss_pi
|
61 |
+
#: templates/feed-save-box.php:9
|
62 |
+
msgid "View the log"
|
63 |
+
msgstr "Ver el registro"
|
64 |
+
|
65 |
+
# @ default
|
66 |
+
#: templates/feed-save-box.php:13
|
67 |
+
msgid "Save"
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
# @ rss_pi
|
71 |
+
#: templates/feed-save-box.php:14
|
72 |
+
msgid "Save and import"
|
73 |
+
msgstr "Guardar e importar"
|
74 |
+
|
75 |
+
# @ rss_pi
|
76 |
+
#: templates/feed-save-box.php:20
|
77 |
+
#, php-format
|
78 |
+
msgid "%d posts imported and counting!"
|
79 |
+
msgstr "%d mensajes importados y contando!"
|
80 |
+
|
81 |
+
# @ default
|
82 |
+
#: templates/feed-table-row.php:25
|
83 |
+
msgid "Edit"
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
# @ default
|
87 |
+
#: templates/feed-table-row.php:26
|
88 |
+
msgid "Delete"
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
# @ rss_pi
|
92 |
+
#: templates/feed-table-row.php:37 templates/feed-table.php:4
|
93 |
+
msgid "Feed name"
|
94 |
+
msgstr ""
|
95 |
+
|
96 |
+
# @ rss_pi
|
97 |
+
#: templates/feed-table-row.php:44 templates/feed-table.php:5
|
98 |
+
msgid "Feed url"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
# @ rss_pi
|
102 |
+
#: templates/feed-table-row.php:50 templates/feed-table.php:6
|
103 |
+
msgid "Max posts / import"
|
104 |
+
msgstr "Puestos / importación Máx"
|
105 |
+
|
106 |
+
#: templates/feed-table-row.php:54
|
107 |
+
msgid "Feed Author"
|
108 |
+
msgstr ""
|
109 |
+
|
110 |
+
# @ default
|
111 |
+
#: templates/feed-table-row.php:71 templates/feed-table.php:7
|
112 |
+
msgid "Category"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
# @ rss_pi
|
116 |
+
#: templates/feed-table-row.php:75
|
117 |
+
msgid "Strip html tags"
|
118 |
+
msgstr "Strip etiquetas HTML"
|
119 |
+
|
120 |
+
# @ default
|
121 |
+
#: templates/feed-table-row.php:79 templates/settings-table.php:128
|
122 |
+
#: templates/settings-table.php:144
|
123 |
+
msgid "Yes"
|
124 |
+
msgstr ""
|
125 |
+
|
126 |
+
# @ default
|
127 |
+
#: templates/feed-table-row.php:82 templates/settings-table.php:131
|
128 |
+
#: templates/settings-table.php:147
|
129 |
+
msgid "No"
|
130 |
+
msgstr ""
|
131 |
+
|
132 |
+
# @ default
|
133 |
+
#: templates/feed-table-row.php:89
|
134 |
+
msgid "Close"
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
# @ rss_pi
|
138 |
+
#: templates/feed-table.php:25
|
139 |
+
msgid ""
|
140 |
+
"You haven't specified any feeds to import yet, why don't you <a href=\"#\" "
|
141 |
+
"class=\"add-row\">add one now</a>?"
|
142 |
+
msgstr ""
|
143 |
+
"Usted no se ha especificado ninguna fuente para importar, sin embargo, ¿por "
|
144 |
+
"qué no <a href=\"#\" class=\"add-row\"> agrega uno ahora </ a>?"
|
145 |
+
|
146 |
+
# @ rss_pi
|
147 |
+
#: templates/feed-table.php:36
|
148 |
+
msgid "Add new feed"
|
149 |
+
msgstr "Añadir nuevo"
|
150 |
+
|
151 |
+
# @ rss_pi
|
152 |
+
#: templates/log.php:2
|
153 |
+
#, fuzzy
|
154 |
+
msgid "Rss Post Importer Log"
|
155 |
+
msgstr "Registros de importadores correos Rss"
|
156 |
+
|
157 |
+
# @ rss_pi
|
158 |
+
#: templates/log.php:7
|
159 |
+
#, php-format
|
160 |
+
msgid ""
|
161 |
+
"If your imports are not running regularly according to your settings you "
|
162 |
+
"might need to set up a scheduled task, there are several ways to do this, "
|
163 |
+
"most convenient is to set up a scheduled task on your server and simply ask "
|
164 |
+
"it to hit your sites url (%s) regularly, there are also external sites that "
|
165 |
+
"offer the same service, such as:"
|
166 |
+
msgstr ""
|
167 |
+
"Si sus importaciones no están funcionando regularmente en función de la "
|
168 |
+
"configuración que pueda necesitar para crear una tarea programada, hay "
|
169 |
+
"varias maneras de hacer esto, más conveniente es crear una tarea programada "
|
170 |
+
"en el servidor y simplemente preguntar a golpear a sus sitios url (%s) con "
|
171 |
+
"regularidad, también hay sitios externos que ofrecen el mismo servicio, "
|
172 |
+
"tales como:"
|
173 |
+
|
174 |
+
# @ rss_pi
|
175 |
+
#: templates/log.php:15
|
176 |
+
msgid "Ok, all done"
|
177 |
+
msgstr "Ok, todo hecho"
|
178 |
+
|
179 |
+
# @ rss_pi
|
180 |
+
#: templates/log.php:16
|
181 |
+
msgid "Clear log"
|
182 |
+
msgstr "Borrar registro"
|
183 |
+
|
184 |
+
# @ default
|
185 |
+
#: templates/settings-table.php:4
|
186 |
+
msgid "Settings"
|
187 |
+
msgstr ""
|
188 |
+
|
189 |
+
# @ rss_pi
|
190 |
+
#: templates/settings-table.php:13
|
191 |
+
msgid "Frequency"
|
192 |
+
msgstr "Frecuencia"
|
193 |
+
|
194 |
+
# @ rss_pi
|
195 |
+
#: templates/settings-table.php:14
|
196 |
+
msgid "How often will the import run."
|
197 |
+
msgstr "¿Con qué frecuencia se ejecutará la importación."
|
198 |
+
|
199 |
+
#: templates/settings-table.php:30
|
200 |
+
msgid "Full Text RSS Feed API Key"
|
201 |
+
msgstr ""
|
202 |
+
|
203 |
+
#: templates/settings-table.php:32
|
204 |
+
msgid "Boost Your traffic with Full RSS Content - "
|
205 |
+
msgstr ""
|
206 |
+
|
207 |
+
# @ default
|
208 |
+
#: templates/settings-table.php:44
|
209 |
+
msgid "Template"
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
# @ rss_pi
|
213 |
+
#: templates/settings-table.php:45
|
214 |
+
msgid "This is how the post will be formatted."
|
215 |
+
msgstr "Así es como se formatea el mensaje."
|
216 |
+
|
217 |
+
# @ rss_pi
|
218 |
+
#: templates/settings-table.php:47
|
219 |
+
msgid "Available tags:"
|
220 |
+
msgstr "Etiquetas disponibles:"
|
221 |
+
|
222 |
+
#: templates/settings-table.php:71
|
223 |
+
msgid "Keywords Filter"
|
224 |
+
msgstr ""
|
225 |
+
|
226 |
+
#: templates/settings-table.php:72
|
227 |
+
msgid "Enter keywords and/or regex, separated by commas"
|
228 |
+
msgstr ""
|
229 |
+
|
230 |
+
#: templates/settings-table.php:74
|
231 |
+
msgid "Only posts matching these keywords/regex will be imported"
|
232 |
+
msgstr ""
|
233 |
+
|
234 |
+
# @ rss_pi
|
235 |
+
#: templates/settings-table.php:91
|
236 |
+
msgid "Post status"
|
237 |
+
msgstr "Publique estado"
|
238 |
+
|
239 |
+
# @ default
|
240 |
+
#: templates/settings-table.php:111
|
241 |
+
msgid "Author"
|
242 |
+
msgstr ""
|
243 |
+
|
244 |
+
# @ rss_pi
|
245 |
+
#: templates/settings-table.php:124
|
246 |
+
msgid "Allow comments"
|
247 |
+
msgstr "Permitir comentarios"
|
248 |
+
|
249 |
+
# @ rss_pi
|
250 |
+
#: templates/settings-table.php:138
|
251 |
+
msgid "Enable logging?"
|
252 |
+
msgstr "Habilitar el registro?"
|
253 |
+
|
254 |
+
# @ rss_pi
|
255 |
+
#: templates/settings-table.php:139
|
256 |
+
msgid "The logfile can be found <a href=\"#\" class=\"load-log\">here</a>."
|
257 |
+
msgstr "The logfile can be found <a href=\"#\" class=\"load-log\">here</a>."
|
app/lang/rss_pi-sv_SE.mo
ADDED
Binary file
|
app/lang/rss_pi-sv_SE.po
ADDED
@@ -0,0 +1,254 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Rss Post Importer v1.0.3\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2014-12-09 19:12+0530\n"
|
6 |
+
"PO-Revision-Date: 2014-12-09 19:14+0530\n"
|
7 |
+
"Last-Translator: admin <jens@simmalugnt.se>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"Language: sv_SE\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
14 |
+
"X-Generator: Poedit 1.6.10\n"
|
15 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
17 |
+
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
18 |
+
"X-Textdomain-Support: yes\n"
|
19 |
+
"X-Poedit-SearchPath-0: .\n"
|
20 |
+
|
21 |
+
# @ default
|
22 |
+
#: classes/admin/class-rss-pi-admin-processor.php:47
|
23 |
+
msgid "Settings saved."
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
# @ default
|
27 |
+
#: classes/admin/class-rss-pi-admin-processor.php:173
|
28 |
+
msgid "new posts imported."
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: classes/admin/class-rss-pi-admin-processor.php:192
|
32 |
+
msgid "Invalid API key!"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: classes/admin/class-rss-pi-admin.php:40
|
36 |
+
msgid ""
|
37 |
+
"You need a <a href=\"http://www.feedsapi.com/?utm_source=rsspi-full-rss-key-"
|
38 |
+
"here\" target=\"_blank\">Full Text RSS Key</a> to activate this section, "
|
39 |
+
"please <a href=\"http://www.feedsapi.com/?utm_source=rsspi-full-rss-key-here"
|
40 |
+
"\" target=\"_blank\">get one and try it free</a> for the next 14 days to see "
|
41 |
+
"how it goes."
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
# @ rss_pi
|
45 |
+
#: classes/helpers/class-rss-pi-log.php:46
|
46 |
+
msgid "Log has been cleared."
|
47 |
+
msgstr "Loggen rensad."
|
48 |
+
|
49 |
+
# @ rss_pi
|
50 |
+
#: templates/admin-ui.php:4
|
51 |
+
msgid "Rss Post Importer Settings"
|
52 |
+
msgstr "Rss Post Importer Inställningar"
|
53 |
+
|
54 |
+
# @ rss_pi
|
55 |
+
#: templates/feed-save-box.php:7
|
56 |
+
msgid "Latest import:"
|
57 |
+
msgstr "Senaste import:"
|
58 |
+
|
59 |
+
# @ rss_pi
|
60 |
+
#: templates/feed-save-box.php:9
|
61 |
+
msgid "View the log"
|
62 |
+
msgstr "Visa loggen"
|
63 |
+
|
64 |
+
# @ default
|
65 |
+
#: templates/feed-save-box.php:13
|
66 |
+
msgid "Save"
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
# @ rss_pi
|
70 |
+
#: templates/feed-save-box.php:14
|
71 |
+
msgid "Save and import"
|
72 |
+
msgstr "Spara och importera"
|
73 |
+
|
74 |
+
# @ rss_pi
|
75 |
+
#: templates/feed-save-box.php:20
|
76 |
+
#, php-format
|
77 |
+
msgid "%d posts imported and counting!"
|
78 |
+
msgstr "%d poster importerade!"
|
79 |
+
|
80 |
+
# @ default
|
81 |
+
#: templates/feed-table-row.php:25
|
82 |
+
msgid "Edit"
|
83 |
+
msgstr ""
|
84 |
+
|
85 |
+
# @ default
|
86 |
+
#: templates/feed-table-row.php:26
|
87 |
+
msgid "Delete"
|
88 |
+
msgstr ""
|
89 |
+
|
90 |
+
# @ rss_pi
|
91 |
+
#: templates/feed-table-row.php:37 templates/feed-table.php:4
|
92 |
+
msgid "Feed name"
|
93 |
+
msgstr "Flödesnamn"
|
94 |
+
|
95 |
+
# @ rss_pi
|
96 |
+
#: templates/feed-table-row.php:44 templates/feed-table.php:5
|
97 |
+
msgid "Feed url"
|
98 |
+
msgstr "Url"
|
99 |
+
|
100 |
+
# @ rss_pi
|
101 |
+
#: templates/feed-table-row.php:50 templates/feed-table.php:6
|
102 |
+
msgid "Max posts / import"
|
103 |
+
msgstr "Max poster / import"
|
104 |
+
|
105 |
+
# @ rss_pi
|
106 |
+
#: templates/feed-table-row.php:54
|
107 |
+
#, fuzzy
|
108 |
+
msgid "Feed Author"
|
109 |
+
msgstr "Url"
|
110 |
+
|
111 |
+
# @ default
|
112 |
+
#: templates/feed-table-row.php:71 templates/feed-table.php:7
|
113 |
+
msgid "Category"
|
114 |
+
msgstr ""
|
115 |
+
|
116 |
+
# @ rss_pi
|
117 |
+
#: templates/feed-table-row.php:75
|
118 |
+
msgid "Strip html tags"
|
119 |
+
msgstr "Ta bort html-taggar"
|
120 |
+
|
121 |
+
# @ default
|
122 |
+
#: templates/feed-table-row.php:79 templates/settings-table.php:128
|
123 |
+
#: templates/settings-table.php:144
|
124 |
+
msgid "Yes"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
# @ default
|
128 |
+
#: templates/feed-table-row.php:82 templates/settings-table.php:131
|
129 |
+
#: templates/settings-table.php:147
|
130 |
+
msgid "No"
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
# @ default
|
134 |
+
#: templates/feed-table-row.php:89
|
135 |
+
msgid "Close"
|
136 |
+
msgstr ""
|
137 |
+
|
138 |
+
# @ rss_pi
|
139 |
+
#: templates/feed-table.php:25
|
140 |
+
msgid ""
|
141 |
+
"You haven't specified any feeds to import yet, why don't you <a href=\"#\" "
|
142 |
+
"class=\"add-row\">add one now</a>?"
|
143 |
+
msgstr ""
|
144 |
+
"Du har inte lagt till några flöden att importera, varför inte <a href=\"#\" "
|
145 |
+
"class=\"add-row\">lägga till ett nu</a>?"
|
146 |
+
|
147 |
+
# @ rss_pi
|
148 |
+
#: templates/feed-table.php:36
|
149 |
+
msgid "Add new feed"
|
150 |
+
msgstr "Lägg till flöde"
|
151 |
+
|
152 |
+
# @ rss_pi
|
153 |
+
#: templates/log.php:2
|
154 |
+
msgid "Rss Post Importer Log"
|
155 |
+
msgstr "Rss Post Importer Logg"
|
156 |
+
|
157 |
+
# @ rss_pi
|
158 |
+
#: templates/log.php:7
|
159 |
+
#, php-format
|
160 |
+
msgid ""
|
161 |
+
"If your imports are not running regularly according to your settings you "
|
162 |
+
"might need to set up a scheduled task, there are several ways to do this, "
|
163 |
+
"most convenient is to set up a scheduled task on your server and simply ask "
|
164 |
+
"it to hit your sites url (%s) regularly, there are also external sites that "
|
165 |
+
"offer the same service, such as:"
|
166 |
+
msgstr ""
|
167 |
+
"Om din import inte körs regelbundet enligt dina inställningar kan du testa "
|
168 |
+
"att sätta upp en scheduled task som besöker din site(%s), via din server "
|
169 |
+
"eller via något av nedanstående siter:"
|
170 |
+
|
171 |
+
# @ rss_pi
|
172 |
+
#: templates/log.php:15
|
173 |
+
msgid "Ok, all done"
|
174 |
+
msgstr "Ok, klar"
|
175 |
+
|
176 |
+
# @ rss_pi
|
177 |
+
#: templates/log.php:16
|
178 |
+
msgid "Clear log"
|
179 |
+
msgstr "Rensa logg"
|
180 |
+
|
181 |
+
# @ default
|
182 |
+
#: templates/settings-table.php:4
|
183 |
+
msgid "Settings"
|
184 |
+
msgstr ""
|
185 |
+
|
186 |
+
# @ rss_pi
|
187 |
+
#: templates/settings-table.php:13
|
188 |
+
msgid "Frequency"
|
189 |
+
msgstr "Frekvens"
|
190 |
+
|
191 |
+
# @ rss_pi
|
192 |
+
#: templates/settings-table.php:14
|
193 |
+
msgid "How often will the import run."
|
194 |
+
msgstr "Hur ofta skall importen köras?"
|
195 |
+
|
196 |
+
#: templates/settings-table.php:30
|
197 |
+
msgid "Full Text RSS Feed API Key"
|
198 |
+
msgstr ""
|
199 |
+
|
200 |
+
#: templates/settings-table.php:32
|
201 |
+
msgid "Boost Your traffic with Full RSS Content - "
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
# @ default
|
205 |
+
#: templates/settings-table.php:44
|
206 |
+
msgid "Template"
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
# @ rss_pi
|
210 |
+
#: templates/settings-table.php:45
|
211 |
+
msgid "This is how the post will be formatted."
|
212 |
+
msgstr "Så här kommer innehållet formatteras."
|
213 |
+
|
214 |
+
# @ rss_pi
|
215 |
+
#: templates/settings-table.php:47
|
216 |
+
msgid "Available tags:"
|
217 |
+
msgstr "Tillgängliga taggar:"
|
218 |
+
|
219 |
+
#: templates/settings-table.php:71
|
220 |
+
msgid "Keywords Filter"
|
221 |
+
msgstr ""
|
222 |
+
|
223 |
+
#: templates/settings-table.php:72
|
224 |
+
msgid "Enter keywords and/or regex, separated by commas"
|
225 |
+
msgstr ""
|
226 |
+
|
227 |
+
#: templates/settings-table.php:74
|
228 |
+
msgid "Only posts matching these keywords/regex will be imported"
|
229 |
+
msgstr ""
|
230 |
+
|
231 |
+
# @ rss_pi
|
232 |
+
#: templates/settings-table.php:91
|
233 |
+
msgid "Post status"
|
234 |
+
msgstr "Post status"
|
235 |
+
|
236 |
+
# @ default
|
237 |
+
#: templates/settings-table.php:111
|
238 |
+
msgid "Author"
|
239 |
+
msgstr ""
|
240 |
+
|
241 |
+
# @ rss_pi
|
242 |
+
#: templates/settings-table.php:124
|
243 |
+
msgid "Allow comments"
|
244 |
+
msgstr "Tillåt kommentarer"
|
245 |
+
|
246 |
+
# @ rss_pi
|
247 |
+
#: templates/settings-table.php:138
|
248 |
+
msgid "Enable logging?"
|
249 |
+
msgstr "Aktivera loggen?"
|
250 |
+
|
251 |
+
# @ rss_pi
|
252 |
+
#: templates/settings-table.php:139
|
253 |
+
msgid "The logfile can be found <a href=\"#\" class=\"load-log\">here</a>."
|
254 |
+
msgstr "Du hittar loggfilen <a href=\"#\" class=\"load-log\">här</a>."
|
app/templates/admin-ui.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wrap">
|
2 |
+
<div id="main_ui">
|
3 |
+
|
4 |
+
<h2><?php _e("Rss Post Importer Settings", 'rss_pi'); ?></h2>
|
5 |
+
|
6 |
+
<form method="post" id="">
|
7 |
+
|
8 |
+
<input type="hidden" name="save_to_db" id="save_to_db" />
|
9 |
+
|
10 |
+
<?php wp_nonce_field('settings_page', 'rss_pi_nonce'); ?>
|
11 |
+
|
12 |
+
<div id="poststuff">
|
13 |
+
<div id="post-body" class="metabox-holder columns-2">
|
14 |
+
|
15 |
+
<div id="postbox-container-1" class="postbox-container">
|
16 |
+
<?php include_once RSS_PI_PATH. 'app/templates/feed-save-box.php'; ?>
|
17 |
+
</div>
|
18 |
+
|
19 |
+
<div id="postbox-container-2" class="postbox-container">
|
20 |
+
|
21 |
+
<?php
|
22 |
+
include_once RSS_PI_PATH. 'app/templates/feed-table.php';
|
23 |
+
include_once RSS_PI_PATH. 'app/templates/settings-table.php';
|
24 |
+
?>
|
25 |
+
</div>
|
26 |
+
|
27 |
+
</div>
|
28 |
+
<br class="clear" />
|
29 |
+
</div>
|
30 |
+
</form>
|
31 |
+
|
32 |
+
</div>
|
33 |
+
|
34 |
+
<div class="ajax_content"></div>
|
35 |
+
</div>
|
app/templates/feed-save-box.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="postbox">
|
2 |
+
<div class="inside">
|
3 |
+
<div class="misc-pub-section">
|
4 |
+
<h3 class="version">V. <?php echo RSS_PI_VERSION; ?></h3>
|
5 |
+
<ul>
|
6 |
+
<li>
|
7 |
+
<i class="icon-calendar"></i> <?php _e("Latest import:", 'rss_pi'); ?> <strong><?php echo($this->options['latest_import']); ?></strong>
|
8 |
+
</li>
|
9 |
+
<li><i class="icon-eye-open"></i> <a href="#" class="load-log"><?php _e("View the log", 'rss_pi'); ?></a></li>
|
10 |
+
</ul>
|
11 |
+
</div>
|
12 |
+
<div id="major-publishing-actions">
|
13 |
+
<input class="button button-primary button-large right" type="submit" name="info_update" value="<?php _e('Save', 'rss_pi'); ?>" />
|
14 |
+
<input class="button button-large" type="submit" name="info_update" value="<?php _e('Save and import', "rss_pi"); ?>" id="save_and_import" />
|
15 |
+
</div>
|
16 |
+
</div>
|
17 |
+
</div>
|
18 |
+
<?php if ($this->options['imports'] > 10) : ?>
|
19 |
+
<div class="rate-box">
|
20 |
+
<h4><?php printf(__('%d posts imported and counting!', "rss_pi"), $this->options['imports']); ?></h4>
|
21 |
+
<i class="icon-star"></i>
|
22 |
+
<i class="icon-star"></i>
|
23 |
+
<i class="icon-star"></i>
|
24 |
+
<i class="icon-star"></i>
|
25 |
+
<i class="icon-star"></i>
|
26 |
+
<p class="description"><a href="http://wordpress.org/plugins/rss-post-importer/" target="_blank">Please support this plugin by rating it!</a></p>
|
27 |
+
</div>
|
28 |
+
<?php endif; ?>
|
29 |
+
|
30 |
+
<?php $banner_url = RSS_PI_URL . "app/assets/img/rss-post-importer_280x600.jpg"; ?>
|
31 |
+
<a target="_blank" href="http://www.feedsapi.com/?utm=rsspostimporter_banner">
|
32 |
+
<img class='rss_pi_banner_img' src="<?php echo $banner_url; ?>" />
|
33 |
+
</a>
|
app/templates/feed-table-row.php
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$show = '';
|
3 |
+
|
4 |
+
if (!isset($f)) {
|
5 |
+
$f = array(
|
6 |
+
'id' => uniqid(),
|
7 |
+
'name' => 'New feed',
|
8 |
+
'url' => '',
|
9 |
+
'max_posts' => 5,
|
10 |
+
'author_id' => 1,
|
11 |
+
'category_id' => 1,
|
12 |
+
'strip_html' => 'false'
|
13 |
+
);
|
14 |
+
|
15 |
+
$show = 'show';
|
16 |
+
}
|
17 |
+
|
18 |
+
$category = get_the_category_by_ID(intval($f['category_id']));
|
19 |
+
?>
|
20 |
+
|
21 |
+
<tr id="display_<?php echo ($f['id']); ?>" class="data-row <?php echo $show; ?>">
|
22 |
+
<td>
|
23 |
+
<strong><a href="#" class="toggle-edit" data-target="<?php echo ($f['id']); ?>"><?php echo $f['name']; ?></a></strong>
|
24 |
+
<div class="row-options">
|
25 |
+
<a href="#" class="toggle-edit" data-target="<?php echo ($f['id']); ?>"><?php _e('Edit', 'rss_pi'); ?></a> |
|
26 |
+
<a href="#" class="delete-row" data-target="<?php echo ($f['id']); ?>"><?php _e('Delete', 'rss_pi'); ?></a>
|
27 |
+
</div>
|
28 |
+
</td>
|
29 |
+
<td><?php echo $f['url']; ?></td>
|
30 |
+
<td><?php echo $f['max_posts']; ?></td>
|
31 |
+
<td><?php echo $category; ?></td>
|
32 |
+
</tr>
|
33 |
+
<tr id="edit_<?php echo ($f['id']); ?>" class="edit-row <?php echo $show; ?>">
|
34 |
+
<td colspan="4">
|
35 |
+
<table class="widefat edit-table">
|
36 |
+
<tr>
|
37 |
+
<td><label for="<?php echo ($f['id']); ?>-name"><?php _e("Feed name", 'rss_pi'); ?></label></td>
|
38 |
+
<td>
|
39 |
+
<input type="text" name="<?php echo ($f['id']); ?>-name" id="<?php echo ($f['id']); ?>-name" value="<?php echo ($f['name']); ?>" />
|
40 |
+
</td>
|
41 |
+
</tr>
|
42 |
+
<tr>
|
43 |
+
<td>
|
44 |
+
<label for="<?php echo ($f['id']); ?>"><?php _e("Feed url", 'rss_pi'); ?></label>
|
45 |
+
<p class="description">ie "http://news.google.com/?output=rss"</p>
|
46 |
+
</td>
|
47 |
+
<td><input type="text" name="<?php echo ($f['id']); ?>-url" id="<?php echo ($f['id']); ?>-url" value="<?php echo ($f['url']); ?>" /></td>
|
48 |
+
</tr>
|
49 |
+
<tr>
|
50 |
+
<td><label for=""><?php _e("Max posts / import", 'rss_pi'); ?></label></td>
|
51 |
+
<td><input type="number" name="<?php echo ($f['id']); ?>-max_posts" id="<?php echo ($f['id']); ?>-max_posts" value="<?php echo ($f['max_posts']); ?>" min="1" max="100" /></td>
|
52 |
+
</tr>
|
53 |
+
<tr>
|
54 |
+
<td><label for=""><?php _e("Feed Author", 'rss_pi'); ?></label></td>
|
55 |
+
<td>
|
56 |
+
<?php
|
57 |
+
if(!$this->is_key_valid){
|
58 |
+
$this->key_error($this->key_prompt, true);
|
59 |
+
}
|
60 |
+
$args = array(
|
61 |
+
'id' => $f['id'] . '-author_id',
|
62 |
+
'name' => $f['id'] . '-author_id',
|
63 |
+
'selected' => $f['author_id'],
|
64 |
+
'class' => 'rss-pi-specific-feed-author'
|
65 |
+
);
|
66 |
+
wp_dropdown_users($args);
|
67 |
+
?>
|
68 |
+
</td>
|
69 |
+
</tr>
|
70 |
+
<tr>
|
71 |
+
<td><label for=""><?php _e("Category", 'rss_pi'); ?></label></td>
|
72 |
+
<td><?php wp_dropdown_categories(array('hide_empty' => 0, 'hierarchical' => true, 'id' => $f['id'] . '-category_id', 'name' => $f['id'] . '-category_id', 'selected' => $f['category_id'])); ?></td>
|
73 |
+
</tr>
|
74 |
+
<tr>
|
75 |
+
<td><label for=""><?php _e("Strip html tags", 'rss_pi'); ?></label></td>
|
76 |
+
<td>
|
77 |
+
<ul class="radiolist">
|
78 |
+
<li>
|
79 |
+
<label><input type="radio" id="<?php echo($f['id']); ?>-strip_html" name="<?php echo($f['id']); ?>-strip_html" value="true" <?php echo($f['strip_html'] == 'true' ? 'checked="checked"' : ''); ?> /> <?php _e('Yes', 'rss_pi'); ?></label>
|
80 |
+
</li>
|
81 |
+
<li>
|
82 |
+
<label><input type="radio" id="<?php echo($f['id']); ?>-strip_html" name="<?php echo($f['id']); ?>-strip_html" value="false" <?php echo($f['strip_html'] == 'false' ? 'checked="checked"' : ''); ?> /> <?php _e('No', 'rss_pi'); ?></label>
|
83 |
+
</li>
|
84 |
+
</ul>
|
85 |
+
</td>
|
86 |
+
</tr>
|
87 |
+
<tr>
|
88 |
+
<td><input type="hidden" name="id" value="<?php echo($f['id']); ?>" /></td>
|
89 |
+
<td><a id="close-edit-table" class="button button-large toggle-edit" data-target="<?php echo ($f['id']); ?>"><?php _e('Close', 'rss_pi'); ?></a></td>
|
90 |
+
</tr>
|
91 |
+
</table>
|
92 |
+
|
93 |
+
</td>
|
94 |
+
</tr>
|
app/templates/feed-table.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<table class="widefat rss_pi-table" id="rss_pi-table">
|
2 |
+
<thead>
|
3 |
+
<tr>
|
4 |
+
<th><?php _e("Feed name", 'rss_pi'); ?></th>
|
5 |
+
<th><?php _e("Feed url", 'rss_pi'); ?></th>
|
6 |
+
<th><?php _e("Max posts / import", 'rss_pi'); ?></th>
|
7 |
+
<th><?php _e("Category", 'rss_pi'); ?></th>
|
8 |
+
</tr>
|
9 |
+
</thead>
|
10 |
+
<tbody class="rss-rows">
|
11 |
+
<?php
|
12 |
+
$saved_ids = array();
|
13 |
+
|
14 |
+
if (is_array($this->options['feeds']) && count($this->options['feeds']) > 0) :
|
15 |
+
foreach ($this->options['feeds'] as $f) :
|
16 |
+
$category = get_the_category($f['category_id']);
|
17 |
+
array_push($saved_ids, $f['id']);
|
18 |
+
|
19 |
+
include( RSS_PI_PATH . 'app/templates/feed-table-row.php');
|
20 |
+
endforeach;
|
21 |
+
else :
|
22 |
+
?>
|
23 |
+
<tr>
|
24 |
+
<td colspan="4" class="empty_table">
|
25 |
+
<?php _e('You haven\'t specified any feeds to import yet, why don\'t you <a href="#" class="add-row">add one now</a>?', "rss_pi"); ?>
|
26 |
+
</td>
|
27 |
+
</tr>
|
28 |
+
<?php
|
29 |
+
endif
|
30 |
+
?>
|
31 |
+
</tbody>
|
32 |
+
<tfoot>
|
33 |
+
<tr>
|
34 |
+
<td colspan="4">
|
35 |
+
<a href="#" class="button button-large button-primary add-row">
|
36 |
+
<?php _e('Add new feed', "rss_pi"); ?>
|
37 |
+
</a>
|
38 |
+
<input type="hidden" name="ids" id="ids" value="<?php echo(join($saved_ids, ',')); ?>" />
|
39 |
+
</td>
|
40 |
+
</tr>
|
41 |
+
</tfoot>
|
42 |
+
</table>
|
parts/rss_pi-log.php → app/templates/log.php
RENAMED
File without changes
|
app/templates/settings-table.php
ADDED
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<table class="widefat rss_pi-table" id="rss_pi-table">
|
2 |
+
<thead>
|
3 |
+
<tr>
|
4 |
+
<th colspan="5"><?php _e('Settings', 'rss_pi'); ?></th>
|
5 |
+
</tr>
|
6 |
+
</thead>
|
7 |
+
<tbody class="setting-rows">
|
8 |
+
<tr class="edit-row show">
|
9 |
+
<td colspan="4">
|
10 |
+
<table class="widefat edit-table">
|
11 |
+
<tr>
|
12 |
+
<td>
|
13 |
+
<label for="frequency"><?php _e('Frequency', "rss_pi"); ?></label>
|
14 |
+
<p class="description"><?php _e('How often will the import run.', "rss_pi"); ?></p>
|
15 |
+
</td>
|
16 |
+
<td>
|
17 |
+
<select name="frequency" id="frequency">
|
18 |
+
<?php $x = wp_get_schedules(); ?>
|
19 |
+
<?php foreach (array_keys($x) as $interval) : ?>
|
20 |
+
<option value="<?php echo $interval; ?>" <?php
|
21 |
+
if ($this->options['settings']['frequency'] == $interval) : echo('selected="selected"');
|
22 |
+
endif;
|
23 |
+
?>><?php echo $x[$interval]['display']; ?></option>
|
24 |
+
<?php endforeach; ?>
|
25 |
+
</select>
|
26 |
+
</td>
|
27 |
+
</tr>
|
28 |
+
<tr>
|
29 |
+
<td>
|
30 |
+
<label for="feeds_api_key"><?php _e('Full Text RSS Feed API Key', "rss_pi"); ?></label>
|
31 |
+
<p class="description">
|
32 |
+
<?php _e('Boost Your traffic with Full RSS Content - ', "rss_pi"); ?>
|
33 |
+
Request a Free 14 Days <a href="http://www.feedsapi.com/?utm_source=rsspi-full-rss-key-here" target="_blank"> Full RSS Key Here !</a>
|
34 |
+
</p>
|
35 |
+
</td>
|
36 |
+
<td>
|
37 |
+
<?php $feeds_api_key = isset($this->options['settings']["feeds_api_key"]) ? $this->options['settings']["feeds_api_key"] : ""; ?>
|
38 |
+
<input type="text" name="feeds_api_key" id="feeds_api_key" value="<?php echo $feeds_api_key; ?>" />
|
39 |
+
</td>
|
40 |
+
</tr>
|
41 |
+
|
42 |
+
<tr>
|
43 |
+
<td>
|
44 |
+
<label for="post_template"><?php _e('Template', 'rss_pi'); ?></label>
|
45 |
+
<p class="description"><?php _e('This is how the post will be formatted.', "rss_pi"); ?></p>
|
46 |
+
<p class="description">
|
47 |
+
<?php _e('Available tags:', "rss_pi"); ?>
|
48 |
+
<dl>
|
49 |
+
<dt><code>{$content}</code></dt>
|
50 |
+
<dt><code>{$permalink}</code></dt>
|
51 |
+
<dt><code>{$title}</code></dt>
|
52 |
+
<dt><code>{$feed_title}</code></dt>
|
53 |
+
<dt><code>{$excerpt:n}</code></dt>
|
54 |
+
</dl>
|
55 |
+
</p>
|
56 |
+
</td>
|
57 |
+
<td>
|
58 |
+
<textarea name="post_template" id="post_template" cols="30" rows="10"><?php
|
59 |
+
$value = (
|
60 |
+
$this->options['settings']['post_template'] != '' ? $this->options['settings']['post_template'] : '{$content}' . "\nSource: " . '{$feed_title}'
|
61 |
+
);
|
62 |
+
|
63 |
+
$value = str_replace(array('\r', '\n'), array(chr(13), chr(10)), $value);
|
64 |
+
|
65 |
+
echo stripslashes($value);
|
66 |
+
?></textarea>
|
67 |
+
</td>
|
68 |
+
</tr>
|
69 |
+
<tr>
|
70 |
+
<td>
|
71 |
+
<label for="post_template"><?php _e('Keywords Filter', 'rss_pi'); ?></label>
|
72 |
+
<p class="description"><?php _e('Enter keywords and/or regex, separated by commas', "rss_pi"); ?></p>
|
73 |
+
<p class="description">
|
74 |
+
<?php _e('Only posts matching these keywords/regex will be imported', "rss_pi"); ?>
|
75 |
+
</p>
|
76 |
+
</td>
|
77 |
+
<td>
|
78 |
+
<?php
|
79 |
+
$disabled = '';
|
80 |
+
if (!$this->is_key_valid) {
|
81 |
+
$disabled= ' disabled="disabled"';
|
82 |
+
$this->key_error($this->key_prompt, true);
|
83 |
+
}
|
84 |
+
?>
|
85 |
+
<textarea name="keyword_filter" id="post_template" cols="30" rows="10"<?php echo $disabled; ?>><?php
|
86 |
+
echo implode(', ', $this->options['settings']['keywords']);
|
87 |
+
?></textarea>
|
88 |
+
</td>
|
89 |
+
</tr>
|
90 |
+
<tr>
|
91 |
+
<td><label for="post_status"><?php _e('Post status', "rss_pi"); ?></label></td>
|
92 |
+
<td>
|
93 |
+
|
94 |
+
<select name="post_status" id="post_status">
|
95 |
+
<?php
|
96 |
+
$statuses = get_post_stati('', 'objects');
|
97 |
+
|
98 |
+
foreach ($statuses as $status) {
|
99 |
+
?>
|
100 |
+
<option value="<?php echo($status->name); ?>" <?php
|
101 |
+
if ($this->options['settings']['post_status'] == $status->name) : echo('selected="selected"');
|
102 |
+
endif;
|
103 |
+
?>><?php echo($status->label); ?></option>
|
104 |
+
<?php
|
105 |
+
}
|
106 |
+
?>
|
107 |
+
</select>
|
108 |
+
</td>
|
109 |
+
</tr>
|
110 |
+
<tr>
|
111 |
+
<td><?php _e('Author', 'rss_pi'); ?></td>
|
112 |
+
<td>
|
113 |
+
<?php
|
114 |
+
$args = array(
|
115 |
+
'id' => 'author_id',
|
116 |
+
'name' => 'author_id',
|
117 |
+
'selected' => $this->options['settings']['author_id']
|
118 |
+
);
|
119 |
+
wp_dropdown_users($args);
|
120 |
+
?>
|
121 |
+
</td>
|
122 |
+
</tr>
|
123 |
+
<tr>
|
124 |
+
<td><?php _e('Allow comments', "rss_pi"); ?></td>
|
125 |
+
<td>
|
126 |
+
<ul class="radiolist">
|
127 |
+
<li>
|
128 |
+
<label><input type="radio" id="allow_comments" name="allow_comments" value="true" <?php echo($this->options['settings']['allow_comments'] == true ? 'checked="checked"' : ''); ?> /> <?php _e('Yes', 'rss_pi'); ?></label>
|
129 |
+
</li>
|
130 |
+
<li>
|
131 |
+
<label><input type="radio" id="allow_comments" name="allow_comments" value="false" <?php echo($this->options['settings']['allow_comments'] == 'false' ? 'checked="checked"' : ''); ?> /> <?php _e('No', 'rss_pi'); ?></label>
|
132 |
+
</li>
|
133 |
+
</ul>
|
134 |
+
</td>
|
135 |
+
</tr>
|
136 |
+
<tr>
|
137 |
+
<td>
|
138 |
+
<?php _e('Enable logging?', "rss_pi"); ?>
|
139 |
+
<p class="description"><?php _e('The logfile can be found <a href="#" class="load-log">here</a>.', "rss_pi"); ?></p>
|
140 |
+
</td>
|
141 |
+
<td>
|
142 |
+
<ul class="radiolist">
|
143 |
+
<li>
|
144 |
+
<label><input type="radio" id="enable_logging" name="enable_logging" value="true" <?php echo($this->options['settings']['enable_logging'] == 'true' ? 'checked="checked"' : ''); ?> /> <?php _e('Yes', 'rss_pi'); ?></label>
|
145 |
+
</li>
|
146 |
+
<li>
|
147 |
+
<label><input type="radio" id="enable_logging" name="enable_logging" value="false" <?php echo($this->options['settings']['enable_logging'] == 'false' || $this->options['settings']['enable_logging'] == '' ? 'checked="checked"' : ''); ?> /> <?php _e('No', 'rss_pi'); ?></label>
|
148 |
+
</li>
|
149 |
+
</ul>
|
150 |
+
</td>
|
151 |
+
</tr>
|
152 |
+
</table>
|
153 |
+
</td>
|
154 |
+
</tr>
|
155 |
+
</tbody>
|
156 |
+
</table>
|
assets/rss-post-importer_280x600.jpg
DELETED
Binary file
|
index.php
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Plugin Name: Rss Post Importer
|
5 |
+
Plugin URI: https://wordpress.org/plugins/rss-post-importer/
|
6 |
+
Description: This plugin lets you set up an import posts from one or several rss-feeds and save them as posts on your site, simple and flexible.
|
7 |
+
Author: feedsapi
|
8 |
+
Version: 2.0
|
9 |
+
Author URI: https://www.feedsapi.org/
|
10 |
+
License: GPLv2 or later
|
11 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
+
Text Domain: rss_pi
|
13 |
+
Domain Path: /lang/
|
14 |
+
*/
|
15 |
+
|
16 |
+
|
17 |
+
// define some constants
|
18 |
+
if (!defined('RSS_PI_PATH')) {
|
19 |
+
define('RSS_PI_PATH', trailingslashit(plugin_dir_path(__FILE__)));
|
20 |
+
}
|
21 |
+
|
22 |
+
if (!defined('RSS_PI_URL')) {
|
23 |
+
define('RSS_PI_URL', trailingslashit(plugin_dir_url(__FILE__)));
|
24 |
+
}
|
25 |
+
|
26 |
+
if (!defined('RSS_PI_BASENAME')) {
|
27 |
+
define('RSS_PI_BASENAME', plugin_basename(__FILE__));
|
28 |
+
}
|
29 |
+
|
30 |
+
if (!defined('RSS_PI_VERSION')) {
|
31 |
+
define('RSS_PI_VERSION', '2.0');
|
32 |
+
}
|
33 |
+
|
34 |
+
if (!defined('RSS_PI_LOG_PATH')) {
|
35 |
+
define('RSS_PI_LOG_PATH', trailingslashit(WP_CONTENT_DIR) . 'rsspi-log/');
|
36 |
+
}
|
37 |
+
|
38 |
+
if(!is_dir(RSS_PI_LOG_PATH)){
|
39 |
+
mkdir(RSS_PI_LOG_PATH);
|
40 |
+
}
|
41 |
+
|
42 |
+
// helper classes
|
43 |
+
include_once RSS_PI_PATH . 'app/classes/helpers/class-rss-pi-log.php';
|
44 |
+
include_once RSS_PI_PATH . 'app/classes/helpers/class-rss-pi-featured-image.php';
|
45 |
+
include_once RSS_PI_PATH . 'app/classes/helpers/class-rss-pi-parser.php';
|
46 |
+
|
47 |
+
// admin classes
|
48 |
+
include_once RSS_PI_PATH . 'app/classes/admin/class-rss-pi-admin-processor.php';
|
49 |
+
include_once RSS_PI_PATH . 'app/classes/admin/class-rss-pi-admin.php';
|
50 |
+
|
51 |
+
// main importers
|
52 |
+
include_once RSS_PI_PATH . 'app/classes/import/class-rss-pi-engine.php';
|
53 |
+
include_once RSS_PI_PATH . 'app/classes/import/class-rss-pi-cron.php';
|
54 |
+
|
55 |
+
// the main loader class
|
56 |
+
include_once RSS_PI_PATH . 'app/class-rss-post-importer.php';
|
57 |
+
|
58 |
+
|
59 |
+
// initialise plugin as a global var
|
60 |
+
global $rss_post_importer;
|
61 |
+
|
62 |
+
$rss_post_importer = new rssPostImporter();
|
63 |
+
|
64 |
+
$rss_post_importer->init();
|
js/rss_pi.js
DELETED
@@ -1,84 +0,0 @@
|
|
1 |
-
(function($){
|
2 |
-
|
3 |
-
// Edit-buttons
|
4 |
-
$('body').delegate('a.toggle-edit', 'click', function() {
|
5 |
-
$('#edit_' + $(this).attr('data-target')).toggleClass('show');
|
6 |
-
$('#display_' + $(this).attr('data-target')).toggleClass('show');
|
7 |
-
return false;
|
8 |
-
});
|
9 |
-
|
10 |
-
// Delete-buttons
|
11 |
-
$('body').delegate('a.delete-row', 'click', function() {
|
12 |
-
$('#edit_' + $(this).attr('data-target')).remove();
|
13 |
-
$('#display_' + $(this).attr('data-target')).remove();
|
14 |
-
update_ids();
|
15 |
-
return false;
|
16 |
-
});
|
17 |
-
|
18 |
-
|
19 |
-
$('a.add-row').click(function() {
|
20 |
-
$.ajax({
|
21 |
-
type: 'POST',
|
22 |
-
url: rss_pi_ajax.ajaxurl,
|
23 |
-
data: ({
|
24 |
-
action: 'rss_pi_add_row'
|
25 |
-
}),
|
26 |
-
success: function(data) {
|
27 |
-
$('.rss-rows').append( data );
|
28 |
-
$('.empty_table').remove();
|
29 |
-
update_ids();
|
30 |
-
}
|
31 |
-
});
|
32 |
-
return false;
|
33 |
-
});
|
34 |
-
|
35 |
-
$('#save_and_import').click(function() {
|
36 |
-
$('#save_to_db').val('true');
|
37 |
-
});
|
38 |
-
|
39 |
-
$('a.load-log').click(function() {
|
40 |
-
$('#main_ui').hide();
|
41 |
-
$('.ajax_content').html( '<img src="/wp-admin/images/wpspin_light.gif" alt="" class="loader" />' );
|
42 |
-
$.ajax({
|
43 |
-
type: 'POST',
|
44 |
-
url: rss_pi_ajax.ajaxurl,
|
45 |
-
data: ({
|
46 |
-
action: 'rss_pi_load_log'
|
47 |
-
}),
|
48 |
-
success: function(data) {
|
49 |
-
$('.ajax_content').html( data );
|
50 |
-
}
|
51 |
-
});
|
52 |
-
return false;
|
53 |
-
});
|
54 |
-
|
55 |
-
$('body').delegate('a.show-main-ui', 'click', function() {
|
56 |
-
$('#main_ui').show();
|
57 |
-
$('.ajax_content').html('');
|
58 |
-
return false;
|
59 |
-
});
|
60 |
-
|
61 |
-
$('body').delegate('a.clear-log', 'click', function() {
|
62 |
-
$.ajax({
|
63 |
-
type: 'POST',
|
64 |
-
url: rss_pi_ajax.ajaxurl,
|
65 |
-
data: ({
|
66 |
-
action: 'rss_pi_clear_log'
|
67 |
-
}),
|
68 |
-
success: function(data) {
|
69 |
-
$('.log').html( data );
|
70 |
-
}
|
71 |
-
});
|
72 |
-
return false;
|
73 |
-
});
|
74 |
-
|
75 |
-
})(jQuery);
|
76 |
-
|
77 |
-
function update_ids()
|
78 |
-
{
|
79 |
-
ids = jQuery('input[name="id"]').map(function() {
|
80 |
-
return jQuery(this).val();
|
81 |
-
}).get().join();
|
82 |
-
|
83 |
-
jQuery('#ids').val(ids);
|
84 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lang/rss_pi-es_ES.mo
DELETED
Binary file
|
lang/rss_pi-es_ES.po
DELETED
@@ -1,212 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Rss Post Importer v1.0.3\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: \n"
|
6 |
-
"PO-Revision-Date: 2013-09-12 13:19:14+0000\n"
|
7 |
-
"Last-Translator: admin <jens@simmalugnt.se>\n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
-
"X-Generator: CSL v1.x\n"
|
14 |
-
"X-Poedit-Language: Spanish\n"
|
15 |
-
"X-Poedit-Country: SPAIN\n"
|
16 |
-
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
-
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
18 |
-
"X-Poedit-Basepath: ../\n"
|
19 |
-
"X-Poedit-Bookmarks: \n"
|
20 |
-
"X-Poedit-SearchPath-0: .\n"
|
21 |
-
"X-Textdomain-Support: yes"
|
22 |
-
|
23 |
-
#: parts/table_row.php:26
|
24 |
-
#@ default
|
25 |
-
msgid "Edit"
|
26 |
-
msgstr ""
|
27 |
-
|
28 |
-
#: parts/table_row.php:27
|
29 |
-
#@ default
|
30 |
-
msgid "Delete"
|
31 |
-
msgstr ""
|
32 |
-
|
33 |
-
#: parts/table_row.php:38
|
34 |
-
#: rss_pi-ui.php:43
|
35 |
-
#@ rss_pi
|
36 |
-
msgid "Feed name"
|
37 |
-
msgstr ""
|
38 |
-
|
39 |
-
#: parts/table_row.php:45
|
40 |
-
#: rss_pi-ui.php:44
|
41 |
-
#@ rss_pi
|
42 |
-
msgid "Feed url"
|
43 |
-
msgstr ""
|
44 |
-
|
45 |
-
#: parts/table_row.php:51
|
46 |
-
#: rss_pi-ui.php:45
|
47 |
-
#@ rss_pi
|
48 |
-
msgid "Max posts / import"
|
49 |
-
msgstr "Puestos / importación Máx"
|
50 |
-
|
51 |
-
#: parts/table_row.php:55
|
52 |
-
#: rss_pi-ui.php:46
|
53 |
-
#@ default
|
54 |
-
msgid "Category"
|
55 |
-
msgstr ""
|
56 |
-
|
57 |
-
#: parts/table_row.php:63
|
58 |
-
#: rss_pi-ui.php:156
|
59 |
-
#: rss_pi-ui.php:172
|
60 |
-
#@ default
|
61 |
-
msgid "Yes"
|
62 |
-
msgstr ""
|
63 |
-
|
64 |
-
#: parts/table_row.php:66
|
65 |
-
#: rss_pi-ui.php:159
|
66 |
-
#: rss_pi-ui.php:175
|
67 |
-
#@ default
|
68 |
-
msgid "No"
|
69 |
-
msgstr ""
|
70 |
-
|
71 |
-
#: parts/table_row.php:73
|
72 |
-
#@ default
|
73 |
-
msgid "Close"
|
74 |
-
msgstr ""
|
75 |
-
|
76 |
-
#: rss_pi-ui.php:22
|
77 |
-
#@ default
|
78 |
-
msgid "Save"
|
79 |
-
msgstr ""
|
80 |
-
|
81 |
-
#: rss_pi-ui.php:23
|
82 |
-
#@ rss_pi
|
83 |
-
msgid "Save and import"
|
84 |
-
msgstr "Guardar e importar"
|
85 |
-
|
86 |
-
#: rss_pi-ui.php:61
|
87 |
-
#@ rss_pi
|
88 |
-
msgid "You haven't specified any feeds to import yet, why don't you <a href=\"#\" class=\"add-row\">add one now</a>?"
|
89 |
-
msgstr "Usted no se ha especificado ninguna fuente para importar, sin embargo, ¿por qué no <a href=\"#\" class=\"add-row\"> agrega uno ahora </ a>?"
|
90 |
-
|
91 |
-
#: rss_pi-ui.php:71
|
92 |
-
#@ rss_pi
|
93 |
-
msgid "Add new feed"
|
94 |
-
msgstr "Añadir nuevo"
|
95 |
-
|
96 |
-
#: rss_pi-ui.php:83
|
97 |
-
#@ default
|
98 |
-
msgid "Settings"
|
99 |
-
msgstr ""
|
100 |
-
|
101 |
-
#: rss_pi-ui.php:92
|
102 |
-
#@ rss_pi
|
103 |
-
msgid "Frequency"
|
104 |
-
msgstr "Frecuencia"
|
105 |
-
|
106 |
-
#: rss_pi-ui.php:93
|
107 |
-
#@ rss_pi
|
108 |
-
msgid "How often will the import run."
|
109 |
-
msgstr "¿Con qué frecuencia se ejecutará la importación."
|
110 |
-
|
111 |
-
#: rss_pi-ui.php:106
|
112 |
-
#@ default
|
113 |
-
msgid "Template"
|
114 |
-
msgstr ""
|
115 |
-
|
116 |
-
#: rss_pi-ui.php:107
|
117 |
-
#@ rss_pi
|
118 |
-
msgid "This is how the post will be formatted."
|
119 |
-
msgstr "Así es como se formatea el mensaje."
|
120 |
-
|
121 |
-
#: rss_pi-ui.php:109
|
122 |
-
#@ rss_pi
|
123 |
-
msgid "Available tags:"
|
124 |
-
msgstr "Etiquetas disponibles:"
|
125 |
-
|
126 |
-
#: rss_pi-ui.php:121
|
127 |
-
#@ rss_pi
|
128 |
-
msgid "Post status"
|
129 |
-
msgstr "Publique estado"
|
130 |
-
|
131 |
-
#: rss_pi-ui.php:139
|
132 |
-
#@ default
|
133 |
-
msgid "Author"
|
134 |
-
msgstr ""
|
135 |
-
|
136 |
-
#: rss_pi-ui.php:152
|
137 |
-
#@ rss_pi
|
138 |
-
msgid "Allow comments"
|
139 |
-
msgstr "Permitir comentarios"
|
140 |
-
|
141 |
-
#: rss_pi.php:133
|
142 |
-
#@ default
|
143 |
-
msgid "Settings saved."
|
144 |
-
msgstr ""
|
145 |
-
|
146 |
-
#: rss_pi.php:141
|
147 |
-
#@ default
|
148 |
-
msgid "new posts imported."
|
149 |
-
msgstr ""
|
150 |
-
|
151 |
-
#: parts/table_row.php:59
|
152 |
-
#@ rss_pi
|
153 |
-
msgid "Strip html tags"
|
154 |
-
msgstr "Strip etiquetas HTML"
|
155 |
-
|
156 |
-
#: parts/rss_pi-log.php:2
|
157 |
-
#@ rss_pi
|
158 |
-
msgid "Rss post importer logs"
|
159 |
-
msgstr "Registros de importadores correos Rss"
|
160 |
-
|
161 |
-
#: parts/rss_pi-log.php:15
|
162 |
-
#@ rss_pi
|
163 |
-
msgid "Ok, all done"
|
164 |
-
msgstr "Ok, todo hecho"
|
165 |
-
|
166 |
-
#: parts/rss_pi-log.php:16
|
167 |
-
#@ rss_pi
|
168 |
-
msgid "Clear log"
|
169 |
-
msgstr "Borrar registro"
|
170 |
-
|
171 |
-
#: rss_pi-ui.php:3
|
172 |
-
#@ rss_pi
|
173 |
-
msgid "Rss Post Importer Settings"
|
174 |
-
msgstr ""
|
175 |
-
|
176 |
-
#: rss_pi-ui.php:16
|
177 |
-
#@ rss_pi
|
178 |
-
msgid "Latest import:"
|
179 |
-
msgstr "Últimas importación:"
|
180 |
-
|
181 |
-
#: rss_pi-ui.php:18
|
182 |
-
#@ rss_pi
|
183 |
-
msgid "View the log"
|
184 |
-
msgstr "Ver el registro"
|
185 |
-
|
186 |
-
#: rss_pi-ui.php:29
|
187 |
-
#, php-format
|
188 |
-
#@ rss_pi
|
189 |
-
msgid "%d posts imported and counting!"
|
190 |
-
msgstr "%d mensajes importados y contando!"
|
191 |
-
|
192 |
-
#: rss_pi-ui.php:166
|
193 |
-
#@ rss_pi
|
194 |
-
msgid "Enable logging?"
|
195 |
-
msgstr "Habilitar el registro?"
|
196 |
-
|
197 |
-
#: rss_pi-ui.php:167
|
198 |
-
#@ rss_pi
|
199 |
-
msgid "The logfile can be found <a href=\"#\" class=\"load-log\">here</a>."
|
200 |
-
msgstr "The logfile can be found <a href=\"#\" class=\"load-log\">here</a>."
|
201 |
-
|
202 |
-
#: rss_pi.php:38
|
203 |
-
#@ rss_pi
|
204 |
-
msgid "Log has been cleared."
|
205 |
-
msgstr "Iniciar ha sido borrada."
|
206 |
-
|
207 |
-
#: parts/rss_pi-log.php:7
|
208 |
-
#, php-format
|
209 |
-
#@ rss_pi
|
210 |
-
msgid "If your imports are not running regularly according to your settings you might need to set up a scheduled task, there are several ways to do this, most convenient is to set up a scheduled task on your server and simply ask it to hit your sites url (%s) regularly, there are also external sites that offer the same service, such as:"
|
211 |
-
msgstr "Si sus importaciones no están funcionando regularmente en función de la configuración que pueda necesitar para crear una tarea programada, hay varias maneras de hacer esto, más conveniente es crear una tarea programada en el servidor y simplemente preguntar a golpear a sus sitios url (%s) con regularidad, también hay sitios externos que ofrecen el mismo servicio, tales como:"
|
212 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lang/rss_pi-sv_SE.mo
DELETED
Binary file
|
lang/rss_pi-sv_SE.po
DELETED
@@ -1,212 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Rss Post Importer v1.0.3\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: \n"
|
6 |
-
"PO-Revision-Date: 2013-09-12 13:23:34+0000\n"
|
7 |
-
"Last-Translator: admin <jens@simmalugnt.se>\n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
-
"X-Generator: CSL v1.x\n"
|
14 |
-
"X-Poedit-Language: Swedish\n"
|
15 |
-
"X-Poedit-Country: SWEDEN\n"
|
16 |
-
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
-
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
18 |
-
"X-Poedit-Basepath: \n"
|
19 |
-
"X-Poedit-Bookmarks: \n"
|
20 |
-
"X-Poedit-SearchPath-0: .\n"
|
21 |
-
"X-Textdomain-Support: yes"
|
22 |
-
|
23 |
-
#: parts/table_row.php:26
|
24 |
-
#@ default
|
25 |
-
msgid "Edit"
|
26 |
-
msgstr ""
|
27 |
-
|
28 |
-
#: parts/table_row.php:27
|
29 |
-
#@ default
|
30 |
-
msgid "Delete"
|
31 |
-
msgstr ""
|
32 |
-
|
33 |
-
#: parts/table_row.php:38
|
34 |
-
#: rss_pi-ui.php:43
|
35 |
-
#@ rss_pi
|
36 |
-
msgid "Feed name"
|
37 |
-
msgstr "Flödesnamn"
|
38 |
-
|
39 |
-
#: parts/table_row.php:45
|
40 |
-
#: rss_pi-ui.php:44
|
41 |
-
#@ rss_pi
|
42 |
-
msgid "Feed url"
|
43 |
-
msgstr "Url"
|
44 |
-
|
45 |
-
#: parts/table_row.php:51
|
46 |
-
#: rss_pi-ui.php:45
|
47 |
-
#@ rss_pi
|
48 |
-
msgid "Max posts / import"
|
49 |
-
msgstr "Max poster / import"
|
50 |
-
|
51 |
-
#: parts/table_row.php:55
|
52 |
-
#: rss_pi-ui.php:46
|
53 |
-
#@ default
|
54 |
-
msgid "Category"
|
55 |
-
msgstr ""
|
56 |
-
|
57 |
-
#: rss_pi-ui.php:22
|
58 |
-
#@ default
|
59 |
-
msgid "Save"
|
60 |
-
msgstr ""
|
61 |
-
|
62 |
-
#: rss_pi-ui.php:23
|
63 |
-
#@ rss_pi
|
64 |
-
msgid "Save and import"
|
65 |
-
msgstr "Spara och importera"
|
66 |
-
|
67 |
-
#: rss_pi-ui.php:61
|
68 |
-
#@ rss_pi
|
69 |
-
msgid "You haven't specified any feeds to import yet, why don't you <a href=\"#\" class=\"add-row\">add one now</a>?"
|
70 |
-
msgstr "Du har inte lagt till några flöden att importera, varför inte <a href=\"#\" class=\"add-row\">lägga till ett nu</a>?"
|
71 |
-
|
72 |
-
#: rss_pi-ui.php:71
|
73 |
-
#@ rss_pi
|
74 |
-
msgid "Add new feed"
|
75 |
-
msgstr "Lägg till flöde"
|
76 |
-
|
77 |
-
#: rss_pi-ui.php:83
|
78 |
-
#@ default
|
79 |
-
msgid "Settings"
|
80 |
-
msgstr ""
|
81 |
-
|
82 |
-
#: rss_pi-ui.php:92
|
83 |
-
#@ rss_pi
|
84 |
-
msgid "Frequency"
|
85 |
-
msgstr "Frekvens"
|
86 |
-
|
87 |
-
#: rss_pi-ui.php:106
|
88 |
-
#@ default
|
89 |
-
msgid "Template"
|
90 |
-
msgstr ""
|
91 |
-
|
92 |
-
#: rss_pi-ui.php:121
|
93 |
-
#@ rss_pi
|
94 |
-
msgid "Post status"
|
95 |
-
msgstr "Post status"
|
96 |
-
|
97 |
-
#: rss_pi-ui.php:139
|
98 |
-
#@ default
|
99 |
-
msgid "Author"
|
100 |
-
msgstr ""
|
101 |
-
|
102 |
-
#: rss_pi-ui.php:152
|
103 |
-
#@ rss_pi
|
104 |
-
msgid "Allow comments"
|
105 |
-
msgstr "Tillåt kommentarer"
|
106 |
-
|
107 |
-
#: rss_pi.php:133
|
108 |
-
#@ default
|
109 |
-
msgid "Settings saved."
|
110 |
-
msgstr ""
|
111 |
-
|
112 |
-
#: rss_pi.php:141
|
113 |
-
#@ default
|
114 |
-
msgid "new posts imported."
|
115 |
-
msgstr ""
|
116 |
-
|
117 |
-
#: rss_pi-ui.php:93
|
118 |
-
#@ rss_pi
|
119 |
-
msgid "How often will the import run."
|
120 |
-
msgstr "Hur ofta skall importen köras?"
|
121 |
-
|
122 |
-
#: rss_pi-ui.php:107
|
123 |
-
#@ rss_pi
|
124 |
-
msgid "This is how the post will be formatted."
|
125 |
-
msgstr "Så här kommer innehållet formatteras."
|
126 |
-
|
127 |
-
#: rss_pi-ui.php:109
|
128 |
-
#@ rss_pi
|
129 |
-
msgid "Available tags:"
|
130 |
-
msgstr "Tillgängliga taggar:"
|
131 |
-
|
132 |
-
#: parts/table_row.php:63
|
133 |
-
#: rss_pi-ui.php:156
|
134 |
-
#: rss_pi-ui.php:172
|
135 |
-
#@ default
|
136 |
-
msgid "Yes"
|
137 |
-
msgstr ""
|
138 |
-
|
139 |
-
#: parts/table_row.php:66
|
140 |
-
#: rss_pi-ui.php:159
|
141 |
-
#: rss_pi-ui.php:175
|
142 |
-
#@ default
|
143 |
-
msgid "No"
|
144 |
-
msgstr ""
|
145 |
-
|
146 |
-
#: parts/table_row.php:59
|
147 |
-
#@ rss_pi
|
148 |
-
msgid "Strip html tags"
|
149 |
-
msgstr "Ta bort html-taggar"
|
150 |
-
|
151 |
-
#: parts/table_row.php:73
|
152 |
-
#@ default
|
153 |
-
msgid "Close"
|
154 |
-
msgstr ""
|
155 |
-
|
156 |
-
#: rss_pi-ui.php:166
|
157 |
-
#@ rss_pi
|
158 |
-
msgid "Enable logging?"
|
159 |
-
msgstr "Aktivera loggen?"
|
160 |
-
|
161 |
-
#: parts/rss_pi-log.php:15
|
162 |
-
#@ rss_pi
|
163 |
-
msgid "Ok, all done"
|
164 |
-
msgstr "Ok, klar"
|
165 |
-
|
166 |
-
#: parts/rss_pi-log.php:16
|
167 |
-
#@ rss_pi
|
168 |
-
msgid "Clear log"
|
169 |
-
msgstr "Rensa logg"
|
170 |
-
|
171 |
-
#: rss_pi-ui.php:3
|
172 |
-
#@ rss_pi
|
173 |
-
msgid "Rss Post Importer Settings"
|
174 |
-
msgstr "Rss Post Importer Inställningar"
|
175 |
-
|
176 |
-
#: rss_pi-ui.php:16
|
177 |
-
#@ rss_pi
|
178 |
-
msgid "Latest import:"
|
179 |
-
msgstr "Senaste import:"
|
180 |
-
|
181 |
-
#: rss_pi-ui.php:18
|
182 |
-
#@ rss_pi
|
183 |
-
msgid "View the log"
|
184 |
-
msgstr "Visa loggen"
|
185 |
-
|
186 |
-
#: rss_pi-ui.php:29
|
187 |
-
#, php-format
|
188 |
-
#@ rss_pi
|
189 |
-
msgid "%d posts imported and counting!"
|
190 |
-
msgstr "%d poster importerade!"
|
191 |
-
|
192 |
-
#: rss_pi-ui.php:167
|
193 |
-
#@ rss_pi
|
194 |
-
msgid "The logfile can be found <a href=\"#\" class=\"load-log\">here</a>."
|
195 |
-
msgstr "Du hittar loggfilen <a href=\"#\" class=\"load-log\">här</a>."
|
196 |
-
|
197 |
-
#: rss_pi.php:38
|
198 |
-
#@ rss_pi
|
199 |
-
msgid "Log has been cleared."
|
200 |
-
msgstr "Loggen rensad."
|
201 |
-
|
202 |
-
#: parts/rss_pi-log.php:7
|
203 |
-
#, php-format
|
204 |
-
#@ rss_pi
|
205 |
-
msgid "If your imports are not running regularly according to your settings you might need to set up a scheduled task, there are several ways to do this, most convenient is to set up a scheduled task on your server and simply ask it to hit your sites url (%s) regularly, there are also external sites that offer the same service, such as:"
|
206 |
-
msgstr "Om din import inte körs regelbundet enligt dina inställningar kan du testa att sätta upp en scheduled task som besöker din site(%s), via din server eller via något av nedanstående siter:"
|
207 |
-
|
208 |
-
#: parts/rss_pi-log.php:2
|
209 |
-
#@ rss_pi
|
210 |
-
msgid "Rss Post Importer Log"
|
211 |
-
msgstr "Rss Post Importer Logg"
|
212 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
log.txt
DELETED
File without changes
|
parts/table_row.php
DELETED
@@ -1,78 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$show = '';
|
3 |
-
|
4 |
-
if(!isset($f))
|
5 |
-
{
|
6 |
-
$f = array(
|
7 |
-
'id' => uniqid(),
|
8 |
-
'name' => 'New feed',
|
9 |
-
'url' => '',
|
10 |
-
'max_posts' => 5,
|
11 |
-
'category_id' => 1,
|
12 |
-
'strip_html' => 'false'
|
13 |
-
);
|
14 |
-
|
15 |
-
$show = 'show';
|
16 |
-
}
|
17 |
-
|
18 |
-
$category = get_the_category_by_ID( intval($f['category_id']) );
|
19 |
-
|
20 |
-
?>
|
21 |
-
|
22 |
-
<tr id="display_<?php echo ($f['id']); ?>" class="data-row <?php echo $show; ?>">
|
23 |
-
<td>
|
24 |
-
<strong><a href="#" class="toggle-edit" data-target="<?php echo ($f['id']); ?>"><?php echo $f['name']; ?></a></strong>
|
25 |
-
<div class="row-options">
|
26 |
-
<a href="#" class="toggle-edit" data-target="<?php echo ($f['id']); ?>"><?php _e('Edit'); ?></a> |
|
27 |
-
<a href="#" class="delete-row" data-target="<?php echo ($f['id']); ?>"><?php _e('Delete'); ?></a>
|
28 |
-
</div>
|
29 |
-
</td>
|
30 |
-
<td><?php echo $f['url']; ?></td>
|
31 |
-
<td><?php echo $f['max_posts']; ?></td>
|
32 |
-
<td><?php echo $category; ?></td>
|
33 |
-
</tr>
|
34 |
-
<tr id="edit_<?php echo ($f['id']); ?>" class="edit-row <?php echo $show; ?>">
|
35 |
-
<td colspan="4">
|
36 |
-
<table class="widefat edit-table">
|
37 |
-
<tr>
|
38 |
-
<td><label for="<?php echo ($f['id']); ?>-name"><?php _e("Feed name", 'rss_pi'); ?></label></td>
|
39 |
-
<td>
|
40 |
-
<input type="text" name="<?php echo ($f['id']); ?>-name" id="<?php echo ($f['id']); ?>-name" value="<?php echo ($f['name']); ?>" />
|
41 |
-
</td>
|
42 |
-
</tr>
|
43 |
-
<tr>
|
44 |
-
<td>
|
45 |
-
<label for="<?php echo ($f['id']); ?>"><?php _e("Feed url", 'rss_pi'); ?></label>
|
46 |
-
<p class="description">ie "http://news.google.com/?output=rss"</p>
|
47 |
-
</td>
|
48 |
-
<td><input type="text" name="<?php echo ($f['id']); ?>-url" id="<?php echo ($f['id']); ?>-url" value="<?php echo ($f['url']); ?>" /></td>
|
49 |
-
</tr>
|
50 |
-
<tr>
|
51 |
-
<td><label for=""><?php _e("Max posts / import", 'rss_pi'); ?></label></td>
|
52 |
-
<td><input type="number" name="<?php echo ($f['id']); ?>-max_posts" id="<?php echo ($f['id']); ?>-max_posts" value="<?php echo ($f['max_posts']); ?>" min="1" max="100" /></td>
|
53 |
-
</tr>
|
54 |
-
<tr>
|
55 |
-
<td><label for=""><?php _e("Category"); ?></label></td>
|
56 |
-
<td><?php wp_dropdown_categories( array('hide_empty' => 0, 'name' => 'select_name', 'hierarchical' => true, 'id' => $f['id'] . '-category_id', 'name' => $f['id'] . '-category_id', 'selected' => $f['category_id'] )); ?></td>
|
57 |
-
</tr>
|
58 |
-
<tr>
|
59 |
-
<td><label for=""><?php _e("Strip html tags", 'rss_pi'); ?></label></td>
|
60 |
-
<td>
|
61 |
-
<ul class="radiolist">
|
62 |
-
<li>
|
63 |
-
<label><input type="radio" id="<?php echo($f['id']); ?>-strip_html" name="<?php echo($f['id']); ?>-strip_html" value="true" <?php echo($f['strip_html'] == 'true' ? 'checked="checked"' : ''); ?> /> <?php _e('Yes'); ?></label>
|
64 |
-
</li>
|
65 |
-
<li>
|
66 |
-
<label><input type="radio" id="<?php echo($f['id']); ?>-strip_html" name="<?php echo($f['id']); ?>-strip_html" value="false" <?php echo($f['strip_html'] == 'false' ? 'checked="checked"' : ''); ?> /> <?php _e('No'); ?></label>
|
67 |
-
</li>
|
68 |
-
</ul>
|
69 |
-
</td>
|
70 |
-
</tr>
|
71 |
-
<tr>
|
72 |
-
<td><input type="hidden" name="id" value="<?php echo($f['id']); ?>" /></td>
|
73 |
-
<td><a id="close-edit-table" class="button button-large toggle-edit" data-target="<?php echo ($f['id']); ?>"><?php _e('Close'); ?></a></td>
|
74 |
-
</tr>
|
75 |
-
</table>
|
76 |
-
|
77 |
-
</td>
|
78 |
-
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
|
2 |
Contributors: feedsapi
|
3 |
Donate link: https://www.feedsapi.org/
|
4 |
Tags: rss, feeds, import, feed, autoblog, feed aggregation, rss-feed, aggregation, atom, feed, rss, syndication, FeedWordPress, autoblog aggregator, Autoblogger, autoblogging, feed import, rss multi importer, feed reader, feed to post, multi feed import, multi feed importer, multi import, multi rss feeds, multiple feed import, multiple feeds, multiple rss feeds, rss, rss aggregator, rss feader, RSS import, rss to post, content curation, RSS Retriever, RSS fetch feed, WP RSS Aggregator, AutoPost, RSS Feed to Post,
|
5 |
RSSImport, yahoo pipes, WP Pipes, Import XML feed , FeedSyndicate, RSSpost, RSS in Page
|
6 |
Requires at least: 3.5
|
7 |
Tested up to: 4.0
|
8 |
-
Stable tag:
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -19,7 +19,9 @@ RSS Post Importer is the Most Powerful & Easy to use WordPress RSS Aggregator pl
|
|
19 |
|
20 |
**The RSS Post Importer plugin fetchs an RSS feed and publishes the full article content of each Feed Item as stand-alone post.**
|
21 |
|
22 |
-
Content syndication allows a blogger to import an rss feed from other blogs in his niche, allowing him to share relevant content with his readers, with far less of a time commitment than writing his own posts or scheduling guest bloggers and ghost writers.
|
|
|
|
|
23 |
|
24 |
**RSS Post Importer** handles all of that, it will import and publish Full Text RSS Posts from one or several RSS feeds sources to your WordPress blog on Auto-pilot while you are laying on the beach of doing some other work, making your blogging, content syndication strategy & autoblogging life much more easier!
|
25 |
|
@@ -36,9 +38,27 @@ Not only does this WordPress RSS Aggregator Plugin import a snippet of the rss f
|
|
36 |
* Set what author to assign imported content to.
|
37 |
* Simple template for formatting imported content.
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
When you start importing rss feeds as a part of your content backup, autoblogging or blogging strategy, you'll be able to reap the benefits of increased content and a larger fan base, which will translate into more traffic and more revenue or dollars for your business!
|
40 |
|
41 |
-
|
42 |
WP-o-Matic , WP-o-Matic, RSSImport, FeedWordPress, Syndicate Press, FeedWeb, RSS Just Better, CyberSyn, CSV 2 Post, Simple Feed Copyright, WP Syndicate, HungryFEED, WP Pipes and many other I can't list here. **RSS Post Importer imports data from a feed and saves it as full stand alone posts.**
|
43 |
|
44 |
== Installation ==
|
@@ -47,12 +67,21 @@ WP-o-Matic , WP-o-Matic, RSSImport, FeedWordPress, Syndicate Press, FeedWeb, RSS
|
|
47 |
1. Activate the plugin through the 'Plugins' menu in WordPress
|
48 |
1. Set up what feeds to import and when!
|
49 |
|
|
|
|
|
50 |
== Screenshots ==
|
51 |
|
52 |
1. This is the combined settings- and feed-management-screen.
|
53 |
|
54 |
== Change Log ==
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
= Version 1.0.10 =
|
57 |
* Fixed replacement shortcodes
|
58 |
|
1 |
+
=== RSS Post Importer ===
|
2 |
Contributors: feedsapi
|
3 |
Donate link: https://www.feedsapi.org/
|
4 |
Tags: rss, feeds, import, feed, autoblog, feed aggregation, rss-feed, aggregation, atom, feed, rss, syndication, FeedWordPress, autoblog aggregator, Autoblogger, autoblogging, feed import, rss multi importer, feed reader, feed to post, multi feed import, multi feed importer, multi import, multi rss feeds, multiple feed import, multiple feeds, multiple rss feeds, rss, rss aggregator, rss feader, RSS import, rss to post, content curation, RSS Retriever, RSS fetch feed, WP RSS Aggregator, AutoPost, RSS Feed to Post,
|
5 |
RSSImport, yahoo pipes, WP Pipes, Import XML feed , FeedSyndicate, RSSpost, RSS in Page
|
6 |
Requires at least: 3.5
|
7 |
Tested up to: 4.0
|
8 |
+
Stable tag: 2.0
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
19 |
|
20 |
**The RSS Post Importer plugin fetchs an RSS feed and publishes the full article content of each Feed Item as stand-alone post.**
|
21 |
|
22 |
+
Content syndication allows a blogger to import an rss feed from other blogs in his niche, allowing him to share relevant content with his readers, with far less of a time commitment than writing his own posts or scheduling guest bloggers and ghost writers. RSS Post Importer is very easy to install, here's how:
|
23 |
+
|
24 |
+
[vimeo https://vimeo.com/113134777]
|
25 |
|
26 |
**RSS Post Importer** handles all of that, it will import and publish Full Text RSS Posts from one or several RSS feeds sources to your WordPress blog on Auto-pilot while you are laying on the beach of doing some other work, making your blogging, content syndication strategy & autoblogging life much more easier!
|
27 |
|
38 |
* Set what author to assign imported content to.
|
39 |
* Simple template for formatting imported content.
|
40 |
|
41 |
+
**Premium Features include:**
|
42 |
+
|
43 |
+
* Full Text RSS Feeds
|
44 |
+
* Automated Featured images.
|
45 |
+
* Keywords Based Filters and Curation .
|
46 |
+
* RegEx Based Filters and Curation.
|
47 |
+
* Define the number of Words Your Excerpt should have.
|
48 |
+
* Fetch Full Text Articles + Images from Truncated Feeds.
|
49 |
+
* Assign Any Imported RSS Feed Stream to a specific Author.
|
50 |
+
|
51 |
+
**Don't take my word for it, here's how easy to use it is:**
|
52 |
+
|
53 |
+
[vimeo https://vimeo.com/113796278]
|
54 |
+
|
55 |
+
|
56 |
+
**You should watch this video tutorial**
|
57 |
+
|
58 |
+
|
59 |
When you start importing rss feeds as a part of your content backup, autoblogging or blogging strategy, you'll be able to reap the benefits of increased content and a larger fan base, which will translate into more traffic and more revenue or dollars for your business!
|
60 |
|
61 |
+
**PS**: By the way, this RSS Aggregator plugin is not a shortcode for just displaying a bunch of links from an rss feeds like some of the following plugins:
|
62 |
WP-o-Matic , WP-o-Matic, RSSImport, FeedWordPress, Syndicate Press, FeedWeb, RSS Just Better, CyberSyn, CSV 2 Post, Simple Feed Copyright, WP Syndicate, HungryFEED, WP Pipes and many other I can't list here. **RSS Post Importer imports data from a feed and saves it as full stand alone posts.**
|
63 |
|
64 |
== Installation ==
|
67 |
1. Activate the plugin through the 'Plugins' menu in WordPress
|
68 |
1. Set up what feeds to import and when!
|
69 |
|
70 |
+
[vimeo https://vimeo.com/113134777]
|
71 |
+
|
72 |
== Screenshots ==
|
73 |
|
74 |
1. This is the combined settings- and feed-management-screen.
|
75 |
|
76 |
== Change Log ==
|
77 |
|
78 |
+
= Version 2.0 =
|
79 |
+
* Re-factored and rewritten almost all code
|
80 |
+
* Fixed featured image and shortcode placeholders
|
81 |
+
* Added support for keyword/regex based filtering
|
82 |
+
* Added support for per feed author
|
83 |
+
* Update readme
|
84 |
+
|
85 |
= Version 1.0.10 =
|
86 |
* Fixed replacement shortcodes
|
87 |
|
rss_pi-ui.php
DELETED
@@ -1,227 +0,0 @@
|
|
1 |
-
<div class="wrap">
|
2 |
-
<div id="main_ui">
|
3 |
-
<h2><?php _e("Rss Post Importer Settings", 'rss_pi'); ?></h2>
|
4 |
-
<form method="post" id="">
|
5 |
-
<input type="hidden" name="save_to_db" id="save_to_db" />
|
6 |
-
<?php wp_nonce_field('settings_page', 'rss_pi_nonce'); ?>
|
7 |
-
<div id="poststuff">
|
8 |
-
<div id="post-body" class="metabox-holder columns-2">
|
9 |
-
<div id="postbox-container-1" class="postbox-container">
|
10 |
-
<div class="postbox">
|
11 |
-
<div class="inside">
|
12 |
-
<div class="misc-pub-section">
|
13 |
-
<h3 class="version">V. <?php echo ($this->settings['version']); ?></h3>
|
14 |
-
<ul>
|
15 |
-
<li>
|
16 |
-
<i class="icon-calendar"></i> <?php _e("Latest import:", 'rss_pi'); ?> <strong><?php echo($options['latest_import']); ?></strong>
|
17 |
-
</li>
|
18 |
-
<li><i class="icon-eye-open"></i> <a href="#" class="load-log"><?php _e("View the log", 'rss_pi'); ?></a></li>
|
19 |
-
</ul>
|
20 |
-
</div>
|
21 |
-
<div id="major-publishing-actions">
|
22 |
-
<input class="button button-primary button-large right" type="submit" name="info_update" value="<?php _e('Save'); ?>" />
|
23 |
-
<input class="button button-large" type="submit" name="info_update" value="<?php _e('Save and import', "rss_pi"); ?>" id="save_and_import" />
|
24 |
-
</div>
|
25 |
-
</div>
|
26 |
-
</div>
|
27 |
-
<?php if ($options['imports'] > 10) : ?>
|
28 |
-
<div class="rate-box">
|
29 |
-
<h4><?php printf(__('%d posts imported and counting!', "rss_pi"), $options['imports']); ?></h4>
|
30 |
-
<i class="icon-star"></i>
|
31 |
-
<i class="icon-star"></i>
|
32 |
-
<i class="icon-star"></i>
|
33 |
-
<i class="icon-star"></i>
|
34 |
-
<i class="icon-star"></i>
|
35 |
-
<p class="description"><a href="http://wordpress.org/plugins/rss-post-importer/" target="_blank">Please support this plugin by rating it!</a></p>
|
36 |
-
</div>
|
37 |
-
<?php endif; ?>
|
38 |
-
|
39 |
-
<?php $banner_url = plugins_url("/rss-post-importer/assets/rss-post-importer_280x600.jpg");?>
|
40 |
-
<a target="_blank" href="http://www.feedsapi.com/?utm=rsspostimporter_banner">
|
41 |
-
<img class='rss_pi_banner_img' src="<?php echo $banner_url; ?>" />
|
42 |
-
</a>
|
43 |
-
</div>
|
44 |
-
<div id="postbox-container-2" class="postbox-container">
|
45 |
-
<table class="widefat rss_pi-table" id="rss_pi-table">
|
46 |
-
<thead>
|
47 |
-
<tr>
|
48 |
-
<th><?php _e("Feed name", 'rss_pi'); ?></th>
|
49 |
-
<th><?php _e("Feed url", 'rss_pi'); ?></th>
|
50 |
-
<th><?php _e("Max posts / import", 'rss_pi'); ?></th>
|
51 |
-
<th><?php _e("Category"); ?></th>
|
52 |
-
</tr>
|
53 |
-
</thead>
|
54 |
-
<tbody class="rss-rows">
|
55 |
-
<?php
|
56 |
-
if (is_array($options['feeds']) && count($options['feeds']) > 0) :
|
57 |
-
foreach ($options['feeds'] as $f) :
|
58 |
-
$category = get_the_category($f['category_id']);
|
59 |
-
array_push($ids, $f['id']);
|
60 |
-
include( plugin_dir_path(__FILE__) . 'parts/table_row.php');
|
61 |
-
endforeach;
|
62 |
-
else :
|
63 |
-
?>
|
64 |
-
<tr>
|
65 |
-
<td colspan="4" class="empty_table">
|
66 |
-
<?php _e('You haven\'t specified any feeds to import yet, why don\'t you <a href="#" class="add-row">add one now</a>?', "rss_pi"); ?>
|
67 |
-
</td>
|
68 |
-
</tr>
|
69 |
-
<?php
|
70 |
-
endif
|
71 |
-
?>
|
72 |
-
</tbody>
|
73 |
-
<tfoot>
|
74 |
-
<tr>
|
75 |
-
<td colspan="4">
|
76 |
-
<a href="#" class="button button-large button-primary add-row"><?php _e('Add new feed', "rss_pi"); ?></a>
|
77 |
-
<input type="hidden" name="ids" id="ids" value="<?php echo(join($ids, ',')); ?>" />
|
78 |
-
</td>
|
79 |
-
</tr>
|
80 |
-
</tfoot>
|
81 |
-
</table>
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
<table class="widefat rss_pi-table" id="rss_pi-table">
|
86 |
-
<thead>
|
87 |
-
<tr>
|
88 |
-
<th colspan="5"><?php _e('Settings'); ?></th>
|
89 |
-
</tr>
|
90 |
-
</thead>
|
91 |
-
<tbody class="setting-rows">
|
92 |
-
<tr class="edit-row show">
|
93 |
-
<td colspan="4">
|
94 |
-
<table class="widefat edit-table">
|
95 |
-
<tr>
|
96 |
-
<td>
|
97 |
-
<label for="frequency"><?php _e('Frequency', "rss_pi"); ?></label>
|
98 |
-
<p class="description"><?php _e('How often will the import run.', "rss_pi"); ?></p>
|
99 |
-
</td>
|
100 |
-
<td>
|
101 |
-
<select name="frequency" id="frequency">
|
102 |
-
<?php $x = wp_get_schedules(); ?>
|
103 |
-
<?php foreach (array_keys($x) as $interval) : ?>
|
104 |
-
<option value="<?php echo $interval; ?>" <?php
|
105 |
-
if ($options['settings']['frequency'] == $interval) : echo('selected="selected"');
|
106 |
-
endif;
|
107 |
-
?>><?php echo $x[$interval]['display']; ?></option>
|
108 |
-
<?php endforeach; ?>
|
109 |
-
</select>
|
110 |
-
</td>
|
111 |
-
</tr>
|
112 |
-
<tr>
|
113 |
-
<td>
|
114 |
-
<label for="feeds_api_key"><?php _e('Full Text RSS Feed API Key', "rss_pi"); ?></label>
|
115 |
-
<p class="description">
|
116 |
-
<?php _e('Boost Your traffic with Full RSS Content - ', "rss_pi"); ?>
|
117 |
-
Request a Free 14 Days <a href="http://www.feedsapi.com/?utm_source=rsspi-full-rss-key-here" target="_blank"> Full RSS Key Here !</a>
|
118 |
-
</p>
|
119 |
-
</td>
|
120 |
-
<td>
|
121 |
-
<?php $feeds_api_key = isset($options['settings']["feeds_api_key"]) ? $options['settings']["feeds_api_key"] : ""; ?>
|
122 |
-
<input type="text" name="feeds_api_key" id="feeds_api_key" value="<?php echo $feeds_api_key; ?>" />
|
123 |
-
</td>
|
124 |
-
</tr>
|
125 |
-
|
126 |
-
<tr>
|
127 |
-
<td>
|
128 |
-
<label for="post_template"><?php _e('Template'); ?></label>
|
129 |
-
<p class="description"><?php _e('This is how the post will be formatted.', "rss_pi"); ?></p>
|
130 |
-
<p class="description">
|
131 |
-
<?php _e('Available tags:', "rss_pi"); ?>
|
132 |
-
<code>{$content}</code>
|
133 |
-
<code>{$permalink}</code>
|
134 |
-
<code>{$title}</code>
|
135 |
-
<code>{$feed_title}</code>
|
136 |
-
<code>{$excerpt:n}</code>
|
137 |
-
</p>
|
138 |
-
</td>
|
139 |
-
<td>
|
140 |
-
<textarea name="post_template" id="post_template" cols="30" rows="10"><?php
|
141 |
-
$value = (
|
142 |
-
$options['settings']['post_template'] != ''
|
143 |
-
? $options['settings']['post_template']
|
144 |
-
: '{$content}' . "\nSource: " . '{$feed_title}'
|
145 |
-
);
|
146 |
-
|
147 |
-
$value = str_replace(array('\r', '\n'), array(chr(13), chr(10)), $value);
|
148 |
-
|
149 |
-
echo stripslashes($value);
|
150 |
-
?></textarea>
|
151 |
-
</td>
|
152 |
-
</tr>
|
153 |
-
<tr>
|
154 |
-
<td><label for="post_status"><?php _e('Post status', "rss_pi"); ?></label></td>
|
155 |
-
<td>
|
156 |
-
|
157 |
-
<select name="post_status" id="post_status">
|
158 |
-
<?php
|
159 |
-
$statuses = get_post_stati('', 'objects');
|
160 |
-
|
161 |
-
foreach ($statuses as $status) {
|
162 |
-
?>
|
163 |
-
<option value="<?php echo($status->name); ?>" <?php
|
164 |
-
if ($options['settings']['post_status'] == $status->name) : echo('selected="selected"');
|
165 |
-
endif;
|
166 |
-
?>><?php echo($status->label); ?></option>
|
167 |
-
<?php
|
168 |
-
}
|
169 |
-
?>
|
170 |
-
</select>
|
171 |
-
</td>
|
172 |
-
</tr>
|
173 |
-
<tr>
|
174 |
-
<td><?php _e('Author'); ?></td>
|
175 |
-
<td>
|
176 |
-
<?php
|
177 |
-
$args = array(
|
178 |
-
'id' => 'author_id',
|
179 |
-
'name' => 'author_id',
|
180 |
-
'selected' => $options['settings']['author_id']
|
181 |
-
);
|
182 |
-
wp_dropdown_users($args);
|
183 |
-
?>
|
184 |
-
</td>
|
185 |
-
</tr>
|
186 |
-
<tr>
|
187 |
-
<td><?php _e('Allow comments', "rss_pi"); ?></td>
|
188 |
-
<td>
|
189 |
-
<ul class="radiolist">
|
190 |
-
<li>
|
191 |
-
<label><input type="radio" id="allow_comments" name="allow_comments" value="true" <?php echo($options['settings']['allow_comments'] == 'true' || $options['settings']['allow_comments'] == '' ? 'checked="checked"' : ''); ?> /> <?php _e('Yes'); ?></label>
|
192 |
-
</li>
|
193 |
-
<li>
|
194 |
-
<label><input type="radio" id="allow_comments" name="allow_comments" value="false" <?php echo($options['settings']['allow_comments'] == 'false' ? 'checked="checked"' : ''); ?> /> <?php _e('No'); ?></label>
|
195 |
-
</li>
|
196 |
-
</ul>
|
197 |
-
</td>
|
198 |
-
</tr>
|
199 |
-
<tr>
|
200 |
-
<td>
|
201 |
-
<?php _e('Enable logging?', "rss_pi"); ?>
|
202 |
-
<p class="description"><?php _e('The logfile can be found <a href="#" class="load-log">here</a>.', "rss_pi"); ?></p>
|
203 |
-
</td>
|
204 |
-
<td>
|
205 |
-
<ul class="radiolist">
|
206 |
-
<li>
|
207 |
-
<label><input type="radio" id="enable_logging" name="enable_logging" value="true" <?php echo($options['settings']['enable_logging'] == 'true' ? 'checked="checked"' : ''); ?> /> <?php _e('Yes'); ?></label>
|
208 |
-
</li>
|
209 |
-
<li>
|
210 |
-
<label><input type="radio" id="enable_logging" name="enable_logging" value="false" <?php echo($options['settings']['enable_logging'] == 'false' || $options['settings']['enable_logging'] == '' ? 'checked="checked"' : ''); ?> /> <?php _e('No'); ?></label>
|
211 |
-
</li>
|
212 |
-
</ul>
|
213 |
-
</td>
|
214 |
-
</tr>
|
215 |
-
</table>
|
216 |
-
</td>
|
217 |
-
</tr>
|
218 |
-
</tbody>
|
219 |
-
</table>
|
220 |
-
</div>
|
221 |
-
</div>
|
222 |
-
<br class="clear" />
|
223 |
-
</div>
|
224 |
-
</form>
|
225 |
-
</div>
|
226 |
-
<div class="ajax_content"></div>
|
227 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rss_pi.php
DELETED
@@ -1,436 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Rss Post Importer
|
4 |
-
Plugin URI: https://wordpress.org/plugins/rss-post-importer/
|
5 |
-
Description: This plugin lets you set up an import posts from one or several rss-feeds and save them as posts on your site, simple and flexible.
|
6 |
-
Author: feedsapi
|
7 |
-
Version: 1.0.10
|
8 |
-
Author URI: https://www.feedsapi.org/
|
9 |
-
License: GPLv2 or later
|
10 |
-
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
-
*/
|
12 |
-
|
13 |
-
add_action('wp_ajax_rss_pi_add_row', 'rss_pi_add_row');
|
14 |
-
add_action('wp_ajax_rss_pi_load_log', 'rss_pi_load_log');
|
15 |
-
add_action('wp_ajax_rss_pi_clear_log', 'rss_pi_clear_log');
|
16 |
-
|
17 |
-
function rss_pi_add_row() {
|
18 |
-
include( plugin_dir_path(__FILE__) . 'parts/table_row.php');
|
19 |
-
exit;
|
20 |
-
}
|
21 |
-
|
22 |
-
function rss_pi_load_log() {
|
23 |
-
$log = file_get_contents(plugin_dir_path(__FILE__) . 'log.txt');
|
24 |
-
include( plugin_dir_path(__FILE__) . 'parts/rss_pi-log.php');
|
25 |
-
|
26 |
-
exit;
|
27 |
-
}
|
28 |
-
|
29 |
-
function rss_pi_clear_log() {
|
30 |
-
$log_file = plugin_dir_path(__FILE__) . 'log.txt';
|
31 |
-
|
32 |
-
file_put_contents($log_file, '');
|
33 |
-
?>
|
34 |
-
<div id="message" class="updated">
|
35 |
-
<p><strong><?php _e('Log has been cleared.', "rss_pi"); ?></strong></p>
|
36 |
-
</div>
|
37 |
-
<?php
|
38 |
-
exit;
|
39 |
-
}
|
40 |
-
|
41 |
-
class rss_pi {
|
42 |
-
|
43 |
-
function __construct() {
|
44 |
-
add_action('admin_menu', array(&$this, 'admin_menu'));
|
45 |
-
|
46 |
-
$this->settings = array(
|
47 |
-
'version' => '1.0.10',
|
48 |
-
'dir' => plugin_dir_path(__FILE__)
|
49 |
-
);
|
50 |
-
|
51 |
-
load_textdomain('rss_pi', $this->settings['dir'] . 'lang/rss_pi-' . get_locale() . '.mo');
|
52 |
-
|
53 |
-
add_action('wp', array(&$this, 'rss_pi_setup_schedule'));
|
54 |
-
add_action('rss_pi_cron', array(&$this, 'rss_pi_do_this_hourly'));
|
55 |
-
}
|
56 |
-
|
57 |
-
// On an early action hook, check if the hook is scheduled - if not, schedule it.
|
58 |
-
function rss_pi_setup_schedule() {
|
59 |
-
if (!wp_next_scheduled('rss_pi_cron')) {
|
60 |
-
wp_schedule_event(time(), 'hourly', 'rss_pi_cron');
|
61 |
-
}
|
62 |
-
}
|
63 |
-
|
64 |
-
// On the scheduled action hook, run a function.
|
65 |
-
function rss_pi_do_this_hourly() {
|
66 |
-
$this->import_all_feeds();
|
67 |
-
}
|
68 |
-
|
69 |
-
// Add to settings-menu
|
70 |
-
function admin_menu() {
|
71 |
-
add_options_page('Rss Post Importer', 'Rss Post Importer', 'manage_options', 'rss_pi', array($this, 'settings_page'));
|
72 |
-
}
|
73 |
-
|
74 |
-
function settings_page() {
|
75 |
-
// If logpage is requested
|
76 |
-
if (isset($_GET['show'])) {
|
77 |
-
// Display the logpage
|
78 |
-
$do = $_GET['show'];
|
79 |
-
if ($do == 'log') {
|
80 |
-
die($this->log_page());
|
81 |
-
}
|
82 |
-
}
|
83 |
-
// Changes submitted, check for correct nonce
|
84 |
-
if (isset($_POST['info_update']) && wp_verify_nonce($_POST['rss_pi_nonce'], 'settings_page')) :
|
85 |
-
|
86 |
-
// Get ids of feed-rows
|
87 |
-
$ids = explode(",", $_POST['ids']);
|
88 |
-
|
89 |
-
$feeds = array();
|
90 |
-
|
91 |
-
// Get selected settings for all imported posts
|
92 |
-
$settings = array(
|
93 |
-
'frequency' => $_POST['frequency'],
|
94 |
-
'feeds_api_key' => $_POST['feeds_api_key'],
|
95 |
-
'post_template' => stripslashes_deep($_POST['post_template']),
|
96 |
-
'post_status' => $_POST['post_status'],
|
97 |
-
'author_id' => $_POST['author_id'],
|
98 |
-
'allow_comments' => $_POST['allow_comments'],
|
99 |
-
'enable_logging' => $_POST['enable_logging']
|
100 |
-
);
|
101 |
-
|
102 |
-
$this->is_correct_api($_POST['feeds_api_key']);
|
103 |
-
|
104 |
-
// If cron settings have changed
|
105 |
-
if (wp_get_schedule('rss_pi_cron') != $settings['frequency']) {
|
106 |
-
// Reset cron
|
107 |
-
wp_clear_scheduled_hook('rss_pi_cron');
|
108 |
-
wp_schedule_event(time(), $settings['frequency'], 'rss_pi_cron');
|
109 |
-
}
|
110 |
-
|
111 |
-
// Loop through feed-rows
|
112 |
-
foreach ($ids as $id) {
|
113 |
-
if ($id) {
|
114 |
-
array_push($feeds, array(
|
115 |
-
'id' => $id,
|
116 |
-
'url' => strtolower($_POST[$id . '-url']),
|
117 |
-
'name' => $_POST[$id . '-name'],
|
118 |
-
'max_posts' => $_POST[$id . '-max_posts'],
|
119 |
-
'category_id' => $_POST[$id . '-category_id'],
|
120 |
-
'strip_html' => $_POST[$id . '-strip_html']
|
121 |
-
));
|
122 |
-
}
|
123 |
-
}
|
124 |
-
|
125 |
-
$options = $this->rss_pi_get_option();
|
126 |
-
|
127 |
-
update_option('rss_pi_feeds', array('feeds' => $feeds, 'settings' => $settings, 'latest_import' => $options['latest_import'], 'imports' => $options['imports']));
|
128 |
-
?>
|
129 |
-
<div id="message" class="updated">
|
130 |
-
<p><strong><?php _e('Settings saved.') ?></strong></p>
|
131 |
-
</div>
|
132 |
-
<?php
|
133 |
-
if ($_POST['save_to_db'] == 'true') :
|
134 |
-
$imported = $this->import_all_feeds();
|
135 |
-
?>
|
136 |
-
<div id="message" class="updated">
|
137 |
-
<p><strong><?php echo($imported); ?> <?php _e('new posts imported.') ?></strong></p>
|
138 |
-
</div>
|
139 |
-
<?php
|
140 |
-
endif;
|
141 |
-
endif;
|
142 |
-
|
143 |
-
$options = $this->rss_pi_get_option();
|
144 |
-
|
145 |
-
$ids = array();
|
146 |
-
|
147 |
-
// Load js and css
|
148 |
-
$this->input_admin_enqueue_scripts();
|
149 |
-
|
150 |
-
include( $this->settings['dir'] . 'rss_pi-ui.php');
|
151 |
-
}
|
152 |
-
|
153 |
-
function import_feed($url, $feed_title, $max_posts, $category_id, $strip_html, $save_to_db) {
|
154 |
-
include_once( ABSPATH . WPINC . '/feed.php' );
|
155 |
-
|
156 |
-
$options = $this->rss_pi_get_option();
|
157 |
-
|
158 |
-
$rss = "";
|
159 |
-
|
160 |
-
//if api key has been saved by user and is not empty
|
161 |
-
if (isset($options['settings']["feeds_api_key"]) && $options['settings']["feeds_api_key"]) {
|
162 |
-
|
163 |
-
$feeds_api_key = $options['settings']["feeds_api_key"];
|
164 |
-
|
165 |
-
$feedsapi_url = "http://www.feedsapi.org/fetch.php?key=" . $feeds_api_key . "&url=" . $url;
|
166 |
-
|
167 |
-
/* DEBUGGING
|
168 |
-
|
169 |
-
touch("newfile.txt");
|
170 |
-
$myfile = fopen("newfile.txt", "w") or die("Unable to open file!");
|
171 |
-
$txt = print_r($options, true)."\n".$feeds_api_key."\n".$feedsapi_url;
|
172 |
-
fwrite($myfile, $txt);
|
173 |
-
fclose($myfile);
|
174 |
-
|
175 |
-
*/
|
176 |
-
// Get a SimplePie feed object from the specified feed source.
|
177 |
-
|
178 |
-
$rss = fetch_feed($feedsapi_url);
|
179 |
-
} else {
|
180 |
-
|
181 |
-
$rss = fetch_feed($url);
|
182 |
-
}
|
183 |
-
|
184 |
-
// Remove the surrounding <div> from XHTML content in Atom feeds.
|
185 |
-
|
186 |
-
if (!is_wp_error($rss)) : // Checks that the object is created correctly
|
187 |
-
// Figure out how many total items there are, but limit it to 5.
|
188 |
-
$maxitems = $rss->get_item_quantity($max_posts);
|
189 |
-
|
190 |
-
// Build an array of all the items, starting with element 0 (first element).
|
191 |
-
$rss_items = $rss->get_items(0, $max_posts);
|
192 |
-
|
193 |
-
if ($save_to_db) {
|
194 |
-
$saved_posts = array();
|
195 |
-
|
196 |
-
$log = '';
|
197 |
-
|
198 |
-
foreach ($rss_items as $item) {
|
199 |
-
if (!$this->post_exists($item->get_permalink())) {
|
200 |
-
$new_post = array(
|
201 |
-
'post_title' => $item->get_title(),
|
202 |
-
'post_content' => $this->parse_content($item, $feed_title, $strip_html),
|
203 |
-
'post_status' => $options['settings']['post_status'],
|
204 |
-
'post_author' => $options['settings']['author_id'],
|
205 |
-
'post_category' => array($category_id),
|
206 |
-
'comment_status' => $options['settings']['allow_comments'],
|
207 |
-
'post_date' => $item->get_date('Y-m-d H:i:s')
|
208 |
-
);
|
209 |
-
|
210 |
-
$new_post = apply_filters('pre_rss_pi_insert_post', $new_post);
|
211 |
-
|
212 |
-
$post_id = wp_insert_post($new_post);
|
213 |
-
|
214 |
-
add_action('save_rss_pi_post', $post_id);
|
215 |
-
|
216 |
-
$meta_id = $this->insert_featured_image($item, $post_id);
|
217 |
-
|
218 |
-
add_post_meta($post_id, 'rss_pi_source_url', esc_url($item->get_permalink()));
|
219 |
-
|
220 |
-
array_push($saved_posts, $new_post);
|
221 |
-
}
|
222 |
-
}
|
223 |
-
|
224 |
-
return $saved_posts;
|
225 |
-
exit;
|
226 |
-
}
|
227 |
-
return $rss_items;
|
228 |
-
endif;
|
229 |
-
}
|
230 |
-
|
231 |
-
function return_frequency($seconds) {
|
232 |
-
$options = $this->rss_pi_get_option();
|
233 |
-
return $options['settings']['frequency'];
|
234 |
-
}
|
235 |
-
|
236 |
-
function import_all_feeds() {
|
237 |
-
|
238 |
-
$post_count = 0;
|
239 |
-
|
240 |
-
$options = $this->rss_pi_get_option();
|
241 |
-
|
242 |
-
add_filter('wp_feed_cache_transient_lifetime', array(&$this, 'return_frequency'));
|
243 |
-
|
244 |
-
foreach ($options['feeds'] as $f) {
|
245 |
-
$rss_items = $this->import_feed($f['url'], $f['name'], $f['max_posts'], $f['category_id'], $f['strip_html'], true);
|
246 |
-
$post_count += count($rss_items);
|
247 |
-
}
|
248 |
-
$imports = intval($options['imports']) + $post_count;
|
249 |
-
|
250 |
-
update_option('rss_pi_feeds', array(
|
251 |
-
'feeds' => $options['feeds'],
|
252 |
-
'settings' => $options['settings'],
|
253 |
-
'latest_import' => date("Y-m-d H:i:s"),
|
254 |
-
'imports' => $imports
|
255 |
-
));
|
256 |
-
|
257 |
-
remove_filter('wp_feed_cache_transient_lifetime', array(&$this, 'return_frequency'));
|
258 |
-
|
259 |
-
if ($options['settings']['enable_logging'] == 'true') {
|
260 |
-
$log = date("Y-m-d H:i:s") . "\t Imported " . $post_count . " new posts. \n";
|
261 |
-
$log_file = $this->settings['dir'] . 'log.txt';
|
262 |
-
file_put_contents($log_file, $log, FILE_APPEND);
|
263 |
-
}
|
264 |
-
|
265 |
-
return $post_count;
|
266 |
-
}
|
267 |
-
|
268 |
-
function parse_content($item, $feed_title, $strip_html) {
|
269 |
-
$options = $this->rss_pi_get_option();
|
270 |
-
$post_template = $options['settings']['post_template'];
|
271 |
-
$c = $item->get_content() != "" ? $item->get_content() : $item->get_description();
|
272 |
-
|
273 |
-
$c = apply_filters('pre_rss_pi_parse_content', $c);
|
274 |
-
|
275 |
-
|
276 |
-
$parsed_content = preg_replace('/\{\$content\}/i', $c, $post_template);
|
277 |
-
$parsed_content = preg_replace('/\{\$permalink\}/i', '<a href="' . esc_url($item->get_permalink()) . '" target="_blank">' . $item->get_title() . '</a>', $parsed_content);
|
278 |
-
$parsed_content = preg_replace('/\{\$feed_title\}/i', $feed_title, $parsed_content);
|
279 |
-
$parsed_content = preg_replace('/\{\$title\}/i', $item->get_title(), $parsed_content);
|
280 |
-
|
281 |
-
preg_match('/\{\$excerpt\:(\d+)\}/i', $parsed_content, $matches);
|
282 |
-
|
283 |
-
$e_size = (is_array($matches) && !empty($matches)) ? $matches[1] : 0;
|
284 |
-
|
285 |
-
if ($e_size) {
|
286 |
-
$trimmed_c = preg_replace('/<!--(.|\s)*?-->/', '', $c);
|
287 |
-
$stripped_c = strip_tags($trimmed_c);
|
288 |
-
$parsed_content = preg_replace('/\{\$excerpt\:\d+\}/i', wp_trim_words($stripped_c, $e_size), $parsed_content);
|
289 |
-
}
|
290 |
-
|
291 |
-
if ($strip_html == 'true') {
|
292 |
-
$parsed_content = strip_tags($parsed_content);
|
293 |
-
}
|
294 |
-
|
295 |
-
$parsed_content = apply_filters('after_rss_pi_parse_content', $parsed_content);
|
296 |
-
return $parsed_content;
|
297 |
-
}
|
298 |
-
|
299 |
-
function insert_featured_image($item, $post_id) {
|
300 |
-
|
301 |
-
$content = $item->get_content() != "" ? $item->get_content() : $item->get_description();
|
302 |
-
|
303 |
-
preg_match('/<img.+?src="(.+?)"[^}]+>/i', $content, $matches);
|
304 |
-
|
305 |
-
$img_url = (is_array($matches) && !empty($matches)) ? $matches[1] : '';
|
306 |
-
|
307 |
-
if (empty($img_url)) {
|
308 |
-
return false;
|
309 |
-
}
|
310 |
-
|
311 |
-
$featured_id = $this->media_sideload_image($img_url, $post_id, '');
|
312 |
-
|
313 |
-
add_action('set_rss_pi_featured_image', $featured_id, $post_id);
|
314 |
-
|
315 |
-
return $meta_id = set_post_thumbnail($post_id, $featured_id);
|
316 |
-
}
|
317 |
-
|
318 |
-
/**
|
319 |
-
* Modification of default media_sideload_image
|
320 |
-
*
|
321 |
-
* @param type $file
|
322 |
-
* @param type $post_id
|
323 |
-
* @param type $desc
|
324 |
-
* @return type
|
325 |
-
*/
|
326 |
-
function media_sideload_image($file, $post_id, $desc = null) {
|
327 |
-
$id = 0;
|
328 |
-
|
329 |
-
if (!empty($file)) {
|
330 |
-
// Set variables for storage, fix file filename for query strings.
|
331 |
-
preg_match('/[^\?]+\.(jpe?g|jpe|gif|png)\b/i', $file, $matches);
|
332 |
-
$file_array = array();
|
333 |
-
$file_array['name'] = basename($file);
|
334 |
-
|
335 |
-
// Download file to temp location.
|
336 |
-
$file_array['tmp_name'] = download_url($file);
|
337 |
-
|
338 |
-
// If error storing temporarily, return the error.
|
339 |
-
if (is_wp_error($file_array['tmp_name'])) {
|
340 |
-
return $file_array['tmp_name'];
|
341 |
-
}
|
342 |
-
|
343 |
-
// Do the validation and storage stuff.
|
344 |
-
$id = media_handle_sideload($file_array, $post_id, $desc);
|
345 |
-
|
346 |
-
// If error storing permanently, unlink.
|
347 |
-
if (is_wp_error($id)) {
|
348 |
-
@unlink($file_array['tmp_name']);
|
349 |
-
return $id;
|
350 |
-
}
|
351 |
-
}
|
352 |
-
|
353 |
-
return $id;
|
354 |
-
}
|
355 |
-
|
356 |
-
function post_exists($permalink) {
|
357 |
-
|
358 |
-
$args = array(
|
359 |
-
'post_status' => 'any',
|
360 |
-
'meta_key' => 'rss_pi_source_url',
|
361 |
-
'meta_value' => esc_url($permalink)
|
362 |
-
);
|
363 |
-
|
364 |
-
$posts = get_posts($args);
|
365 |
-
|
366 |
-
// Not already imported
|
367 |
-
return(count($posts) > 0);
|
368 |
-
}
|
369 |
-
|
370 |
-
function input_admin_enqueue_scripts() {
|
371 |
-
// register scripts & styles
|
372 |
-
wp_register_script('rss_pi', plugins_url('js/rss_pi.js', __FILE__), array('jquery'), $this->settings['version']);
|
373 |
-
wp_register_style('rss_pi', plugins_url('css/rss_pi.css', __FILE__), array(), $this->settings['version']);
|
374 |
-
wp_localize_script('rss_pi', 'rss_pi_ajax', array('ajaxurl' => admin_url('admin-ajax.php')));
|
375 |
-
|
376 |
-
// scripts
|
377 |
-
wp_enqueue_script(array(
|
378 |
-
'rss_pi'
|
379 |
-
));
|
380 |
-
|
381 |
-
// styles
|
382 |
-
wp_enqueue_style(array(
|
383 |
-
'rss_pi'
|
384 |
-
));
|
385 |
-
}
|
386 |
-
|
387 |
-
// Returns the settings for the plugin
|
388 |
-
function rss_pi_get_option() {
|
389 |
-
$default_settings = array(
|
390 |
-
'enable_logging' => false,
|
391 |
-
'feeds_api_key' => false,
|
392 |
-
'frequency' => 0,
|
393 |
-
'post_template' => '{\$content}\nSource: {\$feed_title}',
|
394 |
-
'post_status' => 'publish',
|
395 |
-
'author_id' => 1,
|
396 |
-
'allow_comments' => true,
|
397 |
-
);
|
398 |
-
$options = get_option('rss_pi_feeds', array());
|
399 |
-
|
400 |
-
if (!isset($options['settings'])) {
|
401 |
-
$options['settings'] = array();
|
402 |
-
}
|
403 |
-
|
404 |
-
$options['settings'] = wp_parse_args($options['settings'], $default_settings);
|
405 |
-
|
406 |
-
|
407 |
-
if (!array_key_exists('imports', $options)) {
|
408 |
-
$options['imports'] = 0;
|
409 |
-
}
|
410 |
-
|
411 |
-
return $options;
|
412 |
-
}
|
413 |
-
|
414 |
-
function is_correct_api($new_key) {
|
415 |
-
$options = $this->rss_pi_get_option();
|
416 |
-
|
417 |
-
$old_key = $options['settings']["feeds_api_key"];
|
418 |
-
|
419 |
-
if ($new_key == $old_key)
|
420 |
-
return true;
|
421 |
-
|
422 |
-
$url = "http://www.feedsapi.org/fetch.php?key=$new_key&url=http://dummyurl.com";
|
423 |
-
$content = file_get_contents($url);
|
424 |
-
if (trim($content) == "A valid key must be supplied") {
|
425 |
-
echo '<div class="error">
|
426 |
-
<p>Invalid API key!</p>
|
427 |
-
</div>';
|
428 |
-
return false;
|
429 |
-
} else {
|
430 |
-
return true;
|
431 |
-
}
|
432 |
-
}
|
433 |
-
|
434 |
-
}
|
435 |
-
|
436 |
-
new rss_pi;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uninstall.php
CHANGED
@@ -1,30 +1,25 @@
|
|
1 |
<?php
|
2 |
|
3 |
//if uninstall not called from WordPress exit
|
4 |
-
if (
|
5 |
-
|
|
|
6 |
|
7 |
$option_name = 'rss_pi_feeds';
|
8 |
|
9 |
// For Single site
|
10 |
-
if (
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
switch_to_blog(
|
24 |
-
|
25 |
-
wp_clear_scheduled_hook( 'rss_pi_cron' );
|
26 |
-
}
|
27 |
-
switch_to_blog( $original_blog_id );
|
28 |
-
}
|
29 |
-
|
30 |
-
?>
|
1 |
<?php
|
2 |
|
3 |
//if uninstall not called from WordPress exit
|
4 |
+
if (!defined('WP_UNINSTALL_PLUGIN')) {
|
5 |
+
exit();
|
6 |
+
}
|
7 |
|
8 |
$option_name = 'rss_pi_feeds';
|
9 |
|
10 |
// For Single site
|
11 |
+
if (!is_multisite()) {
|
12 |
+
delete_option($option_name);
|
13 |
+
wp_clear_scheduled_hook('rss_pi_cron');
|
14 |
+
} else {
|
15 |
+
// For Multisite
|
16 |
+
global $wpdb;
|
17 |
+
$blog_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
|
18 |
+
$original_blog_id = get_current_blog_id();
|
19 |
+
foreach ($blog_ids as $blog_id) {
|
20 |
+
switch_to_blog($blog_id);
|
21 |
+
delete_site_option($option_name);
|
22 |
+
wp_clear_scheduled_hook('rss_pi_cron');
|
23 |
+
}
|
24 |
+
switch_to_blog($original_blog_id);
|
25 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|