I want to build a plugin for piwik which can plot graphs by reading a json file. I want to bypass the whole process of having to acess a mysql database, is there an easy way that I could achieve this. Also I want to build a UI with standard things such as checkboxes, textfields etc, can I do that using piwik
This is a very vague question. Piwik seems to be a locally-installed web analytics program written in PHP.
You haven't told us what your plugin would do. How would it do whatever it needs to do without touching the database?
Have you read their plugin documentation? It's conveniently titled "How To Write a Plugin", btw. Hard to miss. It looks like the plugin is responsible for creating it's own HTML, so that at least answers your question about building a UI.
You will want to look at the developer friendly example plugin called ExampleUI, which shows how to plot line graphs, pie charts, tag clouds, and report 'tables' with automatic links to the API export, etc.
Enable ExampleUI in your Piwik installation, and click on the ExampleUI tab.
Related
Most of the question is in the title.
A client is asking me to build a form with dynamic hierarchical fields from which to build a sort of org-chart that must be exported to PPT (OpenOffice Impress is an option).
I've found many libraries that allows to do that, but all of them only allows to export to images, HTML5 or other non editable charts.
I'd really like to use Google Chart Tools (even though I'm afraid of Google tendency of discontinuing their products), but also this tool doesn't have any mean to export to PowerPoint.
Also PHPPowerPoint seems a possible solution, but there is no documentation as far as I can see and I don't know if the autoarrange requirement is available.
Being dynamically built, the library must also take care of automatically arranging all items (unless anyone knows a way to do that programmatically).
Does anyone ever had this need or know a possible approach?
The main point is that the generated file must be editable.
I have a php host, and a mysql database. from that i wish to create charts and diagrams using the mysql db in php. so for example pie charts, bar charts and so on. I'm open to options on this.
further more I would like to be able to create a front end in php that will allow the end user to be able to navigate records from the database and then be able to generate said charts based on the database.
I am familiar with MS Access and some mysql and a tiny bit of php (I have already created the tables and populated with records and such).
so it would be similar to how in MS Access you can create an application/front end and allows the user to peruse records, without being able to create new records, but also generating reports and charts based on the data.
Is this doable with mysql and php, could someone guide me in the right direction and I'll take on board any suggestions you may have to accomplish this.
It will be going into a website, so the user can interact with the site and do as above.
Kind regards
Have a look at FusionCharts XT. They work very well with PHP, and since the charts are pure JavaScript, you are free to use any database on the backend.
Read the FusionCharts documentation for more info.
this is super broad question. The answer is: Yes, this can be done with PHP/MySql.
You will require somekind of API or server side (PHP) chart generation tool if you want to generate images.
I suggest the following charting tools:
http://code.google.com/apis/chart/
http://pchart.sourceforge.net/
Good luck.
I think this is a real challenging one!
I write a website for my local football league, www.rdyfl.co.uk , and include javascript code snippets from the F.A's Full-Time system where we generate our fixtures, linking in tables fixtures recent results etc.
For another feature I want to add to the site I need to scrape the 'Upcoming Fixtures' for each agegroup and division but when I examine the source I have two problems.
The fixtures content is generated by javascript and therefore I need to see the generated source and not just the source.
When I view the generated source using Firefox the team names are actually further javascript links and not the name itself.
I basically want to somehow download the fixtures on a regular basis and write then to a mysql database ?
I have asked the F.A. and they have no more options available to access the data ?
Having never coded for scraping before can anyone point me to a simple solution or does anyone fancy the challange?
This question was asked a long time ago, but I noticed it was active today 🤷.
You should be able to scrape the website using a headless browser such as Puppeteer. Using Puppeteer you are able to access a URL and execute JavaScript or interact with the website as you would with an ordinary browser. Parsing the output DOM and storing it should then be relatively straightforward.
There are plenty of articles on this topic using Puppeteer.
The latest version of OutWit Hub is doing a pretty good job on dynamic content. The source scraped by outwit to extract links, images, documents and tables and text is the updated DOM. You can certainly make a job to grab what you need using these.
Custom scrapers are still applied to the static source in version 1.0.3 but version 1.1.x (still in beta) will offers the choice between the static source and the dynamically modified DOM.
Scrapping content produced by Javascript is challenging. AFAIK you will need to do this with AJAX. Hopefully the content has some css that you can grab with jQuery or at least some id's. Do you have id's or classes that you can grab?
I am very new to web development and CMSs. I want to make a Joomla site that features articles with a lot of graphs at the top of the page and written content below them. The charts will probably be done with fusioncharts and some controls directly below them to dynamically influence the data displayed in the charts preferably without reloading the page.
My question is what is the most appropriate way to do this in joomla? Can I get the sourcer add in and simple create articles using inline javascript calls to place the charts and controls directly in the article? Is this how people usually embed non text based content in joomla? Is it possible to access the database with code directly embedded in the article to generate the chart?
I dont really want to learn too much of the joomla API right now, I'm more interested in using the CMS features to create the pages and then just coding everything else in javascript/php directly in the page but I'm not sure if that is appropriate or if it would introduce security concerns to my site.
Why not try the FusionCharts extension for Joomla -
This will be much easier than coding this yourself, the work has already been done.
I believe the best thing to do is just use a good WSIWYG and then use the source code feature.
TinyMCE does the work just fine.
Are you looking for plugins or components to add and do this or do you just want to log into administrator and start doing this right away?
how do i (after getting the right stock prices from a source) show it on a "live graph". i'm looking for a php/ajax toolkit that allows me to create that graph live?
is that the right thing to use or a flash based solution is better?
are there 3rdparty sites that offer to create live graphs given input data?
Highcharts is probably what you need.
I recently started a new project to simplify the construction of a graph when using php:
http://aloiroberto.wordpress.com/2010/02/04/highcharts-php-library/
Also, Google Charts or Open Flash Chart are concrete possibilities (the latter will require Flash).
you can have a look at JPGRAPH. It is a wonderful library for creating wide variety of graphs.
As far as ajax is concerned this library outputs the graph as a picture file, so you can easily send the required parameters using ajax and build the graph dynamically using ajax.
PHPlot also is a free library: http://phplot.sourceforge.net, but compared to JPGraph it's rather limited. It also delivers a picture so you could grab that via AJAX and display it.
Birdeye has some incredibly powerful graphing tools. Check out the Birdeye Explorer to get a sense of what you can do with it.