Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Addons/Mods Graveyard

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-10-2009, 01:06 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 10,815
BMR777 is on a distinguished road
Default 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 grabanysetting("settingname"); 
Input Parameter: The name of a setting

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 cancp($usergroup); 
Input Parameter: The user's current usergroup

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 getgroup(); 
Input Parameter: NONE

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 getcurrentimage($id); 
Input Parameter: An adoptable's numerical ID.

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 getcurrentlevel($id); 
Input Parameter: An adoptable's numerical ID.

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 getnextlevelexists($type$currentlevel); 
Input Parameters: The type of adoptable and the adoptable's current level..

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 convertidtotype($id); 
Input Parameters: The adoptable's numerical id.

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. :)
Reply With Quote
 


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
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


All times are GMT -5. The time now is 08:22 PM.

Currently Active Users: 9865 (0 members and 9865 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636