Jump to content

New {SESSION} var?


Guest TrueCHoJiN

Recommended Posts

Guest TrueCHoJiN

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);

Link to comment
Share on other sites

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 ;):D

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

Link to comment
Share on other sites

Guest TrueCHoJiN

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 :):D

Sorry 'bout that :rolleyes: got overly anxious, and I DO appreciate the help :D

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 :D

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...