View Full Version : Trim Thread Title Posted on Forum. External Data Provider
Naijasite
02-09-2013, 12:34 AM
Some of my Thread Title length posted from rss feed are so long. Maximum Characters Per Thread/Post Title to 85.
I still have some Thread Title length that is up to 3 lines (200 word). that were posted from Rss.
Please how do i trim Thread title posted from Rss Feed?
Your assistance will be appreciated.
LifesGreatestGift
02-09-2013, 01:28 AM
Open ./includes/cron/rssposter.php
On line 386
Find:
$itemdata->set('title', strip_bbcode($html_parser->parse_wysiwyg_html_to_bbcode($feed['xml']->parse_template($feed['titletemplate'], $item))));
Replace With:
$thread_length = $vbulletin->options['titlemaxchars'];
$new_length = $thread_length - 4;
$current_title = strip_bbcode($html_parser->parse_wysiwyg_html_to_bbcode($feed['xml']->parse_template($feed['titletemplate'], $item)));
if (strlen($current_title) > $thread_length) {
$new_title = substr($current_title, 0, $new_length) . ' ...';
} else {
$new_title = $current_title;
}
$itemdata->set('title', $new_title);
I haven't tested it, but it should work.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.