Sidebar without a portal?

Started by kitegnome, August 13, 2019, 04:15:40 PM

Previous topic - Next topic

kitegnome

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.

vbgamer45

Not by default what do you want in the sidebar?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arantor

That's really the power of a portal - it gives you things to put in the sidebar without any effort.

Antechinus

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. :)

kitegnome

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. ;-)

Arantor

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.

kitegnome

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.

Antechinus

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.

kitegnome

Thanks, I'll check Simple Portal out!

@rjen

Does Simple Portal work on 2.1?
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Arantor

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.

Antechinus

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

drewactual

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.

Advertisement: