• Resolved kennethrg

    (@kennethrg)


    Hi, I’m wondering if/how I can change the formatting of the post that is created on my site when I reblog a friends’ post.

    Out of the box, the original post content is included in a blockquote with a short introduction giving the name of the original user who posted it. I’d like to change the wording in the introduction text (we don’t use the word “blog” on our site), and because of the way my theme renders blockquotes, I’d like to at least add a class to the blockquote in order to change the way it’s displayed with some custom css.

    Thanks for a great plugin and for your ongoing work!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Alex Kirk

    (@akirk)

    Hi, after mulling a bit about the situation, I think the best approach would be to actually separate the ActivityPub boosting from the reblogging. Before this was in one which required a unified operation. WIth https://github.com/akirk/friends/pull/309 I’ve split this, so that the “Reblog” will take you to the editor where you can deliberately modify and publish:

    Thread Starter kennethrg

    (@kennethrg)

    Thanks! This is very helpful. I hadn’t thought of separating “boost” from “reblog” but I see that it makes sense. And going directly to the editor from the reblog is a huge help in this circumstance.

    I have been mulling about this too, and with this pull request directing me to the code involved, I have a couple other ideas that may be useful to others:

    • The actual formatting code for the reblogged post is hard-coded in the reblog function of class-frontend.php. One could simply change these lines, e.g. div instead of blockquote, and add a custom class.
    • It may be helpful to include these as a translatable string, or a string stored in wp_options or something like that; I see potentially four strings that define the formatting of the post: reblog-header-prefix, reblog-header-suffix, reblog-body-prefix, reblog-body-suffix.
    • The fanciest way to make this customizable would be to create an editable template for these posts, so the entire thing could be designed to suit the individual site. This template would include shortcodes (or something similar) that would be replaced with values of post_title, author, and post_content by the reblog function when an individual friend post is reblogged.

    If I get ambitious later this week, maybe I’ll try to write some code for this PR that will implement some type of editable template.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can I customize reblog post format?’ is closed to new replies.