I also have been working on this issue, and I'm
close but not solved yet...
I have edited the file rssposter.php in the includes/cron/ directory... Since there are no hooks.
Find this code:
PHP Code:
$rsslog_insert_sql[] = "($item[rssfeedid], $itemid, '$itemtype', '" . $vbulletin->db->escape_string($uniquehash) . "', '" . $vbulletin->db->escape_string($item['contenthash']) . "', " . TIMENOW . ", $threadactiontime)";
$cronlog_items["$item[rssfeedid]"][] = "\t<li>$vbphrase[$itemtype] <a href=\"$itemlink\" target=\"logview\"><em>$itemtitle</em></a></li>";
}
And right after it add:
PHP Code:
//Set AME Flag Start
require_once(DIR . '/includes/functions.php');
$amethread = fetch_threadinfo($itemid);
$postid = $amethread['firstpostid'];
$post = fetch_postinfo($postid);
$post['message'] = $post['pagetext'];
require_once(DIR . '/includes/ame_bbcode.php');
$value = ame_prep_text($post['message']);
echo $post['message'];
if ($value == 1)
{
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "post SET pagetext ='" . $vbulletin->db->escape_string($post['message']) . "', ame_flag=1 WHERE postid=$post[postid]");
}
else if ($value == 2)
{
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "post SET pagetext ='" . $vbulletin->db->escape_string($post['message']) . "', ame_flag=1 WHERE postid=$post[postid]");
}
//Set AME Flag End
This code will set the ame_flag to "1" in the database for the post but for some reason does NOT change the [url] bbcode to [ame]...
I play with this on and off, if/when I get a solution I will post it here... Maybe someone else can look at this and have an idea where I am going wrong. From what can see the function
ame_prep_text should do it... I will post this in the AME thread- maybe someone has some ideas.