Last Visit Mod 11:19 pm Tags: eFiction, eFiction 3.0, last visit, modification, Web Design Mood: na Description: Displays the last date your users visited your eFiction site. As always my line numbers are approximate and meant to put you in the general ballpark. They will likely change as you progress through the mod. Backup your files and database before you begin this or any other mod! Requirements: eFiction 3.2 or later Difficulty: Easy Mod History: - 27 February, 2007, Marohi added mod to Test site, bug checking begins - 1 March, 2007, Posted to eFiction forums - 2 March, 2007, Fixed cookie issue, added language to en.php, changed mysql_query to dbquery Files Involved: user/login.php user/profile.php includes/get_session_vars.php languages/en.php skins/YOUR SKIN/profile.tpl database modification Modification & Support Link: eFiction.org Instructions: Database Modifications FOR NEW INSTALL: For this mod, you will need to alter your database. If you skip this step, THIS WILL NOT WORK! FOR 2.0 UPGRADE: If you had Seiji's eFiction 2.0 last visit mod installed, you should be able to skip this step. General Information (for phpMyAdmin, etc.) Table: fanfiction_authors Field: lastlog Datatype: DATETIME Null: Not Null SQL Query: PLAIN TEXT MySQL: ALTER TABLE `fanfiction_authors` ADD `lastlog` DATETIME NOT NULL ; Open: user/login.php Line 1, look for this: PLAIN TEXT PHP: assign("userpenname", $userinfo['penname']." ".$nameinfo); After that, add this: PLAIN TEXT PHP: if (date("$dateformat", $userinfo['lastlog']) == date("$dateformat", mktime(0, 0, 0, 0, 0, 0000))) $tpl->assign("lastlog", ""._UNAVAILABLE.""); else $tpl->assign("lastlog", date("$dateformat", $userinfo['lastlog'])); Open: languages/en.php (Or your language file) At the end of the file, look for this PLAIN TEXT PHP: ?> BEFORE that, add this: PLAIN TEXT PHP: // Last Visit Mod define ("_UNAVAILABLE", "Unavailable"); Finally, add {lastlog} to profile.tpl where you want it to appear. Save, upload, and enjoy!