Home
-
admin.php
-
admml.php
-
adshtm.php
-
Holotta.com classifieds for jobs, apartments, personals, for sale, services, community, and events
-
conf_cat.php
-
craigslist — Austin classifieds for jobs, apartments, personals and more
-
Add IE7 Search Providers.
-
createtb.php
-
csvld.php
-
details.php
-
favrt.php
-
forms.php
-
funcs1.php
-
funcs2.php
-
highlight.php
-
hltads.php
-
htad1.php
-
index.php
-
Investors
-
Holotta is the newest craigslist
-
mbadm.php
-
mbcrtb.php
-
mbind.php
-
mbp.php
-
mbprf.php
-
mbsubsc.php
-
mb_check.php
-
Holotta Classified
-
mb_det.php
-
mb_fn1.php
-
mb_fn2.php
-
mb_forms.php
-
mb_lginf.php
-
mb_subm.php
-
msg1_eng.php
-
msg2_eng.php
-
Our Agreement
-
Our Company
-
readme.txt
-
robots.txt
-
scripts.txt
-
search.php
-
sfmd.php
-
sgnp.php
-
signup.php
-
Site Map
-
spamgrd.php
-
sph.php
-
submit.php
-
top.php
-
urllist.txt
-
FrontPage Configuration Information
cp
craigslist
-
disp('name', 'htmlhead');
request_title( ' - ', '', ' - ', 'htmlhead' );
?>
-
a_stub.php
-
-
google-sitemap-archives.php
-
google-sitemap-feeds.php
-
google-sitemap-local.php
-
google-sitemap-posts.php
-
google-sitemap.php
-
google322d5d15a0f89762.html
-
hacks.php
-
index.php
-
Multiblog demo
-
robots.txt
-
locales
xmlsrv
-
atom.comments.php
-
atom.php
-
rdf.comments.php
-
rdf.php
-
rss.comments.php
-
rss.php
-
rss2.comments.php
-
rss2.php
-
from content
$post_title = xmlrpc_getposttitle( $content );
// cleanup content from extra tags like and :
$content = xmlrpc_removepostdata( $content );
$now = date('Y-m-d H:i:s', (time() + ($Settings->get('time_difference') * 3600)));
// CHECK and FORMAT content
$post_title = format_to_post($post_title,0,0);
$content = format_to_post($content,0,0);
if( $errstring = $Messages->get_string( 'Cannot post, please correct these errors:', '' ) )
{
return new xmlrpcresp(0, $xmlrpcerruser+6, $errstring ); // user error 6
}
// INSERT NEW POST INTO DB:
$edited_Item = & new Item();
$post_ID = $edited_Item->insert( $current_User->ID, $post_title, $content, $now, $post_category, array( $post_category ), $status, $current_User->locale, '', 0, $publish );
if( !empty($DB->last_error) )
{ // DB error
return new xmlrpcresp(0, $xmlrpcerruser+9, 'DB error: '.$DB->last_error ); // user error 9
}
logIO('O', "Posted ! ID: $post_ID");
if( $publish )
{ // If post is publicly published:
// logIO("O","Doing pingbacks...");
// pingback( true, $content, $post_title, '', $post_ID, $blogparams, false);
logIO("O","Sending email notifications...");
$edited_Item->send_email_notifications( false );
logIO("O","Pinging b2evolution.net...");
pingb2evonet( $blogparams, $post_ID, $post_title, false );
logIO("O","Pinging Weblogs...");
pingWeblogs( $blogparams, false );
logIO("O","Pinging Blo.gs...");
pingBlogs( $blogparams, false );
logIO("O","Pinging Technorati...");
pingTechnorati( $blogparams, false );
}
logIO("O","All done.");
return new xmlrpcresp(new xmlrpcval($post_ID));
}
$bloggereditpost_doc='Edits a post, blogger-api like';
$bloggereditpost_sig=array(array($xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcBoolean));
/**
* blogger.editPost changes the contents of a given post.
*
* Optionally, will publish the blog the post belongs to after changing the post.
* (In b2evo, this means the changed post will be moved to published state).
* On success, it returns a boolean true value.
* On error, it will return a fault with an error message.
*
* see {@link http://www.blogger.com/developers/api/1_docs/xmlrpc_editPost.html}
*
* {@internal bloggereditpost(-) }}
*
* @param xmlrpcmsg XML-RPC Message
* 0 appkey (string): Unique identifier/passcode of the application sending the post.
* (See access info {@link http://www.blogger.com/developers/api/1_docs/#access} .)
* 1 postid (string): Unique identifier of the post to be changed.
* 2 username (string): Login for a Blogger user who has permission to edit the given
* post (either the user who originally created it or an admin of the blog).
* 3 password (string): Password for said username.
* 4 content (string): New content of the post.
* 5 publish (boolean): If true, the blog will be published immediately after the
* post is made. (In b2evo,this means, the new post will be in 'published' state,
* otherwise it would be in draft state).
* @return xmlrpcresp XML-RPC Response
*
* @todo check current status and permission on it
*/
function bloggereditpost($m)
{
global $xmlrpcerruser; // import user errcode value
global $blog_ID, $ItemCache;
global $cafelogID, $default_category, $DB;
global $Messages, $UserCache;
logIO('I','Called function: blogger.editPost');
// return new xmlrpcresp(0, $xmlrpcerruser+50, 'bloggereditpost' );
$post_ID = $m->getParam(1);
$post_ID = $post_ID->scalarval();
$username = $m->getParam(2);
$username = $username->scalarval();
$password = $m->getParam(3);
$password = $password->scalarval();
if( !user_pass_ok($username, $password) )
{
return new xmlrpcresp(0, $xmlrpcerruser+1, // user error 1
'Wrong username/password combination '.$username.' / '.starify($password));
}
if( ! ($edited_Item = $ItemCache->get_by_ID( $post_ID ) ) )
{
return new xmlrpcresp(0, $xmlrpcerruser+7, "No such post (#$post_ID)."); // user error 7
}
$newcontent = $m->getParam(4);
$newcontent = $newcontent->scalarval();
$newcontent = str_replace("\n",'',$newcontent); // Tor - kludge to fix bug in xmlrpc libraries
// WARNING: the following debug MAY produce a non valid response (XML comment containing emebedded )
// xmlrpc_debugmsg( 'New content: '.$newcontent );
$publish = $m->getParam(5);
$publish = $publish->scalarval();
$status = $publish ? 'published' : 'draft';
logIO('I',"Publish: $publish -> Status: $status");
if( ! ($postdata = get_postdata($post_ID)) )
{
return new xmlrpcresp(0, $xmlrpcerruser+7, "No such post (#$post_ID)."); // user error 7
}
logIO('O','Old post Title: '.$postdata['Title']);
$current_User = & $UserCache->get_by_login( $username );
if( ! ($post_category = xmlrpc_getpostcategory($newcontent) ) )
{ // No category specified
$post_category = $edited_Item->main_cat_ID;
}
elseif( get_the_category_by_ID( $post_category, false ) === false )
{ // requested Cat does not exist:
return new xmlrpcresp(0, $xmlrpcerruser+5, 'Requested category does not exist.'); // user error 5
}
// return new xmlrpcresp(0, $xmlrpcerruser+50, 'post_category='.$post_category );
$blog_ID = get_catblog($post_category);
$blogparams = get_blogparams_by_ID( $blog_ID );
// Check permission:
if( ! $current_User->check_perm( 'blog_post_statuses', $status, false, $blog_ID ) )
{
return new xmlrpcresp(0, $xmlrpcerruser+2, // user error 2
'Permission denied.' );
}
$content = $newcontent;
$post_title = xmlrpc_getposttitle($content);
$content = xmlrpc_removepostdata($content);
// CHECK and FORMAT content
$post_title = format_to_post($post_title,0,0);
$content = format_to_post($content,0,0);
if( $errstring = $Messages->get_string( 'Cannot update post, please correct these errors:', '' ) )
{
return new xmlrpcresp(0, $xmlrpcerruser+6, $errstring ); // user error 6
}
// We need to check the previous flags...
$post_flags = $postdata['Flags'];
if( in_array( 'pingsdone', $post_flags ) )
{ // pings have been done before
$pingsdone = true;
}
elseif( !$publish )
{ // still not publishing
$pingsdone = false;
}
else
{ // We'll be pinging now
$pingsdone = true;
}
// UPDATE POST IN DB:
$edited_Item->update( $post_title, $content, '', $post_category, array($post_category), $status, '#', '', 0, $pingsdone, '', '', 'open' );
if( !empty($DB->last_error) )
{ // DB error
return new xmlrpcresp(0, $xmlrpcerruser+9, 'DB error: '.$DB->last_error ); // user error 9
}
if( $publish )
{ // If post is publicly published:
// ping ?
if( in_array( 'pingsdone', $post_flags ) )
{ // pings have been done before
logIO("O","pings have been done before...");
}
else
{ // We'll ping now
// We have less control here as in the backoffice, so we'll actually
// only pingback once, at the same time we do the pings!
// logIO("O","Doing pingbacks...");
// pingback( true, $content, $post_title, '', $post_ID, $blogparams, false);
logIO("O","Sending email notifications...");
$edited_Item->send_email_notifications( false );
logIO("O","Pinging b2evolution.net...");
pingb2evonet( $blogparams, $post_ID, $post_title, false );
logIO("O","Pinging Weblogs...");
pingWeblogs( $blogparams, false );
logIO("O","Pinging Blo.gs...");
pingBlogs( $blogparams, false );
logIO("O","Pinging Technorati...");
pingTechnorati( $blogparams, false );
}
}
return new xmlrpcresp(new xmlrpcval("1", "boolean"));
}
$bloggerdeletepost_doc='Deletes a post, blogger-api like';
$bloggerdeletepost_sig=array(array($xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcBoolean));
/**
* blogger.editPost deletes a given post.
*
* This API call is not documented on
* {@link http://www.blogger.com/developers/api/1_docs/}
*
* {@internal bloggerdeletepost(-) }}
*
* @param xmlrpcmsg XML-RPC Message
* 0 appkey (string): Unique identifier/passcode of the application sending the post.
* (See access info {@link http://www.blogger.com/developers/api/1_docs/#access} .)
* 1 postid (string): Unique identifier of the post to be deleted.
* 2 username (string): Login for a Blogger user who has permission to edit the given
* post (either the user who originally created it or an admin of the blog).
* 3 password (string): Password for said username.
* @return xmlrpcresp XML-RPC Response
*/
function bloggerdeletepost($m)
{
global $xmlrpcerruser; // import user errcode value
global $blog_ID, $DB, $UserCache;
global $ItemCache; // Tor 28102005
$post_ID = $m->getParam(1);
$post_ID = $post_ID->scalarval();
// logIO("O","finished getting post_id ...".$post_ID);
$username = $m->getParam(2);
$username = $username->scalarval();
$password = $m->getParam(3);
$password = $password->scalarval();
if( ! user_pass_ok( $username, $password ) )
{
return new xmlrpcresp(0, $xmlrpcerruser+1, // user error 1
'Wrong username/password combination '.$username.' / '.starify($password));
}
if( ! ($edited_Item = $ItemCache->get_by_ID( $post_ID, false ) ) )
{
return new xmlrpcresp(0, $xmlrpcerruser+7, 'No such post.'); // user error 7
}
$current_User = & $UserCache->get_by_login( $username );
$blog_ID = $edited_Item->blog_ID;
// Check permission:
if( ! $current_User->check_perm( 'blog_del_post', 'any', false, $blog_ID ) )
{
return new xmlrpcresp(0, $xmlrpcerruser+2, // user error 2
'Permission denied.');
}
// DELETE POST FROM DB:
$edited_Item->dbdelete();
if( !empty($DB->last_error) )
{ // DB error
return new xmlrpcresp(0, $xmlrpcerruser+9, 'DB error: '.$DB->last_error ); // user error 9
}
return new xmlrpcresp(new xmlrpcval(1));
}
$bloggergetusersblogs_doc='returns the user\'s blogs - this is a dummy function, just so that BlogBuddy and other blogs-retrieving apps work';
$bloggergetusersblogs_sig=array(array($xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcString));
/**
* blogger.getUsersBlogs returns information about all the blogs a given user is a member of.
*
* Data is returned as an array of 's containing the ID (blogid), name (blogName),
* and URL (url) of each blog.
*
* Non official: Also return a boolean stating wether or not the user can edit th eblog templates
* (isAdmin).
*
* see {@link http://www.blogger.com/developers/api/1_docs/xmlrpc_getUsersBlogs.html}
*
* {@internal bloggergetusersblogs(-) }}
*
* @param xmlrpcmsg XML-RPC Message
* 0 appkey (string): Unique identifier/passcode of the application sending the post.
* (See access info {@link http://www.blogger.com/developers/api/1_docs/#access} .)
* 1 username (string): Login for the Blogger user who's blogs will be retrieved.
* 2 password (string): Password for said username.
* (currently not required by b2evo)
* @return xmlrpcresp XML-RPC Response, an array of 's containing for each blog:
* - ID (blogid),
* - name (blogName),
* - URL (url),
* - bool: can user edit template? (isAdmin).
*/
function bloggergetusersblogs($m)
{
global $xmlrpcerruser, $UserCache;
global $baseurl;
$username = $m->getParam(1);
$username = $username->scalarval();
$password = $m->getParam(2);
$password = $password->scalarval();
logIO("O","entered bloggergetusersblogs.");
if( ! user_pass_ok($username,$password) )
{
return new xmlrpcresp(0, $xmlrpcerruser+1, // user error 1
'Wrong username/password combination '.$username.' / '.starify($password));
}
logIO("O","user approved.");
$current_User = & $UserCache->get_by_login( $username );
logIO("O","Got Current user.".$current_User);
$resp_array = array();
// Loop through all blogs:
for( $curr_blog_ID=blog_list_start();
$curr_blog_ID!=false;
$curr_blog_ID=blog_list_next() )
{
if( ! $current_User->check_perm( 'blog_ismember', 1, false, $curr_blog_ID ) )
{ // Current user is not a member of this blog...
logIO("O","Current user is not a member of this blog.->".$curr_blog_ID);
continue;
}
logIO("O","Current user IS a member of this blog.".$curr_blog_ID);
$resp_array[] = new xmlrpcval( array(
"blogid" => new xmlrpcval( $curr_blog_ID ),
"blogName" => new xmlrpcval( blog_list_iteminfo('shortname', false) ),
"url" => new xmlrpcval( blog_list_iteminfo('blogurl', false) ),
"isAdmin" => new xmlrpcval( $current_User->check_perm( 'templates', 'any' ) ,'boolean')
), 'struct');
}
$resp = new xmlrpcval($resp_array, 'array');
return new xmlrpcresp($resp);
}
$bloggergetuserinfo_doc='gives the info about a user';
$bloggergetuserinfo_sig=array(array($xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcString));
/**
* blogger.getUserInfo returns returns a struct containing user info.
*
* Data returned: userid, firstname, lastname, nickname, email, and url.
*
* see {@link http://www.blogger.com/developers/api/1_docs/xmlrpc_getUserInfo.html}
*
* {@internal bloggergetuserinfo(-) }}
*
* @param xmlrpcmsg XML-RPC Message
* 0 appkey (string): Unique identifier/passcode of the application sending the post.
* (See access info {@link http://www.blogger.com/developers/api/1_docs/#access} .)
* 1 username (string): Login for the Blogger user who's blogs will be retrieved.
* 2 password (string): Password for said username.
* (currently not required by b2evo)
* @return xmlrpcresp XML-RPC Response, a containing:
* - userid,
* - firstname,
* - lastname,
* - nickname,
* - email,
* - url
*/
function bloggergetuserinfo($m)
{
global $xmlrpcerruser, $UserCache;
$username = $m->getParam(1);
$username = $username->scalarval();
$password = $m->getParam(2);
$password = $password->scalarval();
$User =& $UserCache->get_by_login( $username );
if( user_pass_ok( $username, $password) )
{
$struct = new xmlrpcval( array(
'nickname' => new xmlrpcval( $User->get('nickname') ),
'userid' => new xmlrpcval( $User->get('ID') ),
'url' => new xmlrpcval( $User->get('url') ),
'email' => new xmlrpcval( $User->get('email') ),
'lastname' => new xmlrpcval( $User->get('lastname') ),
'firstname' => new xmlrpcval( $User->get('firstname') )
), 'struct' );
$resp = $struct;
return new xmlrpcresp($resp);
}
else
{
return new xmlrpcresp(0, $xmlrpcerruser+1, // user error 1
'Wrong username/password combination '.$username.' / '.starify($password));
}
}
$bloggergetpost_doc = 'fetches a post, blogger-api like';
$bloggergetpost_sig = array(array($xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcString, $xmlrpcString));
/**
* blogger.getPost retieves a given post.
*
* This API call is not documented on
* {@link http://www.blogger.com/developers/api/1_docs/}
*
* {@internal bloggergetpost(-) }}
*
* @param xmlrpcmsg XML-RPC Message
* 0 appkey (string): Unique identifier/passcode of the application sending the post.
* (See access info {@link http://www.blogger.com/developers/api/1_docs/#access} .)
* 1 postid (string): Unique identifier of the post to be deleted.
* 2 username (string): Login for a Blogger user who has permission to edit the given
* post (either the user who originally created it or an admin of the blog).
* 3 password (string): Password for said username.
* @return xmlrpcresp XML-RPC Response
*/
function bloggergetpost($m)
{
global $xmlrpcerruser;
$post_ID = $m->getParam(1);
$post_ID = $post_ID->scalarval();
$username = $m->getParam(2);
$username = $username->scalarval();
$password = $m->getParam(3);
$password = $password->scalarval();
if( user_pass_ok($username,$password) )
{
$postdata = get_postdata($post_ID);
if( $postdata['Date'] != '' )
{
$post_date = mysql2date("U", $postdata["Date"]);
$post_date = gmdate("Ymd", $post_date)."T".gmdate("H:i:s", $post_date);
$content = "".$postdata["Title"]."