Capacity / Wordpress Integration Theme

Ken Vermette vermette at gmail.com
Wed Aug 30 16:03:18 UTC 2017


>>> So Mediawiki would remain independent and unattached to Wordpress (ie.
>>> have a dedicated theme)?
>
> The Wikis are on a different machine to kde.org 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.

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 kde.org 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 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

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.


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.

Then - just for kde.org 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 kde.org
site, how will linking be affected?

Thank you;
 - Ken


More information about the kde-www mailing list