Scheduled Maintenance: 10-11-2025 Electricity company maintenance between 09:00 and 15:00.
3.2.x Extensions Database 3.2 / 3.3 ⇒ Set forum width 3.2.x
-
mortalites
- Users

- Posts: 33
- Joined: 08 Aug 2018, 17:04
Re: Set forum width 3.2.x
Is it possible to just set a side wide/global width for all users and guests which cannot be changed by the user?
Thanks
Thanks
-
Sniper_E
- VIP

- Posts: 1157
- Joined: 14 Oct 2014, 19:01
Re: Set forum width 3.2.x
Yes, delete the setforumwidth/styles/prosilver/template/event/ucp_prefs_personal_append.html event template.
Then set all users width in phpmyadmin with sql command.
Then set all users width in phpmyadmin with sql command.
Code: Select all
UPDATE `phpbb_users` SET `user_set_width` = '1400'-
martin
- Admin

- Posts: 5106
- Joined: 06 Apr 2014, 16:12
Re: Set forum width 3.2.x
I have a version i just changed the min width so they can still go bigger on tv's a set width is ok but looks stupid in some cases 

-
mortalites
- Users

- Posts: 33
- Joined: 08 Aug 2018, 17:04
Re: Set forum width 3.2.x
Is it possible to set the width in sql using a percentage or em? Or am I limited to pixels only?
Thanks
Adam,
Thanks
Adam,
-
Sniper_E
- VIP

- Posts: 1157
- Joined: 14 Oct 2014, 19:01
Re: Set forum width 3.2.x
You would have to change the px to % in the event template. The em is for text size so it will not work for width.
Open: setforumwidth/styles/prosilver/template/event/overall_header_stylesheets_after.htmlThen run the sql command for all users:
Open: setforumwidth/styles/prosilver/template/event/ucp_prefs_personal_append.html
Your lang file will need to say percent instead of pixles also.
Open: setforumwidth/styles/prosilver/template/event/overall_header_stylesheets_after.html
Code: Select all
<style type="text/css">
#wrap, .wrapper {
max-width: {SET_WIDTH}% !important;
margin: auto !important;
}
@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) {
#wrap {
max-width: none !important;
}
}
</style>Code: Select all
UPDATE `phpbb_users` SET `user_set_width` = '80'Code: Select all
<dl>
<dt><label>{L_SET_WIDTH}{L_COLON}</label><br />
<span>{L_SET_WIDTH_EXPLAIN}</span>
</dt>
<dd>
<input type="number" name="set_width" size="4" maxlength="4" min="25" max="100" value="{SET_WIDTH}" /> <span>%</span>
</dd>
</dl>-
mortalites
- Users

- Posts: 33
- Joined: 08 Aug 2018, 17:04
Re: Set forum width 3.2.x
I will change the px to % once I figure out how to update the database. my users table is bb_users.
I ran that command and it was successful and I cleared the forum cache but my width is still 100%. Can anyone walk me through running the sql command?
Thanks,
I ran that command and it was successful and I cleared the forum cache but my width is still 100%. Can anyone walk me through running the sql command?
Thanks,
-
Sniper_E
- VIP

- Posts: 1157
- Joined: 14 Oct 2014, 19:01
Re: Set forum width 3.2.x
My db prefix is phpbb_ on my site so I use UPDATE `phpbb_users` SET `user_set_width` = '80' in the sql command.

Look at what your prefix is set at and change the sql command to match your db prefix.
Like this: UPDATE `bb_users` SET `user_set_width` = '80'

Look at what your prefix is set at and change the sql command to match your db prefix.
Like this: UPDATE `bb_users` SET `user_set_width` = '80'
-
mortalites
- Users

- Posts: 33
- Joined: 08 Aug 2018, 17:04
Re: Set forum width 3.2.x
So I check box bb_users and then click on the SQL tab? I did this early but now when I do it says 0 rows were affected.
Thanks
Thanks
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.
-
Sniper_E
- VIP

- Posts: 1157
- Joined: 14 Oct 2014, 19:01
Re: Set forum width 3.2.x
I don't go into the bb_users table. I go in the SQL tab to run a sql command.

Click on the SQL tab at the top and put your sql command in there. Then click Go
If that want work then Dm may have the limits on what can be set in the event/listener.php
That may need to be changed to.

Click on the SQL tab at the top and put your sql command in there. Then click Go
If that want work then Dm may have the limits on what can be set in the event/listener.php
Code: Select all
'set_width' => array('num', true, 625, 1800),Code: Select all
'set_width' => array('num', true, 25, 100),-
mortalites
- Users

- Posts: 33
- Joined: 08 Aug 2018, 17:04
Re: Set forum width 3.2.x
When i first ran it showed that is updated 40 some rows. But now it just shows this. Oh I also went into a user table and found the row that was added. Let me know if that looks correct?
Thanks
Adam,
Thanks
Adam,
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.
-
Sniper_E
- VIP

- Posts: 1157
- Joined: 14 Oct 2014, 19:01
Re: Set forum width 3.2.x
I thought you were trying to set percent instead of px.
1400 will not work after changing the listener.php numbers.
After changing the numbers in the listener.php to 25, 100 then you will need to clear the server cache.
Then you can do
1400 will not work after changing the listener.php numbers.
After changing the numbers in the listener.php to 25, 100 then you will need to clear the server cache.
Then you can do
Code: Select all
UPDATE `bb_users` SET `user_set_width` = '80'-
mortalites
- Users

- Posts: 33
- Joined: 08 Aug 2018, 17:04
Re: Set forum width 3.2.x
Ok I got it working using the 1400 pixels without updating the listener.php or anything else. Now I will attempt to do it at a % but will changing it to a % require updating the Listener.php. I do not a few minutes issues.
1. the search bar on the header didnt shrink
2. The Width Link is still showing though but after you click it the option to set a width is missing so which is that part is working.
www.syberwatch.xyz/summits if you want to take a peak.
Ok I was able to turn off the search bar, but I might want to keep it if we can fix it from being outside of the forum container.
Thanks,
1. the search bar on the header didnt shrink
2. The Width Link is still showing though but after you click it the option to set a width is missing so which is that part is working.
www.syberwatch.xyz/summits if you want to take a peak.
Ok I was able to turn off the search bar, but I might want to keep it if we can fix it from being outside of the forum container.
Thanks,
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.
-
martin
- Admin

- Posts: 5106
- Joined: 06 Apr 2014, 16:12
Re: Set forum width 3.2.x
Dont forget to change the langs also mine is set a min 1400px and max 1800px
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.
-
mortalites
- Users

- Posts: 33
- Joined: 08 Aug 2018, 17:04
Re: Set forum width 3.2.x
What should i set that too then? This is the default that is set.
Code: Select all
<style type="text/css">
#wrap {
max-width: {SET_WIDTH}px; !important;
}
@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) {
#wrap {
margin: auto;
max-width: none !important;
}
}
@media only screen and (max-width: 1220px), only screen and (max-device-width: 1220px) {
#wrap {
margin: auto;
}
}
</style>-
martin
- Admin

- Posts: 5106
- Joined: 06 Apr 2014, 16:12
Re: Set forum width 3.2.x
Leave that as standard as the board will go responsive on a set size so it really dont matter for mobile devices its mainly for larger screens 
