Currently I have this saved as profile.php in the main directory
<?php
require_once('config.php');
session_start();
$dir = dirname($_SERVER['PHP_SELF']);
if($dir == '/') $dir = '';
header('Location: http://'.$_SERVER ['HTTP_HOST'].$dir.'/viewuser.php?uid='.$_SESSION[$sitekey.'_useruid']);
exit;
?>
It no longer works in the 3.3.1 update. I have a feeling a variable was changed, but tracking down variables is not quick work, so I ask here. i have a feeling its the _userid variable or the $_Server string. I'm more inclined to think its the former one. Thanks.
Ps, the concept is a basic redirect. it takes the userid and takes you to that profile. Surely a better way can be made, but this is fine for the time being.
Say, I just noticed that {search} gives you the url to the search page, could {profile} or {userid} go to your profile page?
http://fanforge.net/profile.php is the page and it gives a lovely error message. (this has the change Tammy, thankfully, offered)
edit: apparently http://www.something.com/folder/viewuser.php now works so if anyone else wants this, its built in. Makes this mod meaningless to update. What remains is the other mod mentioned here not sticking, my install is so faulty x_x
I am rebuilding efiction! Join us on irc! #efiction at
I know I have that in a block I installed and modified accordingly. It's the loggedin block and the loggedin.php file says this
<?php
global $noskin;
$penname = USERPENNAME;
$authorquery = mysql_query("SELECT COUNT(*) as totalm FROM ".tableprefix."fanfiction_authors");
$authorresult = mysql_fetch_array($authorquery);
if(isMEMBER) $content .= "<table width=100% cellpadding=5 border=0><tr><td align=left><div class="quicklinks">Welcome back. You are logged in as <b>$penname</b>.</div></td>
<td align=right><div class="quicklinks"><a href=""user.php"" title="Your Account">Your Account</a> | <a href=""viewuser.php"" title="Your Profile">View Your Profile</a> | <a href=""user.php?action=stats"" title="Your Stats">Your Stats</a> | <a href=""user.php?action=logout"" title="Log Out">Log Out</a></div></td></tr></table>";
if(!$blocks["loggedin"]["style"]) $content .= " ";
?>
You can view what it does on http://fanfics.suethomasfbeye.net/ logging in with the user: test and password: test
Note that this is not a test site, but a live installation. π
Jacynthe
Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP: 5.3.3
MySQL: 5.0.91-community
Change $sitekey to SITEKEY.
ah eh errored heh, wasn't enough, but thanks
says something about line 2 like a file doesn't exist
http://fanforge.net/profile.php
I am rebuilding efiction! Join us on irc! #efiction at
I almost got that to work, not sure its been updated to 3.* yet. It won't stay initialized so its hard to test. Thanks tho.
I am rebuilding efiction! Join us on irc! #efiction at
create a init.php file for that block as well and put that inside:
<?php
$blocks["loggedin"] = array("title" => "User Info", "status" => "0", "file" => "loggedin/loggedin.php");
?>
Jacynthe
Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP: 5.3.3
MySQL: 5.0.91-community
ah cool, yeah i also realized i didn't update the variables.php file, so together it may work, brb
-nope that wasn't very different from the init file i had before, still not sticking.
I am rebuilding efiction! Join us on irc! #efiction at
Since this is not sticking and I seem to remember reading about your skins not sticking (??)... I am wondering if maybe it's not a cookies issue you're having.
Jacynthe
Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP: 5.3.3
MySQL: 5.0.91-community
I'll try IE *sigh* hehe, but nice question, time to test. No change, but here's an error and the files for you.
Warning: Cannot use a scalar value as an array in /home/.marget/itanshi/fanforge.net/admin/blocks.php on line 57
Warning: Cannot use a scalar value as an array in /home/.marget/itanshi/fanforge.net/admin/blocks.php on line 58
Warning: Invalid argument supplied for foreach() in /home/.marget/itanshi/fanforge.net/admin/blocks.php on line 32
http://www.fanforge.net/loggedin.zip the rest of the files with a readme
I am rebuilding efiction! Join us on irc! #efiction at
First of all, I don'r know why you have an admin.php file in the loggedin folder but there seems to be some errors in it when compared to other blocks... I myself only have loggedin.php and init.php in my loggedin folder (inside blocks).
In your skin variables.php, you also made a mistake
$blocks["loggedin"] = 1;
when it should be
$blocks["loggedin"]["status"] = 1;
You had it right in the default_tpls variables.php but since the skin variables.php overrides the other one.. may have been part of the problem.
Jacynthe
Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP: 5.3.3
MySQL: 5.0.91-community
That fixed the error, but the 'no stick' issue persisted again.
I am rebuilding efiction! Join us on irc! #efiction at
Okay I registered for an account on your site so I could see what it does and I'm not sure where I'm supposed to look. My guess would have been on top, where the previous log in thingie was, but as soon as you are logged in, that disappears and nothing appears there so... no go.
By the way, did you know that you sometimes get logged out while browsing? I clicked on search and was logged off your site so had to relog myself in again. That's not a normal behavior...
Jacynthe
Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP: 5.3.3
MySQL: 5.0.91-community
Well, i do find myself logged off when i go back from time to time. Should i make you an admin?
I am rebuilding efiction! Join us on irc! #efiction at
I don't think being an admin is necessary. π
Silly question but can you put in here the codes inside the *.tpl file you put the {loggedin_content}? Like for me, I put that in header.tpl - and since I use tables in my skin design, my header looks like this:
<!-- START BLOCK : header -->
<body>
<div id="{page_id}">
<table width="773" border="0" cellspacing="0" cellpadding="0" align="center" class="section" height="95%">
<tr><td valign="top" height="225"><img src=""{skindir}/images/loc_header.jpg"" width="773" height="225"></td></tr>
<tr><td>
<table width="773" border="0" cellspacing="0" cellpadding="0"><tr><td class="sectioncontent">{login_content}{loggedin_content}</td></tr></table>
</td></tr>
<tr><td align="center" class="menu">{menu_content}<br /></td></tr>
<tr><td align="center" class="menu2"><b>Browse by</b>: {recent} | {authors} | {catslink} | {titles} | {series} | {challenges} <br /><br /></td></tr>
<tr><td class="sectioncontent">
<!-- END BLOCK : header -->
Jacynthe
Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP: 5.3.3
MySQL: 5.0.91-community
In your admin panel, in the blocks section... It does say that the loggedin block is active right? Because I looked at the source code and it just doesn't do jack once you are logged in. The content doesn't get added at all!
Jacynthe
Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP: 5.3.3
MySQL: 5.0.91-community
