Skip to:
Content
Pages
Categories
Search
Top
Bottom

Feeding topics from external source

  • @kentonmr

    Member

    Hi,

    On the site I am developing there is a desire to allow the generation of a new topic in bbPress.

    The site has been written in pmWiki and has access to the bbPress database (for user login)

    As I see it there are 2 options but I’m not sure which would work best if at all.

    1. simply edit the bbPress topics database table and add the relevant fields.

    (would that be sufficient for the new topic to be displayed correctly ?)

    2. fake a submission of the postform using bb-post.php

    ?_wp_http_referer=some_page_on_my_site

    &topic=new_topic_title

    &post_content=some_content

    &tags-input=tag_list

    &forum-id=2

    &postformsub=Send Post

    (will bb-post.php simply block this method ?)

Viewing 9 replies - 1 through 9 (of 9 total)
  • @quicoto

    Member

    If you open the bb-post.php you’ll notice it retrieve the data from $_POST and not from $_GET

    like… $_POST

    Maybe you can change that and use $_REQUEST instead.

    Regards

    @kentonmr

    Member

    Thanks, I already have a way round that one.

    In the main site the “create topic” is a simple button on a blank form POSTing to bb-post.php with the other fields as ‘hidden’ inputs.

    But still not working.

    As may have been gathered the operation needs to be silent or with error handling by the main (pmWiki) site

    I would have preferred to go down option 1 route:

    essentially stripping out most of bb-post into a new ext_post.php

    bb_new_topic()

    bb_new_post()

    bb_add_topic_tags()

    redirect – to site page

    however this does not appear to be enough!

    I would rather not go down the route of having to deconstruct these routines simply to recode them to store the in relevant tables – especially when re-usability should be possible. Besides that requires an understanding of each table in bbPress – something I have not seen documented anywhere.

    @kentonmr

    Member

    OK

    That mini script appears to work in part.

    But. I am astonished that there is no checking in bbPress to see if a topic already exists in a forum before allowing a topic with exactly the same title to be created. Surely this is an important feature and should be handled by bb_new_topic() if only through an optional arg.

    Off to generate my own checking routine ?

    @xevo

    Participant

    Two topics should be able to have the same name since the content can differ, but the subject is the same.

    @zaerl

    Participant

    But. I am astonished that there is no checking in bbPress to see if a topic already exists in a forum before allowing a topic with exactly the same title to be created.

    In a forum is perfectly normal to have one or more topic with the same title. But the slug created is unique cause a number is appended with bb_slug_increment.

    @quicoto

    Member

    @Xevo: I think it should not be the same! SEO, SEO! ;)

    @kentonmr

    Member

    I understand where you come from in that statement.

    However, in some forums (especially one of the forums on the site I am building I do not want users repeating the same topic and would want them to add to the topic that has already been started.

    Ideally with a user friendly warning or a redirect to that previously started topic.

    Anyway a bit of hard coding and some reuse later I have a working button on the main site

    using bb_get_forum() to check that the forum exists before

    testing $bbdb->get_var($bbdb->prepare(“SELECT topic_id FROM $bbdb->topics WHERE topic_title = %s”, $topic_title));

    seems to resolve this issue.

    @kevinjohngallagher

    Member

    @Quicoto

    Respecftully, you’re very wrong.

    SEO in no way shape or form is affected by having the same Post title on a forum (note it’s not the title of the page).

    Search Engines are smart enough to differentiate between pages on a website if they have different URLS.

    You’ve made the same very wrong assumption the original poster had, that by having a post with the same title, that the post title is not checked and given a unique URL. Don’t get me wrong, it’s only been that way for 3 years here on bbPress…

    @KentonMr

    But. I am astonished that there is no checking in bbPress to see if a topic already exists in a forum before allowing a topic with exactly the same title to be created.

    Um, there is.

    Surely this is an important feature and should be handled by bb_new_topic() if only through an optional arg.

    I generally find that people who use the word “surely” have decided something, and think everyone should agree ;-) And the function you reffer to is pluggable, so you can overwrite it to do what you want.

    Given that you’re the first person on this forum in the 3 years I’ve been here to request this feature, or worse, assume it’s already there (even though WordPress/BackPress/every-other-automattic-product handles it the same way as bbPress does); maybe just maybe you should not make so many assumptions.

    Thats not me having a go, its just that you’re opnly going to be disappointed :(

    However, in some forums (especially one of the forums on the site I am building I do not want users repeating the same topic and would want them to add to the topic that has already been started.

    And here we hit 2 issues:

    1) Waaaaaaah. I’ve decided that bbPress should work in the same way as other forums, even though it clearly doesn’t, say it doesn’t, and is far from bloated or as feature rich as these other un-named forums.

    Btw Can i ask what other forums have this feature? (i’m not doubting you, i’ve just never come across it before)

    2) I need X custom feature for MY forums, and bbPress doesn’t have it. Why not? grrrrrr

    $bbdb->get_var($bbdb->prepare(“SELECT topic_id FROM $bbdb->topics WHERE topic_title = %s”, $topic_title))

    If users can create topics, then users will eventually duplicate topics. All you’re doing is assuming that every user will use the exact same title for the exact same subject and all spell the title the exact same way. My friend, thats a very large group of assumptions.

    You’re also assuming that no users will decide that their opinion is v important and deliberately start their own post with a slightly different title – just to get round your warning.

    Or what happens when a subject gets bogged down in a flame war?

    Or when people start taking it off topic?

    Or what happens when people don’t want to wade through 15 pages of “+1” or “lol”?

    That will get harder and harder as your forum grows, especially if it’s got a rather specific subject matter. I can understand where this idea comes from, from a website owner point of view, but the usability and long term goal of the this feature is seriously flawed.

    Users on a forum, by their very nature, want to create new threads. Creating 1 stream of replies for 1 single topic… thats a blog. Forums are “many to many” or “n to n”. To restrict that in any way is to deviate from what the userbase expects, and inherantly, their desire to use the system.

    You come across as very intelligent, and you’ve clearly thought this through from your point of view. Have you thought it through from your users?

    .

    @kentonmr

    Member

    @kevinjohngallagher

    I’ll ignore all the personal rhetoric and slight aimed in my direction and try to respond to the points raised.

    I am new to bbPress (you may have noticed that this is my first topic/post on the forum) so know nothing bbPress, its history, development and evidently tight allegiance to wordpress.

    bbPress was selected because “out of the box” it works, and from what I have seen of the plug-ins they also work well.

    I think my original topic title has been mis-understood by you, and maybe others as well.

    “Feeding topics from external source”

    In the external source users will not have the option to set a topic title it will be predetermined by the PmWiki page that is being edited.

    In fact it is the reverse of the “Blog this” that has been suggested elsewhere though restricted to the same site’s forum rather than the user’s own personal blog.

    Any member has full access to the forums and so is able to start a new topic with a slightly varied topic title. That is not a major issue as the moderators will attend to them. However when posting externally a new topic there is the chance that any editor of the Wiki could initiate the “Forum this” button to start a discussion of that page in the related forum. Therefore without the check the potential of having 100’s of topics created with the same title is great.

    In the end it has been very easy to code – It works well and I will even look at the possibility of including it to generate a warning to users in the forum so that we can cut back on duplicate topics in general.

    Every forum/blog/wiki open to members has to have a set of accepted policies to govern usability. The site is very specialised with nearly 2000 wiki page-topic combinations. The topics are specifically for a parallel discussion about each wiki page. Elsewhere just about any reasonable discussion is possible.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Skip to toolbar