+ Post New Thread
Results 1 to 3 of 3
Virtual Learning Platforms Thread, Moodle Theme and PHP in Technical; Just wondered if anyone knew how I would be able to dynamically rotate the profile pics and merge it with ...
  1. #1
    wesleyw's Avatar
    Join Date
    Dec 2005
    Location
    Kingswinford
    Posts
    2,205
    Thank Post
    223
    Thanked 50 Times in 44 Posts
    Blog Entries
    1
    Rep Power
    30

    Moodle Theme and PHP

    Just wondered if anyone knew how I would be able to dynamically rotate the profile pics and merge it with a default pic? As i want to frame the profile pic with another PNG file and rotate the combined image through 45 degress? i've tried imagerotate but I don't seem to be able to get it working? I'm using the Aarkvark theme and in the profileblock.php page it has the following to display the current user's profile pic:

    echo '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$USER->id.'&amp;course='.$COURSE->id.'"><img src="'.$CFG->wwwroot.'/user/pix.php?file=/'.$USER->id.'/f1.jpg" width="80px" height="80px" title="'.$USER->firstname.' '.$USER->lastname.'" alt="'.$USER->firstname.' '.$USER->lastname.'" /></a>';

    Any ideas how I can change the img src to to allow me to merge and rotate?



    Wes

  2. #2

    TechMonkey's Avatar
    Join Date
    Dec 2005
    Location
    South East
    Posts
    3,282
    Thank Post
    225
    Thanked 403 Times in 300 Posts
    Rep Power
    161
    2 ideas.
    Can you not just batch rotate the actual source images? If it is a one time need that would probably be best.

    Otherwise maybe do it with a mix of CSS & javascript. You could layer the images using CSS & then rotate using javascript (demo here or a different version in code)

    HTH

  3. Thanks to TechMonkey from:

    wesleyw (2nd June 2011)

  4. #3
    wesleyw's Avatar
    Join Date
    Dec 2005
    Location
    Kingswinford
    Posts
    2,205
    Thank Post
    223
    Thanked 50 Times in 44 Posts
    Blog Entries
    1
    Rep Power
    30
    Found it's really easy to use CSS to rotate the image as well as overlay it.

    -moz-transform: rotate(30deg);
    -o-transform: rotate(30deg);
    -webkit-transform: rotate(30deg);
    filter: progidXImageTransform.Microsoft.Matrix(sizingMethod='aut o expand',M11=0.866, M12=-0.5, M21=0.5, M22=0.866);
    -ms-filter: "progidXImageTransform.Microsoft.Matrix(sizingMethod='aut o expand',M11=0.866, M12=-0.5, M21=0.5, M22=0.866)";

    Each of these rotates the picture by 30 degrees however MS and Firefox don't agree with each other as to the final location (IE looks much better actually, seems to be keeping the image proportions which makes the image sharper).




    Wes

SHARE:
+ Post New Thread

Similar Threads

  1. [CSS] Moodle Theme Help
    By FN-GM in forum Web Development
    Replies: 14
    Last Post: 30th July 2009, 11:56 AM
  2. New Moodle Theme
    By danIT in forum Virtual Learning Platforms
    Replies: 0
    Last Post: 18th May 2009, 05:16 PM
  3. New EduGeek Moodle Theme
    By danIT in forum EduGeek Moodle
    Replies: 14
    Last Post: 16th May 2009, 04:08 PM
  4. Name my Moodle Theme!
    By danIT in forum Virtual Learning Platforms
    Replies: 14
    Last Post: 30th March 2009, 10:49 AM
  5. Another Moodle Theme
    By danIT in forum Virtual Learning Platforms
    Replies: 5
    Last Post: 23rd March 2009, 08:56 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •