Title: strategeek's Replies | WordPress.org

---

# strategeek

  [  ](https://wordpress.org/support/users/strategeek/)

 *   [Profile](https://wordpress.org/support/users/strategeek/)
 *   [Topics Started](https://wordpress.org/support/users/strategeek/topics/)
 *   [Replies Created](https://wordpress.org/support/users/strategeek/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/strategeek/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/strategeek/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/strategeek/engagements/)
 *   [Favorites](https://wordpress.org/support/users/strategeek/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/users/strategeek/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/strategeek/replies/page/2/?output_format=md)

 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Mystical wpdb query problem. What I’m doing wrong?](https://wordpress.org/support/topic/mystical-wpdb-query-problem-what-im-doing-wrong/)
 *  Thread Starter [strategeek](https://wordpress.org/support/users/strategeek/)
 * (@strategeek)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/mystical-wpdb-query-problem-what-im-doing-wrong/#post-9088224)
 * Hah, I finally found a bug. It was a problem with IDs…
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Mystical wpdb query problem. What I’m doing wrong?](https://wordpress.org/support/topic/mystical-wpdb-query-problem-what-im-doing-wrong/)
 *  Thread Starter [strategeek](https://wordpress.org/support/users/strategeek/)
 * (@strategeek)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/mystical-wpdb-query-problem-what-im-doing-wrong/#post-9088189)
 * Hi Djenci. Yes, I’m logged in.
 *     ```
       $user_ID = get_current_user_id();
       echo ($user_ID);
       ```
   
 * When I do echo, I get the correct value which is 2
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Captcha] How to reload CAPTCHA after ajax form submit](https://wordpress.org/support/topic/how-to-reload-captcha-after-ajax-form-submit/)
 *  Thread Starter [strategeek](https://wordpress.org/support/users/strategeek/)
 * (@strategeek)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/how-to-reload-captcha-after-ajax-form-submit/#post-8537506)
 * Great! Thanks a lot!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Private groups] How to get forum IDs that are assigned to a private group?](https://wordpress.org/support/topic/how-to-get-forum-ids-that-are-assigned-to-a-group/)
 *  Thread Starter [strategeek](https://wordpress.org/support/users/strategeek/)
 * (@strategeek)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/how-to-get-forum-ids-that-are-assigned-to-a-group/#post-7440258)
 * Hi Robin. Thank you for the clue!
 * I have finally made it. Now after user creation, the new user will be automatically
   subscribed to the forum(s) that belong to the private group which is assigned
   to the user role.
 *     ```
       $name2= $rpg_roles[$user_role];
       	$forums=$wpdb->get_col("select ID from $wpdb->posts where post_type='forum'") ;
       	foreach ($forums as $forum) {
       		$meta = (array)get_post_meta( $forum, '_private_group', false );
       		foreach ($meta as $meta2) {
       			if ($meta2==$name2) {
       			if ( !function_exists( 'bbp_add_user_forum_subscription' ) ) {
       			require_once ABSPATH . PLUGINDIR . '/bbpress/includes/users/functions.php';
       			}
       			$forum_id = $forum;
       			bbp_add_user_subscription($user_id, $forum_id);
       			}
       		}
       	}
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Private groups] Role change and Sticky posts](https://wordpress.org/support/topic/role-change-and-sticky-posts/)
 *  Thread Starter [strategeek](https://wordpress.org/support/users/strategeek/)
 * (@strategeek)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/role-change-and-sticky-posts/#post-7422436)
 * Ok, great, thanks for the answers! If no success on my own, I will probably ask
   for help again 🙂 Thanks!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Private groups] Role change and Sticky posts](https://wordpress.org/support/topic/role-change-and-sticky-posts/)
 *  Thread Starter [strategeek](https://wordpress.org/support/users/strategeek/)
 * (@strategeek)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/role-change-and-sticky-posts/#post-7422434)
 * I tried this and similar shortcode with style pack plugin but it doesn’t work.
   Also we try to use as less plugins as possible.
 * I guess, for now I stick with simple stickies and will try to figure out how 
   to move them to the top when [bbp-topic-index] shortcode is used.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Private groups] Role change and Sticky posts](https://wordpress.org/support/topic/role-change-and-sticky-posts/)
 *  Thread Starter [strategeek](https://wordpress.org/support/users/strategeek/)
 * (@strategeek)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/role-change-and-sticky-posts/#post-7422424)
 * Hi Robin. I continue playing with stickies and super stickies and it becomes 
   clear that stickies should be used instead of super stickies.
 * But then there is the same question: how to move stickies to the top of the topics
   list that is shown by [bbp-topic-index] shortcode? Any ideas?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Private groups] Role change and Sticky posts](https://wordpress.org/support/topic/role-change-and-sticky-posts/)
 *  Thread Starter [strategeek](https://wordpress.org/support/users/strategeek/)
 * (@strategeek)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/role-change-and-sticky-posts/#post-7422397)
 * Or, we can just move simple stickies to the top of the whole topics list. We 
   are using this shortcode to display topics: [bbp-topic-index]
 * Because now the list is displayed: most recent on top. Stickies are treated similar
   as simple topics.
 * If we can get stickies to be displayed on top (sort by recent), and then simple
   topics (sort by recent-as it is now), that would solve the problem.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Private groups] Role change and Sticky posts](https://wordpress.org/support/topic/role-change-and-sticky-posts/)
 *  Thread Starter [strategeek](https://wordpress.org/support/users/strategeek/)
 * (@strategeek)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/role-change-and-sticky-posts/#post-7422396)
 * Regarding stickies, unfortunately simple “stick” is not good for our forum, because
   we treat individual forums more like categories, and so most of the time we see
   all topics (from different forums-categories) in one page. Individual forums-
   categories are rarely visited. So we need to use super-stickies in order to highlight
   the important topics at the top of the whole topics list.
 * I guess the if statement logic should be something similar to this:
 * if is_super_sticky && is_in_the_forum_that_user_can_not_access
    then redirect
   to restricted-access.php
 * Can this work? Any other ideas?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Private groups] Role change and Sticky posts](https://wordpress.org/support/topic/role-change-and-sticky-posts/)
 *  Thread Starter [strategeek](https://wordpress.org/support/users/strategeek/)
 * (@strategeek)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/role-change-and-sticky-posts/#post-7422391)
 * Hi Robin.
 * Thank you for the clue. I have figured out how to change role and private group
   together. Below is the code. Now I will try to play with stickies and super stickies…
 *     ```
       if ( !empty( $_POST['role'] ) ) {
       		wp_update_user(array('ID' => $user_id,'role' => esc_attr( $_POST['role'])));
       	  	global $rpg_roles ;
       		$user_info = get_userdata($user_id);
       		$user_roles = $user_info->roles ;
       		foreach ((array)$user_roles as $list=>$role) {
       				$group = $rpg_roles[$role] ;
       				update_user_meta( $user_id, 'private_group', $group);
       		}
       		}
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Private groups] Role change and Sticky posts](https://wordpress.org/support/topic/role-change-and-sticky-posts/)
 *  Thread Starter [strategeek](https://wordpress.org/support/users/strategeek/)
 * (@strategeek)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/role-change-and-sticky-posts/#post-7422324)
 * Regarding issue nr.1 I have made a front end user edit screen so that the site
   admin can edit users without going to the dashboard.
 * The post method looks like this:
 *     ```
       if ( !empty( $_POST['role'] ) )
       wp_update_user(array('ID' => $user_id,'role' => esc_attr( $_POST['role'])));
       ```
   
 * Maybe here I can also add a code to update the user (overwrite the role) also
   in bbP private group?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Private groups] Role change and Sticky posts](https://wordpress.org/support/topic/role-change-and-sticky-posts/)
 *  Thread Starter [strategeek](https://wordpress.org/support/users/strategeek/)
 * (@strategeek)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/role-change-and-sticky-posts/#post-7422323)
 * Hello Robin. Thank you for taking your time to help me with this.
 * Regarding issue nr.2 I am talking about super-sticky.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ditty – Responsive News Tickers, Sliders, and Lists] Scrolling ticks inconsistency in spacing issue](https://wordpress.org/support/topic/scrolling-ticks-inconsistency-in-spacing-issue/)
 *  Thread Starter [strategeek](https://wordpress.org/support/users/strategeek/)
 * (@strategeek)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/scrolling-ticks-inconsistency-in-spacing-issue/#post-6647335)
 * Yep, that one is even better. Many thanks!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ditty – Responsive News Tickers, Sliders, and Lists] Scrolling ticks inconsistency in spacing issue](https://wordpress.org/support/topic/scrolling-ticks-inconsistency-in-spacing-issue/)
 *  Thread Starter [strategeek](https://wordpress.org/support/users/strategeek/)
 * (@strategeek)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/scrolling-ticks-inconsistency-in-spacing-issue/#post-6647211)
 * The suggested solution did not work as expected because it repeated only one 
   tick 50 times, and then another tick 50 times etc. It needed to repeat the whole
   group of ticks.
 * We have modified the code in ditty-news-ticker/includes/functions.php after “
   Randomize the ticks” and before “Close the ticker container” functions, starting
   on line 182, here is the code:
 * $all = “”;
 *  $total = count($dnt_ticks);
    foreach( $dnt_ticks as $i => $tick ) {
 *  $type = ( $_mtphr_dnt_type == ‘mixed’ ) ? $tick[‘type’] : $_mtphr_dnt_type;
   
   $tick = ( $_mtphr_dnt_type == ‘mixed’ ) ? $tick[‘tick’] : $tick;
 *  // Set the list spacing depending on the tick position
    if( $_mtphr_dnt_mode
   == ‘list’ ) { $spacing = ( $i != intval($total-1) ) ? ‘margin-bottom:’.intval(
   $_mtphr_dnt_list_tick_spacing).’px;’ : ”; } $spacing = apply_filters( ‘mtphr_dnt_list_tick_spacing’,
   $spacing, $i, $total ); $tick_style = ( $width != ” || $height != ” || $spacing!
   = ” ) ? ‘ style=”‘.$width.$height.$spacing.'”‘ : ”; $all = $all . $tick.”    “;
 *  }
 *  do_action( ‘mtphr_dnt_tick_before’, $id, $meta_data, $total, $i );
    echo ‘<div’.
   $tick_style.’ ‘.mtphr_dnt_tick_class(‘mtphr-dnt-‘.$type.’-tick mtphr-dnt-clearfix’).’
   >’; do_action( ‘mtphr_dnt_tick_top’, $id, $meta_data );
 *  echo str_repeat($all,50); //repeat 50 times
 *  do_action( ‘mtphr_dnt_tick_bottom’, $id, $meta_data );
    echo ‘</div>’; do_action(‘
   mtphr_dnt_tick_after’, $id, $meta_data, $total, $i );
 *  }
 * Thanks for the help!
    Issue resolved 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ditty – Responsive News Tickers, Sliders, and Lists] Scrolling ticks inconsistency in spacing issue](https://wordpress.org/support/topic/scrolling-ticks-inconsistency-in-spacing-issue/)
 *  Thread Starter [strategeek](https://wordpress.org/support/users/strategeek/)
 * (@strategeek)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/scrolling-ticks-inconsistency-in-spacing-issue/#post-6647125)
 * Thank you for a fast reply.
 * The problem is that our site is designed for users and users are the ones who
   update the ticker. So it would be very difficult to explain them to duplicate
   ticks and I believe they will not like that.
 * Maybe there is a way to edit the code so that all ticks would be duplicated automatically(
   always)?

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/users/strategeek/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/strategeek/replies/page/2/?output_format=md)