Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Mod Template - Information for Mod Creators of the Adoptables Script
Hello All,
This topic is meant for mod writers of the Rusnak PHP Adoptables Script. This topic provides you some resources that will help you create modifications for the new release and will help you start writing mods for the new release before it is released and after it is released. The first thing I will share with you is the blank file template. This file is a blank slate where you can write your modification code. The file is attached as blank.php below. Now that you have the blank file template, I will list some functions (with example usage) that are available to you when writing your mod to allow you to interface with the new Rusnak PHP Adoptables Script. Rusnak PHP Adoptables Script Functions and Example Usage: Function grabanysetting: Usage: Grabs a setting from the database. Example Code: PHP Code:
Result: (stored in $result) - The value of the setting returned, or blank if error. Function cancp: Usage: Determines if a user can access the site's Admin CP. Example Code: PHP Code:
Result: (stored in $result) - The string yes is returned if the user can access the Admin CP, otherwise no is returned. Function getgroup: Usage: Determines the usergroup of a user. Example Code: PHP Code:
Result: (stored in $result) - The user's current usergroup, as an integer. If the user is not logged in, 0 is returned. Function getcurrentimage: Usage: Gets the current image of a specified owned adoptable. Example Code: PHP Code:
Result: (stored in $result) - The full URL / filepath to the adoptable's image. If the image or adoptable ID is not found, a default image is used. Function getcurrentlevel: Usage: Gets the current level of an owned adoptable. Example Code: PHP Code:
Result: (stored in $result) - The current numerical level of an adoptable. Function getnextlevelexists: Usage: Determines if a higher level exists for a given adoptable or if it is at max level. Example Code: PHP Code:
Result: (stored in $result) - Value true is returned if a higler level exists, otherwise false is returned. Function convertidtotype: Usage: Converts an adoptable's ID to a usable adoptable type, so you can use other functions that require an adoptable type. Example Code: PHP Code:
Result: (stored in $result) - The type of adoptable. I will post more modding information later as we get closer to a release. Mod writers can get started now on writing mods for this new release. :) Posted in the next post is some SQL for the tables and database. :) |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dechiphering the Adoptables Script | Ansem717 | Questions and Supports | 1 | 01-15-2011 06:58 PM |
Adoptables Script + MyBB | Blues | Questions and Supports | 3 | 08-05-2009 06:24 PM |
What can be done with the PHP Adoptables Script! | Seapyramid | Suggestions and Feature Requests | 11 | 07-19-2009 11:16 AM |
Can you put a flash template with a easy adoptable script? | Tezna | Questions and Supports | 2 | 05-26-2009 07:28 PM |
Choosing Adoptables Type [EASY ADOPTABLES SCRIPT ONLY] | Ashje | Addons/Mods Graveyard | 2 | 05-24-2009 03:17 AM |
What's New? |
What's Hot? |
What's Popular? |