• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Creating/Editing a Thread fit to screen

Aiken_Drumn

Deity
Supporter
Joined
Oct 16, 2021
Messages
3,124
Location
NES/FG/SF Activity:Arguing the toss
I was wondering if it is possible for the forum text boxes to fit to screen?

I have a wide monitor.. but nothing exceptional.. I imagine many other do to.

Seems quite a shame to have all the wasted real estate?

upload_2021-11-2_17-12-37.png
 
I was wondering if it is possible for the forum text boxes to fit to screen?

I have a wide monitor.. but nothing exceptional.. I imagine many other do to.

Seems quite a shame to have all the wasted real estate?

View attachment 613339

The text boxes fit themselves to the browser window on my screen, which is a wide one, no matter how wide or narrow I make the window for my browser. Perhaps there is a setting in your browser that you are missing.
 
The text boxes fit themselves to the browser window on my screen, which is a wide one, no matter how wide or narrow I make the window for my browser. Perhaps there is a setting in your browser that you are missing.

Specifically when editing a post?
 
Specifically when editing a post?

I did not realize that you were only referring to editting a post. I thought you were referring to all posts. No, for editing the window size is fixed as you have noted.
 
Last edited:
Yeah it's a real odd one. The 'fit screen' code clearly is on all other pages, just not the edit post screen.

I wonder if it's possible to tweak how it displays on my end via some browser coding magic. Sadly I'm a total caveman to such things.
 
A related thing I've considered asking for a long time.

Is is possible within the advanced search to make the area where you select which forums are being searched larger? Screenshot of that area:

upload_2021-12-16_3-10-51.png


It shows about 7 forums at a time, but CFC has a lot of forums these days. Being able to see more of them at once would make it quicker and easier to find the one you'd like to search, and probably encourage more specific searching rather than wider searching because it takes too long to find the forum you want to search.

Pie in the sky, being able to set some favorite ones that area always available with one click would be ideal. But that would probably be a lot more work than resizing, and I don't know if resizing it is even realistic.
 
I wonder if it's possible to tweak how it displays on my end via some browser coding magic. Sadly I'm a total caveman to such things.

That got me thinking, it has to be possible to write a Greasemonkey script or whatever the equivalent to that nowadays is, to change this.

Alas, I was also a caveman to such things, knowing only that some browsers allow user stylesheets to override default styles.

So far, I've figured out how to change it in Firefox, for both the Edit function and the Reply function that you get when you click "More Options..." when replying (something I often do so I can preview a post before posting it).

First, create a file called userContent.css, which contains the following:

Code:
.xenForm {
    max-width: unset !important;
}

By default, the xenForm has a maximum width of 800 pixels, which is why all that real estate is wasted (I'm glad I'm not the only one who thinks it's a shame when this happens! I can always shrink my browser window if I want to only use half of the screen). The code above removes the maximum so it'll use however much space there is, minus a little bit of margin on each side. If you want, you could replace the unset with a value such as 1600px to use more of your screen but maybe not the whoel thing.

Next, you'll have to enable custom themes in Firefox. I followed this guide from a guy who used to work at Mozilla. Step 6 is not necessary, and in Step 3 you can use the file created above (or just create it then).

As he notes, this will also affect other XenForo sites that use the .xenForm CSS class, which I'm guessing most do. But you might consider that to be an advantage. I haven't found a great way to make it CFC-specific yet.

From what I've read on the web, similar user customization on Chrome and derived browsers require extensions. Opera 12 and Internet Explorer support user stylesheets, but I have not been able to convince them to style the .xenForm. I can get the background color to change, and could probably change font sizes, but the form remains stubbornly the same size. They might not support the same granularity of styling that Firefox does.

So, in summary:

1. Use Firefox
2. Follow the steps above.
3. If you want to use other browsers, it will require more research.

As Firefox isn't my main browser, I'll probably just try to remember to use Firefox if I want extra width when editing a post. Maybe I'll be motivated to find a work-around for other browsers someday, or maybe someone else will, but maybe not.
 
Greasemonkey! Now that is something I have not heard in a long time.

I'm sure there is someone out there that can help whip this script up in short order.
 
Surely there is a Greasemonkey extension for Chrome?
I've learned more about this in the past year, and it's actually called Tampermonkey for Chrome. I've written a few scripts, mostly for other sites, although I did write one to hide the CFC navigation bar at the top since it takes over some of my browser's native shortcuts.

For the topic of this thread, though - creating/editing a thread to fit the screen - is that still an issue with the migration to XenForo 2.2? For me it seems that it automatically does that now, and I can't find any scripts I have that should be affecting that. Maybe it depends on the theme? I'm using the Christmas one currently.

I don't think it would be a bad thing to have a thread listing various Greasemonkey/Tampermonkey scripts that users might find helpful, and which aren't feasible to change via XenForo settings, or which are wanted by some members but not all. Of course it would help if there were multiple parties interested in authoring them; as anyone following the Civ3 forums knows, the number of things I find interesting exceeds the amount of time I have to follow up on them in a timely manner.
 
Back
Top Bottom