Activity Stream
48,167 MEMBERS
6723 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1.     
    #1
    Member

    Default [phpbb] Floating jquery message

    Hey guys thought i would start contributing some useful stuff for phpbb im no pro at it so if you want to complain don't bother im going to show you how to make a nice jquery floating message

    You can see a demo of it on my forum (the yellow bar at the top)
    Code: 
    http://gfx-scene.com/forums/
    What you need ?
    Code: 
    The latest version of jquery-http://jquery.com/
    Code: 
    This image (rename it to 12-em-cross.png )-http://imgcentre.com/img/uploads/big/99e9a22135.png
    
    If you are using a dark background use this image instead (thanks to surfing)
    http://imgcentre.com/img/uploads/big/fd0fb51a03.png

    Where to put these files

    put the jquery script in {your style name}/theme
    Put the image file in {your style name}/theme/images

    What to edit


    Ok 1st open {your style name}/themplate/overall_header.html

    Find:
    Code: 
    </head>
    Before add:
    Code: 
    <script type="text/javascript" language="javascript" src="{T_THEME_PATH}/jquery-1.4.1.min.js"></script> 
    <script type="text/javascript" language="javascript"> 
    //  Developed by Roshan Bhattarai  
    //  Visit http://roshanbh.com.np for this script and more. 
    //  This notice MUST stay intact for legal use 
    $(document).ready(function() 
    { 
        //scroll the message box to the top offset of browser's scrool bar 
        $(window).scroll(function() 
        { 
              $('#message_box').animate({top:$(window).scrollTop()+"px" },{queue: false, duration: 350});   
        }); 
        //when the close button at right corner of the message box is clicked  
        $('#close_message').click(function() 
        { 
              //the messagebox gets scrool down with top property and gets hidden with zero opacity  
            $('#message_box').animate({ top:"+=15px",opacity:0 }, "slow"); 
        }); 
    }); 
     </script>
    Find: (might be different its under the </head> tag)
    Code: 
    <body id="phpbb">
    Add after:
    Code: 
    <div id="message_box">
        <img id="close_message" style="float:right;cursor:pointer" src="{T_THEME_PATH}/images/12-em-cross.png" />
    Your message goes here</a>
    </div>
    If you want this to only show for guests just add this instead
    Code: 
    <!-- IF not S_USER_LOGGED_IN --><div id="message_box">
        <img id="close_message" style="float:right;cursor:pointer"  src="{T_THEME_PATH}/images/12-em-cross.png" />
    Your message goes here</a>
    </div><!-- ENDIF -->
    Ok now open {your style name}/theme/stylesheet.css

    Add this to the bottom (you can add it to any other stylesheets on prosilver)

    Code: 
    #message_box {
    position: absolute;
    top: 0; left: 0;
    z-index: 10;
    background:#ffc;
    padding:5px;
    border:1px solid #CCCCCC;
    text-align:center;
    font-weight:bold;
    width:99%;
    }
    Thats is credits go to
    Code: 
    http://roshanbh.com.np/2008/07/top-floating-message-box-using-jquery.html
    i just adapted it for phpbb enjoy all need any help just ask here and i will try me best to help
    shadow.prx Reviewed by shadow.prx on . [phpbb] Floating jquery message Hey guys thought i would start contributing some useful stuff for phpbb im no pro at it so if you want to complain don't bother im going to show you how to make a nice jquery floating message You can see a demo of it on my forum (the yellow bar at the top) http://gfx-scene.com/forums/What you need ? The latest version of jquery-http://jquery.com/ This image (rename it to 12-em-cross.png )-http://imgcentre.com/img/uploads/big/99e9a22135.png If you are using a dark background use this Rating: 5
    Signature too big, removed by staff.

  2.   Sponsored Links

  3.     
    #2
    Member
    Might want to fix some things such as:
    Code: 
    <script type="text/javascript" language="javascript" src="{T_THEME_PATH}/jquery-1.4.1.min.js"></script>
    Code: 
    <script type="text/javascript" language="javascript" src="{T_THEME_PATH}/theme/jquery-1.4.1.min.js"></script>
    And

    Code: 
    <!-- IF not S_USER_LOGGED_IN --><div id="message_box">
        <img id="close_message" style="float:right;cursor:pointer"  src="{T_THEME_PATH}/images/12-em-cross.png" />
    Your message goes here</a>
    </div><!-- ENDIF -->
    Code: 
    <!-- IF not S_USER_LOGGED_IN --><div id="message_box">
        <img id="close_message" style="float:right;cursor:pointer"  src="{T_THEME_PATH}/theme/images/12-em-cross.png" />
    Your message goes here</a>
    </div><!-- ENDIF -->

  4.     
    #3
    Member
    In phpbb {T_THEME_PATH} means /theme its so if i style is using a different theme path for whatever reason it know where to go
    Signature too big, removed by staff.

  5.     
    #4
    Member
    oh well mines was a bit weird anyways here's my example:
    Code: 
    http://warezdistrict.com

  6.     
    #5
    Member
    Works well but that cross is only for light backgrounds will see if i can dig up a better one for darker backgrounds for you
    Signature too big, removed by staff.

  7.     
    #6
    Member
    http://www.psdgraphics.com/icons/psd...d-cross-icons/
    There are plenty when you search on google also I know litewarez knows a couple more places
    http://imgcentre.com/images/view/fd0fb51a03.png <-- the one i am using now

  8.     
    #7
    Member
    Edited the 1st post thanks for that surfing
    Signature too big, removed by staff.

  9.     
    #8
    Member
    NP, Well thank you for the mod

  10.     
    #9
    Member
    No problem glad you like it i thought it was a good alternative to the guest image so if your no good at gfx or a little short on funds (like i am now ) to pay for one or you just like jquery
    Signature too big, removed by staff.

  11.     
    #10
    Member
    Website's:
    Rapidimg.org
    hey shadow thanks for this..



Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 18th Jul 2012, 11:06 AM
  2. How to create floating ads?
    By 18folder in forum Web Development Area
    Replies: 5
    Last Post: 25th Mar 2012, 07:08 AM
  3. Facebook Fan Page floating
    By pioneer_fawad in forum Webmaster Discussion
    Replies: 4
    Last Post: 30th Oct 2011, 07:45 AM
  4. JQuery help
    By xElliex in forum Web Development Area
    Replies: 5
    Last Post: 25th Aug 2011, 10:38 PM
  5. Replies: 3
    Last Post: 28th Dec 2010, 11:55 PM

Tags for this Thread

BE SOCIAL