Scheduled Maintenance: 10-11-2025 Electricity company maintenance between 09:00 and 15:00.

3.2.x Extensions Database 3.2 / 3.3Set forum width 3.2.x

<span class="qte-attr qte_32_33-qte">3.2.x & 3.3.x</span>
User avatar

mortalites
Users
Users
Posts: 33
Joined: 08 Aug 2018, 17:04
    Windows 7 Firefox

Re: Set forum width 3.2.x

Post by mortalites »

Is it possible to just set a side wide/global width for all users and guests which cannot be changed by the user?

Thanks

User avatar

Sniper_E
VIP
VIP
Posts: 1157
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Set forum width 3.2.x

Post by Sniper_E »

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.

Code: Select all

UPDATE `phpbb_users` SET `user_set_width` = '1400'
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™

User avatar

martin
Admin
Admin
Posts: 5106
Joined: 06 Apr 2014, 16:12
    Linux Chrome

Re: Set forum width 3.2.x

Post by martin »

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 :wink:
Image

User avatar

mortalites
Users
Users
Posts: 33
Joined: 08 Aug 2018, 17:04
    Windows 7 Firefox

Re: Set forum width 3.2.x

Post by mortalites »

Is it possible to set the width in sql using a percentage or em? Or am I limited to pixels only?

Thanks
Adam,

User avatar

Sniper_E
VIP
VIP
Posts: 1157
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Set forum width 3.2.x

Post by Sniper_E »

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.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>
Then run the sql command for all users:

Code: Select all

UPDATE `phpbb_users` SET `user_set_width` = '80'
Open: setforumwidth/styles/prosilver/template/event/ucp_prefs_personal_append.html

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}" />&nbsp;<span>%</span>
	</dd>
</dl>
Your lang file will need to say percent instead of pixles also.

User avatar

mortalites
Users
Users
Posts: 33
Joined: 08 Aug 2018, 17:04
    Windows 7 Firefox

Re: Set forum width 3.2.x

Post by mortalites »

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,

User avatar

Sniper_E
VIP
VIP
Posts: 1157
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Set forum width 3.2.x

Post by Sniper_E »

My db prefix is phpbb_ on my site so I use UPDATE `phpbb_users` SET `user_set_width` = '80' in the sql command.
Image
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'

User avatar

mortalites
Users
Users
Posts: 33
Joined: 08 Aug 2018, 17:04
    Windows 7 Firefox

Re: Set forum width 3.2.x

Post by mortalites »

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
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.

User avatar

Sniper_E
VIP
VIP
Posts: 1157
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Set forum width 3.2.x

Post by Sniper_E »

I don't go into the bb_users table. I go in the SQL tab to run a sql command.
Image
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),
That may need to be changed to.

Code: Select all

			'set_width'		=>	array('num', true, 25, 100),

User avatar

mortalites
Users
Users
Posts: 33
Joined: 08 Aug 2018, 17:04
    Windows 7 Firefox

Re: Set forum width 3.2.x

Post by mortalites »

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,
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.

User avatar

Sniper_E
VIP
VIP
Posts: 1157
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Set forum width 3.2.x

Post by Sniper_E »

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

Code: Select all

UPDATE `bb_users` SET `user_set_width` = '80'

User avatar

mortalites
Users
Users
Posts: 33
Joined: 08 Aug 2018, 17:04
    Windows 7 Firefox

Re: Set forum width 3.2.x

Post by mortalites »

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,
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.

User avatar

martin
Admin
Admin
Posts: 5106
Joined: 06 Apr 2014, 16:12
    Linux Chrome

Re: Set forum width 3.2.x

Post by martin »

Dont forget to change the langs also mine is set a min 1400px and max 1800px
Selection_007.png
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.

User avatar

mortalites
Users
Users
Posts: 33
Joined: 08 Aug 2018, 17:04
    Windows 7 Firefox

Re: Set forum width 3.2.x

Post by mortalites »

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>

User avatar

martin
Admin
Admin
Posts: 5106
Joined: 06 Apr 2014, 16:12
    Linux Chrome

Re: Set forum width 3.2.x

Post by martin »

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 :thumbup:

Post Reply Previous topicNext topic