-
Author
Tagged: members online, animated numbers, demo page
-
September 1, 2014 at 09:32 #27212ntkrisParticipant
Dear lord, this is THE best theme ever and I am literally going to be purchasing it for many if not all of my different sites. I am just now starting to dig in and although I am pretty good at googling things and taking the time to figure things out; I am sorry to say that I am perplexed as hell with the Animated Number thing. Ok, so on ur demo on the front u have the incredibly useful feature of members online, groups of interest and topics created. Its is so freaking awesome! But those demo numbers of course do not reflect my actual numbers so i am wondering, are these just numbers I have to manually update myself or is there some codes or short codes that I can plug in to the text field that will dynamically propagate these numbers in the fields for me? And if there is, can you pretty please with sugar on top tell me what that code is or how do I go about making this reflect my actual numbers?
September 1, 2014 at 13:43 #27224CatalinModeratorHello,
Welcome in Kleo family, glad you enjoy the theme. To modify the numbers, you need to use this shortcode:
COPY CODE[kleo_animate_numbers animation="animate-when-almost-visible" timer="3000"]xxx[/kleo_animate_numbers]
where xxx is your number. Also take a look at my screenshot.
Thank you,
CatalinHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionAttachments:
You must be logged in to view attached files.September 2, 2014 at 19:07 #27360orbitkillerParticipantHi,
your theme is really a blast!
But is there any way to get these numbers shown in your example “xxx” dynamically, by shortcode for example, means that they really reflect the numbers of your current site, without editing them manually?
Thank you.
CharelSeptember 2, 2014 at 19:57 #27361orbitkillerParticipantHi, i developed a solution myself, it is not yet finished but it should get you (people that want to use it) an idea.
Animated Kleo Numbers
######
Issue: Kleo shortcode only lets you animated static number. What we want is to get these animated numbers in real dynamicallyMy Solution:
functions.php EDIT/ADD
######COPY CODE/** * @author orbitkiller * @function adds shortcode support to get user and group count for animated kleo numbers */ function ok_get_option_shortcode( $theme_option ) { return get_option( $theme_option['key'] ); } add_shortcode( 'get-theme-option', 'ok_get_option_shortcode' ); Use de following Option shortcode to retrieve the wanted data ###### [get-theme-option key="<yourOptionNameYouWantDataFrom>"] KLEO Animated Number Shortcode MODIFIED ###### members [kleo_animate_numbers animation="animate-when-almost-visible" timer="3000"][get-theme-option key="_transient_bp_active_member_count"][/kleo_animate_numbers] public blogs [kleo_animate_numbers animation="animate-when-almost-visible" timer="3000"][get-theme-option key="blog_public"][/kleo_animate_numbers]
Further issues
######
For group count and active topics i did not find any option, but i am developing a function that retrieves these count values and i will put them into custom option.
I did not have much time today, i will post this function in the coming days to complete this solution…Hints
#######
Where to find option names / options store data -> /wp-admin/options.php (when logged-in)
Can be applied to other displayable values if needed/wanted…Have fun.
CharelSeptember 7, 2014 at 11:16 #27837orbitkillerParticipantHi,
i finally did a whole solution for this issues, at least to the best of my knowledge.
My Code:
COPY CODE<?php /******************************************************************* :: Extends functions.php ********************************************************************/ /** * @author orbitkiller * @function get num rows of db tables / buddypress group / blog count by row */ function ok_get_row_count( $table_name ) { //$table_name -> db table to count the rows of global $wpdb; $array = $wpdb->get_results( "SELECT * FROM $table_name"); $rows = mysql_num_rows($count); //simple array iteration with count to retrieve row count $rows = 0; foreach ($array as $key => $value) { $rows++; } return $rows; } /** * @author orbitkiller * @function adds shortcode support to get user and group count for animated kleo numbers */ function ok_get_option_shortcode( $theme_option ) { return get_option( $theme_option['key'] ); } add_shortcode( 'get-theme-option', 'ok_get_option_shortcode' ); /** * @author orbitkiller * @function bp add group count and blog count to custom options */ //create options add_option( "_ok_bp_member_count", 0, "", "yes"); add_option( "_ok_bp_group_count", 0, "", "yes"); add_option( "_ok_bp_blog_count", 0, "", "yes"); //add_option( "_ok_bp_message_count", 0, "", "yes"); //get bp group count and blog count /* db table names for extended counts display bp active members -> wp_bp_groups_members bp active groups -> wp_bp_groups bp blogs -> wp_bp_user_blogs bp written messages -> wp_bp_messages_messages */ $okBPmembers = ok_get_row_count("wp_bp_groups_members"); $okBPgroups = ok_get_row_count("wp_bp_groups"); $okBPblogs = ok_get_row_count("wp_bp_user_blogs"); //$okBPblogs = ok_get_row_count("wp_bp_messages_messages"); //update options update_option( "_ok_bp_member_count", $okBPmembers); update_option( "_ok_bp_group_count", $okBPgroups); update_option( "_ok_bp_blog_count", $okBPblogs); //update_option( "_ok_bp_message_count", $okBPblogs); ?>
Hope i could help.
Bye
CharelSeptember 7, 2014 at 11:20 #27838orbitkillerParticipantLet me correct only one thing, line 16 in my previous code post is not needed.
September 9, 2014 at 00:06 #28055AbeKeymasterHi there, Thanks for your appreciation, it means a lot.
The animated numbers shortcode supports adding a shortcode inside it that generates a number, for example you can use shortcodes like:COPY CODE[kleo_total_members] [kleo_bbpress_stats type=topics] [kleo_bp_member_stats field="User type" value="Agent"]
Full example:
[kleo_animate_numbers animation="animate-when-almost-visible" timer="3000"][kleo_total_members][/kleo_animate_numbers]Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.August 21, 2015 at 01:40 #74008pandreas82ParticipantCan I find somewhere all these shortcodes and how to use them?
Thank you!
Andreas
August 21, 2015 at 08:32 #74022pandreas82ParticipantIn general, can I download somehow a demo like this http://seventhqueen.com/themes/kleo/home-default/ in order to see how it has been developed?
Regards,
Andreas
August 27, 2015 at 00:58 #74774AbeKeymasterHi. Really sorry for the late reply.
All the shortcodea can be used from the Visual composer interface. Also all the demo pages can be imported from Appearance – Kleo demo data
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.September 10, 2015 at 01:57 #76843pandreas82ParticipantBack to this topic, the question now is this: Which is the shortcode for total groups?
In general, where are all numbering shortcodes? You can add a shortcode through visual composer, but you can set static values about groups. I would like this info to be dynamic, but don’t know where to find shortcodes..
Thank you!
Andreas
September 15, 2015 at 23:50 #77939pandreas82ParticipantWhere can I find all numbering shortcodes?
Can anyone help?
Thank you!
September 18, 2015 at 11:13 #78336AbeKeymasterFor groups we don’t have one. All the available shortcodes are seen in the shortcode editor button
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer. -
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.