| View previous topic :: View next topic |
| Author |
Message |
Afwas Forum helper
 Joined: 03 Jan 2007 Posts: 3559
    votes: 63
|
Posted: Fri Jan 16, 2009 14:14 Post subject: [Solved] How to suggest another category? |
|
|
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 _________________

Join us at irc://irc.freenode.net#B2evolution
More B2evo goodies at http://www.blog.hemminga.net
Last edited by Afwas on Sat Jan 17, 2009 12:44; edited 1 time in total |
|
| Back to top |
|
 |
sam2kb da ruski mafia
Joined: 02 Dec 2007 Posts: 2927
   votes: 53
|
Posted: Fri Jan 16, 2009 16:11 Post subject: |
|
|
If I understand you right here's what you need.
Edit the following in admin.php
| 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  _________________ Russian b2evolution | Download |
|
| Back to top |
|
 |
Afwas Forum helper
 Joined: 03 Jan 2007 Posts: 3559
    votes: 63
|
Posted: Fri Jan 16, 2009 16:38 Post subject: |
|
|
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 _________________

Join us at irc://irc.freenode.net#B2evolution
More B2evo goodies at http://www.blog.hemminga.net |
|
| Back to top |
|
 |
sam2kb da ruski mafia
Joined: 02 Dec 2007 Posts: 2927
   votes: 53
|
Posted: Fri Jan 16, 2009 16:51 Post subject: |
|
|
I moved it to the Feature requests, it would be great if the last selected category get saved in user settings. _________________ Russian b2evolution | Download |
|
| Back to top |
|
 |
Afwas Forum helper
 Joined: 03 Jan 2007 Posts: 3559
    votes: 63
|
Posted: Fri Jan 16, 2009 16:59 Post subject: |
|
|
| 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 _________________

Join us at irc://irc.freenode.net#B2evolution
More B2evo goodies at http://www.blog.hemminga.net |
|
| Back to top |
|
 |
Afwas Forum helper
 Joined: 03 Jan 2007 Posts: 3559
    votes: 63
|
|
| Back to top |
|
 |
fplanque Core Developer

 Joined: 13 Jun 2003 Posts: 863
   votes: 9
|
|
| Back to top |
|
 |
|