TinyPortal
Development => Support => Topic started by: othg_weasel on October 30, 2008, 02:05:16 PM
Hello again,
I am now running TP1.0.6 SMF 1.1.6 . I want to use a block to show a article. in tp 9.xx its added very easy throught the block menu. I have read http://docs.tinyportal.co.uk/index.php?topic=70 that show you how to do this but in the block menu there is no "articlebox" to chose from in there? is there a new way of doing this?
The article/category options were removed. I'm sure they'll be back in another release. In the mean time you'll need to do it another way. Possibly even use a code snippet to get what you want.
eeek!! ok thank you for your reply. if anyone might have an idea on how to achieve this I'm all ears...
You're wanting to display the contents of an html article in a block?
I think this would work... Make a php block. Put this in it:
global $db_prefix;
$article_number = 20; // Fill in the number of the article you want to display.
$query = db_query(
"SELECT *
FROM {$db_prefix}tp_articles
WHERE id = " . $article_number . "
", __FILE__, __LINE__);
if(db_affected_rows() != 0)
{
while ($row = mysql_fetch_assoc($query))
{
echo $row['body'];
}
}
else
echo "Incorrect article number entered."
This won't work for BBC articles or php articles. Only html articles.
You can also add things other than the article body, if you want.
wow thank you so much I'll try that as soon as I get back home.
I'll let you know how it works out.
Again thank you!
I had made an error. I've fixed it.
Quote from: IchBinâ,,¢ on October 30, 2008, 03:01:25 PM
The article/category options were removed. I'm sure they'll be back in another release. In the mean time you'll need to do it another way. Possibly even use a code snippet to get what you want.
Any reason they were removed for 1.0.6?
Because its beta, and many things change. That is all.