1. Where can I download the base files?
An example PHP file?
Can I use HTML in my API Pages?
Yes, with a couple of exceptions. Certain HTML tags have been restricted and will not be displayed, these include form fields, objects, and certain styling HTML. This is for security reasons.
0 out of 0 found this useful.
Can I use Javascript in my applications?
No, due to the security issues around this, currently we do not allow javascript to be used.
0 out of 0 found this useful.
How can I detect how my application is being loaded?
In the data returned by get_session_data(), one array key returned is 'mode' with a value of either..
WEBPAGE :- This means the application is being loaded the full screen webpage in the Application section.
POPUP :- This means the application is being loaded from the popup box found in the application menu bar at the bottom.
WIDGET :- This means the application is being loaded from a profile widget box.
0 out of 0 found this useful.
How can I invoke my application popup to load?
Use [POPUP]Text here [/POPUP] to have a link that opens your application popup. You can detect from your PHP if its being accessed by the popup window by using ['mode'] from the get_session_data function.
0 out of 0 found this useful.
How do I accept payments?
You can accept up to 25 Isla's in one transaction via the ClubTropica API. You can increase this limit by contacting Customer Support provided you have a valid reason. Each time you load a payment link or button, you must create a "Payment request". Each payment request is displayed on your ClubTropica Online Banking, and has an amount and description assigned to it. You can only have Payment requests sent to the application owner. Firstly, you must create this request by using:
$id=payment_id($sessionid,$cost,$description)
This returns an ID number for your purchase, with this ID number, store it in the database if you wish to offer multiple different buy now buttons on a page and assign the items to the ID provided (We only send the ID on successful payment).
To create the button in your page use either:
[BUY=$id]text or image here[/BUY]
or
[PURCHASE=$id]
When the user clicks the button and completes payment, we will forward the user to your api default URL and append to the URL a GET variable called 'purchase'.
'purchase' = The value here is the same ID number you created previously when declaring "payment_id".
if(isset($_GET['purchase'])){
if(check_payment($sessionid,$_GET['purchase'])==true){
}
}
Check payment will verify if the payment_id has been accepted and successfully charged, if false, means the payment has not been successful yet.
0 out of 0 found this useful.
How do I add Flash/Shockwave to my application?
You can add flash/shockwave, including multiplayer games using both technologies, by using a [WINDOW] code, or an iframe. Please look at [WINDOW] and use standard HTML coding for these pages.
0 out of 0 found this useful.
How do I create a form?
Due to security issues, you can not use standard HTML to create forms. Instead, you must use the following syntax. (Your form does not need to have a
How do I ensure only users who have paid/installed my application can use it even if on anothers profile?
If you at [INSTALL] at the top of the file, no matter what profile page the application is on, the user will not be allowed to use the application unless they install/purchase the application.
0 out of 0 found this useful.
How to I make sure only logged in users use my application?
You can force users to login to ClubTropica before using your application by ensuring you place [LOGIN] at the top of each files output. Don't worry, we will strip this out of the output if they are logged in!
0 out of 0 found this useful.
Must I use NuSOAP and PHP?
No, our system currently is tested to only work with the PHP NuSOAP. However, if you wish, you may construct your own SOAP calls to our services however not every SOAP method is supported. You are also allowed to use any programming language so long as it is web accessable.
0 out of 0 found this useful.
What about iframes?
You can use iframes on ClubTropica API's by using the following syntax:
[WINDOW WIDTH=500 HEIGHT=100 SRC="http://www.yourapiurl.com" SCROLLING="auto"]
Please note, that the max width is 540 and height is 800 (same size as API full page), and the SRC can only be within your specified application URL. You are permitted to use any coding, flash, and objects within your iframe but please remember that these can be vetted and removed at any time. Anyone caught abusing an iframe will be banned permamently.
0 out of 0 found this useful.
What does ct_get_user_age do?
ct_get_user_age allows you to get a users age. Please note however, you can only get the age of a user who has installed your application and has not revoked the right for your application to view this information.
0 out of 0 found this useful.
What does ct_id_from_username do?
ct_id_from_username allows you to get the Username of a User ID sent via the API.
0 out of 0 found this useful.
What does ct_online_status do?
ct_online_status allows you to view the current status of a User ID specified. You can only view the status of a user who has installed your application and has not revoked your right to view this information.
0 out of 0 found this useful.
What does ct_send_update do?
This allows you to send an update feed against a user. You send your Session ID, the User you want the update feed against, the message, and the initiator who caused this Update to occur (Or "API" if it was a system feed).
In the message however, each feed starts with "App Name: [Username]" automatically. If you want however to add another persons clickable username in a feed, you must use the syntax {U:userID} for example {U:1} for James in a link to my profile to come up.
0 out of 0 found this useful.
What does ct_username_from_id do?
ct_username_from_id allows you to send a User ID via the API and returns the username attatched to that User ID.
0 out of 0 found this useful.
What does ct_users_friends do?
ct_users_friends allows your application to access the specified User ID's friends both username and User ID in array format. You can only get this data if the User ID has installed your application and has not revoked your right to access this information.
0 out of 0 found this useful.
What does [vp=x]Link Name[/vp] do?
[vp=x]Link Name[/vp] gets replaced in your HTML with an active link to the profile page of User ID x with the link name speicfied inside the tags.
0 out of 0 found this useful.
What does {U:x} and {ID:x} do?
{U:1} - Will replace the User ID 1 for the username James in your HTML where ever you place this.
{ID:James} - WIll replace this in your HTML with the User ID of username James.
0 out of 0 found this useful.
What is ct_auth_api?
This is a function that must be called at the start (Or ct_auth_api_user). When called, you send your API Login and Secret and you will get a session ID returned. With this session ID, you will be permitted to complete any actions permitted by sending this session ID. Without this session ID, you can not call any other SOAP calls.
0 out of 0 found this useful.
What is ct_auth_api_user?
This must be called at the start of the script (or ct_auth_api) with the applications username, secret, and also the Session ID sent to your script via POST variable "appsessid". This will return a session ID and allow you to use any API functions linked to that users account. For example, you will be permitted to send an Update Feed against that user if you send that session ID, you wouldn't be able to however if you only used ct_auth_api. This will also return more information about the person viewing the application aswell, aswell as information as to who's profile they are using this application on.
0 out of 0 found this useful.
What URL do I action API calls to and what do I need to send?
http://www.clubtropica.com/developer/api
To this URL, you must also send an action, your API Username, API Secret Code, and if appropriate, a Session ID too.
0 out of 0 found this useful.
Where can I get further support or suggest additions/idea's?
To suggest an idea of an application to add to our catalogue, please goto http://www.clubtropica.com/api/home/ and click "Suggest an Idea"
To get support with the API System, or any other idea's or suggestions please submit a ticket here under the category "API Development",
http://www.clubtropica.com/help/contact
0 out of 0 found this useful.
Why do some URL's give a warning and load in a popup?
This is because some URL's are external to ClubTropica and not part of the application. Because of this, as a security precaution we ensure the users are happy surfing to a 3rd party URL before comitting them to do so.
Some URL's however are perfectly acceptable and do not load the Pop-up or alert window, and these include ClubTropica Profile pages and ClubTropica Main Application pages.
0 out of 0 found this useful.
Why does the flash file go on top of everything?
Because you have not set wmode as transparent. You can do this by applying the variable wmode with the value transparent inside the object. Or if you are using SWFObject use: so.addParam( "wmode", "transparent" );
0 out of 0 found this useful.