Support » Requests and Feedback » Improved <!–more–> tag

  • I would like to the the [!–more–] tag extended to include a [!–nomore–] tag as well.
    This would allow you to use the more tag nore multiple teasers/screened content.
    If you’ve used LiveJournal this is like the [lj-cut] tag which is a handy little feature.
    I took a quick crack at implementing this idea as a filter, but the current system appears to toss anything after a second [!–more–] tag no matter what. If there is a way to filter that, then I would be happy to do that as well.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I seem to recall there was a long thread on this topic a while back — someone else looking for something like the lj-cut thing. Did you do a search on the forum?
    There’s the [!–nextpage–] tag, which lets you further split up your content beyond the initial excerpt stuff. Does that not do enough? I can’t recall we ever had a good enough example case.
    I’ve done lots of core tweaks — if you can tell me what it is you are trying to really replicate in useful feature, I’d be more than happy to help out. 😉




    I think the “nomore” tag is more like a _fold_ than a cut. Everything between the “more” / “nomore” tags gets suppressed, so you could block out the body of a post but still have a lead-in and lead-out.

    Yes, it is like a fold, exactly.
    The best example I can think of is this,
    I watch American Idol, Survivor and JAG. I want to write a post about this weeks shows for all three.
    I want to write about what happened on AI but I don’t want to spoil it for anyone who might have taped it but not yet watch it.
    Then I want to write about JAG, but I don’t care if anyone reads the comments since it probably isn’t going to ruin the show.
    Then I want to write about Survivor, again, not revealing anything for those who haven’t watched yet.
    With the current more tag I have to carefully order the content so that JAG comes first, then the other two. But even this won’t be ideal because the person who watched Survivor, but NOT AI will be sent to the American Idol part of the post when they click the more link if it is first.
    With the lj-cut tag you can use mutliple tags so that if you just want to read more about Survivor you can go to the post and it will anchor to the Survivor section.
    I have spent several hours trying to hack my way around this (without hacking on the more tag itself) and I am stumped….every tag I try to make gets eaten by WP 🙂
    I’ve tried
    standard html style braces
    But they all are getting parsed out before my filter is called, so I lose them. I have a working filter that correctly parses all four tag styles, I just can’t ever get the tags to make it to my filter.
    The html tags get mangled when I save the post to the db, I have no idea which function is causing that. The other 3 seem to be filtered out in the display code because they survive the trip to the db.

    hmmm. I’ll have to think about that. Since I do my own custom tags, I’m somewhat ‘proficient’ in processing the page data, but you’re talking about hiding/showing certain sub-blocks of content based upon something like a #more stack. Would want to be a new parameter for what section to show/anchor.
    hmmmm… basically a post within a post. maybe that’s a better way to think about it. yeah. each ‘fold’ is numbered, and all folds are normally hidden. a fold marker is a link to the post with an added parameter (&fold=<number here>), which the page processing code would want to handle after nextpage tag handling, but maybe just after so that the content passed along is properly ‘clipped’ or not.
    basically, the content is all there, the tags (and the extra URL param) just tell it when to NOT clip a block of content.
    Would that work? I could whip that up…

    I’m not sure how the nextpage is involved, but that is probably because I am a new WordPress user.
    Anyway, your idea sounds relatively solid.
    I would STILL love to know how to get my custom tags past the parsers. I actually have fully working code that implements the idea, I just can’t get my tags back from the db.
    The scheme is use currently is similar to the more tag. It hides the content and then uses a page anchor to let you jump to the correct place.
    I created an exmple in my LiveJournal so you can see what I am trying to replicate. LJ Cut Example is the name of the post, it may not be first on the page, but it will be near the top, all depends on how much posting I do before you read it.
    Anyway, my filter appears to handle this correctly (though come to think of it it may fail with permalinks, but I couldn’t tell you since I haven’t gotten them working yet….)
    My code if you want to look at it. The algorithm is pretty simple, I think.
    Agggghhhhhh… I went to play with it and it is working now… confused….though I doubt the html tags are working, but I could live without them…

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Improved <!–more–> tag’ is closed to new replies.