Jump to content

Generate fake favourites for videos, albums and models


Tech Support

Recommended Posts

Paysite theme by default renders the number of users who added video, album or model to favourites:

 

paysite_theme_generate_favourites.png.64b92f0358ad6716bbd18803df16e6f2.png

 

It will be good for your project if these numbers won't be 0 from the very start. In order to achieve that you can use the attached PHP script to generate fake favourites (kvs_generate_fake_favourites.txt). Put this file into your web root folder, rename it to .php extension and open for editing.

 

There are 3 lines you can modify to control how many favourites will be generated in average for each object type:

$average_subscribers_count_for_models = 10;
$average_subscribers_count_for_videos = 10;
$average_subscribers_count_for_albums = 10;

 

 

This number is average, it means that some content will have less than 10 and some will have more than 10. Adjust according to your needs. We do not recommend to put big numbers if you have many content.

 

When ready, run this script using:

http://domain.com/kvs_generate_fake_favourites.php

 

Then make sure you delete the script.

 

Removing fake favourites

 

This script can also delete fake favourites that were previously generated if needed. It won't delete any real favourites that were created later by real members.

In order to do that simply put 0 in all options:

$average_subscribers_count_for_models = 0;
$average_subscribers_count_for_videos = 0;
$average_subscribers_count_for_albums = 0;

 

 

Then run the script:

http://domain.com/kvs_generate_fake_favourites.php

kvs_generate_fake_favourites.txt

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...