add these options for page
-
hello
I am creating a page for see the balance users
and I wonder if possible add these options
page can see here
http://espavirtual.com/movimientos-y-saldo/attached image
http://www.subirimagenes.cl/images/2013/06/25/Sin_titulo-3.pngBest regards
-
The myCRED_Query_Log class is used whenever the log is queried. I am working on a tutorial that goes though this class and shows you how to add those features you are asking for.
By itself, the myCRED_Query_Log class supports searching the log and filter results by date. But the dropdown menus and search fields we have to add ourselves.
hi Gabriel
not how I can help to add these new functions
with these changes and could start the integration of mycred
on the web
and could remove cubepointI’m working
on this code
<?php mycred_get_total_by_time( $from, $to, $ref, $user_id, $type ); ?>but does not return
no valueI can help
see example page
http://espavirtual.com/author/adminregards
if I work with
<?php echo do_shortcode(‘[mycred_history time=”thismonth”]’); ?>
Can you show me how you use the mycred_get_total_by_time function? Please use pastebin for larger code snippets.
Hi,
<div style="background: #EFEFEF; display: inline-block;"> <div style="float: left; font-size: 17px; font-weight: bold; background: #E0E0E0; padding: 18px; color: #565656;">Mi Saldo</div> <div style="float: left; padding: 18px; font-size: 20px;"><?php echo mycred_get_users_cred( $user_id, $type ); ?> <?php echo mycred_name( $singular ); ?></div> </div> <div style="background: #EFEFEF; display: inline-block;"> <div style="float: left; font-size: 17px; font-weight: bold; background: #E0E0E0; padding: 18px; color: #565656;">Mi Rango</div> <div style="float: left; padding: 18px; font-size: 20px;"><?php echo mycred_get_my_rank();?> </div> </div> <div style="clear: both;"></div> <p style="font-weight: bold;">Información sobre sus ingresos y gastos</p> <?php mycred_get_total_by_time( $from, $to, $ref, $user_id, $type ); ?>and this function
not me
returns
prefix
<?php echo mycred_get_users_cred( $user_id, $type ); ?>
Only the balancedoing
so
<?php echo mycred_get_users_cred( $user_id, $type ); ?> <?php echo mycred_name( $singular ); ?>
is how I get the prefixHey Ramon.
If you enable WP_DEBUG and visit this page, do you get any error messages? I assume you have defined the variables you are using?
Also, when writing code snippets on this forum, please select your code and click on the “code” button above the textarea so they get wrapped.
If you want to get a users points balance formated use the mycred_get_users_fcred function instead of mycred_get_users_cred.
I get errors
attached imageJust as I expected. You have just copy and pasted code from the codex. 🙂
This is not correct. You need to define all those values! PHP does not know what $user_id.Please visit the codex for the functions you are using and look at the examples.
Let me give you an example:
This code of yours is invalid:
echo mycred_get_users_cred( $user_id, $type );This is because PHP does not know what $user_id or $type is. You need to define these.
Example:
$user_id = 1; echo mycred_get_users_cred( $user_id );In the above example I took out $type since you have no use for this.
If you want to use the function in BuddyPress to display the current profile id you can use:
$user_id = bp_displayed_user_id();or if you want to show the current users id (the one who views the page):
$user_id = get_current_user_id();I understand, I
this is too
complicated for
myI will try to use the function
<? php echo do_shortcode (‘[]’);?>whenever possible, that the
variables are as definedIt is basic PHP but if you are unfamiliar with PHP I understand it can seem complicated.
If the features you are looking for are offered in one of our shortcodes then you are much better of using the shortcodes.
I’m trying
and get
results without
errorwhere I can
see the value
of the
variables
The topic ‘add these options for page’ is closed to new replies.