TinyPortal

Development => Support => Topic started by: Tokzu on September 23, 2015, 05:00:14 AM

Title: Integrate TP menu with MediaWiki
Post by: Tokzu on September 23, 2015, 05:00:14 AM
Hi~

I've integrated MediaWiki (v1.25.2) with my forum (v2.11) using the AuthSMF extension plus I've adapted the MW skin for it looks identical to my SMF theme using SSI.php to integrate it.

The problem is the menus added by TP (such like "Forum" and "TP Admin" buttons) aren't displayed.

I searched in the code and the problem was the variable $context['TPortal'] wasn't defined. I tried adding it manually and calling TPortal_init() but the menu is still missing the TP buttons. Help!! :'( And thanks. :)
Title: Re: Integrate TP menu with MediaWiki
Post by: illori on September 23, 2015, 11:08:11 AM
how are you adding your menu?
Title: Re: Integrate TP menu with MediaWiki
Post by: Tokzu on September 27, 2015, 06:52:37 PM
With SSI.php and the function ssi_menubar().
Title: Re: Integrate TP menu with MediaWiki
Post by: illori on September 27, 2015, 08:20:22 PM
are there any other menu buttons from other mods missing?
Title: Re: Integrate TP menu with MediaWiki
Post by: Tokzu on October 05, 2015, 05:18:11 AM
No, only the TP buttons.

Sorry, I forgot put my web URL and the wiki:

hxxp://www.kaero-webs.com
hxxp://wiki.kaero-webs.com/

The "Products" and "Downloads" menus are added by mods and when you visit the wiki they are displayed, but the "Forum" and "TP admin" menus not.
Title: Re: Integrate TP menu with MediaWiki
Post by: illori on October 11, 2015, 12:53:13 PM
TPassimilate.php

function tpAddMenuItems(&$buttons)
{
global $context, $scripturl, $txt;


after that add
TPortal_init();
Title: Re: Integrate TP menu with MediaWiki
Post by: Tokzu on October 11, 2015, 04:24:00 PM
It works!!! Thanks  ;)
Title: Re: Integrate TP menu with MediaWiki
Post by: illori on October 11, 2015, 05:34:40 PM
you are welcome.