Advertisement:

Author Topic: Sidebar without a portal?  (Read 349 times)

Offline kitegnome

  • Semi-Newbie
  • *
  • Posts: 17
Sidebar without a portal?
« 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.

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,399
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Sidebar without a portal?
« Reply #1 on: August 13, 2019, 04:16:30 PM »
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

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,230
    • StoryBB/StoryBB on GitHub
Re: Sidebar without a portal?
« Reply #2 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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,321
  • Master of BBC Abuse
Re: Sidebar without a portal?
« Reply #3 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. :)

Offline kitegnome

  • Semi-Newbie
  • *
  • Posts: 17
Re: Sidebar without a portal?
« Reply #4 on: August 13, 2019, 04:39:22 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.

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

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,230
    • StoryBB/StoryBB on GitHub
Re: Sidebar without a portal?
« Reply #5 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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline kitegnome

  • Semi-Newbie
  • *
  • Posts: 17
Re: Sidebar without a portal?
« Reply #6 on: August 13, 2019, 04:42:03 PM »
Sure, it can be done. It's just markup and presentation....

Thanks. I'll probably try the portal again.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,321
  • Master of BBC Abuse
Re: Sidebar without a portal?
« Reply #7 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.

Offline kitegnome

  • Semi-Newbie
  • *
  • Posts: 17
Re: Sidebar without a portal?
« Reply #8 on: August 13, 2019, 04:54:09 PM »
Thanks, I'll check Simple Portal out!

Online @rjen

  • Full Member
  • ***
  • Posts: 465
  • Gender: Male
Re: Sidebar without a portal?
« Reply #9 on: August 13, 2019, 05:04:26 PM »
Does Simple Portal work on 2.1?
Running SMF 2.0 with Tinyportal 1.6.3 at www.fjr-club.nl
Testing SMF 2.1 RC2 with Tinyportal 1.6.4 at http://test2.fjr-club.nl/

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,230
    • StoryBB/StoryBB on GitHub
Re: Sidebar without a portal?
« Reply #10 on: August 13, 2019, 05:17:04 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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,321
  • Master of BBC Abuse
Re: Sidebar without a portal?
« Reply #11 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

Offline drewactual

  • Full Member
  • ***
  • Posts: 654
    • College Football Fan Site CFB51
Re: Sidebar without a portal?
« Reply #12 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.