news blocks
                                
                                 herrhitman   0
From: -
                                 
                              
                            From: -
Notice
This topic is archived. New comments cannot be posted and votes cannot be cast.Responses to this topic
1 Re: news blocks
                                                
                         herrhitman
                
                OP
   0
From: -
                         
                      
                  From: -
                    news blocks
that worked great! thank you very very much!
                  
                  
                that worked great! thank you very very much!
1 Re: news blocks
                                                
                         Philipp 
                        
                        
From: Austria
                         
                      
                   Administrator
  1342From: Austria
                    news blocks
Thanks for the PM, everything is clear now. Please restore the original templates because I find a better way to doing this.
Open core.php in an editor and find:
and add:
Find:
and add:
Let me know if there is any problem with the new code
                  
                  
                Thanks for the PM, everything is clear now. Please restore the original templates because I find a better way to doing this.
Open core.php in an editor and find:
        echo GetTemplate("site_header");                  
and add:
        if (preg_match("/index/i", $_SERVER[PHP_SELF]))
        {        
Find:
WriteCache("news", "header_block", $thisblock, MkTime()+3600);
and add:
}
Let me know if there is any problem with the new code
1 Re: news blocks
                                                
                         Philipp 
                        
                        
From: Austria
                         
                      
                   Administrator
  1342From: Austria
                    news blocks
Please provide some information about your Storyteller CMS license via PM first. I can't find your license in the database. Thanks.
                  
                  
                Please provide some information about your Storyteller CMS license via PM first. I can't find your license in the database. Thanks.
1 Re: news blocks
                                                
                         herrhitman
                
                OP
   0
From: -
                         
                      
                  From: -
                    news blocks
ok it halfway works, halfway doesn't. the adding something to only the header works fine, but the removing the blocks only works correctly if I turn of the file caching, otherwise if i got to the main page first after clearing the cache it will show them on all the pages, but if i go to a different page first after clearing the cache it won't show it on any of them.
this is my config:
thanks again for the help
                  
                  
                ok it halfway works, halfway doesn't. the adding something to only the header works fine, but the removing the blocks only works correctly if I turn of the file caching, otherwise if i got to the main page first after clearing the cache it will show them on all the pages, but if i go to a different page first after clearing the cache it won't show it on any of them.
this is my config:
Welcome to Esselbach Storyteller CMS System 1.8.1 (released on Friday 18th of February 2005 04:20:02 PM)
You are running PHP version 4.3.8 with Turck MMCache and MySQL 4.0.14 with MyISAM tables
thanks again for the help
1 Re: news blocks
                                                
                         herrhitman
                
                OP
   0
From: -
                         
                      
                  From: -
                    news blocks
great, thanks!
                  
                  
                great, thanks!
1 Re: news blocks
                                                
                         Philipp 
                        
                        
From: Austria
                         
                      
                   Administrator
  1342From: Austria
                    news blocks
Originally posted by herrhitman:
Yes, you need to add the following code between TEMPLATE; and ?> to each main_block template
Originally posted by herrhitman:
Yes, open site_header and add after global $insert;
Now you can add $my_line everywhere in the PHP part of the template.
                  
                  
                Originally posted by herrhitman:
Hello, I was wondering if there is a way to get the news blocks to only show on the front page?
Yes, you need to add the following code between TEMPLATE; and ?> to each main_block template
if (!preg_match("/index/i", $_SERVER[PHP_SELF])) $EST_TEMPLATE = "";
Originally posted by herrhitman:
Also is there a way to add something to the site_header that only shows when not on the front page?
Yes, open site_header and add after global $insert;
if (preg_match("/index/i", $_SERVER[PHP_SELF]))
{
$my_line = "This is an example text line"; // replace this with your own text
}
Now you can add $my_line everywhere in the PHP part of the template.
              
          
Hello, I was wondering if there is a way to get the news blocks to only show on the front page? Also is there a way to add something to the site_header that only shows when not on the front page?
Thank you much.