Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: Erikson on January 13, 2011, 08:44:25 AM

Title: Deleting "Jump To"
Post by: Erikson on January 13, 2011, 08:44:25 AM
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
Title: Re: Deleting "Jump To"
Post by: Erikson on January 14, 2011, 02:27:26 AM
Can nobody help me with my Problem ? :'( :'(

Erikson
Title: Re: Deleting "Jump To"
Post by: Joker™ on January 14, 2011, 07:40:49 AM
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.
Title: Re: Deleting "Jump To"
Post by: Dzonny on January 14, 2011, 07:53:42 AM
I would delete string from language file rather than messing with that codes. :)
Title: Re: Deleting "Jump To"
Post by: Illori on January 15, 2011, 07:53:16 AM
that would just leave your with errors in your error log, as the forum would still be looking for the string and finding nothing.
Title: Re: Deleting "Jump To"
Post by: Dzonny on January 15, 2011, 01:29:12 PM
No, i mean leave string there but emptu, like $txt['whatever']='';
Title: Re: Deleting "Jump To"
Post by: Matthew K. on January 15, 2011, 01:59:31 PM
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']='';
Title: Re: Deleting "Jump To"
Post by: 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 ;)).
Title: Re: Deleting "Jump To"
Post by: Matthew K. 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
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 ;)).
Title: Re: Deleting "Jump To"
Post by: Joker™ on January 16, 2011, 01:50:25 PM
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.
Title: Re: Deleting "Jump To"
Post by: Erikson on January 17, 2011, 08:33:24 PM
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
Title: Re: Deleting "Jump To"
Post by: Joker™ on January 18, 2011, 01:56:42 AM
Try the attached file
Title: Re: Deleting "Jump To"
Post by: Matthew K. on January 18, 2011, 02:49:19 PM
@topicstarter - Any word on whether Joker's file worked or not?
Title: Re: Deleting "Jump To"
Post by: 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 :)
Title: Re: Deleting "Jump To"
Post by: Joker™ on January 19, 2011, 04:20:20 AM
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
Title: Re: Deleting "Jump To"
Post by: Erikson on January 19, 2011, 10:20:38 AM
Dear Joker,

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

With best Regards

Erikson :)
Title: Re: Deleting "Jump To"
Post by: Nibogo on January 19, 2011, 05:07:04 PM
Please try with the file attached
Title: Re: Deleting "Jump To"
Post by: Erikson on January 20, 2011, 12:31:11 PM
Thank you Dear Nibogo and Joker for the great Help ! I am very Happy !  :) :)

Yes Nibogo it works fantastic ! Thank you ! :)

Best Regards

Erikson ! :)
Title: Re: Deleting "Jump To"
Post by: Nibogo on January 20, 2011, 12:38:54 PM
I'm glad I'd help :) Please mark it as unsolved and reply here if you need further assistance with this :)