Simple Machines Community Forum

Customizing SMF => Bridges and Integrations => Topic started by: SaltedWeb on November 27, 2017, 02:26:02 PM

Title: Is there a way to remove the login boxes on Forum so will only be seen on portal
Post by: SaltedWeb on November 27, 2017, 02:26:02 PM
Is there a way to remove the login boxes on Forum so will only be seen on portal?

I am wondering is there a way to remove the log in boxes on the forum?
I realize it will not remove those two lines login and register typed and I am ok with that.
But to make the forum look more clean I would like the Login/reg to be on the portal front only and
not have a redundant one on the forum?

Just a note I am not looking to disable bots, or anyone else that may find registration, guest login or otherwise.
Just the two boxes the Login button and the words under saying " Login with username, password and session length "

Yes I realize the other register and login type will remain, this is purely for aesthetics, so one entering portal and then access the
forum does not see the boxes and entries as mentioned.  i realize also those logged in wont see them obviously however I will
have some specific areas guest will see on the forum so wanting to remove the redundancy and only have the login show on the portal.
So looking for specifically where in SMF those could be removed.

Hope this makes sense . Thanks.

SW
Title: Re: Is there a way to remove the login boxes on Forum so will only be seen on portal
Post by: vbgamer45 on November 27, 2017, 02:55:24 PM
You would have to edit the template's index.template.php and remove the code
Title: Re: Is there a way to remove the login boxes on Forum so will only be seen on portal
Post by: SaltedWeb on November 27, 2017, 03:11:10 PM
That just it, :-) not sure what the code is for it?
Title: Re: Is there a way to remove the login boxes on Forum so will only be seen on portal
Post by: vbgamer45 on November 27, 2017, 03:13:14 PM
It depends on theme you just have to take the content of the login form out <form> to </form>
Title: Re: Is there a way to remove the login boxes on Forum so will only be seen on portal
Post by: SaltedWeb on November 27, 2017, 04:20:48 PM
Ok appears to be this below. I found the area you mentioned thank you looks like its working.


<form id="guest_form" action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
               <div class="info">', $txt['login_or_register'], '</div>
               <input type="text" name="user" size="10" class="input_text" />
               <input type="password" name="passwrd" size="10" class="input_password" />
               <select name="cookielength">
                  <option value="60">', $txt['one_hour'], '</option>
                  <option value="1440">', $txt['one_day'], '</option>
                  <option value="10080">', $txt['one_week'], '</option>
                  <option value="43200">', $txt['one_month'], '</option>
                  <option value="-1" selected="selected">', $txt['forever'], '</option>
               </select>
               <input type="submit" value="', $txt['login'], '" class="button_submit" /><br />
               <div class="info">', $txt['quick_login_dec'], '</div>';

         if (!empty($modSettings['enableOpenID']))
            echo'
               <br /><input type="text" name="openid_identifier" id="openid_url" size="25" class="input_text openid_login" />';

         echo '
               <input type="hidden" name="hash_passwrd" value="" />
            </form>
Title: Re: Is there a way to remove the login boxes on Forum so will only be seen on portal
Post by: vbgamer45 on November 27, 2017, 04:42:14 PM
Yes that would do it.
Title: Re: Is there a way to remove the login boxes on Forum so will only be seen on portal
Post by: Wallo on January 20, 2018, 07:16:56 PM
Hi:
Did you only remove code from theme's BoardIndex.template.php or did you move it somewhere else?

I would like to do the same.
Thanks
Title: Re: Is there a way to remove the login boxes on Forum so will only be seen on portal
Post by: vbgamer45 on January 20, 2018, 07:30:45 PM
It would be in index.template.php