Integrate this plugin in phpleague
-
Hello , I would like to integrate this great plugin in another plugin called phpleague .
I would like to create the chart with the data of the charts you can do ?thanks to you soon.
-
It would be easy to integrate, let me know if you need help.
Thanks I would not know dore start … basically once you have created the rankings I would like to compare the two teams through the chart with wins, draws and losses as … BEGINNING .
Ok, try something like this:
[barChart vaxis=”{title: ‘Categories’}” haxis=”{title: ”}” title=”Compare Arsenal vs Barcelona”]
[‘Category’, ‘Arsenal’, ‘Barcelona’],
[‘Win’, 1000, 400],
[‘Loss’, 1170, 460],
[‘Goals’, 660, 1120],
[‘Penalties’, 1030, 540]
[/barChart]Now the inner table can be generated by a PHP script so you will have dynamically generated table.
Or following the screenshot from the plug-in and using the categories from there:
[barChart vaxis=”{title: ‘Categories’}” haxis=”{title: ”}” title=”Compare Arsenal vs QPR”]
[‘Category’, ‘Arsenal’, ‘QPR’],
[‘PTS’, 22, 15],
[‘P’, 12, 12],
[‘W’, 7, 4],
[‘D’, 1, 3],
[‘L’, 4, 5],
[‘F’, 22, 13],
[‘A’, 22, 22]
[/barChart]It is this I managed to do it myself , but I said if they could do so automatically by the results , when you update the standings entering the match results are updated automatically even the chart, you can do? =
Now the inner table can be generated by a PHP script so you will have dynamically generated table , how do you insert this php I can not do it , thank you.
Assuming you have function which will generate the table with the data, let’s name this function “generate_comparison_data($team_1, $team_2)” than you need to write a PHP script in a page or function which will have something like this:
<div id=”my_chart”>
<?php
echo do_shortcode( ‘[barChart vaxis=”{title: \’Categories\’}” haxis=”{title: ”}” title=”Compare Arsenal vs QPR”]’ . generate_comparison_data($team_1, $team_2) .'[/barChart]’);
?>
</div>for more details see the WordPress function do_shortcode on http://codex.wordpress.org/Function_Reference/do_shortcode
I hope this helps
Thank you very much for your help, but unfortunately I’m not able to do this, I find it hard to do so. π
Ok, let me see the PHPLeague plug-in and see how much time I will take me to add a short code for integration with the PHPLeague.
I’ll let you know in 2-3 days.Thank you, I can not wait to provarlo..aspetto and then see if everything works automatically.
Updates for integration chart on phpleague? Thanks….
I’v started work on this. I will let you know once I have something which works so you can take it and test π
Hi, just to inform you, I will add a bar chart with the results in the next release of the plug-in (which I will release most probably mid of next week).
Hello , perfect, make the changes that you can do , wait for the release of this plugin soon .
thanks to you soon.
I have released the 0.4.
Install PHPLeague, fill some information and try this:[phpLeagueGraphPerCategory league=”2″ /]
[phpLeagueGraphPerTeam/]
[phpLeagueGraphPerTeam league=”1″ club_list=”1,2″/]Let me know how you like it.
The topic ‘Integrate this plugin in phpleague’ is closed to new replies.