SimplePortal
Customization => Custom Coding => Topic started by: colby2152 on November 18, 2010, 06:53:24 PM
-
I have a custom action and I would like to display blocks on it... no problem, done. What I want to do is make this action into a blog. None of the SimplePortal blocks really allow this. All of them show a list of posts rather than the actual content within the original post.
-
Use a Custom PHP block then.
The PHP code below is an example of how you can query a message's body then display it. You will need to change the $id_msg variable's value to the relevant message id that you want to show.
$id_msg = 1;
global $smcFunc;
$request = $smcFunc['db_query']('', '
SELECT
body
FROM {db_prefix}messages
WHERE id_msg = {int:id_msg}
LIMIT 1',
array(
'id_msg' => $id_msg,
)
);
list($msg) = $smcFunc['db_fetch_row']($request);
echo parse_bbc(censorText($msg), true, $id_msg);
$smcFunc['db_free_result']($request);
-
Hmm, thank you for the code but that isn't sustainable in the long run. What I would prefer to have is to use the article categories for multiple blogs.
-
I changed the subject... what I want to do is have the ability to display articles in places (such as a custom action) other than the Portal.
-
Nevermind, I figured it out with the News Block.