Topic on Project:Support desk

PHP Access Question (2nd try with explanation)

6
Riventree (talkcontribs)

BACKGROUND

I am trying to build a "spartan" version of index.html which will ONLY do one thing: Display a page given a title.

This should be really short, something like:

<html>

<body>

<?

$title= htmlspecialchars($_GET["title"])

GetBodyContent ($title, $mw_body_content)l

print $mw_body_content;

?>

</body>

</html>

I know that won't have all the right divs and such, but it explains what I'm looking for.

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)

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.

TWO QUESTIONS:

1) What is the correct name of the function or functions I am looking for (GetBodyContent is probably wrong)

2) What file are they in?

Jonathan3 (talkcontribs)

How about starting with an existing skin and strip out the bits you don't want?

Riventree (talkcontribs)

Jonathan3: Thank you for replying. Pardon me while I beat my head


Arrrrrrgh. I post WITH a reason why I don't use skins, and everyone gets confused. I summarize the question and leave that bit out, and people ask why I don't do it with a skin...


The answer is: If you take away the links in the skin, someone can still craft a URL with action=foo and do the things I want to disallow. Thus, skins are not the answer.

Riventree (talkcontribs)

See "PHP question" for a more direct request.

Ciencia Al Poder (talkcontribs)
Jonathan3 (talkcontribs)

I like the "XY problem" page!

Sounds like MediaWiki isn't the answer here (to whatever the question is).