2104: Linking to player in messages

Locked
Page
SMR Coder
Posts: 1779
Joined: Sat Dec 07, 2002 9:17 pm

2104: Linking to player in messages

Post by Page »

Does using the [player] bbcode tag work properly? Can you break it?

Examples of correct usage:
[player=3] (where 3 is the player id, also happens to be my player id in Freon's Folly)
[player="3"]
[player id=3]
[player id="3"]
[player id="3" showalliance="yes"]
[player id="3" showalliance=1]
[player id="3" showalliance=0]

showalliance defaults to 0 (doesn't show the player's alliance as part of the link), turning it on adds (AllianceName) to the player name with a clickable alliance link.
Page
SMR Coder
Posts: 1779
Joined: Sat Dec 07, 2002 9:17 pm

Re: 2104: Linking to player in messages

Post by Page »

Bump
Freon22
Beginner Spam Artist
Posts: 3278
Joined: Wed Apr 17, 2002 10:09 pm
Location: USA
Contact:

Re: 2104: Linking to player in messages

Post by Freon22 »

If you add quote " on player id="1" it doesn't work.
[player id="1" showalliance=1]
Testing
testing again

This works
[player id=1 showalliance="yes"]
Testing
testing again

This works
[player id=1 showalliance="1"]
Testing
testing again

This works and it shouldn't because I have a showalliance of 9
[player id=1 showalliance=9]
Testing
testing again

This works but still show alliance link and should not.
[player id=1 showalliance="No"]
Testing
testing again
Page
SMR Coder
Posts: 1779
Joined: Sat Dec 07, 2002 9:17 pm

Re: 2104: Linking to player in messages

Post by Page »

Ok, I added "NO" and "FALSE" to be read as false, by default they'd be converted to true simply due to being non-null/zero strings. I can add other things as well as necessarily but realistically it's best to leave the parameter off if you don't want it :P
Edgecrusher
Newbie Spam Artist
Posts: 512
Joined: Tue Apr 05, 2005 10:23 am
Location: Netherlands

Re: 2104: Linking to player in messages

Post by Edgecrusher »

8 members of [alliance=7] have been spotted attacking c242-3(#1897) in sector #1897. The planet is owned by [player=20], a member of [alliance=15].
Locked