SMF Support > SMF 2.0.x Support
Help me "cutoff topic title" pls
Gà Mái:
I have this code:
--- Code: --- // This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']) && (!empty($context['latest_posts']) || !empty($context['latest_post'])))
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=recent"><img class="icon" src="', $settings['images_url'], '/post/xx.gif" alt="', $txt['RecentTopicsOnBoardIndex_recenttopics'], '" /></a>
', $txt['RecentTopicsOnBoardIndex_recenttopics'], '
</span>
</h4>
</div>
<div class="hslice" id="recent_posts_content">
<div class="entry-title" style="display: none;">', $context['forum_name_html_safe'], ' - ', $txt['recent_posts'], '</div>
<div class="entry-content" style="display: none;">
<a rel="feedurl" href="', $scripturl, '?action=.xml;type=webslice">', $txt['subscribe_webslice'], '</a>
</div>';
// Only show one post.
if ($settings['number_recent_posts'] == 1)
{
// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
echo '
<strong><a href="', $scripturl, '?action=recent">', $txt['recent_posts'], '</a></strong>
<p id="infocenter_onepost" class="middletext">
', $txt['recent_view'], ' "', $context['latest_post']['link'], '" ', $txt['recent_updated'], ' (', $context['latest_post']['time'], ')<br />
</p>';
}
//-- Labradoodle-360; Advanced Recent Posts
elseif (!empty($context['latest_posts']))
{
echo '
<table align="center" cellpadding="5" cellspacing="0" width="100%" border="0">
<tr>
<td class="arp_header">', $txt['topic_name'] ,':</td>
<td class="arp_header">', $txt['poster_name'] ,':</td>
<td class="arp_header">', $txt['board_name'] ,':</td>
<td class="arp_header">', $txt['post_time'] ,':</td>
</tr>';
foreach ($context['latest_posts'] as $post)
{
echo '
<tr>
<td class="arppost arp_left">', $post['link'], '</td>
<td class="arppost arp_rest">', $post['poster']['link'], '</td>
<td class="arppost arp_rest">', $post['board']['link'], '</td>
<td class="arppost arp_rest">', $post['time'], '</td>
</tr>';
}
echo '
</table>
<br />
';
}
// End Labradoodle-360; Advanced Recent Posts --//
echo '
</div>';
}
--- End code ---
I limit my topic title (topic name) 80 characters, but i want to cutoff it at 60 characters (My boar show only 60 characters and ...) because my board does not have wide enough to show all full topic title.
Eg: "This is my topic title, and it have 80 characters long" After cutoff, it show "This is my topic title, and it have 80 cha.."
Can you help me!
Many thanks!!
Arantor:
Ask Labradoodle in the support topic of his Advanced Recent Posts mod... maybe he'll fix it in the mod generally.
Gà Mái:
--- Quote from: Arantor on June 01, 2012, 09:17:30 PM ---Ask Labradoodle in the support topic of his Advanced Recent Posts mod... maybe he'll fix it in the mod generally.
--- End quote ---
Yes, a good ideas! I will try to contact him. ^^
Anyone can help me solving this problem?
Labradoodle-360:
Arantor, maybe you should be paying a little bit more attention to posts, the past couple I've seen from you in relation to my posts have been way off. There is nothing wrong with my modification, he's wanting to hack something additional into it.
The function you're looking for is: shorten_subject();. Furthermore, do not PM me unless requested please. Arantor said to post in the mods support topic, not send me a personal message.
Gà Mái:
--- Quote from: Labradoodle-360 on June 01, 2012, 11:48:18 PM ---Arantor, maybe you should be paying a little bit more attention to posts, the past couple I've seen from you in relation to my posts have been way off. There is nothing wrong with my modification, he's wanting to hack something additional into it.
The function you're looking for is: shorten_subject();. Furthermore, do not PM me unless requested please. Arantor said to post in the mods support topic, not send me a personal message.
--- End quote ---
I'm sorry!
Navigation
[0] Message Index
[#] Next page
Go to full version