vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   vB Variables and MediaWiki (https://vborg.vbsupport.ru/showthread.php?t=106575)

LanciaStratos 01-28-2006 08:57 PM

vB Variables and MediaWiki
 
Is there any way to get a logged-in user's usergroupid on my MediaWiki installation? I tried require_once('../forum/global.php'); but it returned errors. Is there another way to do this?

LanciaStratos 02-01-2006 02:17 AM

Any ideas? Anyone...?

Hellcat 02-01-2006 02:25 AM

What exactely do you want to do?

LanciaStratos 02-01-2006 02:29 AM

I just want to prevent users in a certain usergroup from seeing a block of code in the Wiki's skin. In this case, I don't want to show ad code to forum subscribers.

Hellcat 02-01-2006 02:45 AM

Hmm, for that just including the global.php (like you did it) should do the trick....

What errors are you getting?

LanciaStratos 02-01-2006 02:56 AM

Here's the error message:

Quote:

Warning: main(/home/gtplanet/public_html/guides/includes/init.php): failed to open stream: No such file or directory in /home/gtplanet/public_html/forum/global.php on line 20

Fatal error: main(): Failed opening required '/home/gtplanet/public_html/guides/includes/init.php' (include_path='.:/home/gtplanet/public_html/guides:/home/gtplanet/public_html/guides/includes:/home/gtplanet/public_html/guides/languages') in /home/gtplanet/public_html/forum/global.php on line 20
It's obviously looking for init.php in the wrong place, but I don't know how to change that? :confused:

Here's how I included the file in the beginning of my MediaWiki skin:

PHP Code:

<?php
/**
 * MonoBook nouveau
 *
 * Translated from gwicke's previous TAL template version to remove
 * dependency on PHPTAL.
 *
 * @todo document
 * @package MediaWiki
 * @subpackage Skins
 */

if( !defined'MEDIAWIKI' ) )
    die();

/** */
require_once('../forum/global.php'); 
require_once(
'includes/SkinTemplate.php');

/**


Marco van Herwaarden 02-01-2006 08:17 AM

Try replacing:
PHP Code:

require_once('../forum/global.php'); 

By:
PHP Code:

chdir('../forum');
require_once(
'./global.php');
chdir('../guides'); 


LanciaStratos 02-20-2006 03:40 AM

Sorry I couldn't get back to this thread sooner - I've been crazy busy. Anyway, thanks for your help Marco! However, the following code still seemed to return a similar error. :(

PHP Code:

<?php
/**
 * MonoBook nouveau
 *
 * Translated from gwicke's previous TAL template version to remove
 * dependency on PHPTAL.
 *
 * @todo document
 * @package MediaWiki
 * @subpackage Skins
 */

if( !defined'MEDIAWIKI' ) )
    die();

/** */
chdir('../forum');
require_once(
'./global.php');
chdir('../guides');  
require_once(
'includes/SkinTemplate.php');

Quote:

Fatal error: Call to a member function on a non-object in /home/gtplanet/public_html/forum/includes/functions.php on line 1008
Any other ideas?

Hammon 05-10-2006 09:32 AM

Quote:

Originally Posted by Keyser Soze
I am trying to include vbulletin into the Content Management System Typo3 in exactly the same way and the same error appears.
Please let me know if anyone knows a solution how how to solve this.

I'm doing the same with e107 with the same result. I'm also interested in a solution.


All times are GMT. The time now is 02:02 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02442 seconds
  • Memory Usage 1,733KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete