News mods

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

News mods

Post 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.
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.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

News mods

Post 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.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

News mods

Post by calguy1000 »

Done.... a "News2" module is available from http://techcom.dyndns.org
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.
Greg
Power Poster
Power Poster
Posts: 598
Joined: Sun Sep 26, 2004 6:15 pm
Location: Saskatchewan - Canada

News mods

Post 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).
Greg
Anonymous

News mods

Post by Anonymous »

Thanks, Greg, that was a big help.

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

Thanks again.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

News mods

Post by Ted »

News2 has been merged into the current News module and will be in 0.7.3 (and is in the latest rc)
Red

News mods

Post 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?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

News mods

Post 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"}
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.
Red

News mods

Post 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.
Post Reply

Return to “Modules/Add-Ons”