>>
Site Map
>>
Forums
>>
Blocks
Forum module - topics in forum:
Blocks - Having problems with a block? Code doesn't work, get help here.
Can i have blocks eitherside fixed even whilst in forum?
Hi all,
I want to keep my left & right blocks fixed, so whatever pages my members go on, the blocks just stay where they are. Even if im in the forum i want to have the blocks on the right & left stay..
is it possible to do this please?
using nuke 8.1 all currently up to date..
I have blocks currently visible on the right "if (defined('INDEX_FILE')) { "whilst in news downloads & links but other pages i lose them and have to keep going back to check shoutbox etc
purchased installed nuke 8.1 & have all updates installed
using theme DD Z3
thanks
stuart
still cant manage to get my blocks left & right to appear whilst in forum..
anyone? plz?
The call to blocks is
So for the forums you would need to insert both blocks() functions
in the file root/themes/Z3/Forums/forum_header.tpl
You may need to play around with it a little. Lets say you do that and it doesn't appear right, you can try just the blocks left in the forum_header.tpl and than insert the blocks right in overall_footer.tpl or simple_footer.tpl
Let me know if you have any problems I can go ahead and try it on my site.
Hi Horror,,,
so just paste
at the top of forum_header.tpl
root/themes/Z3/Forums/forum_header.tpl
above here
| Code: : |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{S_CONTENT_DIRECTION}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}">
<meta http-equiv="Content-Style-Type" content="text/css">
|
Sorry the above code is old and was ment to be used in the "theme.php" file not the "forum_header.tpl" Here is the correct and easiest way of doing it.
Simply open modules/forums/index.php and find:
| Code: : |
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx); |
after it add:
| Code: : |
| define('INDEX_FILE', true); |
so it looks like:
| Code: : |
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
define('INDEX_FILE', true); |
No offense intended
It's cool, but...
This makes blocks appear in the forums for a specific theme?
eg. One theme has left blocks, one does not, so what would that code do if a theme already has left blocks?
my Z3 theme already (after editing) has left & right blocks but they dont show whilst in the Forum which i really wanted..
This is a very general and simple fix that is for every theme in your site. But here's the deal. If the theme already displays them.. we have a theme that isn't written to standard. We can always work around this however.
Okay, thats understandable...
So basically it overrides the function
| Code: : |
if (($name=='Forums') {
} else {
blocks(left);
}
|
for the theme that IS standard?
Correct me if I'm wrong, I just found this here:
http://nukecode.com/modules.php?name=PHP-Nuke_HOWTO&page=hide-left-blocks.html
Thanks
Ok that code you are showing is telling the theme not to display the left side blocks in the forums. Which is the opposite of what we are trying to accomplish.
If the theme is correctly written the additional code we added to the forums/index.php file will not matter. The themes calls will simply be ignored.
Now, if you also need to display the left side blocks. Open theme.php of the offending theme and in the function themeheader add
Also make sure you change:
| Code: : |
| if ($index == 1) { |
to
| Code: : |
| if (defined('INDEX_FILE')) { |
If you are using any patch level higher then x.x.0.3.1
I tried that and it didn't work for this theme.
And if you change
| Code: : |
if (($name=='Forums') OR ($name=='Private_Messages') OR ($name=='Members_List') OR ($name=='Immortel') OR ($name=='Your_Account') OR ($name=='Interfaces') OR ($name=='Videos') OR ($name=='WarOfTheWorlds') OR ($name=='TaKen') OR ($name=='Serenity')) {
} else {
blocks(left);
} |
TO
It only enables the left blocks.
The code above is for the theme he's using, Z3, from the theme.php file.
But the
| Code: : |
| define('INDEX_FILE', true); |
didn't have any affect after adding it to modules/forums/index.php
as you stated, I was writing this as you were posting, forgive me.
So what do we do for the right side blocks?
| NukeCode Wrote: : |
Now, if you also need to display the left side blocks. Open theme.php of the offending theme and in the function themeheader add
Also make sure you change:
| Code: : | | if ($index == 1) { |
to
| Code: : | | if (defined('INDEX_FILE')) { |
If you are using any patch level higher then x.x.0.3.1 |
Hi, thanks for your help..
I have edited | Code: : |
| if ($index == 1) { |
to
| Code: : |
| if (defined('INDEX_FILE')) { |
which is giving me right side blocks on pages links & downloads..
But but no blocks left or right whilst in forum..
im using nuke 8.1 upgraded to 2.0.23
| NukeCode Wrote: : |
Sorry the above code is old and was ment to be used in the "theme.php" file not the "forum_header.tpl" Here is the correct and easiest way of doing it.
Simply open modules/forums/index.php and find:
| Code: : | include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx); |
after it add:
| Code: : | | define('INDEX_FILE', true); |
so it looks like:
| Code: : | include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
define('INDEX_FILE', true); |
No offense intended |
should i follow above quoted post?
sorry total noob here
| Code: : |
And if you change
Code: ‹ Select › ‹ Expand ›
if (($name=='Forums') OR ($name=='Private_Messages') OR ($name=='Members_List') OR ($name=='Immortel') OR ($name=='Your_Account') OR ($name=='Interfaces') OR ($name=='Videos') OR ($name=='WarOfTheWorlds') OR ($name=='TaKen') OR ($name=='Serenity')) {
} else {
blocks(left);
}
TO
Code: ‹ Select ›
blocks(left);
It only enables the left blocks. |
Do that for the forums.
That makes the left blocks visible.
I think it would be as simple as adding the same
for the right blocks if you want them.