BBCode as topic tagging, parse specific bbcode outside message

Discussion forum for MOD Writers regarding MOD Development.
Locked
olsserik
Registered User
Posts: 155
Joined: Tue Aug 21, 2007 6:18 am

BBCode as topic tagging, parse specific bbcode outside message

Post by olsserik »

Hi,
I´m about to build a simple topic tagging system based on bbcode.

First off, is there any out there?
I´ve searched around but could not find any, please post a link if you know some.

I would like to give my users the ability to tag topics. It would be a simple bbcode e.g:

Code: Select all

[taggert]My tag[/taggert]
That is placed in the textarea when posting a new topic.
The thing I would like to have help with is that I want the bbcode to be shown around the subject title, not in the text message. Im thinking of fetching this unique bbcode and assign it to a new template variable and then add this variable in viewtopic_body.html.

Example:
In viewtopic (in assign_vars):

Code: Select all

'TOPIC_TAG' 		=> (fetch the data of [taggert] bbcode if any, and place it in a variable),
And in viewtopic_body.html:

Code: Select all

<html>{TOPIC_TITLE} - {TOPIC_TAG}</html>
Im asking because Im not familiar with the bbcode system of phpbb but I guess there are good ways to proceed with this.
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: BBCode as topic tagging, parse specific bbcode outside message

Post by Lumpy Burgertushie »

I don't believe you can do it that way. as far as I know, bbcodes only work in the text area of the post.

there usued to be a MOD around here that let you "tag" things. use the forum search in the 3.0 MOD forums.



robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
olsserik
Registered User
Posts: 155
Joined: Tue Aug 21, 2007 6:18 am

Re: BBCode as topic tagging, parse specific bbcode outside message

Post by olsserik »

Hi Robert and thanks for the answer.
Actually I got it working!

It was pretty easy in fact, just a preg_match on $row[post_text] (std sql from viewtopic.php) where it sorts out everything within [taggert]xxxx[/taggert]. Then placed in a variable and sent it out in the template variable as described above.
Locked

Return to “[3.0.x] MOD Writers Discussion”