DB INSERTS into bp_activity (works but time is 5 hours off)
-
I’m looking at a MediaWiki extension written by Boone, in which he tied the MediaWiki to bp_activity_sitewide for WPMU. I am only using WP 3.0 in single blog. I almost have a handle on the mysql_query statement needed to insert values. However, my knowledge is “use google” and “spend time” – I’m not the sharpest tool in the shed. Therefore, I thought it best to ask the experts here.
I want to insert into the db, table bp_activity. The first value is an auto_increment. How is it best to setup the mysql_query so it is auto_incremented properly?
This is what I have
mysql_query( “INSERT INTO `wp_bp_activity` (`id`,`user_id`,`component`, `type`, `action`, `content`, `primary_link`, `item_id`, `secondary_item_id`, `date_recorded`, `hide_sitewide`, `mptt_left`, `mptt_right`) VALUES ( ‘I HAVE NO CLUE’, ‘$user_id’, ‘blogs’, ‘new blog post’, ‘a wiki edit’, ‘$contentdesc’, ‘$articleURL’, ’46’, ‘0’, FROM_UNIXTIME(‘$time2’), ‘0’, ‘0’, ‘0’ )”) or die(mysql_error()); // insert into bp activity feed
Also,
Can “component” be == to “wiki”?
Can “type” == “new wiki edit”?
Can action be set so that it inserts the URL also ?Thank you!!
I’ll keep mucking about
Update
OK. I removed `id` and this worked. The information was inserted into the database. However, it does not show up in the activity stream. I’m thinking the item_id is wrong?
- The topic ‘DB INSERTS into bp_activity (works but time is 5 hours off)’ is closed to new replies.