News Archives by Year/Month ( Tamplate + UDTs )

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
nicmare
Power Poster
Power Poster
Posts: 1150
Joined: Sat Aug 25, 2007 9:55 am
Location: Berlin

Re: News Archives by Year/Month ( Tamplate + UDTs )

Post by nicmare »

you may want to check out cgblog. it has better built in archiving functions
allan1412
Forum Members
Forum Members
Posts: 24
Joined: Wed May 21, 2008 9:14 pm

Re: News Archives by Year/Month ( Tamplate + UDTs )

Post by allan1412 »

Thanks - I use CGBlog a lot.
It's just that this is an existing site with many news articles already in place and I wanted to avoid moving them into a another module if possible.
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am
Location: The Netherlands

Re: News Archives by Year/Month ( Tamplate + UDTs )

Post by Gregor »

I'm struggling to get the year/month feature into cgblog too. I got it all working in News, however since I moved all News items to CGBlog, this feature no longer works. I would be very happy if someone can help me out on this one.

Gregor
nervino
Power Poster
Power Poster
Posts: 448
Joined: Sun Dec 28, 2008 12:15 pm
Location: Roma, Italy

Re: News Archives by Year/Month ( Tamplate + UDTs )

Post by nervino »

Hi, using cmsms 1.10.1 I've got this error, in the content page where I put Peciura's template (there is only the template in that page and no other content):

Code: Select all

string(110) "Smarty error: [in content:content_en line 57]: [plugin] unknown tag - 'News' (core.load_plugins.php, line 198)" string(122) "Smarty error: [in content:content_en line 57]: syntax error: unrecognized tag 'News' (Smarty_Compiler.class.php, line 590)" [url]<a href="http://www.mysite.com/news.html%26news_date%3D2011">2011</a>[/url]
If I click the year 2011 link, I got:

Code: Select all

Not Found

The requested URL /news.html&news_date=2011 was not found on this server.
Any ideas how to solve this issue?

Below my system info:

----------------------------------------------

Cms Version: 1.10.1

Installed Modules:

CMSMailer: 2.0.2
FileManager: 1.2.0
MenuManager: 1.7.7
ModuleManager: 1.5.1
News: 2.12.3
Printing: 1.1.2
Search: 1.7
ThemeManager: 1.1.4
TinyMCE: 2.8.4
CMSPrinting: 1.0
MicroTiny: 1.1.1
FormBuilder: 0.7.1
CGSimpleSmarty: 1.4.10


Config Information:

php_memory_limit:
process_whole_template: false
output_compression: false
max_upload_size: 32000000
default_upload_permission: 664
url_rewriting: mod_rewrite
page_extension: .html
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale: it_IT.UTF-8
default_encoding: utf-8
admin_encoding: utf-8
set_names: true


Php Information:

phpversion: 5.3.2-1ubuntu4.2
md5_function: On (Vero)
gd_version: 2
tempnam_function: On (Vero)
magic_quotes_runtime: Off (Falso)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 128M
max_execution_time: 60
output_buffering: 4096
safe_mode: Off (Falso)
file_uploads: On (Vero)
post_max_size: 32M
upload_max_filesize: 32M
session_save_path: /var/lib/php5 (1733)
session_use_cookies: On (Vero)
xml_function: On (Vero)


Server Information:

Server Api: apache2handler
Server Db Type: MySQL (mysqli)
Server Db Version: 5.1.41


----------------------------------------------
nervino
Power Poster
Power Poster
Posts: 448
Joined: Sun Dec 28, 2008 12:15 pm
Location: Roma, Italy

Re: News Archives by Year/Month ( Tamplate + UDTs )

Post by nervino »

The first error: "unrecognized tag 'News'" is due to a case-sensitive call of the module, and can be solved correcting the template from:

Code: Select all

{News action='detail' detailtemplate='summary' articleid=$articleid}
to:

Code: Select all

{news action='detail' detailtemplate='summary' articleid=$articleid}
404 error, following the "year" link still remain unsolved..
joecannes
Forum Members
Forum Members
Posts: 93
Joined: Mon Nov 26, 2007 5:00 pm
Location: Montreal, Quebec

Re: News Archives by Year/Month ( Tamplate + UDTs )

Post by joecannes »

Hi,

I've set this up, and it works fine, but I have a question. I want to show only archived items.

I changed:

Code: Select all

{news action='detail'  articleid=$articleid sortby='news_date'}
to

Code: Select all

{news action='detail'  articleid=$articleid showarchive='1' s ortby='news_date'}
(by adding showarchive='1' )

to pick up only archived items, but it does not work, I am still seeing published articles.

Is there anything I can do to have this functioning?

Thanks,

JC

p.s. I am using CMS 1.8.2
Jos
Support Guru
Support Guru
Posts: 4017
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: News Archives by Year/Month ( Tamplate + UDTs )

Post by Jos »

It doesn't make sense to me to use parameter action="detail" in relation to both the showarchive and the sortby parameter.
(optional) action
"detail" - to display a specified articleid in detail mode.
joecannes wrote:p.s. I am using CMS 1.8.2
Time to upgrade ;)
zaidcrowe
Forum Members
Forum Members
Posts: 109
Joined: Wed Jun 10, 2009 3:43 pm

Re: News Archives by Year/Month ( Tamplate + UDTs )

Post by zaidcrowe »

any one got this working with 1.11.4 - it wont actually allow me to even submit the template...?
Locked

Return to “Tips and Tricks”