Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function hp_members($params){
- $current_site = get_blog_details();
- $domain = str_replace('http://www.', '', $current_site->siteurl);
- $atts = shortcode_atts(array(
- 'count' => 6, //how many images per slide
- 'total_limit' => 10,
- 'partner_id' => 8696,
- 'url'=>"//members.$domain/",
- 'image_size'=>300,
- 'show_location'=>"true",
- 'enable_flip_effect'=>"true",
- 'paid_services_only'=>"false",
- 'show_username'=>"true",
- 'multy_user_types'=>"females,couples", //could be: males, females, tv, couples
- 'country_id'=>"193",
- 'control_type'=>"photosblock",
- ), $params);
- ob_start();
- ?>
- <link type="text/css" rel="stylesheet" href="//members.<?php echo $domain ?>/application/panels/style/responsive.css?partnerId=<?php echo $atts['partner_id'] ?>">
- <div id="usersList" class="photo_block"> </div>
- <script type="text/javascript">
- jQuery(document).ready(function ($) {
- $.getScript('//members.<?php echo $domain ?>/application/panels/panels.js', function () {
- var hub_login_shrt = new HubPanel();
- hub_login_shrt.control_type = "<?php echo $atts['control_type'] ?>";
- hub_login_shrt.multy_user_types = "<?php echo $atts['multy_user_types'] ?>";
- hub_login_shrt.partnerId = <?php echo $atts['partner_id'] ?>;
- hub_login_shrt.url = "<?php echo $atts['url'] ?>";
- // link to signup form (if empty - your default signup link)
- hub_login_shrt.signup = "javascript:scrollSignup();";
- hub_login_shrt.image_size = <?php echo $atts['image_size'] ?>; // size of one image in photoblock
- hub_login_shrt.images_count = <?php echo $atts['count'] ?>;
- hub_login_shrt.images_total_count = <?php echo $atts['total_limit'] ?>; // total images count
- hub_login_shrt.liWidth = "";
- hub_login_shrt.showLocation = <?php echo $atts['show_location'] ?>;
- hub_login_shrt.enableFlipEffect = <?php echo $atts['enable_flip_effect'] ?>; // enable animation or no
- hub_login_shrt.placeholder = "usersList";
- hub_login_shrt.paidServicesOnly = <?php echo $atts['paid_services_only'] ?>;
- hub_login_shrt.showUsername = <?php echo $atts['show_username'] ?>;
- hub_login_shrt.countryId = <?php echo $atts['country_id'] ?>;
- hub_login_shrt.create();
- });
- });
- function scrollSignup() {
- var offset = jQuery('.Registration').offset();
- jQuery("body").animate({
- scrollTop: offset.top
- }, "1000", "swing", function() {
- jQuery(".Registration #reg-form").focus()
- })
- }
- </script>
- <?php
- $shortcode = ob_get_clean();
- return $shortcode;
- }
- add_shortcode('hp_members', 'hp_members');
Advertisement
Add Comment
Please, Sign In to add comment