Jonkman Microblog
  • Login
Show Navigation
  • Public

    • Public
    • Network
    • Groups
    • Popular
    • People

Conversation

Notices

  1. Sean Tilley (dsh@deadsuperhero.com)'s status on Thursday, 22-Mar-2018 18:05:31 EDT Sean Tilley Sean Tilley
    !Hubzilla Development I'm finally digging into the Articles system to see what kinds of modifications I can make to it. As per usual, I have a few questions.

    If I wanted to modify the elements inside of the article content, would I need to effectively override the markup template? I noticed that currently, articles use cards.tpl for get_markup_template, I'm a little curious as to whether creating an articles.tpl at some point might make sense for article-specific customizations. I'm trying to figure out how to remove the view article / view summary link.

    Another thing I'd love to figure out is how to display different views depending on whether I'm looking at the article index, or the article display. I know that Hubzilla generally treats these two things as the same when it comes to posts / the stream, is there a sane way to separate the two? I think I want my index to be a grid of thumbnails and links, whereas the article display would be the full-length content. As a workaround, it might be possible to just create a plugin and set up a different index view at a different URL path, but that might be a bit of a hacky experience.
    In conversation Thursday, 22-Mar-2018 18:05:31 EDT from deadsuperhero.com at 37°47'2"N 122°23'50"W permalink
    1. Sean Tilley (dsh@deadsuperhero.com)'s status on Thursday, 22-Mar-2018 19:53:30 EDT Sean Tilley Sean Tilley
      in reply to
      Currently the difference between the two modules (articles and cards) are very minor and it made sense to only have one common template to ease maintenance. If you feel they need to diverge, it's easy enough to branch a new template for articles.

      Currently there is a PHP variable $selected_card (yes I know, same name in both modules). If that is set to something you're in single article view mode. The template currently doesn't  care which view mode you're using, but you could pass this to the template and make decisions based on it.  

      You might save the next paragraph or two somewhere because it contains some important considerations for what you're trying to pull off.

      The conversation() function knows about a thing called 'list' mode which uses a different "condensed" item template. You can set this for instance for your channel or network page or even pubstream pages on your site.

      The problem is the variable we are using has three different values. 'traditional' or old-fashioned page=n use, 'client' or AJAX updates, and 'list' which is AJAX with the alternate template. (edit: there's also a page mode called 'preview', so there are four).

      The problem is that articles and cards aren't ajax enabled. So you can't just turn on list mode and everything will just work. The list mode is currently assuming that ajax is in use. Converting these pages to an ajax loader will happen eventually but not today. It's a fair chunk of work. The easiest way I can see to get where you want to go is to create yet another page_mode variable which represents list mode but with the traditional page loader. This would be incredibly easy to pull off and would let you specify a list mode for these pages. No doubt you'll want to modify our ugly list-mode template but you would be doing that anyway.
      In conversation Thursday, 22-Mar-2018 19:53:30 EDT from macgirvin.com permalink
    2. Sean Tilley (dsh@deadsuperhero.com)'s status on Thursday, 22-Mar-2018 20:20:19 EDT Sean Tilley Sean Tilley
      in reply to
      Update: I've just made list mode work for articles and cards. Youl'l see it in dev in a day or two. What you will need to do is visit


      https://deadsuperhero.com/pconfig/system/articles_list_mode


      and set it to '1'. And your articles overview page will be in list mode rather than conversation mode.
      In conversation Thursday, 22-Mar-2018 20:20:19 EDT from macgirvin.com permalink
    3. Sean Tilley (dsh@deadsuperhero.com)'s status on Thursday, 22-Mar-2018 20:43:45 EDT Sean Tilley Sean Tilley
      in reply to
      !Hubzilla Development

      Interesting...
      In conversation Thursday, 22-Mar-2018 20:43:45 EDT from deadsuperhero.com permalink
    4. Sean Tilley (dsh@deadsuperhero.com)'s status on Friday, 23-Mar-2018 11:58:29 EDT Sean Tilley Sean Tilley
      in reply to

      https://deadsuperhero.com/channel/dsh/?f=&mid=78a2df90b06b0db8c1308fb08ace40efd2b9e10f4317e7ab580ba7b9d2fde6f9@deadsuperhero.com


      more interesting if you can see all ....
      In conversation Friday, 23-Mar-2018 11:58:29 EDT from gerzilla.de permalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

Jonkman Microblog is a social network, courtesy of SOBAC Microcomputer Services. It runs on GNU social, version 1.2.0-beta5, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Jonkman Microblog content and data are available under the Creative Commons Attribution 3.0 license.

Switch to desktop site layout.