Uutiset:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu
Advertisement:

Looking for a similar mod

Aloittaja frediokl, lokakuu 24, 2013, 07:21:11 AP

« edellinen - seuraava »

frediokl

Hi,

I want to create a mod to display daily information either in the sidebar, or as a stick post.

The information can only be entered by a restricted list of members and the information is to be shown for 1 day only. The next day the restricted list of members must enter today's information.

At the moment its being done as a post, but that has become tedious to administer and I would think it could be done automatically via a mod.

The mod is very specific to the board it is to be used on, I doubt it will be of interest to the general community. I'm looking for an existing mode or mods that do something similar that I can use as a starting point.

I'm pretty proficient in php and sql and have written mods for other open source products, mainly Joomla so I don't think coding it will be a problem. In the past I have found it much easier to modify an existing module rather than start from scratch. So if anyone knows of a module that would be a good starting point I would be grateful.

Thanks.

margarett

The biggest issue I see is you always need to enter that information... Being as a post or any other way, it always has to be written.
So, since you have to do it manually, you can choose to do it with existing tools:
- A portal with a block that shows topics/posts from a certain board. Or a custom action for that...
- A scheduled task to prunes or moves topics older than 1 day. You need to create a custom task for this

Or, maybe easier, a custom action featuring post display from the last day only. So you can skip the scheduled task "thing".
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

LainaaOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

frediokl

Weird, I'm sure I replied to your post yesterday margarett. Anyway thanks for the reply, I'll try and reply again!

A little more information about what I want to do... I want a specific list of members to post information on a daily basis, and when everyone in that list has posted their information, a summary is made available to all users.

It looks like the easiest way to achieve what I want is to have a Category that can only be seen / posted to by the specific users. I assume I can do this with a member group? The specific users can then post their daily information to this category.

I would then have another category visible to all where the summary of the information would be posted. I could then have a custom task that runs say every hour and checks if the specific uses have posted their information. When they have all posted it could create a summary post in this category. I am assuming the custom task would be able to create posts? Is there an api to do this? I suppose I could just write it to the database.

Doing it this way, the specific users would have to be careful with the format of their information posts. I would have to use a regex to process the posts and extract the information. This would be open to errors. A better way would be if they could fill in a form rather than a free format post. Is there any way I could do that? Maybe a php custom action to display a form, with another to process it. Is that possible?


margarett

Lainaus käyttäjältä: frediokl - lokakuu 25, 2013, 06:45:05 AP
It looks like the easiest way to achieve what I want is to have a Category that can only be seen / posted to by the specific users. I assume I can do this with a member group? The specific users can then post their daily information to this category.
But then this category would not be visible to the remaining users. But yes, the permissions are easily established with membergroups.
Lainaus käyttäjältä: frediokl - lokakuu 25, 2013, 06:45:05 AP
I would then have another category visible to all where the summary of the information would be posted. I could then have a custom task that runs say every hour and checks if the specific uses have posted their information. When they have all posted it could create a summary post in this category. I am assuming the custom task would be able to create posts? Is there an api to do this? I suppose I could just write it to the database.

Doing it this way, the specific users would have to be careful with the format of their information posts. I would have to use a regex to process the posts and extract the information. This would be open to errors. A better way would be if they could fill in a form rather than a free format post. Is there any way I could do that? Maybe a php custom action to display a form, with another to process it. Is that possible?
To solve both problems at once:
http://custom.simplemachines.org/mods/index.php?mod=1279
(should work in recent versions, just emulate to RC5)
But there are no "drafts" here... So the members who post the information would have to do it "at once".

You can, though, create your own PHP file with SSI integration and run it via a cron job at your server (or create a scheduled task with the same content - no need for SSI here) that:
- fetches posts from a certain category (the "hidden one") within a certain time frame.
- if a topic is, say, locked, it is considered as "final/ready for publishing"
- extracts such topics, deal with the information inside and publishes them in another, general board. If need be, using a different/fixed ID, different from the original topic creator.

This is a possible workaround... Just throwing ideas...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

LainaaOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Advertisement: