skakri: (Default)
skakri ([personal profile] skakri) wrote in [site community profile] dw_dev2011-05-27 01:33 am
Entry tags:

importer and xpost

Hello, I'd like to know if there is any documentation regarding content importing from LJ-based site (AFAIK, old version, circa "07) and cross-post setup steps? How should I define a new external site?

I'm currently using jbackup.pl + LJ::Simple mash-up, but that won't work in the long run, as even if entry backdate is set, users still receive messages of a new posts, if they're subscribed.
allen: (crowley)

[personal profile] allen 2011-05-27 02:20 pm (UTC)(link)
I assume you mean an LJ-based site that's not one of the preconfigured ones? I don't know that there's a way to do imports from those, but you should be able to set up crossposting. When you set up your new External Site, choose Site 'Other Site', Custom Service Type 'lj', Custom Service Name (something appropriate), and Custom Service URL 'http://your.site.url/interface/xmlrpc'. Should work with any not-incredibly-ancient LJ-based site.
allen: (crowley)

[personal profile] allen 2011-05-27 05:32 pm (UTC)(link)
Oh. I think that's an older LJ version than '07, though I may be wrong.

So that's a bug--we should assume custom LJ-based sites are older LJ versions. I filed bug 3701 against it.

Sorry about that.
exor674: Computer Science is my girlfriend (Default)

[personal profile] exor674 2011-05-27 08:11 pm (UTC)(link)
We are talking about on their own DW-based site, and since their script uses jbackup, the importer should work just fine.
allen: (crowley)

[personal profile] allen 2011-05-28 02:01 pm (UTC)(link)
Oh. So like adding a new site to the default list of crosspost/importer sites? For crossposting, you just go into cgi-bin/DW/External/Site.pm and add a line to the $domaintosite initialization, then add a corresponding class in cgi-bin/DW/External/Site/(Sitename).pm.

In this case, since the site in question doesn't support the useragent property, you'd want to make sure to get a pre_crosspost_hook that removes that setting. Use the DeadJournal.pm file as a template.

[personal profile] skakri, is that more helpful?
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2011-05-29 09:23 am (UTC)(link)
Have you tried stopping and then restarting Apache after making your changes? That's what always gets me!
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2011-05-29 09:43 am (UTC)(link)
*g* I can't count the number of times that's bitten me. I've finally learned that if something doesn't seem to be working right, I should bounce Apache, but it took me forever to get that ingrained!

To configure a site for import, I'm not positive, but I think it should be enough to add it into cgi-bin/LJ/Widget/ImportChooseSource.pm if it's LJ-based. If that isn't enough, let me know and I'll dig into things more deeply.

(Also, to add in new sites for the <user name=foo site=example.com> tag, they go into cgi-bin/DW/External/Site -- use the ones that are already there as an example of what they should look like.)

denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2011-05-29 10:05 am (UTC)(link)
Hm. Assuming that you stopped and restarted Apache and the workers, I'm stumped. I'll poke the dev who wrote the importer and see if she has any suggestions!
exor674: Computer Science is my girlfriend (Default)

[personal profile] exor674 2011-05-29 06:45 pm (UTC)(link)
Which stage is failing?