SimplePortal

Customization => Custom Coding => Topic started by: xKroniK13x on February 09, 2013, 07:12:33 PM

Title: A Few Shoutbox Mods
Post by: xKroniK13x on February 09, 2013, 07:12:33 PM
Hey guys, I'm new here but not new to coding. I'm a novice in PHP coding, but I definitely know my way around coding for the most part. I have just a couple minor questions. If you could get me on the right path, I'd be very happy!

1. I made a private message feature. I followed this guide, but tweaked it a bit ( http://simpleportal.net/index.php?topic=3568.0 ). Instead of @, I use /pm. So to private message someone in the chat, my users type /pm {username} {message} . I also added a PM button next to each username that you can click and it auto-types it. All of these features work great; however, I'm trying to make the message appear a bit different when it is private, such as just being bold or something. Could someone tell me a good way to detect if the message is private? I tried altering the " unset($shouts[$shout['id']]); " line, thinking it would work, but it didn't!

2. Is there a way to change the format in which the date appears? I changed it to be one line (it is now Author (date): message) but I'd really like to just remove the date, and be left with just the time that it was sent. So no "Today" or anything like that, because the chat is active enough that users know it was posted today.

Any help would be very appreciated! Thanks!
Title: Re: A Few Shoutbox Mods
Post by: xKroniK13x on February 09, 2013, 11:03:42 PM
Through some string finds, I made new formatting. All it does is search the first word of the text. So if the first word is /pm it will automatically format it how I want. So #1 is solved... still lost on 2.
Title: Re: A Few Shoutbox Mods
Post by: telemus on July 11, 2013, 07:22:51 PM
Is there anyway you should share how you made this possible? I would love to add the "PM" option to each shout so a user could click it to pm that person. and also it change to a certain format so you know it's a whisper.. Please respond. thanks!
SimplePortal 2.3.8 © 2008-2024, SimplePortal