• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: [SOLVED] News Archives by Year/Month
PostPosted: Fri Dec 05, 2008 1:47 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Wed Aug 01, 2007 5:36 pm
Posts: 485
oliverseddon wrote:
Any chance of you re-posting the link to the patch? It seems to be a dead link now and I could really do with having this functionality.


Hi oliverseddon,

after this great forge restying, it seems that all old posts (feature request and bug tracking) were deleted.

Anyway you can check this post.

regards
blast


Top
 Profile  
 
 Post subject: Re: [SOLVED] News Archives by Year/Month
PostPosted: Fri Dec 05, 2008 3:05 pm 
Offline
Forum Members
Forum Members

Joined: Thu Aug 21, 2008 11:47 am
Posts: 70
Thanks for the link, unfortunately I don't understand any of what is being said and can't fathom what I need to change to solve it. Any ideas?



Thanks


Top
 Profile  
 
 Post subject: Re: [SOLVED] News Archives by Year/Month
PostPosted: Fri Dec 05, 2008 6:40 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Wed Aug 01, 2007 5:36 pm
Posts: 485
oliverseddon wrote:
Thanks for the link, unfortunately I don't understand any of what is being said and can't fathom what I need to change to solve it. Any ideas?



Thanks


Sorry oliverseddon for that,

you have to download patch file (news.period.mpg), then rename to .zip and uncompress it.

After that you can apply patch to distribution files.

Hope this helps
regards
blast


Top
 Profile  
 
 Post subject: Re: [SOLVED] News Archives by Year/Month
PostPosted: Fri Dec 05, 2008 7:28 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 6576
Location: Fernie British Columbia, Canada
Please remember this post:
http://forum.cmsmadesimple.org/index.php/topic,28132.0.html

_________________
Follow me on twitter
--
if you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
----------------
Don't make me angry..... you won't like me when I'm angry....


Top
 Profile  
 
 Post subject: Re: [SOLVED] News Archives by Year/Month
PostPosted: Fri Dec 05, 2008 8:01 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Wed Aug 01, 2007 5:36 pm
Posts: 485
calguy1000 wrote:


I've read that post, ...but it seems that you simply ignore previous messages.

I can't still understand why this patch can't be merged in the official module.

The patch is ready from feb 2008. There are less than 10 lines of code, so it's not so difficult to check them and to merge in SVN.

I hope a "sponsor" will need this feature because in that case it will be ready very soon.


Top
 Profile  
 
 Post subject: Re: [SOLVED] News Archives by Year/Month
PostPosted: Sat Dec 06, 2008 4:00 pm 
Offline
Forum Members
Forum Members

Joined: Thu Aug 21, 2008 11:47 am
Posts: 70
Thanks. I've now got the news.period.diff file. How do I run the update? I can't seem to find any details on the process anywhere.



Thanks
Oliver


Top
 Profile  
 
 Post subject: Re: [SOLVED] News Archives by Year/Month
PostPosted: Sun Dec 07, 2008 9:36 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Wed Aug 01, 2007 5:36 pm
Posts: 485
oliverseddon wrote:
Thanks. I've now got the news.period.diff file. How do I run the update? I can't seem to find any details on the process anywhere.



You can proceed in three ways:

- by hand (editing each file listed. A "+" in patch file stands for "add this line", a "-" for delete this line)
- using win program like tortoiseSVN
- using linux "patch" command

regards
blast


Top
 Profile  
 
 Post subject: Re: [SOLVED] News Archives by Year/Month
PostPosted: Mon Dec 08, 2008 1:41 am 
Offline
Forum Members
Forum Members

Joined: Thu Aug 21, 2008 11:47 am
Posts: 70
Thanks for all your help. I have finally managed to get it up and running, I'm on a Mac so tried the patch command in Terminal but it kept giving me errors so I just ended up manually altering the files. I'm running CMS 1.4.1 on the particular site I've been working on and noticed that some of the line numbers that needed altering were slightly different, so I don't know if that was causing the conflict when I was trying to run the Patch command.

Take a look at the result if your interested:

http://www.addmaster.co.uk


Thanks again.

P.S
This is a really beneficial feature, why hasn't it been added to the News module as standard yet?  ???


Top
 Profile  
 
 Post subject: Re: [SOLVED] News Archives by Year/Month
PostPosted: Tue Jan 27, 2009 2:31 pm 
Offline
Power Poster
Power Poster

Joined: Sat Feb 02, 2008 12:42 am
Posts: 424
Location: USA
oliverseddon wrote:
This is a really beneficial feature, why hasn't it been added to the News module as standard yet?  ???


Just want to add my request to have this feature added to the news module.

_________________
Take a penny, leave a penny.


Top
 Profile  
 
 Post subject: Re: [SOLVED] News Archives by Year/Month
PostPosted: Tue Jan 27, 2009 6:00 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Wed Aug 01, 2007 5:36 pm
Posts: 485
Said that I won't start flame...

...I think you should give it up.

Read this signature from our "CMS GURU - 2nd Tier Support" and you can understand why it's impossible to add this feature:

Quote:
...
"I don't ignore everybody.... Just the ones I chose to.
and.. I accept it: I DO have an attitude problem."


Top
 Profile  
 
 Post subject: Re: [SOLVED] News Archives by Year/Month
PostPosted: Wed Jan 28, 2009 1:54 pm 
Offline
Power Poster
Power Poster

Joined: Sat Feb 02, 2008 12:42 am
Posts: 424
Location: USA
Any CMSMS devs out there want to give an estimate of what it would cost to implement this feature as part of the core news module? Maybe I can get a client to sponsor the change.

_________________
Take a penny, leave a penny.


Last edited by Anonymous on Wed Jan 28, 2009 2:10 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: [SOLVED] News Archives by Year/Month
PostPosted: Mon Mar 16, 2009 9:34 pm 
Offline
Forum Members
Forum Members

Joined: Thu Jan 08, 2009 1:28 pm
Posts: 28
calguy1000 wrote:

Your link doesn´t answer why not implement this new function.


Top
 Profile  
 
 Post subject: Re: [SOLVED] News Archives by Year/Month
PostPosted: Tue Mar 24, 2009 9:46 pm 
Offline
Administrator
Administrator
User avatar

Joined: Thu Mar 09, 2006 5:32 am
Posts: 11812
Location: Arizona
If you would like to sponsor(pay for) this addition to the news module I'm sure a quick email or request in the modules forge page could make it happen, if you wonder why calguy hasn't added it yet it may be because atm he is working on paying projects...

_________________
Extensions » Modules/Tags click the name of the module/tag or Help to the right to get its parameters.
Right click and view source is a great way to see what you have to work with.
Check ver. CMSMS, PHP, server OS, in System Information page.
Default content http://multiintech.com/defaultcontent/
People are Wonderful
Business is Great
Life is Terrific
Ever wonder what happened to the Album module? Well it is alive and well.
http://album.multiintech.com/
Image


Top
 Profile  
 
 Post subject: Re: [SOLVED] News Archives by Year/Month
PostPosted: Tue Jul 12, 2011 7:56 am 
Offline
New Member

Joined: Mon Jun 06, 2011 6:25 am
Posts: 4
I was in the need for a archive function as described in this post. With a different approch i got it working without any modifications of the news module.

Insted I use the fact that you can filter what news that are displayed based on post id.

I used the default news summary function to provide the month/year list like this:
Quote:
2010
• November (9)
• December (16)
2011
• January (2)

It is created with the following news summary template:
Code:
<!-- Start Categorylist -->
{foreach from=$cats item=node}
{if $node.count > 0}<a href="/news-archive/?category={$node.news_category_name}">{$node.news_category_name}</a>
{else}<span>{$node.news_category_name}</span>{/if}&nbsp;
{/foreach}
<hr/>
<!-- Start News Archive -->
<ul class="list2">
{assign var="month_count" value=0}
{assign var="post_count" value=0}
{assign var="startpost" value=0}
{foreach from=$items item=entry}
{if $entry->postdate}
  {assign var="post_year" value=$entry->postdate|date_format:"%Y"}
  {assign var="post_month" value=$entry->postdate|date_format:"%m"}
  {if $post_month != $lastpost_month && $lastpost_month}
<li>
<a href="{cms_selflink href='news-archive'}?startpost={$startpost}&numposts={$month_count}&pagetitle={$lastpost_monthname}-{$lastpost_year}">
{$lastpost_monthname}</a> ({$month_count})</li>
    {assign var="month_count" value=1}
    {assign var="startpost" value=$post_count}
  {else}
    {math equation="x + 1" x=$month_count assign="month_count"} 
  {/if}
  {if $post_year != $lastpost_year && $lastpost_year}</ul></li>{/if}
  {if $post_year != $lastpost_year}
    <li>{$post_year}<ul>
  {/if}
  {assign var="lastpost_year" value=$post_year}
  {assign var="lastpost_month" value=$post_month}
  {assign var="lastpost_monthname" value=$entry->postdate|date_format:"%B"}
  {math equation="x + 1" x=$post_count assign="post_count"}
{/if}
{/foreach}
<li>
<a href="{cms_selflink href='news-archive'}?startpost={$startpost}&numposts={$month_count}&pagetitle={$lastpost_monthname}-{$lastpost_year}">
{$lastpost_monthname}</a> ({$month_count})</li>
</ul></li></ul>
<!-- End News Archive -->

To display the correct news it is requred to have a page with alias news-archive . In this page, disable WYSIWYG and paste the folowing code:
Code:
{news_archive_setup}
<h1>{$pagetitle}</h1>
{if $category}{news category=$category}
{else}{news start=$startpost pagelimit=$numposts}
{/if}

And finaly add a UDT called news_archive_setup:
Code:
global $gCms;
global $smarty;

if (isset($_GET['category']) || $_GET['category'] != "") {
$category=$_GET['category'];
$smarty->assign('category', $category);
}
if (!isset($_GET['startpost']) || $_GET['startpost'] == "") {
$startpost=0;
} else {
$startpost=$_GET['startpost'];
}
if (!isset($_GET['numposts']) || $_GET['numposts'] == "") {
$numposts=20;
} else {
$numposts=$_GET['numposts'];
}
if (isset($_GET['pagetitle']) || $_GET['pagetitle'] != "") {
$pagetitle= htmlentities("Newsarchive - ".$_GET['pagetitle']);
} elseif (isset($_GET['category']) || $_GET['category'] != "") {
$pagetitle= htmlentities("Newsarchive - ".$_GET['category']);
} else {
$pagetitle="Newsarchive";
}

$smarty->assign('startpost', $startpost);
$smarty->assign('numposts', $numposts);
$smarty->assign('pagetitle', $pagetitle);


Top
 Profile  
 
 Post subject: Re: [SOLVED] News Archives by Year/Month
PostPosted: Wed Aug 03, 2011 8:37 pm 
Offline
New Member

Joined: Tue Jun 21, 2011 8:51 pm
Posts: 8
Quote:
I was in the need for a archive function as described in this post. With a different approch i got it working without any modifications of the news module.


I just tried this, and it doesn't work (for me at least). It produces a nice, populated list of links, but they don't point to the stories. They point to new pages with more lists on them, and the links in those lists don't point anywhere.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Arvixe - A CMSMS Partner