News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Want themes for guests one type and member another type (by default).

Started by tanawat, February 21, 2018, 08:09:15 AM

Previous topic - Next topic

Kindred

Сл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."

Sir Osis of Liver

I believe you can do that by setting guest theme as default, and changing id_theme in smf_members table to member theme for all members.

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

                                     - R. Waters

Kindred

That would only work for existing members then....  it would not affect any members who joined after the direct database 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."

Sir Osis of Liver

Yes, you're right.  Would require a code edit to select different guest theme.  Will look for it when I have time.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

Load.php



// Load a theme, by ID.
function loadTheme($id_theme = 0, $initialize = true)
{
global $user_info, $user_settings, $board_info, $sc, $boarddir;
global $txt, $boardurl, $scripturl, $mbname, $modSettings, $language;
global $context, $settings, $options, $sourcedir, $ssi_theme, $smcFunc;

if ($user_info['is_guest'])
$id_theme = 7;

// The theme was specified by parameter.



This will cause default theme to be loaded for all logged in members, guests will see id_theme = 7, which is Core in this example.  Substitute id_theme for the theme you want guests to see.

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

                                     - R. Waters

tanawat

 :) Thanks a lot Sir Osis of Liver

For me It is useful

if i use responsive theme, when user use mobile they not seen register button. Thus i set " default theme curve " for them.
And set  responsive theme for member.  :D

SaltedWeb

There is a mod called split forum, you could theoretically use and have one forum theme for it.
but that would not allow the same topics to be viewed as it would be like two separate sites.
Unless that what you wanted, as you could have that forum only seen by guest theoretically I have not tried it myself but believe there are settings to accomplish that  .
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

Advertisement: