• Resolved matrixino

    (@matrixino)


    I’m trying to understand the parser with no luck. I’m trying to grab a post image, post title and post text from a news page.

    This is what I’m using:

    ginner|0|div|file-image|0|1|
    ginner|0|h1|article-title|0|1|
    ginner|0|div|field-type-text-with-summary|0|1|
    wrap|1,2,3|{ogb-0}{ogb-1}{ogb-2}|

    Everything works but the image has a relative path so I’m trying to add this:
    replace|1|src="|src="http://mainsite.com|
    But then the output is or only the image or a full original page (ignoring my ginners) depening if I put it last or at beginning.

    What am I doing wrong? I just want to replace the url of the img tag which is in the first ginner (file-image).

    Also how can I set this image as my post image in WP? I suppose the get image processor does this? But I’m only getting undefined in po[1]images when giving op[0]fulltext as pi[1]html.

    Thanks.

    https://wordpress.org/plugins/wp-pipes/

Viewing 2 replies - 16 through 17 (of 17 total)
  • Thread Starter matrixino

    (@matrixino)

    Yes, I did have the line parameter. However don’t worry, I dirt-fixed it using striptags() php function in my WP theme.

    I have a suggestion for your getfulltext processor that came to my mind since I had this problem in my personal case. It would be useful to set a maximum width/height for images, like we do for gettimage one.

    For example some of the imported images in my posts were too large for my posts column. So i had to add a width attribute to img tags via replace.
    It would be nice if I could tell the gettext processor to keep all the images who have <size than X*Y pixel and automatcally resize all the images who are larger than that.

    Dear matrixino,

    Yes, that’s absolutely nice feature to add into Get Fulltext processor. We would definitely consider it in our future version for Pipes. Thank you very much for the suggestion :”)

Viewing 2 replies - 16 through 17 (of 17 total)

The topic ‘Understanding HTML Parser replace and images’ is closed to new replies.