Giter VIP home page Giter VIP logo

Comments (7)

bobbingwide avatar bobbingwide commented on September 24, 2024

It would also be nice if the targeted posts could refer back to their origins. Trackback kind of thingy.

from bigram.

bobbingwide avatar bobbingwide commented on September 24, 2024

The new file admin/bigram-sample-bigrams.php implements a batch routine that will search for SB's in the content. It generates new bigrams with the content <!--more-->Sampled from {$post->post_title}.
The new bigrams are created with the same timestamp as the post from which they are extracted.
The batch routine use class sample_bigrams.

The next stage is to implement a filter function for the_content to automatically generate the links to the bigrams. This should then automatically satisfy the trackback kind of thingy.

from bigram.

bobbingwide avatar bobbingwide commented on September 24, 2024

The batch routine works quite well. Now we need to implement logic to automatically create new SBs on Save. Note: There’s no need to detect changed SBs. Once an SB has been created it should remain in existence until it’s been determined that it wasn’t required, or is a duplicate.

from bigram.

bobbingwide avatar bobbingwide commented on September 24, 2024

There's a problem creating new bigrams.

I haven't fully debugged it but assume it's simply due to echo's in the code that was originally written for use in oik-batch and the fact that we're doing some processing during AJAX requests.

Proposed solution

We have to avoid echoing stuff when the request is not being run in batch.

  • Add an echo method which does nothing when $this->echo is false.
  • Provide a set_echo method to be used in batch.

Avoid doing any work for AJAX requests, especially saving of drafts in heartbeats.

from bigram.

bobbingwide avatar bobbingwide commented on September 24, 2024

There’s an edge case for when the bw_link shortcode expands to give an title containing Sxxx Bxxx. This is detected as a different link to the original. See ‘Stop blogging, start bigramming’.

from bigram.

bobbingwide avatar bobbingwide commented on September 24, 2024

There’s an edge case for when the bw_link shortcode expands to give an title containing Sxxx Bxxx. This is detected as a different link to the original. See ‘Stop blogging, start bigramming’.

I don't understand this comment. I'm going to close this issue now that bigram v0.4.1 has been delivered.

from bigram.

bobbingwide avatar bobbingwide commented on September 24, 2024

I looked at the code the sample_bigrams::sample_post() method and reckoned it should be easy to change it to sample bigrams when a bigram is first created. It doesn't need to check if it's an update so long as it checks that the post content doesn't contain <!--more-->Seen before which is the start of the post content created for a sample bigram. We don't want the code to go recursive.

from bigram.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.