Jump to content

Extracting information from Mediawiki


Jim R

Recommended Posts

I'm using a jquery modal window (Thickbox or another one).  What I'd like to do with my PHP code is when the link clicked on, the content that shows up is just the content portion of my Wiki page--the part that actually is "edited".  No menus.  No navigation.  Just the part I or a user would type. 

Link to comment
Share on other sites

Any more detailed advice on how to go about that?  I've tweaked a lot of SSI stuff on my SMF forum, so I can picture in my mind what you're saying, but SMF sets up most of that code.  I just tinker with it. 

 

What direction should I go in regards to my Wiki? 

Link to comment
Share on other sites

Here is where the newbie in me comes out.  I'm a basketball coach with an English degree, so terminology is very important to me.  In theory, am I looking for something that "parses" the information I want?  (as opposed to extracts it)

Link to comment
Share on other sites

Ken, this is related to the topic you've responded to of mine over on the MySQL board.  Here is the code:

 


echo '<tr>
		<td>'. $line['deviation'] . '</td>
		<td><a href="/wiki/index.php?title=' . $line['nameFirst'] . '_' . $line['nameLast'] .'" class="thickbox" >'. $line['nameFirst'] . ' ' . $line['nameLast'] . '</a></td>

	</tr>';}

 

In each instance, I'm creating a link with a Thickbox class, and I'd like to display the content of the Wiki page in the Thickbox rather than go to the page.  However, I just want the user generated content from the Wiki page. 

 

 

Perhaps, the link instead links to a URL which parses and echoes content from the Wiki page.  Just not sure how to do that.

Link to comment
Share on other sites

Well I know that each Wikipedia page has titles that you can traverse using the # sign followed by the name of the section. So if you have a section called 'User Content', then add '#User_Content' at the end of the URL.

 

I assume Wikimedia are all the same?

Link to comment
Share on other sites

Yes, but that just takes you to the page.  I just want to extract or parse the user edited information.  The Wiki URL looks like this actually pathway/index.php?title=wordA_wordB_wordC.  In my case it's nameFirst_nameLast, which takes the user to a page with essentially a profile on that player, edited by the users.

 

I'd like to just use the profile part.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.