Author Topic: Removing/Changing items from the top  (Read 782 times)

0 Members and 1 Guest are viewing this topic.

Offline GhostRider2110

  • V.I.P.
  • *
  • Posts: 45
  • Karma: 130
  • Gender: Male
    • U.S. Scale Masters Association Midwest Region Web Site
  • SMF Version: 1.1.14/2.0
Removing/Changing items from the top
« on: February 17, 2010, 03:54:19 PM »
Ok, I have searched, found info.. tried it and failed...

Site up smf 2.0 RC2
PortaMX
Using curve theme...

The two areas circled in black I want to modify... The search box totally remove and
change the "Please login or register" I want to change to something else as well...

Can't seem to find where to do this...

Any help would be greatly appreciated...

See-ya
--Mitch
« Last Edit: March 04, 2010, 05:48:35 PM by bigguy »
Mitchell Baker AMA 7548 GSWA WB251 10th AF USSMA 358
Webmaster Terre Haute R/C Club http://www.thrcc.org
Scale Master Midwest Manager http://www.ussma-midwest.org
Proud member of 1/8th AirForce http://www.oneeighthairforce.org
CoffeeCup Ambassador Get 20% Off checkout code: 226STS www.getcoffeecup.com

Offline AST3R1X

  • V.I.P.
  • *
  • Posts: 1210
  • Karma: 1002
  • Gender: Male
    • Demon Pixels
  • SMF Version: SMF 2.0 Gold
Re: Removing/Changing items from the top
« Reply #1 on: February 17, 2010, 05:51:03 PM »
The login or register is on the index.template about line 215 look for
:
<div class="info">', $txt['login_or_register'], '</div>

The search box is lower down starting about line 240 look for
:
<form id="search_form" style="margin: 0;" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
                    <input type="text" name="search" value="" class="input_text" />&nbsp;
                    <input type="submit" name="submit" value="', $txt['search'], '" class="button_submit" />
                    <input type="hidden" name="advanced" value="0" />';

        // Search within current topic?
        if (!empty($context['current_topic']))
            echo '
                    <input type="hidden" name="topic" value="', $context['current_topic'], '" />';
            // If we're on a certain board, limit it to this board ;).
        elseif (!empty($context['current_board']))
            echo '
                    <input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';

        echo '</form>';

Offline GhostRider2110

  • V.I.P.
  • *
  • Posts: 45
  • Karma: 130
  • Gender: Male
    • U.S. Scale Masters Association Midwest Region Web Site
  • SMF Version: 1.1.14/2.0
Re: Removing/Changing items from the top
« Reply #2 on: February 18, 2010, 09:38:24 AM »
Thanks AST3R1X...

I think I have some other problem somewhere...  Here is what I did:

Via admin interface I copied the default theme to new theme oeafv1.  I then proceeded to make the changes you stated. ...  I first was tried commenting out the big block.

:

      echo '
         </div>
         <div class="news normaltext">
/*
            <form id="search_form" style="margin: 0;" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
               <input type="text" name="search" value="" class="input_text" />&nbsp;
               <input type="submit" name="submit" value="', $txt['search'], '" class="button_submit" />
               <input type="hidden" name="advanced" value="0" />';

      // Search within current topic?
      if (!empty($context['current_topic']))
         echo '
               <input type="hidden" name="topic" value="', $context['current_topic'], '" />';
         // If we're on a certain board, limit it to this board ;).
      elseif (!empty($context['current_board']))
         echo '
               <input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';

      echo '</form>';
*/
      // Show a random news item? (or you could pick one from news_lines...)
      if (!empty($settings['enable_news']))

This I did by logging into my host and editing the file Themes/oeafv1/index.template.php.  Well that didn't do anything...  So I tried to just remove the complete block via the Admin interface, Modify Themes, selecting index.template.php in oeafv1.  At this point I just deleted the complete block of code... Well when I saved it I got the following:

:
The file you tried to save generated the following error:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in index.template.php on line 243
[code]

Well the really confused me, so I put the text back into the file, saved... same thing.. Ok, so I remove the comment markers.. saved, still same thing... Hmmm very strange... so I aborted it all.  Back to where I was when I made the copy of the theme...  brought up the file in Modify Themes, and tried to save without making any changes... I get the same error...  Ok, maybe problem in original file... I go to default theme, modify index.template.php... no changes, just save.. and no error.  Baffleing... At this point, I just copy that index.template.php over to oeafv1 theme dir.. Now I should have a copy of that same one... Bring it up in Modify Themes... make no change, click save.. and what do you know??? I get the error again?????  I am totally confused at this point..    :hlp ???

--Mitch
Mitchell Baker AMA 7548 GSWA WB251 10th AF USSMA 358
Webmaster Terre Haute R/C Club http://www.thrcc.org
Scale Master Midwest Manager http://www.ussma-midwest.org
Proud member of 1/8th AirForce http://www.oneeighthairforce.org
CoffeeCup Ambassador Get 20% Off checkout code: 226STS www.getcoffeecup.com

Offline AST3R1X

  • V.I.P.
  • *
  • Posts: 1210
  • Karma: 1002
  • Gender: Male
    • Demon Pixels
  • SMF Version: SMF 2.0 Gold
Re: Removing/Changing items from the top
« Reply #3 on: February 20, 2010, 03:11:41 PM »
Try removing the following Mitch
:
{
            echo '
                <script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
                <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>';
        }

Offline GhostRider2110

  • V.I.P.
  • *
  • Posts: 45
  • Karma: 130
  • Gender: Male
    • U.S. Scale Masters Association Midwest Region Web Site
  • SMF Version: 1.1.14/2.0
Re: Removing/Changing items from the top
« Reply #4 on: March 02, 2010, 02:32:24 PM »
Note to self... "Make sure you are editing the CURRENT theme..."

I have half of what I wanted, thanks AST3R1X.  I am still trying to remove the search box.

The left side now reads what I want it to, only asking for member logins, and no link to register. 

Almost there... Thanks again AST3R1X.

See-ya
Mitch
Mitchell Baker AMA 7548 GSWA WB251 10th AF USSMA 358
Webmaster Terre Haute R/C Club http://www.thrcc.org
Scale Master Midwest Manager http://www.ussma-midwest.org
Proud member of 1/8th AirForce http://www.oneeighthairforce.org
CoffeeCup Ambassador Get 20% Off checkout code: 226STS www.getcoffeecup.com

Offline GhostRider2110

  • V.I.P.
  • *
  • Posts: 45
  • Karma: 130
  • Gender: Male
    • U.S. Scale Masters Association Midwest Region Web Site
  • SMF Version: 1.1.14/2.0
Re: Removing/Changing items from the top
« Reply #5 on: March 04, 2010, 12:06:54 PM »
Ok, I found a way to display, or not display what I was looking for...  I changed the default toggle setting for the header...

Changed this:
:
// Define the upper_section toggle in JavaScript.
        echo '
                <script type="text/javascript"><!-- // --><![CDATA[
                        var oMainHeaderToggle = new smc_Toggle({
                                bToggleEnabled: true,
                                bCurrentlyCollapsed: ', empty($options['collapse_header']) ? 'false' : 'true', ',
                                aSwappableContainers: [
                                        \'upper_section\'
                                ],
                                aSwapImages: [
                                        {
                                                sId: \'upshrink\',
                                                srcExpanded: smf_images_url   \'/upshrink.png\',
                                                altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
                                                srcCollapsed: smf_images_url   \'/upshrink2.png\',
                                                altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
                                        }
                                ],
                                oThemeOptions: {
                                        bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
                                        sOptionName: \'collapse_header\',
                                        sSessionVar: ', JavaScriptEscape($context['session_var']), ',
                                        sSessionId: ', JavaScriptEscape($context['session_id']), '
                                },
                                oCookieOptions: {
                                        bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
                                        sCookieName: \'upshrink\'
                                }
                        });
                // ]]></script>';

to this:

:
// Define the upper_section toggle in JavaScript.
        echo '
                <script type="text/javascript"><!-- // --><![CDATA[
                        var oMainHeaderToggle = new smc_Toggle({
                                bToggleEnabled: true,
                                bCurrentlyCollapsed: ', empty($options['collapse_header']) ? 'true' : 'false', ',
                                aSwappableContainers: [
                                        \'upper_section\'
                                ],
                                aSwapImages: [
                                        {
                                                sId: \'upshrink\',
                                                srcExpanded: smf_images_url   \'/upshrink.png\',
                                                altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
                                                srcCollapsed: smf_images_url   \'/upshrink2.png\',
                                                altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
                                        }
                                ],
                                oThemeOptions: {
                                        bUseThemeSettings: ', $context['user']['is_guest'] ? 'true' : 'false', ',
                                        sOptionName: \'collapse_header\',
                                        sSessionVar: ', JavaScriptEscape($context['session_var']), ',
                                        sSessionId: ', JavaScriptEscape($context['session_id']), '
                                },
                                oCookieOptions: {
                                        bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
                                        sCookieName: \'upshrink\'
                                }
                        });
                // ]]></script>';

This will do just fine for my needs...  Now to explore changing the menu around... 

Thanks for the help...

--Mitch
Mitchell Baker AMA 7548 GSWA WB251 10th AF USSMA 358
Webmaster Terre Haute R/C Club http://www.thrcc.org
Scale Master Midwest Manager http://www.ussma-midwest.org
Proud member of 1/8th AirForce http://www.oneeighthairforce.org
CoffeeCup Ambassador Get 20% Off checkout code: 226STS www.getcoffeecup.com

Online bigguy

  • Site Owner
  • Administrator
  • *
  • Posts: 13217
  • Karma: 269
  • Gender: Male
  • Get'r Done
    • P.C. Tweakr
  • SMF Version: 2.0 Gold
Re: Removing/Changing items from the top
« Reply #6 on: March 04, 2010, 05:48:29 PM »
We'll mark this solved then.

Offline GhostRider2110

  • V.I.P.
  • *
  • Posts: 45
  • Karma: 130
  • Gender: Male
    • U.S. Scale Masters Association Midwest Region Web Site
  • SMF Version: 1.1.14/2.0
Re: Removing/Changing items from the top
« Reply #7 on: March 05, 2010, 11:50:17 AM »
Did I not do that?? Dang, thought I did.. Oh well...   :dnc

Thanks again for everyone's help here!!!

--Mitch
Mitchell Baker AMA 7548 GSWA WB251 10th AF USSMA 358
Webmaster Terre Haute R/C Club http://www.thrcc.org
Scale Master Midwest Manager http://www.ussma-midwest.org
Proud member of 1/8th AirForce http://www.oneeighthairforce.org
CoffeeCup Ambassador Get 20% Off checkout code: 226STS www.getcoffeecup.com