Anyway, I can prepare a patch, but since it's so easy...
Thx
BR
function getUserInfo()
{
if (!$this->_checkUser($this->params[1], $this->params[2])) {
$this->response->add(new XoopsXmlRpcFault(104));
} else {
$arr = new XoopsXmlRpcArray();
$struct = new XoopsXmlRpcStruct();
$struct->add('nickname', new XoopsXmlRpcString($this->user->getVar('uname')));
$struct->add('userid', new XoopsXmlRpcString($this->user->getVar('uid')));
$struct->add('url', new XoopsXmlRpcString($this->user->getVar('url')));
$struct->add('email', new XoopsXmlRpcString($this->user->getVar('email')));
$struct->add('lastname', new XoopsXmlRpcString($this->user->getVar('')));
$struct->add('firstname', new XoopsXmlRpcString($this->user->getVar('name')));
$arr->add($struct);
$this->response->add($arr);
}
}
case 'blogger':
include_once XOOPS_ROOT_PATH.'/class/xml/rpc/bloggerapi.php';
$rpc_api = new BloggerApi($parser->getParam(), $response, $module);
Visit my page: https://xoops.org
Hi, visit https://xoops.org
xoops: "|/bin/parser"
#include <stdio.h>
int main(void)
{
char mycad[1024];
char total[10000];
char *pos;
char XoopUser[1024], XoopPasswd[1024], XoopTitle[1024], XoopMessage[10000], XoopTopic[1024];
printf("Received parameters:\n");
while ( !feof(stdin) )
{
fscanf(stdin,"%[^\n]", mycad );
fgetc(stdin);
if ( strstr ( mycad, "XoopUser:" ) )
{
strcpy (XoopUser, strstr ( mycad, ":" ) + 1);
printf("->XoopUser:%s\n",XoopUser);
}
if ( strstr ( mycad, "XoopPasswd:" ) )
{
strcpy (XoopPasswd, strstr ( mycad, ":" ) + 1);
printf("->XoopPasswd:%s\n",XoopPasswd);
}
if ( strstr ( mycad, "XoopTitle:" ) )
{
strcpy (XoopTitle, strstr ( mycad, ":" ) + 1);
printf("->XoopTitle:%s\n",XoopTitle);
}
if ( strstr ( mycad, "XoopMessage:" ))
{
strcpy (XoopMessage, strstr ( mycad, ":" )+1);
printf("->XoopMessage:%s\n",XoopMessage);
}
if ( strstr ( mycad, "XoopTopic:" ) )
{
strcpy (XoopTopic, strstr ( mycad, ":" ) +1);
printf("->XoopTopic:%s\n",XoopTopic);
}
mycad[0]=0;
}
sprintf( total, "/usr/bin/php4 /usr/share/xoops/post_xoops %s %s %s %s %s", XoopUser, XoopPasswd, XoopTitle,
XoopMessage, XoopTopic, NULL );
printf("Executing %s\n", total);
system ( total );
return 0;
}
<?php
$myargsKikoV=$GLOBALS['argv'];
$HTTP_SERVER_VARS['REQUEST_METHOD'] ='POST';
$HTTP_SERVER_VARS['HTTP_REFERER'] = 'http://your.url.org/modules/news/submit.php';
$nohtml = 1;
include '/path/to/xoops/mainfile.php';
include_once '/path/to/xoops/modules/news/class/class.newsstory.php';
$module_handler =& xoops_gethandler('module');
$xoopsModule =& $module_handler->getByDirname('news');
$nohtml_db = 1;
$xoopsModuleConfig =& $config_handler->getConfigsByCat(0, $xoopsModule->getVar('mid'));
echo "\n";
if (count ($myargsKikoV ) < 5)
{
echo "Usage: php4 ".$myargsKikoV[0]." UserName Password Title Message [Topic]\n";
exit(0);
}
$param_username=$myargsKikoV[1];
$param_password=$myargsKikoV[2];
$param_title=$myargsKikoV[3];
$param_message=$myargsKikoV[4];
if ( count($myargsKikoV) >= 6 )
{
$param_topic=$myargsKikoV[5];
$sql = 'SELECT topic_id FROM '. $xoopsDB->prefix("topics")." WHERE topic_title='".$param_topic."'";
$result = $xoopsDB->query('SELECT topic_id FROM '. $xoopsDB->prefix("topics")." WHERE topic_title='".$param_topic."'");
$topic = array();
$myts =& MyTextSanitizer::getInstance();
while ($myrow = $xoopsDB->fetchArray($result)) {
$topic_id= $myrow['topic_id'];
}
}
$member_handler =& xoops_gethandler('member');
$myts =& MyTextsanitizer::getInstance();
$user =& $member_handler->loginUser(addslashes($myts->stripSlashesGPC($param_username)), addslashes($myts->stripSlashesGPC($param_password)));
if ( ! $user )
{
echo "Login problem\n";
exit(1);
}
$luid=$user->getVar('uid');
$xoopsUser =& $member_handler->getUser($luid);
if ( $xoopsUser ) {
$uid = $xoopsUser->getVar('uid');
if ( $xoopsUser->isAdmin($xoopsModule->mid()) ) {
$nohtml_db = empty($nohtml) ? 0 : 1;
}
} else {
echo "xoopsModuleConfig:".$xoopsModuleConfig['anonpost'];
if ( $xoopsModuleConfig['anonpost'] == 1 ) {
$uid = 0;
} else {
redirect_header("index.php",3,_NOPERM);
exit();
}
}
$story = new NewsStory();
$story->setTitle($param_title);
$story->setHometext($param_message);
$story->setUid($uid['value']);
$story->setTopicId($topic_id);
$story->setHostname(xoops_getenv('REMOTE_ADDR'));
$story->setNohtml($nohtml_db);
$nosmiley = isset($nosmiley) ? intval($nosmiley) : 0;
$notifypub = isset($notifypub) ? intval($notifypub) : 0;
$story->setNosmiley($nosmiley);
$story->setNotifyPub($notifypub);
$story->setType('user');
if ( $xoopsModuleConfig['autoapprove'] == 1 ) {
$approve = 1;
$story->setApproved($approve);
$story->setPublished(time());
$story->setExpired(0);
$story->setTopicalign('R');
}
$result = $story->store();
?>
XoopUser:myuser
XoopPasswd:mypasswd
XoopTitle:This.is.my.news.sent.by.email
XoopMessage:Hi!This.is.my.first.NEWS.sent.by.email.
XoopTopic:Xoops