Jump to content


[Tutorial] SMF SSI.php functions in MKportal Modules


  • You cannot reply to this topic
No replies to this topic

#1 visiblesoul

  • Administrators
  • 551 posts
  • Location:Earth
  • Texas

Posted 27 November 2004 - 04:32 AM

I posted Meo's module tutorial today and adapted the code to MKP x SMF.
smf.mkportal.it/forum/index.php?topic=50.msg150#msg150 (broken link)

Here is an example of how to use the SMF SSI.php in a MKP module. I tested this one and it works.

<?php

if (!defined("IN_MKP")) {
	die ("Sorry !! You cannot access this file directly.");
}

if(!$mkportals->member['id']) {
	$message = "You are not authorized to access the New Module.";
	$mklib->error_page($message);
	exit;
}

$output = implode("", file("http://www.YourSite.com/forums/SSI.php?ssi_function=boardNews;board=1;limit=5;length=290"));

$mklib->printpage("1", "1", "New Module", $output);

?>
Change the 2 occurrences of "New Module" with whatever you want to title your page.


This section of code prevents guests from viewing the module. If you want guests to be able to access the module then you should delete it or comment it out...
if(!$mkportals->member['id']) {
	$message = "You are not authorized to access the New Module.";
	$mklib->error_page($message);
	exit;
}
-=DKC=-


Please note that I offer free support on this forum in my free time. Depending on how much work I have backlogged it may take me a week or more to answer questions. I am not ignoring you. I answer everyone but please be patient. Thanks.

Disclaimer: All forum posts, including code examples, on this forum are offered for free in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use code examples at your own risk.

"If at first you don't succeed, keep on suckin' til you do succeed." -Curly Howard





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users