Topic on Project:Support desk

Riventree (talkcontribs)

I have just found this page and am almost certainly asking a dumb question that is documented somewhere, and I've read the documentation pages for "Page" and "Text", but there's either not enough, or far too much, data there for my brain to parse.

In short, I'm feeling a bit lost and I'm asking for help.

I am trying to do something that is slightly against the basic wiki premiseː produce a read-only engine that provides lookup-by-title, what-links-here, and search, but no other "actions" whatsoever. Simply adding a new skin won't remove access to the core functionality if someone clever crafts their own url, so I know I need to actually do PHP-level work.

If I understand the mediawiki architecture properly, each page goes from raw (user submitted) wikitext to "expanded" (substituted) wikitext, and thence to actual (x)html. I believe this "core page image" html is stored in the database somewhere (I'm guessing somewhere in "text", but I don't know)

I have many years of programming under my belt, so I'm confident I can muddle my way through once I find the part of code that says "This is the title, give me the HTML". I can handle the PHP, SQL, html, css, javascript et al, but I've been stymied trying to drill down from index.php to the parts of the engine I'm looking for.

Obviously, index.php is the entry point, but the query that actually results in html is hidden deep under the skins and WikiPage (I think) and I'm stuck.

I'm hunting for three bits of code, which i imagine don't look anything like this: :)

Query::GetBodyContent (title, &mw_body_content)

Query::SearchPagesByText(text,&listOfPageTitlesWithMatchText)

Query::WhatLinksHere(title, &listOfPageTitles)

Can someone give me a pointer to the right php file(s) or class(es) to continue my search?

Thank you kindly,

Riventree

Ciencia Al Poder (talkcontribs)

I'm not sure what's your goal. Use MediaWiki but prevent other users to edit pages? Then see Manual:Preventing access.

If you want to start from scratch your own content management system, I guess this will bee too complicated, and it's better for you to not attempt to see how things are done here, because what you want to do is relatively simple on its own having a proper database design.

Jonathan3 (talkcontribs)

I wonder if you could keep the actual wiki completely hidden (behind .htaccess or whatever) and use the MediaWiki API to create a separate site with the minimal features you need.

Riventree (talkcontribs)

See "PHP question" for a more direct request.