Okay, using the instructions from timmyo's thread on integrating Coppermine (http://www.tinyportal.net/smf/index.php?topic=3075.msg25958#msg25958),
I present my thread on integrating a Wiki with your site. ;D
AssumptionsThe following assumptions have been made:
- You intend to run your wiki in an IFRAME as opposed to a new window
- You are using SMF 1.1RC2 and TP 0.86.
- The wiki resides in a directory /wiki/ within the SMF directory.
- Your theme uses the theme menu bar from the default theme.
At present, there isn't a way to use SMF security in pmWiki so you'll need to use AuthUser or UserAuth recipies to provide this. (I tell a lie, there is apparently a Cookbook recipe that talks to SMF but I haven't made it work.)
Instructions1. Install (or upgrade to) SMF 1.1 RC2 and TinyPortal 0.86.
2. Install pmWiki 2.0.13 (available from http://www.pmwiki.org/)
3. Open your SMF "index.php"
4. Find:
$actionArray = array(
5. Somewhere in this huge lump of code, insert:
'pwiki' => array('Pwiki.php', 'Pwiki'),
6. Create a new file "Pwiki.php" and add the following code to it:
<?php
if (!defined('SMF'))
die('Hacking attempt...');
function Pwiki() {
// This is gonna be needed...
loadTemplate('Pwiki');
}
?>
7. Save "Pwiki.php" in your SMF Sources directory.
8. Create a new file called "Pwiki.template.php" and add the following code to it:
<?php
function template_main()
{
global $context, $settings, $options, $txt, $scripturl;
echo '
<table width="100%" border="0" cellspacing="0" cellpadding="3" align="center">
<tr>
<td>', theme_linktree(), '</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="4" align="center" class="tborder">
<tr class="titlebg">
<td>Campaign Logs</td>
</tr><tr>
<td class="windowbg">';
// load pmwiki
echo '<iframe height="900" width="100%" scrolling="auto" frameborder="0" marginheight="0" marginwidth="0"
src="http://mysite.url/wiki/pmwiki.php"></iframe>';
echo '
</td>
</tr>
</table>';
}
?>
9. Save "Pwiki.template.php" in your SMF Themes/default directory.
10. In your "index.template.php", look for the following code:
f (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'forum', 'tpadmin')))
11. Insert an additional action:
'pwiki',
12. Now find the code for the Forum button:
// Show the [forum] button.
echo ($current_action=='forum' || $context['browser']['is_ie4']) ? '<td class="maintab_active_first"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action=='forum' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=forum">FORUM</a>
</td>' , $current_action=='forum' ? '<td class="maintab_active_last"> </td>' : '';
13. Insert the following code after it:
// Show the [wiki] button.
echo ($current_action=='pwiki' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'pwiki' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=pwiki">Wiki</a>
</td>' , $current_action == 'pwiki' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
Okay, that should take care of it. Enjoy!
P.S. If anyone gets the SMF integration recipe working, can they let me know the process as I'd like to use this myself.
Thanks for code, I'll check it now ;D
Great. I use PmWiki and SMF for couple of months, but never tried to integrate it.
IÂÃ,´ll try that later. But i have the 7dana Theme installed, so there will propably be some problems.
Do you have a demo of a working integration?
Quote from: dominik link=topic=3133.msg26321#msg26321Do you have a demo of a working integration?
Yep, check out http://dev.phoenixgamesclub.org.uk/ and click on the "Campaign Logs" link on the menu bar.
Be warned, if you're using any flavour of IE, you'll see a 4px space through our club logo. This is a known problem that we're attempting to fix ... with the able help of Xarcell and IchBin ;D
What is PmWiki??....and what it's for &/or do..?
pmWiki is an easy to use, easy to install Wiki package.
Quote from: WikiPedia (http://en.wikipedia.org/wiki/Wiki)A wiki (IPA: [ˈwiËÂ.kiËÂ] <wee-kee> or [ˈwɪ.kiËÂ] <wick-ey> or Wik-EE[1]) is a type of website that allows users to easily add and edit content and is especially suited for collaborative writing. The name is based on the Hawaiian term wiki, meaning "quick", "fast", or "to hasten" (Hawaiian dictionary). Sometimes the reduplication wikiwiki (or Wikiwiki) is used instead of wiki (Hawaiian dictionary).
The term Wiki also sometimes refers to the collaborative software itself (wiki engine) that facilitates the operation of such a website (see wiki software).
In essence, wiki is a simplification of the process of creating HTML web pages combined with a system that records each individual change that occurs over time, so that at any time, a page can be reverted to any of its previous states. A wiki system may also provide various tools that allow the user community to easily monitor the constantly changing state of the wiki and discuss the issues that emerge in trying to achieve a general consensus about wiki content. Wiki content can also be misleading as users may add incorrect information to the Wiki page.
Some wikis will allow completely unrestricted access so that people are able to contribute to the site without necessarily having to undergo a process of 'registration' as had usually been required by various other types of interactive websites such as Internet forums or chat sites.
Take a look at WikiPedia (http://www.wikipedia.org/) and Wiktionary (http://www.wiktionary.org/) for examples and defiinitions.
does the "cookbook recipe" mentioned bridge the SMF user login to the pmwiki login?
it looks nice and has potential, but having multiple logins to one web page is confusing to end users who don't realize the underlying architecture.
Well .... yes and no :buck2:
The recipe talks about creating a "forumauth.php" file that calls "SSI.php". Then the "config.php" file is used to set up permissions such as edit and admin and upload.
Check out:
http://www.pmwiki.org/wiki/Cookbook/SimplemachinesUserSystemIntegration
I haven't been able to make it work and I don't know whether it's because I have SMF/TP as the root and /wiki/ as a subdirectory. "../../SSI.php" should be able to see the file once called, but for some reason mine wouldn't.
Ideally I would:
- have a Group for each permission except Admin.
- use those groups to determine whether the user can carry out actions on a page/group/etc.
The "recipe" looks like it would work, as in, make the pmwiki authentication system use the SMF system (I copied it below).
You might be right it is a path thing ... might want to try fully qualified paths?
Question
How can I use the user authentification of the Simplemachines forums (http://www.simplemachines.org ) to control the access to my pmwiki installation?
Answer
This recipe enables all registered users on a SImplemachines forum to edit the wiki pages. The wiki pages in the Site group can only be edited by the users with the status administrator.
The recipe currently requires to edit the pmwiki.php file, as it wouldn't work when included only from the config.php file.
Installation instructions
1. create a file called forumauth.php with this content:
<?php
//Simplemachines authentication
$pos = strpos($_SERVER['REQUEST_URI'], "?action=edit");
if (is_numeric($pos)){
require_once('/path/to/your/forum/SSI.php');
if (!$user_info['username']) {
echo "You have to be registered and logged in at the Forums
in order to edit this wiki document.<br /><br />
1.) First <a href='http://www.yoursite.com/forum/index.php'?action=login'
target='_blank'>click here</a>
to open a new window where you can log in at the Forums,
(leave that window open after you logged in)<br />
2.) Then <a href='{$_SERVER['REQUEST_URI']}'>click
here</a> to edit the wiki page.";
exit;
}
}
Modify
path/to/your/forum/SSI.php
and
http://www.yoursite.com/forum/index.php
to fit your forum.
Copy the file forumauth.php to the pmwiki 'local' directory.
2. Add this to your config file:
$DefaultPasswords['edit'] = ($user_info['username']) ? '' : '*';
$DefaultPasswords['admin'] = ($user_info['is_admin']) ? '' : '*';
$Author = $user_info['username'];
3. Add this to the top of the pmwiki.php file, after <?php :
require_once('local/forumauth.php');
4. Optionally edit Site.EditForm and
replace:
(:input e_author:)
with:
{$Author}
Notes
* This recipe was last tested on PmWiki version: 2.1beta20
* This recipe requires at least PmWiki version: 2.1beta20
@ pgc_boss
i get the error "Kann das 'main' Template nicht laden." In english: "Could not load the 'main' Template". Whats wrong?
Looks like that: http://indymind.de/forum/index.php?action=pwiki
Have you actually run the Wiki to begin with? When you first install and run the Wiki, it generates a /wiki.d folder which houses all the content. (pmWiki operates on flat files, not a DB).
Go to: http://indymind.de/wiki/pmwiki.php first and let it do all the setup tasks that it needs.
Then run: http://indymind.de/forum/index.php?action=pwiki
You should find that it works.
Edit: just tried your link and the wiki seems fine to me. Not seeing any error messages at all but you need to double-check some of your code. I'm seeing "echo" statements at the top.
The wiki was already been setup. And works well.
QuoteEdit: just tried your link and the wiki seems fine to me. Not seeing any error messages at all but you need to double-check some of your code. I'm seeing "echo" statements at the top.
Scroll down, than you can see the SMF-Template with the error-message.
Well, made the wiki to show up in the iframe, but it doesent really look like itÂÃ,´s been instlled anyway ???
I followed the manuall and still nothing happend when i typ the url to the pmwiki.php, i just get a blank page.
In the forum the button show, when klicked it turn the iframe up and show the wiki homepage with all the instructions on how to install. Well, i have made that part several times, but still getting the blank page only when pointing the pmwiki.php.
What am i doing wrong here ? :-\
http://www.familjegodis.se/smf/
http://www.familjegodis.se/smf/pmwiki/pmwiki.php
Quote from: dominik on March 03, 2006, 06:00:02 PM
The wiki was already been setup. And works well.
QuoteEdit: just tried your link and the wiki seems fine to me. Not seeing any error messages at all but you need to double-check some of your code. I'm seeing "echo" statements at the top.
Scroll down, than you can see the SMF-Template with the error-message.
Okay, this is definately an SMF error and nothing to do with the Wiki. When I look at the page, I'm getting the following text showing up at the top:
{ global $context, $settings, $options, $txt, $scripturl; echo '
', theme_linktree(), '
Campaign Logs
'; // load pmwiki echo '
This implies that the Pwiki.php or the Pwki.template.php are not being called properly from the SMF index.php. Can you attach your Pwiki files that I've listed above, and let me know where all your files are located?
Quote from: g6cad on March 03, 2006, 08:05:14 PM
Well, made the wiki to show up in the iframe, but it doesent really look like itÂÃ,´s been instlled anyway ???
I followed the manuall and still nothing happend when i typ the url to the pmwiki.php, i just get a blank page.
In the forum the button show, when klicked it turn the iframe up and show the wiki homepage with all the instructions on how to install. Well, i have made that part several times, but still getting the blank page only when pointing the pmwiki.php.
What am i doing wrong here ? :-\
http://www.familjegodis.se/smf/
http://www.familjegodis.se/smf/pmwiki/pmwiki.php
Looks fine here. I've clicked onto it and added a message to the Sandbox.
I've attached a screenshot to show what I get:
[attachment deleted by admin]
pgc_boss, i found the problem. i was just a copy and paste failure.
thx for support!
Quote from: dominik on March 05, 2006, 03:52:00 PM
pgc_boss, i found the problem. i was just a copy and paste failure.
thx for support!
A pleasure, mate ... always a pleasure.
pgc_boss, i have various errors. Can you help me?
I have the Epsilon template installed.
I have file installed in:
pmwiki.php = /smf
pwiki.php = /smf/Sources
Pwiki.template = /smf/Themes/epsilon11rc2
forumauth.php = /smf/local
When I follow the steps to install Pmwiki:
1) the SMF Admin option does not work.
Fatal error: Call to undefined function: tportal_init() in d:\htdocs\bsk\smf\Sources\Security.php on line 166
2) Appears an error at bottom main page.
Fatal error: Call to undefined function: tportal_version() in d:\htdocs\bsk\smf\Sources\Load.php(1607) : eval()'d code on line 250
Thanks.
I'll try to help ... :knuppel2:
Have you got the wiki installed into the root of smf or in a subdirectory?
It looks to me as if you've installed it into /smf rather than /smf/wiki
It also looks like you're trying to get the SMF bridge to work.
Unfortunately I never managed to get it working so I was using UserAuth with .htaccess files.
(Because of a major code error with PmWiki losing all formatting directives, I've dumped it in favour of DokuWiki which actually has a proper SMF integration bridge.)
Those two errors that you posted are actually SMF errors, not TP or PmWiki. They seem to imply that either TP isn't installed or it isn't available through your template. Bloc or one of the other will be able to verify this for me.
Thanks for the aid. Dokuwiki works perfectly.
Can you help me with User authentication in dokuwiki?
I have read at great length the document but I have doubts. http://wiki.splitbrain.org/wiki:tips:integrate_with_smf#using_the_auth_system
I don't understand. :(
1) When I create the table wiki_discuss phpmyadmin does not let to me put the unique fields.
2) I record smf_config.php in dokuwiki/lib/tpl/default/discuss?
3) I don't adapt Epsilon TP Template. How I make the button and link?
At the moment it appears the following warning:
User authentication is temporarily unavailable. If this situation persists, please inform your Wiki Admin.
Thanks
I was able to integrate SMF 1.1 RC2 and dokuwiki but have run into a few probs.
1) I had to resort to the version of 05-09-22 as I couldn't get the login to work of the most recent dokuwiki. Whenever I tried to link it to the database of SMF, it said either pwd or username were invalid (they weren't, I checked it 20 times with two accounts).
So if anyone knows how to integrate a more recent version of Dokuwiki...
2) and this is more annoying: whenever I log in with my admin account and then log out and fill in a fake user (who's not in the database), it logs me back in instead of giving an error. Also, I've integrated SMF and Coppermine with tinyportal and the login of CP is handled by SMF due to the bridge. I had hoped that the bridge that was proposed by Leah was going to do the same thing. But instead, when I log out of the forum, it keeps the user logged into Dokuwiki. What can be done about that? Have I missed something?
I've followed Leah's steps (http://www.simplemachines.org/community/index.php?topic=62778.msg468801#msg468801) and it all works except for the above problems. Can anyone help me?
Actually, I've changed to Mediawiki, which also has integration. Of course I still don't know how to let a user log out of the wiki when he logs out of tinyportal/SMF but that's for later...
Where I was able to integrate dokuwiki in the iframe, mediawiki will actually just replace the entire screen. The code I used is the same as for the other wikis discussed above, but no matter what I do, it keeps refreshing the page and taking it all up. :-/ Any hints or ideas?
For all:
I've been working on getting the themes of mediawiki integrated with TP+SMF. If I finish that I'll let you know what I've done, so you can too.
However, I'm considering changing to Dokuwiki, because mediawiki has horrid code. I'll let you know if I get that finished too.
But it will be a full integration, not just a silly iframe ;)
Personally, I'd love to see a wiki solution and whilst we all may have one specific pet wiki project you really prefer, seriously, any decent wiki would be good enough .. and it's a killer feature.
I have changed to DokuWiki, but haven't started on the intergration yet. DokuWiki is really nice..
I have Dokuwiki in an iframe (like coppermine really) and I followed the steps to have it use the same user database as SMF. But it would be nice if you were immediately logged in to the wiki when you log in to SMF. :)
It's possible to be logged in, and it's possible to use SMF's themes too ;)
Oooh, well I'll keep an eye on this thread for sure! Keep us posted please. :D
I'm a newbie with Php/Html so please excuse me for this question. I'm using the Pn-Pn theme for TP. The Wiki page has a larger everything. By everything, I mean fonts, blocks, etc.. Everything is larger than all the other pages. How do I set the Wiki size to normal.
My home page is: www.thinknest.com
My Wiki page is: http://www.thinknest.com/index.php?action=pwiki
The wiki is probably using it's own theme or something. You should be able to set font sizes in the css file if they have one.... I'm not quite sure as I don't have it installed.
Well, the Wiki has its own layout but because its in an IFRAME, it shouldnt alter the main theme unless something outside forces it to. Sorry, but I'm quite new at this. I still cant figure this out. Do I have to modify the Pmwiki.template.php file for the Pn-Pn template.
Never mind, starting with the template of another mod, I managed to correct the sizing difficulties. Thanks for the help.
Does anyone know where I can find the instructions to integrate SMF 1.1RC2 with MediaWiki. I just want them to use the same user database, and can't seem to find the instructions on their site.
Has there been any progress on integrating SMF + TP + Wiki ?
/me was wondering the same thing :)
QuoteHas there been any progress on integrating SMF + TP + Wiki ?
Dont think anyone even try this so you have to try it out your self i guess
I'm planning to.. eventually. Someone already has SMF and dokuwiki integrated with smf_api, but I'd rather use SSI.php.
That would be excellent considering I have been running dokuwiki for quite sometime now.
how can u guys use those wiki softwares?
i installed mediawiki once and holy cowhorns!! its so hard to use!
Mediawiki sucks ;)
so whats a good easy wiki program?
i wana give this a try.
Oh and for people who may want a dictionary program for their server this one is the BOMB:
Glossword (http://glossword.info/dev_term/glossword_1.7.0.xhtml)
Demo (http://glossword.info/demo/index.php)
free and cool
Dokuwiki is nice. I like it (the reason I want to integrate it ;))
I think you need ssh access to install it however. Can't remember exactly as its been a while since I installed it.
thanks ill give it a try on my test site
mediawiki was way too hard to work with - i just hope Dokuwiki is easier :D
Dokuwiki is by far one of the easiest wikis to install...and there is a nice bug in the new mediawiki which fails on install because of an mysql problem with the character bytes being too long because of the utf-8 support.
Yesterday after reading this thread I tried for 2 hours to install it (mediawiki)..
2 hours is my limit of patience these day :)
Just finished getting the Gallery2 + SMF + Tiny Portal going.
Last stop wiki....
Im using thw Wiki theme by bloc on my site
its better for me personally cos its easy to deal with + im familiar now with the themeing system and all that so easy to change around
someone have a demo of this mod???
and someone can integrate with mediawiki or dokuwiki??
You'll be lucky to find something like that considering this topic is almost 2 years old.