News:

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

Main Menu

Topic Descriptions

Started by live627, May 19, 2011, 08:43:42 AM

Previous topic - Next topic

funkythemunky


funkythemunky

This is what it looks like.. that way I love it a lot!  :laugh:

In Recent.template.php
(!empty($modSettings['topic_descriptions_enable']) && $topic['description'] != "" ? '<small style="color: #334466;"><em>' . $topic['description'] . '</em></small>' : '') . '

And in MessageIndex.template.php
(!empty($modSettings['topic_descriptions_enable']) && $topic['description'] != "" ? '<small style="color: #334466;" id="topicdesc_' . $topic['first_post']['id'] . '"><em>' . $topic['description'] . '</em></small>' : '') . '

It´s probably not exactly elegant I suppose... but it works.  ::)

funkythemunky

#82
Me again... ;)

I like it a lot but unfortunately my forum members didn´t react positively and don´t want this option.  :P

So now I want to uninstall it it shows the following message..
Is it safe to remove nevertheless?

edit: ok, problem was I had changed the <hr> and so on, resettet this in the 2 files and re-uploaded, then no mistakes. :) I am unhappy though because I really like topic descriptions. :/


helike13

Sometimes the topic description disappears from the topic index. Then I have to edit the reply #1 to get it back! It is very annoying. How to fix that? I'm using 2.0RC5.

Hoodie

Quote from: helike13 on February 28, 2012, 03:03:27 PM
Sometimes the topic description disappears from the topic index. Then I have to edit the reply #1 to get it back! It is very annoying. How to fix that? I'm using 2.0RC5.

You should update to 2.0.2..  And make sure you're using the most current download from the mod page..

Hoodie

Could we make this so that it is only usable by certain membergroups?
Also, could we turn it on/off on a per board basis?

b0t

Hello Live627, I need to know in what way I can modify the code of this mod,so that the description are automatically, taking the text of the topic, manually does not help me. I hope you can help.

Regards and thank!
My Forum and Chat

live627

Automatic pulling from the message body - okay... what all should be pulled? Where should it stop? Should the description input box be removed?

b0t

My Forum and Chat

Cesarre

I'm trying to install this mod however I'm receiving an error when it comes to Recent.template.php and I'm unsure what to modify or add to get it working.

I can upload/PM the file on request.

Antechinus

Handy hint for ya: the way the mod is coded, it shows the description div in Display.template.php even if there is no description entered. Try this instead:

if (!empty($modSettings['topic_descriptions_enable']) && ($context['topic_description'] != ""))
{
echo '
<div class="windowbg2 topic_description">
<strong>' . $txt['topic_description'] . ':</strong> ' . $context['topic_description'] . '
</div>';
}


That way you get the description div if there is a description, but you don't see it if it's not needed. I used a custom class to do custom padding on the div, and I also ditched the old topslice and bottomslice spans, but you can use whatever you like.

hellodarren1

I just noticed as well that if you get an error when posting, the screen refreshes and all content except for the topic description is re-input. So you have to type in the topic description again.

natasa (NT)

Very useful mod, thanks!
I was wondering, is it possible to put links in descriptions?

crazyearner

Is this going to be updated for 2.0.4?

Costa

Quote from: crazyearner on February 15, 2013, 07:53:14 PM
Is this going to be updated for 2.0.4?
It works on 2.0.4 Just use emulate version. See wiki for more detail.
Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

FireDitto

Hey guys!

I was wondering if it would be possible to have the Description box show up with that auto-description in it, kind of like how an address input comes up with "http://" automatically included. I've attached a screenshot of what I'd like to do to be clearer.

Is it possible to do this? I don't want it to be actual input, so much as instructions on what to input - we use the Description mod for time-framing in character posts on my RP site. If nothing in entered, I'd like it to post empty, not to post the instruction values...

Hopefully I make sense!

Thank you!


EDIT: Figured it out :D

I edited this part of the code;

Code (Post.template.php) Select

$boards = !empty($modSettings['topic_descriptions_boards']) ? explode(",", $modSettings['topic_descriptions_boards']) : array();
if (!empty($modSettings['topic_descriptions_enable']) && $context['is_first_post'] && !in_array($context['current_board'], $boards)) {
echo ' <dt>
<span id="caption_description">' . $txt['topic_descriptions_post_desc'] . '</span>
</dt>
<dd>
<input type="text" name="description"', $context['description'] == '' ? '' : ' value="' . $context['description'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="' . (!empty($modSettings['topic_descriptions_maxlen']) ? (int) $modSettings['topic_descriptions_maxlen'] : 25) . '" class="input_text" />
</dd>';
}

echo '
<dt class="clear_left">
', $txt['message_icon'], ':
</dt>
<dd>
<select name="icon" id="icon" onchange="showimage()">';



where it says

<input type="text" name="description"', $context['description'] == '' ? '' : ' value="' . $context['description'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="' . (!empty($modSettings['topic_descriptions_maxlen']) ? (int) $modSettings['topic_descriptions_maxlen'] : 25) . '" class="input_text" />

to be

<input type="text" name="description" placeholder="Placeholder Text Here"', $context['description'] == '' ? '' : ' value="' . $context['description'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="' . (!empty($modSettings['topic_descriptions_maxlen']) ? (int) $modSettings['topic_descriptions_maxlen'] : 25) . '" class="input_text" />
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

bros

#97
Quote from: helike13 on February 28, 2012, 03:03:27 PM
Sometimes the topic description disappears from the topic index. Then I have to edit the reply #1 to get it back! It is very annoying. How to fix that? I'm using 2.0RC5.

I'm getting this on 2.0.4

Edit: On second look, it appears topic descriptions are just disappearing at random.

ScrumpyJack

Quote from: Cesarre on July 06, 2012, 02:52:42 PM
I'm trying to install this mod however I'm receiving an error when it comes to Recent.template.php and I'm unsure what to modify or add to get it working.

I can upload/PM the file on request.

I'm getting this problem too!

FireDitto

Are you clicking 'Preview' before posting? If you preview a topic before posting, it eats the Description.
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Advertisement: