Members: 10,140
Threads: 38,830
Posts: 159,367
Online: 32

Newest Member: Xoote


Old 05.07.2005, 14:00   #1
neilt
Mamber
 
neilt's Avatar
 
Join Date: Mar 2005
Posts: 68
neilt will become famous soon enough
Talking can a module create a database on install?

Hi

I've written a nice module feature that doesn't exist (probably going to need to be ported to a component) which takes a parameter (days) and emails authors when their pages are due to expire (x) days in advance, then once a day until expiry.

It also keeps a nice list module in administrator view.

1) Unfortunately at present this works manually when an the /administrator site is logged into (which would need to be once a day)

2) It has a very small database to hold the id and date of each 'warned' content so they are only warned once a day. This database can only be created automatically via a component install, is that right? or can I do this in the modules XML

3) Can I automate the running of this module so it is independant of Admin login? I've tried just the script on a Win scheduled task but as It's not been able to log in it's not run.

================

Would like to know if there are any developers who would like to help take this further, perhaps into a component to really assist the whole Mambo community?

Neil
neilt is offline   Reply With Quote
Sponsored Links
Old 05.07.2005, 15:45   #2
scox
Expert Mamber
 
scox's Avatar
 
Join Date: Jan 2005
Location: Graz, Austria
Posts: 288
scox is on a distinguished road
Send a message via ICQ to scox
Default Re: can a module create a database on install?

my way:
- creating a component cause of the tables you need.
- create a php file which will trigger the mail event (it only has to call your function.. and create a dummy mambo enviroment)
- create a cronjob or windows schedule that will open the php file you created for this purpose
this will trigger the mail-send event and done...
- secure the folder where this php file lies, with some password restriction or something like that

another thing would be to use the robot.txt and wait wor a indexing routine.... (not shure if this can be done taht way ^^)

OR
trigger the event from the frontend
someone will open your site during the day ... i hope ^^
__________________
www.rent-a-ninja.org ... so you don't have to!

Mambo Open Source Development Team
http://opensourcematters.org/
scox is offline   Reply With Quote
Old 05.07.2005, 15:52   #3
neilt
Mamber
 
neilt's Avatar
 
Join Date: Mar 2005
Posts: 68
neilt will become famous soon enough
Default Re: can a module create a database on install?

cheers scox, I'll have more of a play then post it for all to use. Maybe a requirement for v5 if not already included.

Neil
neilt is offline   Reply With Quote
Old 05.07.2005, 16:05   #4
scox
Expert Mamber
 
scox's Avatar
 
Join Date: Jan 2005
Location: Graz, Austria
Posts: 288
scox is on a distinguished road
Send a message via ICQ to scox
Default Re: can a module create a database on install?

? don't get it..... (my english skillz sukkors ^^)
why? what? for all to use?

if your site is opened, you check if there are mails to send, or if the mails for today have already been sent.... then send the rest


i'd say that every user can set the days untill he wants to be notified....
__________________
www.rent-a-ninja.org ... so you don't have to!

Mambo Open Source Development Team
http://opensourcematters.org/
scox is offline   Reply With Quote
Old 05.07.2005, 16:08   #5
neilt
Mamber
 
neilt's Avatar
 
Join Date: Mar 2005
Posts: 68
neilt will become famous soon enough
Default Re: can a module create a database on install?

sorry, didn't mean for all my users, I mean I'll clean my code and submit for any other interested Mambo users

Neil
neilt is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Module install auto create db table ericelbow Mambo 4.5.1 'How Do I' Questions 0 04.05.2005 23:34
How do I install an Administrator module? funnycowboy Module 'How Do I' Questions 2 02.05.2005 01:29
Newbie. Create Module or Component or Both? miguelingv Module Development 0 07.10.2004 16:46
I need to create module for entering data into database thepanu Module Development 2 26.08.2004 07:50
Install extra module need help !!! sportstoto3368 Mambo 4.5 Installation and Upgrades 1 11.07.2004 12:24


All times are GMT +2. The time now is 09:59.

Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.