Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: 2 Interesting Suggestions :D  (Read 2032 times)

Ghassem Tofighi

  • Full Member
  • ***
  • Karma: 9
  • Posts: 104
    • http://ght.ir
2 Interesting Suggestions :D
« on: August 17, 2007, 01:39:51 am »

I use this subject to absorb you to these suggestions!

========================
First :  sNews For Magazine
========================
I suggested this topic but I didn't see mod  ;)
If  we have a issue (like category) we can use sNews for magazines, newspaper, newsletters and...

1) add a table to your database with name issue
id  name date.... (I don't know, do you have a suggestion?)

2)add a field to your article to assign an article to an issue, if null this article doesn't belong to an issue. (default null)

3) add code like new extra content with fields like : issue name , date of release and ... for creating new issue.

4) you can create an issue then assign your article to an issue. (is there any suggest for assigning to multiple issues?)

5) any suggestion for how show issues?

I have no time to write the mod. Then please some one write codes.I hope someone do that. If no I must write it ;) . is it good that I only suggest and I don't write a mod? Do you like I continue ONLY suggesting?

==============================
Second: Last N articles in a desired Category
==============================
I don't know is why sNews has not this function. if there was such feature you could simply write a mod for last N links , last N News of you site , last N articles about IT and ...!
is there such mod?

Thanks to you all for writing them ASAP :D
Logged
Be A Color Pencil For Painting The World !

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
2 Interesting Suggestions :D
« Reply #1 on: August 17, 2007, 02:00:26 am »

Well thanks for your suggestions ght.  Let's consider the possibilities.
1) sNews for Magazine
The Categories function is really just used for... generically speaking... categorizing content. It stores its information in the categories table in the database. You could re-name the function as "function issue" and re-name the table to "issues" table... and re-name all categories table references in queries throughout the snews.php file... and you would have... instead... and issues function. Or... you could create a new issues function with a new issues table by cloning the categories function (and its associated bits and pieces file-wide). But there is a much simpler way... and that is to simply change the language variables from displaying "Categories" so they display "Issues". And you just enter in the issue information as the category title... and it displays as such. You can then organize your content by issue (category). :)

2) Last (n) Articles in a Desired Category (Issue?)
Right now... the latest (n) articles are displayed. I've not tried it but I assume it would be fairly easy to make the script do it in reverse so that the oldest articles are displayed... if that's what you are looking for.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Ghassem Tofighi

  • Full Member
  • ***
  • Karma: 9
  • Posts: 104
    • http://ght.ir
2 Interesting Suggestions :D
« Reply #2 on: August 17, 2007, 03:19:47 am »

Dear Keyrocks

No!

I must use an example :
==================

1) Snews For magazine
==================
issue is different in my mind. you can imagine this situation. you have a magazine that is daily,weekly,monthly, yearly or any order of time.
for example issue 24 of MyMagazine
it has :

a) News section (you have 5 news for this issue and put 5 articles in news CATEGORY in ISSUE 1)
b) sport section (you have 2 article/news/interview for this issue and put 2 articles in sport CATEGORY in ISSUE 1)
and so on.

then you must add a table of your issues. it's completely different as you think about category.

==================
2) Second: Last N articles in a desired Category
==================
last N article in news category for example. you want only show last 5 news of your site.
(only articles in news category !)
for example there is a function like this :  latest(N,'category-name') .
we can add a powerful function that get too many optional parameters and use them. for example when we call latest (N,category) it returns N array of  all things about this latest N article in category, then we can choose between values.
for example I add a new category  with name : links.
when I add a article to this category the Title of article is the link name and the Text of article is address of the link. Now when I call latest (20,links) it returns me (I use this function in index.php) :

$MyRecentLinks=latest (20,'links');
foreach ($MyRecentLinks as $value) {
    echo ''.'$value['title'].'
';
    //$value['text']=url of link , $value['title']=name of link
}
?>

you can write latest function like menu_articles(m,n) (use 'm' parameter in it).

Now Can Somebody write these interesting mods?
Logged
Be A Color Pencil For Painting The World !

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
2 Interesting Suggestions :D
« Reply #3 on: August 17, 2007, 04:36:26 am »

Quote
Now Can Somebody write these interesting mods?
somebody might, if they wish to run their site as a web magazine, or if it is useful for their web site.
Logged
Of all the things I have lost, it is my mind that I miss the most.

Joost

  • Guest
2 Interesting Suggestions :D
« Reply #4 on: August 17, 2007, 01:37:54 pm »

Quote from: Ghassem
1) Snews For magazine
==================
Looks like you want subcategories. Like this:
Category:     Subcategory:           article:

ISSUE 1       News section          5 news
ISSUE 1       sport section           2 article
ISSUE 2       News section          5 news

Quote from: Ghassem
Second: Last N articles in a desired Category
Showing new articles only in the category they belong to. I think I've seen such mod somewhere....
Logged

Rui Mendes

  • Development,Testing, Support
  • Hero Member
  • *****
  • Karma: 195
  • Posts: 1009
  • sNews1.7
    • Comunidade Portuguesa
2 Interesting Suggestions :D
« Reply #5 on: August 17, 2007, 01:45:40 pm »

Hello.

One the first MOd I did for snews 1.6, maybe is are you looking for.

Multiple Areas for categories

This Mod you can have multiple areas, see that post, hope can help you

I'm sorry about screenshoots

My portuguese Website have 3 categories
Logged
Need a Job on Europe. Linkdin - Facebook / Group

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
2 Interesting Suggestions :D
« Reply #6 on: August 17, 2007, 02:51:37 pm »

Not going to tackle these right now ... if ever ;)

IMHO issue mod is better developed as issue mod - then You will have issues (whatever they will do - they will do exactly as needed) and still will have pages as well as categories the same way as before.

As for second one - I have doubts if that's the right approach. Probably, this one would be better off together with another of Your suggestions - custom fields ;) That way, description would still be just that - description, processed/displayed as before, but You could have those links as custom fields.
Logged