Page 1 of 1

[SOLVED] Major FEU / CustomContent problems

Posted: Tue Jul 28, 2009 10:14 pm
by Garamond
Hi all,

I'm having quite big problems with FEU and CustomContent modules. I hope someone can help me. In page template I have following:

Code: Select all

{if $customcontent_loggedin > 0}
	{content}
{else}
	{cms_module module=FrontEndUsers  nocaptcha="1"}
{/if}
Now, when I try to login in front end, it logs me in, but doesn't show the actual content. Also it won't logout the user, no matter how I hit the logout-link and actually no links (forgot password etc.) works in login form either.

All FEU forms are left with default templates. With debug turned on it prints the following error code before the login form:
Notice: Undefined index: customcontent_loggedin in /home/.../tmp/templates_c/%%76^763^76313DB0%%tpl_body%3A22.php on line 49
System info:

Code: Select all


Cms Version: [b]1.5.4[/b]

Installed Modules:

    * CMSMailer: [b]1.73.14[/b]
    * FileManager: [b]0.4.5[/b]
    * MenuManager: [b]1.5.3[/b]
    * ModuleManager: [b]1.2.1[/b]
    * News: [b]2.9.3[/b]
    * nuSOAP: [b]1.0.1[/b]
    * Printing: [b]0.2.6[/b]
    * Search: [b]1.5.3[/b]
    * ThemeManager: [b]1.1.0[/b]
    * CGExtensions: [b]1.15.3[/b]
    * CGFeedMaker: [b]1.0.4[/b]
    * NMS: [b]2.2.2[/b]
    * Polls: [b]0.2.0[/b]
    * AjaxMadeSimple: [b]0.1.6[/b]
    * CodeMirror: [b]0.1.1[/b]
    * FrontEndUsers: [b]1.6.7[/b]
    * FormBuilder: [b]0.5.11[/b]
    * CustomContent: [b]1.5.3[/b]
    * Captcha: [b]0.4[/b]


Config Information:

    * php_memory_limit: [b][/b]
    * process_whole_template: [b]false[/b]
    * max_upload_size: [b]150000000[/b]
    * default_upload_permission: [b]664[/b]
    * assume_mod_rewrite: [b]true[/b]
    * page_extension: [b][/b]
    * internal_pretty_urls: [b]false[/b]
    * use_hierarchy: [b]false[/b]


Php Information:

    * phpversion: [b]5.2.9[/b]
    * md5_function: [b]Päällä[/b] (Tosi)
    * gd_version: [b]2[/b]
    * tempnam_function: [b]Päällä[/b] (Tosi)
    * magic_quotes_runtime: [b]Pois[/b] (Epätosi)
    * memory_limit: [b]64M[/b]
    * max_execution_time: [b]30[/b]
    * safe_mode: [b]Pois[/b] (Epätosi)
    * session_save_path: [b]/tmp[/b] (1777)


Server Information:

    * Server Api: [b]cgi[/b]
    * Server Db Type: [b]MySQL (mysql)[/b]
    * Server Db Version: [b]5.0.81[/b]

I'm afraid to upgrade the CMS yet as it's got so major changes lately.
I've tried everything I can, but nothing seems to do any good, please help!

Re: Major FEU / CustomContent problems

Posted: Tue Jul 28, 2009 10:46 pm
by Jeff
One, try $ccuser->loggedin()(IIRC check the documentation) instead of $customcontent_loggedin

Also make sure you have caching turned of for the pages using that template.

Re: Major FEU / CustomContent problems

Posted: Wed Jul 29, 2009 1:17 am
by JeremyBASS
ajprog  is right it's

$ccuser->loggedin()

but if all your doing is checking if a user is loged in there is a cheaper way to do it... put


{assign var=userids value=$gCms->modules.FrontEndUsers.object->LoggedinId()}
{assign var=username value=$gCms->modules.FrontEndUsers.object->GetUserName($userids)}

at the top...

and check like this

{if $userids != ''}
{content}
{else}
{cms_module module=FrontEndUsers  nocaptcha="1"}
{/if}

that works and you save some db querys to... read the wiki and smarty man, there are tons of way to skin this cat.  Hope this helps.

Cheers
Jeremy

Re: Major FEU / CustomContent problems

Posted: Wed Jul 29, 2009 7:35 pm
by Garamond
Thank you guys! I tried that $ccuser->loggedin() and it worked. I thought I had tried it already as its in the documentation, but I guess I misspelled it then. So I was trying that older method that worked fine in another installation.

Well anyway it works now thanks to you :)