Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 08:06 am EST

Geeklog Forums

Configuring What's New Block


Status: offline

johnjr

Forum User
Chatty
Registered: 02/08/04
Posts: 68
Is there any way to 'configure' the What's New block, so that I can choose what 'sections' are displayed and what are not displayed? For example, I would rather not have "Links" or "Trackbacks" displayed, but I don't see any way to prevent those 'sections' from being displayed in the What's New block....

John
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Text Formatted Code
// Set to 1 to hide a section from the What's New block:
$_CONF['hidenewstories']    = 0;
$_CONF['hidenewcomments']   = 0;
$_CONF['hidenewtrackbacks'] = 0;
$_CONF['hidenewplugins']    = 0;

Also check the plugin config files for similar options.

bye, Dirk
 Quote

Status: offline

geiss

Forum User
Full Member
Registered: 02/10/04
Posts: 176
Location:Boise, Idaho
Dirk,

Following up on this, I am wondering what CSS property controls the "No new stories" or "No new comments" text line in the What's New block. I am working on a new theme port and am wondering where to look so I can set the margin and padding correctly (since the block seems to be generated by GL, as I don't see any .thtml file associated with that block in particular).

There is also this forum thread discussing the Multiflex3 theme.

Thx in advance for any help! Big Grin

Eric
Synergy - Stability - Style --- Visit us at glfusion.org
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: geiss

I am wondering what CSS property controls the "No new stories" or "No new comments" text line in the What's New block.


I'm afraid it doesn't use any special markup. It's just a piece of text followed by a <br> - it's not even a paragraph or wrapped in a div or span. So it may be hard to style ...

bye, Dirk
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
You could change the $LANG value in the theme.

This is what Dirk was referring to:
Text Formatted Code
            $retval .= $LANG01[115] . '<br>' . LB;
Is all you get for 'No new trackback comments'.

In the theme's functions.php you could do something like this to make if possible to modify the way the text looks:
Text Formatted Code
   $LANG01[115] = "<span class=\"whatnew_notrack\">{$LANG01[115]}</span>";
// or even
   $LANG01[115] = "<img src=\"{$_CONF['site_url']}/layout/theme/images/notrackbacks.png\">";
 
Though I fear you might go mad with the number of pieces of text you might try to change in this manner.

And you can't get rid of the <BR> without modifying the code.
 Quote

Status: offline

geiss

Forum User
Full Member
Registered: 02/10/04
Posts: 176
Location:Boise, Idaho
jmuchiello,

I tried what you suggested but it did not have any effect. Here is what I have in my theme's functions.php file:

Text Formatted Code

//Hack to make "No new ..." have proper padding in the What's New block. Credit goes to jmucchiello
//on the geeklog.net forums
$LANG01[100] = "<span class=\"whatsnew_nonew\">{$LANG01[100]}</span>";  //No new stories
$LANG01[86] = "<span class=\"whatsnew_nonew\">{$LANG01[86]}</span>";  //No new comments
$LANG01[115] = "<span class=\"whatsnew_nonew\">{$LANG01[115]}</span>";  //No new trackback comments
$LANG_LINKS[88] = "<span class=\"whatsnew_nonew\">{$LANG_LINKS[88]}</span>";  //No recent new links
$LANG_MG00[no_new_items] = "<span class=\"whatsnew_nonew\">{$LANG_MG00[no_new_items]}</span>";  //No new media gallery items
$LANG_MG00[no_comments] = "<span class=\"whatsnew_nonew\">{$LANG_MG00[no_comments]}</span>";  //No new comments
 


and in my style.css file:

Text Formatted Code

/*below is set in conjunction with functions.php
to allow styling of geeklog generated text with
no options for formatting otherwise*/
.whatsnew_nonew {
padding-left:20px;
}
 


Am I doing something wrong? This method would be ideal to fix the little issues here and there.

Thx!

Eric
Synergy - Stability - Style --- Visit us at glfusion.org
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
Oh, I see. The theme file is loaded before the language file so this won't work.

You could move that into a function and require a small lib-custom.php modification to install the theme:
Text Formatted Code
if (function_exists($_CONF['theme'].'_finish_init')) {
    $func = $_CONF['theme'].'_finish_init';
    $func();
}

Do it that way so all your themes can benefit from the code.

Just remember to list all those $LANGxx arrays as global in the function.
 Quote

Status: offline

geiss

Forum User
Full Member
Registered: 02/10/04
Posts: 176
Location:Boise, Idaho
Hmmmm.

Well, as a general rule, I want to keep everything self-contained within the theme directory. So I probably won't go the lib-custom route. But I appreciate the suggestions none the less. Big Grin If anyone is that worried about how the What's New block looks, I will point them back to this forum thread, and they can make the change.

Thx!

Eric
Synergy - Stability - Style --- Visit us at glfusion.org
 Quote

Bolling

Anonymous
Total newbie question


/ Set to 1 to hide a section from the What's New block:
$_CONF['hidenewstories'] = 0;
$_CONF['hidenewcomments'] = 0;
$_CONF['hidenewtrackbacks'] = 0;
$_CONF['hidenewplugins'] = 0;


What file is this in?

Thx
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: Bolling

What file is this in?


Originally, config.php. As of Geeklog 1.5.0, that file has been removed and all the options are now available from the Configuration admin panel:

Configuration > Geeklog > Blocks > What's New Block

bye, Dirk
 Quote

Bolling

Anonymous
That was easy. Thanks!
 Quote

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