Compatible with DokuWiki
Similar to displaywikipage, include
This DokuWiki plugin creates a tab-control for selected wiki pages. By clicking a tab, an external DokuWiki page appears on the site using AJAX.
This plugin uses only a DokuWiki's default JavaScript library.
{{tabinclude>page1,page2,page3, ...}}
You can specify the tab pages separated by comma. The first page appears after onLoad event of a parent page.
Great tool! Hence there are still some possibilities to improve it, as
Possible solution: In file “syntax.php” replace…
$pages = explode(',',$match);
with…
$pages = explode(',',$match); for ($i=0;$i<count($pages);$i++) { $pages[$i] = trim($pages[$i]); if (strstr($match,".:")) { resolve_pageid(getNS($ID),$pages[$i],$exists); } }
Description: If you want to use relative addresses, there has to be a (leading) ”.:”, so if you have a index.txt and a page1.txt in the same folder, you´d write: {{tabinclude>.:page1}} to load page1 as a tab. ”.:..:” or ”.:..:..:” should work either.
Notice: Spaces in the page list (e.g. {{tabinclude>.:page1 , .:page2 }} shouldn't be a problem.
Deshi
Thanks for practical suggestion. The latest archive has been patched at function 'render()'. (around line 56, syntax.php) — Ikuo Obataya 2008/07/09 13:58
Thanks for the nice plugin. Suggestion: It would be very handy to show currently selected tab with different background color and removed border-bottom line on tab. Second feature request: add ability to select first connecting page without changing order of tabs, something like this
{{tabinclude>playground:test1,playground:test2,wiki:syntax | S }}
where S is number (for example = 2) and define which page should be start on load.
| S}}
can be optional, then without it (| S) first page in list would start first.
Alex 2008/09/30 02:42
You should add, that it will only work for two languages: Japanese and English. And look out for additional spaces at the bottom of the files.
— Bernd M. Radowicz 2009/04/10 14:13
(Why is the security note still here? In the author's Download and details page it states: ”2008-10-13 Vulnerability for XSS was fixed.” | HSD – 1-nov-2008)
security note was removed. — Ikuo Obataya 2008/11/26 14:05
—-
my tabs always show full addresses including the complete namespace-path - even when I use relative addressing with .: or without any :
any chance to get rid of this an make tabinclude only show the pagename without any namespace?
I'm running DokuWiki Release rc2009-01-26 with tabinclude 2008-10-13.
Any help appreciated.
Thomas Springer 2009/07/11
How about using the first heading ? This plugin pick up the first heading for each tab name.
Anyway I'll add some options for settings of tab appearance someday.
2009/11/26 I.Obataya
I'm trying to use the editformhelppage plugin for my DokuWiki installation with monobook template. I also installed this plugin because I want to have several help pages but I realized that this plugin doesn't work for me. I see the tabs but when I click on them I only see “connecting…” for a second.
Any idea?
Maialen Otaegi 2009/09/14
Exporting to ODT was claimed in changelog, but when I tried to do it, it failed for the first try (there was some PHP warnings, I haven't saved them and don't see them again), and rendered includes pages out of style for the second try (as “plain text” instead of paragraphs, tables, etc., producing a mess of all text from that page).
Versions: DokuWiki 2009-12-25, ODT 2009-07-02.
How can I make it to render pages properly?
Nikita Kipriyanov 2010/01/08
It appears that there may be a problem with the ti_initpage variable which causes the buttons above the text area in the Edit page to not appear. Disabling the plugin appeared to fix the problem.
Tony Sutherland 14th February 2010
I can confirm the problem. - By turning off tab-include, buttons are back. Mrma
Can be confirmed here. Turned off all other plugins. As soon as tabinclude is activated, toolbar buttons are gone.
I cannot download it, it seems the domain is no more avaible. Is it avaible somewhere else?
Yes, I found an alternate at http://symplus.edu-wiki.org/en/tabinclude_plugin. — Rik BlokRik Blok
rikblok
2011/02/25 07:48
Hi I would like to add a cache of the pages.. this makes the load faster on second load: Simply change the code in script.js to
var tabincludeCache = new Array();
var tabincludePage = "null";
function pl_ti_onTabClicked(page){
if(page){
document.getElementById('ti_content').style.visibility='hidden';
document.getElementById('ti_loading').style.display='block';
tabincludePage = page;
if(tabincludeCache[page]) {
document.getElementById('ti_content').innerHTML = tabincludeCache[page];
document.getElementById('ti_loading').style.display ='none';
document.getElementById('ti_content').style.visibility = 'visible';
}else{
pl_ti.sack.onCompletion = plugin_ti_refreshcontent;
pl_ti.sack.URLString = '';
pl_ti.sack.runAJAX('call=content&page='+encodeURI(page));
}
}
}
function plugin_ti_refreshcontent(){
data = this.response;
document.getElementById('ti_content').innerHTML = data;
document.getElementById('ti_loading').style.display='none';
document.getElementById('ti_content').style.visibility='visible';
tabincludeCache[tabincludePage] = data;
}
best Simon-Shlomo Poil
When I include jquery javascript, it causes tabinclude to not load the initial page. Clicking on the tabs works properly, it's just the initial display when the page is first loaded. — serenewafflesserenewaffles
2012/01/20 04:32
This problem is unavoidable under angua because it includes jQuery by default. — serenewafflesserenewaffles
2012/01/28 21:19
Since installing Angua I have also a serious problem that the first tab on our primary page is not shown, i.e. remains unopened unless you actively click on it. It either stops me migrating to Angua or I will have to find another concept for the 6-Tab primary page. This behaviour happens not only with Monobook but also Default and Vector templates. I have tried temporarily disabling/re-enabling tabinclude to no avail. I'm not aware that I am using jQuery elsewhere on these pages? I do use the Box plugin on them but have also tried disabling this without any improvement. Pity, great plugin, hope someone posts a fix one day. — grockle 2012/02/09 17:00
It works for me under Angua + Arctic1) template. Demo. The first tab is shown on page load. — Rik BlokRik Blok
rikblok
2012/02/11 20:24How is your template “slightly modified”? What modifications were made? Did those modifications affect tabinclude? After modifying my template, I got the plugin to work, but that doesn't make this behavior any less of a bug. — serenewafflesserenewaffles
2012/02/17 21:09