<! duplicating news module

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
mikemcvey
Forum Members
Forum Members
Posts: 61
Joined: Tue May 02, 2006 4:08 am

<! duplicating news module

Post by mikemcvey »

Just a query as to how much work it would take to duplicate this module...

So instead of 2 categorys [ news, recentevents ]  have 2 modules.... [ news ] and [ recentevents ]

Is it as simple as just duplications the folder and editing the News.module.php??

mike
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: <! duplicating news module

Post by calguy1000 »

duplicating a module is relatively easy, but has it's drawbacks.

The big question is "why would you want to?"

Is this something that needs to be changed in the news module?
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
mikemcvey
Forum Members
Forum Members
Posts: 61
Joined: Tue May 02, 2006 4:08 am

Re: <! duplicating news module

Post by mikemcvey »

re: "Is this something that needs to be changed in the news module?"

...it would be nice to be able to have different templates... ie display [ beer ] news in a different template than [ wine ] news.
...and it would be nice to be able to set the order of the items manually like page order.

I really want to seperate the news so that a client can log in and go straight to [ beer ] or [ wine ] and edit the content. Rather than having to use the dropdown to select..  I can see a problem where the admin client enters the "wrong news into the wong section"
cyberman

Re: <! duplicating news module

Post by cyberman »

mikemcvey wrote: ...it would be nice to be able to have different templates... ie display [ beer ] news in a different template than [ wine ] news.
RTFM  ;D ...

You can define your own summary and detail templates with {cms_module module="news" number="5" category="wine" summarytemplate="winetemplate.tpl" } or {cms_module module="news" number="5" category="beer" detailtemplate="beertemplate.tpl"}
...and it would be nice to be able to set the order of the items manually like page order.
Here you have the option to play with start date and sort with {cms_module module="news" number="5" category="Bier" sortby="news_date"}. There are some other order options too.
I really want to seperate the news so that a client can log in and go straight to [ beer ] or [ wine ] and edit the content. Rather than having to use the dropdown to select..  I can see a problem where the admin client enters the "wrong news into the wong section"
IMHO that should not really be an option  :) - that's your job to instruct your clients. Write a short FAQ, HowTo, a check list or so other for clients.
Signex

Re: <! duplicating news module

Post by Signex »

is it also possible to give every news template its own CSS ?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: <! duplicating news module

Post by Dr.CSS »

if the news category only shows up on one template then yes..
and i changed the 'News' Module into 'Blog' Module as seen here...
http://www.multiintech.com/index.php?page=blogger
it's also used on a couple of other pages with the News next to it....

  mark
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm
Location: Finland

Re: <! duplicating news module

Post by tsw »

is it also possible to give every news template its own CSS ?
in summary template chenge line

Code: Select all

<div class="NewsSummary">
to

Code: Select all

<div class="NewsSummary {$entry->category}">
then you can style different categorys with css

same goes with detail template but you would need to wrap it first like this

Code: Select all

<div id="NewsPostDetailWrapper" class="{$entry->category}">
[old template content here]
</div>
happy styling  :D
Signex

Re: <! duplicating news module

Post by Signex »

Thanks thats what i needed !  ;D
Post Reply

Return to “Developers Discussion”