Why the $uid in [img:$uid]? and unclosed BBcodes

This forum is now closed as part of retiring phpBB2.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
atnbueno
Registered User
Posts: 39
Joined: Sun Aug 03, 2003 5:26 pm
Location: Spain
Contact:

Why the $uid in [img:$uid]? and unclosed BBcodes

Post by atnbueno » Wed Sep 07, 2005 5:47 pm

Hello all.

I've done my own BBcode MOD, [spoiler], and it seems to work without problem (using the Multi-BBcode MOD). But I've noticed other BBcodes include a $uid when messages are stored in the database.

What is that $uid for? I'm guessing it has something to do with the field bbcode_uid of the posts_text table :?

And another doubt about BBcodes: Is it possible to do an "unclosed" BBcode? I'm thinking about a [clear] BBcode to solve clearing problems after [img=left] and [img=right] (another BBcode I'm using).


Thanks in advance,
Antonio B.
mundoplus.tv - Televisión por Satélite en España

Afkamm
Registered User
Posts: 178
Joined: Fri Sep 06, 2002 6:57 pm
Location: Britain
Contact:

Re: Why the $uid in [img:$uid]? and unclosed BBcodes

Post by Afkamm » Thu Sep 08, 2005 6:57 pm

atnbueno wrote: I've done my own BBcode MOD, [spoiler], and it seems to work without problem (using the Multi-BBcode MOD).

Incase you didn't know, there are already a few spoiler tags out there.
atnbueno wrote: What is that $uid for? I'm guessing it has something to do with the field bbcode_uid of the posts_text table :?

Has been asked before, see here. :)
Marc :)

atnbueno
Registered User
Posts: 39
Joined: Sun Aug 03, 2003 5:26 pm
Location: Spain
Contact:

Re: Why the $uid in [img:$uid]? and unclosed BBcodes

Post by atnbueno » Thu Sep 08, 2005 9:34 pm

Hi,
Afkamm wrote: Incase you didn't know, there are already a few spoiler tags out there[...]

Oh, I know. I looked all of them, but I wanted something else.
About bbcode_uid, Afkamm also wrote: Has been asked before, see here. :)

Thanks for the link, but I'm not sure I understood what it does. My [spoiler] tag doesn't have $uid and it's parsed :?


Regards,
Antonio
Antonio B.
mundoplus.tv - Televisión por Satélite en España

alcaeus
I've Been Banned!
Posts: 431
Joined: Wed Nov 19, 2003 1:12 pm

Post by alcaeus » Fri Sep 09, 2005 2:11 am

In order for it to have a bbcode UID, you have to first-pass (bbencode_first_pass) it, and then second-pass it before showing it to the user (bbencode_second_pass). If you parse the [spoiler] BBCode in bbencode_secon_pass() without a bbcode_uid, it will be seen as correct (of course) ;)

Greetz
alcaeus

Post Reply

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