I just noticed this, but when viewing someone's profile on a site bridged with SMF, the links for Contact, Private Message, and Add Author to Favorites doesn't work for members added after the bridge. For the older members I have in the database from before bridging the site, it works like it should. Here are a couple of links. Just hover your mouse over then and check the status bar to see what I mean.
Old Member (Working)
http://www.devianthearts.com/viewuser.php?uid=10
Newer Member (Not Working)
http://www.devianthearts.com/viewuser.php?uid=1154
Of course, I'm not sure if that is really the issue, but at first glance, that's what it seems like to me.
Info is in my Sig:
I just noticed my site and another site I just set up are doing this too. It's pulling the member information not from the usertables for SMF, but from the old efic usertables.
It does this in numerous instances. The ones I've found so far are reviews--it says it's anonymous, but anonymous is a link leading to the right profile. Also, editing a story as an admin. First off it does not have the correct author automatically highlighted, and second, it only has old members. Any new members after the bridge was added are missing from the list.
the urls to my sites are: http://timeturner.net/fics and http://gtreloaded.net.
Anybody have any idea where to even start fixing this? I looked at the files in the bridge and I couldn't figure it out but since the problem is universal, I feel like it must be in one of those files. I think I could figure it out if I knew where to start.
I have this problem too, but I think it's also doing the same thing where stories, chapters or series are added as the uid in the database is saved as 0 when ever anyone adds. though it works when done from the Admin page.
___________
EDIT: I have found out why the links for Contact, Private Message, Add Author to Favorites, and Lock Account, doesn't work for members added after the bridge.
it's because profile.php pulls the SMF's members table and eFiction's authorprefs table and saves it in an $userinfo array and tries to use $userinfo['uid'] as the uid in the links, witch is from the authorprefs table and it only has data if the user has edited their preferences.
first few lines in profile.php:
<?php
// Build the user's profile information
if(!defined("_CHARSET")) exit( );
if(file_exists("languages/{$language}_SMF.php")) include("languages/{$language}_SMF.php");
else include("languages/en_SMF.php");
$tpl->newBlock("profile");
$result2 = dbquery("SELECT * FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_authorprefs as ap ON ap.uid = "._UIDFIELD." WHERE "._UIDFIELD." = '$uid' LIMIT 1");
$userinfo = dbassoc($result2);
$userinfo['uid'] = $userinfo['ID_MEMBER']; // added this to fix links
$nameinfo = "";
I've found simply adding:
$userinfo['uid'] = $userinfo['ID_MEMBER'];
after: $userinfo = dbassoc($result2);
fixes this problem
now I just got to find out if this is whats happening in other places.
Worked for me. Did you find out if it was happening elsewhere?
yeah I found in get_session_vars.php that it was trying to use just the efic uid & penname. and not the ones from SMF.
at about line 30 is where they are defined, but I'm not really sure how it works with old efic users, as I had just installed both of them, so I didn't have any users in efic tables, so I just changed them to the smf tables, but I'm not sure but I'm guessing something like this should work for those that have old efic users.
replace:
define("USERUID", $userdata['uid']);
define("USERPENNAME", $userdata['penname']);
with:
if (!empty($userdata['uid']) {
define("USERUID", $userdata['uid']);
define("USERPENNAME", $userdata['penname']);
} else {
define("USERUID", $userdata['ID_MEMBER']);
define("USERPENNAME", $userdata['realName']);
}
this fixed my problem with signed anonymous reviews, and the problem with stuff not being added right.
yeah I found in get_session_vars.php that it was trying to use just the efic uid & penname. and not the ones from SMF.
No it's not. Look at the query again.
$userdata = dbassoc(dbquery("SELECT "._UIDFIELD." as uid, "._PENNAMEFIELD." as penname, "._EMAILFIELD." as email, "._PASSWORDFIELD." as password, ap.* FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_authorprefs as ap ON ap.uid = "._UIDFIELD." WHERE "._UIDFIELD." = '".$_COOKIE[$sitekey."_useruid"]."'"));
It's calling the SMF data and giving it the name of the efiction data.
URL to your eFiction: http://www.escape-ism.com/ourstories
Version of eFiction: 3.3 (NEW)
Have you bridged eFiction, if so with what?: SMF 1.1.3[ TinyPortal v0.9.8] (OLD) (Using included SMF Bridge)
Version of PHP: 5.2.3
Version of MySQL: 5.0.24a
Have you searched for your problem: Yes. Repeatedly.
If so, what terms did you try: Every Word that I could think of related to anonymous reviews, anonymous signed reviews, anonymous signed comments, and SMF bridge related problems.
State the nature of your problem:
Reviews by registered members comes back as " Guest Reader (Anonymous) Signed"
This must jave been a result of installing the smf bridge - but I have no clue to to adress this problem.
For an example, see: http://www.escape-ism.com/ourstories/reviews.php?type=ST&item=2
Apologies in advance if this has already been addressed. I have searched and found threads where the problem was mentioned in passing - but not directly addressed. Was a solution ever found?
no I meant this part of the SMF get_session_vars.php,
this starts at line 25 for me.
if($ID_MEMBER) {
$eficdata = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorprefs as ap RIGHT JOIN "._AUTHORTABLE." ON ap.uid = "._UIDFIELD." WHERE "._UIDFIELD." = '$ID_MEMBER'");
if(dbnumrows($eficdata)) {
$userdata = dbassoc($eficdata);
if($userdata['level'] != "-1") {
define("USERUID", $userdata['ID_MEMBER']); //changed to fix
define("USERPENNAME", $userdata['realName']); //changed to fix
if(!isset($_SESSION[$sitekey."_skin"]) && !empty($userdata['userskin'])) $siteskin = $userdata['userskin'];
else if(isset($_SESSION[$sitekey."_skin"])) $siteskin = $_SESSION[$sitekey."_skin"];
else $siteskin = $defaultskin;
define("uLEVEL", $userdata['level']);
define("isADMIN", uLEVEL > 0 ? true : false);
define("isMEMBER", true);
if(!isset($_SESSION[$sitekey."_agecontsent"])) $ageconsent = $userdata['ageconsent'];
else $ageconsent = $_SESSION[$sitekey."_agecontsent"];
}
}
}
Just a question: were your members logged in when they posted the review?
Jacynthe
Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP: 5.3.3
MySQL: 5.0.91-community
I saw this on my vBulletin bridge, which is based off of the SMF code.
I had to change a line in get_session_variables.php to the following
define("USERPENNAME", $vbulletin->userinfo['username']);
I am not sure if this is a similar problem or not. This code will not work with SMF, but it gives a place to look π
@ Jacynthe - Yes they were - and oddly enough if one clicks the Guest Reader link... it actually links to the profile of the person who posted the review.
@Calash - I'll try your suggestion and see if it works π
Thanks so much Calash!
For anyone else having this issue, this is what worked for me:
in get_session_variables.php, find both instances of:
define("USERPENNAME", $userdata['penname']);
and REPLACE with:
define("USERPENNAME", $userdata['realName']);
This was reported along with some similar problems in the bugs forum. I'm glad you found the solution!
I'm going to merge the two threads.
Okay, you guys are probably more familiar with SMF than I am, but shouldn't it be memberName not realName?