Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 10:57 pm EST

Geeklog Forums

How to add right blocks on full story pages?


Status: offline

muadmz

Forum User
Chatty
Registered: 03/05/05
Posts: 51
Could you tell me how to add right blocks to the story pages? Currently when I go into vew story, all the left blocks are still there, but on the right side.. there are only two blocks (What's Related & Story Options). After this, there is a very long empty space on the right side.

I would like to add blocks of my choice to that side. How can I do this?


Tks in advance Wink
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
There's an option in config.php to always display the right blocks:
Text Formatted Code
// Set the default whether to display the right-side blocks (= true) or not
// (= false). In the default configuration, Geeklog will only display the
// right-side blocks on the index page. Please note that setting this to true
// will reduce the amount of space available for the actual page content,
// especially for users with narrow browser windows.
// May require theme changes in article/article.thtml (depending on the theme
// used) to avoid the What's Related and Story Options "blocks" showing up in
// an extra (fourth) column.
$_CONF['show_right_blocks'] = false;
 

bye, Dirk
 Quote

Status: offline

muadmz

Forum User
Chatty
Registered: 03/05/05
Posts: 51
Hi. Im not able to find
$_CONF['show_right_blocks'] = false;
in the config.php or anything else that gives me the option of the right blocks. I have looked through it thoroughly.

Maybe its in another file?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Which Geeklog version are you on? This was only introduced in Geeklog 1.4.0.

bye, Dirk
 Quote

Status: offline

muadmz

Forum User
Chatty
Registered: 03/05/05
Posts: 51
Im using Geeklog 1.3
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
What you can do: In article.php, find the second occurrence of COM_siteFooter and change it like this:
Text Formatted Code
$display .= COM_siteFooter (true);
 

i.e. add the "true".

bye, Dirk
 Quote

Status: offline

muadmz

Forum User
Chatty
Registered: 03/05/05
Posts: 51
ok that works, but the problem now is that there are two blocks side by side on the right side of the page. One is all the normal blocks that we find on main page. The other one is the 'What's Related' and 'Story Options' of the story blocks.

How do I disable the story blocks? or have the story blocks inside of the right blocks?

 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
The story blocks aren't "right blocks" per se. You'll have to edit your template file (layout/yourtheme/article/article.thtml) and remove the template variable, {whats_related_story_options}. You might want to remove its container as well.
btw, the variable is offered a couple of different ways so you might find {story_options} as well as {what_related}, etc. ..something like that.
 Quote

Status: offline

muadmz

Forum User
Chatty
Registered: 03/05/05
Posts: 51
hhmm ok i deleted this whole section from the article.php file,

Text Formatted Code

            $related = STORY_whatsRelated ($A['related'], $A['uid'], $A['tid']);
            if (!empty ($related)) {
                $related = COM_startBlock ($LANG11[1], '',
                    COM_getBlockTemplate ('whats_related_block', 'header'))
                    . $related
                    . COM_endBlock (COM_getBlockTemplate ('whats_related_block',
                        'footer'));
            }
            if (count ($story_options) > 0) {
                $optionsblock = COM_startBlock ($LANG11[4], '',
                        COM_getBlockTemplate ('story_options_block', 'header'))
                    . COM_makeList ($story_options, 'list-story-options')
                    . COM_endBlock (COM_getBlockTemplate ('story_options_block',
                        'footer'));
            } else {
                $optionsblock = '';
            }
            $story_template->set_var ('', $related);
            $story_template->set_var ('', $optionsblock);
            $story_template->set_var ('',
                    $related . $optionsblock);
 

but nothing happened cause i still see the two right blocks.

I dont get it? Shouldnt it be gone?
 Quote

mach

Anonymous
dude, don't delete anything from article.php, just edit the template file as i mentioned above.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
As Machinari said: Don't edit the PHP code, change the template file.

Have a look at the professional theme's article.thtml file and how it uses {whats_related} and {story_options} to display those two blocks below the story text.

bye, Dirk
 Quote

Status: offline

muadmz

Forum User
Chatty
Registered: 03/05/05
Posts: 51
ok sorry my mistake, yes the two story blocks is out of the way now.

After that I went to the article.php and did as dirk stated above on the:
$display .= COM_siteFooter (true);


But now the right blocks doesnt show at all and there is just a empty space on the right side.
I would like to put a right block/s of my choice there, so that for all articles, I have different blocks from the ones that are on the main page and topics.

How would I be able to do that?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by muadmz: But now the right blocks doesnt show at all and there is just a empty space on the right side.

Do you have any blocks to display there?


Quote by muadmz: I would like to put a right block/s of my choice there, so that for all articles, I have different blocks from the ones that are on the main page and topics.

How would I be able to do that?

I'm afraid that would require writing some PHP code. Currently, only blocks set to display for "Topic: all" will show up on the article page.

bye, Dirk
 Quote

Status: offline

muadmz

Forum User
Chatty
Registered: 03/05/05
Posts: 51
Well right now there is no blocks showing, however there is an empty space there. (Meaning the blocks are gone, but it has left behind a white area of empty space).

If im not able to put a block of my own choice, can I take the empty space off so that there will be no right blocks on stories for now?

 Quote

All times are EST. The time is now 10:57 pm.

  • 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