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
I would like to add blocks of my choice to that side. How can I do this?
Tks in advance
13
15
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:
// (= 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
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
15
20
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?
How do I disable the story blocks? or have the story blocks inside of the right blocks?
13
14
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.
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.
16
22
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,
$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?
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?
15
19
Quote
mach
Anonymous
dude, don't delete anything from article.php, just edit the template file as i mentioned above.
19
15
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
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
14
13
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:
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?
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?
14
20
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?
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
17
18
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?
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?
11
15
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