ElkArte Community

Elk Development => Feature Discussion => Topic started by: Xarcell on June 14, 2013, 01:10:01 pm

Title: Feature Request: Sidebar
Post by: Xarcell on June 14, 2013, 01:10:01 pm
I think there should be a sidebar. It can be useful for showing logged in information, tags for topics, polls for topics, and who's online(info center stuff). Then you could even just remove the information center since it's contents is in the sidebar...
Title: Re: Feature Request: Sidebar
Post by: emanuele on June 14, 2013, 02:41:36 pm
Please not a side bar...please.

There is already enough ooops on the screen as it is, I don't need even more... :(
Title: Re: Feature Request: Sidebar
Post by: Antechinus on June 14, 2013, 05:55:47 pm
/me haz teh novel idea!

/me thinks maybe you could remove some of the other *insert family-friendly word for excrement here*....

/me thinks Ema uses naughty wordz. :)
Title: Re: Feature Request: Sidebar
Post by: emanuele on June 14, 2013, 06:24:10 pm
Fixed... lol

/me has to pay attention during the next interview because he created this mental idea that the word is normal...(really, not joking)
Title: Re: Feature Request: Sidebar
Post by: Xarcell on June 15, 2013, 11:26:10 am
Quote from: emanuele – Please not a side bar...please.

There is already enough ooops on the screen as it is, I don't need even more... :(

No sidebar, that's fine; but what do you mean by oops on screen?
Title: Re: Feature Request: Sidebar
Post by: emanuele on June 15, 2013, 12:21:46 pm
A leftover... :P

Well, I'm not the one that decides (if everyone likes it...I'll just add a setting to disable it :P).
Title: Re: Feature Request: Sidebar
Post by: IchBin on June 15, 2013, 04:19:26 pm
Sidebar seems to be something I'd leave to a theme or portal type mod.
Title: Re: Feature Request: Sidebar
Post by: emanuele on June 15, 2013, 04:40:11 pm
Weeeeell...
I could like sidebars if and only if the avatars go away completely and in the sidebar there is something actually useful.

A clone of the info center in the sidebar to me seems as useful as the info center... and I don't use the info center at all.

Now, define what could be useful in a possible sidebar is another problem.
What IMO could be interesting to have are all the buttons for moderation and for the topic (reply, add poll, etc.), maybe unread post/topics and the jump to.
In a position:fixed (or some js effect) sidebar.

Something like that may be interesting to explore.
Title: Re: Feature Request: Sidebar
Post by: Antechinus on June 15, 2013, 05:07:31 pm
Recent posts is actually useful in a sidebar, I find. Shoutbox is popular (although that's mod/portal territory). Not much else. You can put extra stuff in it, but since forums are about posts, recent posts is the only thing I regard as actually useful. My 2c.

And fixed positioing doesn't work well. Problem is that if the sidebar content is taller than screen res, you can't see some of it with fixed positioning. Absolute positioning can work very well though.

And you do NOT need javascript for sidebar positioning. lrn 2 ccs. :P
Title: Re: Feature Request: Sidebar
Post by: Xarcell on June 15, 2013, 05:46:48 pm
Quote from: emanuele – Weeeeell...
I could like sidebars if and only if the avatars go away completely and in the sidebar there is something actually useful.

A clone of the info center in the sidebar to me seems as useful as the info center... and I don't use the info center at all.

Now, define what could be useful in a possible sidebar is another problem.
What IMO could be interesting to have are all the buttons for moderation and for the topic (reply, add poll, etc.), maybe unread post/topics and the jump to.
In a position:fixed (or some js effect) sidebar.

Something like that may be interesting to explore.

Those are the things I'm talking about. Things actually useful, like the tags for the addon you made, instead of above the topic itself. Admin quick actions, moderator quick actions. You can even display a poll in the sidebar, rather than above the topic. One of the best things I like about Vanilla is that there is a "Post Topic" button in the sidebar, regardless of where you are in the forum. I'm not suggestioning that for Elkarte, i'm just saying I enjoy it. Sidebars are also great for Ad placement, and can easily be made responsive.
Title: Re: Feature Request: Sidebar
Post by: Xarcell on June 15, 2013, 05:47:39 pm
Quote from: Antechinus – Recent posts is actually useful in a sidebar, I find. Shoutbox is popular (although that's mod/portal territory). Not much else. You can put extra stuff in it, but since forums are about posts, recent posts is the only thing I regard as actually useful. My 2c.

And fixed positioing doesn't work well. Problem is that if the sidebar content is taller than screen res, you can't see some of it with fixed positioning. Absolute positioning can work very well though.

And you do NOT need javascript for sidebar positioning. lrn 2 ccs. :P

You don't even need positioning for a sidebar....
Title: Re: Feature Request: Sidebar
Post by: Antechinus on June 15, 2013, 05:51:54 pm
You don't, but you can use it if you want to, and I have. :) Depends what layout you want.
Title: Re: Feature Request: Sidebar
Post by: TE on June 16, 2013, 02:55:56 am
Quote from: IchBin – Sidebar seems to be something I'd leave to a theme or portal type mod.
+1, and a sidebar doesn't fit well on smaller screens (tablets, mobile devices)..
Title: Re: Feature Request: Sidebar
Post by: Xarcell on June 16, 2013, 09:49:05 am
Quote from: TE –
Quote from: IchBin – Sidebar seems to be something I'd leave to a theme or portal type mod.
+1, and a sidebar doesn't fit well on smaller screens (tablets, mobile devices)..

That's why you don't have sidebars in small screens. Isn't that what responsive design is for?
Title: Re: Feature Request: Sidebar
Post by: Nao on June 17, 2013, 06:59:10 am
Yup, just have a look at Wedge's, it conveniently stuffs the sidebar to the bottom of the page if it's not wide enough.

I have very polarized opinions about sidebars in forums, really.
Back in 2010, I was so pro-sidebar, that I decided (and pretty much forced Arantor into accepting) that Wedge would have a mandatory sidebar, and no way to remove it. I quickly wrote the responsive code, which at that time would move the sidebar to the left, beyond the page visibility, and would be restored with a mouse hover, with a nice animation. I was happy with it, but unfortunately it wasn't THAT responsive, i.e. mobile devices didn't really like that.

Fast-forward three years, and I have a few things to say on why I hate sidebars...
- There's not much to push into them for a forum. Basically, it's a placeholder for a small user profile, feeds, and a couple other things. On a default install, it will feel very dry, and unbalanced.
- Although it's the definitive target for plugins, most plugins would find it more useful to place themselves inside the main area, rather than the sidebar.
- The more sophisticated your content becomes, the more complicated it is to make it fit next to the sidebar. Especially when you start putting media, etc.

However, despite these shortcomings, I still believe that Wedge is in its right when it's imposing the sidebar to users, if only because I hate wasting horizontal space in general, ah ah. But really, there are situations where I'd really like to control the sidebar by either hiding it or replacing it with a wider one, such as in media item pages, but that's mostly the perfectionist talking, so... Don't mind me.

I don't think Elkarte's goal is to have a sidebar in the end, but I'd like to see you guys try a sidebar that's folded by default -- e.g., something that can be shown by clicking one of those small 'menu' buttons you see on every other mobile website. That's something I could have done for Wedge, too, but I fear it's too late for me to do at this point, it might break Wedge's expected layout too much.
Title: Re: Feature Request: Sidebar
Post by: Xarcell on June 17, 2013, 10:45:43 pm
Sidebar's and responsive design is easy, use floats(very simple example).

Code: [Select]
#sidebar {
width: 100%;
}
Code: [Select]
@media only screen and (min-width: 600px) {
width: WHATEVER YOU WANT ;
float: right;
}

Needs more tweaking, but see what I did in my fork: http://xarfureo.com/

Title: Re: Feature Request: Sidebar
Post by: TE on June 17, 2013, 11:15:50 pm
Quote from: Xarcell – Sidebar's and responsive design is easy, use floats(very simple example).
Yep, that's right in general.. but doesn't work well all the time, e.g. if you have other sidebar related stuff to deal with.. (adminmenu, profile, poster's area in display...)
I'd go with "display:table;" instead..
Code: [Select]
<div style="display: table;">
    <div style="display: table-cell;">primary content</div>
    <div style="display: table-cell;">side bar</div>
    ....
</div>
then simply change display: to block, on smaller screens.. Example is with inline CSS, just for readability.
Title: Re: Feature Request: Sidebar
Post by: Antechinus on June 18, 2013, 12:46:41 am
I've found that as long as you aren't trying to support old versions of IE, it's usually fine just with floats and/or relative positioning. Can depend on markup and content though. There is a Webkit bug that affects floats sometimes, but you can get around it with a relative positioning trick. I used that ages ago to fix the sidebar menus in 2.0.x.

The bug is that if you float a div left, then have another next to it that is unfloated with a left margin, then depending on the content of the second div, Webkit will sometimes put the same margin on the right as well, even though it's not declared anywhere. Dunno why, but it does.

You can get around it by setting relative positioning on the parent element of those two divs, then setting relative positioning with left: 0; and right: 0; on the second div. That makes it behave, whether the floated div is expanded or collapsed, and wont break any other browsers. :)

The thing I used absolute positioning for was to pull a portal sidebar clean out of the portal table td, to position the sidebar at the left edge of the screen. That works a treat too, if you want that layout (I rather like it). You can use variants to switch the CSS between that layout and the standard portal layout (sidebar inside forum wrapper). I've done that too. :D
Title: Re: Feature Request: Sidebar
Post by: TE on June 18, 2013, 02:33:06 am
float should work with all modern browsers (with some tricks), but it can get complicated in a complex html structure.. (float needs clear, overflow, position and all that nasty stuff, just check the dropmenus  ;) ).
display:table, table-row and table-cell is supported by IE8+ and all modern browsers, it's almost identically with a normal table structure (no colspan or rowspan), but has got the advantage to switch it back to display: block; on smaller screens.
http://www.onenaught.com/posts/201/use-css-displaytable-for-layout
Title: Re: Feature Request: Sidebar
Post by: Antechinus on June 18, 2013, 03:21:39 am
The drop menus aren't floated. They're absolute. :D

I know about table display, but haven't had cause to use it much yet. Whatever works. One good thing about the relative position trick is that it's automatically RTL-compatible. If you decide to switch your floated div to the right, the second div doesn't need any changes. It's still happy at left: 0; right: 0; which is rather handy for a forum app.

Back when I first found this Webkit bug, we were still wanting to support IE6 and 7. At the time Opera had the same bug. Opera has since fixed it, but Webkit still has it. So, I still think the trick is worth knowing about for whenever it might be useful. :)
Title: Re: Feature Request: Sidebar
Post by: Antechinus on June 18, 2013, 06:28:55 pm
Hey there ya go, I'm going to use this fix to deal with Issue #548 (https://github.com/elkarte/Elkarte/issues/548).

Current Display.template.php markup is inherited from 2.0.x dev/IE6 days. Tis uggers. The post_wrapper div is no longer needed for its original purpose, so will be revamped to wrap everything except the keyinfo and the poster area stuff (IOW, will wrap moderatorbar*, post, etc all in one). Then I use this relative position trick on it. Result will be a content area that handles hide-poster-stuffz or show-poster-stuffz, with LTR or RTL, without any CSS tweaks. :)

*ETA: Actually moderatorbar and quickbuttons_wrap can be deprecated. Can't honestly remember why they were there in the first place. People seemed to have major divitis and spannitis in 2.0.x dev cycle.
Title: Re: Feature Request: Sidebar
Post by: Antechinus on June 19, 2013, 02:32:10 am
ROFL. Well after all that waffling I still had to use the old style, coz me nifty trick didn't work this time. I'll just shaddup now. :P

(It's all sorted anyway, which is the main thing).
Title: Re: Feature Request: Sidebar
Post by: Xarcell on June 19, 2013, 12:04:41 pm
Quote from: Antechinus – I've found that as long as you aren't trying to support old versions of IE, it's usually fine just with floats and/or relative positioning. Can depend on markup and content though. There is a Webkit bug that affects floats sometimes, but you can get around it with a relative positioning trick. I used that ages ago to fix the sidebar menus in 2.0.x.

The bug is that if you float a div left, then have another next to it that is unfloated with a left margin, then depending on the content of the second div, Webkit will sometimes put the same margin on the right as well, even though it's not declared anywhere. Dunno why, but it does.

You can get around it by setting relative positioning on the parent element of those two divs, then setting relative positioning with left: 0; and right: 0; on the second div. That makes it behave, whether the floated div is expanded or collapsed, and wont break any other browsers. :)

The thing I used absolute positioning for was to pull a portal sidebar clean out of the portal table td, to position the sidebar at the left edge of the screen. That works a treat too, if you want that layout (I rather like it). You can use variants to switch the CSS between that layout and the standard portal layout (sidebar inside forum wrapper). I've done that too. :D

That's why you don't do margin for elements next to floated elements. I never understood why people do this. You float both elements, and apply widths to both. Problem solved...

Fixed position is not supported on a good majority of smartphones. Absolute positioning has it's quirks on smartphones...
Title: Re: Feature Request: Sidebar
Post by: Xarcell on June 19, 2013, 12:12:47 pm
Quote from: TE – float should work with all modern browsers (with some tricks), but it can get complicated in a complex html structure.. (float needs clear, overflow, position and all that nasty stuff, just check the dropmenus  ;) ).
display:table, table-row and table-cell is supported by IE8+ and all modern browsers, it's almost identically with a normal table structure (no colspan or rowspan), but has got the advantage to switch it back to display: block; on smaller screens.
http://www.onenaught.com/posts/201/use-css-displaytable-for-layout

There is nothing complicated about floats. Not if you use your CSS properly. Just use overflow: auto, clear:both, and box-sizing: border-box(support goes back as far as IE8). If you end up with scrollbars, then your math isn't correct, and the layout shouldn't be used anyway.

Also, there shouldn't be any reason what-so-ever for adding an empty element with "clear:both", not unless your adding support for earlier than IE8. As I understand it, Elkarte is focused on IE8 support and above...
Title: Re: Feature Request: Sidebar
Post by: Antechinus on June 19, 2013, 05:26:47 pm
Quote from: Xarcell – That's why you don't do margin for elements next to floated elements. I never understood why people do this. You float both elements, and apply widths to both. Problem solved...
Which is all very well if you want to set both width in %, and if you either don't have any horizontal padding or if you declare border-box sizing.

If you don't want to set both widths in %, then you use a margin on an unfloated element, next to the floated one. This is a really old way of handling things that dates back to the stone age and has been supported forever. Most of the time, it works. When it works, that's good enough for me.

QuoteFixed position is not supported on a good majority of smartphones. Absolute positioning has it's quirks on smartphones...
However, since I was doing this for desktop......

Fixed and absolute are fine on the last two versions of Android, AFAIK. iOS still has a bit of indigestion with them. The rest? Who cares?
Title: Re: Feature Request: Sidebar
Post by: Antechinus on June 19, 2013, 05:31:17 pm
Quote from: Xarcell – There is nothing complicated about floats. Not if you use your CSS properly. Just use overflow: auto, clear:both, and box-sizing: border-box(support goes back as far as IE8). If you end up with scrollbars, then your math isn't correct, and the layout shouldn't be used anyway.
Sometimes, like when you have drop menus in an element, you can't use auto or hidden oveflow. When those can be used I agree they're very useful.

QuoteAlso, there shouldn't be any reason what-so-ever for adding an empty element with "clear:both", not unless your adding support for earlier than IE8. As I understand it, Elkarte is focused on IE8 support and above...
The clearfixes are not adding an element as such. They're adding a pseudo element, which has no effect on markup. It's just a bit of CSS, much like setting auto overflow.

If you're talking about the horrible old line break clears that were inherited from early SMF 2.0.x, those are already on the kill list.
Title: Customizable Sidebars
Post by: Allan on February 18, 2014, 09:59:49 pm
I was wondering what and how everyone thinks about having sidebars, I for one love having them for shoutboxes and ads.
Title: Re: Customizable Sidebars
Post by: meetdilip on February 18, 2014, 10:20:16 pm
It is inevitable for me. I use simple portal and display latest posts, ad and a couple of other blocks.
Title: Re: Customizable Sidebars
Post by: IchBin on February 18, 2014, 10:54:41 pm
https://github.com/Spuds/SimplePortal

Don't know if it's currently working, but I do know Spuds has worked on making it work with Elk.
Title: Re: Customizable Sidebars
Post by: meetdilip on February 18, 2014, 10:56:05 pm
Wow ! You guys are doing a great job. Is it stable ? Or still under development ?
Title: Re: Customizable Sidebars
Post by: Allan on February 19, 2014, 07:12:22 am
I use simple portal as will for just the side boxes, thanks Ichbin for the response.
Title: Re: Customizable Sidebars
Post by: [SiNaN] on February 19, 2014, 07:54:44 am
I'm pretty sure it at least works, since Spuds had been working on it. The conversion had been somewhat parallel to the development of 2.4 version of SimplePortal, which had been stalled for some time now due to other projects I had to work on but should start again soon.
Title: Re: Customizable Sidebars
Post by: Spuds on February 19, 2014, 10:24:44 am
I worked (with some bugs) on B1 but I would guess its needs some updating for B2.   Its high on my "list" of things to get working on now that B2 is out. 
Title: Tabbed block
Post by: meetdilip on October 07, 2014, 04:38:08 pm
Is it possible to have block in with tabs where we can browse through most liked, recent, most viewed etc posts/topics ? I mean something like [bd] Widgetframework for XF.
Title: Re: Tabbed block
Post by: emanuele on October 13, 2014, 09:25:39 am
That one (http://www.xenforotuts.com/add-ons-free/widget-framework.html)?

The main problem would be there is no sidebar... :P
Title: Re: Tabbed block
Post by: ahrasis on October 13, 2014, 05:59:00 pm
SimplePortal then?
Title: Re: Tabbed block
Post by: radu81 on October 13, 2014, 07:34:01 pm
Widget framework is the most downloaded addon for XF. I think he means something like like the blocks at TAZ community
Title: Re: Tabbed block
Post by: meetdilip on October 13, 2014, 10:26:18 pm

Sidebar which has tabs :)

More like " Recent Posts ", " Popular Posts ", " Recent Comments " etc in WordPress.
Title: Re: Tabbed block
Post by: ahrasis on October 14, 2014, 08:28:46 am
What is the difference between portal anyway? It can do all that as well, and more, right?
Title: Re: Tabbed block
Post by: emanuele on October 14, 2014, 08:55:44 am
The difference lays mainly on what users expect to be on the "core" and what not.
A "sidebar" is much simpler than a portal. It is usually meant to be shown maybe only on the board index, with... something in it.
A portal is usually much more, the current Simple Portal is much closer to a CMS than a ... simple portal and maybe many people only want a simple sidebar and don't want to have to deal with all the stuff that SP brings with it.

Do note that I always considered sidebars as unnecessary hassles, but recently (there is a topic in this board) I started considering the possibility to have one. I also started coding an addon, and I was immediately side-tracked to something more complex as usual. lol
Title: Re: Tabbed block
Post by: ahrasis on October 14, 2014, 08:54:00 pm
That's the problem. It will become more complex. But it is up to developer to consider whether this should be a part of the core. Or official elkarte addons. I can see this in Wedge and dislike it. Just make sure I can turn this off if you make it a part of the core will ya @emanuele .
Title: Re: Tabbed block
Post by: meetdilip on October 14, 2014, 09:26:24 pm
Quote from: ahrasis – What is the difference between portal anyway? It can do all that as well, and more, right?

Portal can give sidebar. I was requesting for a sidebar with tabs.
Title: Re: Tabbed block
Post by: kucing on October 15, 2014, 01:54:37 am
Widgetized sidebar/header/footer to put whatever you want like in wordpress? :D
Title: Re: Tabbed block
Post by: emanuele on October 15, 2014, 03:28:15 am
Then we can consider it a duplicate of:
http://www.elkarte.net/community/index.php?topic=1062.0
http://www.elkarte.net/community/index.php?topic=433.0

And partially of:
http://www.elkarte.net/community/index.php?topic=2068.0

/me is in soft cleanup mode, so I'm going to merge this with 1062 and 433. O:-)