Hacker Poesy
  • FAQ
  • Login
  • Public

    • Public
    • Groups
    • Recent tags
    • Popular
    • Directory

Conversation:

Notices

  1. MMN-o ✅⃠ (mmn)'s status on Wednesday, 02-Mar-2016 04:11:59 EST MMN-o ✅⃠ MMN-o ✅⃠
    Remote profile options...
    • maiyannah
    @maiyannah You mean getting the mimeType?
    Wednesday, 02-Mar-2016 04:11:59 EST from social.umeahackerspace.se permalink
    • MMN-o ✅⃠ (mmn)'s status on Wednesday, 02-Mar-2016 04:27:16 EST MMN-o ✅⃠ MMN-o ✅⃠
      Remote profile options...
      • maiyannah
      @maiyannah $file = File::getByID($id); // works for all dataobjects with numeric 'id' field.
      Wednesday, 02-Mar-2016 04:27:16 EST permalink
    • MMN-o ✅⃠ (mmn)'s status on Wednesday, 02-Mar-2016 04:30:39 EST MMN-o ✅⃠ MMN-o ✅⃠
      Remote profile options...
      • maiyannah
      @maiyannah You can perhaps have a look at lib/attachmentlistitem.php if not just to see how horribly attachment displays are done in !GNUsocial.
      Wednesday, 02-Mar-2016 04:30:39 EST permalink
    • MMN-o ✅⃠ (mmn)'s status on Wednesday, 02-Mar-2016 04:32:11 EST MMN-o ✅⃠ MMN-o ✅⃠
      Remote profile options...
      • maiyannah
      @maiyannah I think there is ->attachments() :P
      Wednesday, 02-Mar-2016 04:32:11 EST permalink
    • MMN-o ✅⃠ (mmn)'s status on Wednesday, 02-Mar-2016 04:42:12 EST MMN-o ✅⃠ MMN-o ✅⃠
      Remote profile options...
      • maiyannah
      @maiyannah If you get an array returned then it's a _copy_ of the original array anyway. Only if it's sent by reference (&$var) do you get something you can manipulate the original of. Or if it's an object (arrays are not objects).
      Wednesday, 02-Mar-2016 04:42:12 EST permalink
    • MMN-o ✅⃠ (mmn)'s status on Wednesday, 02-Mar-2016 04:53:33 EST MMN-o ✅⃠ MMN-o ✅⃠
      Remote profile options...
      • maiyannah
      @maiyannah Btw, 'php scripts/console.php' lets you try stuff out in a PHP console. Like:
      $ php scripts/console.php
      GNU social interactive PHP console... type ctrl+D or enter 'exit' to exit.
      > $n = Notice::getByID(405641);
      > $files = $n->attachments();
      > var_dump($files);
      [bunchofcrap]
      Wednesday, 02-Mar-2016 04:53:33 EST permalink
      Chimo likes this.
    • MMN-o ✅⃠ (mmn)'s status on Wednesday, 02-Mar-2016 04:57:05 EST MMN-o ✅⃠ MMN-o ✅⃠
      Remote profile options...
      • maiyannah
      @maiyannah Yes, but protected only means you can't access it directly as an object property from an external scope. It's perfectly legal for the parent object to return a copy or a reference.
      Wednesday, 02-Mar-2016 04:57:05 EST permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • Privacy
  • Source
  • Version
  • Contact

Hacker Poesy is a GNU social hub. It runs version 1.1.3-beta3, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Hacker Poesy content and data are available under the Creative Commons Attribution 3.0 license.

Switch to mobile site layout.