SMF 2.0.14 Please login or register doesn't disappear after user logs in

Started by Mammoth, October 13, 2017, 02:35:07 PM

Previous topic - Next topic

Mammoth

Hi everyone, great community you got here. As a n00b, I require some help from some of the more experienced members of this community. My problem is that after I login as a member to my forum, the login window doesn't disappear. I am use the core 2.0 theme which apparently is not compatible with SMF 2.0.14. Any possible solution for this problem? Your help is highly appreciated.

Url for my forum: hxxp:mammoth.business [nonactive]


Illori

attach your index.template.php file to your next post. it looks like some edit went wrong.

Mammoth

Hey, thanks for your reply. I have attached the index.template.php file.

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

aegersz

I'm just having a wild guess but could it be caused by a cookie issue ?

I'm probably wrong of course but I'm just wondering... it's a strange problem !

I'm also wondering why you don't use the nicer curve theme? I wonder if your symptoms change if you do ...
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Mammoth

It's possible that the problem is caused by cookies or sessions but I could not find any working solution to my issue. I like my theme and wouldn't want to change it. If anyone knows a possible solution, please post it so that I can try it. Thanks

Sir Osis of Liver

The user info block and header login are both in index.template.php, and your file works correctly in a clean 2.0.14 install.  Which one is shown depends on value of $context['user']['is_logged'], should be one or the other.  Would be interesting to see what the value is. 

Try this -



function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

echo '$context[\'user\'][\'is_logged\'] = ' . $context['user']['is_logged'];

echo '
<div id="mainframe"', !empty($settings['forum_width']) ? ' style="width: ' . $settings['forum_width'] . '"' : '', '>


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Mammoth

Quote from: Sir Osis of Liver on October 20, 2017, 01:16:59 PM
The user info block and header login are both in index.template.php, and your file works correctly in a clean 2.0.14 install.  Which one is shown depends on value of $context['user']['is_logged'], should be one or the other.  Would be interesting to see what the value is. 

Try this -



function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

echo '$context[\'user\'][\'is_logged\'] = ' . $context['user']['is_logged'];

echo '
<div id="mainframe"', !empty($settings['forum_width']) ? ' style="width: ' . $settings['forum_width'] . '"' : '', '>




Hi, thanks for your reply. I've tried the code above and it still doesn't work.

Sir Osis of Liver

That code should display the value of '$context['user']['is_logged'] at top left of main index.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Mammoth

Quote from: Sir Osis of Liver on October 28, 2017, 11:35:19 PM
That code should display the value of '$context['user']['is_logged'] at top left of main index.


It did, but the login boxes were still there after login.

Illori

this does not change the login box, it adds text above the header that you need to post so we can figure out what the issue is.

Sir Osis of Liver

You should see '$context['user']['is_logged'] = ' above forum header left side.  What value is displayed?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: