Quote:
Originally Posted by omerfarukak
What about the rssposter_parse_rss? Is there any guide about hooks?
|
You're right, I missed that. You might be able to do something in rssposter_parse_rss. But the problem may be that you don't have the threadid yet so I'm not sure how you'd create a link.
I don't know of any guide to hooks, but there could be one. I just look at the php code to see where they are.
Quote:
Is this code works? Or what i have to do?
Code:
global $feed;
if (is_array($feed) AND strncmp($feed['url'], 'something', len) == 0)
{ if (!empty($threadinfo['item_id'])) {
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());
mysql_connect('localhost', 'root', '');
mysql_select_db('_wp');
mysql_query("update wp_posts set post_content=concat(post_content,'</ br></ br></ br> {feed:title}<a href=\"{feed:link}\"> {feed:title} </a>') where post_title = '{feed:title}'");
mysql_close();
}
|
I'm not sure - I don't see how {feed:title} or {feed:link} will be substituted for the actual values. If you're trying to link back to the vb thread that gets created, then I think you'd want to do something like:
PHP Code:
if (is_array($feed) AND strncmp($feed['url'], 'something', len) == 0)
{
$title = $this->thread['title'];
$link = '</ br></ br></ br> <a href="' . $this->registry->options['bburl'] . '/showthread.php?t=' . $this->thread['threadid'] . '">' . htmlentities($title) . '</a>';
mysql_connect('localhost', 'root', '');
mysql_select_db('_wp');
mysql_query("update wp_posts set post_content=concat(post_content,'" . mysql_real_escape_string($link) . "') where post_title = '" . mysql_real_escape_string($title) . "'");
mysql_close();
}
Also, you need to replace 'something' and 'len' in the above if statement to be something that would check to see if the feed url is the url of your wordpress feed.