Welcome to Geeklog, Anonymous Thursday, December 26 2024 @ 10:48 am EST

Geeklog Forums

Staticpage titles


Whoosh

Anonymous
I'd like to setup a centerblock without displaying a title about it. Is that possible without having to hack anything, and if so, how?
 Quote

Status: offline

exaurdon

Forum User
Regular Poster
Registered: 08/13/03
Posts: 107
As the plugin exists right now, I think the answer is no, you cannot create a staticpage without a title for use as a centerblock.

Anyone else have any ideas?

This wouldn't be terribly difficult to hack, but it would require modification of the plugin.

Exaurdon~
 Quote

Whoosh

Anonymous
Thanks. I figured as much, but wasn't sure.

Just applied your 1.3.3 fix. Will be trying it out in a minute. Thanks a lot.
 Quote

Whoosh

Anonymous
Well.....

I think you've done it! Great and thanks - this really helps.
 Quote

Status: offline

exaurdon

Forum User
Regular Poster
Registered: 08/13/03
Posts: 107
Ok, I did find a way to do what you are looking for. You can change the 'in_block' option in your staticpages config.php file. This should hide the titlebar, however it will do so for all staticpages.

Alternatively, you could change the lines in functions.inc that read

Text Formatted Code

            if (($_SP_CONF['in_block'] == 1) && !empty ($spresult['sp_title'])) {
                $retval .= COM_startBlock ($spresult['sp_title']);
            }
 

to something like
Text Formatted Code

            if (($_SP_CONF['in_block'] == 1) && !empty ($spresult['sp_title'])) {
                                if($spresult['sp_title'] == 'HIDE ME')
                                        $retval .= COM_startBlock ('');
                                if($spresult['sp_title'] == 'HIDE ME')
                                        $retval .= COM_startBlock ($spresult['sp_title']);
            }
 

I think, that would allow you to set your block title to 'HIDE ME' and it would have an empty title bar. (I think) This would only affect centerblocks...

Of course, that is certainly a hack....

Exaurdon~
 Quote

Whoosh

Anonymous
I'll try this. Thanks!
 Quote

Whoosh

Anonymous
Yup. Very nice. I am really getting to love PHP and Geeklog. Here is the final code I ended up with:

Text Formatted Code
if (($_SP_CONF['in_block'] == 1) && !empty ($spresult['sp_title'])) {
                  if($spresult['sp_title'] == 'none') {
                     $retval .= COM_startBlock ('');
                  } else {
                     $retval .= COM_startBlock ($spresult['sp_title']);
                  }

 


Thanks so much for your help. After so many days of getting nowhere, it is an amazing feeling to finally have learned something!
 Quote

Status: offline

muadmz

Forum User
Chatty
Registered: 03/05/05
Posts: 51
hi guys.. where (dir) can i find that code. I tried looking for a functions.inc but could not find it and also tried seeing if i could find that code in config.php, but no luck. Wink
 Quote

Status: offline

muadmz

Forum User
Chatty
Registered: 03/05/05
Posts: 51
ok nevermind.. found it (plugins/staticpages) Wink thanks anyways Smile
 Quote

ted

Anonymous
there is an option in the staticpage editor to not wrap the staticpage in a block. uncheck that and the title will go with it.
 Quote

All times are EST. The time is now 10:48 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content