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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,976
  • Latest: aicrazy
Stats
  • Total Posts: 196,164
  • Total Topics: 21,352
  • Online today: 625
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 726
  • Total: 726

Internal Control of Blocks? [solved]

Started by Mahtan, March 16, 2006, 02:55:10 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mahtan

Hey guys-

I have begun my rather large project of modding SMF/TP to suit my needs.

My first project is relatively simple - to make links within the side-blocks open a specific PHP page in a center block.  Essentially, the typical functionality of a normal website - you click a navigation link on the side, and a page opens in the middle.

My solution thusfar has been to make my links point to index.php?show=mypage , so that I can use the PHP code in the frontpage block to parse the variable and determine what content to show.
There are a couple problems with this, though:

~ I need to change the title of the block in accordance with what content I am showing
~ It seems stupid to have ALL my content in a huge switch statement in one single PHP file

So, it seems the best solution to me would be if I could control the block's properties from within the PHP code, such as to hide the "mypage" block when "myotherpage" is being shown.  This would eliminate the need to change the block's title, as well, as I could create an individual frontpage block for each of my different "pages."

Unless someone has a better idea...

Thanks,

Mahtan

IchBin

Why don't you just have a links block that points to articles?

Mahtan

#2
*smacks forehead*
I had been looking for the "Show Right/Left Blocks" options forever... I finally had come to the conclusion that articles couldnt show blocks *sigh* heh

This website is proudly hosted on Crocweb Cloud Website Hosting.