Capacity / Wordpress Integration Theme

Ben Cooksley bcooksley at
Sat Sep 2 01:44:48 UTC 2017

On Thu, Aug 31, 2017 at 4:03 AM, Ken Vermette <vermette at> wrote:
>>>> So Mediawiki would remain independent and unattached to Wordpress (ie.
>>>> have a dedicated theme)?
>> The Wikis are on a different machine to itself i'm afraid.
>> Mind giving a bit of detail on how this JSON interface might work?
> With your mention that MediaWiki sites are on separate servers, we may
> need to look at using the JSON API I mentioned.
> With the API there's two ways we might have this work. The first way
> would be the simple way, which is to provide a non-authenticated JSON
> link generated by wordpress. It would serve up content we wish to
> share across KDE-related websites.
> Then for each KDE site we throw in a cron job which once per hour or
> so will pull the data and save a local copy. It doesn't need to be
> high frequency because we won't be updating the content provided that
> much. When sites build their headers and footers they use the JSON
> data they pulled and saved.

That sounds like a reasonable enough approach.

> For example Mediawiki once every couple hours it would phone home to
> the KDE mothership and save a local copy of the JSON. Same for Planet,
> the BB, anything. For itself, the data we want to broadcast
> would be softcoded so anyone with access can update all sites with
> ease. If we want, for example, release announcements in the navigation
> on all websites, it's easily possible.
> The "non-simple" way would just be throwing in private keys or
> referrer tracking to discourage sites from using the JSON API
> client-side. I don't think that would be an issue, but I'm also not
> keen on somebody in X years using it directly and pounding the server.

In our case I think we can probably go with the simpler approach?

> In terms of the exact data I would like to broadcast;
>  - Header navigation structure
>  - Footer navigation structure
>  - Patrons
>  - Links to legal and other important docs.
>  - Social network links

Sure thing.

> Kind of universal in this would be a class file which would go about
> building the navigation so it's not re-written for every site. The
> only issue here is that Planet KDE is in Python, different from
> everything else, so we wouldn't be able to use the class.

One way of doing this would be to run a little PHP script which
outputs the header and footer as pre-built out HTML.
Rawdog can then include that.

> Anyway, by the look of it, CapacityPress will be used for Capacity,
> non-capacity systems (wiki, BB) will perhaps use the JSON API instead.
> ...
> So, given everything else, would it be possible to get a Wordpress
> installation up? You can lock it down as desired, but for git repos
> could we have "wordpress-aether-kde-org" linked to a folder of the
> same name in the themes folder, with "wordpress-capacitypress" and
> "wordpress-jsonplugin-kde-org" linking to folders of the same name in
> the plugins directory? If we get those up, I'll commit the relevant
> assets.

Sure thing. Could you please file a ticket, one for the Wordpress
instance and another for the repositories?

> Then - just for proper - if we could also allow Capacity to
> include content from the root wordpress directory, I'll be able to
> start committing the Capacity updates, or at least putting them under
> review. I'll hide the active codepaths behind a "?beta=1" URL variable
> so we can make sure things run properly.
> I do have one question though;
> If we have Wordpress in another separate area from the main
> site, how will linking be affected?

Can you find me on IRC so we can discuss this?

> Thank you;
>  - Ken


More information about the kde-www mailing list