The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.18 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Private message system
#1
Is there someone that have a private message system and will share code?
becouse i have a new cool site til now, but i miss a option like this.

can someone help me out?

  Reply
#2
I think it would be relatively easy to create. Here is a "public" messaging system where members of our our staff can post encouraging things.

http://pastebin.com/BM9e0yqs

The biggest thing you would have to change is create a column for to and one for read/unread. From there you could build out the other features you need.

We could talk through it if you need more help.
  Reply
#3
thanks for your message

i had already integrated some code (RAW)
maybe some will help me out make the basic working
i know the coding is not the best but i wil optimize if working

http://pastebin.com/4HPm7fTx

http://pastebin.com/DAmJ8jsq

CREATE TABLE IF NOT EXISTS
Code:
messages
(
Code:
id
int(11) NOT NULL AUTO_INCREMENT,
Code:
title
varchar(255) DEFAULT NULL,
Code:
message
text NOT NULL,
Code:
from
int(11) NOT NULL,
Code:
to
int(11) NOT NULL,
Code:
from_viewed
tinyint(1) NOT NULL DEFAULT '0',
Code:
to_viewed
tinyint(1) NOT NULL DEFAULT '0',
Code:
from_deleted
tinyint(1) NOT NULL DEFAULT '0',
Code:
to_deleted
tinyint(1) NOT NULL DEFAULT '0',
Code:
from_vdate
datetime DEFAULT NULL,
Code:
to_vdate
datetime DEFAULT NULL,
Code:
from_ddate
datetime DEFAULT NULL,
Code:
to_ddate
datetime DEFAULT NULL,
Code:
created
datetime NOT NULL,
PRIMARY KEY (
Code:
id
)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
  Reply
#4
All of that code is not PDO, so you can definitely use it if you just want to create the db connection manually, but it would not integrate as tightly into UserSpice's other classes.

Looking at that code, I think it would be faster to just rewrite it. That's just my opinion. I don't even really know that you need a class at all. These functions could just go into the custom functions, in /usersc

If it were me, I would start with that wall thing and build those functions out to be what you want, rather than working backwards from an older class. Just my opinion.
  Reply
#5
ok than so that's verry difficult to rewrite
than i need to look on the net to find one with pdo base
  Reply
#6
cant find a solution with pdo base can someone help me out?
  Reply
#7
I'm going to write this into the core of userspice...hopefully on Saturday. I'll make a video series about it. I think it will be a fun project.
  Reply
#8
you will be great!
  Reply
#9
I'm going to be out of town today, so I won't be able to get to the messaging system today, but I'm pushing for Monday.

I'm 16 videos into the series. As I get closer to the end, I'll make everything look prettier.

https://www.youtube.com/playlist?list=PL...eGTgKpJw2t
  Reply
#10
If there are particular features you want to see, now is the time to say something!!!
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)