Themabewertung:
  • 0 Bewertung(en) - 0 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
Profile-Problem
#1
Wir haben seit einer zeit das Problem,das unser Profiltext nicht mehr richtig dargestellt wird. Genie gab mir den Tip doch die Profilfunktion vom "Joomla-plugin" zu nutzen.
Gibt es da nicht eine andere Möglichkeit,beispielweise eine einstellung in der profile.php?

Hier mal die von uns:
Zitat:<?PHP

require_once('profile_config.php');

//
// Search DB
//

// xmlrpc_encode has not output options for UTF-8
$utf8_encoding = false;
if ($GLOBALS['xmlrpc_internalencoding']=='UTF-8')
{
$utf8_encoding = true;
mb_internal_encoding('utf-8');
}

// MySQL DataBase
mysql_connect($DB_HOST, $DB_USER, $DB_PASSWORD);
mysql_select_db($DB_NAME);

if ($utf8_encoding) mysql_set_charset('utf8');

#
# Copyright ©Melanie Thielker (http://opensimulator.org/)
#
# Modified and Fixed Bugs by Fumi.Iseki for Xoops Cube and Moodle '10 4/16
#

// for Debug
//$request_xml = $HTTP_RAW_POST_DATA;
//error_log('profile.php: '.$request_xml);


###################### No user serviceable parts below #####################

#
# The XMLRPC server object
#

$xmlrpc_server = xmlrpc_server_create();



#
# Classifieds
#

# Request Classifieds Name

xmlrpc_server_register_method($xmlrpc_server, 'avatarclassifiedsrequest', 'avatarclassifiedsrequest');

function avatarclassifiedsrequest($method_name, $params, $app_data)
{
global $utf8_encoding;

$req = $params[0];
$uuid = $req['uuid'];

$query_str = 'SELECT * FROM '.PROFILE_CLASSIFIEDS_TBL.
\" WHERE creatoruuid='\".mysql_escape_string($uuid).\"'\";

$result = mysql_query($query_str);

while ($row = mysql_fetch_assoc($result))
{
$name = $row['name'];
if ($utf8_encoding) $name = base64_encode($name);
$data[] = array('classifiedid' => $row['classifieduuid'],
'name' => $name );
}

$response_xml = xmlrpc_encode(array('success' => True,
'errorMessage' => '',
'data' => $data ));
echo $response_xml;
}



# Request Calssifieds

xmlrpc_server_register_method($xmlrpc_server, 'classifiedinforequest', 'classifiedinforequest');

function classifiedinforequest($method_name, $params, $app_data)
{
global $utf8_encoding;

$req = $params[0];
$uuid = $req['avatar_id'];
$pick = $req['classified_id'];

$query_str = 'SELECT * FROM '.PROFILE_CLASSIFIEDS_TBL.
\" WHERE creatoruuid='\".mysql_escape_string($uuid).\"' AND \".
\" classifieduuid='\".mysql_escape_string($pick).\"'\";

$result = mysql_query($query_str);

while ($row = mysql_fetch_assoc($result))
{
if ($row['description']=='') $row['description'] = 'No description given';

$desc = $row['description'];
$name = $row['name'];
if ($utf8_encoding) {
$desc = base64_encode($desc);
$name = base64_encode($name);
}

$data[] = array('classifieduuid' => $row['classifieduuid'],
'creatoruuid' => $row['creatoruuid'],
'creationdate' => $row['creationdate'],
'expirationdate' => $row['expirationdate'],
'category' => $row['category'],
'name' => $name,
'description' => $desc,
'parceluuid' => $row['parceluuid'],
'parentestate' => $row['parentestate'],
'snapshotuuid' => $row['snapshotuuid'],
'simname' => $row['simname'],
'posglobal' => $row['posglobal'],
'parcelname' => $row['parcelname'],
'classifiedflags' => $row['classifiedflags'],
'priceforlisting' => $row['priceforlisting']);
}

$response_xml = xmlrpc_encode(array('success' => True,
'errorMessage' => '',
'data' => $data ));
echo $response_xml;
}



# Update Classifieds

xmlrpc_server_register_method($xmlrpc_server, 'classified_update', 'classified_update');

function classified_update($method_name, $params, $app_data)
{
$req = $params[0];
$classifieduuid = $req['classifiedUUID'];
$creator = $req['creatorUUID'];
$category = $req['category'];
$name = $req['name'];
$description = $req['description'];
$parceluuid = $req['parcelUUID'];
$parentestate = $req['parentestate'];
$snapshotuuid = $req['snapshotUUID'];
$simname = $req['sim_name'];
$globalpos = $req['globalpos'];
$parcelname = $req['parcelname'];
$classifiedflag = $req['classifiedFlags'];
$priceforlist = $req['classifiedPrice'];

if ($parcelname=='') $parcelname = 'Unknown';
if ($parceluuid=='') $parceluuid = '00000000-0000-0000-0000-0000000000000';
if ($description=='') $description = 'No Description';

if ($classifiedflag==2)
{
$creationdate = time();
$expirationdate = time() + (7 * 24 * 60 * 60);
}
else
{
$creationdate = time();
$expirationdate = time() + (365 * 24 * 60 * 60);
}

$query_str = 'REPLACE INTO '.PROFILE_CLASSIFIEDS_TBL.' VALUES ('.
\"'\". mysql_escape_string($classifieduuid).\"',\".
\"'\". mysql_escape_string($creator) .\"',\".
mysql_escape_string($creationdate) .','.
mysql_escape_string($expirationdate).','.
\"'\". mysql_escape_string($category) .\"',\".
\"'\". mysql_escape_string($name) .\"',\".
\"'\". mysql_escape_string($description) .\"',\".
\"'\". mysql_escape_string($parceluuid) .\"',\".
mysql_escape_string($parentestate) .','.
\"'\". mysql_escape_string($snapshotuuid) .\"',\".
\"'\". mysql_escape_string($simname) .\"',\".
\"'\". mysql_escape_string($globalpos) .\"',\".
\"'\". mysql_escape_string($parcelname) .\"',\".
mysql_escape_string($classifiedflag).','.
mysql_escape_string($priceforlist) .')';

$result = mysql_query($query_str);

$response_xml = xmlrpc_encode(array('success' => True,
'errorMessage' => '' ));
echo $response_xml;
}



# Delete Classifieds

xmlrpc_server_register_method($xmlrpc_server, 'classified_delete', 'classified_delete');

function classified_delete($method_name, $params, $app_data)
{
$req = $params[0];
$classifieduuid = $req['classifiedID'];

$query_str = 'DELETE FROM '.PROFILE_CLASSIFIEDS_TBL.
\" WHERE classifieduuid='\".mysql_escape_string($classifieduuid).\"'\";

$result = mysql_query($query_str);

$response_xml = xmlrpc_encode(array('success' => True,
'errorMessage' => '' ));
echo $response_xml;
}




#
# Picks
#

# Request Picks Name

xmlrpc_server_register_method($xmlrpc_server, 'avatarpicksrequest', 'avatarpicksrequest');

function avatarpicksrequest($method_name, $params, $app_data)
{
global $utf8_encoding;

$req = $params[0];
$uuid = $req['uuid'];

$query_str = 'SELECT * FROM '.PROFILE_USERPICKS_TBL.
\" WHERE creatoruuid='\".mysql_escape_string($uuid).\"'\";

$result = mysql_query($query_str);

while ($row = mysql_fetch_assoc($result))
{
$name = $row['name'];
if ($utf8_encoding) $name = base64_encode($name);

$data[] = array('pickid' => $row['pickuuid'],
'name' => $name );
}

$response_xml = xmlrpc_encode(array('success' => True,
'errorMessage' => '',
'data' => $data ));
echo $response_xml;
}



# Request Picks

xmlrpc_server_register_method($xmlrpc_server, 'pickinforequest', 'pickinforequest');

function pickinforequest($method_name, $params, $app_data)
{
global $utf8_encoding;

$req = $params[0];
$uuid = $req['avatar_id'];
$pick = $req['pick_id'];

$query_str = 'SELECT * FROM '.PROFILE_USERPICKS_TBL.
\" WHERE creatoruuid='\".mysql_escape_string($uuid).\"' AND \".
\" pickuuid='\". mysql_escape_string($pick).\"'\";

$result = mysql_query($query_str);

while ($row = mysql_fetch_assoc($result))
{
if ($row['description'] == '') $row['description'] = 'No description given';

$desc = $row['description'];
$name = $row['name'];
if ($utf8_encoding) {
$desc = base64_encode($desc);
$name = base64_encode($name);
}

$data[] = array(
'pickuuid' => $row['pickuuid'],
'creatoruuid' => $row['creatoruuid'],
'toppick' => $row['toppick'],
'parceluuid' => $row['parceluuid'],
'name' => $name,
'description' => $desc,
'snapshotuuid' => $row['snapshotuuid'],
'user' => $row['user'],
'originalname' => $row['originalname'],
'simname' => $row['simname'],
'posglobal' => $row['posglobal'],
'sortorder' => $row['sortorder'],
'enabled' => $row['enabled']);
}

$response_xml = xmlrpc_encode(array('success' => True,
'errorMessage' => '',
'data' => $data ));
echo $response_xml;
}



# Update Picks

xmlrpc_server_register_method($xmlrpc_server, 'picks_update', 'picks_update');

function picks_update($method_name, $params, $app_data)
{
$req = $params[0];
$pickuuid = $req['pick_id'];
$creator = $req['creator_id'];
$toppick = $req['top_pick'];
$parceluuid = $req['parcel_uuid'];
$name = $req['name'];
$description = $req['desc'];
$snapshotuuid = $req['snapshot_id'];
$user = $req['user'];
$original = $req['original'];
$simname = $req['sim_name'];
$posglobal = $req['pos_global'];
$sortorder = $req['sort_order'];
$enabled = $req['enabled'];

if ($parceluuid=='') $parceluuid = '00000000-0000-0000-0000-0000000000000';
if ($description=='') $description = 'No Description';
if ($user=='') $user = 'Unknown';
if ($original=='') $original = 'Unknown';

$query_str = 'REPLACE INTO '.PROFILE_USERPICKS_TBL.' VALUES ('.
\"'\".mysql_escape_string($pickuuid) .\"',\".
\"'\".mysql_escape_string($creator) .\"',\".
\"'\".mysql_escape_string($toppick) .\"',\".
\"'\".mysql_escape_string($parceluuid) .\"',\".
\"'\".mysql_escape_string($name) .\"',\".
\"'\".mysql_escape_string($description) .\"',\".
\"'\".mysql_escape_string($snapshotuuid).\"',\".
\"'\".mysql_escape_string($user) .\"',\".
\"'\".mysql_escape_string($original) .\"',\".
\"'\".mysql_escape_string($simname) .\"',\".
\"'\".mysql_escape_string($posglobal) .\"',\".
\"'\".mysql_escape_string($sortorder) .\"',\".
\"'\".mysql_escape_string($enabled) .\"')\";

$result = mysql_query($query_str);

$response_xml = xmlrpc_encode(array('success' => True,
'errorMessage' => '' ));
echo $response_xml;
}



# Delete Picks

xmlrpc_server_register_method($xmlrpc_server, 'picks_delete', 'picks_delete');

function picks_delete($method_name, $params, $app_data)
{
$req = $params[0];
$pickuuid = $req['pick_id'];

$query_str = 'DELETE FROM '.PROFILE_USERPICKS_TBL.
\" WHERE pickuuid='\".mysql_escape_string($pickuuid).\"'\";

$result = mysql_query($query_str);

$response_xml = xmlrpc_encode(array('success' => True,
'errorMessage' => '' ));
echo $response_xml;
}




#
# Notes
#

# Request Notes

xmlrpc_server_register_method($xmlrpc_server, 'avatarnotesrequest', 'avatarnotesrequest');

function avatarnotesrequest($method_name, $params, $app_data)
{
global $utf8_encoding;

$req = $params[0];
$uuid = $req['avatar_id'];
$targetuuid = $req['target_id'];

$query_str = 'SELECT * FROM '.PROFILE_USERNOTES_TBL.
\" WHERE useruuid='\". mysql_escape_string($uuid).\"' AND \".
\" targetuuid='\".mysql_escape_string($targetuuid).\"'\";

$result = mysql_query($query_str);

while ($row = mysql_fetch_assoc($result))
{
$notes = $row['notes'];
if ($utf8_encoding) $notes = base64_encode($notes);

$data[] = array('target_id' => $row['targetuuid'],
'notes' => $notes);
}

$response_xml = xmlrpc_encode(array('success' => True,
'errorMessage' => '',
'data' => $data ));
echo $response_xml;
}



# Update Notes

xmlrpc_server_register_method($xmlrpc_server, 'avatar_notes_update', 'avatar_notes_update');

function avatar_notes_update($method_name, $params, $app_data)
{
$req = $params[0];
$uuid = $req['avatar_id'];
$targetuuid = $req['target_id'];
$notes = $req['notes'];
$ready = 0;

$query_str = 'SELECT COUNT(*) FROM '.PROFILE_USERNOTES_TBL.
\" WHERE useruuid='\".mysql_escape_string($uuid).\"' AND \".
\" targetuuid='\".mysql_escape_string($targetuuid).\"'\";

$check = mysql_query($query_str);
if ($row = mysql_fetch_row($check)) $ready = $row[0];

if ($ready!=0)
{
if ($notes=='')
{
$query_str = 'DELETE FROM '.PROFILE_USERNOTES_TBL.
\" WHERE useruuid='\".mysql_escape_string($uuid).\"' AND \".
\" targetuuid='\".mysql_escape_string($targetuuid).\"'\";
}
else
{
$query_str = 'UPDATE '.PROFILE_USERNOTES_TBL.
\" SET notes='\".mysql_escape_string($notes).\"'\".
\" WHERE useruuid='\".mysql_escape_string($uuid).\"' AND \".
\" targetuuid='\".mysql_escape_string($targetuuid).\"'\";
}
}
else
{
$query_str = 'INSERT INTO '.PROFILE_USERNOTES_TBL.'(useruuid, targetuuid, notes)'.
\" VALUES ('\".mysql_escape_string($uuid).\"',\".
\"'\".mysql_escape_string($targetuuid).\"',\".
\"'\".mysql_escape_string($notes).\"')\";
}


$result = mysql_query($query_str);

$response_xml = xmlrpc_encode(array('success' => True,
'errorMessage' => '' ));
echo $response_xml;
}



#
# Profile
#

# Request Profiles and Interests

xmlrpc_server_register_method($xmlrpc_server, 'avatar_properties_request', 'avatar_properties_request');

function avatar_properties_request($method_name, $params, $app_data)
{
global $utf8_encoding;

$req = $params[0];
$uuid = $req['avatar_id'];

$query_str = 'SELECT profilePartner, profileURL, profileWantToMask, profileWantToText,'.
'profileSkillsMask, profileSkillsText, profileLanguagesText,'.
'profileFirstImage, profileFirstText, profileImage, profileAboutText'.
' FROM '.PROFILE_USERPROFILE_TBL.
\" WHERE useruuid='\".mysql_escape_string($uuid).\"'\";

$result = mysql_query($query_str);

while ($row = mysql_fetch_assoc($result))
{
$webURL = $row['profileURL'];
$aboutText = $row['profileAboutText'];
$firstText = $row['profileFirstText'];
$wantoText = $row['profileWantToText'];
$skillText = $row['profileSkillsText'];
$langText = $row['profileLanguagesText'];

if ($utf8_encoding) {
$aboutText = base64_encode($aboutText);
$firstText = base64_encode($firstText);
$wantoText = base64_encode($wantoText);
$skillText = base64_encode($skillText);
$langText = base64_encode($langText);
//$webURL = base64_encode($webURL);
}

$data[] = array('Partner' => $row['profilePartner'],
'ProfileUrl' => $webURL,
'WantToMask' => $row['profileWantToMask'],
'WantToText' => $wantoText,
'SkillsMask' => $row['profileSkillsMask'],
'SkillsText' => $skillText,
'LanguagesText' => $langText,
'FirstLifeImage' => $row['profileFirstImage'],
'FirstLifeText' => $firstText,
'Image' => $row['profileImage'],
'AboutText' => $aboutText);
}

$response_xml = xmlrpc_encode(array('data' => $data));

echo $response_xml;
}



# Update Profile

xmlrpc_server_register_method($xmlrpc_server, 'avatar_properties_update', 'avatar_properties_update');

function avatar_properties_update($method_name, $params, $app_data)
{
$req = $params[0];
$uuid = $req['avatar_id'];
$url = $req['ProfileUrl'];
$firstImage = $req['FirstiLifeImage'];
$firstText = $req['FirstLifeText'];
$image = $req['Image'];
$aboutText = $req['AboutText'];
$ready = 0;

$query_str = 'SELECT COUNT(*) FROM '.PROFILE_USERPROFILE_TBL.
\" WHERE useruuid='\".mysql_escape_string($uuid).\"'\";

$check = mysql_query($query_str);
if ($row = mysql_fetch_row($check)) $ready = $row[0];

if ($ready!=0)
{
$query_str = 'UPDATE '.PROFILE_USERPROFILE_TBL.' SET '.
\"profileURL='\".mysql_escape_string($url).\"',\".
\"profileFirstImage='\".mysql_escape_string($firstImage).\"',\".
\"profileFirstText='\".mysql_escape_string($firstText).\"',\".
\"profileImage='\".mysql_escape_string($image).\"',\".
\"profileAboutText='\".mysql_escape_string($aboutText).\"'\".
\" WHERE useruuid='\".mysql_escape_string($uuid).\"'\";
}
else
{
$query_str = 'INSERT INTO '.PROFILE_USERPROFILE_TBL.\" \".
'(useruuid, profileURL, profileFirstImage, profileFirstText, profileImage, profileAboutText) '.
\" VALUES ('\".mysql_escape_string($uuid).\"',\".
\"'\".mysql_escape_string($url).\"',\".
\"'\".mysql_escape_string($firstImage).\"',\".
\"'\".mysql_escape_string($firstText).\"',\".
\"'\".mysql_escape_string($image).\"',\".
\"'\".mysql_escape_string($aboutText).\"')\";
}
$result = mysql_query($query_str);

$response_xml = xmlrpc_encode(array('success' => True,
'errorMessage' => ''));
echo $response_xml;
}




#
# Interests
#

# Profile Interests Update

xmlrpc_server_register_method($xmlrpc_server, 'avatar_interests_update', 'avatar_interests_update');

function avatar_interests_update($method_name, $params, $app_data)
{
$req = $params[0];
$uuid = $req['avatar_id'];
$wantmask = $req['WantToMask'];
$wanttext = $req['WantToText'];
$skillsmask = $req['SkillsMask'];
$skillstext = $req['SkillsText'];
$langtext = $req['LanguagesText'];

$query_str = 'UPDATE '.PROFILE_USERPROFILE_TBL.' SET '.
\"profileWantToMask='\".mysql_escape_string($wantmask).\"',\".
\"profileWantToText='\".mysql_escape_string($wanttext).\"',\".
\"profileSkillsMask='\".mysql_escape_string($skillsmask).\"',\".
\"profileSkillsText='\".mysql_escape_string($skillstext).\"',\".
\"profileLanguagesText='\".mysql_escape_string($langtext).\"'\".
\" WHERE useruuid='\".mysql_escape_string($uuid).\"'\";

$result = mysql_query($query_str);

$response_xml = xmlrpc_encode(array('success' => True,
'errorMessage' => '' ));
echo $response_xml;
}



#
# User Info (Preferences)
#

xmlrpc_server_register_method($xmlrpc_server, 'user_preferences_request', 'user_preferences_request');

function user_preferences_request($method_name, $params, $app_data)
{
$req = $params[0];
$uuid = $req['avatar_id'];

$query_str = 'SELECT imviaemail,visible,email FROM '.PROFILE_USERSETTINGS_TBL.
\" WHERE useruuid='\". mysql_escape_string($uuid).\"'\";

$result = mysql_query($query_str);

while ($row = mysql_fetch_assoc($result))
{
$data[] = array('imviaemail' => $row['imviaemail'],
'visible' => $row['visible'],
'email' => $row['email'] );
}

$response_xml = xmlrpc_encode(array('success' => True,
'errorMessage' => '',
'data' => $data ));
echo $response_xml;
}



#

xmlrpc_server_register_method($xmlrpc_server, 'user_preferences_update', 'user_preferences_update');

function user_preferences_update($method_name, $params, $app_data)
{
$req = $params[0];
$uuid = $req['avatar_id'];
$wantim = $req['imViaEmail'];
$directory = $req['visible'];

$query_str = 'UPDATE '.PROFILE_USERSETTINGS_TBL.' SET '.
\"imviaemail='\".mysql_escape_string($wantim).\"',\".
\"visible='\".mysql_escape_string($directory).\"'\".
\" WHERE useruuid='\".mysql_escape_string($uuid).\"'\";

$result = mysql_query($query_str);

$response_xml = xmlrpc_encode(array('success' => True,
'errorMessage' => '' ));
echo $response_xml;
}



#
# Process the request
#

$request_xml = $HTTP_RAW_POST_DATA;
xmlrpc_server_call_method($xmlrpc_server, $request_xml, '');
xmlrpc_server_destroy($xmlrpc_server);

?>
Zitieren


Nachrichten in diesem Thema
Profile-Problem - von Dorena Verne - 06.05.2011, 17:07
Antw:Profile-Problem - von Bogus Curry - 06.05.2011, 18:33
Antw:Profile-Problem - von Dorena Verne - 06.05.2011, 19:57
Antw:Profile-Problem - von Bogus Curry - 06.05.2011, 20:21
Antw:Profile-Problem - von Lena Vanilli - 06.05.2011, 23:03
Antw:Profile-Problem - von Dorena Verne - 07.05.2011, 00:59
Antw:Profile-Problem - von Easy Auer - 09.05.2011, 06:48
Antw:Profile-Problem - von Easy Auer - 09.05.2011, 07:19
Antw:Profile-Problem - von Dorena Verne - 09.05.2011, 08:09
Antw:Profile-Problem - von Easy Auer - 09.05.2011, 13:36
Antw:Profile-Problem - von Dorena Verne - 09.05.2011, 13:52

Möglicherweise verwandte Themen…
Thema Verfasser Antworten Ansichten Letzter Beitrag
  Problem mit AV-Sitter unter Arriba gelöst Anachron 2 4.817 23.04.2019, 18:10
Letzter Beitrag: Jana Tenk
  Problem mit Aufstehen von einem Sitzplatz V0.9x Data Rossini 0 2.874 22.03.2019, 10:38
Letzter Beitrag: Data Rossini
  Diva9000 problem Windows 2008R2 Titoss 15 20.028 09.03.2018, 23:02
Letzter Beitrag: Bogus Curry
  Problem mit Umstellung von Frau zu Mann bei Avatar Bogus Curry 1 5.845 01.04.2015, 19:36
Letzter Beitrag: Bogus Curry
  Problem: Geisterscript auf Arriba-Region Mareta Dagostino 6 15.500 25.01.2015, 18:53
Letzter Beitrag: Mareta Dagostino

Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste