From 8f2a0cadd9447a2d798240dd706c9e81d0d5b7de Mon Sep 17 00:00:00 2001 From: Mohammad Anbarestany Date: Wed, 13 Feb 2019 22:43:32 +0330 Subject: [PATCH] Pinkoob v.1.5.5 Stable --- .gitattributes | 2 + 404.php | 17 + README.md | 17 +- author.php | 449 ++ bootstrap/bootstrap-tagsinput-angular.js | 87 + bootstrap/bootstrap-tagsinput-angular.min.js | 7 + .../bootstrap-tagsinput-angular.min.js.map | 1 + bootstrap/bootstrap-tagsinput.css | 55 + bootstrap/bootstrap-tagsinput.js | 654 ++ bootstrap/bootstrap-tagsinput.less | 50 + bootstrap/bootstrap-tagsinput.min.js | 7 + bootstrap/bootstrap-tagsinput.min.js.map | 1 + category-blog.php | 95 + category.php | 7 + classes/PincUploadManager.php | 224 + color.php | 251 + comments.php | 61 + css/bootstrap.css | 6757 +++++++++++++++++ editor-style-frontend.css | 26 + editor-style.css | 10 + favicon.png | Bin 0 -> 22532 bytes fonts/FontAwesome.otf | Bin 0 -> 93888 bytes fonts/fontawesome-webfont.eot | Bin 0 -> 60767 bytes fonts/fontawesome-webfont.svg | 565 ++ fonts/fontawesome-webfont.ttf | Bin 0 -> 122092 bytes fonts/fontawesome-webfont.woff | Bin 0 -> 71508 bytes fonts/fontawesome-webfont.woff2 | Bin 0 -> 56780 bytes fonts/glyphicons-halflings-regular.eot | Bin 0 -> 20127 bytes fonts/glyphicons-halflings-regular.svg | 288 + fonts/glyphicons-halflings-regular.ttf | Bin 0 -> 45404 bytes fonts/glyphicons-halflings-regular.woff | Bin 0 -> 23424 bytes fonts/glyphicons-halflings-regular.woff2 | Bin 0 -> 18028 bytes fonts/iransans/IRANSansWeb_Bold.eot | Bin 0 -> 57974 bytes fonts/iransans/IRANSansWeb_Bold.ttf | Bin 0 -> 57760 bytes fonts/iransans/IRANSansWeb_Bold.woff | Bin 0 -> 36629 bytes fonts/iransans/IRANSansWeb_Bold.woff2 | Bin 0 -> 29688 bytes fonts/iransans/IRANSansWeb_Light.eot | Bin 0 -> 35458 bytes fonts/iransans/IRANSansWeb_Light.ttf | Bin 0 -> 59968 bytes fonts/iransans/IRANSansWeb_Light.woff | Bin 0 -> 39693 bytes fonts/iransans/IRANSansWeb_Light.woff2 | Bin 0 -> 32420 bytes fonts/opensans/OpenSans-Bold.eot | Bin 0 -> 110106 bytes fonts/opensans/OpenSans-Bold.svg | 958 +++ fonts/opensans/OpenSans-Bold.ttf | Bin 0 -> 109928 bytes fonts/opensans/OpenSans-Bold.woff | Bin 0 -> 63564 bytes fonts/opensans/OpenSans-Bold.woff2 | Bin 0 -> 46676 bytes fonts/opensans/OpenSans-Light.eot | Bin 0 -> 107642 bytes fonts/opensans/OpenSans-Light.svg | 958 +++ fonts/opensans/OpenSans-Light.ttf | Bin 0 -> 107460 bytes fonts/opensans/OpenSans-Light.woff | Bin 0 -> 62844 bytes fonts/opensans/OpenSans-Light.woff2 | Bin 0 -> 45900 bytes footer.php | 50 + functions.php | 4169 ++++++++++ header-color.php | 241 + header.php | 240 + img/ajax-loader.gif | Bin 0 -> 404 bytes img/arrow-left.png | Bin 0 -> 1677 bytes img/arrow-right.png | Bin 0 -> 1688 bytes img/avatar-48x48.png | Bin 0 -> 988 bytes img/avatar-96x96.png | Bin 0 -> 1888 bytes img/blank.gif | Bin 0 -> 954 bytes img/blank2.gif | Bin 0 -> 504 bytes img/gif_overlay.png | Bin 0 -> 3772 bytes img/indicator.png | Bin 0 -> 2895 bytes img/loader.svg | 17 + img/loader_w.svg | 17 + img/social/500px.png | Bin 0 -> 1615 bytes img/social/64/500px.png | Bin 0 -> 2255 bytes img/social/64/aol.png | Bin 0 -> 2472 bytes img/social/64/disqus.png | Bin 0 -> 4963 bytes img/social/64/facebook.png | Bin 0 -> 2030 bytes img/social/64/foursquare.png | Bin 0 -> 2405 bytes img/social/64/github.png | Bin 0 -> 2361 bytes img/social/64/google.png | Bin 0 -> 2865 bytes img/social/64/instagram.png | Bin 0 -> 2416 bytes img/social/64/lastfm.png | Bin 0 -> 2874 bytes img/social/64/linkedin.png | Bin 0 -> 2110 bytes img/social/64/live.png | Bin 0 -> 1877 bytes img/social/64/mailru.png | Bin 0 -> 7566 bytes img/social/64/mixi.png | Bin 0 -> 4356 bytes img/social/64/myspace.png | Bin 0 -> 2188 bytes img/social/64/odnoklassniki.png | Bin 0 -> 4521 bytes img/social/64/pixelpin.png | Bin 0 -> 4719 bytes img/social/64/reddit.png | Bin 0 -> 3095 bytes img/social/64/stackoverflow.png | Bin 0 -> 2661 bytes img/social/64/steam.png | Bin 0 -> 6395 bytes img/social/64/tumblr.png | Bin 0 -> 2193 bytes img/social/64/twitchtv.png | Bin 0 -> 2236 bytes img/social/64/twitter.png | Bin 0 -> 2459 bytes img/social/64/vkontakte.png | Bin 0 -> 4772 bytes img/social/64/wordpress.png | Bin 0 -> 3168 bytes img/social/64/yahoo.png | Bin 0 -> 2397 bytes img/social/64/yandex.png | Bin 0 -> 4295 bytes img/social/aol.png | Bin 0 -> 1827 bytes img/social/disqus.png | Bin 0 -> 3875 bytes img/social/facebook.png | Bin 0 -> 1528 bytes img/social/foursquare.png | Bin 0 -> 1720 bytes img/social/github.png | Bin 0 -> 1700 bytes img/social/google.png | Bin 0 -> 1940 bytes img/social/instagram.png | Bin 0 -> 1753 bytes img/social/lastfm.png | Bin 0 -> 1936 bytes img/social/linkedin.png | Bin 0 -> 1564 bytes img/social/live.png | Bin 0 -> 1446 bytes img/social/mailru.png | Bin 0 -> 4510 bytes img/social/mixi.png | Bin 0 -> 3875 bytes img/social/myspace.png | Bin 0 -> 1623 bytes img/social/odnoklassniki.png | Bin 0 -> 3928 bytes img/social/pixelpin.png | Bin 0 -> 3697 bytes img/social/reddit.png | Bin 0 -> 2071 bytes img/social/stackoverflow.png | Bin 0 -> 1857 bytes img/social/steam.png | Bin 0 -> 4481 bytes img/social/tumblr.png | Bin 0 -> 1571 bytes img/social/twitchtv.png | Bin 0 -> 1663 bytes img/social/twitter.png | Bin 0 -> 1753 bytes img/social/vkontakte.png | Bin 0 -> 4002 bytes img/social/wordpress.png | Bin 0 -> 2135 bytes img/social/yahoo.png | Bin 0 -> 1776 bytes img/social/yandex.png | Bin 0 -> 3453 bytes img/video_overlay.png | Bin 0 -> 3969 bytes inc/css/optionsframework.css | 226 + inc/images/ico-delete.png | Bin 0 -> 715 bytes .../class-options-framework-admin.php | 392 + inc/includes/class-options-framework.php | 122 + inc/includes/class-options-interface.php | 422 + inc/includes/class-options-media-uploader.php | 125 + inc/includes/class-options-sanitization.php | 454 ++ inc/js/media-uploader.js | 79 + inc/js/options-custom.js | 71 + inc/languages/options-framework-da_DK.mo | Bin 0 -> 6220 bytes inc/languages/options-framework-da_DK.po | 381 + inc/languages/options-framework-es_ES.mo | Bin 0 -> 2555 bytes inc/languages/options-framework-es_ES.po | 142 + inc/languages/options-framework-fa_IR.mo | Bin 0 -> 1768 bytes inc/languages/options-framework-fa_IR.po | 141 + inc/languages/options-framework-fr_FR.mo | Bin 0 -> 2559 bytes inc/languages/options-framework-fr_FR.po | 149 + inc/languages/options-framework-hu_HU.po | 148 + inc/languages/options-framework-id_ID.mo | Bin 0 -> 2498 bytes inc/languages/options-framework-id_ID.po | 148 + inc/languages/options-framework-it_IT.mo | Bin 0 -> 2435 bytes inc/languages/options-framework-it_IT.po | 142 + inc/languages/options-framework-pt_BR.mo | Bin 0 -> 6687 bytes inc/languages/options-framework-pt_BR.po | 393 + inc/languages/options-framework-pt_PT.mo | Bin 0 -> 2586 bytes inc/languages/options-framework-pt_PT.po | 336 + inc/languages/options-framework-ru_RU.mo | Bin 0 -> 3215 bytes inc/languages/options-framework-ru_RU.po | 143 + inc/languages/options-framework-sv_SE.mo | Bin 0 -> 2464 bytes inc/languages/options-framework-sv_SE.po | 146 + inc/languages/options-framework-zh_CN.mo | Bin 0 -> 2273 bytes inc/languages/options-framework-zh_CN.po | 145 + inc/languages/options-framework.pot | 140 + inc/options-framework.php | 86 + inc/readme.txt | 248 + inc/screenshot-1.png | Bin 0 -> 20625 bytes index-masonry-inc.php | 232 + index-masonry.php | 116 + index.php | 303 + js/color-thief.js | 614 ++ js/jquery.form.min.js | 11 + js/pinc.custom.js | 2679 +++++++ js/pinc.custom.ltr.js | 2679 +++++++ js/pinc.library.js | 93 + js/pincit.js | 509 ++ js/respond.min.js | 6 + languages/fa_IR.mo | Bin 0 -> 36057 bytes languages/fa_IR.po | 2373 ++++++ languages/pinc.pot | 2437 ++++++ ltr.css | 17 + options.php | 628 ++ page.php | 42 + page_cp_boards.php | 124 + page_cp_login.php | 111 + page_cp_login_lpw.php | 278 + page_cp_notifications.php | 123 + page_cp_pins.php | 594 ++ page_cp_register.php | 390 + page_cp_settings.php | 597 ++ page_everything.php | 26 + page_following.php | 37 + page_full_width.php | 37 + page_gifts.php | 153 + page_no_sidebar.php | 39 + page_popular.php | 92 + page_source.php | 137 + page_top_users.php | 209 + page_videos.php | 44 + pagenavi-css.css | 35 + pinc_fetch.php | 582 ++ recaptchalib.php | 140 + screenshot.png | Bin 0 -> 692743 bytes script-add-board.php | 99 + search.php | 944 +++ searchform.php | 6 + sidebar-others.php | 10 + sidebar-right.php | 192 + single-blog.php | 95 + single-masonry.php | 167 + single-pin.php | 717 ++ single.php | 7 + style-dark.css | 849 +++ style.css | 3701 +++++++++ tag.php | 248 + taxonomy-board.php | 80 + taxonomy-color.php | 3 + 204 files changed, 44664 insertions(+), 1 deletion(-) create mode 100644 .gitattributes create mode 100644 404.php create mode 100644 author.php create mode 100644 bootstrap/bootstrap-tagsinput-angular.js create mode 100644 bootstrap/bootstrap-tagsinput-angular.min.js create mode 100644 bootstrap/bootstrap-tagsinput-angular.min.js.map create mode 100644 bootstrap/bootstrap-tagsinput.css create mode 100644 bootstrap/bootstrap-tagsinput.js create mode 100644 bootstrap/bootstrap-tagsinput.less create mode 100644 bootstrap/bootstrap-tagsinput.min.js create mode 100644 bootstrap/bootstrap-tagsinput.min.js.map create mode 100644 category-blog.php create mode 100644 category.php create mode 100644 classes/PincUploadManager.php create mode 100644 color.php create mode 100644 comments.php create mode 100644 css/bootstrap.css create mode 100644 editor-style-frontend.css create mode 100644 editor-style.css create mode 100644 favicon.png create mode 100644 fonts/FontAwesome.otf create mode 100644 fonts/fontawesome-webfont.eot create mode 100644 fonts/fontawesome-webfont.svg create mode 100644 fonts/fontawesome-webfont.ttf create mode 100644 fonts/fontawesome-webfont.woff create mode 100644 fonts/fontawesome-webfont.woff2 create mode 100644 fonts/glyphicons-halflings-regular.eot create mode 100644 fonts/glyphicons-halflings-regular.svg create mode 100644 fonts/glyphicons-halflings-regular.ttf create mode 100644 fonts/glyphicons-halflings-regular.woff create mode 100644 fonts/glyphicons-halflings-regular.woff2 create mode 100644 fonts/iransans/IRANSansWeb_Bold.eot create mode 100644 fonts/iransans/IRANSansWeb_Bold.ttf create mode 100644 fonts/iransans/IRANSansWeb_Bold.woff create mode 100644 fonts/iransans/IRANSansWeb_Bold.woff2 create mode 100644 fonts/iransans/IRANSansWeb_Light.eot create mode 100644 fonts/iransans/IRANSansWeb_Light.ttf create mode 100644 fonts/iransans/IRANSansWeb_Light.woff create mode 100644 fonts/iransans/IRANSansWeb_Light.woff2 create mode 100644 fonts/opensans/OpenSans-Bold.eot create mode 100644 fonts/opensans/OpenSans-Bold.svg create mode 100644 fonts/opensans/OpenSans-Bold.ttf create mode 100644 fonts/opensans/OpenSans-Bold.woff create mode 100644 fonts/opensans/OpenSans-Bold.woff2 create mode 100644 fonts/opensans/OpenSans-Light.eot create mode 100644 fonts/opensans/OpenSans-Light.svg create mode 100644 fonts/opensans/OpenSans-Light.ttf create mode 100644 fonts/opensans/OpenSans-Light.woff create mode 100644 fonts/opensans/OpenSans-Light.woff2 create mode 100644 footer.php create mode 100644 functions.php create mode 100644 header-color.php create mode 100644 header.php create mode 100644 img/ajax-loader.gif create mode 100644 img/arrow-left.png create mode 100644 img/arrow-right.png create mode 100644 img/avatar-48x48.png create mode 100644 img/avatar-96x96.png create mode 100644 img/blank.gif create mode 100644 img/blank2.gif create mode 100644 img/gif_overlay.png create mode 100644 img/indicator.png create mode 100644 img/loader.svg create mode 100644 img/loader_w.svg create mode 100644 img/social/500px.png create mode 100644 img/social/64/500px.png create mode 100644 img/social/64/aol.png create mode 100644 img/social/64/disqus.png create mode 100644 img/social/64/facebook.png create mode 100644 img/social/64/foursquare.png create mode 100644 img/social/64/github.png create mode 100644 img/social/64/google.png create mode 100644 img/social/64/instagram.png create mode 100644 img/social/64/lastfm.png create mode 100644 img/social/64/linkedin.png create mode 100644 img/social/64/live.png create mode 100644 img/social/64/mailru.png create mode 100644 img/social/64/mixi.png create mode 100644 img/social/64/myspace.png create mode 100644 img/social/64/odnoklassniki.png create mode 100644 img/social/64/pixelpin.png create mode 100644 img/social/64/reddit.png create mode 100644 img/social/64/stackoverflow.png create mode 100644 img/social/64/steam.png create mode 100644 img/social/64/tumblr.png create mode 100644 img/social/64/twitchtv.png create mode 100644 img/social/64/twitter.png create mode 100644 img/social/64/vkontakte.png create mode 100644 img/social/64/wordpress.png create mode 100644 img/social/64/yahoo.png create mode 100644 img/social/64/yandex.png create mode 100644 img/social/aol.png create mode 100644 img/social/disqus.png create mode 100644 img/social/facebook.png create mode 100644 img/social/foursquare.png create mode 100644 img/social/github.png create mode 100644 img/social/google.png create mode 100644 img/social/instagram.png create mode 100644 img/social/lastfm.png create mode 100644 img/social/linkedin.png create mode 100644 img/social/live.png create mode 100644 img/social/mailru.png create mode 100644 img/social/mixi.png create mode 100644 img/social/myspace.png create mode 100644 img/social/odnoklassniki.png create mode 100644 img/social/pixelpin.png create mode 100644 img/social/reddit.png create mode 100644 img/social/stackoverflow.png create mode 100644 img/social/steam.png create mode 100644 img/social/tumblr.png create mode 100644 img/social/twitchtv.png create mode 100644 img/social/twitter.png create mode 100644 img/social/vkontakte.png create mode 100644 img/social/wordpress.png create mode 100644 img/social/yahoo.png create mode 100644 img/social/yandex.png create mode 100644 img/video_overlay.png create mode 100644 inc/css/optionsframework.css create mode 100644 inc/images/ico-delete.png create mode 100644 inc/includes/class-options-framework-admin.php create mode 100644 inc/includes/class-options-framework.php create mode 100644 inc/includes/class-options-interface.php create mode 100644 inc/includes/class-options-media-uploader.php create mode 100644 inc/includes/class-options-sanitization.php create mode 100644 inc/js/media-uploader.js create mode 100644 inc/js/options-custom.js create mode 100644 inc/languages/options-framework-da_DK.mo create mode 100644 inc/languages/options-framework-da_DK.po create mode 100644 inc/languages/options-framework-es_ES.mo create mode 100644 inc/languages/options-framework-es_ES.po create mode 100644 inc/languages/options-framework-fa_IR.mo create mode 100644 inc/languages/options-framework-fa_IR.po create mode 100644 inc/languages/options-framework-fr_FR.mo create mode 100644 inc/languages/options-framework-fr_FR.po create mode 100644 inc/languages/options-framework-hu_HU.po create mode 100644 inc/languages/options-framework-id_ID.mo create mode 100644 inc/languages/options-framework-id_ID.po create mode 100644 inc/languages/options-framework-it_IT.mo create mode 100644 inc/languages/options-framework-it_IT.po create mode 100644 inc/languages/options-framework-pt_BR.mo create mode 100644 inc/languages/options-framework-pt_BR.po create mode 100644 inc/languages/options-framework-pt_PT.mo create mode 100644 inc/languages/options-framework-pt_PT.po create mode 100644 inc/languages/options-framework-ru_RU.mo create mode 100644 inc/languages/options-framework-ru_RU.po create mode 100644 inc/languages/options-framework-sv_SE.mo create mode 100644 inc/languages/options-framework-sv_SE.po create mode 100644 inc/languages/options-framework-zh_CN.mo create mode 100644 inc/languages/options-framework-zh_CN.po create mode 100644 inc/languages/options-framework.pot create mode 100644 inc/options-framework.php create mode 100644 inc/readme.txt create mode 100644 inc/screenshot-1.png create mode 100644 index-masonry-inc.php create mode 100644 index-masonry.php create mode 100644 index.php create mode 100644 js/color-thief.js create mode 100644 js/jquery.form.min.js create mode 100644 js/pinc.custom.js create mode 100644 js/pinc.custom.ltr.js create mode 100644 js/pinc.library.js create mode 100644 js/pincit.js create mode 100644 js/respond.min.js create mode 100644 languages/fa_IR.mo create mode 100644 languages/fa_IR.po create mode 100644 languages/pinc.pot create mode 100644 ltr.css create mode 100644 options.php create mode 100644 page.php create mode 100644 page_cp_boards.php create mode 100644 page_cp_login.php create mode 100644 page_cp_login_lpw.php create mode 100644 page_cp_notifications.php create mode 100644 page_cp_pins.php create mode 100644 page_cp_register.php create mode 100644 page_cp_settings.php create mode 100644 page_everything.php create mode 100644 page_following.php create mode 100644 page_full_width.php create mode 100644 page_gifts.php create mode 100644 page_no_sidebar.php create mode 100644 page_popular.php create mode 100644 page_source.php create mode 100644 page_top_users.php create mode 100644 page_videos.php create mode 100644 pagenavi-css.css create mode 100644 pinc_fetch.php create mode 100644 recaptchalib.php create mode 100644 screenshot.png create mode 100644 script-add-board.php create mode 100644 search.php create mode 100644 searchform.php create mode 100644 sidebar-others.php create mode 100644 sidebar-right.php create mode 100644 single-blog.php create mode 100644 single-masonry.php create mode 100644 single-pin.php create mode 100644 single.php create mode 100644 style-dark.css create mode 100644 style.css create mode 100644 tag.php create mode 100644 taxonomy-board.php create mode 100644 taxonomy-color.php diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/404.php b/404.php new file mode 100644 index 0000000..61f08f1 --- /dev/null +++ b/404.php @@ -0,0 +1,17 @@ + + +
+
+
+

+
+ +
+ +

+ +
+
+
+ + \ No newline at end of file diff --git a/README.md b/README.md index de5a46d..a8a1bb3 100644 --- a/README.md +++ b/README.md @@ -1 +1,16 @@ -# Pinkoob \ No newline at end of file +# Pinkoob +Pinkoob is a RTL/LTR WordPress theme inspired by Pinterest.com and Unsplash.com. +![Pinkoob 1.5](https://www.skilledup.ir/wp-content/uploads/2018/04/pinkoob.jpg?raw=true) + +# Requirements +- PHP 5.6+ (7.2 is recommended) +- PHP Extension: Curl +- PHP Extension: Dom +- PHP Extension: Mbstring +- PHP Extension: GD/Imagemagick + +# Demo +visti Pinkoob.com + +# Persian Support +visit Skilledup.ir diff --git a/author.php b/author.php new file mode 100644 index 0000000..939dd49 --- /dev/null +++ b/author.php @@ -0,0 +1,449 @@ + +query_vars['author']); + +$blog_cat_id = of_get_option('blog_cat_id'); +if ($blog_cat_id) { + $blog_post_count = $wpdb->get_var( + $wpdb->prepare( + "SELECT COUNT(*) FROM $wpdb->posts + LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id) + LEFT JOIN $wpdb->term_taxonomy ON($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) + WHERE $wpdb->term_taxonomy.term_id = %d + AND $wpdb->term_taxonomy.taxonomy = 'category' + AND $wpdb->posts.post_status = 'publish' + AND post_author = %d + " + , $blog_cat_id, $user_info->ID + ) + ); +} + +$pins_count = count_user_posts($user_info->ID) - $blog_post_count; +$parent_board_id = get_user_meta($user_info->ID, '_Board Parent ID', true); +$parent_board = get_term_by('id', $parent_board_id, 'board', ARRAY_A); +if ($parent_board_id == '') { + $boards_count = 0; +} else { + $boards = get_terms('board', array('parent' => $parent_board_id, 'hide_empty' => false, 'orderby' => 'id', 'order' => 'DESC')); + $boards_count = count($boards); +} + +$likes_count = get_user_meta($user_info->ID, '_Likes Count', true); +$likes_count = $likes_count ? $likes_count : 0; +$followers_count = get_user_meta($user_info->ID, '_Followers Count', true); +$followers_count = $followers_count ? $followers_count : 0; +$following_count = get_user_meta($user_info->ID, '_Following Count', true); +$following_count = $following_count ? $following_count : 0; + +$profile_cover_id = get_user_meta($user_info->ID, 'pinc_user_cover', true); +if ($profile_cover_id != '') { + $profile_cover = wp_get_attachment_image_src($profile_cover_id, 'full'); + $profile_cover_bg = ' style="background-image: url(\'' . $profile_cover[0] . '\');"'; +} +?> +
+
> +
+
+
+

display_name; ?>

+ +
+
+ ID, '96'); ?> +
+ + ID)) { ?> + # + + + ID)) { ?> + " href=""> # + +
+ +

description; ?>

+
+ + +
+
+
+ +
+ +
+ +

+ +ID || current_user_can('administrator') || current_user_can('editor')) { + $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; + $args = array( + 'author' => $user_info->ID, + 'paged' => $paged + ); + query_posts($args); + } + get_template_part('index', 'masonry'); + + +} else if (isset($_GET['view']) && $_GET['view'] == 'likes') { + $post_likes = get_user_meta($user_info->ID, '_Likes Post ID'); + + if (!empty($post_likes[0])) { + $pnum = isset($_GET['pnum']) ? intval($_GET['pnum']) : 1; + $posts_per_page = get_option('posts_per_page'); + $maxpage = ceil(count($post_likes[0])/$posts_per_page); + $post_likes[0] = array_slice($post_likes[0], ($posts_per_page * ($pnum-1)), $posts_per_page); + if ($post_likes[0]) { + $args = array( + 'post__in' => $post_likes[0], + 'orderby' => 'post__in' + ); + } else { + $args = array( + 'post__in' => array(0) + ); + } + + query_posts($args); + get_template_part('index', 'masonry'); + } else { + ?> +
+
+

+
+
+
+ ID, '_Followers User ID'); + } else if ($_GET['view'] == 'following') { + $followers = get_user_meta($user_info->ID, '_Following User ID'); + } + + if (!empty($followers[0])) { + $pnum = isset($_GET['pnum']) ? intval($_GET['pnum']) : 1; + $followers_per_page = get_option('posts_per_page'); + $maxpage = ceil(count($followers[0])/$followers_per_page); + $followers[0] = array_slice($followers[0], ($followers_per_page * ($pnum-1)), $followers_per_page); + echo '
'; + foreach ($followers[0] as $follower) { + $follower_info = get_user_by('id', $follower); + if ($follower_info) { + ?> + + + +
'; + } else { + ?> +
+
+ +

+ +

+ +
+
+ + 0) { + ?> +
+ $parent_board_id, 'hide_empty' => false, 'orderby' => 'id', 'order' => 'DESC', 'number' => $boards_per_page, 'offset' => ($pnum - 1) * $boards_per_page)); + + foreach ($boards_paginated as $board) { + $board_id = $board->term_id; + $board_parent_id = $board->parent; + $board_name = $board->name; + $board_count = $board->count; + $board_slug = $board->slug; + + $board_thumbnail_ids = $wpdb->get_col($wpdb->prepare( + " + SELECT v.meta_value + FROM $wpdb->postmeta AS v + INNER JOIN ( + SELECT object_id + FROM $wpdb->term_taxonomy, $wpdb->term_relationships, $wpdb->posts + WHERE $wpdb->term_taxonomy.term_id = %d + AND $wpdb->term_taxonomy.term_taxonomy_id = $wpdb->term_relationships.term_taxonomy_id + AND $wpdb->term_taxonomy.taxonomy = 'board' + AND $wpdb->term_relationships.object_id = $wpdb->posts.ID + AND $wpdb->posts.post_status = 'publish' + ORDER BY $wpdb->term_relationships.object_id DESC + LIMIT 0, 5 + ) AS v2 ON v.post_id = v2.object_id + AND v.meta_key = '_thumbnail_id' + ", + $board_id + )); + ?> + + + + + + +
+
+ + + +
+
+

+
+
+ + \ No newline at end of file diff --git a/bootstrap/bootstrap-tagsinput-angular.js b/bootstrap/bootstrap-tagsinput-angular.js new file mode 100644 index 0000000..adcaccb --- /dev/null +++ b/bootstrap/bootstrap-tagsinput-angular.js @@ -0,0 +1,87 @@ +angular.module('bootstrap-tagsinput', []) +.directive('bootstrapTagsinput', [function() { + + function getItemProperty(scope, property) { + if (!property) + return undefined; + + if (angular.isFunction(scope.$parent[property])) + return scope.$parent[property]; + + return function(item) { + return item[property]; + }; + } + + return { + restrict: 'EA', + scope: { + model: '=ngModel' + }, + template: '', + replace: false, + link: function(scope, element, attrs) { + $(function() { + if (!angular.isArray(scope.model)) + scope.model = []; + + var select = $('select', element); + var typeaheadSourceArray = attrs.typeaheadSource ? attrs.typeaheadSource.split('.') : null; + var typeaheadSource = typeaheadSourceArray ? + (typeaheadSourceArray.length > 1 ? + scope.$parent[typeaheadSourceArray[0]][typeaheadSourceArray[1]] + : scope.$parent[typeaheadSourceArray[0]]) + : null; + + select.tagsinput(scope.$parent[attrs.options || ''] || { + typeahead : { + source : angular.isFunction(typeaheadSource) ? typeaheadSource : null + }, + itemValue: getItemProperty(scope, attrs.itemvalue), + itemText : getItemProperty(scope, attrs.itemtext), + confirmKeys : getItemProperty(scope, attrs.confirmkeys) ? JSON.parse(attrs.confirmkeys) : [13], + tagClass : angular.isFunction(scope.$parent[attrs.tagclass]) ? scope.$parent[attrs.tagclass] : function(item) { return attrs.tagclass; } + }); + + for (var i = 0; i < scope.model.length; i++) { + select.tagsinput('add', scope.model[i]); + } + + select.on('itemAdded', function(event) { + if (scope.model.indexOf(event.item) === -1) + scope.model.push(event.item); + }); + + select.on('itemRemoved', function(event) { + var idx = scope.model.indexOf(event.item); + if (idx !== -1) + scope.model.splice(idx, 1); + }); + + // create a shallow copy of model's current state, needed to determine + // diff when model changes + var prev = scope.model.slice(); + scope.$watch("model", function() { + var added = scope.model.filter(function(i) {return prev.indexOf(i) === -1;}), + removed = prev.filter(function(i) {return scope.model.indexOf(i) === -1;}), + i; + + prev = scope.model.slice(); + + // Remove tags no longer in binded model + for (i = 0; i < removed.length; i++) { + select.tagsinput('remove', removed[i]); + } + + // Refresh remaining tags + select.tagsinput('refresh'); + + // Add new items in model as tags + for (i = 0; i < added.length; i++) { + select.tagsinput('add', added[i]); + } + }, true); + }); + } + }; +}]); diff --git a/bootstrap/bootstrap-tagsinput-angular.min.js b/bootstrap/bootstrap-tagsinput-angular.min.js new file mode 100644 index 0000000..b1372b1 --- /dev/null +++ b/bootstrap/bootstrap-tagsinput-angular.min.js @@ -0,0 +1,7 @@ +/* + * bootstrap-tagsinput v0.6.1 by Tim Schlechter + * + */ + +angular.module("bootstrap-tagsinput",[]).directive("bootstrapTagsinput",[function(){function a(a,b){return b?angular.isFunction(a.$parent[b])?a.$parent[b]:function(a){return a[b]}:void 0}return{restrict:"EA",scope:{model:"=ngModel"},template:"",replace:!1,link:function(b,c,d){$(function(){angular.isArray(b.model)||(b.model=[]);var e=$("select",c),f=d.typeaheadSource?d.typeaheadSource.split("."):null,g=f?f.length>1?b.$parent[f[0]][f[1]]:b.$parent[f[0]]:null;e.tagsinput(b.$parent[d.options||""]||{typeahead:{source:angular.isFunction(g)?g:null},itemValue:a(b,d.itemvalue),itemText:a(b,d.itemtext),confirmKeys:a(b,d.confirmkeys)?JSON.parse(d.confirmkeys):[13],tagClass:angular.isFunction(b.$parent[d.tagclass])?b.$parent[d.tagclass]:function(a){return d.tagclass}});for(var h=0;h'); + this.$input = $('').appendTo(this.$container); + + this.$element.before(this.$container); + + this.build(options); + } + + TagsInput.prototype = { + constructor: TagsInput, + + /** + * Adds the given item as a new tag. Pass true to dontPushVal to prevent + * updating the elements val() + */ + add: function(item, dontPushVal, options) { + var self = this; + + if (self.options.maxTags && self.itemsArray.length >= self.options.maxTags) + return; + + // Ignore falsey values, except false + if (item !== false && !item) + return; + + // Trim value + if (typeof item === "string" && self.options.trimValue) { + item = $.trim(item); + } + + // Throw an error when trying to add an object while the itemValue option was not set + if (typeof item === "object" && !self.objectItems) + throw("Can't add objects when itemValue option is not set"); + + // Ignore strings only containg whitespace + if (item.toString().match(/^\s*$/)) + return; + + // If SELECT but not multiple, remove current tag + if (self.isSelect && !self.multiple && self.itemsArray.length > 0) + self.remove(self.itemsArray[0]); + + if (typeof item === "string" && this.$element[0].tagName === 'INPUT') { + var delimiter = (self.options.delimiterRegex) ? self.options.delimiterRegex : self.options.delimiter; + var items = item.split(delimiter); + if (items.length > 1) { + for (var i = 0; i < items.length; i++) { + this.add(items[i], true); + } + + if (!dontPushVal) + self.pushVal(); + return; + } + } + + var itemValue = self.options.itemValue(item), + itemText = self.options.itemText(item), + tagClass = self.options.tagClass(item), + itemTitle = self.options.itemTitle(item); + + // Ignore items allready added + var existing = $.grep(self.itemsArray, function(item) { return self.options.itemValue(item) === itemValue; } )[0]; + if (existing && !self.options.allowDuplicates) { + // Invoke onTagExists + if (self.options.onTagExists) { + var $existingTag = $(".tag", self.$container).filter(function() { return $(this).data("item") === existing; }); + self.options.onTagExists(item, $existingTag); + } + return; + } + + // if length greater than limit + if (self.items().toString().length + item.length + 1 > self.options.maxInputLength) + return; + + // raise beforeItemAdd arg + var beforeItemAddEvent = $.Event('beforeItemAdd', { item: item, cancel: false, options: options}); + self.$element.trigger(beforeItemAddEvent); + if (beforeItemAddEvent.cancel) + return; + + // register item in internal array and map + self.itemsArray.push(item); + + // add a tag element + + var $tag = $('' + htmlEncode(itemText) + ''); + $tag.data('item', item); + self.findInputWrapper().before($tag); + $tag.after(' '); + + // add