how exactly would I send people to the forums instead of commenting on the blog? I notice that you do this on your own website.
Forgive me if this is terribly simple to do.
how exactly would I send people to the forums instead of commenting on the blog? I notice that you do this on your own website.
Forgive me if this is terribly simple to do.
I put this in my template:
<?php if($topic_id = felwptobb( $id ) ) { echo '<a href="' . bbreplylink( $topic_id ) . '">Reply!</a>'; } else { comments_popup_link(' comments', '1 comment', '% comments','',''); } ?>
Not at all, it's a perfectly reasonably question. :)
hmm.. posts gets n´s all over them...
projects. Please check back later for for more news regarding this.
n
nCode test
n[code=\'php\']
n< ?php
n// Testing..
n
if (function())
n
{
etc...Ho hum. That's pretty annoying, isn't it? I put in a $bbdb->escape() because otherwise some database error would annoy me, but this way may well be worse. I'm not sure what to do; bb gets it nicely encoded through coming through $_POST I think. Still thinking about that one (if anyone knows what is probably quite obvious and tells me, that'd be great).
hmm ok :) think ill wait and get back to that page later then..
thank you very much that worked a treat.
I am also having a little difficulty when it comes to posting replies on the forum and then them appearing on the comments in the blog post. Sometimes it doesn't work and sometimes it posts the same comment multiple times, is this a bug, can it be corrected?
If i submit a post in wp with tags .. the tags are missing in bbpress. They dont get synced?
William: does a single, unique reply in bbpress sometimes not appear in wp and sometimes appear several times? Does this change as you reload the page or does it change from reply to reply (but stay consistent between refreshes)?
Vafaaaan: they don't. I've yet to implement that.
Fel: I,ve been having the same issue as William with multiple replies in WP and for me it stays consisten between refreshes and sometimes changes from reply to reply.
fel: ok.. to bad .. im trying figure out the relationships in the DB , seems complex. Why isnt there a wp_tags table? :) Will you implement it? or should i try do some coding myself?
Okay so this is what happens for me.
I write a blog post then as a user I post on the blog (once) it comes up as the comment has been posted twice. When I refresh the page nothing changes.
In the forums though the comment only shows as being posted once.
When I post a comment in the forum it does it correctly however on the blog post (in the comments) the comment from the forum is doubled.
And the original comment (the blog comment I made) is fixed and put back correctly.
Also the time and date can be messed up.
The way this happens is pretty sporadic.
Hope that helps.
Yo. That does help, cheers William. It sounds like I'm not getting rid of comments properly. For the ones that show up all duplicate, is the comment_type in the database comment?
vafaaaan, you're always better off using the API. The actual relationship is this (with table names taken from vague memory) if I recall correctly:
wp_terms lists all the terms, stores data for them
wp_term_type assigns a type to the terms (so it says whether a term is a tag or a category)
wp_term_relationships links a term to an object, like a post
object_id in wp_terms_relationship is that ex. the post id ?
Hey,
For the comments that have been double posted they do not appear in the database at all.
And btw for the comments that do appear in the database they do not have any info in the comment_type field.
Yess .. i did it..
Wrote some lines that gets a posts TAGS .. how do i proceed ?
<?php
// ------------------------------
// Fetch a WP posts tags by Kent
// ------------------------------
$db_type = 'mysql';
$db_host = 'localhost';
$db_name = 'xxxxx';
$db_user = 'xxxxx';
$db_pass = 'xxxxx';
// Just picked one, for testing.
$post_id = "6";
@mysql_connect($db_host,$db_user,$db_pass) or die ("Couldnt connect to database!");
@mysql_select_db($db_name) or die ("Couldnt select the requested MySQL table!");
$fetch_post_tags = mysql_query("
SELECT
wp_posts.ID AS POID,
wp_term_relationships.object_id AS RELID,
wp_term_relationships.term_taxonomy_id AS TAXID,
wp_term_taxonomy.taxonomy AS TAXONO,
wp_term_taxonomy.term_id AS TAX_TERID,
wp_terms.term_id AS TERID,
wp_terms.name AS HOT_TAG_NAME
FROM
wp_posts,
wp_term_relationships,
wp_term_taxonomy,
wp_terms
WHERE
(wp_posts.ID = wp_term_relationships.object_id AND wp_posts.ID = '$post_id')
AND
(wp_term_taxonomy.taxonomy = 'post_tag' AND wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id)
AND
(wp_term_taxonomy.term_id = wp_terms.term_id)
ORDER BY wp_terms.name ASC
") or die ("Cant fetch data!");
if (mysql_num_rows($fetch_post_tags) > 0)
{
$rowid = 1;
echo "<table border=\"1\">";
echo "<caption>WP posts tags</caption>";
echo "<tr style=\"background-color: #DDEAD5;\">";
echo "<th scope=\"col\">Post ID</th><th scope=\"col\">Tag</th></tr>";
while ($blog = mysql_fetch_array($fetch_post_tags))
{
if ($rowid == 1)
{
echo "<tr><th scope=\"row\">" . $blog['POID'] . "</th>";
}
else
{
echo "<tr><th scope=\"row\"> </th>";
}
echo "<td>" . $blog['HOT_TAG_NAME'] . "</td></tr>";
$rowid++;
}
echo "</table>";
}
else
{
echo "Found nothing!";
}
?>
Please dont kill me.. im no pro coder.. :)
William, that's pretty strange. What do you see without bbsync on?
vafaaaan, if you want more tags help you should ask the wp forums. Note that I wouldn't like to use it for bbsync unless it uses the API.
that was just a test if i understand the relationships between the tables. I can probably write a own plugin that updataes the tags bb_tags etc. but thats not a good solution
What db stuff exists? $bbdb->get_col($sql) .. get_row ? get_array ?
With the plugin deactivated the database still shows only the two comments and again without the comment_type field filled in.
Is their anything I could provide you with to help you help me :)
vafaaaan, take a look at the wpdb documentation. It's mostly the same.
William, no, that's cool. I've got a comment, found the same problem, and trying to figure out where my code is going wrong. But I appreciate all the help you've already given me :)
fel.. cant get any results .. i know the sql string works ( tried in phpmyadmin)
global $wpdb;
if ($taglist = $wpdb->get_results($chk_sql))
{
Edit: nevermind.. was a is_numeric that break the function somehow
Should i continue working on this wp plugin ? or is it just crap/unnecessary ?
ive just updated the file .. my tag array seems dissapear ?
Edit: fixed..
I don't know. It's up to you. It doesn't seem to integrate with bbsync, so I haven't really got anything to do with it?
it was a test plugin .. i tried to understand the db relationships, and i did .. now i know now how to update a post tag .. so there is nothing usable? :) ok
Any clue as to when this *bug* will be fixed?
Not to be pushy but I'm kinda hoping to release a site with this plugin.
Nope. Whenever I figure it out.
Feel free to be pushy. I'm still doing it for myself. :P
At the same time, I do run my own site on bbsync so I am inclined to get it fixed as soon as I can.
any news?
Thanks,
-William
No. If I have news, rest assured that I'll post them here. Subscribing to the RSS feed may be easiest for you.
I'm having a couple of issues:
-Is it just me, or are a few files missing from the package. There are claims in the documents of a
stylesheet and another file outside of bbsync.php.
-When I put the <?php bbrepliestext(); ?> tag in my theme, it shows nothing, then I try <?php felbbreplies(); ?> and I get Fatal error: Call to undefined function felbbreplies() in /Applications/MAMP/taos.htdocs/woodfin/wp-content/themes/default/single.php on line 56
I've integrated WordPress and bbPress with the database and plugins. Is there something I'm missing to make this work, because this is a great plugin.
You must log in to post.