News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Removal of "Subject /" at top of forum

Started by webbuilder, November 17, 2012, 11:08:35 PM

Previous topic - Next topic

webbuilder

At the top of a forum is "Subject/Started by".......

I've managed to remove the started by....

can anyone advise how to remove...or at least where to find what's creating "Subject /".....

..the Subject is a live link by the way...

Sir Osis of Liver


It's in MessageIndex.template.php -




// Are there actually any topics to show?
if (!empty($context['topics']))
{
echo '
<th scope="col" class="first_th" width="8%" colspan="2">&nbsp;</th>
<th scope="col" class="lefttext"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a> / <a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['started_by'], $context['sort_by'] == 'starter' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>



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

                                     - R. Waters

4Kstore

In your MessageIndex.template.php

Search for this:
<th scope="col" class="lefttext"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a> / <a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['started_by'], $context['sort_by'] == 'starter' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>

Replace for:
<th scope="col" class="lefttext"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>

¡¡NEW MOD: Sparkles User Names!!!

webbuilder

initially I tried to remove the whole thing which gives a syntax error...then did the 2nd recommended more surgical strike....that gets rid of the "/"...but still leaves the "Subject" live link......

so....so far so good...but how to get rid now of "Subject"...

webbuilder

I removed "subject" from index.english.php....

ie....

this:

$txt['subject'] = 'Subject';

to this:

$txt['subject'] = '';

that get's rid of it.......I don't know if somewhere else that might cause "Subject" to diasappear.....

Think that's a good handling...or is there a better way?

4Kstore

If you also wants to remove the subject part, try with this:

<th scope="col" class="lefttext"></th>


¡¡NEW MOD: Sparkles User Names!!!

webbuilder

...no, that doesn't work...that thows all the tables out of whack....I think the indext.english handling is ok...that works and I don't see where else "subject" is referenced in the site...probably never miss it...everywhere else it's "topic"

calling this solved....thank you!

4Kstore

Yes, it work:




But if you solved editing the language strings is ok..

Cheers!

¡¡NEW MOD: Sparkles User Names!!!

webbuilder

As you can see mine is a bit different....I had to undo the change in the language string as that is also used in the message post form ..ie "Message" disappears.......

So...looks like I need to edit this below...but as noted it's different than your code...ie....the </th> is at the end.....and it doesn't work to take it out...can you advise?

// Are there actually any topics to show?
      if (!empty($context['topics']))
      {
         echo '
<th scope="col" class="first_th" width="8%" colspan="2">&nbsp;</th>
                   <th scope="col" class="lefttext"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>';

Antechinus

MessageIndex.template.php

Find:
<th scope="col" class="lefttext"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a> / <a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['started_by'], $context['sort_by'] == 'starter' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>

Replace:
<th></th>

This is not rocket science. If you don't want anything dispayed inside a table cell, remove everything between the start and finish tags.

webbuilder

thank you, that worked...I have lift off

Advertisement: