[8WR] XenCarta (Wiki) PRO

[8WR] XenCarta (Wiki) PRO [Paid] 1.4.8a

No permission to buy ($30.00)
I don't seem to be able to create a new template. I enter the template Title on the Create New Template page, hit Create New Template ... and nothing happens, except the Title gets cleared. Nothing shows up in the Templates list.

If it makes any difference, I updated from the free to the Pro version, by uploading over the free code, and running the Pro XML as an update.

-- hugh
 
I don't seem to be able to create a new template. I enter the template Title on the Create New Template page, hit Create New Template ... and nothing happens, except the Title gets cleared. Nothing shows up in the Templates list.

If it makes any difference, I updated from the free to the Pro version, by uploading over the free code, and running the Pro XML as an update.

-- hugh

I can reproduce this also on my system..
 
I haven't quite gotten my head round the XF API enough yet to tell exactly what the problem is, but it seems to be some kind of mismatch between the ControllerPublic class and the ViewPublic class for Templates. End result seems to be that renderHtml() in the EWRcarta_ViewPublic_TemplateCreate view class never gets called, as XF thinks it's a default XF view. So the content editor never gets set up, so all we get on Create is a Title, no template content editor.

-- hugh
 
I don't seem to be able to create a new template. I enter the template Title on the Create New Template page, hit Create New Template ... and nothing happens, except the Title gets cleared. Nothing shows up in the Templates list.

If it makes any difference, I updated from the free to the Pro version, by uploading over the free code, and running the Pro XML as an update.

-- hugh
Confirmed and fixed for the next version... a file is missing.

Hotfix: download this file and upload to /library/EWRcarta/ViewPublic
 

Attachments

I read a post at some point yesterday where someone asked about importing MediaWiki content. I can't find it now, but thought I'd post this anyway. I have a need to import our existing MediaWiki, so I'm giving it a go. So far, I've gotten basic content imported.

I did this by creating a MySQL view from the MW tables, which produces the structure of the XC pages table, as follows.

0) Back everything up. Do it now. You Have Been Warned. Here Be Table Eating Dragons.

1) Create a new column in the EWRcarta_pages table called mw_page_id, type INT, allow NULL, default NULL. This is just a temporary modification, we just need it in step 7.

2) (Optional) Copy the four mw_ tables references in the query in step 3 to your XF database. This isn't essential, you could just run the query on your MW database. But I'm just nervous about doing anything to my live wiki tables, even if in theory it is perfectly safe.

3) Either create a view with the following query, or just run the query and export the results as your format of choice. Depends what database tool you run. I use Navicat, so using stored queries is easier. If I was working in phpMyAdmin I'd probably create a view.

Code:
SELECT
    mp.page_id AS mw_page_id,
    mp.page_title AS page_slug,
    mp.page_title AS page_name,
    UNIX_TIMESTAMP(STR_TO_DATE(mp.page_touched, '%Y%m%d%H%i%s')) AS page_date,
    'bbcode' AS page_type,
    CONVERT(mwt.old_text USING utf8) AS page_content,
    mpl.pl_from AS page_parent,
    '0' AS page_index,
    '0' AS page_protect,
    '1' AS page_sidebar,
    '1' AS page_sublist,
    '0' AS page_likes,
    '' AS page_like_users,
    mp.page_counter AS page_views,
    '0' AS thread_id,
    '' AS page_groups,
    '' AS page_users,
    '' AS page_admins
FROM
     mw_page AS mp
LEFT JOIN
    mw_pagelinks AS mpl ON mp.page_title = mpl.pl_title
INNER JOIN
    mw_revision AS mr ON mp.page_latest = mr.rev_id
INNER JOIN
    mw_text AS mwt ON mr.rev_text_id = mwt.old_id
WHERE mpl.pl_from IS NOT NULL
GROUP BY mp.page_title
ORDER BY mp.page_title

4) Sanity check the results. If it looks like your full set of most recent revisions for each page which has an active link to it, you are good to go.

5) Export the view / query results from step 3 as CSV or .sql, or whatever you find easiest to work with.

6) Import it into your EWRcart_pages table. Up to you whether you append or empty the XC table first. I appended.

7) Run this query one time, which re-maps the page_parent from the MW page id to the new XC page id in the page_parent.


Code:
UPDATE `EWRcarta_pages` AS e
LEFT JOIN EWRcarta_pages AS p ON p.mw_page_id = e.page_parent
SET e.page_parent = p.page_id
WHERE e.mw_page_id IS NOT NULL;

8) Check your XenCarta front end. It should now have your MW content, although most likely with the index / link structure kinda messed up.

9) Optionally delete the mw_page_id column added in step 1.

The problem I am having which may not be solveable, is established "the" (singular) parent of any given page.

MediaWiki using a many-to-many relationship, with no concept of which of those relationships between pages is "the" parent. Whereas XenCarta has a much simpler one-to-many link structure, so each page has a singular parent.

So the query in step 3 doesn't address that, and just uses whichever link id pops out of the "GROUP BY" that condenses the multiple revision <-> page relationships down to a single row. I'm playing around to see if I can improve this, but I'm at the point where it'll just be quicker to do it by hand in the XC front end, as I only have about 250 pages.

[BTW one benefit of doing this is it has gotten rid of several thousand 'orphaned' spam pages laying around in our MW tables]

The next step is obviously the Markdown to BBCode issue. There doesn't seem to be an existing conversion utility, just a few code fragments scattered around the Googlewebz. So I guess I'll go ahead and have a go at writing one myself. The basic formatting stuff will be easy enough, it's the images and links which will require some work, cross referencing the existing MW image and page tables.

I'll follow up soon(ish) with news on that, and maybe some code.

-- hugh
 
Does the pro version have these features...or plans to implement?

1. Allow editing, but moderate the particular entry (this would be chosen in the same area as "protect page", but would be "moderate page".
2. Allow editing, but make certain all titles and URL's are locked - this is for the obvious reason, external links could get messed up by a well meaning editor changing something in the title or URL string.

Sorry if this is a repeat of already addressed issues....
Enclosed is a screen shot of my ancient lite wiki on EE.....notice the moderate article checkbox.
Also, that "notes" fields isn't a bad idea!
Screen Shot 2013-04-19 at 11.00.19 AM.webp
 
Does the pro version have these features...or plans to implement?

1. Allow editing, but moderate the particular entry (this would be chosen in the same area as "protect page", but would be "moderate page".
2. Allow editing, but make certain all titles and URL's are locked - this is for the obvious reason, external links could get messed up by a well meaning editor changing something in the title or URL string.

Sorry if this is a repeat of already addressed issues....
Enclosed is a screen shot of my ancient lite wiki on EE.....notice the moderate article checkbox.
Also, that "notes" fields isn't a bad idea!
View attachment 44838
I have made it so that in future versions only users with the "can manage wiki" permission can edit titles, urls, redirects and parents.
 
Hey Jaxel,

I don't know if you saw the conversation from me, about MediaWiki markup. I'm importing an existing MediaWiki into XenCarta, and needed to convert markup to bbcode/html. As I think supporting existing wiki markup would be a win for XenCarta, I took the liberty of splicing it in to your code on my test server.

I actually have two versions:

1) An "integrated" version in which I've added 'markup' as a page_type, and made two or three tweaks to your code so if a page is designated 'markeup', it basically gets treated like 'bbcode', except it gets run through a new parseWikiMarkUp() method in the PageView renderHtml(). So the changes to your code are very minimal. Basically a couple of template changes to add the 'markup' page_type, and about 3 minor changes to allow for it when creating or editing pages. Plus of course the extra parseWikiMarkUp() method (3 lines).

2) A version in which I added two hooks to your code, at the start and end of renderHtml(), to allow modification of the page HTML, and my stuff installs as a separate addon.

In both cases, the library I'm using is this one:

http://d2g.org.uk/index.php?plugin=home&action=WikiParser

... which is under Mozilla Public License (so can be included even in a commercial product), and the author has given me commit privs on the SVN repo for it. I've fixed a couple of issues with PHP 5.4 compat, and added a couple of MediaWiki specific plugins for it. The library is very tight, only about 50k with just the essentials, and very configurable.

Anyway ... it's all working nicely. Attached are a couple of screenshots of the 'integrated' version.

wiki_ex1.webp

wiki_ex2.webp

So really, my question is:

Would you be interested in including the "integrated" version in to your product, and if not, would you be willing to add those two hooks in renderHtml(), so I can do this for my own use (and possibly released as a free addon in the RM) without needing to modify your code?

-- hugh
 
BTW, this isn't intended to encourage using markup moving forward.

It just makes it a zillion times easier for folk to import existing wiki content. Depending on the size of their existing wiki, either by just copying and pasting from their existing MediaWiki content into the XenCart page editor, or by using the MySQL View export/ import method I posted here:

http://xenforo.com/community/threads/8wayrun-com-xencarta-wiki-pro-paid.48217/page-3#post-520675

Now that I have my existing MediaWiki imported and working nicely as-is, I can gradually start replacing the wiki markup on my existing content with XenCarta templates and bbcode, and any new content will obviously use that as well.

Thanks in advance for any time you can devote to considering this.

-- hugh
 
Since I use a custom navbar is there any way to disable to the Wiki from showing up on the nav tab so I can use an image and hard link instead?
 
Also I may be lost as far as creation of special pages, templates etc. I tried to add a table under bbcode and then html with a simple:

LEVELCOSTLEVELCOSTLEVELCOST
[tr]

But it shows up as exactly that, instead of creating a table, is there a place I need to go to create pre planned templates etc. I look at 8wayrun and my website focuses on games as well that require moves list etc and I cannot seem to make it look anything like

http://8wayrun.com/wiki/algol-frame-data-sc4/?noRedirect=1

Is there a tutorial for this kind of creation, etc. Appreciate the help in advance!
 
Also I may be lost as far as creation of special pages, templates etc. I tried to add a table under bbcode and then html with a simple:

LEVELCOSTLEVELCOSTLEVELCOST
[tr]

But it shows up as exactly that, instead of creating a table, is there a place I need to go to create pre planned templates etc. I look at 8wayrun and my website focuses on games as well that require moves list etc and I cannot seem to make it look anything like

http://8wayrun.com/wiki/algol-frame-data-sc4/?noRedirect=1

Is there a tutorial for this kind of creation, etc. Appreciate the help in advance!
There is no BBcode for tables. I am doing tables with the use of templates.
 
Right understood just not understanding the mechanic of creating a template for it. I went to special pages > templates > create template and put in the name and hit create but nothing happened
 
When a new page is created or a parent needs to be changed, a list of every single page in the wiki seems to come up. Is there an easy way of limiting which choices are in that drop-down? Is this in the pro version?

This takes a lot of time when the category to be assigned is #200 (page_ID).
 
Top Bottom