Custom 'nb_visits' data

(Kesro) #1

At first thank you for this great component! I have installed into the Joomla 1.5.10, works great!

My partner has asked me to modify a bit the official “Visits summary > Last visits graph” widget data - do multiplication on the ‘nb_visits’.

I mean, now it is 200 visitors on this day, and it would be great to show in the widget (on the front with embed iframe ) eg: 2 times more (400 visitors) or add more 150 visits to each day - everywhere in the data flow.
I know it is fake data, but this was his request to show to the visitors a bit better visit frequency as the current state is (marketing strategy).
Could you help me to change the code at the right part? Ideally it is only a multiplication/addition somewhere.

Is there any option to show custom data in the charts?

Thank you for your answers in advance!

Regards from Hungary,

(vipsoft) #2

Look un the misc folder. There’s a script for creating dummy data.

(Kesro) #3

Thank you vipsoft the quick respond!

I have found it, I was able to run the “generateVisits.php” (the result was empty page), but could you help me to explain how can I show up these datas on the front? Any widget/HTML embed code?
There I can found the “widget_example_lastvisits.html”, what is referring to your demo.

I have tried to understand the scripts/docs without success.

Thanks a lot again!

(Kesro) #4

If my understanding is right, the mentioned script is adding “dummy visits” to the SQL table, what is still cool, but if this is right, then the feedback is that, it is not working. :frowning:

I have changed the
$minVisitors = 2000;
$maxVisitors = 10000;
$nbActions = 10;
$daysToCompute = 1;

The result is an empty sheet :frowning:

(Kesro) #5

Experiment: Never give up :slight_smile:

Looks like I have found the solution, the “Whys, Hows”. The component is perfect, but there is no document to show the usage of the generateVisits.php … if somebody has the same issue, please have a look on the next steps.

  1. Clear your SQL database (this is the best)
  2. Make a new “Site group” (settings\sites)
    the first has to be the dummy, the 2nd is the real (if you need) - the script will add visits to the first group ( as I see, under testing, I will see tomorrow)
  3. Script (generateVisits.php) setup
    Each time, when you run the script, it will generate additional data for the data table.

Go into the Misc folder, edit the file
$minVisitors = XXX;
$maxVisitors = XXX;
$nbActions = X;
$daysToCompute = 1; (here I propose 1, this will means the script will generate additional only data for today)

I proposed the “1” day, because if you have “crontab” on the server, then you can setup that the server will run this script file each day, 1 time.
Especially I have tried the 5-10 days also, but it crashed :frowning: Easiest if the server do each day.

With this you will have a dummy table, what can be published in the same way, and you will have the real data also in the background …
Like here:

And id you have time and effort, have a look on the Open Flash chart project … just perfect!