http://t3phone.lagopixel.com/index.php?title=Special:Contributions/Lagopixel&feed=atom&limit=50&target=Lagopixel&year=&month=T3phone - User contributions [en]2024-03-29T06:43:35ZFrom T3phoneMediaWiki 1.16.0http://t3phone.lagopixel.com/wiki/Page_TypesPage Types2011-02-08T13:33:53Z<p>Lagopixel: Undo revision 930 by Lagopixel (talk)</p>
<hr />
<div>== URL ==<br />
Format of the URL:<br />
<nowiki>http://domain.tld/index.php?type=xx</nowiki><br />
or<br />
<nowiki>http://domain.tld/index.php?id=xx</nowiki><br />
or<br />
<nowiki>http://domain.tld/index.php?type=xx&id=xx (only works with type=80 and if a special type is set for the id=0 page)</nowiki><br />
<br />
== Parameter for XML-Output ==<br />
=== Content ===<br />
==== type=10 - shows the whole content and configuration in one page ====<br />
<br />
type=10 (same as type=40 plus all id=xx together)<br />
<br />
<br />
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:0em 0em 1em 0em; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show; color:black; {{{1}}}"<br />
|-<br />
! Parameter !! Funktion <br />
|-<br />
| description_html || Description (Text, which will be shown in "About us"-page, formated as HTML <br />
|-<br />
| about_img || Image with relative path that is shown in "about us" <br />
|-<br />
| adminmail || Emailadrress which is used to send feedback to issuer of the software <br />
|}<br />
<br />
<br />
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:0em 0em 1em 0em; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show; color:black; {{{1}}}"<br />
|-<br />
! Parameter !! Funktion <br />
|-<br />
| bookmark_icon || Bookmark-Icon shown on the first page <br />
|-<br />
| showall_icon || Icon "showall" shown on the first page <br />
|-<br />
| history_icon || History-icon shown on the first page <br />
|-<br />
| rootlink_icon || Icon that is shown to get to the first root-page ("home") <br />
|-<br />
| location_icon || Icon that is shown on the lower left side for triggering the location-update <br />
|-<br />
| settings_icon || Brings up the settings dialog <br />
|-<br />
| Prior_icon || Icon for previous "page" (should be an arrow) <br />
|-<br />
| Next_icon || Icon for next "page" (should be an arrow) <br />
|-<br />
| DirUp_icon || Icon for sortging alphabetically (up) <br />
|-<br />
| DirDown_icon || Icon for sortging alphabetically (down) <br />
|-<br />
| DistUp_icon || Sorting via distance (upwards) <br />
|-<br />
| DistDown_icon || Sorting via distance (down) <br />
|-<br />
| Delete_icon || Deleting items from bookmarks <br />
|-<br />
| default_icon || This icon ish shown when no image is specified <br />
|}<br />
<br />
<br />
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:0em 0em 1em 0em; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show; color:black; {{{1}}}"<br />
|-<br />
! Parameter !! Funktion <br />
|-<br />
| menu id || id of the item (same as page id) <br />
|-<br />
| menu_title || Title of the item (shown on tableview, item heading) <br />
|-<br />
| adminmail || Emailadrress which is used to send feedback to issuer of the software <br />
|-<br />
| menu_desc || Shows short description on table view <br />
|-<br />
| menu_image || Thumbnail-icon that is in the tableview (if there are two, take the first one)<br />
|-<br />
| page id || id of the item (same as menu id) <br />
|-<br />
| name || Heading for the item <br />
|-<br />
| desc || Text of the item <br />
|-<br />
| lat || Geocordinate (lat) <br />
|-<br />
| lon || Geocordinate (lon) <br />
|-<br />
| largeimg || Image that is shown on the page. This image is shown in full when clicked and as a small image when on the item-page <br />
|-<br />
| img || Image (depreciated, will be removed soon, if not already) <br />
|}<br />
<br />
==== type=11 - shows the whole content and configuration in one page "minus" the icons ====<br />
<br />
type=11 (same as type=10 minus the icons section)<br />
<br />
=== Configuration ===<br />
<br />
==== type=40 - loads the configuration and corresponding images ==== <br />
<br />
type=40<br />
<br />
<br />
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:0em 0em 1em 0em; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show; color:black; {{{1}}}"<br />
|-<br />
! Parameter !! Funktion <br />
|-<br />
| description_html || Description (Text, which will be shown in "About us"-page, formated as HTML <br />
|-<br />
| about_img || Image with relative path that is shown in "about us" <br />
|-<br />
| adminmail || Emailadrress which is used to send feedback to issuer of the software <br />
|}<br />
<br />
<br />
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:0em 0em 1em 0em; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show; color:black; {{{1}}}"<br />
|-<br />
! Parameter !! Funktion <br />
|-<br />
| bookmark_icon || Bookmark-Icon shown on the first page <br />
|-<br />
| showall_icon || Icon "showall" shown on the first page <br />
|-<br />
| history_icon || History-icon shown on the first page <br />
|-<br />
| rootlink_icon || Icon that is shown to get to the first root-page ("home") <br />
|-<br />
| location_icon || Icon that is shown on the lower left side for triggering the location-update <br />
|-<br />
| settings_icon || Brings up the settings dialog <br />
|-<br />
| Prior_icon || Icon for previous "page" (should be an arrow) <br />
|-<br />
| Next_icon || Icon for next "page" (should be an arrow) <br />
|-<br />
| DirUp_icon || Icon for sortging alphabetically (up) <br />
|-<br />
| DirDown_icon || Icon for sortging alphabetically (down) <br />
|-<br />
| DistUp_icon || Sorting via distance (upwards) <br />
|-<br />
| DistDown_icon || Sorting via distance (down) <br />
|-<br />
| Delete_icon || Deleting items from bookmarks <br />
|-<br />
| default_icon || This icon ish shown when no image is specified <br />
|}<br />
<br />
<br />
==== type=70 - config images without configuration ====<br />
<br />
type=70 (part of type=40)<br />
<br />
<br />
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:0em 0em 1em 0em; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show; color:black; {{{1}}}"<br />
|-<br />
! Parameter !! Funktion <br />
|-<br />
| bookmark_icon || Bookmark-Icon shown on the first page <br />
|-<br />
| showall_icon || Icon "showall" shown on the first page <br />
|-<br />
| history_icon || History-icon shown on the first page <br />
|-<br />
| rootlink_icon || Icon that is shown to get to the first root-page ("home") <br />
|-<br />
| location_icon || Icon that is shown on the lower left side for triggering the location-update <br />
|-<br />
| settings_icon || Brings up the settings dialog <br />
|-<br />
| Prior_icon || Icon for previous "page" (should be an arrow) <br />
|-<br />
| Next_icon || Icon for next "page" (should be an arrow) <br />
|-<br />
| DirUp_icon || Icon for sortging alphabetically (up) <br />
|-<br />
| DirDown_icon || Icon for sortging alphabetically (down) <br />
|-<br />
| DistUp_icon || Sorting via distance (upwards) <br />
|-<br />
| DistDown_icon || Sorting via distance (down) <br />
|-<br />
| Delete_icon || Deleting items from bookmarks <br />
|-<br />
| default_icon || This icon ish shown when no image is specified <br />
|}<br />
<br />
<br />
<br />
==== type=90 - configuration without the config images ====<br />
<br />
type=90 (part of type=40)<br />
<br />
<br />
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:0em 0em 1em 0em; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show; color:black; {{{1}}}"<br />
|-<br />
! Parameter !! Funktion <br />
|-<br />
| description_html || Description (Text, which will be shown in "About us"-page, formated as HTML <br />
|-<br />
| about_img || Image with relative path that is shown in "about us" <br />
|-<br />
| adminmail || Emailadrress which is used to send feedback to issuer of the software <br />
|}<br />
<br />
<br />
=== Update ===<br />
==== type=20 - Tree of ids and timestamps ====<br />
type=20<br />
<br />
Shows a XML-page with menu id="xx" and updated="xxxx" where id carries the id of the page and updated is the timestamp. <br />
<br />
Use this output for comparing the timestamps to find out which page (id) has been updated.<br />
<br />
<menu id="xx" updated="1251036675"><br />
<page id="xx" updated="1255448874"/><br />
</menu><br />
<br />
==== id=xx - XML of the item (leaf) ====<br />
<br />
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:0em 0em 1em 0em; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show; color:black; {{{1}}}"<br />
|-<br />
! Parameter !! Funktion <br />
|-<br />
| menu id || id of the item (same as page id) <br />
|-<br />
| menu_title || Title of the item (shown on tableview, item heading) <br />
|-<br />
| adminmail || Emailadrress which is used to send feedback to issuer of the software <br />
|-<br />
| menu_desc || Shows short description on table view <br />
|-<br />
| menu_image || Thumbnail-icon that is in the tableview (if there are two, take the first one)<br />
|-<br />
| page id || id of the item (same as menu id) <br />
|-<br />
| name || Heading for the item <br />
|-<br />
| desc || Text of the item <br />
|-<br />
| lat || Geocordinate (lat) <br />
|-<br />
| lon || Geocordinate (lon) <br />
|-<br />
| largeimg || Image that is shown on the page. This image is shown in full when clicked and as a small image when on the item-page <br />
|-<br />
| img || Image (depreciated, will be removed soon, if not already) <br />
|}<br />
<br />
=== HTML ===<br />
==== type=80 - HTML-output ====<br />
type=80 <br />
Renders html-output for checking data<br />
<br />
==== type=50 - about-page preview ====<br />
type=50<br />
Renders a preview from the description_html in the browser.<br />
<br />
<br />
=== Checkin (I was there) ===<br />
==== type=702 - posting a checkin for a UID ====<br />
type=702<br />
<br />
- The data have two value-pairs:<br />
tx_lpiphone_pi1[board][deviceid]=value<br />
tx_lpiphone_pi1[board][comment]=value<br />
tx_lpiphone_pi1[board][lon]=value<br />
tx_lpiphone_pi1[board][lat]=value<br />
id=value<br />
<br />
The thrid value is a md5-hash created form the values in the above order PLUS a secret key<br />
The calculated hash is sent in the variable <br />
tx_lpiphone_pi1[myMd5hash]<br />
(note that the third value has no [board] prefix to it!!)<br />
<br />
The ''checkin'' value is a unix timestamp that is generated on the server and stored as this.<br />
<br />
The response XML for success looks as follwos:<br />
<root><br />
<checkinID>7</checkinID><br />
<databaseSuccess>TRUE</databaseSuccess><br />
<usermessage>Vielen Dank für den Kommentar! Wir werden ihn nach Prüfung frei schalten.</usermessage><br />
<deviceid>deiceid</deviceid><br />
<comment>This is the comment put in</comment><br />
<lon>47.123456</lon><br />
<lat>9.123456</lat><br />
<checkin>1290364765</checkin><br />
<md5hash>02e0adc2608671b08fc177dbaed5fde3</md5hash><br />
<crdate>1290364765</crdate><br />
<tstamp>1290364765</tstamp><br />
<hidden>0</hidden><br />
<pid>118</pid><br />
<username>iphone-user_10</username><br />
</root><br />
<br />
The response XML for failure looks like this:<br />
<root><br />
<databaseSuccess>FALSE</databaseSuccess><br />
<usermessage>An error has occured - your comment was not posted to ouue system - sorry!</usermessage><br />
</root><br />
<br />
==== type=703 - displaying checkins for page ====<br />
<br />
Parameters: <br />
type=703&id=xx<br />
<br />
Appending "&type=703" to the "id=xx" shows the checkins that reside on this page in this XML-format. :<br />
<root><br />
<checkin checkinid="2" menuid="140" updated="1289355905"><br />
<nickname>iphone-user_99</nickname><br />
<checkin_tstamp>1289354813</checkin_tstamp><br />
<comment>test99</comment><br />
<userimage>typo3temp/pics/f38056cdd0.png</userimage><br />
</checkin><br />
</root><br />
<br />
It shows as many of the <comments> as there are on the page.<br />
The parameter "commentid" is unique in the system.<br />
The parameter menuid is the item to which it belongs.<br />
<br />
==== type=706 - has checked in ====<br />
<br />
Parameters:<br />
type=706&id=xx&tx_lpiphone_pi1[deviceid]=DEVICEID<br />
<br />
Returnes the checkin status for the combination of a ''page-id'' and the given ''deviceid''<br />
<root><br />
<checkin checkinid="20"><br />
<checkin_status>TRUE</checkin_status><br />
<checkin_timestamp>12345678</checkin_timestamp><br />
<deiceid>DEVICEID</deviceid><br />
</checkin><br />
</root><br />
<br />
If the '''deviceid''' has no checkin the following XML will be returned<br />
<root><br />
<checkin_status>FALSE</checkin_status><br />
</root><br />
<br />
==== type=707 - get checkins for user by deviceid ====<br />
<br />
Parameters:<br />
type=707&tx_lpiphone_pi1[deviceid]=DEVICEID<br />
<br />
Returnes a XML with all pageids of the users chekcin<br />
<root><br />
<deviceid>DEVICEID</deviceid><br />
<nickname>test99</nickname><br />
<checkins><br />
<checkin_pid>10</checkin_pid><br />
<checkin_pid>25</checkin_pid><br />
<checkin_pid>83</checkin_pid><br />
<checkin_pid>189</checkin_pid><br />
<checkin_pid>91</checkin_pid><br />
</checkins><br />
</root><br />
<br />
==== type=708 - all checkins from all users ====<br />
<br />
Parameters:<br />
type=708<br />
<br />
Returnes a XML-list of all checkins with usernames in the system<br />
<root><br />
<checkin_pid timestamp="1289354644" deviceid="test99">94</checkin_pid><br />
<checkin_pid timestamp="1289354813" deviceid="test99">117</checkin_pid><br />
<checkin_pid timestamp="1289357127" deviceid="test2222">117</checkin_pid><br />
</root><br />
<br />
=== Comments ===<br />
==== type=802 - adding comments ====<br />
<br />
- The data have two value-pairs:<br />
tx_lpiphone_pi1[board][deviceid]=value<br />
tx_lpiphone_pi1[board][comment]=value<br />
The thrid value is a md5-hash created form the values in the above order PLUS a secret key<br />
The calculated hash is sent in the variable <br />
tx_lpiphone_pi1[myMd5hash]<br />
(note that the third value has no [board] prefix to it!!)<br />
<br />
==== type=803 - displaying comments ====<br />
<br />
Parameters: <br />
type=803&id=xx&mydeviceid=DEVICEID<br />
<br />
Appending "&type=803" to the "id=xx" shows the comments that reside on this page in this XML-format. Adding the parameter mydeviceid=DEVICEID will also display the username. If there is no Parameter ''mydeviceid'' the username will be ''FALSE'' (TODO: this is broken!!) :<br />
<root><br />
<current_username>iphone_user_123</current_username><br />
<comments commentid="2" menuid="40" updated="1262222505"><br />
<nickname>test99</nickname><br />
<comment>test99</comment><br />
<deviceid>test99</deviceid><br />
</comments><br />
</root><br />
<br />
It shows as many of the <comments> as there are on the page.<br />
The parameter "commentid" is unique in the system.<br />
The parameter menuid is the item to which it belongs.<br />
<br />
==== type=804 - query of the username ====<br />
<br />
The server will generate a username based to the deviceID (which then can be updated)<br />
<br />
Following parameter are needed: <br />
* tx_lpiphone_pi1[deviceid]=value<br />
* tx_lpiphone_pi1[myCheckHash]=value <br />
(note that is a differnt value than the myMd5hash) This is the calculated value from "secretKey and the deviceid. Be ware of the order: The deviceid has to be first and then the secret key.<br />
<br />
If a user to the deviceid exists the response will look like this:<br />
<root><br />
<username>username</username><br />
</root><br />
<br />
If there is no user to the given deviceid the output will look something like this:<br />
<root><br />
<crdate>1265248038</crdate><br />
<tstamp>1265248038</tstamp><br />
<disable>0</disable><br />
<pid>567</pid><br />
<usergroup>1</usergroup><br />
<tx_lpiphone_deviceid>12345678901234567890</tx_lpiphone_deviceid><br />
<username>iphone-user_4</username><br />
</root><br />
The most important value is the <username>. This is tied to the deviceId and can can/will be used later as well. It is stored in the usersection of the database.<br />
<br />
If validation of the hash fails the response will look like this:<br />
<root><br />
<username><br />
An error has occured - no user was created - sorry!<br />
</username><br />
<error>HASHCHECK_FAILED</error><br />
</root><br />
<br />
==== type=805 - updating a user ====<br />
<br />
Parameters:<br />
tx_lpiphone_pi1[deviceid]=deviceid<br />
tx_lpiphone_pi1[myCheckHash]=calculated_md5_hash<br />
tx_lpiphone_pi1[new_username]=username<br />
<br />
The hash is checked the same way the ohters are: deviceid,new_username, secretkey * md5<br />
<br />
On success something like this is returned:<br />
<root><br />
<old_username>old_username</old_username><br />
<sucessmessage_userupdate>You have successfully updated a user!</sucessmessage_userupdate><br />
<sucess>TRUE</sucess><br />
<username>username</username><br />
<deviceid>xxxxxxxxxxx</deviceid><br />
</root><br />
<br />
Note that the <old_username> is also there (just for reference and checking). The updated username is wrapped in <username><br />
<br />
The failmessage looks like this:<br />
<root><br />
<failmessage_userupdate><br />
An error has occured - user was not updated - sorry!<br />
</failmessage_userupdate><br />
<sucess>FALSE</sucess><br />
<deviceid>xxxxxxxxxxx</deviceid><br />
</root><br />
<br />
<br />
==== type=806 - comment-count ====<br />
id=xx&type=806<br />
Returns the comment-cont of a given page-id (id=xx)<br />
<root><br />
<comment_count>23</comment_count><br />
</root><br />
<br />
<br />
==== type=807 - all comments in the system ====<br />
type=807<br />
<br />
Shows all comments availible in the syste with its pageids<br />
<br />
<root><br />
<comment pageid="92" deviceid="DEVICEID">testcomment99</comment><br />
<comment pageid="117" deviceid="DEVICEID">testcomment88</comment><br />
<comment pageid="127" deviceid="DEVICEID">testcomment77</comment><br />
</root><br />
<br />
=== Shows locations on a Google map (XML for that) ===<br />
==== type=900 - output for a google-map ====<br />
type=900 <br />
<br />
Outputs XML that the google-maps API could read<br />
<br />
<markers><br />
<marker id="568"><br />
<menu_image>typo3temp/pics/486d1d1adf.jpg</menu_image><br />
<name>Disneyland Railroad</name><br />
<lat>33.809972388658565</lat><br />
<lon>-117.91893929243088</lon><br />
</marker><br />
<markers></div>Lagopixel