URLs
to be able to use original URLs, not full path to installed subfolder
e_url.php
It is an e107 addon for rewriting URLs for eFiction plugin.
The full path is f.e. SITEURL/PLUGINFOLDER/efiction/browse.php
The new path is f.e. SITEURL/browse.php
e107 supports aliases and SEF-URLS, but it is too soon for this.
With this addon, we can rename main file back to index.php and use URL /efiction/ for it.
e_URL key is important for calling those links later.
File
e_URL key
member.php (orig. user.php)
'member'
reviews.php
'reviews'
report.php (orig. contact.php)
'report'
browse.php
'browse'
authors.php
'authors'
rss.php
'rss'
searching.php (orig. search.php)
'searching'
series.php
'series'
stories.php
'stories'
toplists.php
'toplists'
viewuser.php
'viewuser'
viewpage.php
'viewpage'
viewseries.php
'viewseries'
viewstory.php
'viewstory'
admin.php
'admin'
ffnews.php (orig. news.php)
'ffnews'
efiction.php (orig.index.php)
'index'
Example for settings:
$config['viewstory'] = array(
'alias' => 'viewstory.php',
'regex' => '^{alias}\/?([\?].*)?\/?$',
'sef' => '{alias}',
'redirect' => '{e_PLUGIN}efiction/viewstory.php$1',
);
_BASEURL
Change in header.php:
while (!file_exists($folder_level."header.php")) { $folder_level .= "../"; }
if(!defined("_BASEDIR")) define("_BASEDIR", $folder_level);
to:
if (!defined('_BASEDIR')) {
define('_BASEDIR', e_PLUGIN.'efiction/');
}
Add sitelink
add new navigation link

Result: (e107 part)

After click on link, efiction part:

includes/pagesetup.php
in all files is pagesetup.php used this way:
include("includes/pagesetup.php");
It fails because it is not a relative path.
It should be changed to all pages
include(_BASEDIR."includes/pagesetup.php");
Later e_module addon will be used for this.
While on it, replace all absolute paths
include("includes/storyblock.php");
include("includes/seriesblock.php");
include("includes/listings.php");
include("includes/reviewform.php");
include("includes/emailer.php");
include("includes/deletefunctions.php");
panel URLs, browse.php
Temp fix, $panel variable should be fixed different way
Fix:
if($panel['panel_url'] && file_exists(_BASEDIR.$panel['panel_url'])) include($panel['panel_url']);
else if(file_exists("browse/{$type}.php")) include("browse/{$type}.php");
to:
if($panel['panel_url'] && file_exists(_BASEDIR.$panel['panel_url'])) include(_BASEDIR.$panel['panel_url']);
else if(file_exists(_BASEDIR."browse/{$type}.php")) include(_BASEDIR."browse/{$type}.php");
Last updated