[personal profile] ari_linn posting in [community profile] style_system
Hello,

I want to know how to make a link to an LJ crossposted post. See, I'm posting something into DW and it gets crossposted to LJ. It leaves a link to the original DW post in a crossposted LJ post:



I was thinking that it would be nice to have a link to the crossposted LJ post in the original DW post as I didn't see it anywhere.



But the link was nowhere to be found until I stumbled upon one of my friends' friend page that showed my DW post with a link to the crossposted LJ post!



I don't know what theme he uses, but it seems like it's something unmodified and pure DW. I, on the other hand, use a custom theme that is basically copypasted from LJ's Smooth Sailing theme (I was given an instruction how to copypaste it here in this community). Now, I want to add a link to my crossposted LJ posts to my custom theme. Is it possible? I think I'm savvy enough to modify the theme code provided that I know the variable that holds LJ post id.

Date: 2016-02-01 03:49 am (UTC)
syntheid: [Card Captor Sakura] Syaoran Li simplified, waving slightly awkwardly (o hai thar)
From: [personal profile] syntheid
So your friend just has the setting selected on this page to "Display Crosspost Link" for the journal he's crossposting to. You'll definitely need to have that on, so the setting is available on the DW server side. But there might also be some customization of the theme that has to happen since you have a custom theme, and that's a bit beyond my current scope.
Edited (clarification) Date: 2016-02-01 03:53 am (UTC)

Date: 2016-02-01 05:47 am (UTC)
allen: extras (extras)
From: [personal profile] allen
It's normally printed out in the print_metadata method call for the entry, which is also what prints out the mood, location, music, and groups values, if available. So a common way to call that for an entry would be


$e->print_text();
$e->print_metadata();
$e->print_tags();
$e->print_management_links();


Which would print our the text of the entry, followed by the metadata, the tags, and the management links.

Hmm, it looks like your style has a display for mood and music (or so Google Translate tells me :) ), so I'm guessing it's putting those values in by hand instead of using the print_metadata() call. So maybe find the place in your style that inserts that text and add in a value for crosspost? It should be available in the same way as 'mood' and 'music', but using the 'xpost' key.

Date: 2016-02-01 05:49 am (UTC)
momijizukamori: (dreamsheep | styles)
From: [personal profile] momijizukamori
It's part of Entry::print_metadata - you'll have to copy over the variables it uses, too, probably, as core1 doesn't 'know' about them.

Profile

Dreamwidth style system discussion

July 2025

S M T W T F S
  123 45
6789101112
13141516171819
20212223242526
2728293031  

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 12th, 2025 04:40 pm
Powered by Dreamwidth Studios