Send private message

You must be logged in to send a private message.

Friends

No friends yet.

Activity

  • peterm replied on the discussion topic Only admin can upload files
    Thanks Matt - would you please help me by explaining a little more what you meant by :  http://blog.elgg.org/pg/blog/cash/read/171/  You want to hook into 'register', 'menu:title' I really appreciate the help - but am not sure what to... view reply
  • Hi - after a couple of days' researching I can see that anyone who runs blogs/social sites has dealt with the fact that most iphones, most of the time, do not upload images that show with the correct orientation when posted on the site. The...
    • Would it work with the following?

      // If we were given a correct icon
              if (
                      (isloggedin()) &&
                      ($user) &&
                      ($user->canEdit())
                  ) {

      // here begins the image orientation correction

      $exif = exif_read_data('profileicon', 'IFDO', true);
      $orientation = $exif['IFD0']['Orientation'];;
      if($orientation != 0) {
            $image = imagecreatefromstring(file_get_contents('profileicon'));
            switch($orientation) {
                 case 8:
                    $image = imagerotate($image,90,0);
                    break;
                case 3:
                   $image = imagerotate($image,180,0);
                   break;
                case 6:
                   $image = imagerotate($image,-90,0);
                   break;
             }
             imagejpeg($image, 'profileicon');
      }

      // rest of the original code

      $topbar = get_resized_image_from_uploaded_file('profileicon',16,16, true, true);

    • All,

      Ive ported the code mentioned above from the engine/lib/filestore.php from 1.8 into 1.7. (not hard at all)

      If you need the code just message me. I would paste it here but I was told not to paste long code here so I wont. Thanks everyone for your help.

    • The best place to post code is a service like gists.github.com. We have no problems sharing code, but long bits of code are very hard to read when posted here, so we encourage people to post as a gist or similar.

  • peterm replied on the discussion topic Only admin can upload files
    Yeay - I think I worked it out! I went to file\pages\file and changed the below....pls can you confirm that this looks ok from a coding/security POV? Thanks so much. gatekeeper();group_gatekeeper(); to gatekeeper();admin_gatekeeper(); view reply
  • peterm replied on the discussion topic Only admin can upload files
    Thanks Matt. I've found this (below) in the \mod\file folder but cannot work out what I need to do to a) get rid of the upload a file button for anyone but admin, or at least b) make it so no-one other than admin can USE the upload a file... view reply
  • HI - I don't know if this is the job of a plugin or a simple (?) piece of code-removal. But I would really like to be able to remove the comment box that appears when site users look at photos, files uploaded etc. Thank you
    • There are no ready to use plugins available for this.

      If you want to remove the comments system through out the site, override the views/default/forms/comments/add.php file in your theme with no input fields to post the comments. If you dont want to remove it through out the site, you have to use a conditional code after listening to the context.

  • peterm replied on the discussion topic Only admin can upload files
    Hi - Just picking up an old thread - can one do this AND remove the upload button for all except admin? view reply
  • peterm added a new discussion topic Installed in 1.7.1 - forum ok but not working in widgets in the group Plugin Development
    Hi there, Nothing from the forum appears in my activity stream widget, and the vanilla forum widget says "widget broken or has been disabled by admin" Can anyoe please help me on this one. Thank you
    • Peterm,

      I had the same problem on 1.7.1, took a me some time to figure out.

      The solution is right in the manual:

      4. Once having finished the Vanilla installation, do *not* click on the "Go sign in and have some fun!" link on the final install page.

       

      Try re-installing the vanilla forum from scratch and do not click this link on the last page. The river will start working properly.

  • peterm joined the group Plugin Development