The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/printthread.php(287) : eval()'d code 2 errorHandler->error
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



UserSpice
Private message system - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Miscellaneous (https://userspice.com/forums/forumdisplay.php?fid=28)
+--- Forum: Off-topic Discussions (https://userspice.com/forums/forumdisplay.php?fid=10)
+--- Thread: Private message system (/showthread.php?tid=447)

Pages: 1 2


Private message system - gaborroos - 02-03-2017

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?




Private message system - mudmin - 02-03-2017

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.


Private message system - gaborroos - 02-03-2017

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 ;


Private message system - mudmin - 02-03-2017

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.



Private message system - gaborroos - 02-03-2017

ok than so that's verry difficult to rewrite
than i need to look on the net to find one with pdo base


Private message system - gaborroos - 02-03-2017

cant find a solution with pdo base can someone help me out?


Private message system - mudmin - 02-16-2017

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.


Private message system - gaborroos - 02-16-2017

you will be great!


Private message system - mudmin - 02-18-2017

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=PLixQt02ELp8onTt1niXUJ6deGTgKpJw2t


Private message system - mudmin - 02-18-2017

If there are particular features you want to see, now is the time to say something!!!