Help - Tag on post and reply

Hello please webmasters i need help i want to add
A tag to my forum


So that user can tag another user on a post or reply
Like @kingsolomon and kingsolomon will get notification that this user tag him on a post
Please am hoping to get a reply soon

[Edit - I removed your email address and redundant second link.]

Not knowing what technology you are using to create this forum, it’s pretty difficult to tell you how to achieve this.

Also, not knowing what you already know makes it hard to know where to start helping you.

There are forum software solutions that already have this feature - such as Discourse, which powers this forum.

Since you’ve already got something up and running, presumably you don’t want to switch software - though, to be frank with you, using Discourse would give you a much more modern looking forum.

I’ve never done this, but essentially I would approach this by thinking along the following lines:

Every time a user posts something, part of my backend script handling it would have to parse it for @mentions

Then, if the @mention is for a valid user, and they are connected (friends, followers, etc, depending on the permissions for your system), then I might push the post to an array like object in the recipient’s database record (depending on your DB setup - if this were Mongo, I’d have it living in the user model, most likely…if SQL based, maybe a separate transactional table?)

Is php code
Please any idea

@JacksonBates please any idea pls

Hi Solomon - the way I’d approach this task is outlined above. Without seeing all your code, I can’t really offer more advice as I have no idea of how you’ve set up your backend.

Also, I haven’t touched PHP in maybe 4 years, Sinai can’t suggest actual code to you.

That said, look again at how you handle forum posts. Before you insert the forum post into your database, parse the content for @mentions and handle that by maybe altering something relevant in the user table for whoever got tagged.

Since you’re probably using MySQL or something similar, it might help you to think of the mentions as their own ‘transaction’. Each transaction would likely have its own ID, a foreign key reference to the posting user, a foreign key reference to the mentioned user, and another foreign key reference to the post - you’d probably have a boolean value for whether it’s been read by the mentioned user too.

Should i send you my php script