Open main menu

Changes

2,628 bytes removed ,  16:09, 25 January 2016
m
== Background ==__NOEDITSECTION__ __NOTOC__Find out "What's that Wiki Running?" at https://freephile.org/wikireport
The MediaWiki <abbr title="Application Programming Interface">[[API]]</abbr> offers great detail into what a [[MediaWiki]] wiki is running.
The ApiSandbox extension offers a GUI way to explore == APIs in action ==This project is about two [[API]]s. Using them, and even operate on having them work together. We're using the MediaWiki API, and and the CiviCRM API <ref>[https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FApiSandbox/c69d2923bd5ff5424ce89a12b87f02708c80d487/SpecialApiSandbox.php code]</ref>
The most popular data format for API communication is <abbr title="JavaScript Object Notation">[http://www.json.org/ JSON]</abbr>.= MediaWiki ==
We're using the [https://php[MediaWiki]] API for a couple different purposes.net/manual/en/intro.json.php PHP handles JSON] consistent with Most obviously we're using the expanded definition of "JSON text" API, which is available in every MediaWiki installation, to query that installation's exact setup, statistics and extensions. Secondly, '''this page''' is using the newer [http://wwwMediaWiki API to re-use content.faqs Or, put another way, we wrote content in a wiki backend, and we're using that content on a different 'frontend' website.org/rfcs/rfc7159 We're showing an example of using MediaWiki as a back-end content editing platform, while the '''Wiki Report''' project publishes that content with 5 simple lines of code on a completely different website.html RFC 7159] Through the API, you could re-use any MediaWiki content on any other project or platform. So, if you have a wiki, and you have content there that you think should be somewhere else: don't copy it! Re-use it via API!
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 The free '''Wiki Report''' generates a lot of data about wikis across the Internet. We collect and/or report on that this data internally to see my best potential prospectsby storing it in a CiviCRM database. [[CiviCRM]] is a fantastic freely-licensed Constituent Relationship Management system.
I want to include that data in marketing to show prospects 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.== Bootstrap ==
Is there an API We're using [[Bootstrap]] for inserting data into CiviCRM? (Yes CiviCRM has building a full API) Ornice HTML5, do I need to rely on the import tools responsive and formatting my CSV with the correct external ID so as to avoid duplicates?mobile-first website.
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.== Development ==
To do cross-domain javascript requestsFor details, we'll need jsonp but, it turns out that you just can't make a secure AJAX UI to insecure web content (Duh!).see [[Wiki report/development]]
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. Interesting example: http://en.banglapedia.org/index.php?title=Special:Version which uses [https[Category://www.mediawiki.org/wiki/Skin:MediaWikiBootstrap the "MediaWiki Bootstrap" skin] See http://www.mediawikibootstrapskin.co.uk/index.php?title=Main_Page I decided to use [[Bootstrap]] for this project. At first, I was tempted to build a fully clientPages included in equality-side framework and JavaScript solution. Since CiviCRM has an API, I could potentially even use JavaScript for pushing data into the backend (authenticated with a secret). Ultimately, Bootstrap was used on the client-side, but PHP was used to create the backend. == Data Table systems in the UI == [https://datatables.net/examples/styling/bootstrap.html DataTables can integrate seamlessly with Bootstrap], but it's unlikely that I will need the robustness of [[Data Tables]] for this effort. If I wanted to show many records, then yes. But for now, I want to focus on showing the particular details of a specific wiki site. DynaTables is a jQuery plugin that I began prototyping with, but again, it's not something that I will need since I don't have large datasets to manipulate. I just want to focus on a single wiki at a time. [http://www.dynatabletechnology.com/#existing-json With existing JSON], you still have to know the 'layout' of your data and setup a blank table with the correct structure. I'm more interested in a generic function that you could throw any JSON at, and it would spit out a table. [https://labs.mbrooks.info/demos/Tidy-Table/ Tidy Table] is a jQuery plugin that creates HTML tables from the data that you feed into the client as JSON The only interesting thing here is the fact that I might want to have something akin to their demo for the initial form state: Allow the user to quickly/easily select which parts of the MW API they want to report on.  {{References}}
4,558

edits