Handling Wordpress Content - e.g. shortcodes

Permalink
Hi. I'm moving Wordpress posts to a Concrete5 5.8.x instance and need to deal with shortcodes.

I plan to copy and paste the content into new pages in a content block and apply the custom block template. What I have is working now.

However, I wanted to get your feedback on whether it's the best solution.

Thanks for your input.

Here's a snippet of the html as rendered by default in the content block. I've attached the custom template.

<h1>Title</h1>
<h2>Sub Title</h2>
[nganchor id="danny"]
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maxime, obcaecati accusamus iste dicta maiores. Iste animi iure numquam placeat magni odio dolore quis ratione dolor consequatur, veritatis, assumenda, facilis expedita.</p>
<p>Corporis aut eaque, tempore at quo soluta, labore voluptatibus tempora commodi, sunt et! Corrupti voluptate ab earum dolorum fugit. Reprehenderit eligendi magni, laborum! Aperiam quisquam optio eligendi expedita, porro sint.</p>
[ngaudio mp3="170301_Danny.mp3"]
<p>Ab suscipit, laudantium ullam dolores, tenetur, qui, ut praesentium dicta nobis sed eaque a eum quo perferendis optio fugiat maxime aliquid nam placeat impedit enim repellendus accusantium repudiandae consequatur. Alias.</p>
[ngaudio       mp3="170209_Joseph.mp3"]
<p>Molestiae ipsam doloribus officiis vero sint repellendus numquam nesciunt rerum maiores ratione, eveniet cum mollitia ipsa perspiciatis quaerat labore tempore? Iusto nulla corrupti nobis voluptatum consequatur quidem impedit atque distinctio?</p>
[ngaudio dir="alt-directory/sub-dir" mp3="170308_Marcus.mp3" dld=0]
<p>Quaerat, enim minus. Quam, harum, recusandae. Voluptatibus voluptate libero iste impedit molestias quo totam vel nulla, possimus. Consequatur, labore! Quidem in quisquam eos fuga aut quia consequatur, nobis eligendi magni!</p>
[bdsig]

1 Attachment

 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi gparke,

This is an interesting approach. For the purpose of maintaining a copy of a WordPress site in concrete5, I don't immediately see any issues.

Is this a large site?

I think people would be interested in your download-helper.php code.
gparke replied on at Permalink Reply
Thanks for the input.

The site is about 100 posts and there's a new post every week. Once I transfer the existing content, the new posts will be 100% Concrete5. I'll likely use a custom block to include the audio player and optional downloader.

Nothing special about the download-helper file. The WP site didn't use the CMS to handle the mp3 files, so this worked fine.



if(isset($_POST['download'])){
      $dir      = $_POST['dir']; 
      $fileName = $_POST['filename'];
      $parts    = pathinfo($fileName);
      $fileExt  = $parts['extension'];     
      switch ($fileExt) {
         case 'pdf':
            $fileExt = 'application/pdf';
         break;
         case 'mp3':
            $fileExt = 'audio/mpeg';
         break;
         default:
            $fileExt = 'application/text';
         break;