Delete messages after a week is that possible

Darien Brown Posted in General Discussion 5 years ago

I think old messages are filling up my website is there a way to set it to delete messages after a week

Replies
German Michael Zülsdorff Replied 5 years ago

How crazy is that: Suggesting changes to a user on this low-level basis, and later coming to the conclusion that this user obviously has no idea about the system?!?

@Darien
Don't do this under no circumstances as it may leave orphan records in other Ossn database tables.

us Rishi B Replied 5 years ago

just make a shell script or command line php script that connects to your mysql db and removes messages older than a week. you can find all such messages by running the query: SELECT * FROM ossn_messages WHERE TIME >= NOW( ) - INTERVAL 7 DAY from phpmyadmin or whatever you use to connect to your database. Then change the 'select *' to 'delete' and put it into a command line script and add it to your crontab.

Also, it's rather rude to speak to people on here as if they are obligated to help (the multiple replies like "have you looked into this yet" after Arsalan told you the speed issue is likely due to your hosting, not a filled up database). It also doesn't seem like you've gone through the basics of how ossn works as Arsalan told you to look into the ossn_messages TABLE and you interpreted this as 'component' (these are 2 entirely different things and totally different concepts in ossn). This is an open source community where all of us donate our time freely to help others. If you want to hire someone to help you on a more professional basis, there are several people who do that here (including me, email is in profile).

jm Darien Brown Replied 5 years ago

Have you looked into this as yet

jm Darien Brown Replied 5 years ago

Actually its a dedicated VPS and ads are for making money

Indonesian Arsalan Shah Replied 5 years ago

Looks like free hosting with alot of ads showing in your website.

jm Darien Brown Replied 5 years ago

Https://freakyja.online check out my website tell me why it's so slow

jm Darien Brown Replied 5 years ago

So if I look in the component is it self explanatory cause I know one mistake and the website will crash

Indonesian Arsalan Shah Replied 5 years ago

Yes you can create it , just look into ossn_messages table you may write a scheduler for your system.

(i'll try to create a component later to do this via administrator panel as touching the database is highly discouraged)

Premium Version

Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.

$199 (Life Time)
Learn More

Other Questions