Forum Replies Created
-
AuthorPosts
-
August 1, 2019 at 6:57 pm in reply to: How can I output the total number of views for one month for all total users ? #66357
Stefano
KeymasterUnfortunately, there is no native way to achieve that, I’m afraid ๐
August 1, 2019 at 11:11 am in reply to: How can I output the total number of views for one month for all total users ? #66335Stefano
KeymasterHi there,
you should look at the Overall stats feature at the bottom of the stats page. It provides totals for the stats shown. So if you select the time range the right way, you should get what you are looking for ๐If you don’t see any Overall stats at the bottom of the stats page, make sure they are enabled in Options > Miscellanea > Performance.
Have a nice day,
StefanoStefano
KeymasterHi there,
I would strongly advise adjusting your setup to have the post content into the default WordPress field, instead of a meta field. All plugins and themes will expect this, and doing it differently will always require tweaking the code.Then, if you really want to keep your current setup, Post Pay Counter will need to be tweaked as well. However, changing plugin code to make it fit your site is not part of the support we provide, but is instead custom (paid) work. So if you would like I can provide you with a quote for the custom work. Otherwise, sorry, but we cannot put in (several) paid hours of work without being paid ๐ Hope you understand!
Have a nice day,
StefanoStefano
KeymasterRight – so what you can do is look for
post_contentin the filepost-pay-counter/classes/ppc_counting_stuff_class.php. In the functioncount_post_words, the post content is wrapped in a filter and it should be easy. On the other hand, in the functioncount_post_images, the plugin takes the WP post content without any filtering. You can add it yourself with the nameppc_count_post_images_post_content_startand I will add it to the public code in the next release, so you will still be able to update to future versions ๐Or another way would be to hack the function by filtering its output through
ppc_counted_post_imagesand calling herself back with$post, having populated$post->post_contentwith the post content taken from your custom field.Hope this helps!
Have a nice day,
Stefano-
This reply was modified 6 years, 4 months ago by
Stefano.
Stefano
KeymasterAre you a developer? ๐
Stefano
KeymasterHi there,
the plugin does not retrieve post content from sources other than the default WP one, as that is what virtually all websites do. You will need to have some custom work done in order for the plugin to retrieve the content from your custom field and to work properly ๐Have a nice day,
StefanoStefano
KeymasterHi Chris,
no, implementing code is extra, and requires quoting and working as you mentioned ๐
However, this would be significant changes and I am honestly not in the position to accept it now. Pagination in the backend is partly managed by WordPress through itsWP_List_Tableclass, our implementation is inpost-pay-counter/classes/ppc_wp_list_table_posts_class.phpfor example.To change the behaviour of the shortcode you may want to look into
post-pay-counter-pro/classes/ppcp_shortcode_class.php. Not sure if this helps, though :\Stefano
KeymasterHi Chris,
I think there was some misunderstanding here: UD asked for directions on where to find code (in particular, the stats generation code), which I provided. But we never discussed nor agreed about any edits to the code ๐Stefano
KeymasterHi Chris,
Sorry, what changes are you talking about? ๐Have a nice day,
StefanoStefano
KeymasterHi UD,
Iโm aware of the shortcode limits, I was inquiring more about the code, specifically the function that returns the posts list for the stats_shortcode function.
Right – so you are probably looking for the class post-pay-counter/classes/ppc_generate_stats_class.php. There, the function
produce_stats()is what is called anytime stats need to be generated. It then calls up all the necessary intermediate steps to come up with processed stats ๐Hope this helps!
Have a nice day,
StefanoStefano
KeymasterThe problem is that line 304 of functions.php should have the word
creatorall in small caps:if( in_array( 'creator', (array) $user->roles ) ). This should fix ๐Stefano
KeymasterI wrote the
Creatorword lowercase, just in case. Did that helped? Anyway, I don’t see any user with that role on your site, who should I check out to test?Stefano
Keymasternow I am unable to see refer link on posts
Well, you do not have the creator role, I guess, so it is right that you do not see the link, right? Do creators see it?
Stefano
KeymasterHi UD,
there’s currently no way to change the number of posts displayed with the shortcode. It is possible in the backend, though. The same applies to payment histories ๐Have a nice day,
StefanoStefano
KeymasterHi Nour,
- Yes, you can define how much you want to pay each referral visit
- The payment for referral visits is not shared with the post author – that is more money that goes out of the administrator account
- This is how the referral link shows up in the frontend:
The link can also be fetched from the post edit page, and there is a shortcode to display the box above anywhere in the frontend.
Hope this helps!
Have a nice day,
StefanoStefano
KeymasterThis is where the user role is mentioned:
if( in_array( 'subscriber', (array) $user->roles ) )Stefano
KeymasterLine numbers were slightly off in your and my files, you had replaced the wrong line ๐ Try again now.
July 24, 2019 at 10:19 am in reply to: how to check the amount individually for reference visit on page in stats are #66124Stefano
KeymasterHi Surabhi,
you can see the stats for each user in the main stats table, in the Ref. visits column. That is where the total for each user is shown. Is this what you are looking for? Otherwise please provide some more explanation ๐Have a nice day,
StefanoStefano
KeymasterHi Raj,
I don’t really know what to say – I double tested the changes and they work for me. The best I can do is have a look with admin access at your site, most likely you did not do something all right ๐Have a nice day,
StefanoStefano
KeymasterHi Raj,
the following edits will have the effect of displaying the referral box only to the subscriber role. To change the role, just replace the word subscriber with whatever you wish in the code below ๐- Open the file ppc-referral-visits/classes/display.php and replace line 194 with this:
return apply_filters( 'ppc_ref_vis_referral_link_html', $ref_html, $author_id ); - Open your theme’s functions.php file and, at the bottom, add a few line breaks and add this:
function ppc_ref_vis_referral_link_filter_user_role( $html_output, $user_id ) { $user = get_userdata( $user_id ); if( in_array( 'subscriber', (array) $user->roles ) ) return $html_output; else return ''; } add_filter( 'ppc_ref_vis_referral_link_html', 'ppc_ref_vis_referral_link_filter_user_role', 10, 2 );
Let me know, it should have the desired effect!
Have a nice day,
Stefano -
This reply was modified 6 years, 4 months ago by
-
AuthorPosts