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: 196,026
  • Total Topics: 21,333
  • Online today: 916
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 400
  • Total: 400

Playing with front page block and article page and their combo.. have problem !

Started by Ricky., March 01, 2008, 12:30:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ricky.

I always search for answer before asking question and I found many similar thread waht I am asking but I tried everthing suggested there and also my query is little differnt.

so what I want.

I want..on front page :
Front Blocks and Forum post should be available. (Ok I did it by showing forum post on front page and then "FRONT blocks to showed first")
So all fine..

Next I added an article and unchecked to not to show any block.. but unfortunately not option their to hide front block..

So now with every article we have front blocks added first also. I was not able to find any solution to it.

I can choose "Show Front block Normal ie. show alone" then it won't show on front page.
Also if I choose to show "Show front block on front page" then only front blocks are shown but no forum posts..

so anybody hving any solution ?


getslamed

Don't know if I totally follow what it is your after but think this might be of help.  divide your welcome block into tables. I'm currently putting a site together with tables. As of now there is 4 tables in the welcome block http://helpearl.info


Using source on the editor add the code below. You can add <td>'s as long as they equal 100%. or adjust the <td> width to fit your needs but if you specify a height then you will end up with blank spots on the page. You can repeat the complete table as many times as you like.

<table width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody>
        <tr>
            <td width="75%" valign="top">
              YOUR STUFF HERE
            </td>

            <td width="25%" valign="top">
              YOUR STUFF HERE
            </td>
        </tr>
    </tbody>
</table>

Ricky.

Well.. I guess I was not clear in my question, anyways.. thanx for your effort.

What I actually want that FRONT page block should not appear on ARticles....

Anyways..

Anybody know that if following condition can check whether I am on front page or not :::
$context['current_action'] == 'index'

G6Cad

If you dont want to have any blocks visible on the frontpage, simply turn the panels off. And have the frontpage in TP settings to show only articles.

Ricky.

Have created 4 front page blocks which I am using on front page.

The problem is that those frontpage blocks are also there on any of the article page. What I want is that those front page block should not appear on any article page.

G6Cad

I think the functions you seek are not possible until the next release of TP.
There you will be able to show or not show blocks with a lot more options then TP V098 so you have to hold on until it gets released, cant say when though  :-\

Ricky.

G6,
alternatively I can check URL using php and hide code in those blocks.. ..
Problem is that I still hv no proper knowledge of PHP...

Looking around web found this :
<?php
function selfURL() {
    
$s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : "";
    
$protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s;
    
$port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]);
return 
$protocol."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];
}
function 
strleft($s1, $s2) {
    return 
substr($s1, 0, strpos($s1, $s2));
}
?>


so if url is exactly : /index.php or  /
I can hide the blocks..

any light on this ?

IchBin


Ricky.

Ok.. I enclosed my front page TP blocks in ..
if ($context['TPortal']['is_front'])
{

}


but no effect. My those TP blocks are without title and body from frame from theme so if this works then I can completly hide the block.

Also, I nee make a block which appear only on posting page. ... so if something similar possble in that case too ???

This website is proudly hosted on Crocweb Cloud Website Hosting.