zero477
11-08-2016, 04:23 PM
Hello to all,
I want to print part of a post using (like the first 100 words) the vB_BbCodeParser. If I use PHP sometimes I cut thre string in the middle of somewhere where I should not and I cannot display the html correctly.
For example:
$bbcode_parser =& new vB_BbCodeParser(vb::$vbulletin, fetch_tag_list(), true);
$text= '
<div class="review-text">
"'.substr($bbcode_parser->parse($opiniones["pagetext"]), 0, 400).'...<a href="threads/'.$opiniones["threadid"].'-'.urlencode($opiniones["thread_title"]).'?p='.$opiniones["postid"].'#post'.$opiniones["postid"].'">ver m?s</a>..."
</div>
echo $text;
Here, the link does not work because I cut the code incorrectly.
<span style="font-fam...<a href="thr
Any ideas?
I want to print part of a post using (like the first 100 words) the vB_BbCodeParser. If I use PHP sometimes I cut thre string in the middle of somewhere where I should not and I cannot display the html correctly.
For example:
$bbcode_parser =& new vB_BbCodeParser(vb::$vbulletin, fetch_tag_list(), true);
$text= '
<div class="review-text">
"'.substr($bbcode_parser->parse($opiniones["pagetext"]), 0, 400).'...<a href="threads/'.$opiniones["threadid"].'-'.urlencode($opiniones["thread_title"]).'?p='.$opiniones["postid"].'#post'.$opiniones["postid"].'">ver m?s</a>..."
</div>
echo $text;
Here, the link does not work because I cut the code incorrectly.
<span style="font-fam...<a href="thr
Any ideas?