Advertisement:

What would be the best way to do this

Aloittaja far2slow, lokakuu 23, 2013, 03:29:53 IP

« edellinen - seuraava »

far2slow

Many of the members on our site have requested a mod something like Yet Another Awards System for vBulletin

The things that we will be adding our

- custom avatar set
- signature set
- profile complete
- posting every day for one month
- posting everyday for 6 months
- posting every day for full year
- Logged in each day for 100 days
- Logged in every day for one week
- Logged in every day for one month

now i should be able to do this, but wanted to ask what would be the most efficient way to do it.

custom avatar set, signature set and profile complete should be easy but the others i am just trying to get my head around the best way to do it.

scheduled tasks running it once a day was my first thought as we are only a small community site with less than 200 members.

anyone just point me in the right direction with the best logic for this.



Ricky.

To be frank it is not clear what you want to do with list your provided,  eg. posting everyday for one month, it means you want automatic posting per day  for whole month hence you want to use schedule task ?

May be you can explain little more, definitely there will be lots of people to help if they can understand what you need...

far2slow

Lainaus käyttäjältä: Ricky. - lokakuu 27, 2013, 01:59:22 IP
To be frank it is not clear what you want to do with list your provided,  eg. posting everyday for one month, it means you want automatic posting per day  for whole month hence you want to use schedule task ?

May be you can explain little more, definitely there will be lots of people to help if they can understand what you need...

reading my post back i guess its not all that clear, will try to explain it better

members get award points for completing goals on the site. 

eg make sure you have a avatar set.  ->  member would get 50 points
member has posted everyday for 100 days -> member would get 300 points each time they do this goal

so in there profile i would add a page with there list of  achievement they have done eg.

posted for 100 days in a row from jan 1st 2013 until april 10th  --  300 points
this sort of goal can be done many times

avatar set 50 points
this goal can only be done once


Maybe i am better of writing the mod and then posting it up here for you all to pull apart and tell me smf will handle it better doing it this way, the reason i ask to start with is i did not want to write it all and find out there is a much more simple way to do it. now i understand that you cant give me all that much info, but any help would be good eg the best way to check if a member has been logged in for 100 days in a row.


margarett

I guess the best way to do all of that is a scheduled task that runs once a day and updates all that informations in the database.

Depending on the number of users you have, it can become quite an intensive task because you will have to fetch, process and update data from all your users...

Anyway, that would be my approach:
- custom avatar and signature are easy to evaluate, complete profile should be a little bit more complex because you need to evaluate the fields you consider relevant for "complete"
- logged in everyday you can evaluate using "last login" field in members table
- post everyday you might need to query the table "messages" for the date of the last post by each user and then see if, day after day, a new post is created

Best of luck. It's some work you've got there :P
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: