WP-Grins: Where do I upload wp-grins.php?
-
Ehh, I’m stumped on this one. It looks really easy to install, but I don’t know where the heck I should install the file, or if I’m even supposed to install it.
And another one — how do I go about with my-hacks.php? I read somewhere about adding the smilies function between the php tags, but where do I find that? Do I really even need to do that, or do I just add <?php require_once(‘wp-grins.php’); ?> and save it as my-hacks.php? And last question: where do I upload it — in wp-admin folder?
-
Thank you so much! 😀
Anyone?
Not sure anyone can help you beyond what has been said thus far with the info provided. The most common cause is whitespace in your my-hacks file. I don’t know what you are using to edit my-hacks, but try a different editor and make sure there is no white space before
<?phpOr after ?>
A good free php editor is http://www.crimsoneditor.com
And yes, those errors are caused by whitespace.
<?php must be the *very* first thing in your ‘my-hacks.php’ and ?> must be the last thing. There cannot be anything after it at all.<?php function ljautoupdate ($content=”, $post_title=”) {
/*ljautoupdate*/
$lj_userid = “xokath”; //Your LiveJournal username, please replace within quotes
$lj_passwd = “verdammt”; //Your LiveJournal password, please replace within quotes
$lj_method = “LJ.XMLRPC.postevent”;
$lineendings = “pc”;
$content = stripslashes(stripslashes($content));
$content = convert_bbcode($content);
$content = convert_gmcode($content);
$content = convert_chars($content, ‘html’);
//$content = apply_filters(‘the_content’, $content);
$event = $content;
$subject = $post_title;
$time_difference = get_settings(“time_difference”);
//$timenow = getdate();
$year = date(‘Y’, (time() + ($time_difference * 3600)));
//$year = $timenow[“year”];
$month = date(‘m’, (time() + ($time_difference * 3600)));
//$month = $timenow[“mon”];
$day = date(‘d’, (time() + ($time_difference * 3600)));
//$day = $timenow[“mday”];
$hour = date(‘H’, (time() + ($time_difference * 3600)));
//$hour = $timenow[“hours”];
$minute = date(‘i’, (time() + ($time_difference * 3600)));
//$minute = $timenow[“minutes”];
$security = ‘usemask’;
$allowmask = ‘1’;
$client = new xmlrpc_client(“/interface/xmlrpc”, “www.livejournal.com”, 80);
$x_params_r = array( “username” => utf8_encode( $lj_userid ),
“password” => utf8_encode( $lj_passwd ),
“lineendings” => $lineendings,
“event” => utf8_encode( $event ),
“subject” => utf8_encode( $subject ),
“security” => utf8_encode( $security ),
“allowmask” => utf8_encode( $allowmask ),
“year” => utf8_encode( $year ),
“mon” => utf8_encode( $month ),
“day” => utf8_encode( $day ),
“hour” => utf8_encode( $hour ),
“min” => utf8_encode( $minute ));
//print_r($x_params_r);
$params = array( xmlrpc_encode( $x_params_r ) );
$msg = new xmlrpcmsg(‘LJ.XMLRPC.postevent’, $params);
$client->setDebug(0);
$result = $client->send($msg);
if ($result->faultCode() != 0)
{
print “Couldn’t process request: ” . $result->faultString();
return;
}
/*end ljautoupdate*/
}
?>
<?php require_once(‘wp-grins.php’); ?><? php function ljautoupdate ($content=”, $post_title=”) {
/*ljautoupdate*/
$lj_userid = “xokath”; //Your LiveJournal username, please replace within quotes
$lj_passwd = “verdammt”; //Your LiveJournal password, please replace within quotes
$lj_method = “LJ.XMLRPC.postevent”;
$lineendings = “pc”;
$content = stripslashes(stripslashes($content));
$content = convert_bbcode($content);
$content = convert_gmcode($content);
$content = convert_chars($content, ‘html’);
//$content = apply_filters(‘the_content’, $content);
$event = $content;
$subject = $post_title;
$time_difference = get_settings(“time_difference”);
//$timenow = getdate();
$year = date(‘Y’, (time() + ($time_difference * 3600)));
//$year = $timenow[“year”];
$month = date(‘m’, (time() + ($time_difference * 3600)));
//$month = $timenow[“mon”];
$day = date(‘d’, (time() + ($time_difference * 3600)));
//$day = $timenow[“mday”];
$hour = date(‘H’, (time() + ($time_difference * 3600)));
//$hour = $timenow[“hours”];
$minute = date(‘i’, (time() + ($time_difference * 3600)));
//$minute = $timenow[“minutes”];
$security = ‘usemask’;
$allowmask = ‘1’;
$client = new xmlrpc_client(“/interface/xmlrpc”, “www.livejournal.com”, 80);
$x_params_r = array( “username” => utf8_encode( $lj_userid ),
“password” => utf8_encode( $lj_passwd ),
“lineendings” => $lineendings,
“event” => utf8_encode( $event ),
“subject” => utf8_encode( $subject ),
“security” => utf8_encode( $security ),
“allowmask” => utf8_encode( $allowmask ),
“year” => utf8_encode( $year ),
“mon” => utf8_encode( $month ),
“day” => utf8_encode( $day ),
“hour” => utf8_encode( $hour ),
“min” => utf8_encode( $minute ));
//print_r($x_params_r);
$params = array( xmlrpc_encode( $x_params_r ) );
$msg = new xmlrpcmsg(‘LJ.XMLRPC.postevent’, $params);
$client->setDebug(0);
$result = $client->send($msg);
if ($result->faultCode() != 0)
{
print “Couldn’t process request: ” . $result->faultString();
return;
}
/*end ljautoupdate*/
}
<?php require_once(‘wp-grins.php’); ?>
This is what my file looks like.Nevermind, it works now.
The topic ‘WP-Grins: Where do I upload wp-grins.php?’ is closed to new replies.