Description: This will display a "View Profile" link to the account menu in user.php, which will take your users to their author profile page.

Backup your files and database before you begin this or any other mod!

Requirements: eFiction 2.0

Difficulty: Easy

Modification History:
June 23, 2006 -- Released Modification
November 30, 2006 -- Updated, forgot a step

Files Involved:

  • user.php
  • languages/en.php

Instructions:

 

 

 

 

 

 

Open up user.php

Line 1, look for this:

PHP:
  1. <?php

PHP:
  1. // Mod: View Profile Link --------------------------------------------

 

 

Look for this section (begins at about line 133 as of the 6/4/06 patch):

PHP:
  1. function main( ) {
  2.     global $tableprefix, $submissionsoff, $imageupload, $reviewsallowed, $favorites, $level;

After $level, but before the closing semi-colon (;), add this:

PHP:
  1. , $useruid

 

 

Look for this: (Line 145)

PHP:
  1. $output .= "<div id=\"pagetitle\">"._USERACCOUNT."</div>
  2.         <div class=\"tblborder\" style=\"padding: 5px; width: 200px; margin: 0 auto;\">";
  3.     if(!$submissionsoff || $level)
  4.     {
  5.         $output .= "<a href=\"stories.php?action=newstory\">"._ADDNEWSTORY."</a><br />
  6.             <a href=\"stories.php?action=viewstories\">"._MANAGESTORIES."</a><br /> 
  7.             <a href=\"series.php?action=add\">"._ADDSERIES."</a><br />
  8.             <a href=\"series.php?action=manage\">"._MANAGESERIES."</a><br />";
  9.     }
  10.     $output .= "<a href=\"user.php?action=editbio\">"._EDITPERSONAL."</a><br />";
  11.     if($imageupload && !$submissionsoff)
  12.         $output .= "<a href=\"user.php?action=manageimages\">"._MANAGEIMAGES."</a><br />";
  13.     if($reviewsallowed)
  14.         $output .= "<a href=\"user.php?action=viewreviews\">"._VIEWREVIEWS."</a><br />";
  15.     if($favorites)
  16.         $output .= "<a href=\"user.php?action=manfaves\">"._MANAGEFAVORITES."</a><br />";   
  17.     $output .= "<a href=\"user.php?action=stats\">"._STATS."</a><br /><a href=\"user.php?action=logout\">"._LOGOUT."</a><br />";
  18.     $output .= "</div>";
  19.     return $output;
  20. }
  21. // end main function

Inside that, look for this:

PHP:
  1. $output .= "<a href=\"user.php?action=editbio\">"._EDITPERSONAL."</a><br />";

Between the end of the line break tag (br /) and the end of the line (";), add this:

PHP:
  1. <a href=\"viewuser.php?uid=$useruid\">"._VIEWPROFILE."</a><br />

 

 

 

 

 

 

Open languages/en.php (or your language)

At the bottom of the file, look for this:

PHP:
  1. ?>

Add this:

PHP:
  1. // View Profile Link Mod
  2. define ("_VIEWPROFILE", "View Profile");

 

 

Save, upload, and enjoy! ^_^

Responses are currently closed, but you can trackback from your own site.

Comments are closed.