2 sam2kb Feb 13, 2008 09:01

you *might* be able to add your code to conf/_hacks.php ( just create the file and it's auto included ..... just not sure if it's included at the right point )
¥
Doesn't work when I put this in _hacks.php
if ($cat_ID == 1) $posts = 4;
Do you think this is the right code, but included in the wrong place?
try $cat
¥
No luck. The simple $posts = 1; doesn't work in _hacks.php
ok, that means that _hacks.php is called to late ... unfortunately /conf/_config_TEST.php is called to early so you're probably limited to hacking /inc/_blog_main.inc.php
¥
I put the code between functions and get
Undefined variable: cat_ID
global $cat_ID
No more errors, but still doesn't work.
¥åßßå wrote:
try $cat
¥
Nothing.
Maybe I must put it inside a function.
Thank you guys for help, but I can't get it done.
I believe it would be great to have this option in features list.
Just imagine you have 2 categories News and Products.
All posts in News are short (like a couple sentences and a link to the new product)
All posts in products are ten times longer (have full description, pictures and docs)
How many posts per page would you set in backoffice in this way? ;)
I'd use multiblogs and post the long stuff in a blog that only gets one post displayed and the short stuff in a blog that gets many posts displayed.
I mean, if I wanted to do something like that I'd use multiblogs for it ;)
This is what I'm gonna do if there is no other way :(
inc/_blog_main.inc.php approx 442 :
// Trigger plugin event:
// fp> TODO: please doc with example of what this can be used for
$Plugins->trigger_event( 'BeforeBlogDisplay', array('skin'=>$skin) );
switch( $cat )
{
case 1:
$posts = 1;
break;
case 2:
$posts = 10;
break;
}
¥
Perfect!!!
We just need to add global $cat; for pages and msg form.
Thank you!
no problem ;)
¥
I put this in blog1.php and it works fine, but not for 'extra path' urls .
We should better check the cat_ID, but it doesn't work like this
Any ideas?