Haloperidol / ljxp

Automatically exported from code.google.com/p/ljxp
0 stars 0 forks source link

Userpics & Comments not setting right #144

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
After editing posts to push them through to Livejournal, I made sure to switch 
my userpic on the post to be what I wanted, but it still shows up as "default". 
 I went in and set all the other entry based settings as well, and now my 
comments are turned on when I have them set to off everywhere.

I am using Wordpress 3.2.1 and LJXP 2.2.1.

I had JUST updated my LJXP to the new version. I had modified the old one to 
use the "knitting fiend" icon - I think I had to edit the template and put in 
the LJ code you would normally use while submitting from email to make it show 
that icon.

If you scroll down in my LiveJournal blog, you can see exactly where I changed 
the plugin, as now all my icons are showing my "default" icon instead of my 
"knitting fiend" icon and my comments turned on as well (July 31 is the last 
proper publish).

http://calophi.livejournal.com/

Original issue reported on code.google.com by calo...@gmail.com on 10 Aug 2011 at 5:57

GoogleCodeExporter commented 8 years ago
Wow, I definitely broke this somewhere in the last couple of releases. Thanks 
for reporting it! 

It'll be fixed in the next release. If you want to patch your copy until then, 
open up lj-xp.php and look for this section (should be line 45):

// Get postmeta overrides
    $privacy = get_post_meta($post->ID, 'ljxp_privacy', true);
    if (isset($privacy) && $privacy != 0) $options['privacy'] = $options['privacy_private'] = $privacy;
    $comments = get_post_meta($post->ID, 'ljxp_comments', true);
    if (isset($comments) && $comments != 0) $options['comments'] = $comments;

Enter this in the blank line just after:

$options['userpic'] = get_post_meta($post->ID, 'ljxp_userpic', true);

Original comment by st...@sillybean.net on 10 Aug 2011 at 11:41

GoogleCodeExporter commented 8 years ago
Any clue about why the comments don't turn off if I set them within the post?  
Commenting out the two override lines seems to have fixed the problem by just 
using my default setting (which is off, but when the userpics stopped working I 
tried setting all my post options).

Original comment by calo...@gmail.com on 10 Aug 2011 at 11:51

GoogleCodeExporter commented 8 years ago
Yep. Sheesh. I overlooked the fact that the original developers had used a 
different setting on the individual posts. 

Here's the fix. This should be line 287 or 288. Wherever it is:

'props' => array('opt_nocomments' => !$options['comments'], // allow comments?

Change it to:

'props'  => array('opt_nocomments' => $options['comments'] & 1, // allow 
comments?

Original comment by st...@sillybean.net on 11 Aug 2011 at 12:11

GoogleCodeExporter commented 8 years ago
... scratch that; there's more to it. I just uploaded a fresh copy of lj-xp.php 
to the repository. I'm not releasing this just yet because there are a handful 
of other bug reports I'd like to address, but you can copy this over your 
existing file and it should fix both the userpics and the comments.

http://ljxp.googlecode.com/svn/trunk/lj-xp.php

Original comment by st...@sillybean.net on 11 Aug 2011 at 1:23