FrontEndUsers and CustomContent module help!

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
wms
Forum Members
Forum Members
Posts: 204
Joined: Mon Feb 13, 2006 7:26 pm

Re: FrontEndUsers and CustomContent module help!

Post by wms »

I get this error now:

Catchable fatal error: Object of class stdClass could not be converted to string in E:\web\public_html\wms\linkprotection\plugins\function.get_template_vars.php on line 27

???
alby

Re: FrontEndUsers and CustomContent module help!

Post by alby »

wms wrote: I get this error now:

Catchable fatal error: Object of class stdClass could not be converted to string in E:\web\public_html\wms\linkprotection\plugins\function.get_template_vars.php on line 27
In get_template_vars there is a problem with php 5.2.x
Look at for fix here

Alby
wms
Forum Members
Forum Members
Posts: 204
Joined: Mon Feb 13, 2006 7:26 pm

Re: FrontEndUsers and CustomContent module help!

Post by wms »

I really sorry....but how do I edit the get_template_vars tag?
alby

Re: FrontEndUsers and CustomContent module help!

Post by alby »

wms wrote: I really sorry....but how do I edit the get_template_vars tag?
With con notepad or wordpad (if M$) or, from thread, today calguy1000 has update the file.
Backup and download as text

Alby
wms
Forum Members
Forum Members
Posts: 204
Joined: Mon Feb 13, 2006 7:26 pm

Re: FrontEndUsers and CustomContent module help!

Post by wms »

I've edited the file.

I'm not sure what I'm looking for now ???

These are the two links I need the two logins for: 

Client Access: http://linkprotection.ca/index.php?page=client-access&hl=en
Employee Access: http://linkprotection.ca/index.php?page=employee-access&hl=en

I need to get this going by next week.  The client is expecting to launch the live site soon.  Any help would be great.

Thanks,
alby

Re: FrontEndUsers and CustomContent module help!

Post by alby »

wms wrote: I'm not sure what I'm looking for now ???

These are the two links I need the two logins for: 
Client Access: http://linkprotection.ca/index.php?page=client-access&hl=en
Employee Access: http://linkprotection.ca/index.php?page=employee-access&hl=en
There is a error:

Code: Select all

Fatal error: Call to undefined method FrontEndUsers::_GetUserLoginForm() in E:\web\public_html\wms\linkprotection\modules\FrontEndUsers\action.do_login.php on line 43
get_template_vars is a tag for variables debug.
You can to check if values of:
customcontent_loggedin
customcontent_memberof_employees
customcontent_memberof_client
are correct or not

Alby
wms
Forum Members
Forum Members
Posts: 204
Joined: Mon Feb 13, 2006 7:26 pm

Re: FrontEndUsers and CustomContent module help!

Post by wms »

I don't see that error.  This is what I get when I log into client-access:

Code: Select all

Welcome client

Sign out

Change My Settings
SCRIPT_NAME = /index.php
app_name = CMS
sitename = Link Protection Management
lang =
encoding = UTF-8
content_id = 24
page = client-access
page_id = client-access
page_name = client-access
page_alias = client-access
position = 00010
friendly_position = 10
startform =

label = Search
inputbox =
submitbutton =
hidden =
endform =

count = 17
nodelist = Array
node = Object
prompt_loggedin = Welcome
userid = 1
username = client
link_logout = Sign out
link_changesettings = Change My Settings
When I select the employee-access page, this is what I get:

Code: Select all

Welcome client

Sign out

Change My Settings
SCRIPT_NAME = /index.php
app_name = CMS
sitename = Link Protection Management
lang =
encoding = UTF-8
content_id = 25
page = employee-access
page_id = employee-access
page_name = employee-access
page_alias = employee-access
position = 00011
friendly_position = 11
startform =

label = Search
inputbox =
submitbutton =
hidden =
endform =

count = 17
nodelist = Array
node = Object
prompt_loggedin = Welcome
userid = 1
username = client
link_logout = Sign out
link_changesettings = Change My Settings
I still don't know why this isn't working.  Any ideas?

Thanks for your help,
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: FrontEndUsers and CustomContent module help!

Post by calguy1000 »

I was able to get the above code to work with no difficulties.  However, this code works better :)

Code: Select all

{assign var='showcontent' value='1'}
{if $customcontent_loggedin > 0}
   {if $customcontent_memberof_group1 > 0}
     {assign var='showcontent' value='0'}
      {content block='group1-content'}
   {elseif $customcontent_memberof_group2 > 0}
      {assign var='showcontent' value='0'}
      {content block='group2-content'}
   {/if}
{/if}
{if $showcontent == 1}
       {* public content *}
       {content}
{/if}
Remember, that smarty variable names are case sensitive..... so if you're using $customcontent_memberof_group2, your group name has to be 'group2', not 'Group2'
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: FrontEndUsers and CustomContent module help!

Post by calguy1000 »

wms:  I don't think you have the customcontent module installed.  You need that to access the $customcontent_ variables

Here's (some of) what I get when I do a {get_template_vars} in my template:

Code: Select all

customcontent = 1
customcontent_loggedin = 583
customcontent_ip = 192.168.10.11
customcontent_loginname = test02
customcontent_memberof_import_test = 1
customcontent_groups = import_test
customcontent_groupcount = 1
customcontent_dayzeros = 18
customcontent_day3text = Wed
customcontent_day = 18
customcontent_weekday = Wednesday
customcontent_dayordsuffix = th
customcontent_dayofweek = 3
customcontent_dayofyear = 107
customcontent_weeknum = 16
customcontent_monthfulltext = April
customcontent_monthnumzeros = 04
customcontent_monthshorttext = Apr
customcontent_monthnum = 4
customcontent_monthnumdays = 30
customcontent_leapyear = 0
customcontent_4digityear = 2007
customcontent_2digityear = 07
customcontent_lowerampm = am
customcontent_upperampm = AM
custoncontent_inettime = 725
customcontent_12hour = 10
customcontent_24hour = 10
customcontent_12hourzeros = 10
customcontent_24hourzeros = 10
customcontent_minutes = 25
customcontent_seconds = 18
customcontent_timezone = MDT
customcontent_date = Wed, 18 Apr 2007 10:25:18 -0600
customcontent_epochseconds = 1176913518
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
wms
Forum Members
Forum Members
Posts: 204
Joined: Mon Feb 13, 2006 7:26 pm

Re: FrontEndUsers and CustomContent module help!

Post by wms »

Hmmm...weird....I'll uninstall and reinstall the module.

Thanks for your help.

I'll let you know if that works.
wms
Forum Members
Forum Members
Posts: 204
Joined: Mon Feb 13, 2006 7:26 pm

Re: FrontEndUsers and CustomContent module help!

Post by wms »

Well, that didn't work.

I got a round about solution though.  I'm using two different templates for the two login pages [instead of the two using a common login template].  In each template I have:

Employee:

Code: Select all

{cms_module module=CustomContent}
<!--customContent: startif group=employee -->
          {content}
<!--customContent: else -->
<p>You must be logged in to view the content of this page.</p>
{cms_module module=FrontEndUsers}
<!--customContent: endif -->
Client:

Code: Select all

{cms_module module=CustomContent}
<!--customContent: startif group=client -->
          {content}
<!--customContent: else -->
<p>You must be logged in to view the content of this page.  Please e-mail the <a href="mailto:info@linkprotection.ca">info@linkprotection.ca</a> to receive a username.</p>
{cms_module module=FrontEndUsers}
<!--customContent: endif -->
Not sure why your solution didn't work.  When I logged in as client, and select the employee page, I see the client content and vice versa for the employee login.  But what I did with the two templates will work.

Thanks for all the time everyone spent on this.
Post Reply

Return to “CMSMS Core”