The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
4 posters

    how to make a width adjusting widget

    avatar
    aamir.boyd
    New Member


    Posts : 11
    Reputation : 1
    Language : english

    Solved how to make a width adjusting widget

    Post by aamir.boyd January 4th 2014, 10:19 am

    How do you make a widget that allows the users to set the width of the forum? im not so sure of how that code would look
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    Solved Re: how to make a width adjusting widget

    Post by TheCrow January 4th 2014, 11:36 am

    You could add this and get done with it. This will leave you with default width or when wanted with widgets.
    how to make a width adjusting widget Eur3



    how to make a width adjusting widget Thecro10
     Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    avatar
    aamir.boyd
    New Member


    Posts : 11
    Reputation : 1
    Language : english

    Solved Re: how to make a width adjusting widget

    Post by aamir.boyd January 4th 2014, 8:47 pm

    i mean like, i want it so that the members can adjust the width to whatever they like
    Kite Trojan
    Kite Trojan
    Forumember


    Male Posts : 823
    Reputation : 19
    Language : English

    Solved Re: how to make a width adjusting widget

    Post by Kite Trojan January 4th 2014, 9:17 pm

    Something like this? 
    http://tokenatoracademy.topicboard.net/forum like the one of this forum?
    avatar
    aamir.boyd
    New Member


    Posts : 11
    Reputation : 1
    Language : english

    Solved Re: how to make a width adjusting widget

    Post by aamir.boyd January 5th 2014, 12:30 am

    yeah, like that, nd wow that place looks cool
    Kite Trojan
    Kite Trojan
    Forumember


    Male Posts : 823
    Reputation : 19
    Language : English

    Solved Re: how to make a width adjusting widget

    Post by Kite Trojan January 5th 2014, 1:19 am

    I don't know the code yet ,  but I can try to get u the code
    avatar
    aamir.boyd
    New Member


    Posts : 11
    Reputation : 1
    Language : english

    Solved Re: how to make a width adjusting widget

    Post by aamir.boyd January 5th 2014, 3:45 am

    thatd be greatly appreciated thanks
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: how to make a width adjusting widget

    Post by SLGray January 5th 2014, 6:47 am




    how to make a width adjusting widget Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    avatar
    aamir.boyd
    New Member


    Posts : 11
    Reputation : 1
    Language : english

    Solved Re: how to make a width adjusting widget

    Post by aamir.boyd January 5th 2014, 7:33 pm

    the widget shows up on the page, but whenever i click set, nothing happens, any pointers on something i might be doing wrong or something i left out? i used the javascript code from the first guy and the widget source from the second guy
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: how to make a width adjusting widget

    Post by SLGray January 5th 2014, 7:45 pm

    Create a Widget:
    Code:
       <script type="text/javascript">

     Â   jQuery(document).ready(function(){

     Â   jQuery("#forumwidth").click(function(){
     Â   var a=eval(document.getElementById("selectwidth").value);
     Â   var b=0;
     Â   jQuery("body#phpbb").animate({width:a},800, "linear");
     Â   if(a==1050){b=1;}
     Â   if(a==1100){b=2;}
     Â   if(a==1200){b=3;}
     Â   if(a==1300){b=4;}
     Â   setKuki('bodylinewidthkuki',b,365);
     Â     });


     Â   });
     Â   </script>

     Â   <center><div style="text-align: center;"><input type=submit id="forumwidth" value="Set">
     Â   <select id="selectwidth">
     Â     <option selected>980</option>
     Â     <option>1050</option>
     Â     <option>1100</option>
     Â     <option>1200</option>
     Â     <option>1300</option>
     Â   </select>
     Â   </div></center>
    JavaScript:
    Code:
       jQuery(function(){
     Â   jQuery(window).load(function(){
     Â   if(parseInt(getKuki('bodylinewidthkuki'))==0){
     Â   jQuery("table.bodylinewidth").width(980);
     Â   }
     Â   if(parseInt(getKuki('bodylinewidthkuki'))==1){
     Â   jQuery("table.bodylinewidth").width(1050);
     Â   }
     Â   if(parseInt(getKuki('bodylinewidthkuki'))==2){
     Â   jQuery("table.bodylinewidth").width(1100);
     Â   }
     Â   if(parseInt(getKuki('bodylinewidthkuki'))==3){
     Â   jQuery("table.bodylinewidth").width(1200);
     Â   }
     Â   if(parseInt(getKuki('bodylinewidthkuki'))==4){
     Â   jQuery("table.bodylinewidth").width(1300);
     Â   }
     Â   });
     Â   });
    Make sure that JavaScript Management is activated.



    how to make a width adjusting widget Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    avatar
    aamir.boyd
    New Member


    Posts : 11
    Reputation : 1
    Language : english

    Solved Re: how to make a width adjusting widget

    Post by aamir.boyd January 5th 2014, 7:55 pm

    kk thanks,  topic solved and locked
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: how to make a width adjusting widget

    Post by SLGray January 5th 2014, 7:57 pm

    You're welcome.

    Topic Solved & Locked



    how to make a width adjusting widget Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.

      Current date/time is September 23rd 2024, 12:39 am