Recent Topics

Mass posting question

started by on Apr 20, 2017 – Last touched: May 15, 2017

Apr 20, 2017 22:30    

I was working with some data and split it into posts. It was in HTML syntax and it got stripped out when I did the import. I reformatted it into markdown and it worked, but the links would only parse for HTTP. How can I import mass import HTML posts and retain the tags?

Apr 21, 2017 06:50

@josh can you please be more specific? From where are you trying to import posts?

Apr 21, 2017 07:39

On the post tab in the back office there is a button: Mass Create "Post" The posts are copied and pasted from a text file. The link to the help post http://b2evolution.net/man/mass-new-screen comes up with a Not found. At the bottom of the form it has:

Separate posts with a blank line. The first line of each post becomes a title.
Create paragraphs at each line break

Apr 23, 2017 18:24

When B2evolution imports the posts does it automatically strip out all of the HTML?
The original code is:

The Movie<a href="http://coalgirls.wakku.to/torrents/%5BCoalgirls%5D_Ao_no_Exorcist_The_Movie_%281920x1080_Blu-ray_FLAC%29_%5B86FA2C52%5D.mkv.torrent">1080p</a> | <a href="magnet:?xt=urn:btih:46ceacd597bd308a9447d91530c098f6ea1d1dc6&amp;dn=%5BCoalgirls%5D_Ao_no_Exorcist_The_Movie_%281920x1080_Blu-ray_FLAC%29_%5B86FA2C52%5D.mkv&amp;xl=10259091174&amp;tr=http%3A%2F%2Fcoalgirls.wakku.to%3A3277%2Fannounce"><i class="fa fa-magnet" aria-hidden="true"></i><i>Magnet</i></a><b>Source:</b>Blu-ray<br /><b>Size:</b>10.3 GB <br /><b>Date:</b>2013-08-08 14:50:39

But it comes out like:
The Movie1080p | MagnetSource:Blu-raySize:10.3 GB Date:2013-08-08 14:50:39

I attached a screenshot of the mass post page.

Apr 25, 2017 07:31

Yes @josh, html tags are stripped by default on mass post creation.

(The following is a CORE HACK, so I'm not sure if the mass creation will work properly. Also, it's meant for version 6.8.8)

You can make a little change on a single line of code to avoid tags stripping:

  1. Go to file: inc/items/model/_item.funcs.php
  2. Find this line: $line = trim( strip_tags( $line ) ); inside the create_multiple_posts function
  3. Replace with: $line = trim( $line );
  4. Re-try the mass creation as usually

Remember that Allow html must be enabled for the post type you are creating.

Apr 25, 2017 19:14

I will try it later and tell you if it works.

Apr 26, 2017 07:04

It worked. Thanks for all your help!


Form is loading...

free blog software – This forum is powered by b2evolution CMS, a complete engine for your website.