BBCode as topic tagging, parse specific bbcode outside message

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

BBCode as topic tagging, parse specific bbcode outside message

Post by olsserik » Mon Sep 21, 2015 12:23 pm

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: 63196
Joined: Mon May 02, 2005 3:11 am
Contact:

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

Post by Lumpy Burgertushie » Mon Sep 21, 2015 1:42 pm

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
I am available for custom work on a donation basis. Please send me a PM with your needs.
Premium phpBB 3.2 Styles by PlanetStyles.net

New phpbb 3.0 support site

olsserik
Registered User
Posts: 154
Joined: Tue Aug 21, 2007 6:18 am

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

Post by olsserik » Mon Sep 21, 2015 5:47 pm

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”

Who is online

Users browsing this forum: No registered users and 23 guests

cron