</ol>
</ol>
The goal goals of publicizing the reporting tool is # to make it an inbound marketing toolbetter# showcase eQuality Technology capabilities and the capabilities of these systems# develop opportunities to do similar workIf we can collect information about wikis that we don't know about, then we can market # contribute to those peopleupstream projects (like the [https://github.com/PHPMailer/PHPMailer/blame/master/examples/gmail.phps example on PHPMailer with GMail])
* see https://freephile.org/wiki/Bootstrap
For some all wikis, we may will need to determine the api URL API endpoint when we only have normally start with the "wiki" URL.Using the common setup where the code is hosted at w/ and the pretty URLs Some methods are at wiki/, we find this in the source of the Main_Pagemore precise than others. More recent MediaWikis will offer [[mw:Really Simple Discovery|Really Simple Discovery]]
<nowiki><link rel="EditURI" type="application/rsd+xml" href="https://freephile.org/w/api.php?action=rsd" /></nowiki>
Note on formats: The MediaWiki API supports many formats, with json <code>[[JSON]]</code> and <code>jsonfm </code> the most useful. json is what you think it is,and jsonfm is formatted for viewing in the browser (good for development only).
The API has many possible parameters. https://www.mediawiki.org/wiki/API:Siteinfo
The default is 'general', and you should combine as many as you want. So, to get
all the info that we're afterinterested in, we would compose a query like so:
<nowiki>https://freephile.org/w/api.php?action=query&meta=siteinfo&format=jsonfm&siprop=general|extensions|statistics</nowiki>
and likewise we will record what we can find.
Extensions is an array of items. An extension item will look like '''similar''' to this(the data fields for each extension will differ according to the author) :
<source lang=javascript>
{
Do we timestamp in the CiviCRM database? <span class="success">Yes</span>. The "profile" will change over time, and so do we care about what it used to be?
== Other Siprops ==
What I need to do is collect data, based on some data that I have in a CiviCRM comment (and the original csv file that was imported to CiviCRM), and re-import or add the new data to CiviCRM for market segmentation and intelligence.
I want to report on that data internally to see my best potential prospects, and CiviCRM is pretty good at that. However, I've found that using the API and slicing and dicing your data with the help of [[Data Tables]] can be more powerful.
I want to include that data in marketing to show prospects potential clients that they need to upgrade. Or that they have a number of extensions. Including large amounts of data in a marketing message would be best in the form of a "free report'. The reporting interface can also be used as an ad-hoc intelligence reporter and collector.
Is there an API for inserting data into CiviCRM? (Yes CiviCRM has a full API) Or, do I need to rely on the import tools and formatting my CSV with the correct external ID so as to avoid duplicates?
The basic UI for What's that Wiki Running? could be handled by [[jQuery]], but with [[Bootstrap]] added in, we get a bit more stylesheet. Still, do we need that? [https://api.jquery.com/category/ajax/global-ajax-event-handlers/ jQuery can handle the AJAX] Simple [http://www.zachhunter.com/2010/04/json-objects-to-html-table/ JavaScript could handle the data presentation] (and jQuery probably has some useful methods) and we can add [https://jqueryui.com/ jQuery UI] for advanced interactions or widgets.
To do cross-domain javascript requests, we'll need jsonp but, it turns out that you just can't make a secure AJAX UI to insecure web content (Duh!). Freephile.org is a secure domain, so we won't be using JavaScript for anything but convenience and UI.
In the jQuery <code>.ajax</code> method, there are several settings. The 'error' setting is a callback, and we could write a function there to try other variations on the domain to find the API endpoint.
== Code ==
This project is licensed under the AGPL. You can clone, fork, and send pull requests at github https://github.com/freephile/wikireport We built a lot of custom fields in CiviCRM to store the data, and wrote [http://pastebin.com/LaDq0z82 a Drupal module to make that data available within CiviMail].
{{References}}