The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Mentor for Plugins - And Cron Help
Hey everyone!
I have recently done some neat little features for my community which may benefit others. I have currently done all the hard coding myself and have done certain features how I want them. I was wondering if anyone could point me towards an article on making a plugin or maybe walk me through it? I'd love to give back to the community in some way! Thanks! --------------- Added [DATE]1417220241[/DATE] at [TIME]1417220241[/TIME] --------------- In addition to the above request, I have an issue with a CRON task I am trying to do. It isn't being logged, and I'm not even sure that it is actually doing the process each night. Any help would be great! PHP Code:
|
#2
|
||||
|
||||
Well I have not gone through the whole code, but at the end you need something like this.
PHP Code:
|
#3
|
||||
|
||||
So, our community is like an umbrella clans for divisions that operate in specific games. As such, it is important for us to maintain a roster. Divisions also have certain stages. So, the system works like this.
First, we have a system via the ACP where we can add games to the roster. The games possible are based off of a profile field we've added, so for instance: field5 contains the list of all supported games. The possible games you can add to the roster grabs from this field to generate it's list. You then add a short-code for the game (basically what will go after the url, so ?game=shortcode), the title of your in-game name field (Battle.net ID, Steam, Summoner Name, etc), you list what profile field contains that information, and a status for the game. Below is a screenshot. The rest is hard coded. The main roster page is a page of all leadership roles. This would be a setting of "usergroup ids" to determine which groups are leaders, as well as what order they should be in, and the heading. I believe the roster is accessible for all visitors, http://www.zealotgaming.com/forum/pages.php?pageid=15 There is also a sort-order of usergroups on how they display of individual games. For example, admins are community-wide leaders, so we list the leaders of the individual games first on those rosters. Again, this setting could be altered. There is also a list of usergroups who do NOT appear on the roster, such as an inactive usergroup or banned or whatever. Also an easy setting I think to add. So what I think I basically need to save are the following settings: Main Leadership Roster -List of Leader Usergroups in order you want them to appear. (Heading will be the usergroup name) Games List (Or whatever you want to call it) -Profile field that contains the list of possible games/groups -List of different "statuses" or categories for each group -The sorting order of groups you want to use. -List of usergroups you do not want shown on the roster. A lot of these are lists, some of which could be checkboxes or simply have a sort ID number like they do in various other mods. I hope I explained it well. Hopefully it makes sense based on the screenshot and the link. NOTE: I do have the cron log in my code. PHP Code:
|
#4
|
||||
|
||||
Did you try manually running the task, and see if it shows in the log then?
|
#5
|
|||
|
|||
In the Scheduled Task Manager, edit your task and make sure "Log Entries" is set to Yes.
|
#6
|
||||
|
||||
I have done both, still not in the logs.
|
#7
|
||||
|
||||
Friendly bump. I still haven't been able to pinpoint the problem in the cron job that is preventing the log from saving.
|
#8
|
||||
|
||||
I am not sure, you would thing it would log, but for some reason it is not. Kinda hard to tell without actually testing out the whole process.
Is it actually doing what you have it set to do in the cron, if it automatically runs, or you run it manually? Have you checked your server error logs at the time it is supposed to run and see if their are any errors? |
#9
|
|||
|
|||
You have the log function call in a place where it logs rank changes (although I think it should be inside the 'if' statement). Maybe put one at the end (and maybe near the beginning as well) to make sure your task is actually running. (Well, I mean to check if it's a logging problem or some other problem).
|
#10
|
||||
|
||||
I did change the placement of the log statements. After further testing I've determined the process isn't running, or rather when I run it, it doesn't work. I have a page that manually does this if the user visits, and I simply copied the code over and changed it to cycle through each user, which makes me confused. Now I have to determine why.
CRON PHP Code:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|