Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: [?] Empty categories message  (Read 4031 times)

henrich

  • Sr. Member
  • ****
  • Karma: 23
  • Posts: 381
  • Passion for quality and excellence!
    • My personal blog and portofolio
[?] Empty categories message
« on: February 08, 2008, 09:56:16 am »

If we add a new category, and if the category still has no articles added, then if we click on that empty category we gonna have this message:

Content not found.

This is because of the $title_not_found variable, which is setup from the language variables as l('not_found'). This variable we can leave here, useful for not found article titles, but for empty categories message i suggest the following:

- search in your language variables for:

Code: [Select]
$l['no_articles_in_cat'] = 'There are no articles in this category yet.';
and if you have not added yet this variable, then add it right now  :), same language variable you can find in brauck's (mini) MOD hide empty categories in sitemap (i'm lazy to put a link, search for it if interested:).

- in the function center() find the next line:

Quote
if (!$result_articles || !$numrows_articles) {echo $title_not_found; return;}

and change it to:

Quote
if (!$result_articles || !$numrows_articles) {echo l('no_articles_in_cat'); return;}

So, now if you click on an empty category you will have the next message:

There are no articles in this category yet.

Much better right? :D
« Last Edit: February 08, 2008, 03:11:53 pm by henrich »
Logged
By(e) Henrich :)
------------------------------
IT related blog

Joost

  • Guest
Re: [PATCH] Empty categories message
« Reply #1 on: February 08, 2008, 10:05:59 am »

Much better.
Some might like to change that to Coming soon!!. ;D
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: [PATCH] Empty categories message
« Reply #2 on: February 08, 2008, 02:35:58 pm »

Much better.
Some might like to change that to Coming soon!!. ;D

Yes... come to think of it... Coming soon!! would "fit" better in a narrow vertical menu (categories) section (no text wrap)  :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Re: [PATCH] Empty categories message
« Reply #3 on: February 08, 2008, 02:54:35 pm »

Coming soon!! - ah, well to me this means a totally different thing... Better not elaborate, eh ;)

Would be funnier if the message read something like:

Oups, you erased the database... Script is closing this site in... (and then a countdown thingy), hehe...

(In a bit if a teaser mood today)
« Last Edit: February 08, 2008, 02:56:42 pm by Patric Ahlqvist »
Logged
"It's only dead fish that goes with the flow... "
Updated

henrich

  • Sr. Member
  • ****
  • Karma: 23
  • Posts: 381
  • Passion for quality and excellence!
    • My personal blog and portofolio
Re: [PATCH] Empty categories message
« Reply #4 on: February 08, 2008, 03:06:48 pm »

:) I better into <h3>, because it does not contain any interesting keywords :)
Logged
By(e) Henrich :)
------------------------------
IT related blog

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: [?] Empty categories message
« Reply #5 on: February 08, 2008, 09:22:15 pm »

or, you could hide empty categories from the casual user.
something similar to this: http://snewscms.com/forum/index.php?topic=4533.0
Logged
Of all the things I have lost, it is my mind that I miss the most.

piXelatedEmpire

  • MIA
  • ULTIMATE member
  • ******
  • Karma: 37
  • Posts: 1401
  • currently MIA
Re: [?] Empty categories message
« Reply #6 on: February 12, 2008, 12:39:41 am »

Much better.
Some might like to change that to Coming soon!!. ;D
;D
Logged
my apologies to the sNews crew, but I will be MIA for the forseeable future

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: [?] Empty categories message
« Reply #7 on: February 12, 2008, 02:01:51 am »

Hiding empty categories seems best. Though, if there are no categories yet...?
Then, "coming soon!". ;D :P
Logged