vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=326516

PHP Include Not Working in Plugin
by Bestrafung
28 Jun 2018 18:32

I'm trying to include a php file in one of the templates for Bananalive's vbTournaments mod but have run into trouble. It's been a while since I've attempted something like this so I followed this guide: Including External Files but it still isn't working. If anyone could let me know what I'm doing wrong I'd greatly appreciate it.

/example.php contents:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I have real content but I scaled back to hello world for simplicity while testing.


Plugin:
Product: vB Tournaments, Ladders and Leagues Manager
Hook Location: global_start
Title: Example Block
Exec Order: 5
Code:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I tried both include and require_once and I've tried both with and without the preRegister


Edit: I forgot to mention that I added {vb:raw myincludedphp} to the tmnt_index_c template, and I tested plain text in the same spot to ensure I was outside an if/else statement.

--------------- Added 28 Jun 2018 at 19:04 ---------------

Update: I still need to test my real code but I found the issue... a simple space. The code example from the manual contains an extra space in the preRegister that I didn't catch when substituting my variable name.


All times are GMT. The time now is 11:15.

Powered by vBulletin® Version 3.8.14
Copyright © 2020, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.