Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
This is a copy of the Docs files, Admin Manual from the admin area (you can access after installation), or other sources in purpose to understand how the efiction script works.
eFiction is CMS for self-hosted fanfiction archives. It was originally a PHP-Nuke module, but then separate CMS was created.
Copyright (c) 2015-2021 Rainer Volkrodt rainer@volkrodt.de
For over one decade, you shaped the way fanfiction sites were run. Humbly trying to pick up from where you left - because nobody else did.
Copyright (c) 2007 by Tammy Keefer,
Released under the GPL.
Copyright (C) 2003 by Rebecca Smallwood.
Original Developer: Rebecca Smallwood (Rivka) http://orodruin.sourceforge.net
Fanfiction Script: Rebecca Smallwood (Rivka) TemplatePower Templating System: R.P.J. Velzeboer, http://templatepower.codocad.com/ (Note: not available anymore)
A Big Thank You to my original Beta-testers: Theresa Sanchez, Khuffie, Mona Carol-Kaufman, Michele Bumbarger, Stephanie Smith, eFanfiction, Amy Cheng, arakune, Peganino, Ceit, brihana25, Annabelle Crane
Big thanks also to the 2.0 beta-testers: babaca, Jayelle, Carrie, Nicole, eyedam, Dreamhowler, Roberto-san, Calic0cat, West4me, emmekappa, Osfer, Sarit, Silvermoon, Carissa, Jan_AQ, Lazuli
Also thanks for our 3.0 Beta testers who were too many to name.
Author: Tammy
Source: https://efiction.org/community/info-tutorials/adding-a-block/
1. First you will need to go into the Admin area of your site and initialize the block if it hasn't been initialized already. Admin->Blocks and click "Initialize Block" for the block you wish to add.
2. On the same page, if the block has already been initialized, you will need to turn it on. The "Status" column of the table has 3 options: Inactive, Active, and Index Only. Inactive is turned off. Active will make it available for all pages. Index Only will make it available on the index page only. If you intend for the block to only appear on the index page set it that way as it will save resources on your site. (ETA: The only exception is the "Who's Online" block which should always be set to "Active" if you have it on.) Click "Submit" to save the changes.
3. If you're using a skin that you didn't create, check the variables.php to see if the block isn't turned off there. Again, if a block is turned off it saves resources for the site so some skins use variables.php to turn blocks off that aren't being used. Look for a line in the file like this:
BLOCKNAME will be the name of the block. Delete this line if you find it. You may find other lines that start with:
These lines will be configuration settings for the block. You may or may not want to delete these lines as well. It is suggested that you leave them until you have the block displaying on the page then delete or edit them one at a time until you get the effect you want.
4. The final step in adding a block to your skin is adding it to the .tpl files. Generally, you will want to add it to either header.tpl, footer.tpl, or index.tpl depending on where (and when) you want it to appear. All of the default blocks can be added using the {BLOCK_title} and {BLOCK_content} variables. Many of the blocks also have more complicated options for adding them to your skins. These variables will generally be surrounded by html in your skin. Open the .tpl file where you want the block to appear then add the {BLOCK_title} and {BLOCK_content} variables to the HTML you find there. Example:
This page controls the page links used in the menu block and available for use in the skin as individual links.
Blocks are another part of your eFiction site that let you configure the look and feel of your site. A number of blocks are included with eFiction. You can also create your own or add blocks others have created. The included blocks are as follows:
The first page here lists the blocks available to you. Some will have been pre-installed. The first column lists the name of the block and is not editable. The second column, which you can edit, displays the title of the block as it will be displayed on your site. The third column displays the block's status. There are three possible status options.
Inactive - The block is completely off.
Active - The block will load on every page.
Index Only - The block will load on the index (home) page only.
It is advisable that if the block does not display on every page, you set it to "Index Only" or "Inactive" as this will save on your site's resources. The one exception to this is the Online block. If you use this block, you must set it to "Active" for the block to work properly.
The fourth column, gives you the option to admin the block if there are options to administer.
You may also see the name of a block and the words "Initialize Block" instead of the last three columns. You will see this when a block is available to be installed, but has not been installed yet. The Online, Poll, Search and Shoutbox blocks are not installed by default. Click on "Initialize Block" then change the status of the block to "Active" or "Index Only" to activate it.
Admin panel for user with level 1:
Series are collections of related stories by the same or multiple authors. A story and its sequels, for example, would be a series. Series might also be used for a "shared universe" in which multiple authors write. The person who creates the series is considered the series "owner" and controls whether or not the series is "open" to contributions by other authors or not. Even if the series is "closed", the series owner has the option to include stories from other authors in the series. This form is the same as members with an additional option to select the owner of the series.
This form is the same as members use in the "Account Info" area except it has an additional option to select the author of the series. You will also see options to validate and mark the story as featured.
This page allows administrators to manage the featured stories of the site. A story may initially be marked as featured:
From the add/edit story form.
By clicking on the "Featured" link in the "Admin Options" list for the story.
Once a story has been marked it will appear in a table on this admin page. From here, site administrators may choose to "retire" the story or remove its featured status entirely.
This page is used to add and administer the news stories for the site.
This page allows site adminstrators to manage the stories in the submission queue. This page is only used when automatic validation of stories is turned off and admistrators are manually validating stories. This page will list the stories waiting in the queue.
This page lets site administrators "hide" skins from members. Administrators are advised to do this while they work on developing a new skin.
This page is used to manage the site categories. To view a category's sub-categories in the list click on the "+" sign next to the name of the category.
To add categories:
Goto Admin -> Categories.
For a new top level category click "Add New Top Level Category" or for a new sub-category click on the "Sub-Category" link in the Options column for the parent category.
Enter the category information and click "Submit". A locked category is a category where new story submissions are not accepted. It is generally used to "lock" top level categories and force submissions into sub-categories beneath the locked category.
This page is used to manage the characters. Characters for a specific category can be added from the categories page or directly from this page.
To add characters:
Choose on the category in which to place the characters (or "Sitewide" to make the characters accessible site wide).
Choose on the number of characters to add.
Click "Submit".
You will now be presented with a form in which to enter the information about each character. A bio for the character is optional. If entered, it will appear at the top of the "Browse" page for that character.
Ratings are a required element for story submission. Ratings are intended to show the intended audience for a story much as the MPAA ratings work for movies. Note: You are strongly advised not to use the MPAA ratings for your archive as they have threatened archives with legal action for doing so. The story's rating can also be used to limit access to certain stories.
Rating - The text of the rating. This is limited to 60 characters.
Warning Pop-up - If this box is checked, a warning pop-up will be displayed for stories with this rating. The text of this warning is defined in the "Warning text" field. If warning pop-up's only once is selected in the settings, the site will remember whether or not this rating warning has appeared and will only display it once. If it is not selected, the warning pop-up will display each time.
Age Consent Required - If this box is checked, the visitor must have confirmed they are an adult (either via their preferences if they're logged in or via the warning pop-up) before they can view stories with this rating.
Registered Users Only - If this box is checked, the visitor must be logged in to view stories with this rating.
Warning text - The warning text that will be displayed to the user in the pop-up warning (if any).
Classifications take the place of the genres and warnings from 1.1 and 2.0. The change lets you define your own classifications without hacking into the files.
To add a new classification type:
Goto Admin -> Classifications.
Click on "Add New Classification Type".
Enter the name and title for the classification type such as "genres" or "warnings". The title can be anything you like. The title will be what is displayed on the screen. The name will be used in your skin template as a variable so it should be a unique one word description. As an example: enter the name as "genre" and the title as "Genres".
Click "Submit".
After you click submit you'll be taken back to the table listing your classification types.
Click on the classification type ("Genres" to continue the example). This will take you to the list of classifications within that type.
Click "Add New Classifications" to go to the form to add your classifications for that type. You'll have as many blanks on this form as you've set items per page.
Enter the classifications (to continue the example: romance, action/adventure, mystery) one in each text box.
Click submit.
To edit a classification or classification type click "Edit" in the options in the table. To delete a classification click "delete" in the options.
This page gives site administrators a number of options for managing the members of their site. Note: Some of these options may be unavailable if you have bridged your eFiction site to another application.
At the top of the page are a number of options to sort members by:
All Members - lists all members
Admins - lists all administrators
Authors - lists only members who have submitted stories to the archive
Authors Input by Admins - lists authors who have been added by admins. Note: Will not function for bridged sites.
Non-validated Members - lists members who have not been validated.
Validated Members - lists members who have been validated
Locked Members - lists members whose accounts have been locked (banned)
Unlocked Members - lists members whose accounts are active (non-banned)
Validated members are members whose stories by-pass the validation queue and are accepted automatically in archives where administrators are validating stories manually. By clicking on a members name in one of the last four lists, you are choosing to take that action on that member. For instance, if you click on a member's name in the Non-validated Members list, you will be taken to a page that will let you validate that member. The reverse is also true, if you click on a member's name in the Validated Members list, you will be taken to a page that will let you revoke the validated status for that member.
An additional option, at the bottom of the page, for non-bridged sites is the ability to add new members. These are the members that appear in the "Authors Input by Admins" list. When clicking on a name in that list, administrators are given the option to release the author's account to their control.
Site administrators can use this option to mail all members of the site. Administrators may also limit the email to authors or admins in a certain category of the site.
Level
Description
0
Visitor
1
Member, Super Administer with access to everything
2
Member, Admin, rights set by panels, by default can edit user, all categories access
3
Member, Admin, access limited by categories
4
Member, authorized author for archives with submissions turned off
Block name
Block Description
Categories
This block lists the top level categories on your site.
Featured
This block lists one or more of the featured stories of your site (depending on configuration).
Info
This block lists a variety of information about your site including the number of: members, authors, stories, words, reviews, and chapters.
Login
This block displays a login form allowing you to include a login form on the index page or every page should you choose.
Menu
This block builds a menu from the page links in your site. Configurable.
News
This block displays one or more of the news items on your site.
Online
This block displays who is presently online on your site.
Poll
This block lets you query your members using a multiple choice question. Also includes an archive of poll questions and results.
Random
This block displays a random story with each page load.
Recent
This block lists the most recently added/updated stories for your site.
Search
A simple search box for inclusion in your skins.
Shoutbox
A shoutbox for your site. Also includes an archive.
Skinchange
This block displays a drop down that will let visitors who aren't logged in select from the site's skins the one they wish to display.
This panel will let your control the modules installed on your site. The script comes with one module, challenges. You can find other modules created by others or create your own. Modules are add-on programs that add functionality to your site without you needing to edit the files.
This page is used to give admin privileges to a member of your site. The initial page lists all current admins and also gives you the option to add a new admin.
To give a member admin privileges:
Click on "Add New Admin"
Select the member's penname from the drop-down list.
Select the level of admin privileges for this member.
Select the categories that member will oversee or leave blank to have them oversee all categories.
Check the box if you want this admin to receive e-mail notices of new stories to be validated.
Click "Submit".
If you intend to write the story texts to the server or allow image uploads CHMOD the folder you intend to store the stories in to 777. If this folder is missing the script will attempt to create it for you during the install.
Move config.php from the docs folder to the main eFiction folder. If the config.php is missing the install script will attempt to create it, but it's best if you move it.
CHMOD config.php to 666.
Using your web browser, go to the URL for your website(i.e. http://www.yoursite.com) to run the install and set up the admin login.
Login with the admin login and password set in step #4, and complete the configuration of your site through the Admin panel.
BACK UP YOUR FILES AND YOUR DATABASE FIRST!! Upload the 3.0 files OVER your 2.0 files. DO NOT DELETE YOUR 2.0 FILES UNTIL THE UPGRADE IS COMPLETE! Go to your site. The script will detect that the config.php file is for 2.0 and start the upgrade.
Note: You're encouraged to choose one of the skins provided with the 3.0 script until you can update your 2.0 skins.
BACK UP YOUR FILES AND YOUR DATABASE FIRST!! Upload the 3.0 files OVER your 1.1 files. DO NOT DELETE YOUR 2.0 FILES UNTIL THE UPGRADE IS COMPLETE! Go to your site. The script will detect that the config.php file is for 1.1 and start the upgrade.
Note: You're encouraged to choose one of the skins provided with the 3.0 script until you can update your 1.1 skins.
Note 2: Make sure your config.php file is CHMOD'd to 666.
Note 3: If you have installed blocks that did not come with the 2.0 package, turn them off before starting the upgrade. They will most likely be incompatible!
1) As written, the script is intended to be used in the following way:
Categories: you can have only one category, or as many as you want, including
sub-categories. Categories were written with the intention that they would
indicate different fandoms or categories of story.
Characters: Intended to mean the characters that fall within that fandom or
category.
Classifications: Beyond categories and characters you can set up your own
classifications such as genres, warnings, spoilers, story type, couple, etc.
Series: Series are collections of related stories by the same or multiple
authors. A story and its sequels, for example, would be a series. Series
might also be used for a "shared universe" in which multiple authors write.
The person who creates the series is considered the series "owner" and
controls whether or not the series is "open" to contributions by other
authors or not. Even if the series is "closed", the series owner has the
option to include stories from other authors in the series.
Challenges: Challenges are ideas/wishes for stories that a member or an
anonymous visitor "challenges" authors to write. Stories written in response
to the challenge can be listed under the challenge by the story author or an admin.
Note: in 3.0 challenges have been made into an optional module. To install
challenges goto http://www.yoursite.com/modules/challenges/install.php.
Check out the Admin area for more information on all of these settings and more.
2) You can modify most of the text that is displayed in the script by changing the language file in the languages/ folder for the language you selected. Just change the text within the quotes for each line to whatever you want it to say. Some wording is included within the skin's files. If you have created a translation for eFiction, we encourage you to share it!
List of "hooks" in the script [author Tammy]
The following is a list of "hooks" where code can be added to the script via the PREFIXfanfiction_codeblocks table. This gives developers the ability to easily add functionality at certain points without hacking the files.
Each "hook" is assigned a name.
Developers will enter the following information into the database:
code_id - An auto-increment id number. Let the database assign this.
code_text - The text of your code additions. A smart idea is to put an include statement here pointing to the additional code. That way you don't have to change the code text in the database each time you make a change in your code. Especially makes things easier during development. :)
code_type - The "hook" location.
code_module - Assign a module name to this code text. This is assigned to quickly allow code blocks to be added and removed.
addchapter - Used in stories.php to add information from custom chapter options to the database.
addseries - Used in series.php to add information from custom series options to the database.
addstory - Used in stories.php to add information from custom story options to the database.
adminnotices - Used in the main admin.php page and in the info block to assign admin notices. This information will be appended to the notice of the number of chapters in the submission queue.
AO - Used in the User Statistics panel to add custome items to the "Author of:" list.
browsesorts - Used to add custome select options to the sort form on the browse pages.
browseterms - Used to add custom selection to the queries on the browse pages. You will most likely use this in conjunction with the browsesorts hook.
delcategory - Used when a category is deleted to update information for the items on the site.
delchapter - Used to remove custom information from the database associated with a specific chapter that is being deleted.
delchar - Used when a character is deleted to update all the items on the site.
delclass - Used when a classification or classification_type is deleted from the site to update the items on the site.
deleteseries - Used in series.php to delete custom content concerning a series from the database.
delstory - Used to remove custom information from the database associated with a specific story that is being deleted.
deluser - Used to delete all items associated with a member when that member is deleted.
editchapter - Used in stories.php to update information from custom chapter options in the database.
editseries - Used in series.php to update information from custom series options in the database.
editstory - Used in stories.php to update information from custom story options in the database.
logtype - Used in the Admin log area to add new log types to the list.
membersList - Used to add new options to the selections available on the "Members" page.
otherresults - Used to select other results and display them in a list on the browse pages.
revadd - Used in reviews.php to add a review for an item that is not a story or series.
revauthor - Used to select the author of a reviewed item. This is used in reviews.php to determine if the visitor has permission to respond, edit, or delete the review.
revdelete - Used in reviews.php to delete a review that is not for a story or series.
revfix - Used in the Archive Maintenance page. If you have custom review types, use this to supply a way to recalculate the reviews for your custom type.
reviewsby - Used in the Reviews By panel to display the "block" of information about the specific item the review is for.
revreceived - Used in the Reviews Received panel to display the list of reviews that are not for stories or series. Will be appended to the end of the table under the stories list.
revqueries - Used in reviews.pphp to select the reviews for an item that is not a story or a series.
revtitle - Used in reviews.php to build the title for a review that is for an item that is not a story or a series.
searchform - Used in search.php to add new selection options for the advanced search form. In most cases this will be the same code you will use in the browsesorts hook.
seriesblock - Used to display custom information about a series in the series listings.
seriesform - Used in series.php to add custom options to the add and edit forms for a series.
seriestitle - Used to add custom information to the series title block.
sitestats - Used in the info block to add custom stats to the list.
storyblock - Used to display custom information about a story in the listing of stories. This information will also be used in the viewstory.
storyend - Used to add custom information to the display of the last chapter of a story in viewstory.php.
storyform - Used in includes/storyform.php to add custom information to the form displayed when adding or editing a story.
storyindex - Used to add custom information to the story index page in viewstory.php
userTabs - Used to add special information to the "tabs" in the viewuser.php page.
viewstory - Used to add custom information to the viewstory.php page.
Author: Tammy, source: https://efiction.org/community/info-tutorials/images-in-skins/
When you add images to your skins use the {skindir} variable to point to the correct location. You cannot use a relative path to the image because not all the pages are in the same directory (such as a number of the challenges pages, poll and shoutbox archives, etc)
Wrong! This will break on some of your pages.
Right! The script will automatically fill in the correct relative path to the skin directory.
Also right. You can also use the complete URL to the image like this.
When you want to customize the stars, like/dislike, featured/retired, etc. graphics using the variables.php you should use the PHP variable $skindir in the same way.
Wrong! This will break in places.
Right! This will automatically supply the correct relative path.
Four custom pages are defined in the installation. You will most likely wish to customize these pages to fit your site.
This page allows you to add custom pages to your site. These pages may not contain php code, only HTML and plain text. Four custom pages are defined for you during the installation.
help - A help page for visitors.
tos - Terms of Service. This page is displayed on the registration page.
rules - Submission Rules. This page is displayed at the top of the story submission form and is also linked to the default help page.
maintenance - Maintenance Message. This is the message that is displayed to visitors when you place your site into maintenance mode.
To add a custom page:
Goto Admin -> Custom Pages
Click on "Add New Custom Page"
Enter the name of the page in the form. Note: The name for your page should contain letters, numbers, and the underscore character ONLY.
Enter the title for the page. The page title will also be the text of the link to the page in the page links.
Enter the text of your page.
Click the "Submit" button.
The name you assign to your custom page will be the {NAME_link} variable for you to use in your skins. The script will append "_link" to the name to help prevent naming conflicts with other variables. The title will be the title of the page. For the URL of your custom page, you may use either viewpage.php?id=ID or viewpage.php?page=NAME where ID is the ID number of the page or NAME is the name of the page.
Note: The name for your page should contain letters, numbers, and the underscore character ONLY.
Content of file: docs/default_panels.htm
The following types are defined as part of the basic eFiction site:
A - Admin panels
F - Favorites
S - Submissions
B - Browse
P - Member Profile
U - Member Account
L - Top 10 Lists
(1) Hidden by default. (2) System panels. You should not need to alter these settings and may cause errors if you do
The admin panels control the different admin options for the site. In 2.0 the list was static. Putting the admin options into panels allows site owners the option of changing the access level for the various features. It also allows new options to be added without editing everything. The 0-4 levels in the panel are most applicable here. The levels 1 to 4 indicate the admin level required to access a certain feature.
Message Settings (1)
Rejection Letter (1)(2)
Validation Letter (1)(2)
Validate Submission (1)(2)
Censor (1)
Categories
Panels
Characters
Settings
Blocks
Ratings
Add New Story
Add New Series
Custom Pages
Classifications
News
Members
Featured Stories
Submissions
Page Links
Admins
Mail Users
Skins
PHP Info
Action Log
Profile Information
Browse panels control the "Browse By" area of the site.
Most Recent (1)
Featured Stories (1)
Classes (1)(2)
Categories
Characters
Ratings
Series
Titles
The favorites panels are included both in the member "Account Info" page and the list of panels in the profile. In the "Account Info" area the panel must be set to level 1 to be visible in the list of options. Otherwise, they're used as part of the "Manage Favorites" panel.
Favorite Stories (1)
Favorite Series (1)
Favorite Authors (1)
{author}'s Favorites
The Top 10 panel. They're all turned on my default. If you turn favorites off, it is suggested that you hide, not delete, the favorites panels. (You could change your mind later.)
10 Largest Series
10 Smallest Series
10 Most Reviewed Series
10 Longest Stories
10 Shortest Stories
10 Most Reviewed Stories
10 Most Read Stories
10 Most Responded to Challenges
10 Most Favorite Stories
10 Most Prolific Reviewers
10 Most Prolific Authors
10 Most Reviewed Recommendations
These are the panels that will be displayed on the user's profile page along with the non-hidden favorites panels.
Contact (1)(2)
Stories by {author}
Series by {author}
Reviews by {author}
The submission panels will only be displayed in the user panel if submissions are turned on. They were placed in a type separate from the user panels so they would be turned on and off together based on the submission site settings.
Add New Story
Manage Stories
Add New Series
Manage Series
Manage Images
As an extra level of security here. The "level" of the panel should be set to either 0 or 1. Panels with level 0 will be displayed to anyone. Panels with level 1 will be displayed only to logged in members. The login, register, and lost password panels are currently the only panels set to level 0 for the user account area.
Login (1)
Your Reviews (1)
Reviews Received (1)
Review Response (1)(2)
Lost Password
Register
Edit Bio
Edit Preferences
View Your Statistics
Manage Favorites
Logout
content of file doc/newfeatures.txt
Ability to remove Featured Story status from Admin panel as well as retire a Featured Story. You can also now
do this when editing a story.
Ability to edit and delete news comments from news archive page.
Time format in settings. Removed separate news date format.
Added pagination in news.php
Ability to set your own classifications in addition to warnings and genres (i.e. Spoilers, Episode Related,
Pairings, Language, Story Length, Story Type)
Ability to add custom pages from the admin panel.
You can now customize the up and down arrows used throughout the script in the same way the other graphics
(stars, etc) can be customized. The variables are $up and $down
Added pagination to individual series page.
Story counts are back. :)
Moved the javascript into header.php so no more problems with the formselect.js not regenerating. The info will
get pulled each time the page loads.
Added Table of Contents link to the storyblock and viewstory page for stories.
Changed admin links for featured stories in story block to let you either remove or retire the feature.
Co-authors :) Yes. plural.
Chapter end notes.
Story notes.
The validation function in the admin panel now uses storyblock.php for a more consistent look of story information
across the site.
When previewing a story in the the add/edit story functions, the script now uses storyblock.php for a more consistent
look for story information across the site.
The default yes and no letters (subject and text) when validating stories can now be customized using {variables} for:
{sitename}- the name of the site;
{adminname} - the penname of the admin sending the letter (text of letter only)
{rules} - a link to the submission rules (text of letter only)
{storytitle} - the title of the story
{chaptertitle} - the title of the chapter within the story
You can now add custom admin panels.
The main admin page will now tell you how many stories are in the validation queue. So does the info block.
Session and cookie variables will now use a sitekey so that multiple sites on the same domain won't have problems with crossed login info.
News comments are now saved under uid instead of penname so that changes in penname will carry over to comment info.
TinyMCE can now be toggled on/off on the page.
Members can now turn tinyMCE and story indexes on/off for themselves
Members can choose the default story sort for themselves.
Challenges have been made into an optional module you can install and uninstall as you choose
Admins can now decide whether or not to allow anonymous challenges
The number of responses to a challenge is now listed in the information for the challenge.
Maintenance mode.
Action log.
Stories updated within the time frame of your "recent days" setting will now also be marked as "New!" (you can also define your own text or assign a graphic using $new in variables.php)
You can now define what "Top 10's" lists to include and add your own through the admin panel.
You can now "hide" skins from regular members through the admin panel.
Customized fields in the author profile page.
After the install script has finished there are still a number of elements of the archive that you must configure before your archive will be operational.
Ratings - Ratings are a required element for story submission. Ratings are intended to show the intended audience for a story much as the MPAA ratings work for movies.
You are strongly advised not to use the MPAA ratings for your archive as they have threatened archives with legal action for doing so.
Categories (if you chose to have more than one) - How you categorize your archive is at your discretion. Some archives use categories for different fandoms. Others use categories for types of story within a fandom.
Characters - Characters are a list of characters used in your stories. Characters can be defined as sitewide or assigned to a specific category.
Classifications - Classifications are other types of "classifications" you want to sort your stories into. In 1.1 and 2.0, classifications were hard-coded as genres and warnings. To add new classifications or modify existing classifications required editing a number of core files. With 3.0, you can designate your own classifications. Other classifications that could be used are: spoilers, pairings, story type, language.
News - It's a good idea to write an initial news story.
Message Settings - The install script will load some default messages for your site. You will most likely wish to customize these messages to fit your site.
Custom Pages - Four custom pages are defined in the installation. You will most likely wish to customize these pages to fit your site.
Additional User Profile Fields - A number of optional user profile fields were installed though only a few were turned on. You will want to go to Admin->Profile Information and configure the user profile fields that you want on. If you want a custom profile field, now's the time to add that too.
Note: If you intend to bridge your eFiction site with another script. It's advisable to do it now before you open for business.
This admin panel provides a number of functions for maintaining your site.
This function recalculates the number of reviews and the rating for the stories, series, and chapters on the site.
This function has been moved from the Categories admin. It will recalculate the number of stories per category.
This function will optimize the tables in your database. Doing this occasionally will improve site performance.
When you upload an update for the eFiction script, use this function to run any changes needed to the database.
This admin panel lets you add/remove items from the member profile page. Right now, there are twelve items pre-loaded.
Live Journal
Web site
AOL
ICQ
MSN IM
Yahoo IM
Deviant Art
Beta-Reader
DeadJournal
Xanga
Gender
MySpace
The majority of the pre-loaded items were in 2.0. To turn one of the pre-loaded items on/off. Click edit. Check the box next to "Field enabled" to turn the field on. On the same form you can change the name and title of the field. Just like the page links and custom pages, the name will be the variable for you to use in your .tpl files and the title will be what appears on screen in the registration/edit bio form and the profile.
There are a number of types of fields defined.
URL - This is a url. The script will automatically turn this into a link when displaying it in the profile.
Select Box - A drop down select box to choose from a selection. In the form place each option in the box in a separate line.
Yes/No - Answer to a yes/no question.
ID with URL - These are like fanfiction or livejournal links where there is a base url with the user's id. Enter the url with {info} where the person's ID goes. For instance: http://{info}.livejournal.com. The registration/edit bio form will present a text box for the member to enter their id.
Custom code - This option lets you provide custom code to handle the entry and display of the item. The aol, icq, msn, and yahoo fields use custom code.
Text - This type gives the author a text box to enter information. The information is presented back as text as well. The limit on user text is 255 characters!
You can modify most of the text that is displayed in the script by changing the language file in the languages/ folder for the language you selected. Copy the en.php and en_admin.php files and rename them to your chosen language. For instance, en.php would become es.php for Spanish or ru.php for Russian. Just change the text within the quotes for each line to whatever you want it to say. Some wording is included within the skin's files. If you have created a translation for eFiction, we encourage you to share it!
content of file docs/Skin Changes 2.0 to 3.0.txt
Note: This is not a tutorial on how to update a skin. It's pretty much my notes on what will eventually have to go into a tutorial. Therefore, there's probably things missing. We'll be working on a real tutorial. Optional additions to listings.tpl for stories:
{toc}
- Table of Contents link to story index {count}
- The view/read count {new}
- The text "New!" for new stories or alternately a graphic (use the URL to the graphic from the main directory). {featuredtext}
- The words "Featured Story" or "Past Featured Story" to use instead of the graphics if you wish
This is already done for you in the default_tpls folder.
Also in listings.tpl you will need to add {comment} to both the seriesblock and storyblock sections. This will be used for favorite stories to show the member's comments about the story. Style the comment with favcomment.tpl. See the default_tpls folder for an example.
In viewstory.tpl optional addtion:
{toc}
- Table of Contents link to story index
The story and chapter notes (beginning and end) have been moved into blocks in viewstory.tpl This will let you style them any way you wish and also hide those blocks when there are no notes to display. (See the default_tpls for an example)
For any new classifications you add you will need to modify listings.tpl, series_title.tpl, and optionally viewstory.tpl and storyindex.tpl to include those additional classifications. Optionally, you can use {classifications} to include all your classifications at one time. The default_tpls/listings.tpl uses {classifications}
In reviews.tpl you can now add a quick review form to the bottom of the list of reviews instead of the "Submit a Review" link using the {reviewform} variable. Already done in default_tpls.
The reviewsblock has been pulled into its own .tpl so it can be reused in places other than the reviews page (such as the user panels)
The profile section of the user page has been pulled into its own .tpl, again so that it can be re-used. It should also make it easier for people modding skins. There is also now a setting in your admin settings for whether or not to show the profile at the top of the view user page all the time or only when it's selected.
In user.tpl you no longer have individual variables for the tabs. Instead it's been put into a block to allow more tabs to be added dynamically without editing the tpl's each time.
{link} {count}
You can also use {linkcount} to include the count of items inside the link instead of next to it. You don't have to use 's. This is just an example.
Rather than have the news archive link hardcoded into the news block at the bottom, I've assigned it to a global link (i.e. {home}) so that you can put it where you want. It's assigned as {newsarchive}
There are a large number of new links you can add to your skins and the menu block. The list is in the "Page Links" section of the admin panel.
In default_tpls, we changed the "classification" CSS class to "label". It's more clear what the purpose is and shorter. :)
For the new profile block, if you add new fields to the profile information, you will need to either add the individual links such as {yahoo} or remove the individual links and make use of the new {authorfields} variable that displays the complete list of custom fields. If you're creating skins for the use of others, you're encouraged to use {authorfields} instead of the individual links.
The $current variable for the index page was changed to home to solve a conflict with the variable name for the pagelink. This will affect skins like Romance that use the current setting as the name of a containing div.
For the featured, recent, and random blocks, if you use the .tpl option you'll need to remove the name of the block from each of the variables. For instance {recenttitle} will now be {title}. This is because each of these blocks now uses the storyblock.php code. Therefore, you can also add any of the information you can use in the listings.tpl to your random, featured, and recent blocks.
content of file: docs/creating_blocks.htm
For those that want to create their own blocks to share with others or just tweak the ones included already, here's the basics. There are two files needed for each block: blockname.php an init.php. Technically, if you added the block manually, you wouldn't need the init.php file. It is only used when the block is first initialized, and can be deleted afterward. Though I would suggest keeping a backup somewhere, just in case.
The init.php file is very simple composed simply of a mysql statement that adds the block tot he database. As in the example below.
This also shows the basic parameters needed for a block: name, title, status, file, and variables. The title can be an empty string if you don't need a title for that particular block. If the block doesn't need any variables, that too can be left empty. The file should be a subfolder/file of the blocks folder for the sake of consistency. The status should generally start off as 0 for inactive. There are 3 status options for blocks:
Any default configuration you want for the block can be included in the init.php as well. The variables are an array encoded using PHP's serialize function. For instance, the categories block currently has two options: one column and multiple columns. The default is a single column lists. If I were to change the init file as follows, the default would then become a multiple column list.
When you change any of the settings for the blocks from the admin panel the information stored in the database about the block is updated.
The block.php file creates the content that is placed inside the {blockname_content}
variable. This content is placed inside a variable $content which is then assigned to {blockname_content}
So a very simple example of a block would be:
There are two other optional files. The first is an admin file which will be called from the admin panel to make changes to the settings in the block. Creating one of those is for another day.
The second file (or multiple files) is a language file that defines any text you use in your block. These files take the same format as the main language file in the languages folder and are named similarly. So for instance, an English language file would be named en.php. For Spanish, it would be es.php.
Most often, you might need to define some wording for your admin.php file. If you need to add a language file, use the following code in either admin.php or blockname.php
The if(...) isn't technically necessary, but it will prevent errors if the file ends up missing. For instance, the site's language is set to Russian, but the block doesn't have a Russian translation. You might also want to include an else statement to load a default language file you have created if the site's chosen language is missing.
To keep your block files secure from hackers you are strongly encouraged to include this line at the top of each file just under the <?php
Panels are new in 3.0. The panels system has been implemented to make eFiction more configurable and easier to customize. Panels are used in a number of places throughout the site. Each panel is assigned a type. The following types are defined as part of the basic eFiction site:
A - Admin panels
F - Favorites
S - Submissions
B - Browse
P - Member Profile
U - Member Account
L - Top 10 Lists
Developers and site administrators also have the option of developing their own types of panels.
To modify the panel order, select a panel type from the drop-down list at the top of the page then use the arrows to move the panels up and down in the list. To change panel from hidden to visible, click on the edit option to the right of the panel name.
Click "Add New Panel".
Enter the name of the panel. This should be one word alpha-numeric name used to identify the panel.
Enter the title of the panel. This will be the text displayed on the site for the panel.
Enter a URL to the panel. If no URL is supplied the script will look for a file with the name of the panel in the default location for that panel type. For instance, for the browse panel named "recent", the script looks in the browse folder for a file named recent.php. You will need to supply a URL for panels located outside the default location or if you name the file differently than the panel. An example of this would be the browse panel for the challenges module, the URL is "modules/challenges/browse.php". The file is both outside the default location (the browse/ folder) and also named differently than the panel. The panel is named "challenges", but the file is named "browse.php". Note: Panels are not interchangable. You cannot use a browse panel for a top ten list panel.
The panel level is used to determine who has access to that panel. This is most applicable to the admin and member account panels. In the admin panels the level is the admin level required to access the panel. In the member account panels, it is used to determine whether or not the visitor must be logged in to see the panel. 0 is for visitor access (registration, lost password, login) and 1 is for member access (everything else).
Check the hidden box of you want this panel to be hidden (not displayed in the list of panels).
Finally, enter the one letter code for the panel type. (See the above list)
Click "Submit".
Status | Associated .tpl file | Appears |
0 | Inactive | The block is off. | nowhere |
1 | Active | The block is on. | anywhere |
2 | Index only | index page only. | anywhere on the index page. |
In eFiction 3.0 the site settings have been grouped into sections to make the numerous options easier to manage.
This section of the settings defines general information about your site.
Site Key - You will have defined a site key during installation. DO NOT EDIT IT! If you edit the site key, you will need to manually update the site key information in your config.php file to match or your site will stop functioning.
Site Name - The name of your site. This will be displayed in the title of your site's pages.
Site Slogan - A slogan for your site. This will also be displayed in the title of your site's pages.
Site Url - The URL to your eFiction site. Note: This must be the URL to your eFiction site as the script uses this url in various places including emails sent to your members. It must not be the URL to any parent site.
Table Prefix - The prefix to your database tables. This was also set during installation and should also NEVER be changed or your site will cease to function.
Admin E-mail - The e-mail address used to send and receive e-mails from the site. This must be a valid email address!
Default Skin - The default skin displayed on the site. Note: When you change this as an administrator, your personal skin choice will still appear to you. You will most likely need to log out to see the site default you have chosen.
Language - The langauge the site will display in. The eFiction download comes with the English language files. See Translating eFiction.
This section of the settings defines various submission settings for the site.
Turn off unsolicited submissions - If "yes" is selected, submissions to the site can only be made by administrators through the "Admin" area. If "no" is selected members will have the option of submitting stories via the "Account Info" link.
Automatically validate all stories - If "yes" is selected, stories will automatically be displayed on the site. If "no" is selected, stories will be placed into a validation queue for administrators approval and stories will not appear on the site with this approval.
Co-authors allowed - This is a new feature in 3.0. By choosing "yes", authors will be allowed to mark other members as co-authors of their stories in the submission process. Note that co-authors have the same rights to edit, add to, and delete the story as the author.
Allow round robins - Select "yes" if you wish to allow round robins in your archive.
Allow image uploads- Select "yes" if you wish to allow members to upload images to their account area.
Maximum image size
Maximum image height - The maximum height for image uploads
Maximum image width - The maximum width for image uploads
Stories saved in - The default is "files" on the server. You may also elect to save the text of the stories to the database. This is another setting that should not be altered after the inital setup of the site. Click on the checkbox next to the setting to activate it then use the drop down box to change the setting. Note: If your web server has safe_mode on, you should use the "mysql" option.
Stories path - The path to the folder on the server where your story files will be saved. This should be a relative path and should also not be changed after the initial setup of the archive.
Chapter word count limits - The maximum and minimum allowable word counts for chapters on the site. If you are storing your story text in the database, a maximum word count of 17000 is suggested.
This section of the settings defines various general settings used in multiple areas of the site.
Use tinyMCE WYSIWYG editor - The tinyMCE editor is a javascript text editor that gives limited "word processor" functionality to the textareas of forms. Members also have the option of turning this setting off (if the site administrator has turned it on) in their preferences.
Allowed Tags - The HTML tags that will be allowed in uploaded content (stories, reviews, bios) throughout the site. Note: If you use the tinyMCE editor, it will alter some tags. The <i> tag becomes <em>. The <b> tag becomes <strong>. These tags need to be included in the list for tinyMCE to work properly.
Number of categories - Whether or not your site has multiple categories.
Turn on News Comments - Whether comments are allowed on news stories.
Turn on Action Log - This option allows administrators to keep log of a variety of actions throughout the site.
Maintenance - This setting puts the site into maintenance mode. This prevents visitors from entering the site while the administrator works on it.
Display Debug Information - Turn this setting on will place various pieces of information in HTML comments that will help with fixing problems on the site.
Use captcha confirmation - Turn this setting on to require a security code confirmation at registration and for anonymous input such as challenges and reviews.
This section of the settings defines how various elements of the site are displayed.
Date format - The format dates will be displayed in throughout the site. There are a number of pre-made options or adminstrators may enter a custom option. The date format uses the format of the php date function. Note: the shoutbox date and time format can be selected separately.
Time format - The format time will be displayed in throughout the site. The base eFiction script uses this only in the news items. The time format uses the format of the php date function. Note: the shoutbox date and time format can be selected separately.
Display category path in listings - This setting defines whether or not the "breadcrumb" path to a category's parent category is displayed in the story listings.
Number of columns - The number of columns to display in information in. This will be used for the display of members lists and when browsing classifications, characters, categories, etc.
Default items per page - The number of items to display per page. This will also be the number of items to display per column in multi-column output.
Number of days to limit Most Recent - The number of days to limit the Most Recent list. Leave this empty to impose no limit. When a limit is imposed that limit will also be used for the "New!" indicator on story listings.
Default story sort - The default method of sorting stories.
Use Story Index - This setting defines whether clicking on a story takes the visitor to the story's index (table of contents) or the first chapter. Note: Members may override this setting in their preferences.
Display Profile - This setting defines whether or not the user's profile information appears at the top of every page within the profile or only on the "Profile" tab.
Style of Page links - There are three possible styles of page links.
Next and Previous - A range of pages plus "Next" and "Previous" links.
For Example: Previous 34567 Next
First and Last Pages - A range of pages plus the first and last page.
For Example: 1...34567...10
Both - A range of pages plus both first and last and next and previous links.
For Example: Previous 1...34567...10 Next
Size of Range for Page Links - The number of pages in the range of page links to display. In the examples above, the range was 5 pages (3-7).
This section of the settings defines how reviews are handled.
Turn on reviews - This defines whether or not reviews are allowed at all.
Allow anonymous reviews - This defines whether or not visitors must be logged in to be able to review.
Authors may delete reviews - This defines what reviews (if any) authors may delete for their stories.
Rating system - This is different from the ratings you defined. This rating system allows reviewers to "rate" how much they liked or disliked a story. There are two systems of ratings built into eFiction.
Stars - Five stars (and half stars) ratings
Like/Dislike - Thumbs up/Thumbs down system.
Allow Ratings Only - Defines whether or not reviewers may leave only a rating for a story without a text review.
This section of the settings defines how the site interacts with users for certain things.
Alerts on - Defines whether or not members can receive e-mailed alerts when their favorite stories and authors are updated.
Warning pop-ups only once - Defines whether or not warning pop-ups appear only once for the session or each time the visitor clicks on a story for that rating.
Age statement in user profile - Defines whether or not an age-consent statement appears in the user preferences form. When a user confirms their age via the age-consent form, the warnings for age-restricted stories do not appear to him/her.
Password at Registration - Defines whether the password at registration is user defined or random.
This section defines how e-mails are sent out. If this information is supplied, the e-mail forms will use SMTP.
SMTP Host - The host for the SMTP server.
SMTP Username - The username for the SMTP server.
SMTP Password - The password for the SMTP server.
This section is a list of words that will be forbidden in submissions to the site. They will be disallowed entirely in names and titles. They will be replaced with the first letter and trailing asterisks, a****, in summaries and the text of reviews. Separate each word with a comma. Placing an asterisk before and/or after the word will act as a wildcard making the censor look for the entire word plus the word used as a suffix and/or prefix. For example, 'frog' will only find 'frog', '*frog' will find 'bullfrog' and 'frog' but not 'froglegs', 'frog*' will find both 'frog' and 'froglegs' but not 'bullfrog', '*frog*' will find 'frog', 'bullfrog', and 'froglegs.' To disable the censor simply leave the list of words empty.
The links that follow this header in the settings area are to the default messages for the site. The installation script placed generic text for these messages into the database for you, but you will most likely wish to edit these messages to better reflect your site.
Welcome Message - The welcome message for your site. It is included in your skins using the {welcome} variable.
Copyright Footer - The footer message for your site. It is included in your skins using the {footer}variable.
Print Copyright Notice - This notice will be appended to the story text when the "Printer Version" is selected.
TinyMCE Configuration - If you wish to customize the configuration of the tinyMCE WYSIWYG editor you may enter your configuration information here.
Rejection Letter (default) - The default rejection letter for your site. You will have the option to customize this at the time each letter is sent.
Acceptance Letter (default) - The default acceptance letter for your site. You will have the option to customize this at the time each letter is sent.
content of file: docs/convertingskins.htm
This file is a work in progress. We'll flesh it out later as we all get more expertise with converting 1.1 skins to the 3.0 format.
1. Open a new folder for your converted skin.
2. Open the default.tpl file in the skin you wish to convert. Everything before {output}
transfer into header.tpl in your new folder then enclose it with start and close tags for the header block. A sample header.tpl might look like this.
The {page_id}
variable was new to 2.0. This variable gives you a unique name to use in the css for each page. In the example above it's used as a containing tag.
The {rss}
variable defines where the orange rss image link appears.
The other variable highlighted in yellow is a mod some people had previously installed. If you have previously added the skin change mod change {skinform}
to {skinchange_content}
to include that block. You will also need to activate that block and set it to the correct status in the blocks page in the admin area.
The links highlighted in pink are still available in 3.0. You can convert these links to the new menu block if you wish or leave them as is.
3. From your original default.tpl again, select everything after {output}
and place it in your footer.tpl
The {footer}
variable is the same as in 1.1
The other three variables you see in yellow are new page links added in 2.0.
3. In your new skin folder create a new file called variables.php. As this is a conversion from 1.1 to 2.0 you will want to set some options in the blocks settings.
Technically, this is probably overkill. You will definitely want to set "tpl" to 1 for categories, recent, and featured if your skin uses them. If in the past you used {totalstories}
and {totalauthors}
, activate the info block and set the style to 2. Note that this will also give you {totalmembers}
to include. All of these blocks should be set to a "status" of 1 to include them only on the index page. If your skin doesn't use them, I suggest you set the status to 0. It will make the page load a tiny bit faster, but for busy sites tiny bits will add up.
4. Copy the 1.1 index.tpl skin into your new folder and open it. Locate the point where your header information stops. Delete everything before that and replace it with:
<!-- INCLUDE BLOCK : header -->
Find where your footer information starts and replace everything below it with
<!-- INCLUDE BLOCK : footer -->
We took care of all the blocks except news in the previous step. Find where your news is included in the index.tpl and replace the block with {news_content}
You can also remove {newspageprev}
and {newspagenext}
as those are replaced by the newsarchive link and are included in {news_content}
. To style the news archive link use #newsarchive in your style.css. The #newsarchive id is a div around the archive link.
5. Copy your newsbox.tpl file into the new folder. No changes need to be made to that. Note however that the style will be carried over to the news archive.
6. Open your style.css and style the following elements. The information after the dash is suggested styles to match 1.1 where possible or just general ideas
#pagetitle - text-align: center; font-size: 150%; margin: 1ex;
#alphabet, #pagelinks - text-align: center; margin: 1em;
LABEL - font-weight: bold;
#sort - text-align: center; margin: 1ex; (Sort options on categories.php)
#profile #sort - text-align: right; (Sort options on the viewuser page)
.sectionheader - text-align: center; font-weight: bold; (this is the "Series" and "Stories" sub-headers)
#titleblock - margin: 0 10%; border: 1px solid #000;
(this is the title block at the top of the series and challenges pages when a single series/challenge is listed)
To convert the tabs in the viewuser page from 1.1 to 2.0 you'll need to add the #tabs style group to your style.css. This is the tabs information for the skin in default_tpls. It's a good place to start. 2.0 gives you more options in styling this section of the viewuser page, but this styling will be close to what you previously used in 1.1 with some tweaking. The #active styling is the tab currently active in the window. In 1.1 this would have been the table cell with the background color.
#tabs {
padding: 0;
margin: 0;
clear: both;
border-top: 3px double #000;
border-bottom: 3px double #000;
}
#tabs DIV{
width: 33%;
float: left;
color: #000;
text-align: center;
background: #CCC;
font-size: 11pt;
}
#tabs #centertab {
background: transparent;
border-right: 3px double #000;
border-left: 3px double #000;
width: 98%;
}
#tabs a { color: #000; }
#tabs a:active, a:hover { text-decoration: none; color: #555; }
#tabs #active { background: #555; width: 34%; color: #FFF; }
#tabs #active a { color: #FFF; }
#tabs #active a:active, a:hover { text-decoration: none; color: #555; }
7. The last thing you'll probably need to do is convert your storyblock.tpl. If you wish, you can rely on the default and set the appearance of both the stories and series blocks through your style.css. The default uses the .listbox class with child classes of .title, .tail, .adminoptions, .content, and .classification. You can also use .odd and .even to alternate style of blocks every other one.
/* Formatting for the divs for series and stories. */
.listbox { margin: 0 5%; border: 2px solid #900; margin-bottom: 1em; background: #FFF; background-position: 0 5px;}
.listbox .title { font-weight: bold; padding: 4px; color: #900; border-bottom: 3px double #900;}
.listbox .title a:link { color: #900; text-decoration: underline;}
.listbox .title a:visited { color: #C66; text-decoration: underline;}
.listbox .title a:hover { color: #900; text-decoration: underline overline; }
.listbox .content { padding: 5px; padding-top: 10px; padding-bottom: 10px;}
.listbox .tail, .listbox .respond { border-top: 3px double #900;}
.listbox .classfication { font-weight: bold; }
/* End listbox formatting. */
If you don't want to use the default, I suggest you copy listings.tpl from the default_tpls folder then paste the contents of your storyblock.tpl into the storyblock section then replicate it for the series section. Pay attention to the additional information for the story block. You may now include challenges and series information. There are also adminoptions to be included as well. If you don't use the default you will also need to separately style the challenges block (if you choose to use challenges on your site). Copy challenges.tpl from the default_tpls folder and style it as you wish. Do NOT save it back to default_tpls. Save it to your skin's folder.
That's a basic conversion from 1.1 to 2.0. You can further define other areas of the script such as the title blocks in series and challenges. If you wish to change the look of these areas, copy the applicable .tpl from default_tpls and make your changes. Then save that .tpl to your skin folder NOT back to the default_tpls.
New Page Links in 2.0 |
{tos} | Terms of Service |
{rules} | Submission Rules |
{contactus} | Contact Us |
{featured} | Featured Stories |
{members} | Members |
{series} | Series |
{challenges} | Challenges |
{tens} | The Tens |
Changed from 1.1 |
{authors} | Authors (was members list) |
Content of file: docs/creating_skins.htm
In theory, there is no limit to the number of skins you can create for your site. If you have created skins for eFiction 1.1, you won't find many differences. The number and names of the .tpl files have changed some though. A complete skin will include the following files.
Now, to quote Douglas Adams...Don't Panic! That's the most number of files a skin would use. Most skins will consist of quite a few less. If you install add-on modules, those modules may require additional .tpl files which will be included with the module.
Within the script files is a folder called default_tpls. It includes a very basic complete skin that will be used if for whatever reason your site's default skin or your member's chosen skin are missing. If any of these .tpl files (except for header.tpl and footer.tpl) are missing the script will fall back on the files in the default_tpls folder. Many of the tpl files are generic enough that they can easily be left to the ones in default_tpls and styled using CSS. In addition to the .tpl files you will have a style.css file and optionally, a variables.php file. The variables.php file allows you to override certain universal settings for this skin such as where blocks load and the graphics used for your ratings and featured stories.
A fewimportant things to pay attention to when modifying the template files:
Variables: Items in curly brackets are variables, i.e. {output} or {authors}. This contains the actual content that will be printed out on the page. You can surround these attributes with any kind of html that you want -- font tags, tables, whatever. Some variables are required on some of the template pages and some are optional.
Blocks: These are items that generate multiple instances of content in a loop -- for example, in your index.tpl template file, you only need to indicate where the news items should display on the page with the following:
<!-- INCLUDE BLOCK : newsbox -->
This line is telling the script to include the newsbox.tpl file, and the template files will understand that it should print out several news stories in a loop, with just that one line of code. Another kind of block you may see is the following:
<!-- START BLOCK : categoriesblock -->
Content goes here, which will also include attributes, such as {category} or {description}
<!-- END BLOCK : categoriesblock -->
This is similar to the included block, except that rather than pulling in the block from another file, as in the case of the newsbox.tpl, this one is just defining the block at this very moment. As you read through the individual template file instructions below and look at the actual templates, all of this will make more sense. Block declarations should go on lines by themselves.
Blocks vs. Blocks: The template blocks in the .tpl files are not the same as the blocks you configure in the admin panel. The blocks in the admin panel are "blocks" of code that generate content they place inside template variables. The blocks in the .tpl files are "blocks" of content. While there is some overlap, thinking of them as being separate from each other will help you keep things straight. Each "code block" will generate two "content blocks": {blockname_title} and {blockname_content}. You may or may not include the {blockname_title} variable in your skin. It's up to you. However, using the {blockname_title} in your skin means if you ever want to change the title of the block you only have to do it in one place instead of in each skin. You assign where the block will be assigned to in the admin panel. There are 3 choices:
You may also override these settings for an individual skin by placing information for that block in the variables.php file. More on that later.
The .tpl files do not have some of the usual tags at the beginning, such as <head>
or <title>
. That is because those tags are included in the header file. Most of the template files begin with the header block and end with the footer block except for a couple of the blocks (newsblock.tpl, comments.tpl and listings.tpl)
Using "hooks" various 3rd party and included modules (such as challenges) can add their own variables to these templates. Check the documentation for the modules for specific additions.
Feel free to use the files in the default_tpls/ folder as templates for your own skins. Copy the files into a new skin folder and modify them there. Do not modify the files in default_tpls/ if at all possible. They're often used for diagnostic purposes if the site isn't functioning as expected. Also, you are in no way limited to CSS for the layout of your skins. Feel free to use tables to your heart's content.
This file controls the look of the browse pages (categories, classifications, etc.) The header, footer, and listing blocks are included in this file along with a block for the sort form that is displayed when there are story results. In addition you will want to include two other variables:
You will need to start by including the header block.
<!-- INCLUDE BLOCK : header -->
And end by including the footer block.
<!-- INCLUDE BLOCK : footer -->
{output}
- Miscellaneous information on the pages including the page title.
{otherresults}
- The list of other results (challenges, series, etc.) that fit the criteria for the page.
Within the sort form the following variables are used:
{sortbegin}
- the beginning of the sort menu form
{charactermenu1}
- A list of characters to choose from
{charactermenu2}
- A second list of characters
{classmenu}
- A dropdown list for each of the site's classification types (genres, warnings, etc.)
{ratingmenu}
- A list of ratings
{sortmenu}
- Choose how the stories will be sorted alphabetically or by most recently updated
{completemenu}
- Choose all stories or only completed stories
{sortend}
- the end of the sort menu form
You may include all or none of these and in whatever order you wish, except the {sortbegin} and {sortend} variables must be at the beginning and end of the list of variables in the form.
Sample:
The categories.tpl controls the look of the individual category on the categories browse page. Note: The appearance of the categories block is controlled separately through the block's admin panel.
The block must start with:
<!-- START BLOCK : categoryblock -->
and end with:
<!-- END BLOCK : categoryblock -->
The following variables are available to use in the block:
{image}
- The image associated with that category. Note: The name of the image is set in the Categories admin panel. The image file must be in the skin's directory. If the script can't find the image it will display nothing. (In 1.1 a broken image was displayed.)
{link}
- The link to the category's browse page.
{count}
- The count of stories within that category.
{description}
- The category's description.
Sample:
This block controls the display of comments on the news.php page for a single story.
You must start the file with:
<!-- START BLOCK : commentbox -->
and end it with:
<!-- END BLOCK : commentbox -->
This information should be placed on separate lines. Between these two lines the following variables should be included.
{comment}
- The comment from the member.
{uname}
- The member's name as a hyperlink to their profile.
{date}
- The date the comment was made.
{adminoptions}
- Options visible to the administrator when viewing the page.
The variable {oddeven} is optional, you can use it to assign alternating styles to each comment.
Sample:
The majority of pages use this for their layout. Most likely you won't need to include it in your skin at all.
You must include the header, listings, and footer block as seen below and include the {output} variable BEFORE the listings block. The {output} variable provides various text like the page title and alphabet list for titles. You will probably not need to replicate this file in your skin since there's nothing much to change really.
Sample:
In eFiction 3.0 when favorites are turned on by the admin, members have the option of not only marking a story as a favorite, but also including a comment as to why it is their favorite. The favcomment.tpl us used to display these comments in the user's profile.
The block must start with:
<!-- START BLOCK : comment -->
and end with:
<!-- END BLOCK : comment -->
In addition the following variables can be used within the block:
{comment}
- The member's comment
{commentoptions}
- Options concerning this comment for admin and the person who commented
{oddeven}
- This variable can be used to style alternating comments differently.
Sample:
You must start the file with:
<!-- START BLOCK : footer -->
and end it with:
<!-- END BLOCK : footer -->
In addition to the universal page links, the footer.tpl also has one other variable assigned to it.
{footer}
- Your copyright statement.
Content assigned to the footer in the admin panel or in the skin's variables.php file will also be included here.
Sample:
You must start the file with:
<!-- START BLOCK : header -->
and end it with:
<!-- END BLOCK : header -->
In addition to the universal page links, the header.tpl also has two other variables assigned to it. The use of these variables is optional.
{sitename}
- Your site name
{slogan}
- Your site slogan
Content assigned to the header in the admin panel or in the skin's variables.php file will also be included here.
Sample:
This file controls the look of your site's home/index page.
You will need to start by including the header block.
<!-- INCLUDE BLOCK : header -->
And end by including the footer block.
<!-- INCLUDE BLOCK : footer -->
In addition to the universal page links, the index.tpl also has one other variable assigned to it.
{welcome}
- Your welcome message.
Content assigned to "index only" in the admin panel or in the skin's variables.php file will also be included here. The sample below creates a two column index page via positioning. See the style.css in the default_tpls for the leftindex and rightindex style declarations.
Sample:
This block is included in all pages where stories or series are listed such as titles, categories, user's profile page, search results, etc. It is an expansion of storyblock.tpl from 1.1.
You must start the file with:
<!-- START BLOCK : listings -->
and end it with:
<!-- END BLOCK : listings -->
In addition, the following variable should be included just above the end line:
{pagelinks} - If the results for the page require pagination, this variable will contain the list of page links.
This block contains 2 inner blocks that control the appearance of the individual series and stories.
Both the seriesblock and storyblock should contain the following variables:
{title}
- Title of the story/series
{author}
- Author (Owner if it's an open series) of the story/series
{score}
- The story/series rating by members like/dislike or stars
{reviews}
- A link to the reviews for the story/series
{numreviews}
- the number of reviews linked to a listing of reviews for the story/series
{summary}
- The summary for the story/series
{category}
- The categories for the story/series
{classifications}
- The list of classifications for the story/series (genres, warnings, etc.)
{characters}
- The characters for the story/series
{reportthis}
- A link to report problems, errors, etc. with this story/series
{addtofaves}
- The option to add the story/series to favorites.
{comment}
- Will be used for favorite stories and also in certain reviews pages to display comments and reviews about the story/series
Optional for both seriesblock and storyblock is the variable {oddeven}. This variable can be used to assign "odd" or "even" status to the block for CSS styling.
The seriesblock will have the following additional variables:
{adminoptions}
- Options visible to the admin when viewing the page.
{open}
- Whether or not the series is open to contributions from others (like a round robin)
{parentseries}
- If the series is a sub-series of another, the parent series will be listed here.
{numstories}
- The number of stories within the series.
The storyblock will have the following additional variables:
{adminlinks}
- Options visible to the admin when viewing the page.
{serieslinks}
- If the story is part of a series this will contain a link to those series.
{numchapters}
- The number of chapters in the story.
{completed}
- Whether or not the story is complete.
{wordcount}
- The total number of words in the story (all chapters)
{toc}
- A link to the story's table of contents
{count}
- The count for the number of times the story has been viewed.
{roundrobin}
- If this story is a round robin an icon will be displayed showing this.
{new}
- If the site has set a "recent" date range new or updated stories falling within that range will be flagged a "New!" using this variable.
{featuredstory}
- If the story is listed as a featured story or a retired feature story an icon will be displayed showing this status.
{published}
- The date the story was published.
{updated}
- The date the story was last updated.
Sample:
This block displays one news story, and will be called by the news block and is also used in the news archive page.
You must start the file with:
<!-- START BLOCK : newsbox -->
and end it with:
<!-- END BLOCK : newsbox -->
At a minimum, the following variables should be included in the block.
{newstitle}
- The title of the news story
{newsstory}
- The content of the news story
{newsauthor}
- The author of the news story
{newsdate}
- The date the news item was added to the site
{newscomments}
- The number of comments the story has received with a link to view the comments.
Additionally, if you wish administrator options to appear when an admin views the story you should include:
{adminoptions}
Finally, if you want alternating stories to appear with different CSS options you can include:
{oddeven}
- Where this variable is placed the word "even" will appear in even numbered stories and the word "odd" will appear in odd numbered stories.
Sample:
This template is used when the print story function is used. Generally this is another block that you can probably leave to the default_tpls. The following variables should be included in this template:
{title}
- The title of the story
{author}
- The author(s) of the story
{featuredstory}
- The featured/retired icon will be displayed here if the story is featured.
{summary}
- The summary of the story
{category}
- The story's categories
{characters}
- The story's character list
{classifications}
- The other classification information for the story (genres, warnings, etc.)
{challengelinks}
- The challenges to which this story is a response
{serieslinks}
- The list of series to which this story belongs
{numchapters}
- The number of chapters in the story
{completed}
- Whether or not the story is complete
{wordcount}
- The word count for the story
{count}
- The read count for the story
{published}
- The date the story was published
{updated}
- The date the story was updated
{copyright}
- The print version of the site's copyright notice
{archivedat}
- A statement of where the story is archived at.
In addition to these variables there are several blocks included in this template. The storynotes block will be displayed if the story contains notes. It contains one variable, {storynotes}. The next block should be the storyindexblock. For multi-chapter stories, this will be the table of contents. The storyindexblock will be one chapter's worth of information about the story. The following variables can be included in the storyindexblock:
{title}
- The chapter's title
{author}
- The author of the chapter
{chapternumber}
- The chapter number.
The next block will be the chapter information for each chapter. This block contains blocks inside it for the chapter notes and endnotes. The following variables can be included in the chapterblock:
{chaptertitle}
- The title of the chapter
{chapterauthor}
- The author of the chapter
{chaptertext}
- The text of the chapter
{back2top}
- An anchor back to the top of the document.
The notes block contains a single variable {notes} and the endnotes block contains a single variable {endnotes}. These blocks plus the storynotes block are placed in blocks so that html can be used around the blocks if the information is present and hidden when not.
Sample:
This template is used in the author's profile page. It's been separated out of the user.tpl so that it can be re-used in other panels if needed.
You must start the file with:
<!-- START BLOCK : profile -->
and end it with:
<!-- END BLOCK : profile -->
The following variables can be included in this file:
{realname}
- The member's real name
{userpenname}
- The member's penname
{membersince}
- The date the member joined the site
{userlevel}
- The member's user level Member or Admin (if the person viewing the page is an admin they will see the admin level)
{image}
- The member's image from their bio information
{bio}
- The autor's bio
{authorfields}
- The list of admin defined author fields. i.e. aol, icq, etc.
{adminoptions}
- A list of admin options about the member (visible only to admins)
{reportthis}
- A report this link for the members profile
For each active authorfield, you will also have a variable for that information. For instance, if you've activated the AOL authorfield, the variable {aol} will also output the aol information for the member.
Note: this is for a non-bridged site. If you've bridged your site, the variables available to your profile will depend on how your bridge is set up.
Sample:
This block controls the display of an individual review. It's been separated from the reviews.tpl file so it can be re-used in other panels.
You must start the file with:
<!-- START BLOCK : reviewsblock -->
and end it with:
<!-- END BLOCK : reviewsblock -->
The following variables can be included in this file:
{reviewer}
- The name of the reviewer
{member}
- The words Signed or Anonymous depending on whether the reviewer was a member
{rating}
- The thumbs up/down or star rating the reviewer gave
{reportthis}
- A link to report trouble with this review
{reviewdate}
- The date the review was given
{chapter}
- The title of the item being reviewed (chapter if it's a story and the chapter is named)
{review}
- The text of the review
{adminoptions}
- Admin options for the review
Sample:
This block controls the display of the reviews page. This .tpl includes an inner block that formats the individual reviews on the page. The following variables are included in the reviews.tpl
{pagetitle}
- The title of the page
{output}
- Used for error and confirmation messages. Should probably be included just below {pagetitle}
{jumpmenu}
- Displays the jump menu for reviews pages that require it.
{reviewpagelinks}
- Used for pagination. Should be included AFTER the reviewsblock
{reviewslink}
- Link inviting visitor to submit a review (Optional can use {reviewsform} instead)
{reviewsform}
- The review form. (Optional can use {reviewslink} instead)
You will need to start by including the header block.
<!-- INCLUDE BLOCK : header -->
And end by including the footer block.
<!-- INCLUDE BLOCK : footer -->
Sample:
This template displays the title block information on a series page.
You must start the file with:
<!-- START BLOCK: series -->
and end it with:
<!-- END BLOCK : series -->
The following variables can be included in this file:
{pagetitle}
- This will be the series title and author links
{rating}
- The thumbs up/down or star rating for the series
{summary}
- The series' summary
{category}
- The category information for the series
{characters}
- The characters for the series
{classifications
} - The other classification information for the series (genres, warnings, etc.)
{parentseries}
- If this series has a parent, this will be a link to the parent series
{numstories}
- The number of stories in the series
{open}
- The open status of the series
{adminoptions}
- The admin options for the series
{addtofaves}
- The link to add the series to favorites
{jump}
- The dropdown list of options for the series.
Sample:
This template controls the story index (table of contents) for an individual story.
You will need to start by including the header block.
<!-- INCLUDE BLOCK : header -->
And end by including the footer block.
<!-- INCLUDE BLOCK : footer -->
The following variables may be included in this template:
{title}
- The title of the story
{author}
- The author(s) of the story
{reviews}
- A link to the reviews for the story with the word "Reviews" as text
{numreviews}
- A link to the reviews for the story with the number of reviews as the text
{score}
- The thumbs up/down or star rating for a story
{jumpmenu}
- The dropdown menu of chapters in the story
{featuredstory}
- The featured/retired icon
{summary}
- The summary of the story
{rating}
- The story's content rating
{category}
- The story's categories
{characters}
- The list of characters for the story
{classifications}
- The other classifications for the story (genres, warnings, etc.)
{serieslinks}
- The list of series to which the story belongs
{numchapters}
- The number of chapters in the story
{completed}
- Yes or No depending on the status of the story
{wordcount}
- The total word count for the story
{count}
- The read count for the story
{published}
- The date the story was published
{updated}
- The date the story was last updated
{adminlinks}
- The admin options for the story
{addtofaves}
- The option to add this story to favorites
{roundrobin}
- The option to contribute to the round robin
{jumpmenu2}
- The drop down menu of options concerning the story
{reviewform}
- A form to submit a review of the story
{reviewslink}
- A link to review the story
In addition there are two included blocks. The first is storynotes which includes one variable {storynotes} for the story notes. The second is the storyindexblock. The following information can be included in the storyindexblock for each chapter of the story:
{chapternumber}
- The chapter number
{title}
- The title of the chapter
{author}
- The author of the chapter
{reviews}
- The reviews link for reviews for that chapter
{numreviews}
- The number of reviews that chapter has received
{ratingpics}
- The thumbs up/down or star rating for that chapter
{wordcount}
- The word count for that chapter
{chapternotes}
- The chapter notes for that chapter (end notes are not displayed)
{adminoptions}
- Admin options for that chapter
Sample:
This page displays the user profile page.
You will need to start by including the header block.
<!-- INCLUDE BLOCK : header -->
And end by including the footer block.
<!-- INCLUDE BLOCK : footer -->
In addition you will want to include the profile block as well.
<!-- INCLUDE BLOCK : profile -->
The user.tpl file includes one other block used to form the "tabs" for the profile panels. You can build these tabs any way you wish. The sample below places them inside a div with each individual tab as a span. Another idea is to use an unordered list. Within this block you can use the following variables:
{class}
- The class for that "tab" used to differentiate the current/active tab from the inactive tabs.
{link}
- The link to the tab
{count}
- The count of items in the tab (may be empty)
{linkcount}
- The link to the tab with the count of items in the tab included in the link
In addition to these blocks, the following variables can be included:
{adminoptions}
- Options regarding this member's account
{sort}
- Gives the sort for when displaying the user's stories.
{output}
- Used for various messages and errors in panels.
Sample:
This page displays the story/chapter text.
You will need to start by including the header block.
<!-- INCLUDE BLOCK : header -->
And end by including the footer block.
<!-- INCLUDE BLOCK : footer -->
Three included blocks are used to display the story notes, chapter notes, and chapter end notes.
In addition, the following variables may be included:
{title}
- The title of the story
{author}
- The author(s) of the story
{reviews}
- A link to the reviews for the story with the word "Reviews" as text
{numreviews}
- A link to the reviews for the story with the number of reviews as the text
{score}
- The thumbs up/down or star rating for a story
{jumpmenu}
- The dropdown menu of chapters in the story
{featuredstory}
- The featured/retired icon
{summary}
- The summary of the story
{rating}
- The story's content rating
{category}
- The story's categories
{characters}
- The list of characters for the story
{classifications}
- The other classifications for the story (genres, warnings, etc.)
{serieslinks}
- The list of series to which the story belongs
{numchapters}
- The number of chapters in the story
{completed}
- Yes or No depending on the status of the story
{wordcount}
- The total word count for the story
{count}
- The read count for the story
{published}
- The date the story was published
{updated}
- The date the story was last updated
{adminlinks}
- The admin options for the story
{addtofaves}
- The option to add this story to favorites
{roundrobin}
- The option to contribute to the round robin
{jumpmenu2}
- The drop down menu of options concerning the story
{reviewform}
- A form to submit a review of the story
{reviewslink}
- A link to review the story
Sample:
.tpl file
Related pages
browse.tpl
Browse Pages
categories.tpl
Browse Categories
comments.tpl
News
default.tpl
Most pages
favcomment.tpl
Favorites Lists
footer.tpl
All pages
header.tpl
All pages
index.tpl
Index
listings.tpl
Any page listing stories or series
newsbox.tpl
News & news block
printstory.tpl
View Story (Printable)
profile.tpl
User Profile
reviewblock.tpl
Reviews
reviews.tpl
Reviews
series_title.tpl
View Series
storyindex.tpl
Story Table of Contents
user.tpl
User Profile/Info
viewstory.tpl
View Story
Status
Associated .tpl file
Inactive
The block is off.
Active
The block is on. Can appear on every page.
Index Only
Appears on the index page only.