URL to your eFiction: http://www.pokegirl.org/fiction
Version of eFiction: 3.3
Have you bridged eFiction, if so with what?: Yes, php-fusion
Version of PHP: 5.2.3
Version of MySQL: 5.0.27-standard-log
Have you searched for your problem: Yes
If so, what terms did you try: php-fusion bridge "Undefined variable: skin"
Have you looked at the FAQs: Yes, but 3.0 bridging is not listed.
State the nature of your problem: Users Other Than Admin Skin problem with Bridge
I have created a brand new install of php-fusion and then in a sub folder installed Fiction. Installed the bridge as per instructions.
Log in as admin and then link to the eFiction site - everything is just fine.
Log out and then go to the eFiction site. No themes.
Register in php-fusion, and go to eFiction site. Still no themes.
Log in a admin, see the themes, switch on debug information and then go back in as no user and as a registered user to find the following errors:
Notice: Undefined variable: skin in /home/shadowta/public_html/pokegirl/fiction/includes/class.TemplatePower.inc.php on line 146
Notice: Undefined variable: skin in /home/shadowta/public_html/pokegirl/fiction/includes/class.TemplatePower.inc.php on line 146
Notice: Undefined index: header in /home/shadowta/public_html/pokegirl/fiction/includes/class.TemplatePower.inc.php on line 701
Notice: Undefined index: header in /home/shadowta/public_html/pokegirl/fiction/includes/class.TemplatePower.inc.php on line 701
Notice: Undefined index: in /home/shadowta/public_html/pokegirl/fiction/includes/class.TemplatePower.inc.php on line 701
Notice: Undefined index: header in /home/shadowta/public_html/pokegirl/fiction/includes/class.TemplatePower.inc.php on line 706
Notice: Undefined index: header in /home/shadowta/public_html/pokegirl/fiction/includes/class.TemplatePower.inc.php on line 713
Notice: Undefined index: footer in /home/shadowta/public_html/pokegirl/fiction/includes/class.TemplatePower.inc.php on line 701
Notice: Undefined index: footer in /home/shadowta/public_html/pokegirl/fiction/includes/class.TemplatePower.inc.php on line 701
Notice: Undefined index: in /home/shadowta/public_html/pokegirl/fiction/includes/class.TemplatePower.inc.php on line 701
Notice: Undefined index: footer in /home/shadowta/public_html/pokegirl/fiction/includes/class.TemplatePower.inc.php on line 706
Notice: Undefined index: footer in /home/shadowta/public_html/pokegirl/fiction/includes/class.TemplatePower.inc.php on line 713
Notice: Undefined variable: siteskin in /home/shadowta/public_html/pokegirl/fiction/blocks/skinchange/skinchange.php on line 40
Notice: Undefined variable: siteskin in /home/shadowta/public_html/pokegirl/fiction/blocks/skinchange/skinchange.php on line 40
Notice: Undefined variable: siteskin in /home/shadowta/public_html/pokegirl/fiction/blocks/skinchange/skinchange.php on line 40
Just to double check, I checked Tammy's demo site: http://efiction.hugosnebula.com/news.php and then clicked on the "3.0 Demo", and it appears that the same problem exists in the demo.
Any clues on how to get this to work?
Thanks,
Paul
I'm not sure how this has fixed it, but I added a news article into php-fusion (as admin), and then the eFiction skins started to work. π
I'm not complaining, but huh?
Did you turn debug off? Those are notice warnings. They will show up when debug is on, but won't normally.
Ah, no I haven't, but thanks for reminding me to switch it off! π
Did you set a default skin? I didn't see one when I clicked on your page but once I typed in:
http://www.pokegirl.org/fiction/index.php?skin=Zenlike
I could see a skin.
******************************************
Mucking around in eFiction since circa 2001 (ver. 1.0)
Now running v.3
I don't know... Isn't Zenlike the default? I haven't touched that setting.
Although now I'm back home, I've noticed that it has reverted back to being skinless, so I'm wondering if it was because I changed the skin as admin.
Let me try that... yup!
Okay, so I log in as Admin, change my theme (not the site default, just the drop down on the home page).
Log out and go back into eFiction - hey presto it's remembered my theme. Thereafter themes work.
I clear my cookies and cache, reload, and hey presto, themes disappear.
I've tried changing the default theme, but it has no effect.
I'm going to change this from solved to not solved as it was me jumping the gun. π
Make sure that the skin you want as the default, isn't set to Hidden in your admin panel. The Skins link in your admin panel is to hide skins that regular members can't see. Admins can, and they can select them.
Whoever said nothing is impossible never tried slamming a revolving door.
url: https://www.potionsandsnitches.org/fanfiction
php: 7.4.33 msql: 5.6.51-community GPL
efic version: 3.5.5 latest patches: yes
bridges: none mods: challenges, tracker, story end, beta, word
Right, I've just checked, and none of the three skins were hidden.
Is there anything that I may have missed on the bridge to php-fusion? eFiction works just fine without the bridge.
*** update:
I've narrowed it down to the PHPSESSID cookie is what holds the theme setting.
As a wild stab in the dark, I also tried have to the skins with the same name on php-fusion as well as eFiction to see if it would work, but no.
SOLVED!!!
Okay, the problem is with the bridge - the includes/get_session_vars.php is missing the lines to set the default skin.
I've added in the missing lines and marked them below:
if(!defined("_CHARSET")) exit( );
// Get session variables from cookie data if not logged in.
if (isset($_COOKIE['fusion_user']) && !defined("isMEMBER")) {
$cookie_vars = explode(".", $_COOKIE['fusion_user']);
$cookie_1 = preg_match("/^[0-9]+$/", $cookie_vars['0']) ? $cookie_vars['0'] : "0";
$cookie_2 = (preg_match("/^[0-9a-z]{32}$/", $cookie_vars['1']) ? $cookie_vars['1'] : "");
$userdata = dbassoc(dbquery("SELECT * FROM ("._AUTHORTABLE.", ".TABLEPREFIX."fanfiction_authorprefs as ap) WHERE "._UIDFIELD." = '$cookie_1' AND "._PASSWORDFIELD." ='$cookie_2' AND "._UIDFIELD." = ap.uid"));
if($userdata) {
define("USERUID", $userdata['user_name']);
define("USERPENNAME", $userdata['penname']);
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"];
if (empty($_COOKIE['fusion_lastvisit']))
setcookie("fusion_lastvisit", $userdata['user_lastvisit'], time() + 3600, "/", "", "0");
}
}
if(!defined("USERUID")) define("USERUID", false);
if(!defined("USERPENNAME")) define("USERPENNAME", false);
if(!defined("uLEVEL")) define("uLEVEL", 0);
if(!defined("isMEMBER")) define("isMEMBER", false);
if(!defined("isADMIN")) define("isADMIN", false);
if(empty($siteskin)) $siteskin = $defaultskin;
I hope this helps other people.
~ Foz