News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Remove "Topic:" from the thread title?

Started by lordrene, December 08, 2014, 08:27:13 PM

Previous topic - Next topic

lordrene

Is there any mod out there that will remove the "Topic:" from the thread title?


Arantor

Themes/default/Display.template.php
Code (find) Select
<span id="author">', $txt['author'], '</span>
', $txt['topic'], ': ', $context['subject'], ' &nbsp;(', $txt['read'], ' ', $context['num_views'], ' ', $txt['times'], ')


Code (replace) Select
<span id="author">', $txt['author'], '</span>
', $context['subject'], ' &nbsp;(', $txt['read'], ' ', $context['num_views'], ' ', $txt['times'], ')


If your theme has its own Display.template.php, this might be very slightly different (and it'll be that file, not Themes/default/'s copy)

lordrene

Quote from: Arantor on December 08, 2014, 08:33:44 PM
Themes/default/Display.template.php
Code (find) Select
<span id="author">', $txt['author'], '</span>
', $txt['topic'], ': ', $context['subject'], ' &nbsp;(', $txt['read'], ' ', $context['num_views'], ' ', $txt['times'], ')


Code (replace) Select
<span id="author">', $txt['author'], '</span>
', $context['subject'], ' &nbsp;(', $txt['read'], ' ', $context['num_views'], ' ', $txt['times'], ')


If your theme has its own Display.template.php, this might be very slightly different (and it'll be that file, not Themes/default/'s copy)
kinda new here.
Yes I have Display.template.php

But is this the code i have to replace?


Arantor

Um, no... that's not the code you have to replace. I gave you the code you need to replace, taken from an unmodified 2.0.9 install.

Lines 186-187. Part of this block:
// Show the topic information - icon, subject, etc.
echo '
<div id="forumposts">
<div class="cat_bar">
<h3 class="catbg">
<img src="', $settings['images_url'], '/topic/', $context['class'], '.gif" align="bottom" alt="" />
<span id="author">', $txt['author'], '</span>
', $txt['topic'], ': ', $context['subject'], ' &nbsp;(', $txt['read'], ' ', $context['num_views'], ' ', $txt['times'], ')
</h3>
</div>';

lordrene

Quote from: Arantor on December 08, 2014, 08:55:32 PM
Um, no... that's not the code you have to replace. I gave you the code you need to replace, taken from an unmodified 2.0.9 install.

Lines 186-187. Part of this block:
// Show the topic information - icon, subject, etc.
echo '
<div id="forumposts">
<div class="cat_bar">
<h3 class="catbg">
<img src="', $settings['images_url'], '/topic/', $context['class'], '.gif" align="bottom" alt="" />
<span id="author">', $txt['author'], '</span>
', $txt['topic'], ': ', $context['subject'], ' &nbsp;(', $txt['read'], ' ', $context['num_views'], ' ', $txt['times'], ')
</h3>
</div>';

THANKS!! It worked

Need a little help with like 2 more things, should i make threads about them or just post here?

Arantor

Probably best to make new threads, since it's just easier to focus on one thing at a time - and you can mark them solved with the 'mark topic solved' button at the bottom once it's solved.

lordrene

Quote from: Arantor on December 08, 2014, 09:05:55 PM
Probably best to make new threads, since it's just easier to focus on one thing at a time - and you can mark them solved with the 'mark topic solved' button at the bottom once it's solved.
True! Okay thanks

Steve

Nice trick. If I wanted the topic title to stay in the position it was before Topic: was removed, would that be easy to do?

Currently:

Topic: Topic Title
Topic Title

What I'd like:

Topic: Topic Title
          Topic Title

:)
DO NOT pm me for support!

Arantor

Not especially. You could just stuff a bunch of &nbsp; in there but it's not really ideal.

Steve

DO NOT pm me for support!

Rumpa

#10
I did package it. now user easily install/ uninstall without doing manually editing. I submitted it in mod site. I attached it here. user will can test it. I will remove it from here when it's approved.

Arantor

Nice of you to wait for an answer before packaging it as a mod.

Well, you can package up the changes I've documented, but I refuse to support your mod - anyone who has trouble with your mod, you'll be responsible for dealing with any issues.

Kindred

also note that, while thanking Arantor is good, claiming the copyright of the BSD licensed code for yourself is somewhat BS...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Rumpa

Quote from: Arantor on December 15, 2014, 11:51:34 AM
Nice of you to wait for an answer before packaging it as a mod.

Well, you can package up the changes I've documented, but I refuse to support your mod - anyone who has trouble with your mod, you'll be responsible for dealing with any issues.

OK I am taking responsibility for this mod support. if anyone faces any issue I will give him/her support.

Advertisement: