Tagged: 

Viewing 6 reply threads
  • Author
    Posts
    • #3020
      dawood
      Member

      Hey folks,

      am really interested in using Piklist for my next project. I am curious how it works on a multisite wordpress install as well, have there been / are there any security concerns?

    • #3021
      Steve
      Keymaster

      @dawood– Welcome to the Piklist Community!

      Piklist works great with multisite. You can Network Activate, or activate for each site. Since Piklist does everything the WordPress way, and uses WordPress APIs where possible, there have never been any security concerns.

      Let us know if you have any other questions.

    • #3023
      dawood
      Member

      Thanks Steve, am testing it right now and trying out all the fields! Though am stuck already.. 🙂

      So I registered a field

      // Upload Image / File
        piklist('field', array(
        'type' => 'file'
        ,'field' => 'my_image'
        ,'label' => 'Upload image'
      ));
      
      and am trying to call it to my single.php but for some reason i can't seem to get it
      
      <?php 
      	foreach ($image_ids as $image)
      	{
      		$image_ids = get_post_meta($post_id, 'my_image');
      		$myupload = get_post($image); 
      		$title = $myupload->post_title;
      		$description = $myupload->post_content;
      		$caption = $myupload->post_excerpt;
      
      		echo 'title:' . $title;
      		echo 'description:' . $description;
      		echo 'caption:' . $caption;
      
      		echo '<img src="' . wp_get_attachment_url($image) . '" />';
      
      		print_r($myupload); // Displays all data
      	}
       ?>
    • #3024
      Steve
      Keymaster

      @dawood– This line of code should be BEFORE the foreach, not in it, since it grabs the data that the foreach loops through.

      $image_ids = get_post_meta($post_id, 'my_image');

      Let me know if that works for you.

    • #3025
      dawood
      Member

      thanks Steve, I tried it earlier but not dice. might be that I am getting variables mixed up?

      `<?php
      $image_ids = get_post_meta($post_id=’forms’, ‘my_image’);
      foreach ($image_ids as $image)
      {

      $myupload = get_post($image);
      $title = $myupload->post_title;
      $description = $myupload->post_content;
      $caption = $myupload->post_excerpt;

      echo ‘title:’ . $title;
      echo ‘description:’ . $description;
      echo ‘caption:’ . $caption;

      echo ‘‘;

      print_r($myupload); // Displays all data
      }
      ?>

    • #3026
      dawood
      Member

      ok I got it figured out, I had the post meta, calling in the wrong id.. thanks Steve.

    • #3027
      Steve
      Keymaster

      @dawood– Awesome! Closing ticket.

Viewing 6 reply threads
  • The topic ‘Security’ is closed to new replies.