Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

"simple" module request?


Reply


5 Posts   911 Views

Avatar
feef

Community Member, 19 Posts

7 April 2011 at 10:36pm

I'm VERY stuck for time, so am posting this in the hope that someone can assist.

I am maintaining a website for a club, most of who's communications go via a mailing list. I'm wanting to create an online, browse-able archive of the message posts within the Siulverstripe site I've set up.

I've created a PHP script which connects to the mail server, checks for new mail, and inserts it into the database...

CREATE TABLE `Digest` (
`idDigest` int(11) NOT NULL AUTO_INCREMENT,
`date` timestamp NULL DEFAULT NULL,
`To` varchar(255) DEFAULT NULL,
`From` varchar(255) DEFAULT NULL,
`Subject` varchar(255) DEFAULT NULL,
`Bodytext` text,
PRIMARY KEY (`idDigest`)
) ENGINE=InnoDB

and deletes each message from the mail queue after it's been inserted into the database (I've got a dedicated mail account for the archival process)

All I want is a simple module to take the database content and display the messages in chronological order. Today's messages on one page, and then "older" for each preceding day.

Nice-to-have would be to make it searchable.
"archives" by month

Eventually, I'd also like to include the thread-id to make the relevant threads link up, but I'm not fussed about that right now.

My PHP is rusty at best, and my time is at a premium right now
If it comes to it, I'm willing to pay for this, if anyone's interested.

Avatar
swaiba

Forum Moderator, 1798 Posts

7 April 2011 at 10:44pm

Not really needing a module - ModelAdmin will do this for you.

Create a DataObject that matches the stuff you require storing, then add a default_sort and it'll all be hooked up.

reference...
http://doc.silverstripe.org/sapphire/en/reference/modeladmin
http://www.silverstripe.org/making-a-crm-with-modeladmin-in-silverstripe-230/

Avatar
feef

Community Member, 19 Posts

7 April 2011 at 11:24pm

That all seems to relate to an admin page. If the data is already populated, and I just want to display it, then how does that work? I have no admin requirements. The only thing I can imagine I could use on the admin side is a page "type" where I could create a new page, and then select "digest" from the dropdown such that it displays the digest content at the front end.

As I said, I'm VERY pressed for time :|

Sorry

Avatar
swaiba

Forum Moderator, 1798 Posts

8 April 2011 at 12:30am

probably best to make you email public then for responses... I'd contact some of these folks...

http://silverstripe.org/ForumMemberProfile/show/458
http://silverstripe.org/ForumMemberProfile/show/756
leftandmain.com
http://www.aabweb.co.uk/

I still think you'd be best using a dataObject, then to show on the frontend you can then use a basic template, but if you want to out source contact some of those guys...

Avatar
feef

Community Member, 19 Posts

8 April 2011 at 12:34am

Thanks..
I'll drop them a line