BBcode Private message

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.
Steel Rat
Registered User
Posts: 64
Joined: Mon Mar 24, 2003 10:40 pm
Location: Oak Harbor, WA
Contact:

BBcode Private message

Post by Steel Rat »

Wondering if anyone has tried something like this. Here's what a user requested.

The ability to make part of a posted message visible only to a certain individual. It would obviously have to stand out like quoted text, and singified in some way like

Steel Rat whispers to you: I like this private note thingy.

Only the sender and signified recipient should be able to see it, meaning even admins can't se it just because the're admins.

I'm thinking this would need to be BBCode, so that maybe something like

[privmsg=steel rat]I like this private note thingy.[/privmsg]

would be the syntax. Some might ask why would you want such a thing? Well, my phpbb forum is dedicated to Role playing, so passing a note to the DM or back to a player without having to go to a separate private forum, or private message. It also maintains continuity in the story line.

Thanks!
phpquery
Registered User
Posts: 6
Joined: Wed Nov 10, 2004 2:19 am

Post by phpquery »

Oh nice one !! :D
Steel Rat
Registered User
Posts: 64
Joined: Mon Mar 24, 2003 10:40 pm
Location: Oak Harbor, WA
Contact:

Post by Steel Rat »

hehe, glad you like it. Maybe someone could do this, I don't have the time or the skills.
Tribal_Gecko
Registered User
Posts: 54
Joined: Wed Jan 19, 2005 10:34 pm

Post by Tribal_Gecko »

Has anything like this been done yet? I could really use it for my RPG forums....
Steel Rat
Registered User
Posts: 64
Joined: Mon Mar 24, 2003 10:40 pm
Location: Oak Harbor, WA
Contact:

Post by Steel Rat »

lol, yeah, that's the same reason I'm looking for it.
sonyboy
Registered User
Posts: 2980
Joined: Thu Oct 07, 2004 2:10 am

Post by sonyboy »

this is like in IRC chatroom.
Steel Rat
Registered User
Posts: 64
Joined: Mon Mar 24, 2003 10:40 pm
Location: Oak Harbor, WA
Contact:

Post by Steel Rat »

Something like that except at a forum level, being able to place private text within an otherwise public post.
Cenobitez
Registered User
Posts: 118
Joined: Tue Aug 31, 2004 1:05 pm

Post by Cenobitez »

it would be remarkebly difficult to write the bbcode apect or get the members name, im not sure u could do it that way.

There is an Admin user switch in the code that says "If user ID=0 (admin) then show this
this and this
end of admin view"

I dont see a major reason why it couldnt be made to work on any user, altho the username would have to be converted to the user id and parsed,

I dont know enough to write the mod but i do know its VERY possible and be a cool lil mod :)
Tribal_Gecko
Registered User
Posts: 54
Joined: Wed Jan 19, 2005 10:34 pm

Post by Tribal_Gecko »

Well I definatly throw my vote in for it. It would be a huge help for me. I imagine others could find use for it as well. As it sets, PM's work, but are a pain, and it would be a lot easier, and a time saver to be able to do so in the post itself. RPoL.net has a feature exactly like this, which is done through BBCode. They don't use any sort of phpbb board though. i think theirs is all custom. But anyway....my vote is in :P

Any Mod developers out the up to the challenge?
sonyboy
Registered User
Posts: 2980
Joined: Thu Oct 07, 2004 2:10 am

Post by sonyboy »

This idea is so great that it inspires me to take action. But the thing is I'm not a guru nor amateur in PHP or phpBB.
Last edited by sonyboy on Thu Jan 20, 2005 7:03 am, edited 1 time in total.
Tribal_Gecko
Registered User
Posts: 54
Joined: Wed Jan 19, 2005 10:34 pm

Post by Tribal_Gecko »

Well, I am about as skilled as a turtle at the moment. I have only just started to dabble in php, and have no clue where to even begin something like this, lol. Hopefully it will inspire one of the developers...
sonyboy
Registered User
Posts: 2980
Joined: Thu Oct 07, 2004 2:10 am

Post by sonyboy »

Well, you could start by download a MOD that add new bbcode and then follow the concept.
User avatar
stickerboy
Former Team Member
Posts: 7349
Joined: Mon Mar 29, 2004 2:27 pm
Location: Airdrie, UK (127.0.0.1)
Name: Kenny Cameron
Contact:

Post by stickerboy »

Great idea for a MOD by the way - i wis KMR awards were still on the go :P
Should definately be possible to do:
I would think editing the existing BBcode for quote - as it already has usename recognition in it. After that it would be a case of telling it what to sho as the desired output (ie. text - Steel Rat whispers to you) and setting an if statement - a lá, if the user reading the post isn't the use the [privmsg] is to, then it won't show.

I've nearly convinced to try making this 8O :P
what do you guys think?
I'm a web-designing code-decrypting tech-support musician
|| Twitter || Flickr || phpBB Snippets ||
Formerly known as cherokee red
Rocketeer
Registered User
Posts: 108
Joined: Thu Sep 06, 2001 11:43 pm
Location: Coventry, UK
Contact:

Post by Rocketeer »

Anything you like wrote: I would think editing the existing BBcode for quote - as it already has usename recognition in it.

Sadly, there's no actual username lookup for quotes - you can put absolutely anything between the "" marks.

This is a really clever idea for a mod though... the place to start would be any of the (well written) new BBCode mods - I remember installing about a dozen of them, and there were some very well written ones that made adding another couple a piece of cake.

Then it's just converting a username to userid. The code for this definitely exists - have a look at the code for sending private messages.

Finally, as you say, there's a simple if statement that checks the userid and displays the text as necessary. I guess you'll also need a language pack string for " whispers to you: "

Hmm... now all I need is a reason to include this on a non-roleplay board... let me think...
Steel Rat
Registered User
Posts: 64
Joined: Mon Mar 24, 2003 10:40 pm
Location: Oak Harbor, WA
Contact:

Post by Steel Rat »

Rocketeer wrote:
Anything you like wrote: I would think editing the existing BBcode for quote - as it already has usename recognition in it.

Sadly, there's no actual username lookup for quotes - you can put absolutely anything between the "" marks.

This is a really clever idea for a mod though... the place to start would be any of the (well written) new BBCode mods - I remember installing about a dozen of them, and there were some very well written ones that made adding another couple a piece of cake.

Then it's just converting a username to userid. The code for this definitely exists - have a look at the code for sending private messages.

Finally, as you say, there's a simple if statement that checks the userid and displays the text as necessary. I guess you'll also need a language pack string for " whispers to you: "

Hmm... now all I need is a reason to include this on a non-roleplay board... let me think...


RPOL is where I got the idea, so I can't take credit for it in that respoct. My users have been beating me over the head to have this type of feature, lol.

I know a little PHP, enough to be dangerous, and I have considered trying this myself, but always balk at the actual doing. One reason is that I'm still on 2.0.4, because I have some home-grown mods that I don't want to have to do all over again for a newer version (too much has changed from 2.0.4 for me to try and make the update to current manually).

Anyway, my thoughts on how this might work are as follows:

Using BBCode (since this seems to be the way to do it), the poster would enter something like the following:

Code: Select all

[privmsg='Steel Rat', 'Sithlord', 'Wyzzer']Only three of us can see this part of the message.[/privmsg]
And when the respective user goes to read the post, that's when the username matching comes into play. If the current user isn't in the list of privmsg recipients, then he can't see it, plain and simple. So there would be no need to add any lookup capability at the time the post is made, only when it's read.

Of course this approach has some problems, in that users might mis-type a name and never know it. So perhaps a lookup box such as that used in the admin panel for finding users might help?
Post Reply

Return to “[2.0.x] MOD Requests”