News:

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

Main Menu

Deleting "Jump To"

Started by Erikson, January 13, 2011, 08:44:25 AM

Previous topic - Next topic

Erikson

Dears,

i will delete the "Jump To". First i delete this in message_indextemplate

            <td align="', !$context['right_to_left'] ? 'right' : 'left', '" valign="middle">
               <form action="', $scripturl, '" method="get" accept-charset="', $context['character_set'], '" name="jumptoForm">
                  <span class="smalltext"><label for="jumpto">' . $txt[160] . '</label>:</span>
               <select name="jumpto" id="jumpto" onchange="if (this.selectedIndex > 0 &amp;&amp; this.options[this.selectedIndex].value) window.location.href = smf_scripturl + this.options[this.selectedIndex].value.substr(smf_scripturl.indexOf(\'?\') == -1 || this.options[this.selectedIndex].value.substr(0, 1) != \'?\' ? 0 : 1);">
                        <option value="">' . $txt[251] . ':</option>';

   // Show each category - they all have an id, name, and the boards in them.
   foreach ($context['jump_to'] as $category)
   {
      // Show the category name with a link to the category. (index.php#id)
      echo '
                        <option value="" disabled="disabled">-----------------------------</option>
                        <option value="#', $category['id'], '">', $category['name'], '</option>
                        <option value="" disabled="disabled">-----------------------------</option>';

      /* Now go through each board - they all have:
            id, name, child_level (how many parents they have, basically...), and is_current. (is this the current board?) */
      foreach ($category['boards'] as $board)
      {
         // Show some more =='s if this is a child, so as to make it look nice.
         echo '
                        <option value="?board=', $board['id'], '.0"', $board['is_current'] ? ' selected="selected"' : '', '> ', str_repeat('==', $board['child_level']), '=> ', $board['name'], '</option>';
      }
   }

   echo '
                  </select>&nbsp;
               <input type="button" value="', $txt[161], '" onclick="if (this.form.jumpto.options[this.form.jumpto.selectedIndex].value) window.location.href = \'', $scripturl, '\' + this.form.jumpto.options[this.form.jumpto.selectedIndex].value;" />
               </form>
            </td>


But there's one little Problem you can see on the Attached Picture. The "Page created..." ist on left Side. What can i make, that it is center placed?

Thank you in Advance for your Help

Erikson
The best Forum Software? - SMF ./. The Best Support? - SMF-Support

Erikson

Can nobody help me with my Problem ? :'( :'(

Erikson
The best Forum Software? - SMF ./. The Best Support? - SMF-Support

Joker™

Remove this much code (Make backup of file before editing)

<td align="', !$context['right_to_left'] ? 'right' : 'left', '" valign="middle">
<form action="', $scripturl, '" method="get" accept-charset="', $context['character_set'], '" name="jumptoForm">
<span class="smalltext"><label for="jumpto">' . $txt[160] . '</label>:</span>
<select name="jumpto" id="jumpto" onchange="if (this.selectedIndex > 0 &amp;&amp; this.options[this.selectedIndex].value) window.location.href = smf_scripturl + this.options[this.selectedIndex].value.substr(smf_scripturl.indexOf(\'?\') == -1 || this.options[this.selectedIndex].value.substr(0, 1) != \'?\' ? 0 : 1);">
<option value="">' . $txt[251] . ':</option>';

// Show each category - they all have an id, name, and the boards in them.
foreach ($context['jump_to'] as $category)
{
// Show the category name with a link to the category. (index.php#id)
echo '
<option value="" disabled="disabled">-----------------------------</option>
<option value="#', $category['id'], '">', $category['name'], '</option>
<option value="" disabled="disabled">-----------------------------</option>';

/* Now go through each board - they all have:
id, name, child_level (how many parents they have, basically...), and is_current. (is this the current board?) */
foreach ($category['boards'] as $board)
{
// Show some more =='s if this is a child, so as to make it look nice.
echo '
<option value="?board=', $board['id'], '.0"', $board['is_current'] ? ' selected="selected"' : '', '> ', str_repeat('==', $board['child_level']), '=> ', $board['name'], '</option>';
}
}

echo '
</select>&nbsp;
<input type="button" value="', $txt[161], '" onclick="if (this.form.jumpto.options[this.form.jumpto.selectedIndex].value) window.location.href = \'', $scripturl, '\' + this.form.jumpto.options[this.form.jumpto.selectedIndex].value;" />
</form>
</td>




OOpss,I haven't read your post properly. Can you give me your site link and attach your MessageIndex.template.php.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Dzonny

I would delete string from language file rather than messing with that codes. :)

Illori

that would just leave your with errors in your error log, as the forum would still be looking for the string and finding nothing.

Dzonny

No, i mean leave string there but emptu, like $txt['whatever']='';

Matthew K.

Why would you want to do that...? It's much better to just remove it's instances from the template....
Quote from: Dzonny on January 15, 2011, 01:29:12 PM
No, i mean leave string there but emptu, like $txt['whatever']='';

Joker™

Quote from: Dzonny on January 15, 2011, 01:29:12 PM
No, i mean leave string there but emptu, like $txt['whatever']='';
Even by doing that, the outlay of jump bar will be left there. It'll be shown as blank bar. (Give it a try yourself ;)).
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Matthew K.

Not necessarily - But most likely. Either way, the best way is to just remove the instance from Display.template.php
Quote from: Joker™ on January 16, 2011, 12:44:23 AM
Quote from: Dzonny on January 15, 2011, 01:29:12 PM
No, i mean leave string there but emptu, like $txt['whatever']='';
Even by doing that, the outlay of jump bar will be left there. It'll be shown as blank bar. (Give it a try yourself ;)).

Joker™

Quote from: Labradoodle-360 on January 16, 2011, 01:43:53 PM
Not necessarily - But most likely. Either way, the best way is to just remove the instance from Display.template.php
That's what I said.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Erikson

Hallo ! :)

First i must say thank you for your great help ! ;)

My Site is http://www.hartz4-hilfe.org

The MessageIndex.template is on the Attach.

Best Regards

Erikson
The best Forum Software? - SMF ./. The Best Support? - SMF-Support

Joker™

Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Matthew K.

@topicstarter - Any word on whether Joker's file worked or not?

Erikson

Sorry dears i wrote so late... ;)

On Forum Look it works fantastic. ;D ;D Thank you a lot for this Joker ! But when you click a single Post you can see the "Jump To" again. What must i change now?

Best Regards

Erikson :)
The best Forum Software? - SMF ./. The Best Support? - SMF-Support

Joker™

Quote from: Erikson on January 18, 2011, 06:58:34 PM
Sorry dears i wrote so late... ;)

On Forum Look it works fantastic. ;D ;D Thank you a lot for this Joker ! But when you click a single Post you can see the "Jump To" again. What must i change now?

Best Regards

Erikson :)
For that attach your Display.template.php
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Erikson

Dear Joker,

thank you for your great Help you gave and give me ! Fantastic ! ;)
On the Attach the Display.template

With best Regards

Erikson :)
The best Forum Software? - SMF ./. The Best Support? - SMF-Support


Erikson

Thank you Dear Nibogo and Joker for the great Help ! I am very Happy !  :) :)

Yes Nibogo it works fantastic ! Thank you ! :)

Best Regards

Erikson ! :)
The best Forum Software? - SMF ./. The Best Support? - SMF-Support


Advertisement: