There nothing such ugly than displaying a title on a page with no content below, so I made a quick patch that allow site admin to hide tables titles which does not have content in user's favorites nodes page.

Example, if a user has no favorite page, his page will show:

Favorites Pages for User
Favorites Story for User
story 1..
story 2..

In this case, "favorites Pages" is useless.

Here is the patch, which allow site admin to keep default behavior.

Comments

kbahey’s picture

Version: 5.x-1.3 » 5.x-1.x-dev
Status: Needs review » Fixed

Have you tested this?

+  $form[$set][FAVORITE_NODES_LIST_DISPLAY_EMPTY_TITLES] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Display empty tables in user favorite listing ?'),
+    '#default_value' => variable_get(FAVORITE_NODES_VIEW_IN_PROFILE, 1),
+    '#description' => t('If you select this option, all content type which are configured below will be listed on user favorites table view, even if user favorite list for this content type is empty.'),
+  );

Are you sure you want to use this here? variable_get(FAVORITE_NODES_VIEW_IN_PROFILE, 1),

Anyway, I fixed it and made a few changes, and committed it to the -dev version for both D6 and D5.

So, wait for 24 hours, then download the -dev release and test, after you do a disable and uninstall.

Report back if there are issues.

pounard’s picture

I tested this because I use it. This is a bad typo error, sorry :)
Maybe I forgot a test case before sending the patch!

Anyway, thanks a lot!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.