Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wiki Integration
03-02-2012, 04:56 AM
Post: #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
Find all posts by this user
Quote this message in a reply
03-02-2012, 11:54 PM
Post: #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
Find all posts by this user
Quote this message in a reply
03-04-2012, 07:18 PM
Post: #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
Visit this user's website Find all posts by this user
Quote this message in a reply
02-13-2013, 09:52 AM
Post: #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?
Find all posts by this user
Quote this message in a reply
02-13-2013, 10:27 AM
Post: #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
Visit this user's website Find all posts by this user
Quote this message in a reply
02-13-2013, 12:24 PM
Post: #6
RE: Wiki Integration
Works great...thanks!
Find all posts by this user
Quote this message in a reply
03-07-2013, 06:31 AM
Post: #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
Find all posts by this user
Quote this message in a reply
03-07-2013, 06:49 AM
Post: #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
Visit this user's website Find all posts by this user
Quote this message in a reply
03-07-2013, 07:04 AM
Post: #9
RE: Wiki Integration
Thanks for the quick reply!

I will look into it some time in the future!!!!
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)