SimplePortal

Customization => Custom Coding => Topic started by: Malibuz0r on February 08, 2013, 06:34:34 PM

Title: Calling a "Subs-Portal" function from another directory
Post by: Malibuz0r on February 08, 2013, 06:34:34 PM
Alright, so I have a folder called "Test" in the directory where my forum is installed. How would I call a function from "Subs-Portal" without getting the "Hacking attempt..." message.

Here's how I attempted to use it:


(../Test/Testing.php)
Code: [Select]
<?php
require_once(
'../Sources/Subs-Portal.php');

global $context;

sportal_create_shout($context['SPortal']['shoutbox'], $shout);

?>
(^ I still don't know if that's going to work properly)
Title: Re: Calling a "Subs-Portal" function from another directory
Post by: ccbtimewiz on February 08, 2013, 10:34:55 PM
You need to define that the script is in SMF.

Alternatively you can just call SSI and then use $sourcedir global for the other requires.
SimplePortal 2.3.8 © 2008-2024, SimplePortal