Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wiki Integration
03-02-2012, 04:56 AM,
#1
Wiki Integration
Greetings all;

I'm new to webERP. I want to use the wiki integration, but I'm using FOSWiki already. So, I would like to tweak the wiki integration code to make it work with FOSWiki. I'll post the actions that I take, and the results, here.

So my question is, where would I find the code related to Wiki integration?

Thanks!
- Paul
Reply
03-02-2012, 11:54 PM,
#2
RE: Wiki Integration
oh well ...

I did it for dokuwiki. I remember it was pretty easy - I think there is one function only which creates the call string. Phil then added dokuwiki as option into the system settings. Don't remember where that function is located.

If you search for dokuwiki or one of the other wiki names in all files, you might find it - there must be a switch or if or case containing one of the wiki names in that function.

good luck,

Klaus
Reply
03-04-2012, 07:18 PM,
#3
RE: Wiki Integration
It is in a file

includes/MiscFunctions.php

Code:
function wikiLink($type, $id) {

    if ($_SESSION['WikiApp']==_('WackoWiki')){
        echo '<a target="_blank" href="../' . $_SESSION['WikiPath'] . '/' . $type .  $id . '">' . _('Wiki ' . $type . ' Knowlege Base') . '</a><br />';
    } elseif ($_SESSION['WikiApp']==_('MediaWiki')){
        echo '<a target="_blank" href="../' . $_SESSION['WikiPath'] . '/index.php/' . $type . '/' .  $id . '">' . _('Wiki ' . $type . ' Knowlege Base') . '</a><br />';
    } elseif ($_SESSION['WikiApp']==_('DokuWiki')){
        echo ' ../' . $_SESSION['WikiPath'] . '/doku.php?id=' . $type . ':' . $id . ' ' . _('Wiki ' . $type . ' Knowlege Base') . ' <br />';
    }

}//wikiLink

HTH
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply
02-13-2013, 09:52 AM,
#4
RE: Wiki Integration
(03-04-2012, 07:18 PM)phil Wrote: It is in a file

includes/MiscFunctions.php

Code:
function wikiLink($type, $id) {

    if ($_SESSION['WikiApp']==_('WackoWiki')){
        echo '<a target="_blank" href="../' . $_SESSION['WikiPath'] . '/' . $type .  $id . '">' . _('Wiki ' . $type . ' Knowlege Base') . '</a><br />';
    } elseif ($_SESSION['WikiApp']==_('MediaWiki')){
        echo '<a target="_blank" href="../' . $_SESSION['WikiPath'] . '/index.php/' . $type . '/' .  $id . '">' . _('Wiki ' . $type . ' Knowlege Base') . '</a><br />';
    } elseif ($_SESSION['WikiApp']==_('DokuWiki')){
        echo ' ../' . $_SESSION['WikiPath'] . '/doku.php?id=' . $type . ':' . $id . ' ' . _('Wiki ' . $type . ' Knowlege Base') . ' <br />';
    }

}//wikiLink

HTH

If I put this code back in then I can re-enable MediaWiki?
Reply
02-13-2013, 10:27 AM,
#5
RE: Wiki Integration
There have been a few goes at this!!!
In the very latest code we have:
Code:
function wikiLink($WikiType, $WikiPageID) {
    if (strstr($_SESSION['WikiPath'], 'http:')) {
        $WikiPath=$_SESSION['WikiPath'];
    } else {
        $WikiPath='../' . $_SESSION['WikiPath'] . '/';
    }
    if ($_SESSION['WikiApp']==_('WackoWiki')){
        echo '<a target="_blank" href="' . $WikiPath . $WikiType .  $WikiPageID . '">' . _('Wiki ' . $WikiType . ' Knowledge Base') . ' </a>  <br />';
    } elseif ($_SESSION['WikiApp']==_('MediaWiki')){
        echo '<a target="_blank" href="' . $WikiPath . 'index.php?title=' . $WikiType . '/' . $WikiPageID . '">' . _('Wiki ' . $WikiType . ' Knowledge Base') . '</a><br />';
    } elseif ($_SESSION['WikiApp']==_('DokuWiki')){
        echo '<a target="_blank" href="' . $WikiPath . '/doku.php?id=' . $WikiType . ':' . $WikiPageID . '">' . _('Wiki ' . $WikiType . ' Knowledge Base') . '</a><br />';
    }
}

This should work ... notice the 'index.php?title=' . $WikiType . '/' . $WikiPageID

for media wiki. I tested this ok here.
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply
02-13-2013, 12:24 PM,
#6
RE: Wiki Integration
Works great...thanks!
Reply
03-07-2013, 06:31 AM,
#7
RE: Wiki Integration
I don't see why open a new thread:

I use OS-X SnowLeopard, an use the OS-X Wikis, can this be done for that???

Thks in advance
Reply
03-07-2013, 06:49 AM,
#8
RE: Wiki Integration
You just need to figure out the format of the OS-X Wikis URL and modify the function to produce a URL from webERP that will work with that wiki.... afraid I have no experience of OS-X Wikis so not sure what that might look like. I am sure wacko or media wiki would work under OS-X though
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply
03-07-2013, 07:04 AM,
#9
RE: Wiki Integration
Thanks for the quick reply!

I will look into it some time in the future!!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)