News:

Wondering if this will always be free?  See why free is better.

Main Menu

I need help in MessageIndex.template

Started by b0t, June 26, 2012, 04:08:42 AM

Previous topic - Next topic

b0t

Hello all, I need help with a code to insert into my MessageIndex.template, I need to take the text of the topic automatically, this may show the topics with the first text, I just need to know the code, I can then edit the theme.

Thank you!  O:)
My Forum and Chat

kat



Sorry, b0t, but I don't get what you're asking. :(

Can you go into a bit more detail about what you want to achieve?

b0t

k@ , sorry and thank you, I need to make a modification in the MessageIndex.template.php,so that it is like the attached picture.

// Some columns require a different shade of the color class.
$alternate_class = $color_class . '2';

echo '
<tr class="', $color_class, '">
<td class="icon1">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="icon2">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>
<td class="subject">
<div ', (!empty($topic['quick_mod']['modify']) ? 'id="topic_' . $topic['first_post']['id'] . '" onmouseout="mouse_on_div = 0;" onmouseover="mouse_on_div = 1;" ondblclick="modify_topic(\'' . $topic['id'] . '\', \'' . $topic['first_post']['id'] . '\');"' : ''), '>
', $topic['is_sticky'] ? '<strong>' : '', '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], (!$context['can_approve_posts'] && !$topic['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : ''), '</span>', $topic['is_sticky'] ? '</strong>' : '';

// Is this topic new? (assuming they are logged in!)
if ($topic['new'] && $context['user']['is_logged'])
echo '
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';

echo '
<p>', $txt['started_by'], ' ', $topic['first_post']['member']['link'], '
<small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small>' . (!empty($modSettings['topic_descriptions_enable']) && $topic['description'] != "" ? '<hr class="topicdesc" /><small id="topicdesc_' . $topic['first_post']['id'] . '">' . $topic['description'] . '</small>' : '') . '
</p>
</div>
</td>
<td class="stats">
', $topic['replies'], ' ', $txt['replies'], '
<br />
', $topic['views'], ' ', $txt['views'], '
</td>
<td class="lastpost">
<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" /></a>
', $topic['last_post']['time'], '<br />
', $txt['by'], ' ', $topic['last_post']['member']['link'], '
</td>';

// Show the quick moderation options?


the modification would be in this part of the file, I have installed the mod TOPIC DESCRIPTION, but I need the description is generated automatically. in this mod is generated manually.

I hope I've managed to understand

Regards  O:)
My Forum and Chat

kat

That'll be better, thanks!

I'm no coder, sadly. But, with what you'd just added, I'm sure somebody will be able to help you, with that.  :)



Arantor

Um, what exactly do you hope to put as an automatic description? Where is that going to come from?

b0t

Quote from: Arantor on June 26, 2012, 07:03:07 PM
Um, what exactly do you hope to put as an automatic description? Where is that going to come from?


the description would come into the first lines of the message´s body, in the same way that a blog works!!
My Forum and Chat

Arantor

You didn't actually say that's what you wanted to achieve before...

You can't actually do this in just a template edit, it requires a change to the source too.

Start by looking at one of the mods that provides a nice tooltip.

b0t

Arantor, than you, nice mod, Now I wonder if it is possible modify how does this mod, order to achieve my goal, instead they were tooltips, I need the text teaches others as directed.

Regards
My Forum and Chat

Arantor

So which mod did you install exactly? If it's the one I think it is, it's only a minor template change after installation (since it would have added the preview as a tooltip directly into the template anyway)

b0t

 im installing the mod that you have given me before, what i need is that it is  like the photo that I achieved , that the preview appears directly in the template and not in to  the tooltip,i  hope you can understand me now,

regards and  thank  O:)

My Forum and Chat

Arantor

Considering that there are several mods that do what I suggested, I can't help without knowing which one you've installed, can I?

b0t

Quote from: Arantor on June 26, 2012, 09:22:54 PM
Considering that there are several mods that do what I suggested, I can't help without knowing which one you've installed, can I?


http://custom.simplemachines.org/mods/index.php?mod=2115


NiceTooltips - By digger

This is!
My Forum and Chat

b0t

My Forum and Chat

Arantor

Yes but funnily enough I've had other things going on in my life than to worry about making these changes for you. I'll look at it when I get time, not when you get impatient.

b0t

ok, I have not told you I can not wait,  you were he who has offered to help and made me install the  mod  , if you help people, responds with education because no one has disrespected.

Thank You

Regards!!  ;)
My Forum and Chat

kat

b0t... I don't think English is your native language.

But, I'll tell you this...

I like your style! :)

b0t

Thank You K@, I do not speak English, I only do occasionally... about Arantor, I saw that every day the people will respond, I do not understand because I've had installed this mod and then abandoned me,but I'm sure another good person may help unpretentious and politely...

Regards K@
My Forum and Chat

live627

He got the impression you wanted to rush because you bumped
Quote from: b0t on June 27, 2012, 03:50:41 PM
Arantor, you've seen the mod?

b0t

Quote from: live627 on June 28, 2012, 08:01:34 PM
He got the impression you wanted to rush because you bumped
Quote from: b0t on June 27, 2012, 03:50:41 PM
Arantor, you've seen the mod?

ok, I will make you some questions on your support forum
My Forum and Chat

Arantor

Like I said, I will when I have time. I've just spent 12 hours flying to America and I'm theoretically supposed to be on holiday now.

As pointed out, you asked me 18 hours later if I'd seen what you'd done, which is in anyone's book a bump trying to get it noticed. Not surprisingly I get annoyed when people are expecting me to do something for them when it's coming out of my spare time.

b0t

 Arantor, other person has helped me and I have it, I think you should talk less and make more, because if you offer can not walk with claims. The right thing would have been if you do not have time not to mess, but hey, I have achieved through other person more dedicated and certainly with more knowledge, because he has not delayed or two seconds to respond me, good luck with your trip, you must need rest, i know.

Regards!!! 

O:)
My Forum and Chat

Advertisement: