Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: kitegnome on August 13, 2019, 04:15:40 PM

Title: Sidebar without a portal?
Post by: kitegnome on August 13, 2019, 04:15:40 PM
Is there a clean way to add a two cell sidebar to Curve2 in 2.1 RC2? I can do it with a portal, but that seems like a lot of complexity for what would be a simple task in HTML and CSS. PHP though, I'm lost.
Title: Re: Sidebar without a portal?
Post by: vbgamer45 on August 13, 2019, 04:16:30 PM
Not by default what do you want in the sidebar?
Title: Re: Sidebar without a portal?
Post by: Arantor on August 13, 2019, 04:18:02 PM
That's really the power of a portal - it gives you things to put in the sidebar without any effort.
Title: Re: Sidebar without a portal?
Post by: Antechinus on August 13, 2019, 04:36:29 PM
Sure, it can be done. It's just markup and presentation. All the PHP does is the dynamic bits. You'd simply add whatever markup you wanted to index.template.php and then call in dynamic bits where you want them.

The only catch, apart from getting the PHP syntax right (which isn't as scary as it looks), would be declaring globals if you want something that's usually limited to one specific template.

OTOH, if you use a portal then it becomes no-brainer, as long as the functionality and presentation you want is something that the portal provides by default. Lots of people like it being a no-brainer. :)
Title: Re: Sidebar without a portal?
Post by: kitegnome on August 13, 2019, 04:39:22 PM
Quote from: vbgamer45 on August 13, 2019, 04:16:30 PM
Not by default what do you want in the sidebar?

Two cells. The upper one will have a simple UL/LI menu list, and the lower will be a stack of HTML ads.

Quote from: Arantor on August 13, 2019, 04:18:02 PM
That's really the power of a portal - it gives you things to put in the sidebar without any effort.

It just seems like a lot of things I can break, as I've done recently. ;-)
Title: Re: Sidebar without a portal?
Post by: Arantor on August 13, 2019, 04:41:30 PM
And if you just install a portal, you can copy paste the code you need, job done.

It also means later on if you decide to put new things in, it can be done trivially.
Title: Re: Sidebar without a portal?
Post by: kitegnome on August 13, 2019, 04:42:03 PM
Quote from: Antechinus on August 13, 2019, 04:36:29 PM
Sure, it can be done. It's just markup and presentation....

Thanks. I'll probably try the portal again.
Title: Re: Sidebar without a portal?
Post by: Antechinus on August 13, 2019, 04:46:21 PM
If you are wanting to paste in ad codes, and if you aren't familiar with basic PHP syntax, then pasting HTML into an HTML portal block is probably going to be a lot easier for you. A portal shouldn't break anything, providing you aren't trying to customise the actual portal's PHP files.

For what you want to do I'd recommend Simple Portal, just because what you want to do is simple and SP is the least complex portal around.
Title: Re: Sidebar without a portal?
Post by: kitegnome on August 13, 2019, 04:54:09 PM
Thanks, I'll check Simple Portal out!
Title: Re: Sidebar without a portal?
Post by: @rjen on August 13, 2019, 05:04:26 PM
Does Simple Portal work on 2.1?
Title: Re: Sidebar without a portal?
Post by: Arantor on August 13, 2019, 05:17:04 PM
Quote from: @rjen on August 13, 2019, 05:04:26 PM
Does Simple Portal work on 2.1?

Out of the box, no idea, but I know a semi-unofficial 2.1 port was done called EhPortal which I'm pretty sure does.
Title: Re: Sidebar without a portal?
Post by: Antechinus on August 13, 2019, 05:17:33 PM
Good point. Looks like they haven't updated it yet. Last version listed is 2.0.14.

Ok, in that case I recommend TP. :D
Title: Re: Sidebar without a portal?
Post by: drewactual on August 14, 2019, 12:25:08 AM
check out https://www.cfb51-LINE.com/forum and the sidebar... you'll either have to sign up to remove the 'log in' block thingy i put there, or you can see through it as it is opaque... but you'll see what i did there.  i went with 'sticky' (scrolls to a point then freezes- via css) with it, but it can easily be changed... if you like it i can give you the code.  it's real simple to implement. 

by the way.. when you log in the big 'join' block is exchanged for a little block that is fixed, too, and as the page scrolls it locks right on top of the "please support site" block thingy... also if you sign in you'll see why the page is so tall... i've a bunch of hidden boards. and other implementations under the board index such as WP injects... you don' have to have all that though, unless you want it.