TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,855
  • Total Topics: 21,291
  • Online today: 1,422
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 375
  • Total: 375

Block Scheduling

Started by Sledge, October 28, 2025, 05:35:44 PM

Previous topic - Next topic

0 Members and 7 Guests are viewing this topic.

Sledge

Hi. I have a forum using TP for an Undernet IRC channel. The channel has a radio station with DJs almost nightly. I have several blocks that advertise the current DJ, but I have to manually turn them on and off. I know there is no feature or mod for TP that allows blocks to be scheduled, but I was wondering if there was a way to script in each block whether or not it displays the content.

My idea is to use a HTML or PHP block with the contents I want displayed, but add some code at the top of each block that if requirements for a certain day/time aren't met, it will ignore the rest of the block (and not show the contents). This way I can leave the blocks on, but the contents won't display except in the prescribed time frame.

Does anyone know if this is possible, and how to code it?

https://acrossthemiles.net/
SMF 2.1.6
TP 3.0.2

This website is proudly hosted on Crocweb Cloud Website Hosting.