Page 1 of 1

News mods

Posted: Fri Oct 29, 2004 5:55 pm
by calguy1000
Just thought it would be a good idea to have an automatic expiry for news articles.... 1 week, 1 month, 1 year, never.....

and have it default to the last used value.....

got I gotta get some time to work on these plans.

News mods

Posted: Fri Oct 29, 2004 6:12 pm
by Ted
Well, the end date is already there. You'd just need to add some magic to make it work from a dropdown list of predefined values.

News mods

Posted: Sat Nov 13, 2004 11:20 pm
by calguy1000
Done.... a "News2" module is available from http://techcom.dyndns.org

News mods

Posted: Sun Nov 21, 2004 2:40 pm
by Greg
OK ... I must be doing something wrong here.

I place this plugin link into a page

{cms_module module=news summary=page length=80 showcategorywithtitle=true}

The news page shows all the news items, the long items are shortened to 80 characters, the category shows, however ...

The links go nowhere, the links created are like this example
:arrow: UPDATE:

I created another page (news3) with the all the news items being displayed and not displayed in the menu.
I put this line in it
{cms_module module=news}

Then in my original news page I changed the line to

{cms_module module=news summary=news3 length=80 showcategorywithtitle=true}

Problem is the path is still incorrect. If I manually type in the correct url the page news3 shows and jumps to the correct news item.

:arrow: UPDATE - 2

changed /index ... to index... on line 193 of the news modulefunctions.php and all works well.

:?: Is there a way to pass the news id as a parameter to another page with the news module so it displays the selected news item only?
{cms_module module=news id=?} ?

:?: One more question ... what is the no_anchors parameter for?


:arrow: UPDATE - 3

Added lines at 219 in news modulefunctions.php

Code: Select all

if (strlen($row["news_data"]) >$params["length"]){
          echo "<br><a href="index.php?page=".$params["summary"]."#".$row["news_id"]."">more info ...</a>";}
This adds a [url=http://#]more ....[/url]link at the end of the news content if the summary is on and the length of the content is longer than the length parameter.

I also took the links off the titles as it is redundant if the length of the content is shorter than the length parameter (commented out lines 191 - 195 and removed the else in line 196).

News mods

Posted: Tue Nov 23, 2004 6:20 am
by Anonymous
Thanks, Greg, that was a big help.

I was stuck on the link thing too, but not now.

Thanks again.

News mods

Posted: Tue Nov 23, 2004 10:25 am
by Ted
News2 has been merged into the current News module and will be in 0.7.3 (and is in the latest rc)

News mods

Posted: Fri Dec 17, 2004 2:13 am
by Red
OK, I'm the "Guest" from above.

Now I've installed the latest version on another domain I'm back to my original problems of the bad path when clicking the "More.."....

Any ideas what I'm doing wrong?

News mods

Posted: Fri Dec 17, 2004 3:34 am
by calguy1000
Here's what I have.....

where "the-latest-and-greatest" is a page alias to one of my pages....

Code: Select all

{cms_module module="news" summary="the-latest-and-greatest" number="5" length="80"}

News mods

Posted: Fri Dec 17, 2004 7:14 pm
by Red
Thanks! I got it, I had a typo in that line for the alias name. Sometimes its easiest to walk away for a while.

Thanks for your help.