Help with News 2.0

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
iNSiPiD

Re: Help with News 2.0

Post by iNSiPiD »

Thanks Wishy!

I don't know why I don't have any. My login screen is still missing the CMSMS logo despite me having uploaded .10 again. I hate the idea that I've somehow got a corrupt installation. Damn FTP.
iNSiPiD

Re: Help with News 2.0

Post by iNSiPiD »

My News/Templates folder contains the following files:

articlelist.tpl
articleprint.tpl
categorylist.tpl
editarticle.tpl
editcategory.tpl
rssfeed.tpl

I've pasted the two you provided from the previous page into new documents and save them as summary.tpl and detail.tpl. Do I just link to these using the summarytemplate and detailtemplate params for the module?

Does this mean I can have a many different templates for ech type of layout?

So what are the Summary Template and Detail Template tabs for in the News Interface?

Has anyone who's managed to get this working posted (or interested in posting) a brief HOWTO? ...please? I'll be your best friend.
Alex_Leipzig

Re: Help with News 2.0

Post by Alex_Leipzig »

iNSiPiD wrote: I'll be your best friend.
Well, that's what I call motivation...!

My small News-How-To:

1. Go to Content/News
2. Make some news entries (mind the mandatory fields)
3. Create the page that is to display the news items
4. Go to the module overview and open the News module help
5. Assemble the {cms_module ...} tag according to your needs
6. Paste the entire tag to your news page
7. Open the page - it should work now!
8. To modify the look of your news page, edit the summary template
9. If you only display title and summary with a "more" link on the news page, clicking on the items will lead you to the detail page of the item. That's where the detail template comes in...
10. The other templates in the News directory are pretty much self-explanatory, I think. If not, post again.

I personally experienced nothing but errors on my installation, when I tried to make the XML button show up. So I just integrated the RSS feed in the meta tags of my templates.
Good luck!
iNSiPiD

Re: Help with News 2.0

Post by iNSiPiD »

:) Thanks, Alex. I'll give it a shot.

Wishy seems to think my template folder was incomplete and the Summary and Detail fields in the News Interface were empty.

So you are saying that if I want various Summary and Detail looks that I should link to the required templates and NOT use the fields in the interface?
Alex_Leipzig

Re: Help with News 2.0

Post by Alex_Leipzig »

iNSiPiD wrote:So you are saying that if I want various Summary and Detail looks that I should link to the required templates and NOT use the fields in the interface?
What I meant just related to telling the browser that there's a feed - I don't use the default XML button because of the errors, but I put the standard reference to my feed in the template head.
iNSiPiD

Re: Help with News 2.0

Post by iNSiPiD »

Ah, OK.

I notice that .10 automatically inlcudes a REL link.



But i have no idea what this does or how to affect it. And I was SO adept at using the old module. :...[
iNSiPiD

Re: Help with News 2.0

Post by iNSiPiD »

I'm now convinced that I am just a very blunt tool. The only thing I can produce after much stuffing around is the following error:

Warning: Smarty error: unable to read resource: "template:displaysummary" in /hsphere/local/home/ashminc/ashm.org.au/lib/smarty/Smarty.class.php on line 1088

I'm going nuts here. Can someone please tell me what I'm doing wrong.

1. I have created news items and various categories.
2. I have created a page called 'news'.
3. Inlcuded on that page is the following:

General
{cms_module module="news" category="General" dateformat="D, j M Y" summarytemplate="summary.tpl" detailtemplate="detail.tpl"}

I've tried with and without the summary and detailtemplate parameters and just end up with:

Warning: Smarty error: unable to read resource: "template:displaysummary" in /hsphere/local/home/ashminc/ashm.org.au/lib/smarty/Smarty.class.php on line 1088

What in Jed's name am I doing wrong here?

Is the parameter list in the Help screen complete? It no longer contains dateformat or swaptitle. I guess the templates make the latter redundant, yes?

I still have no idea what the Summary Template and Detail Template tabs are for in the News Interface admin screen. I've even tried pasting the supplied template code by wishy into them and still nothing happens. Where does it go? What do they do??

You've all been great so far.

Let's see if the offer of being your best friend AND giving you 20c is enticing enough to help me out of this one.
Last edited by iNSiPiD on Wed Jul 27, 2005 7:08 am, edited 1 time in total.
Alex_Leipzig

Re: Help with News 2.0

Post by Alex_Leipzig »

{cms_module module="news" category="General" dateformat="D, j M Y" summarytemplate="summary.tpl" detailtemplate="detail.tpl"}
Seems allright, except for the template bits - I don't think they belong in there. You could also try something else: Go to Content and create a new page, then select "news" as content type and edit the parameters and see what it gives you.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Help with News 2.0

Post by Ted »

Open up the page in Firefox or Safari.  That's the auto-discovery for the rss feed.

As far as the templates are concerned, it should be working.  Maybe I didn't explain it properly...

The News module has 2 templates built in.  Display and Summary.  They are saved in the database and are edited via the 2 tabs on the News module interface in the admin.  I also included an option to ues different templates that comes from a file.  These files NEED to be in modules/News/templates, but are not required.  I also think that it won't work if you put the .tpl on the title of it.  That's a smarty thing.

Does it make more sense now?
iNSiPiD

Re: Help with News 2.0

Post by iNSiPiD »

OK. Two things...four actually.

1. Does my page have to be of type News or can it be Content? I've been using COntent because I have several module calls in the same page and also some other text that doesn't come from news items. If I Add New Content and select News, I then fill in the parameters. The Preview button shows the title but no news items. When I View Site and click the new News link I get a 404 error.


2. The fields in the summary and detail tabs in the News interface are empty. I had this same problem with the SIte Preference screen in the Custom 404 field. If I want to access the default template(s) what do I put in my module call - summary="summary"?

3. Do I have to show a category or does this deafult to all?

4. If I remove the .tpl from my summarytemplate or detailtemplate call I wind up with an error saying that it can't read 'summary' or 'detail'. If I remove both calls I am left with this module call. {cms_module module="news" category="General" dateformat="D, j M Y"} It produces no errors but neither does it display any news items (there should be three for this category).
Last edited by iNSiPiD on Mon Aug 01, 2005 12:09 am, edited 1 time in total.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Help with News 2.0

Post by Ted »

1. Content will work fine.

2. The Site Preferences thing was definately a bug.  If saving of the stuff in News isn't working, it's a different situation entirely.  It almost seems like the module didn't upgrade correctly.  There is no "default" template except for the one that should be in the summary and detail tabs of your News module.

3. It defaults to all

4. Start with {cms_module module='news'} and see if you get anything.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Help with News 2.0

Post by Ted »

The upgrade script isn't THAT intelligent.  The database stores a schema version that I increment every time a release has database changes.  I then script ALL the changes at once.

So, to answer your question, if the upgrade failed for some reason and there was no error message (seems a little weird to me), then you would never know if there was a missing table or not.
iNSiPiD

Re: Help with News 2.0

Post by iNSiPiD »

Damn. You're right, Patricia.

The table exists but only contains one row (which I entered myself and which still doesn't appear on the News interface). It has the following structure and data. Is the structure at least correct?

module_name template_name content create_date modified_date
News displaysummary 2005-07-27 06:13:00 2005-07-27 06:13:35


As you can see, 'content' is empty even though I've submitted wishy's earlier template sample to it. Seems we've found the culprit. I'm guessing my plugin/news directory hasn't been uploaded properly. Any other suggestions apart from uploading this first?

Also, wishy, I only referred to summary.tpl because that is the explicit file name (and the same file type as all the other templates in the news/templates directory. Are you saying this is wrong?
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Help with News 2.0

Post by Ted »

Can you run the two insert statements that Patricia pasted?

I'm pretty positive that you drop the .tpl on a template filename, but hopefully it won't matter if we get this other situation worked out.
iNSiPiD

Re: Help with News 2.0

Post by iNSiPiD »

OK. Done. The templates now appear as expected in the interface tabs for summary and detail. Odd how when I pasted one in and submitted that it appeared in the DB but not in the interface. Anyway, that's for another time. What I'm more interested in is how this happened and what else might be corrupt or incomplete.

I then did as you suggested and just put {cms_module module=news} and I get no content in page.

http://d81314.i50.quadrahosting.com.au/ ... ?page=news

I'm still flummoxed at how the default templates work however, does the moretext paramter determine summary status?

My previous news page which relied on the older module worked as follows.

Category-specific summary list on specific pages - e.g general, conference, jobs - which then clicked through to the item on the MAIN news page which listed ALL categories under thir respective headings. It was so sweet.

Please tell me I can do this again...once we get my installation working that is.
Last edited by iNSiPiD on Wed Aug 03, 2005 2:41 am, edited 1 time in total.
Locked

Return to “CMSMS Core”