The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Code:
require("global.php");
$getposts = $db->query_read("
SELECT post.postid AS postid, post.pagetext AS pagetext
FROM " . TABLE_PREFIX . "post AS post
WHERE postid='1111';");
$post = $db->fetch_array($getposts);
echo "<b>".$post['postid']."</b> - ".$post['pagetext']."<br /><br />";
![]() ________ where are my before post on this subforum ?
|
|
#2
|
||||
|
||||
|
PHP Code:
Also, there's no need to use aliases and grab the postid in your query, you already have the postid (1111). |
|
#3
|
|||
|
|||
|
thanks,
Ok, post grabs, but how display this post with BBC code ? |
|
#4
|
||||
|
||||
|
To use with BBCode, you must use the BBCode parser class. It's a very simplistic class to use, and you can read more about it here (class -> vB_BbCodeParser).
If you want to parse a variable called $var, you would use this php code: PHP Code:
|
|
#5
|
|||
|
|||
|
Quote:
My output template's name TEST. This code I add at first srcipt: Code:
require('includes/class_bbcode.php');
$var = '[b][i][u]HA HA[/u][/i][/b]';
$bbcode = new vB_BbCodeParser($vbulletin,fetch_tag_list());
$template_var = $bbcode->do_parse($var);
Code:
while($post = $db->fetch_array($getposts))
{
eval('$mini .= "' . fetch_template('mini') . '";');
}
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('TEST') . '");');
Code:
$mini = $bbcode->do_parse($var); any other bbc code example [b][/b] no parse
|
|
#6
|
||||
|
||||
|
What you need to do is this:
PHP Code:
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|