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,970
  • Latest: bynw
Stats
  • Total Posts: 196,055
  • Total Topics: 21,337
  • Online today: 572
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 122
  • Total: 123
  • @rjen

Can this be done

Started by netridge, December 29, 2007, 02:22:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

netridge

I am trying to have the left block that I have disappear when you view forum threads.


Lets say You are on the main forum page. Yes it want the blocks to appear there.

you then click on graphic design and in that section and beyond I do not want to have any of the blocks appear... I hope im clear.

Smoky

if you go into your tp "settings" you will see where you need to change them

admin>tp>settings>pannel  should work..  ;)

netridge

Nope doesn't do what I want.

I want the blocks to appear when you are on the forum page, not to be confused with the homepage. Then you go into anything on the forum the blocks dissappear.

I am drawing my example from the adminfusion.com. Here you can see the deeper you go in the forum their blocks disappear.

Dragooon

Yes this is very possible.
Make a php block and without frame/title.
Now put something like this :
global $topic;
if(!isset($topic)) {
echo ''<div class="tborder" style="margin-bottom: 2px;"><div class="titlebg" style="padding: 4px; font-weight: bold;">YOUR BLOCK TITLE</div>';
And rest of your code

That will display like any other block whenever visible.
NOTE : $topic is a pre-defined variable in SMF used to identify current topic AFIAK.

Smoky

thanks Dragooon, i knew it was something like what i was saying  :2funny:

netridge

hmm, I think I have been mis understood. I want all existing blocks that TP creates to disappear when someone goes into a topics, I want the front page and the front of the forum to display all the blocks, but once you clock on a topic, thread and inside beying the front of the forum I wan the blocks to disappear.

I noticed a setting in TP for the blocks to disappear when you are at the forum.. it does somewhat of what I want, but in front of the forum I still want the blocks, but once you move in the forum they disappear. I hope i'm clear.  :)

G6Cad

I dont know if this will work as i havent tested it, but try and see if it does what your asking.

Open up the Boardindex.php file in the sources folder.
Find this code
Quote// Show the board index!
function BoardIndex()
{
   global $txt, $scripturl, $db_prefix, $ID_MEMBER, $user_info, $sourcedir;
   global $modSettings, $context, $settings;

Right after that add

Quotetp_hidebars();

So it looks like this

Quote// Show the board index!
function BoardIndex()
{
   global $txt, $scripturl, $db_prefix, $ID_MEMBER, $user_info, $sourcedir;
   global $modSettings, $context, $settings;
   tp_hidebars();

Make a backup before you alter any code in the file.

netridge

Didn't work, it did remove the blocks but only when you are in front of the forum which is not what I wanted.

I want the blocks to appear in the index.php and index.php=forum

after any of those have the blocks disappear, If you want an example see the adminfusion  .com

IchBin

The options you seek are not available in TP. So you'll have to use custom code to do this in a phpbox type to do this.

if (!isset($_GET['topic']) && !isset($_GET['board']))
echo 'All your code goes in between these single quotes';

Hairy

I think netridge wants all the blocks to totally disappear (all off) inside boards and topics, that way when inside a board/topic the forum stretches completely across the page.

But netridge wants the blocks to be all on only when in the "board index" and home page.

I don't know what to do myself but this might explain it a bit clearer for the Einstein members and maybe they can help :)

This website is proudly hosted on Crocweb Cloud Website Hosting.