Jump to content
TNG Community
thewag

Wiki Integration

Recommended Posts

thewag

Alright. I'm starting on a project I've been thinking about for a while. Intergrate wiki's TNG. Basically my thoughts at the momemnt are:

Given example: http://foo.bar/pmwiki.php/Places/USAPennsy...BuffaloTownship for a pmWiki style site.

Greatfully, most wiki's use a simlar page call syntax. The base part of the URL (http://foo.bar/pmwiki.php/), a Group(Places), a seperator (/), and Page (USAPennsylvaniaUnionWestBuffaloTownship).

A tikiWiki URL might look like http://foo.bar/tiki-index.php?page=USAPenn...BuffaloTownship

Slightly different, but still close enough: base is http://foo.bar/tiki-index.php?page=, there is no group or seperator, and then the page USAPennsylvaniaUnionWestBuffaloTownship. This means that I code should work with most wiki's real easily.

So here is what I'm planning:

Shor term: Editing getperson.php so that a wiki like shows next to places and people (user selectable) kinda like the magnifying glass does for places now. Allowing the place names to be organized either from largest to smallest or versa.

Longer term: Applying needed edits so that wiki pages are accesible on other pages.

Longest term: Allow other items (events for example) to be wikied.

Any thoughts on this?

Ben

Share this post


Link to post
Share on other sites
thewag

Hmm, that was MUCH easier than I expected. See: http://genealogy.wagners.homeip.net/testin...ID=I00212&tree=. The green I are for places and the gold for people. Obviously I haven't added any info yet....

Any interest, and I'll post the code changes. I haven't intergrated it yet into pages other than getperson. I've got some ideas, but its not quiet smooth yet.

Share this post


Link to post
Share on other sites
waltreams

Hmmm.... Very nice. Do you plan to eventually code it so it only shows the wiki link if there is wiki info available?

Share this post


Link to post
Share on other sites
thewag

Hmmm.... Very nice. Do you plan to eventually code it so it only shows the wiki link if there is wiki info available?

Ahh! Fun coding. Actually, the that and coding a "needs a page" something for logged in users crossed my mind. The only problem is that is VERY wiki dependant. VERY VERY VERY. Some use flat files and some use mysql...or other sql. I could be done, but would require knowledge of each wiki supported.

Do you have a preference?

I'm a pmWiki user...which is REAL easy. Flat file, just use an is_file statement. tikiWiki uses a DB system which I don't know the structure of.

Ben.

P.S. How's LA? I use to live in Troy. Haven't been down that way in years.

Share this post


Link to post
Share on other sites
waltreams

No preferences. Never used a wiki before, but can see how they would be an excellent complement to TNG. A nice way for visitors to add their own research notes, anecdotes, etc to an person or place in the tree - but wouldn't impact the actual GEDCOM data.

Is there a system for the wiki to let the site admin know what changes have been made? With thousands of people in the tree, it would be difficult to just stumble across the new info.

Not a native to AL, still trying to get used to it. Will move back to KY this summer

Share this post


Link to post
Share on other sites
thewag

Is there a system for the wiki to let the site admin know what changes have been made? With thousands of people in the tree, it would be difficult to just stumble across the new info.

Depends on the wiki and its setup. pmWiki is setup dependent. Mine emails me.

Ben

Yeah, I just got my undergrad from then TSU.

Share this post


Link to post
Share on other sites
GWood

I sure like the idea behind this but have no clue what I am looking at regarding setting up these wiki type pages for my site. I will have to get to know a bit of what the process is all about. The idea of the places is really interesting and would make a great addition to our magazine section, I think. Hmmm... Thanks for stirring the brain waves.

Share this post


Link to post
Share on other sites
waltreams

It's coming along nicely. Is there a simple way to have the WIKI info to open in a new (and small) window?

Share this post


Link to post
Share on other sites
thewag

I sure like the idea behind this but have no clue what I am looking at regarding setting up these wiki type pages for my site. I will have to get to know a bit of what the process is all about. The idea of the places is really interesting and would make a great addition to our magazine section, I think. Hmmm... Thanks for stirring the brain waves.

Yeah, unfortunately this is an INVOLVED code modification. Wish TNG took plugins. ;)

It's coming along nicely. Is there a simple way to have the WIKI info to open in a new (and small) window?

Hmm, just an edit to the create_wiki_page function....I'll look into it later tonight.

Share this post


Link to post
Share on other sites
B McFadyen

I've been wondering about a wiki integration into TNG ever since I had my guys set one up at work to create an internal database for our products.

Last week I thought I would give MediaWiki a try since that's what we chose at work. Thought I might as well leverage work and play.

Here's what I tried:

1. Downloaded MediaWiki, and installed

2. Couple minor glitches in making access to mysql work, but got it connected

3. Steep learning curve into this wiki stuff, especially since I wanted to create a wiki style that would match my TNG site reasonably well, and I'd never played with CSS before, kind of cool, now I see what all the fuss is about

4. First point of connection I've tried is for places. I modified personlib.php with an include for my wiki stuff, then modified a few lines to use my function which alters the "place" data into a link to my wiki site. I break the place string at the first comma and create a link on that section only. A few other minor rules to clean up the tag, and you have it.

5. Tried it out... I browsed to a TNG page and clicked on the first highlighted location "Seymour Township", ended up at the wiki page to create a new page, and dropped in some text from the tng mailing list.

You can check out the example on the Birth line at Example Page

Obvious things to do:

1. Customize the navigation menu on the wiki to easily connect back

2. Continue to refine my wiki style to match a little better

3. Hack the create_user in TNG to also submit the appropriate data into the Mediawiki database

4. Hack the login in TNG to create an autologin to the wiki as well

5. Decide where else to hook the wiki into TNG

In the Wiki, I will assign each "Place" data to the Category:Places, which then creates a nice index, as wikis are want to do...

I'm still toying with what kind of info I am going to use this for. However, I've always wanted a more convenient way to add history for towns and locations, this will work well.

I might consider dumping all my family history/stories onto it as well, instead of simply using PDFs or other docs in the history section of TNG

Anyone else have ideas on where they would connect a wiki to?

Brian

Share this post


Link to post
Share on other sites
B McFadyen

Update on my wiki integration.

I think I've taken it about as far as I want to at the moment.

Continuing from my previous post, here's a summary of what it does.

1. The wiki was setup and styled to have similar colors and schemes as my TNG.

2. I changed the sidebar navigation to include links to my two categories: Places, People and a link back to my TNG site

3. I created a customized wiki tag <person I=####> </person> to be used during the wiki editing. This creates a back link to my TNG getperson page, for example <person I=1>Brian</person> points back to me.

4. In TNG, I changed the genlib.php to call my link_wiki function which alters the "place" string. (ex: birthplace, deathplace...). it checks the left most field, queries the wiki database, and if there is a wiki page, chancges the first parameter into a link. So: "Tiverton, Ontario, Canada" turns into "Tiverton, Ontario, Canada" if there is a Tiverton page. Of course you have to apply a few rules to the string, but seems to work well.

5. Modified the display of names to check the wiki database for a wiki page on that person, and if found, appends an icon and link to the wiki page after the individual's name.

6. Placed a link to the wiki site in general on my home page.

I've only just started to add pages to the wiki. Of course this takes time. I will be using it to manage all of my family history pages that I have previously simply added as "history" docs to individuals. It gives a more interactive feel when you can link back directly to other individuals mentioned in the doc. It also means you don't have to wait for acrobat to start up. Just seems more integrated.

I've also started a couple pages on locations. I always wanted to have an easy way to add information and background history associated with locations, so this works well. It also is a nice fit with the "Google Maps" icon I use next to the location strings. Google gives the location, the wiki gives the history.

I have not connected the login info from TNG to my wiki. I was going to do this, but I think I'm going to leave the logins separate. That way I can choose who can contribute to my wiki, separately from my TNG access control.

For those who have not already checked out my previous examples, the present integration is a little nicer that my first dablings.

People example: Abraham Atkinson

Place example: Check the Tiverton Link under Occupation, Died, or buired

or the wiki direct: McFadyen Wiki

If you have a wiki setup and want a few snippits of code to help, give me a shout, I used the Mediawiki distribution.

Share this post


Link to post
Share on other sites
GWood

Hi Brian,

Well, I still have not been able to get the integration between TNG and MediaWiki to work, same error as I emailed you earlier on. You mention using genlib.php as well, are you still using that file in addition to the one in the zip download you provided? I've not tried the person tag in MediaWiki yet as I was not certain of the syntax. Now that I have read your post I will give it a try.

Anyway, I did manage to spend nearly an entire Saturday just playing around with the .css, adding help files and buiding my first 'Places' page. The printout from this was terrible which disappointed my wife but I will have to just keep playing with it. I think this will be a much better answer than the .html and .php pages I was using. Let me know what you think of the progress so far.

Link to first wiki place page;

http://genwiki.casawood.com/index.php?titl...rd_County%2C_KS

Also, I added you to the about page but wanted your permission to keep your name there and also, if you don't mind, wanted to know if you wanted your site linked there as well. Let me know your thoughts;

http://genwiki.casawood.com/index.php?titl...logy_Wiki:About

This is the first I have really played around with using a wiki site so it has been interesting. I cannot wait to figure out why the two are not communicating nicely...I see a Sunday passing by :)

Thanks again for all your help and guidance!!

Share this post


Link to post
Share on other sites
B McFadyen

Wiki Integration with TNG

For those interested in adding a wiki to their TNG site, a moderately integrated solution has been done using the MediaWiki code.

TNG modifications results in displayed links into the wiki for places, and people, on the primary information pages, and provide easy to use admin links for their creation.

Version 3 of this integration is based upon installing the MediaWiki tables into the TNG database and provides much faster access for pages. Two alternate rule sets are provided that allow additional customization of the way places strings are handled.

To date, three sites have integrated this solution:

http://genwiki.casawood.com

http://genwiki.mcfadyen.ca

http://genwiki.thenavarres.com

The installation instructions and files are posted at:

http://genwiki.mcfadyen.ca/index.php/TNG_Integration

If you are interested in trying this option out and need some assistance, post here, or contact me via the installation page.

wiki wiki,

Brian

Share this post


Link to post
Share on other sites
JasonCrews

I think it looks great! I don't know if I have a practicle use for it, but it looks good.

Share this post


Link to post
Share on other sites
GWood

Last night I discovered a gggggrandfather's passenger ship listing, where he was from, etc. Within a little over an hour, with research and creation time, I was able to put together the following page which is directly linked from my TNG database;

http://genwiki.casawood.com/index.php?titl...arbaugh_-_I5248

There is still more to do on this page but other family can read, print, edit and enjoy the information. It has been a better solution so far than adding history template pages, a CMS, etc. I really am thankful to Brian and Steve for all their efforts. Its not right for everyone but anyone wanting an easy approach to a family magazine should love it.

Share this post


Link to post
Share on other sites
aop27

Brian

This looks superb.

I think I'm nearly there but the "little envelope" marker next to the TNG name (if you know what I mean) shows a link to your site not mine. Its obviously a change that I haven't made but I can't spot it. Any suggestions?

Andrew

Share this post


Link to post
Share on other sites
aop27

Brian

This looks superb.

I think I'm nearly there but the "little envelope" marker next to the TNG name (if you know what I mean) shows a link to your site not mine. Its obviously a change that I haven't made but I can't spot it. Any suggestions?

Andrew

Works now - superb

Share this post


Link to post
Share on other sites
JasonCrews

after updating the tng files i get this when i open any page:

Warning: include(/text.php) [function.include]: failed to open stream: No such file or directory in /home/content/j/a/s/jasoncrewsfam/html/main/testbed/index.php on line 5

Warning: include() [function.include]: Failed opening '/text.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/j/a/s/jasoncrewsfam/html/main/testbed/index.php on line 5

any ideas??

Share this post


Link to post
Share on other sites
B McFadyen

Any plans to integrate into V6?

Jason,

I'm not sure which wiki version you are speaking to, but the MediaWiki integration that I use was updated to V6.0.0, V6.0.1, V6.0.2 so far.

First mod in the list TNG_mods

Brian

Share this post


Link to post
Share on other sites
Yves Bergeron

Hi everybody,

I just made the integration of MediaWiki to TNG. I had to add some tweaks to support accented letters in the wiki names. I use it in french and I had to utilize utf8_convert on the MySQL query in link_wiki.php.

There is another thing to do and it's the automatic authentication to the wiki for an identified user of TNG. I don't know how to do that.

My wiki is private because there are some documents that cannot be publicly available (copyrights...). So, I would like that every new approved user of TNG is also created in MediaWiki (maybe automatic inserts in MediaWiki tables) and (maybe the hardest part) realize an automatic login to the wiki when a known user click on a wiki link from TNG.

Any ideas on how to do that ?

Thank you

Share this post


Link to post
Share on other sites
B McFadyen

Hi everybody,

I just made the integration of MediaWiki to TNG. I had to add some tweaks to support accented letters in the wiki names. I use it in french and I had to utilize utf8_convert on the MySQL query in link_wiki.php.

There is another thing to do and it's the automatic authentication to the wiki for an identified user of TNG. I don't know how to do that.

My wiki is private because there are some documents that cannot be publicly available (copyrights...). So, I would like that every new approved user of TNG is also created in MediaWiki (maybe automatic inserts in MediaWiki tables) and (maybe the hardest part) realize an automatic login to the wiki when a known user click on a wiki link from TNG.

Any ideas on how to do that ?

Thank you

Yves,

I gave the idea a little thought when I started the mod, but did not personally need that feature, so I did not pursue it. I can think of a fairly straight forward way to do it, but it would take an evening to code and test. Unfortunately I do not have that kind of time over the next two weeks.

If no one else makes the attempt, I'll look into it over the next couple of weeks. I'll try and post something by the end of the month if someone else has not already done it.

(If someone else wants to take it up, let me know. I'd be happy to integrate it back into the distribution)

Brian

Share this post


Link to post
Share on other sites
B McFadyen

If you are using my MediaWiki Integration, the update for TNG V6.0.4 is now available.

MediaWIki Mod Update (Item 1)

Cheers,

Brian

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×