Arkadaşlar, Aldığım scriptin kurulumu ingilizce dille anlatılmış ancak ben kurulumda başarılı olamadım.
Şu kelimelerin anlamı nedir? Ne denmek istenmiş? NE yapmam gerekiyor bana yardımcı olur musunuz?
Kurulum Aşağıdaki gibi anlatılmış...
Installation Manual:
1. Upload the folder of 3dcity to your site directory,
for example www.mysite.com/3dcity, if your site is in the root of the server,
or www.mysite.com/dating/3dcity, if your site is in the folder dating of your domain.
2. Then you will need to integrate 3D City into your web-site. The link from your site must be to 3dcity/3dcity.html.
Or to the file 3dcity/3dcity.php, if you will be using php. (asp, perl, the same actions for all).
Rename 3dcity/3dcity.html to the one you need or leave it as it is, depending on the language and settings your system uses.
3. Open that file. In the 19-26 lines you will be able to see the following:
QuestActiveX.SetChannelText("baze connection", "script_host", "%ABSOLUTE_URL%/3dcity/");
QuestActiveX.SetChannelText("baze connection", "script_db", "3dcity2.php");
QuestActiveX.SetChannelText("baze connection", "script_money", "money.php");
QuestActiveX.SetChannelText("baze connection", "script_music", "music.php");
QuestActiveX.SetChannelText("baze connection", "script_music_add", "music_add.php");
QuestActiveX.SetChannelText("baze connection", "script_music_list", "music_list.php");
QuestActiveX.SetChannelText("baze connection", "script_music_current", "music_current.php");
QuestActiveX.SetChannelText("baze connection", "My_nickname", "%USER_NAME%");
QuestActiveX.SetChannelValue("baze connection", "My_gender", %USER_GENDER%);
QuestActiveX.SetChannelValue("baze connection", "My_age", %USER_AGE%);
QuestActiveX.SetChannelText("baze connection", "My_country", "%USER_COUNTRY%");
QuestActiveX.SetChannelText("baze connection", "My_city", "%USER_CITY%");
QuestActiveX.SetChannelText("baze connection", "My_avatar_adress", "%USER_AVATAR_URL%");
The variables which are being transferred to 3dcity are located between %% symbols. Let's describe each of them:
%ABSOLUTE_URL% - the absolute URL to your site, for example http://www.mysite.com or http://www.mysite.com/dating (http:// is obligatory!)
%USER_NAME% - username, with which the person will enter the 3D City. For example: Mike or John Anderson.
%USER_GENDER% - user's gender, 1 - male, 0 - female.
%USER_AGE% - user's age. Must be one digit with type integer.
%USER_COUNTRY% - user's country. For example United Kindom or United states.
%USER_CITY% - user's city. For example New York.
%USER_AVATAR_URL% - the absolute URL to the user's avatar or photo. For example: http://www.mysite.com/dating/photos/photo_mike.jpg
In other words you will get something like following:
QuestActiveX.SetChannelText("baze connection", "server_url", "http://www.mysite.com/dating/3dcity/3dcity2.php");
QuestActiveX.SetChannelText("baze connection", "My_nickname", "John Anderson");
QuestActiveX.SetChannelValue("baze connection", "My_gender", 1);
QuestActiveX.SetChannelValue("baze connection", "My_age", 28);
QuestActiveX.SetChannelText("baze connection", "My_country", "United Kindom");
QuestActiveX.SetChannelText("baze connection", "My_city", "London");
QuestActiveX.SetChannelText("baze connection", "My_avatar_adress", "http://www.mysite.com/dating/photos/photo_john_anderson.jpg");
4. There is a sample of such a file in 3dcity.php. You can add there settings depending on your scripts specifications.
5. Besides of it there is a file 3dcity2.php. That file exists for the license check.
If your server doesn't have an ability to work with PHP, you can rewrite it in the supported programming language (java, asp, perl).
If your server's specification needs that file to be located in another place, write that location's URL in 3dcity/3dcity.html,
For example with such a line:
QuestActiveX.SetChannelText("baze connection", "server_url", "http://www.mysite.com/otherfolder/request.asp");
If you will be rewriting that file in your programming language, you should know what it does.
1) That file is making a request through http protocol and is reading the consistance of the URL:
http://abledating.net/coder/code.php...omain=%DOMAIN%, where %DOMAIN% - is the domain name of your site, for example mysite.com.
It is important that in %DOMAIN% shouldn't be either http:// or www, and there shouldn't be mentioned any subfolders (for www.mysite.com/dating you will just write mysite.com)
2) Is showing the received data into browser.
6. Akso there are scripts config.php, money.php, music.php, music_add.php, music_current.php, music_list.php. To all of them is added a set of parameters by method GET. Let's write about each of them in details so that you can create their analogies in other languages, if needed.
config.php - it's just a configuration file, which inclides in all the remaining scripts. It determines whether 3DCity is installed like a separate package, or is it integrated into AbleDating / AbleSpace. Depending on this, it uses a base of AbleDating / AbleSpace to display lists of music and the preservation of the money amount of the user, or uses stubs, which you can rewrite if you wish and use the base of your script or site.
Depending on the parameters in the configuration file all other scripts are arranged as follows:
if ($ is_stand_alone) (
...
) else if ($ is_abledating_3) (
...
) else if ($ is_abledating_2) (
...
)
That is, if you have 3DCity as a separate package, you are interested in only the first section, you can remove the rest of the code.
If you plan to use only the stub, you can skip the following items on the scripts. Stub works well so it saves how much money is kept for the user by user name, but always in the playlist is all the same, that is, you decide to file mp3/plain_mp3_list.txt. Format:
id mp3_file.mp3 title len
where id – unique number, mp3_file.mp3 – name of the file in /mp3 folder, title – title songs, len – duration of the song in seconds. The spaces between that parameters are being set with tabulations. For example:
1 big_in_japan.mp3 Big in Japan 228
2 like_wow.mp3 Like Wow! 214
Important: All the parameters must be defined.
7. money.php - the script is responsible for monetary system inside 3DCity. In 3DCity there are several locations, each of them.
Money scattered in 50 locations. The script is responsible for the issuance, renewal and maintenance of these places, as well as for processing Events taking their user.
Let the money originally lay nowhere. Once in 20 minutes in each location in a random place must be emerging a new package.
For every request to the script, it must calculate how much time has passed since the last treatment and do create the necessary number of packs. And his other actions depend on the parameters. There are the following parameters:
cmd - the type of team that depends on that this script will do and give. We have the following types:
cmd = places
Gives the indexes of places where the money lay from 1 to 50. Also, there is an additional parameter location, this is the number of locations for which indexes are issued. Thus produced url:
http://your-site.com/3dcity_folder/m...ces&location=3
These are the places where the money lay for a third location.
cmd = take
This team is responsible for taking the stack of money. That is clear from the pack this place and adds to the user $ 100. In it there are additional options to name - the user name, place - where the index mesyata were taken money and location -- number of locations in which it occurs. Thus produced url:
http://your-site.com/3dcity_folder/m...=32&location=3
cmd = account
Shows now how much money the user has. Optional - name - username:
http://your-site.com/3dcity_folder/m...ount&name=Mike
9. music.php - gives a playlist to selected songs. There is a parameter name - the user name, if different for different playlist
users (for example, to give out a playlist only that the user downloads on your site).
http://your-site.com/3dcity_folder/music.php?name=Mike - playlist for selection. The format for all files of music is described below.
10. music_add.php - adds a song in a playlist. Options: id - audi songs from music.php and name - the name of the user who commissioned a song with the withdraw $ 100 per order. For the details of the playlist, see the following two paragraphs.
http://your-site.com/3dcity_folder/c...0500&name=Mike
11. music_list.php - displays the current playlist. Here, attention should be drawn that the script which time first time of launch songs and play only those which have not been played, and that which is played now.
http://your-site.com/3dcity_folder/music_list.php
12. music_list.php - the same as before, but only the song currently playing shown
http://your-site.com/3dcity_folder/music_current.php
13. Playlist format:
<?xml version="1.0" encoding="utf-8"?>
<objects>
<obj id="12" name_="Test mp3" src="http://your-site.com/3dcity_folder/mp3/test.mp3" />
<obj id="14" name_="Bach" src="http://your-site.com/3dcity_folder/mp3/bach.mp3" />
</objects>
You need to ensure the ID is unique.
14. Chmod 777 must be set to the /users, /mp3, /files directories recursively.