// ---------------------------------------------------------------------- // Copyright 2005 - 2006 by Sally Anderson and Jasson Knight. // Developer URI: http://www.lunaescence.com // // LICENSE // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License (GPL) // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- ------------------------------------------ [*] INTRODUCTION ------------------------------------------ Block Name: Logged In Content 2.5 Block URI: http://www.lunaescence.com Description: When you're logged in, it returns "Welcome back, $username." and then a list of quick account links below that. I usually put it beside the login tag so they switch places depending on the user's login status. This is actually the first mod I made for eFiction 2.0 and it originally went with the Marauders layout. However, when I discovered blocks weren't considered part of the skins, I ended up keeping it for myself. Requirements: eFiction 2.0, with all current patches ------------------------------------------ [*] MODIFICATION HISTORY ------------------------------------------ December 14, 2005: Mod Released EDIT: I'm currently moving my domain, so the current link could be broken at any time now. I'll edit this post once I'm done to give the new location. EDIT #2: Fixed the download link. June 23, 2006: I finally figured out how to make a link to the logged in user's profile. Rather than update the original, I simply made a second version. What this second version will do is link the $username part of the welcome message with that person's profile. You might have to alter some file names if you want to run both versions on your site. July 08, 2006: Moved the download location slightly to make room for eFiction 3.0 stuff a little later. November 27, 2006: Released version 2.5 for beta testing ------------------------------------------ [*] FILES INCLUDED :: loggedin_v3.zip ------------------------------------------ LOGGED_IN_BLOCK_README.txt loggedin/ loggedin/admin.php loggedin/en.php loggedin/init.php loggedin/loggedin.php ------------------------------------------ [*] INSTALLATION INSTRUCTIONS ------------------------------------------ 1.) Unzip loggedin_v2_5.zip with a .zip file utility like Winzip or Winrar 2.) Create a directory inside your BLOCKS directory called "loggedin". 3.) Upload ALL .php files to this directory 4.) Using your Web browser, go to your eFiction site and log in. 5.) Go to your admin area 6.) Go to the blocks menu and scroll down until you see "loggedin" and click "Initialize Block" next to it. The block is now installed. 7.) Finally, add {loggedin_content} to every eFiction skin where you want this block to appear. ------------------------------------------ [*] CUSTOMIZING ------------------------------------------ This block has two settings, DEFAULT and CUSTOM. - DEFAULT will give you the original loggedin block: Welcome back, Penname. Your Account | Your Stats | Logout - CUSTOM will allow you to customize the block the way you want, including the welcome message, DIV tags, styles, and even what appears. Penname Display: {usr_penname} -- Will return the logged in person's penname with a link to their profile. {usr_name} -- Will return the logged in person's penname. Account Links: {usr_account} -- Your Account {usr_stats} -- Your Stats {usr_submit} -- Submit Story * {usr_series} -- Add Series * {usr_manage} -- Your Stories * {usr_manseries} -- Your Series * {usr_reviews} -- Your Reviews ** {usr_favorites} -- Your Favorites *** {usr_editprofile} -- Edit Profile {usr_images} -- Your Images **** {usr_logout} -- Logout PLEASE NOTE: This block DOES NOT check to see if your users have permission to use certain functions. If you use a link variable that you don't normally allow, the link will still appear. * Stories and Series links require "Unsolicited Submissions" to be set to "No" in order to work. ** Reviews must be allowed for this link to work. *** Favorites must be allowed for this link to work **** Image Uploads must be allowed for this link to work. ------------------------------------------ [*] CUSTOMIZING PER SKIN ------------------------------------------ Files Needed: variables.php This skin may also be customized per skin via variables.php, which should be included with all your skins. This file basically does the same thing you do in the admin area, except it allows you to customize blocks per skin rather than for the entire site. If you have multiple skins, you will need to do this in each one. ---------------------------- FUNCTION: To turn this block ON ---------------------------- $blocks["loggedin"]["status"] = '1'; ---------------------------- FUNCTION: To turn this block OFF ---------------------------- $blocks["loggedin"]["status"] = '0'; ---------------------------- FUNCTION: To make this block appear on the INDEX ONLY ---------------------------- $blocks["loggedin"]["status"] = '2'; ---------------------------- FUNCTION: Set this block to display DEFAULT style ---------------------------- $blocks["loggedin"]["style"] = '0'; ---------------------------- FUNCTION: Set this block to display CUSTOM style from admin area ---------------------------- $blocks["loggedin"]["style"] = '1'; ---------------------------- FUNCTION: Set this block to display CUSTOM style, but define skin specific content. ---------------------------- $blocks["loggedin"]["style"] = '2'; $blocks["loggedin"]["template"] = "Insert your custom logged in content here using the template tags from above. Be sure to "escape" any quotation marks with a single backslash ( \ ) or else you'll get an error."; ---------------------------- EXAMPLE: This is the full variables.php code for this block from my personal copy of Shinigami Blue. ---------------------------- // Logged in block $blocks["loggedin"]["status"] = '1'; $blocks["loggedin"]["style"] = '2'; $blocks["loggedin"]["template"] = "