Welcome to Geeklog Monday, January 24 2022 @ 05:54 pm EST

Geeklog Forums

I want the blocks on the right displayed everywhere.


Status: offline

Spacehamster

Forum User
Newbie
Registered: 08/07/05
Posts: 9
Location:Netherlands
confused
In the admin I can tell a block on the right to appear everywhere, but in reality it only appears on the "stories" page.

Which file do I need to edit to really make all blocks that I want to appear everywhere to actually appear everywhere?

(If there was a thread about this, please link it because I already spend 2 hours searching for it.) praying it will work

Pretty please with chocolate and whipped cream on top. Can someone help me
---Grtz-------------M1r4-->
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
It depends on how COM_siteFooter is called at the end of each page. In index.php, you'll find:
PHP Formatted Code
$display .= COM_siteFooter (true); // The true value enables right hand blocks.
 

Almost all the other calls in Geeklog are without the "true", so it won't display right blocks.

bye, Dirk
 Quote

Status: offline

Spacehamster

Forum User
Newbie
Registered: 08/07/05
Posts: 9
Location:Netherlands
Yay!! It works!
*worships Dirk*

I could have searched for ages without finding it in that function.
Thanks a lot!!

---Grtz-------------M1r4-->
 Quote

Status: offline

Flernk

Forum User
Chatty
Registered: 31/07/03
Posts: 46
Still having some difficulty with this.

I have changed:

PHP Formatted Code
$display .= COM_siteFooter ();

 


to

PHP Formatted Code
$display .= COM_siteFooter (true);

 


in every instance in every file, but I'm still cooming across some places where my right blocks disappear. One specific example is after a user changes their password. The page that loads is /users.php?mode=profile&uid=2&msg=5

I also lose my right blocks when a system message pops up. Example: When an Adminattempts to create a new user using an email address that already exists, the system message will appear, "The email address provided is already in use for another account." and all the right blocks will be gone. In this case, the file is labeled, simply /user.php

How can I ensure that the blocks never disappear? It's crucial to my site because I'm not using left blocks at all. If my right blocks disappear, even on a single page, my navigation also disappears.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
Quote by Flernk: Still having some difficulty with this.

Sounds like you simply missed a few COM_siteFooter calls. Some files have quite a few of those ...

bye, Dirk
 Quote

Newbie but improve

Anonymous
worried
Is it possibile to make a "general rightblock switch",
will take it to config.php, like :
PHP Formatted Code

$_CONF['gen_rightblock_switch']      = true ;  // If you want every time & everywhere to see it

 

and test this before every COM_siteFooter call, like :
PHP Formatted Code

$rightblock_Switch = ($_CONF['gen_rightblock_switch']  ? "true" : "false");

$display .= COM_siteFooter ($rightblock_Switch)

 

is it a good idea ?
 Quote

Anonymous

Anonymous
Quote by Flernk:

PHP Formatted Code
$display .= COM_siteFooter (true);
 


in every instance in every file, but I'm still cooming across some places where my right blocks disappear. One specific example is after a user changes their password. The page that loads is /users.php?mode=profile&uid=2&msg=5



This makes the right-blocks show on the page I made this change. BUT, on my site I also got the "What's related" and "Story options" blocks showing to the left of my section of right-blocks, making it all look very silly.

Any ideas?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
Quote by Anonymous: BUT, on my site I also got the "What's related" and "Story options" blocks showing to the left of my section of right-blocks, making it all look very silly.

Those two aren't real blocks but actually part of the article template file. Open article/article.thtml and move {whats_related_story_options} (which represents both blocks) or use {whats_related} and {story_options} to have them as individual blocks.

In the Professional theme, those two are below the story text, for example.

bye, Dirk
 Quote

evo

Anonymous
sorry to beat a dead horse here but what about things like the forums? for example this site doesn't display right box' on forum pages.
how would I add that code to enable right blocks on every page? also is there any harm in changing all of the
$display .= COM_siteFooter ();
instances to
$display .= COM_siteFooter (true);
???
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
Quote by evo: sorry to beat a dead horse here but what about things like the forums? for example this site doesn't display right box' on forum pages.

You would have to make the same changes in the forum's code.


Quote by evo: also is there any harm in changing all of the

Nothing I could think of. It only leaves less space for the actual content, especially when your browser window isn't that wide (like mine ...).

bye, Dirk
 Quote

Status: offline

drshakagee

Forum User
Full Member
Registered: 01/10/03
Posts: 231
If you really want the right blocks to be everywhere without editing a million files, you can add this:
PHP Formatted Code

 $rightblock = true;

 


at the beginning of the COM_siteFooter function in lib-common.php.
If you really wanted to do properly you could cut and paste the whole COM_siteFooter function to your theme's function.inc file and change the name of the function to yourthemename__siteFooter then add the rightblock = true thing to the top of it (this method might be only available in cvs, I don't have a non cvs version to look at right now).
Yes I am mental.
 Quote

evo

Anonymous
has anyone added such code to the forum?
 Quote

evo

Anonymous
really I am just wondering where to insert the code.
 Quote

All times are EST. The time is now 05:54 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