Forum Adjuster Widget
4 posters
Page 1 of 1
Forum Adjuster Widget
Hey, so I got a cool code for adjusting forum width but I noticed it only works for phpBB2, can someone please make a code for punBB that I can still put in widgets? Thanks in advance .
- Code:
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#posaljiwidth").click(function(){
var a=eval(document.getElementById("selektwidth").value);
var b=0;
jQuery("table.bodylinewidth").animate({width:a},1100, "linear");
if(a==1200){b=1;}
if(a==1300){b=2;}
if(a==1400){b=3;}
if(a==1500){b=4;}
if(a==1600){b=5;}
if(a==1700){b=6;}
if(a==1800){b=7;}
setkuki('bodylinewidthkuki',b,365);
});
});
</script>
<center>
<div style="text-align: center;"><input id="posaljiwidth" value="Set" type="submit" /><select id="selektwidth">
<option selected="selected">1200</option>
<option>1300</option>
<option>1400</option>
<option>1500</option>
<option>1600</option>
<option>1700</option>
<option>1800</option>
</select>
</div>
</center>
Last edited by Bingoo2 on March 31st 2014, 8:36 pm; edited 1 time in total
Bingoo2- New Member
- Posts : 6
Reputation : 1
Language : English
Re: Forum Adjuster Widget
i have some thing like that but i did not have a chance to test on English forums its should also add widgets on the top and the battom of forums
the code is
the code is
- Code:
/* widgets top and down */
#content-container div#container {
width: auto;
float: none;
margin-left: auto;
}
#content-container div#main {
margin-right: auto;
margin-bottom: auto;
}
#content-container div#left {
width: auto;
float: none;
margin-left: auto;
}
#content-container div#right {
width: auto;
float: none;
margin-left: auto;
}
#main {
width: 990px;
}
#gfooter {
width: 990px;
}
#logostrip {
width: 990px;
}
#submenu {
width: 990px;
}
#userlinks {
width: 935px;
}
/* the end Michael_vx */
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: Forum Adjuster Widget
Thank your for the code, but it doesn't work.
Bingoo2- New Member
- Posts : 6
Reputation : 1
Language : English
Re: Forum Adjuster Widget
oh sorry i will try better next time
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: Forum Adjuster Widget
Hello Bingoo2,
See if this works :
See if this works :
- Code:
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#posaljiwidth").click(function(){
var a=eval(document.getElementById("selektwidth").value);
var b=0;
jQuery(".pun").animate({width:a},1100, "linear");
if(a==1200){b=1;}
if(a==1300){b=2;}
if(a==1400){b=3;}
if(a==1500){b=4;}
if(a==1600){b=5;}
if(a==1700){b=6;}
if(a==1800){b=7;}
setkuki('bodylinewidthkuki',b,365);
});
});
</script>
<center>
<div style="text-align: center;"><input id="posaljiwidth" value="Set" type="submit" /><select id="selektwidth">
<option selected="selected">1200</option>
<option>1300</option>
<option>1400</option>
<option>1500</option>
<option>1600</option>
<option>1700</option>
<option>1800</option>
</select>
</div>
</center>
Re: Forum Adjuster Widget
Thank you Ange, for the code; however, it doesn't work on the forum I am co-administrating.
Link: http://ygoda.forumtl.com/
Also, this error came up- Uncaught ReferenceError: setkuki is not defined
Any help is much appreciated!
Link: http://ygoda.forumtl.com/
Also, this error came up- Uncaught ReferenceError: setkuki is not defined
Any help is much appreciated!
Bingoo2- New Member
- Posts : 6
Reputation : 1
Language : English
Re: Forum Adjuster Widget
Use this instead, I just noticed this was using eval, when you should use Number :
The code works fine for me, I'd check your CSS because I noticed your width was set as important. Look for something similar to/or containing :
- Code:
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#posaljiwidth").click(function(){
var a=Number(document.getElementById("selektwidth").value);
var b=0;
jQuery(".pun").animate({width:a},1100, "linear");
if(a==1200){b=1;}
if(a==1300){b=2;}
if(a==1400){b=3;}
if(a==1500){b=4;}
if(a==1600){b=5;}
if(a==1700){b=6;}
if(a==1800){b=7;}
});
});
</script>
<center>
<div style="text-align: center;"><input id="posaljiwidth" value="Set" type="submit" /><select id="selektwidth">
<option selected="selected">1200</option>
<option>1300</option>
<option>1400</option>
<option>1500</option>
<option>1600</option>
<option>1700</option>
<option>1800</option>
</select>
</div>
</center>
The code works fine for me, I'd check your CSS because I noticed your width was set as important. Look for something similar to/or containing :
- Code:
.pun { width:87% !important }
Re: Forum Adjuster Widget
Thank you Ange! The new code you gave me works. Topic Solved.
Bingoo2- New Member
- Posts : 6
Reputation : 1
Language : English
Re: Forum Adjuster Widget
Solved
Jophy- ForumGuru
- Posts : 17922
Reputation : 836
Language : English
Location : Somewhere
Similar topics
» Forum Widget
» Help to fix my forum right Widget
» Forum Widget Design.
» How can i make this widget on my forum ?
» Invisible forum, but not in widget
» Help to fix my forum right Widget
» Forum Widget Design.
» How can i make this widget on my forum ?
» Invisible forum, but not in widget
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum