+ Post New Thread
Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 32
Virtual Learning Platforms Thread, Creating moodle blocks in Technical; Hi Guys, Great work! I notice there is the dreaded IE 6 PNG alpha channel problem - aka "the gray ...
  1. #16

    Join Date
    Jan 2009
    Location
    Melbourne
    Posts
    26
    Thank Post
    3
    Thanked 10 Times in 5 Posts
    Rep Power
    13
    Hi Guys,

    Great work! I notice there is the dreaded IE 6 PNG alpha channel problem - aka "the gray border". Time for IE8 or even better upgrade to Firefox :-) I'll post a bug on this and see if we can fix it in the default PaperCut AJAX widgets. In the meantime you can use a CCS behavior trick to fix. Add the following to your CCS:

    Code:
    img {
        /* IE PNG transparency hack */
        behavior: url(http://papercut-server.myorg.org/css/pngHack/pngHack.htc);
    }
    Update papercut-server.myorg.org to point to the real server.

    Regarding access from outside the Intranet - the print quota/balance and environmental impact AJAX widgets should be resilient to this. They work by "replacing" the contents of a DIV element with data loaded off the server. If the JavaScript is unable to contact the server, the element will not be replaced. If not rendering the widget causes page layout issues, you could add a placeholder image inside the DIV block as follows:

    Code:
    <div id="widgetBalance" style="margin-bottom: 3em;">
        <!-- User Balance widget will be rendered here -->
        <img src="images/balance_not_avaliable.png" />
    </div>
    Another technique I've seen used on some sites is to use ProxyPass/ModProxy in Apache to proxy requests through to the internal server on a given URL path - specifically only the URLs used by the widgets. I am however reluctant to recommend this method. mod_proxy is very powerful but also very easy to stuff up. If miss configured you may end up exposing more than you planed, or even worse, I've seen one site accidentally turn their Apache server into a open proxy by accident! Good for Twitter uses in Iran but not good for the bandwidth bill :-)

    Once you have the Moddle block fully working, let me know as I'd love to post it on the PaperCut Knowledge Base. Moddle is becoming more and more popular in education and I'd love to spread the word.

    Cheers,

    Chris
    Developer at PaperCut

  2. #17
    penfold_99's Avatar
    Join Date
    Feb 2008
    Location
    East Sussex
    Posts
    965
    Thank Post
    58
    Thanked 163 Times in 115 Posts
    Rep Power
    67
    Quote Originally Posted by papercut View Post
    Hi Guys,

    Great work! I notice there is the dreaded IE 6 PNG alpha channel problem - aka "the gray border". Time for IE8 or even better upgrade to Firefox :-) I'll post a bug on this and see if we can fix it in the default PaperCut AJAX widgets. In the meantime you can use a CCS behavior trick to fix. Add the following to your CCS:

    Code:
    img {
        /* IE PNG transparency hack */
        behavior: url(http://papercut-server.myorg.org/css/pngHack/pngHack.htc);
    }
    Update papercut-server.myorg.org to point to the real server.

    Regarding access from outside the Intranet - the print quota/balance and environmental impact AJAX widgets should be resilient to this. They work by "replacing" the contents of a DIV element with data loaded off the server. If the JavaScript is unable to contact the server, the element will not be replaced. If not rendering the widget causes page layout issues, you could add a placeholder image inside the DIV block as follows:

    Code:
    <div id="widgetBalance" style="margin-bottom: 3em;">
        <!-- User Balance widget will be rendered here -->
        <img src="images/balance_not_avaliable.png" />
    </div>
    Another technique I've seen used on some sites is to use ProxyPass/ModProxy in Apache to proxy requests through to the internal server on a given URL path - specifically only the URLs used by the widgets. I am however reluctant to recommend this method. mod_proxy is very powerful but also very easy to stuff up. If miss configured you may end up exposing more than you planed, or even worse, I've seen one site accidentally turn their Apache server into a open proxy by accident! Good for Twitter uses in Iran but not good for the bandwidth bill :-)

    Once you have the Moddle block fully working, let me know as I'd love to post it on the PaperCut Knowledge Base. Moddle is becoming more and more popular in education and I'd love to spread the word.

    Cheers,

    Chris
    Developer at PaperCut
    Hi Chris,

    Thanks for the additional fixes. Were just about to purchase papercut any chance of a discount in return for releasing this module?

  3. #18
    clodhopper's Avatar
    Join Date
    May 2007
    Location
    Portsmouth
    Posts
    93
    Thank Post
    0
    Thanked 11 Times in 11 Posts
    Rep Power
    18
    Nice, I like your thinking :-)

  4. #19

    Join Date
    Jan 2009
    Location
    Melbourne
    Posts
    26
    Thank Post
    3
    Thanked 10 Times in 5 Posts
    Rep Power
    13
    Quote Originally Posted by penfold_99 View Post
    Hi Chris,

    Were just about to purchase papercut any chance of a discount in return for releasing this module?
    I'll have a chat to sales. I'm sure I can arrange something. Email me at chris a> papercut dot. com and I'll email through a discount code.

    Actually I probably could arrange a discount code for any EduGeek with a good thanked-to-post ratio

    Cheers,

    Chris
    Developer @ PaperCut

  5. #20
    clodhopper's Avatar
    Join Date
    May 2007
    Location
    Portsmouth
    Posts
    93
    Thank Post
    0
    Thanked 11 Times in 11 Posts
    Rep Power
    18
    You have mail Chris :-)

  6. #21
    penfold_99's Avatar
    Join Date
    Feb 2008
    Location
    East Sussex
    Posts
    965
    Thank Post
    58
    Thanked 163 Times in 115 Posts
    Rep Power
    67
    Quote Originally Posted by papercut View Post

    Code:
    img {
        /* IE PNG transparency hack */
        behavior: url(http://papercut-server.myorg.org/css/pngHack/pngHack.htc);
    }
    Hi Chris,

    Im currently unable to get the above code to work, if i include it it stops the widgets from being displayed.

  7. #22

    Join Date
    Jan 2009
    Location
    Melbourne
    Posts
    26
    Thank Post
    3
    Thanked 10 Times in 5 Posts
    Rep Power
    13
    Quote Originally Posted by penfold_99 View Post
    Hi Chris,

    Im currently unable to get the above code to work, if i include it it stops the widgets from being displayed.
    I raised this problem with Tom, our HTML guru. His first response was to suggest to upgrade away from IE6 as quick as possible

    He said another method is to use a JQuery plugin and try the following code:
    Code:
        <script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
        <script type="text/javascript" src="http://allinthehead.com/code/sleight/supersleight.plugin.js"></script>
        <script type="text/javascript">
          $(function() {
            $('body').supersleight();
          });
        </script>
    You might want to download those scripts rather than hotlinking.

    Website describing plugin: http://allinthehead.com/retro/338/su...-jquery-plugin .


    The other option is to not use the stylec widgets but instead build your own layout using the AJAX data directly. There is an example of this in "Option B" in:
    ~papercut/server/examples/webwidgets/examples.html

    I've listed the layout issue in our bug database and it will get some attention fixed in a future release.


    Cheers,

    Chris
    Developer @ PaperCut

  8. #23
    penfold_99's Avatar
    Join Date
    Feb 2008
    Location
    East Sussex
    Posts
    965
    Thank Post
    58
    Thanked 163 Times in 115 Posts
    Rep Power
    67
    Quote Originally Posted by papercut View Post
    I raised this problem with Tom, our HTML guru. His first response was to suggest to upgrade away from IE6 as quick as possible
    We're trying to migrate all users over to firefox but some exam boards require the use of IE6.

    Quote Originally Posted by papercut View Post
    He said another method is to use a JQuery plugin and try the following code:
    Code:
        <script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
        <script type="text/javascript" src="http://allinthehead.com/code/sleight/supersleight.plugin.js"></script>
        <script type="text/javascript">
          $(function() {
            $('body').supersleight();
          });
        </script>
    I have tried this but it require a transparent file called x.gif, i don't know what in needs to be. Could you ask you HTML guru?


    Quote Originally Posted by papercut View Post
    The other option is to not use the stylec widgets but instead build your own layout using the AJAX data directly. There is an example of this in "Option B" in:
    ~papercut/server/examples/webwidgets/examples.html

    I've listed the layout issue in our bug database and it will get some attention fixed in a future release.
    I tried example b first but could get it to update the fields properly so when for the widgets.

  9. #24
    penfold_99's Avatar
    Join Date
    Feb 2008
    Location
    East Sussex
    Posts
    965
    Thank Post
    58
    Thanked 163 Times in 115 Posts
    Rep Power
    67
    Hi Chris,

    Please ignore my previous message i have traced down the x.gif file.

    The problem i have now it i get a picture place holder over the pictures in the widget.

    quota.JPG

  10. #25

    Join Date
    Jan 2009
    Location
    Melbourne
    Posts
    26
    Thank Post
    3
    Thanked 10 Times in 5 Posts
    Rep Power
    13
    Quote Originally Posted by penfold_99 View Post
    Hi Chris,

    Please ignore my previous message i have traced down the x.gif file.

    The problem i have now it i get a picture place holder over the pictures in the widget.

    The "X" is caused by the jquery supersleight plugin not being able to load the 'x.gif' transparent shim.

    1. Get a 1x1 px transparent gif shim, or download one from
    http://www.papercut.com/images/blank.gif

    2a. Copy it to your web server root as 'x.gif' and put the following
    code in head of page displaying the widgets:

    Code:
        <script type="text/javascript"
    src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
        <script type="text/javascript"
    src="http://allinthehead.com/code/sleight/supersleight.plugin.js"></script>
        <script type="text/javascript">
          $(function() {
            $('body').supersleight();
          });
        </script>
    2b. If you can't put the shim in your web server root as 'x.gif' you can reference one on the
    PaperCut server with the following code (modify your server name as appropriate):


    Code:
        
        <script type="text/javascript"
    src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
        <script type="text/javascript"
    src="http://allinthehead.com/code/sleight/supersleight.plugin.js"></script>
        <script type="text/javascript">
          $(function() {
            $('body').supersleight( { shim:
    'http://papercut-server:9191/css/pngHack/transparent.gif' } );
          });
        </script>


    Cheers,

    Chris
    Developer @ PaperCut

  11. #26
    penfold_99's Avatar
    Join Date
    Feb 2008
    Location
    East Sussex
    Posts
    965
    Thank Post
    58
    Thanked 163 Times in 115 Posts
    Rep Power
    67
    hi chris,

    Option 2a works but option 2b doesn't.

    The problem for 2b is it finds the shim for the border if i stipulate a url to it but. then reverts back to the local servers www root to look for the shim for the little graphics in the widget.

    I would prefer having all the files in one place. Having x.gif in the root of moodle it might be delete at a later date as it looks like it should belong there.

  12. #27

    Join Date
    Jan 2009
    Location
    Melbourne
    Posts
    26
    Thank Post
    3
    Thanked 10 Times in 5 Posts
    Rep Power
    13
    Quote Originally Posted by penfold_99 View Post
    hi chris,

    Option 2a works but option 2b doesn't.

    The problem for 2b is it finds the shim for the border if i stipulate a url to it but. then reverts back to the local servers www root to look for the shim for the little graphics in the widget.

    I would prefer having all the files in one place. Having x.gif in the root of moodle it might be delete at a later date as it looks like it should belong there.
    I can't duplicate this. If you can post your code in full I'll take a look at it.

    Might be time to upgrade IE6 :-) We discussed converting the graphics used in the widgets to GIF for the next release to support IE6 however they contain an alpha channel so they can be conveniently overlayed on an existing web page of any color.

  13. #28
    penfold_99's Avatar
    Join Date
    Feb 2008
    Location
    East Sussex
    Posts
    965
    Thank Post
    58
    Thanked 163 Times in 115 Posts
    Rep Power
    67
    Quote Originally Posted by papercut View Post
    I can't duplicate this. If you can post your code in full I'll take a look at it.

    Might be time to upgrade IE6 :-) We discussed converting the graphics used in the widgets to GIF for the next release to support IE6 however they contain an alpha channel so they can be conveniently overlayed on an existing web page of any color.
    the code is as per your previous email.

    One way to test testing put your code in a subfolder and not on the web root. make sure there isn't an x.gif on the root and it shoule be able to replicate.

    I think i will just include a note, if they need support for IE6 they need to copy the file to the webroot.

  14. #29
    penfold_99's Avatar
    Join Date
    Feb 2008
    Location
    East Sussex
    Posts
    965
    Thank Post
    58
    Thanked 163 Times in 115 Posts
    Rep Power
    67
    just to update this post.

    I have tested the plugin at another school and it ran into an issue when using IE6 and IE7.

    I am current integrating browser detection to avoid this issue.

  15. #30
    clodhopper's Avatar
    Join Date
    May 2007
    Location
    Portsmouth
    Posts
    93
    Thank Post
    0
    Thanked 11 Times in 11 Posts
    Rep Power
    18
    Cool, this block is going to be great when it's ready :-)

    I'm on holiday for the 26th June - 3rd July so if you don't hear from me it's not that I'm ignoring you :-)

    Brian

SHARE:
+ Post New Thread
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Moodle - Stop Editing Teachers Changing Blocks On Front Page
    By FN-GM in forum Virtual Learning Platforms
    Replies: 11
    Last Post: 6th November 2013, 07:20 AM
  2. How flexible is moodle for creating themes?
    By HodgeHi in forum EduGeek Moodle
    Replies: 2
    Last Post: 23rd February 2009, 06:44 PM
  3. Bad Blocks + Locating
    By Dos_Box in forum Hardware
    Replies: 7
    Last Post: 29th August 2008, 08:32 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
  •