returned ljpost to same as in friendica/friendica-addons

rather than make it offer other sites, I am writing separate plugins
for separate sites.
I already have a dreamwidth one written, as can be seen in my repo.
Can/maybe will write up insanejournal, deadjournal, blurty, etc.
eventually, too
pull/15/head
Tony Baldwin 2012-03-02 18:54:24 -05:00
parent 2b876524a5
commit e57eb5d198
1 changed files with 1 additions and 8 deletions

View File

@ -61,7 +61,6 @@ function ljpost_settings(&$a,&$s) {
$lj_username = get_pconfig(local_user(), 'ljpost', 'lj_username'); $lj_username = get_pconfig(local_user(), 'ljpost', 'lj_username');
$lj_password = get_pconfig(local_user(), 'ljpost', 'lj_password'); $lj_password = get_pconfig(local_user(), 'ljpost', 'lj_password');
$lj_url = get_pconfig(local_user(), 'ljpost', 'lj_url');
/* Add some HTML to the existing form */ /* Add some HTML to the existing form */
@ -83,11 +82,6 @@ function ljpost_settings(&$a,&$s) {
$s .= '<input id="ljpost-password" type="password" name="lj_password" value="' . $lj_password . '" />'; $s .= '<input id="ljpost-password" type="password" name="lj_password" value="' . $lj_password . '" />';
$s .= '</div><div class="clear"></div>'; $s .= '</div><div class="clear"></div>';
$s .= '<div id="ljpost-url-wrapper">';
$s .= '<label id="ljpost-url-label" for="ljpost-url">' . t('LiveJournal URL') . '</label>';
$s .= '<input id="ljpost-url" type="url" name="lj_url" value="' . $lj_url . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="ljpost-bydefault-wrapper">'; $s .= '<div id="ljpost-bydefault-wrapper">';
$s .= '<label id="ljpost-bydefault-label" for="ljpost-bydefault">' . t('Post to LiveJournal by default') . '</label>'; $s .= '<label id="ljpost-bydefault-label" for="ljpost-bydefault">' . t('Post to LiveJournal by default') . '</label>';
$s .= '<input id="ljpost-bydefault" type="checkbox" name="lj_bydefault" value="1" ' . $def_checked . '/>'; $s .= '<input id="ljpost-bydefault" type="checkbox" name="lj_bydefault" value="1" ' . $def_checked . '/>';
@ -108,7 +102,6 @@ function ljpost_settings_post(&$a,&$b) {
set_pconfig(local_user(),'ljpost','post_by_default',intval($_POST['lj_bydefault'])); set_pconfig(local_user(),'ljpost','post_by_default',intval($_POST['lj_bydefault']));
set_pconfig(local_user(),'ljpost','lj_username',trim($_POST['lj_username'])); set_pconfig(local_user(),'ljpost','lj_username',trim($_POST['lj_username']));
set_pconfig(local_user(),'ljpost','lj_password',trim($_POST['lj_password'])); set_pconfig(local_user(),'ljpost','lj_password',trim($_POST['lj_password']));
set_pconfig(local_user(),'ljpost','lj_url',trim($_POST['lj_url']));
} }
@ -170,7 +163,7 @@ function ljpost_send(&$a,&$b) {
$lj_username = get_pconfig($b['uid'],'ljpost','lj_username'); $lj_username = get_pconfig($b['uid'],'ljpost','lj_username');
$lj_password = get_pconfig($b['uid'],'ljpost','lj_password'); $lj_password = get_pconfig($b['uid'],'ljpost','lj_password');
$lj_blog = '$lj_url/interface/xmlrpc'; $lj_blog = 'http://www.livejournal.com/interface/xmlrpc';
if($lj_username && $lj_password && $lj_blog) { if($lj_username && $lj_password && $lj_blog) {