Close the login/Hello box by default

Started by Zsolteey, November 19, 2015, 04:09:06 PM

Previous topic - Next topic

Zsolteey

Hi,

I have an SMF forum and i want to the hello/login box would be closed by default.
Hello/login box is the top box where the quick search and news panel is exists and these text
Hello Zsolteey
Show unread posts since last visit.
Show new replies to your posts.


If I click the little up arrow on the top right side this box is closing. I want this closed style by default.
How can I achieve that? Are there any settings in the admin to do that or which file and how should I edit?

Thank you!

Sincerely
Zsolteey.

Kindred

no, there are no settings in the admin for that. You would need to make a code edit....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Zsolteey

Quote from: Kindred on November 19, 2015, 04:18:30 PM
no, there are no settings in the admin for that. You would need to make a code edit....

Okay. Can you explain how to do that?

Sir Osis of Liver

If you want it collapsed by default for logged in members -

index.template.php



bCurrentlyCollapsed: ', empty($options['collapse_header']) ? 'true' : 'false', ',



If you also want it collapsed for guests -



bUseCookie: ', $context['user']['is_guest'] ? 'false' : 'true', ',


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

                                     - R. Waters

Zsolteey

Quote from: Sir Osis of Liver on November 19, 2015, 04:31:16 PM
If you want it collapsed by default for logged in members -

index.template.php



bCurrentlyCollapsed: ', empty($options['collapse_header']) ? 'true' : 'false', ',



If you also want it collapsed for guests -



bUseCookie: ', $context['user']['is_guest'] ? 'false' : 'true', ',



I tried it with no luck :(
I forget to say I'm using SMF 2.0.11.

Kindred

well, it would have no effect if you have already SET it yourself...   the code change just sets the default state if it has not been specifically chosen already and set in your cookie.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Zsolteey

Quote from: Kindred on November 19, 2015, 04:56:53 PM
well, it would have no effect if you have already SET it yourself...   the code change just sets the default state if it has not been specifically chosen already and set in your cookie.

I changed the index.template.php and I opened a new inprivate Chrome tab. So there was no previous cookie.

Zsolteey

Quote from: Sir Osis of Liver on November 19, 2015, 04:31:16 PM
If you want it collapsed by default for logged in members -

index.template.php



bCurrentlyCollapsed: ', empty($options['collapse_header']) ? 'true' : 'false', ',



If you also want it collapsed for guests -



bUseCookie: ', $context['user']['is_guest'] ? 'false' : 'true', ',



I tried all the options (true-true, false-false, true-false, false-true) but nothing changed at all.

I'm using Tinyportal frontend. Maybe it has effect for this settings?

Zsolteey

Quote from: Kindred on November 19, 2015, 04:56:53 PM
well, it would have no effect if you have already SET it yourself...   the code change just sets the default state if it has not been specifically chosen already and set in your cookie.

Ohhh, I find it.
I changed the default\index.template.php but I have theme installed and I have to change the code in the themefolder\index.template.php.

Now it works as I expected :)

Thank you for the help!

Advertisement: