Recent Topics

[Solved] How to suggest another category?

Started by on Jan 16, 2009 – Contents updated: Jan 16, 2009

Jan 16, 2009 20:14    

My b2evolution Version: Not Entered

In my blog the standard category is not the one I want. How can I default to another one?

Thanks

Jan 16, 2009 22:11

If I understand you right here's what you need.
Edit the following in admin.php

/*
 * Asynchronous processing options that may be required on any page
 */
require_once $inc_path.'_async.inc.php';

if( param( 'post_category', 'integer' ) == NULL ) set_param( 'post_category', 4 );
if( param( 'post_extracats', 'array' ) == NULL ) set_param( 'post_extracats', array(2,4,7) );

I tested it for a couple minutes so don't rely on it ;)

Jan 16, 2009 22:38

Great sam2kb,

The first line does what I want. It feels a bit trick though. For a second blog in the same install I might not want to default to #15 and #15 may not even exist in that blog.

Thanks anyway. If I find anything suspicious I'll report back to this topic.

--F

Jan 16, 2009 22:51

I moved it to the Feature requests, it would be great if the last selected category get saved in user settings.

Jan 16, 2009 22:59

sam2kb wrote:

[... I]t would be great if the last selected category get saved in user settings.

I was looking at just that ;)
To be saved in BlogCache I suppose and make that Category (int) plus SubCats (array)

--F

Jan 29, 2009 01:04

You can preset a default category for each blog in b2evolution 3.0.1


Form is loading...

Advanced CMS – This forum is powered by b2evolution CMS, a complete engine for your website.