webERP Forum
Wiki Integration - Printable Version

+- webERP Forum (http://www.weberp.org/forum)
+-- Forum: webERP Discussion (http://www.weberp.org/forum/forumdisplay.php?fid=1)
+--- Forum: How To ? (http://www.weberp.org/forum/forumdisplay.php?fid=6)
+--- Thread: Wiki Integration (/showthread.php?tid=146)



Wiki Integration - pmaxx - 03-02-2012

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


RE: Wiki Integration - opto - 03-02-2012

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


RE: Wiki Integration - phil - 03-04-2012

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


RE: Wiki Integration - ClayL - 02-13-2013

(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?


RE: Wiki Integration - phil - 02-13-2013

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.


RE: Wiki Integration - ClayL - 02-13-2013

Works great...thanks!


RE: Wiki Integration - HectorLaraG - 03-07-2013

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


RE: Wiki Integration - phil - 03-07-2013

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


RE: Wiki Integration - HectorLaraG - 03-07-2013

Thanks for the quick reply!

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