Posted on: 09/14/07 11:23pm
By: johnjr
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
Re: Configuring What's New Block
Posted on: 09/15/07 02:52am
By: Dirk
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
Re: Configuring What's New Block
Posted on: 09/15/07 03:15pm
By: geiss
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[*1] 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[*2] discussing the Multiflex3 theme.
Thx in advance for any help!
Eric
Re: Configuring What's New Block
Posted on: 09/15/07 03:45pm
By: Dirk
Quote by: geissI 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
Re: Configuring What's New Block
Posted on: 09/15/07 06:23pm
By: jmucchiello
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.
Re: Configuring What's New Block
Posted on: 09/15/07 07:56pm
By: geiss
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
Re: Configuring What's New Block
Posted on: 09/15/07 11:30pm
By: jmucchiello
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.
Re: Configuring What's New Block
Posted on: 09/16/07 12:33am
By: geiss
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.
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
Re: Configuring What's New Block
Posted on: 11/17/08 10:04pm
By: Anonymous (Bolling)
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
Re: Configuring What's New Block
Posted on: 11/18/08 01:53am
By: Dirk
Quote by: BollingWhat 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
Re: Configuring What's New Block
Posted on: 11/18/08 09:45pm
By: Anonymous (Bolling)
That was easy. Thanks!