Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#46 2006-01-25 15:53:41

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: PunBB integration?

Ok, this is a first draft on how a “PunBB Comments” plugin would have to work. There is still one big unknown: the format of the datas within the post of the ported article. Is it BBcode, something else ?

I included an automatic post creation even if comments are closed, because I would believe in a system like this some users may stop reading articles in the main web, but only use the forums (especially if it’s a “small website” with a big forum, not unlike our own textpattern.com).

Steps backend

  1. When an article is published for the first time, a new thread is created in a special PunBB forum with the same title as the article, if set to the same excerpt (as the first body paragraphs), the same body. A link back to the article is created at the end of the post, as set to.
  2. If the article’s option “Comments” is set to “off”, the thread is closed.
  3. If the other plugin PunAuthBridge is present and activated, the same author is used. Otherwise, a special common author is used.
  4. If an article is saved again as published, a new export is done (overwriting the previous post, including author is necessary) and the “Modified by XX” is inserted at the end of the PunBB post (core PunBB feature).
  5. If an article is unpublished (saved as draft, hidden or deleted) the thread is silently moved to another special forum

Steps frontend

  1. A link is created with a comment invite, to the appropriate forum’s thread using a tag like txp:PunComments.

txp:PunComments : this new tag would be inserted into a article form, as a replacement for the native TXP tags (so the “Automatically append comments to articles” would have to be set to “no”). It would use a form to display the comments invite and some datas). Attributes:

  • form (the name of the form used to display the comments invite & datas)

Several new tags would be created to use within this form :

  • txp:PunCommentsNum : display the number of replies in the thread (number of comments)
  • txp:PunCommentsLink : the raw URL of the thread

Backend tab menu options :

  • Pun author login (used if PunAuthBridge is not present, override PunAuthBridge is necessary)
  • Forum where to insert the articles
  • Forum where to place unpublished articles’s thread
  • TXP Sections where the article are ported to PunBB
  • Insert excerpts before body or not (choice section by section)
  • Text of the link back from post to article
  • PunBB data (database, base URL, path to, etc.)

Last edited by Jeremie (2006-01-25 15:54:58)

Offline

#47 2006-01-25 17:11:58

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: PunBB integration?

Jeremie,

The big unknown, is this in reference to what the forum is running, bbcode or textile. Or what markup language the article is entered with?

Your outline includes some nice features, especially if the article changes. I use the Nucleus/PunBB bridge and it’s only a one time feed, so if I make a change, I also have to update the forum post.

On the feeding over, can sections and or categories be assigned to certain forums. This way you have the flexibility to design your forum to mimic your site’s layout.

On the author, even if the AuthBridge is not used, can’t the author of the article be used if that person happens to be a member on the forum, or else just use a common author?

Glad to see this coming along, I’m itching to use it already.

Offline

#48 2006-01-25 17:18:39

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: PunBB integration?

hcgtv wrote:
The big unknown, is this in reference to what the forum is running, bbcode or textile. Or what markup language the article is entered with?

Yep. We have two sources… the Textile version, and the xhtml version. PunBB only deals natively with BBcode. So what do we do there ?

On the feeding over, can sections and or categories be assigned to certain forums. This way you have the flexibility to design your forum to mimic your site’s layout.

I thought of that, and this may be a little too much. But if several people want to, we can add that to our request.

On the author, even if the AuthBridge is not used, can’t the author of the article be used if that person happens to be a member on the forum, or else just use a common author?

How the plugin will know what author to used ? We’ll need to create another SQL table and link TXP_author<->PunBB_member. It’s a lot of work and code when another plugin can do the job.

Glad to see this coming along, I’m itching to use it already.

Well, we need to get a consensus over the details of our request, then find a developper who can code it.

Offline

#49 2006-01-25 17:44:27

bauhouse
Archived Plugin Author
From: Abbotsford, BC Canada
Registered: 2004-06-29
Posts: 68
Website

Re: PunBB integration?

These look like great ideas so far. I’ll put my vote in for the suggestions Jeremie made. This would work great for me, but I don’t know about others’ needs:

  • PunBB 1.3
  • MySQL
  • UTF-8
  • Two bridges: authorization / commenting

I take it that these ideas are at the “setting objectives” stage, but that there is yet to be actual development until a developer shows interest in working on this. (Edit: Jeremie, you just answered my question.) If increased interest is what is needed, I am very interested.

Last edited by bauhouse (2006-01-25 17:47:07)

Offline

#50 2006-01-25 18:28:38

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: PunBB integration?

Jeremie wrote:
Yep. We have two sources… the Textile version, and the xhtml version. PunBB only deals natively with BBcode. So what do we do there ?

I would say use the xhtml version for the conversion to bbcode. This way any markup language can be used, whether it’s Textile or any other plugin an author may use.

Offline

#51 2006-01-25 22:50:45

chriloi
Plugin Author
From: Vienna, Austria
Registered: 2006-01-17
Posts: 120
Website

Re: PunBB integration?

As I posted before:

Once you have finished your requirements, I would do the job. But one question hcgtv:

Why do you want to convert xhtml to bbcode? – I would leave the html as it is.

At least there’s no 100% equal implementation of bbcode in all the bulletin boards and its a big thing to convert html to bbcode,… What happens to all the css styles and tags not supported by bbcode?

Next thing is, I would really recommend to wait for punBB 1.3, because with the extension feature a bridge will work independently of what changes are made to punbb in future.

But that’s just my opinion, what do you guys think?

Offline

#52 2006-01-25 23:06:55

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: PunBB integration?

chriloi,

PunBB stores it’s posts with bbcode formatting.

Take a look at punbb_posts, the message field.

Offline

#53 2006-01-25 23:16:14

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: PunBB integration?

Whatever the format, I suspect some smart parsing would be needed. On the top of the list, headers. h1, h2, h3 are commonly used in article. Once published in a forum’s post format, they will break the page semantic.

My suggestion would be to “downsize” the headers to h4 (if allowed by the post’s format) and below (something like h1 and h2 to h4, h3 to h5, h4~6 to h6).

Offline

#54 2006-01-25 23:38:59

chriloi
Plugin Author
From: Vienna, Austria
Registered: 2006-01-17
Posts: 120
Website

Re: PunBB integration?

@hgctv:

You’re right, most bulletin boards store posts as you enter it in the text box. It doesn’t matter if the post contains html, bbcode or whatever. The problem is, when a post is viewed, punBB automatically converts bbcode to html and quotes html tags. But with some coding it shouldn’t be that hard to allow only html that comes over the bridge to not be quoted.

@Jeremie:

In fact no extra parsing is needed. You can do all reformating stuff with just an extra css file.

While the article is rendered in punBB as html it will be enclosed like that:
<code>
<div class=“txpArticle”><some html></div>
</code>
Let’s say you want the h1 tag to be smaller, you just add

.txpArticle h1 {

font-size: 10px;

}

to the css.

Rendering the comments for punBB could be done the same way!!

Last edited by chriloi (2006-01-25 23:41:06)

Offline

#55 2006-01-26 00:25:21

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: PunBB integration?

Nope, I don’t want the h1 to be smaller, that’s the easy part. I want the semantic of the html page of the forum thread view to be correct.

A smaller css size won’t help a vocal browser (for example) find any sense to all that :)

Offline

#56 2006-01-26 10:31:52

chriloi
Plugin Author
From: Vienna, Austria
Registered: 2006-01-17
Posts: 120
Website

Re: PunBB integration?

Ok, now I understand what you mean. But that only belongs to headers, doesn’t it? – I think downsizing this tags by the logic you posted is a good way to keep the semantic.

Offline

#57 2006-01-26 11:50:24

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: PunBB integration?

I think it only apply to headers yes. The others Textiles or HTML tags can be kept or adapted straightforward. AH, no. Another exception : the Textpattern tags included within an article. I think they should be stripped.

Offline

#58 2006-01-26 14:28:30

chriloi
Plugin Author
From: Vienna, Austria
Registered: 2006-01-17
Posts: 120
Website

Re: PunBB integration?

Which textpattern tags should be stripped? – Shouldn’t the article (and also the txp tags) be parsed, before it’ll be send through the bridge?

Another question: What happens to articles that are published with a future date? – Txp only publishes them on page request. That means, if a user goes directly to the forum without viewing txp at least once, there must also be a routine in punBB which calls this txp publishing procedure. Otherwise the article wouldn’t show up.

Offline

#59 2006-01-26 17:43:10

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: PunBB integration?

True for “future” article.

For the TXP tag inside the article body… well if you prefer to, yes. And now that I think of it, it’s better to evaluate them, yes. Plugins like zem_link or img_popper does generate content.

Last edited by Jeremie (2006-01-26 17:43:21)

Offline

#60 2006-01-26 19:34:26

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: PunBB integration?

On the ‘future’ article issue, something I ran into already.

I asked Rickard if he would consider adding some logic to PunBB 1.3 so that posts with future dates don’t appear until the date is reached.

If this is added to PunBB 1.3, then the article can be fed over when entered.

Offline

Board footer

Powered by FluxBB