Skip to content
Permalink
Browse files

* Moved SSI.php to the core folder. The reason is, again, that I want…

… to keep the root as clean as possible. You'll need to update all of your files that require SSI, of course. It's just a matter of adding 'core/' to the call. (SSI.php, Subs-Admin.php, Home.template.php, install/ssi_*.*, subscriptions.php)
  • Loading branch information...
Nao committed Mar 26, 2014
1 parent de050eb commit c1f38d8fa7fe8b65aed2ae63737c40fae2bdf3b2
Showing with 56 additions and 56 deletions.
  1. +4 −4 { → core}/SSI.php
  2. +2 −2 core/app/Subs-Admin.php
  3. +1 −1 core/html/Home.template.php
  4. +3 −3 install/ssi_examples.php
  5. +44 −44 install/ssi_examples.shtml
  6. +2 −2 subscriptions.php
@@ -29,12 +29,12 @@
$time_start = microtime(true);
define('ROOT_DIR', str_replace('\\', '/', dirname(__FILE__)));
define('ROOT_DIR', str_replace('\\', '/', dirname(dirname(__FILE__))));
define('APP_DIR', ROOT_DIR . '/core/app');
// Get the forum's settings and loadSource() definition.
require_once(dirname(__FILE__) . '/Settings.php');
require_once(dirname(__FILE__) . '/index.php');
require_once(ROOT_DIR . '/Settings.php');
require_once(ROOT_DIR . '/index.php');
$ssi_error_reporting = error_reporting(E_ALL | E_STRICT);
/*
@@ -152,7 +152,7 @@
elseif (basename($_SERVER['PHP_SELF']) == 'SSI.php')
{
loadLanguage('Errors', '', false);
exit(sprintf($txt['ssi_not_direct'], we::$is_admin ? '\'' . addslashes(__FILE__) . '\'' : '\'SSI.php\''));
exit(sprintf($txt['ssi_not_direct'], we::$is_admin ? '\'' . addslashes(__FILE__) . '\'' : '\'core/SSI.php\''));
}
error_reporting($ssi_error_reporting);
@@ -150,9 +150,9 @@ function getFileVersions(&$versionOptions)
);
// Find the version in SSI.php's file header.
if (!empty($versionOptions['include_ssi']) && file_exists(ROOT_DIR . '/SSI.php'))
if (!empty($versionOptions['include_ssi']) && file_exists(ROOT_DIR . '/core/SSI.php'))
{
$fp = fopen(ROOT_DIR . '/SSI.php', 'rb');
$fp = fopen(ROOT_DIR . '/core/SSI.php', 'rb');
$header = fread($fp, 4096);
fclose($fp);
@@ -37,7 +37,7 @@ function template_main()
<we:block class="tborder" style="margin: 5px 0 15px; padding: 2px; border: 1px solid #dcc; border-radius: 5px">
<table class="homeposts w100 cs0">';
loadSource('../../SSI');
loadSource('../SSI');
$boards = ssi_recentTopicTitles($n, null, null, 'naos');
$nb_new = get_unread_numbers($boards);
@@ -11,7 +11,7 @@
/* Special thanks to Spaceman-Spiff for his contributions to this page. */
// Include the SSI file.
require(dirname(__FILE__) . '/SSI.php');
require(dirname(__FILE__) . '/../core/SSI.php');
// Viewing the homepage sample?
if (isset($_GET['view']) && $_GET['view'] == 'home1')
@@ -30,7 +30,7 @@

<h2>Include Code</h2>
<p>To use SSI.php in your page add at the very top of your page before the &lt;html&gt; tag on line 1 of your php file:</p>
<div class="bbc_code"><header>Code: <a href="#" onclick="return weSelectText(this);" class="codeoperation">[Select]</a></header><code>&lt;?php require(&quot;<?php echo addslashes(we::$is_admin ? realpath(ROOT_DIR . '/SSI.php') : 'SSI.php'); ?>&quot;); ?&gt;</code></div>
<div class="bbc_code"><header>Code: <a href="#" onclick="return weSelectText(this);" class="codeoperation">[Select]</a></header><code>&lt;?php require(&quot;<?php echo addslashes(we::$is_admin ? realpath(ROOT_DIR . '/core/SSI.php') : 'core/SSI.php'); ?>&quot;); ?&gt;</code></div>

<h2>Some notes on usage</h2>
<p>All the functions have an output method parameter. This can either be &quot;echo&quot; (the default) or &quot;array&quot;.</p>
@@ -514,7 +514,7 @@ function template_homepage_sample1($method = 'source')
if ($method == 'source')
{
$header = '<' . '?php require("' . (we::$is_admin ? addslashes(realpath(ROOT_DIR . '/SSI.php')) : 'SSI.php') . '"); ?' . ">\n" . $header;
$header = '<' . '?php require("' . (we::$is_admin ? addslashes(realpath(ROOT_DIR . '/core/SSI.php')) : 'core/SSI.php') . '"); ?' . ">\n" . $header;
return $header . template_homepage_sample1_html() . $footer;
}
else
@@ -11,113 +11,113 @@

<hr>

<h3>Recent Topics Function: &lt;!--#include virtual="./SSI.php?ssi_function=recentTopics" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=recentTopics" -->
<h3>Recent Topics Function: &lt;!--#include virtual="../core/SSI.php?ssi_function=recentTopics" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=recentTopics" -->

<hr>

<h3>Recent Posts Function: &lt;!--#include virtual="./SSI.php?ssi_function=recentPosts" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=recentPosts" -->
<h3>Recent Posts Function: &lt;!--#include virtual="../core/SSI.php?ssi_function=recentPosts" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=recentPosts" -->

<hr>

<h3>Recent Poll Function: &lt;!--#include virtual="./SSI.php?ssi_function=recentPoll" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=recentPoll" -->
<h3>Recent Poll Function: &lt;!--#include virtual="../core/SSI.php?ssi_function=recentPoll" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=recentPoll" -->

<hr>

<h3>Top Boards Function: &lt;!--#include virtual="./SSI.php?ssi_function=topBoards" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=topBoards" -->
<h3>Top Boards Function: &lt;!--#include virtual="../core/SSI.php?ssi_function=topBoards" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=topBoards" -->

<hr>

<h3>Top Topics by View Function: &lt;!--#include virtual="./SSI.php?ssi_function=topTopicsViews" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=topTopicsViews" -->
<h3>Top Topics by View Function: &lt;!--#include virtual="../core/SSI.php?ssi_function=topTopicsViews" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=topTopicsViews" -->

<hr>

<h3>Top Topics by Replies Function: &lt;!--#include virtual="./SSI.php?ssi_function=topTopicsReplies" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=topTopicsReplies" -->
<h3>Top Topics by Replies Function: &lt;!--#include virtual="../core/SSI.php?ssi_function=topTopicsReplies" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=topTopicsReplies" -->

<hr>

<h3>Top Poll Function: &lt;!--#include virtual="./SSI.php?ssi_function=topPoll" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=topPoll" -->
<h3>Top Poll Function: &lt;!--#include virtual="../core/SSI.php?ssi_function=topPoll" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=topPoll" -->

<hr>

<h3>Top Poster Function: &lt;!--#include virtual="./SSI.php?ssi_function=topPoster" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=topPoster" -->
<h3>Top Poster Function: &lt;!--#include virtual="../core/SSI.php?ssi_function=topPoster" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=topPoster" -->

<hr>

<h3>Topic's Poll Function: &lt;!--#include virtual="./SSI.php?ssi_function=showPoll;ssi_topic=##" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=showPoll;ssi_topic=1" -->
<h3>Topic's Poll Function: &lt;!--#include virtual="../core/SSI.php?ssi_function=showPoll;ssi_topic=##" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=showPoll;ssi_topic=1" -->

<hr>

<h3>Latest Member Function: &lt;!--#include virtual="./SSI.php?ssi_function=latestMember" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=latestMember" -->
<h3>Latest Member Function: &lt;!--#include virtual="../core/SSI.php?ssi_function=latestMember" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=latestMember" -->

<hr>

<h3>Random Member Function: &lt;!--#include virtual="./SSI.php?ssi_function=randomMember" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=randomMember" -->
<h3>Random Member Function: &lt;!--#include virtual="../core/SSI.php?ssi_function=randomMember" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=randomMember" -->

<hr>

<h3>Board Stats: &lt;!--#include virtual="./SSI.php?ssi_function=boardStats" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=boardStats" -->
<h3>Board Stats: &lt;!--#include virtual="../core/SSI.php?ssi_function=boardStats" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=boardStats" -->

<hr>

<h3>Who's Online Function: &lt;!--#include virtual="./SSI.php?ssi_function=whosOnline" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=whosOnline" -->
<h3>Who's Online Function: &lt;!--#include virtual="../core/SSI.php?ssi_function=whosOnline" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=whosOnline" -->

<hr>

<h3>Log Online Presence + Who's Online Function: &lt;!--#include virtual="./SSI.php?ssi_function=logOnline" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=logOnline" -->
<h3>Log Online Presence + Who's Online Function: &lt;!--#include virtual="../core/SSI.php?ssi_function=logOnline" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=logOnline" -->

<hr>

<h3>Welcome Function: &lt;!--#include virtual="./SSI.php?ssi_function=welcome" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=welcome" -->
<h3>Welcome Function: &lt;!--#include virtual="../core/SSI.php?ssi_function=welcome" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=welcome" -->

<hr>

<h3>News Function: &lt;!--#include virtual="./SSI.php?ssi_function=news" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=news" -->
<h3>News Function: &lt;!--#include virtual="../core/SSI.php?ssi_function=news" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=news" -->

<hr>

<h3>Board News Function: &lt;!--#include virtual="./SSI.php?ssi_function=boardNews" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=boardNews" -->
<h3>Board News Function: &lt;!--#include virtual="../core/SSI.php?ssi_function=boardNews" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=boardNews" -->

<hr>

<h3>Menubar Function: &lt;!--#include virtual="./SSI.php?ssi_function=menubar" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=menubar" -->
<h3>Menubar Function: &lt;!--#include virtual="../core/SSI.php?ssi_function=menubar" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=menubar" -->

<hr>

<h3>Quick Search Function: &lt;!--#include virtual="./SSI.php?ssi_function=quickSearch" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=quickSearch" -->
<h3>Quick Search Function: &lt;!--#include virtual="../core/SSI.php?ssi_function=quickSearch" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=quickSearch" -->

<hr>

<h3>Login Function: &lt;!--#include virtual="./SSI.php?ssi_function=login" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=login" -->
<h3>Login Function: &lt;!--#include virtual="../core/SSI.php?ssi_function=login" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=login" -->

<hr>

<h3>Log Out Function: &lt;!--#include virtual="./SSI.php?ssi_function=logout" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=logout" -->
<h3>Log Out Function: &lt;!--#include virtual="../core/SSI.php?ssi_function=logout" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=logout" -->

<hr>

<h3>Recent Attachments Function &lt;!--#include virtual="./SSI.php?ssi_function=recentAttachments" --&gt;</h3>
<!--#include virtual="./SSI.php?ssi_function=recentAttachments" -->
<h3>Recent Attachments Function &lt;!--#include virtual="../core/SSI.php?ssi_function=recentAttachments" --&gt;</h3>
<!--#include virtual="../core/SSI.php?ssi_function=recentAttachments" -->

<hr>

@@ -14,10 +14,10 @@
*/
// Start things rolling by getting Wedge alive...
if (!file_exists(dirname(__FILE__) . '/SSI.php'))
if (!file_exists(dirname(__FILE__) . '/core/SSI.php'))
exit('Cannot find SSI.php');
require_once(dirname(__FILE__) . '/SSI.php');
require_once(dirname(__FILE__) . '/core/SSI.php');
loadSource(array('ManagePaid', 'Subs-Admin')); // for subscriptions core and admin emailing
loadLanguage('ManagePaid');

0 comments on commit c1f38d8

Please sign in to comment.
You can’t perform that action at this time.