Can you set the default width to boxed?
-
-
Is there a way to default to the **boxed **width instead of the **widest **width? The nodebb community forum defaults to narrow/boxed for me, and my own forum becomes boxed when I login but not when logged out.
-
Can menu items be easily deleted and renamed? I want to delete the "Unread" item...since I'm not sure if anyone uses that feature...and rename the shoutbox.
-
Is there a somewhat simple way to have the "New Topic" button on each page? I have a custom homepage with recent posts, and only use one category. Hence the new user sees no button to start a new topic! @psychobunny smartly suggested repurposing this plugin, but I'm looking for a non-dropdown button, and to have it on each page.
-
-
@Kamal-Patel I'm on my iPad at the minute, so I can't test it, but removing unread should be possible using CSS rather than fondling core.
The width adjustments are done using js, the route to the file was posted in a thread yesterday or the day before, again, first world iPad being clunky issues, search should find it.
As for the last one, I'm not sure, the composer window seems to be called by
#new_post
via an on click event, but I don't think it would work on the custom homepage. Rather than bringing categories and new posts to the homepage, could you not redirect users from the homepage into that category?
There's probably a simple reason why not that I've not seen, but Ive powered down the rig as it's 4am, so I can't test anything out. -
Oh yeah, I guess I could display:none it away, but then the other buttons wouldn't auto-shift (I presume).
I might have seen the width adjustments thread somewhere. I'm sort confused how the width is decided though -- when loading my forum without being logged in, it has the wide width, then the narrow one when logged in as anybody.
Redirect users, yes! Ummm...do you know how I would do that? Like insert a redirect in some config file, or something in the ACP?
-
@Kamal-Patel display none completely hides that element, so anything after it is shifted. Visibility:hidden would leave the gap where unread used to be. But display:none (assuming it has a unique class name you can tap into) will work fine.
As for the redirect, something like this in your nginx might do the trick, but I've not tested it.
location / { rewrite ^/.* http://$server_name/<category/Id> permanent; }
-
@Kamal-Patel checkboxes are admin only if you're on about the ones left of topics.
-
The second one is in the works at #1481
I'm not getting what you mean in the first point. For the third, this should do the trick:
<button id="new-topic-button-widget" class="btn btn-lg btn-primary">New Topic</button> <script> $('#new-topic-button-widget').on('click', function() { require(['composer'], function(composer) { composer.newTopic(YOUR_CATEGORY_ID); }); }); </script>
(written off the top of my head, if it doesn't work let me know and I'll test for sure)
-
Rephrasing #1-- The two standard widths are narrow (fixed?) and wide (fluid?), which are toggled using the button that appears in the lower right hand corner.
I'd like to be able to choose which one to have on by default. In my case, the narrow one.
Thanks for that code...what file do I put it in?
-
(I made a small change in the above code, found a mistake) It's meant to be placed in a widget, although you can put it directly into recent.tpl and unread.tpl if you're running your own custom theme.
This line, change
container
tocontainer-fluid
to make that the default instead -
That code worked, thanks man!
-
So it's currently set at
container
by default, but the content still fills the whole window on all new test users' machines. And when I changed it tocontainer-fluid
, it still fills the whole window by default.Perhaps I'm missing something?
-
Any idea what I might be doing wrong for default width? @psychobunny suggested to change
header.tpl
. The file already defaulted tocontainer
rather thancontainer-fluid
(and hence should show up as narrow not wide, right?):<body> <div class="navbar navbar-default navbar-fixed-top header" role="navigation" id="header-menu"> <div class="loading-bar"></div> <div class="container"> <div class="navbar-header">
But when I open a new window on a new machine and inspect, it's somehow set at
container-fluid
:Are there other files that have to be changed from
container-fluid
tocontainer
? Or can I stick something in custom CSS to change it tocontainer
? I thought it might be a local setting storage issue, but on a random person's laptop it still opened to the wide fluid layout. But apparently it opened tocontainer
on yours? -
Ahh if there is no user setting saved in localstorage then fluid is assumed at this line https://github.com/NodeBB/nodebb-theme-lavender/blob/master/static/lib/lavender.js#L6.
If you want to start off with fixed width then change that line to
var fixed = localStorage.getItem('fixed') || 1,