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,966
  • Latest: safir45
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 702
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 154
  • Total: 154

Scripted display settings

Started by eldacar, October 09, 2005, 04:12:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

eldacar

I think a feature like this would be of major benefit to TP. It would still keep it simple for the new user, but would add immense depth for the more advanced. Sort of like SMF :P

Basically instead of ticking boxes to say who can view what, have an optinal field (if empty the normal tickboxes apply) which specifies who can access it. This field would be php code. So you could specify which groups, it could depend on what the current action and subactions are, the number of posts, randomly etc etc. It would return a binary value of true or false, and then simply display it if true!

bloc

It sounds interesting...basically you mean you can write your own checking routine?

eldacar

Yes. You already must have a function for it (I haven't checked the source so I don't know exactly how it works), and this would just allow you to create custom ones. How would they be stored? I'm not sure... but possibly just uploaded to a php file as an actual function?

For specifics, I'm planning on having a block which shows the latest post from a particular board, but I don't want to show it when you're viewing that board as it would be redundant. Or prehaps not to show a stats box when you're viewing the stats page. Or for something random.

Of course, if it was empty the normal tick boxes would work instead so it would be no more complex for the user.

This website is proudly hosted on Crocweb Cloud Website Hosting.