Support Forum
It very well might.... it's more that I'm not sure how to use it -
***
News For Shoppers is seeking consumer reporters,
consumer advocates, and entertainment writers:
visit: NewsForShoppers.com/write/
do you have a specific question? or section that is not understood?
Visit Cruise Talk Central and Mr Papa's World
No, I don't really have a starting point on how to use it.
If I would put it in a new script? and how to get the data to it....?
***
News For Shoppers is seeking consumer reporters,
consumer advocates, and entertainment writers:
visit: NewsForShoppers.com/write/
As I said in post #2 - you were pretty much there up until the post save. The code I have pointed you to ensures that part of it is performs properly. Although I would add that one thing you did not say in post #1 was to ensure you tackle the comments in ID order as the order they are saved in will be reflected in the forum topic sequence.
YELLOW
SWORDFISH
|
Ok, so I'm thinking I need to get the data from the comments table, then the sflinks table, and if there is a link, then I would use the function by feeding it the data?
So, right now, I'm working on getting the comments data (that works). Then the information from sflinks.... but for some reason I'm not getting that information.
Do you see what I am doing wrong here? Thanks for your help ahead of time!
<?php
//load wp
require_once("wp-load.php");
//get comments
$comments = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments LIMIT 7") );
foreach ($comments as $comment) {
$comment_post_ID = $comment->comment_post_ID;
//do I have the comments info?
echo $comment_post_ID."<br />"; //YES!
//find and get data from sflinks
$links = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->sflinks WHERE post_id = $comment_post_ID" ) );
$link_info = $links->topic_id."<br />";
//do I have the info from sflinks?
echo $link_info."<br /><br />"; //NO
}
?>
***
News For Shoppers is seeking consumer reporters,
consumer advocates, and entertainment writers:
visit: NewsForShoppers.com/write/
First off - answering an earlier query - a comment edit will not create a forum post. It is created on a comment publish action.
As to the above then you can not use $wpdb->sflinks as only WP core tables are recognised in that construct.
Instead use the main sp_blog_links_control() function that is in the blog linking main plugin file - using an action of 'read'.
YELLOW
SWORDFISH
|
1 Guest(s)