Guest TrueCHoJiN Posted August 4, 2006 Share Posted August 4, 2006 I would like to move the {SESSION} var from ../global/index.tpl to ../boxes/categories.tpl, is it possible??? I tried adding the code: include("includes/boxes/session.inc.php"); $body->assign("SESSION",$box_content); from index.php to categories.inc.php, but I get the error: Fatal error: Call to a member function assign() on a non-object in C:\Program Files\xampp\htdocs\millerdavis\includes\boxes\categories.inc.php on line 62 I'm sure it's not exatly right, but I have to be close. I'm thinking something in this area needs to be changed: $body->assign("SESSION",$box_content); to somethin like..?? $box_content->assign("SESSION",$?????_html); Quote Link to comment Share on other sites More sharing options...
markscarts Posted August 8, 2006 Share Posted August 8, 2006 Hi, I had seen this yesterday, but no time to reply as you are not quite on the right track. If everyone who wants me to respond to their post sends a PM, I'll have so many PM's I may not care to visit the forums I can add sessions into a category menu by editing skin files, and no need to get into the core files . . . But if I wanted to do this, I would move the code from session.inc.php to categories.inc.php and have it parsed in boxes/categories.tpl Quote Link to comment Share on other sites More sharing options...
Guest TrueCHoJiN Posted August 8, 2006 Share Posted August 8, 2006 If everyone who wants me to respond to their post sends a PM, I'll have so many PM's I may not care to visit the forums Sorry 'bout that got overly anxious, and I DO appreciate the help I've copied the code from boxes/session.inc.php: if($ccUserData[0]['customer_id']>0){ $box_content->assign("LANG_WELCOME_BACK",$lang['front']['boxes']['welcome_back']); $box_content->assign("TXT_USERNAME",$ccUserData[0]['firstName']." ".$ccUserData[0]['lastName']); $box_content->assign("LANG_LOGOUT",$lang['front']['boxes']['logout']); $box_content->assign("LANG_YOUR_ACCOUNT",$lang['front']['boxes']['your_account']); $box_content->parse("session.session_true"); } else { $box_content->assign("LANG_WELCOME_GUEST",$lang['front']['boxes']['welcome_guest']); $box_content->assign("VAL_SELF",base64_encode(currentPage())); $box_content->assign("LANG_LOGIN",$lang['front']['boxes']['login']); $box_content->assign("LANG_REGISTER",$lang['front']['boxes']['register']); $box_content->parse("session.session_false"); } to boxes/categories.inc.php: Yet I'm still trying to place {SESSION} inside categories.tpl and/or place the entire code from session.tpl into categories.tpl. After that and moving the include code, neither produce anything remarkable The whole deal of just making some new LANG assignments shouldn't be a big deal, it is just the TRUE and FALSE feature of the session.tpl file that I'm trying to keep is what's tripping me up. That is why I was just trying to move the {SESSION} var over, just trying to keep things simple and clean, while retaining session.tpl's functionality. But now I see you can't just move it over because the main var's are different from the box var's? So I guess I still don't know why when I moved the code (minus the "new" & "parse") from session.inc.php to categories.inc.php, it still wouldn't work? SIDE NOTE: (I'm using CC 3.0.11) includes/session.inc.php - (inside the file it says): | session.php | ======================================== | Core Session Management includes/boxes/session.inc.php - (inside the file it says): | session.inc.php | ======================================== | Session Links & Welcome Text Is the first one a typo, or a wrongly named file? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.