Recent Topics

1 Mar 13, 2008 00:02    

My b2evolution Version: Not Entered

Hi,
I searched for awhile and was not able to find anything related to this, so hopefully I am not reposting a question.

I was wondering how to change the message

"Sorry, there is nothing to display..." which file has to be edited? This message is shown when you click on a category that has not posts related to that category. Help would be greatly appreciated!!!! thanks!

2 Mar 13, 2008 00:18

The file depends on your version and your skin. Assuming 240-RC2 and custom skin, try in index.main.php finding

display_if_empty();

and replacing it with

display_if_empty( 'If there were any posts here you would see them' );


I'm pretty sure that'll work. Generally I think of that as the empty blog message, but it might also be what gets shown when a category (or any other filtered criteria) returns no results.

3 Mar 13, 2008 17:04

Wow thanks a lot EdB for your quick response!!!

Unfortunately if you make the change:

display_if_empty( 'If there were any posts here you would see them' );

you get the error:

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in C:\wamp\www\nonstable\b2evolution\blogs\inc\_core\ui\results\_results.class.php on line 1963

I found a work around thou, by just adding to the "Sorry, there is nothing to display..." message.

if(display_if_empty())
{
echo 'More to come in the next 2 weeks...';
}

This works fine for me...

Thanks Again!! Really appreciate it!

4 Mar 13, 2008 17:19

display_if_empty( array( 'msg_empty' => 'urm, we appear to be empty' ) );

¥

5 Mar 13, 2008 17:26

THANKS!!! ¥åßßå

Worked Great!!!

6 Mar 14, 2008 00:38

Wow that's crazy. Old way = MUCH better, but such is life.

Thanks ¥

7 Mar 14, 2008 01:02

New way == MUCH more flexible as it allows for all sorts of unseen future advances ........ confusing as hell when it doesn't come with a manual huh .... guess that's 1 - 0 to the old way :p

¥

8 Sep 06, 2008 17:03

Is there any way to include a call to a skin file in the display_if_empty code? I want to add a long (long) message instead of the 'sorry, nothing to show' bit, and would prefer calling a file...

9 Sep 06, 2008 18:18

<?php
$my_stuff = implode( '', file( dirname(__FILE__).'/my_file_in_skins_sub_dir.php' ) );
display_if_empty( array( 'msg_empty' => $my_stuff ) );
?>

ish

¥

10 Sep 06, 2008 18:54

Hmm... it's giving me this error:

Parse error: syntax error, unexpected T_STRING, expecting ')' in /public_html/skins/myskin/single.main.php on line 54

I'm using 2.4.2 by the way.

11 Sep 07, 2008 09:52

I'm gonna guess that line 54 is <?php in which case remove the <?php and ?> from the above snippet ;)

Also, remeber to change => to the actual charcters =>

¥

12 Sep 07, 2008 11:23

Thanks Yabba, it works now. I tried removing the <?php before but must have missed a character.


Form is loading...