2009-01-30, 09:58 AM
I've been looking for a "post tag" mod but haven't been able to find one. I'm sorry if I overlooked something. I'll assume it's not available for now.
I was wondering if it is possible to create a plugin that lets you attach a pre-defined tag to a post (I think I've seen it with vBulletin software). So in example, when you have a category with news items, you can pre-define certain categories (tags) which you can attach to a post like: "sport", "politics", "media" etc.
The reason behind this is that I'm trying to find a way to pull posts from a specific forum ID and post them on the front-end of the website. However, at this time, it's not possible (as far as I know) to define which post subjects (or tags) must be pulled from specific forum ID. You can either pull all posts or no posts.
I'm going to run serveral websites (front-ends) based on one forum installation. For these front-ends I'm looking for a way to pull the specific content from the same forum ID ("news forum") appropiate for the specific website.
Anyone knows if it exists?
-----------------------------
Or is there another way to do something like this? Like in example, define in the news script used on the front-end that it must display all posts of forum ID=x "if topic title starts with [sports]"? This way I could manually use a text tag in front of every new topic so the scripts knows what to pull and what not..
The front-end code I'm currently using is:
I was wondering if it is possible to create a plugin that lets you attach a pre-defined tag to a post (I think I've seen it with vBulletin software). So in example, when you have a category with news items, you can pre-define certain categories (tags) which you can attach to a post like: "sport", "politics", "media" etc.
The reason behind this is that I'm trying to find a way to pull posts from a specific forum ID and post them on the front-end of the website. However, at this time, it's not possible (as far as I know) to define which post subjects (or tags) must be pulled from specific forum ID. You can either pull all posts or no posts.
I'm going to run serveral websites (front-ends) based on one forum installation. For these front-ends I'm looking for a way to pull the specific content from the same forum ID ("news forum") appropiate for the specific website.
Anyone knows if it exists?
-----------------------------
Or is there another way to do something like this? Like in example, define in the news script used on the front-end that it must display all posts of forum ID=x "if topic title starts with [sports]"? This way I could manually use a text tag in front of every new topic so the scripts knows what to pull and what not..
The front-end code I'm currently using is:
<?php
$fid = 2;
$limit = 6;
$forumpath = 'forum/';
chdir($forumpath);
define("IN_MYBB", 1);
require('./global.php');
require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;
chdir('../');
?>
<span class="forumtext">
<?php
$query = $db->simple_select('threads', '*', "fid='2' ORDER BY tid DESC LIMIT {$limit}");
if($db->num_rows($query) > 0)
{
while($row = $db->fetch_array($query))
{
$query2 = $db->simple_select('posts', '*', "pid='{$row['firstpost']}'");
$row2 = $db->fetch_array($query2);
$date = my_date($mybb->settings['dateformat'], $row2['dateline'], "", 1);
$time = my_date($mybb->settings['timeformat'], $row2['dateline'], "", 1);
$options = array(
'allow_html' => '1',
'filter_badwords' => '1',
'allow_mycode' => '1',
'allow_smilies' => '1',
'nl2br' => '1',
'me_username' => '1'
);
$message = $parser->parse_message($row2['message'], $options);
echo("<a href=\"{$forumpath}showthread.php?tid={$row['tid']}\">{$row['subject']}</a><br>
{$date} {$time} door <a href=\"{$forumpath}member.php?action=profile&uid={$row2['uid']}\">{$row2['username']}</a><br><br><br>");
echo("{$message}<br><br><br>");
echo("<a href=\"{$forumpath}showthread.php?tid={$row['tid']}\">{$row['replies']} Reacties</a><br><br><br><hr />");
}
}
else
{
echo 'Nothing to display.';
}
?>