The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

how to make a width adjusting widget

View previous topic View next topic Go down

Solved how to make a width adjusting widget

Post by aamir.boyd on 4/1/2014, 10:19

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

aamir.boyd
New Member

Posts : 11
Reputation : 1
Language : english

http://destructoracademy.forumotion.com

Back to top Go down

Solved Re: how to make a width adjusting widget

Post by Luffy on 4/1/2014, 11:36

You could add this and get done with it. This will leave you with default width or when wanted with widgets.





avatar
Luffy
Manager
Manager

Male Posts : 4947
Reputation : 508
Language : Greek, English
Location : Greece

http://thinktank.forumotion.com/

Back to top Go down

Solved Re: how to make a width adjusting widget

Post by aamir.boyd on 4/1/2014, 20:47

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

aamir.boyd
New Member

Posts : 11
Reputation : 1
Language : english

http://destructoracademy.forumotion.com

Back to top Go down

Solved Re: how to make a width adjusting widget

Post by Kite Trojan on 4/1/2014, 21:17

Something like this? 
http://tokenatoracademy.topicboard.net/forum like the one of this forum?
avatar
Kite Trojan
Forumember

Male Posts : 823
Reputation : 19
Language : English

http://galacticda.forumotion.com/

Back to top Go down

Solved Re: how to make a width adjusting widget

Post by aamir.boyd on 5/1/2014, 00:30

yeah, like that, nd wow that place looks cool

aamir.boyd
New Member

Posts : 11
Reputation : 1
Language : english

http://destructoracademy.forumotion.com

Back to top Go down

Solved Re: how to make a width adjusting widget

Post by Kite Trojan on 5/1/2014, 01:19

I don't know the code yet ,  but I can try to get u the code
avatar
Kite Trojan
Forumember

Male Posts : 823
Reputation : 19
Language : English

http://galacticda.forumotion.com/

Back to top Go down

Solved Re: how to make a width adjusting widget

Post by aamir.boyd on 5/1/2014, 03:45

thatd be greatly appreciated thanks

aamir.boyd
New Member

Posts : 11
Reputation : 1
Language : english

http://destructoracademy.forumotion.com

Back to top Go down

Solved Re: how to make a width adjusting widget

Post by SLGray on 5/1/2014, 06:47



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

avatar
SLGray
Administrator
Administrator

Male Posts : 41457
Reputation : 2850
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Solved Re: how to make a width adjusting widget

Post by aamir.boyd on 5/1/2014, 19:33

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

aamir.boyd
New Member

Posts : 11
Reputation : 1
Language : english

http://destructoracademy.forumotion.com

Back to top Go down

Solved Re: how to make a width adjusting widget

Post by SLGray on 5/1/2014, 19:45

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.


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

avatar
SLGray
Administrator
Administrator

Male Posts : 41457
Reputation : 2850
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Solved Re: how to make a width adjusting widget

Post by aamir.boyd on 5/1/2014, 19:55

kk thanks,  topic solved and locked

aamir.boyd
New Member

Posts : 11
Reputation : 1
Language : english

http://destructoracademy.forumotion.com

Back to top Go down

Solved Re: how to make a width adjusting widget

Post by SLGray on 5/1/2014, 19:57

You're welcome.

Topic Solved & Locked


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

avatar
SLGray
Administrator
Administrator

Male Posts : 41457
Reputation : 2850
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum