Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 06:23:28 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155477 Posts in 21708 Topics by 7734 Members
Latest Member: rofroodoOvego
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Module anynews v0.31 Configuring Polbems  (Read 442 times)
MarkNickolas

Offline Offline

Posts: 9


« on: February 10, 2009, 09:43:06 PM »

Hey there every one.

So i got the anynews module installed fine, And displaying the news feed.

The real problem is i really don’t under stand the help file included in the package, for custom output.

What i want anynews to do is grab the newest news post and display the first 250 carters and display that with a “read more” link that opens in a new window.

How would I do this?

And I see there is a new ver of anynews should I upgrade as well?

Thanks for any help.
Mark Nickolas
Logged
mr-fan

Offline Offline

Posts: 1556


WWW
« Reply #1 on: February 10, 2009, 10:04:20 PM »

Quote
Optional Parameters:

  group_id...        group from which you want to read news from (default:= 0 for all groups)
  max_news_items...  maximal number of news shown (default:= 10, min:=1, max:= 999)
  max_news_length... maximal length of the short news text shown (default:=-1 for full news length)
  display_mode...    1:=details (default); 2:=unsorted list; 3-99 (custom template: /htt/custom_output_display_mode_X.htt)
  header_text...     heading text shown (default:="Latest news")
  readmore_text...   text displayed for readmore link (default:=read more)
  no_news_text...    text shown if no news available (default:="no news avaialbe yet...")
  strip_tags...      true:=remove all tags not allowed via variable $allowed_tags (default:=true); false:=don´t strip tags
  allowed_tags...    string with allowed tags (default:='<a>'); to allow also images use: '<a><img>'
  show_publish_date  false:= do not show publish date (default); true:= show publish date
  date_time_format.. format string for PHP date function (default:= ' (g:i A, m/d/Y)' --> (9:12 PM, 10/20/2008)
  sort_by...         1:=position (default), 2:=posted_when, 3:=published_when (correspond to database fields of news module)
  sort_order...      1:=descending (default), 2:=ascending

Example for customised call:

<?php display_news_items(0, 1, 250, 1,
  'The latest news', 'show full news text', 'uups, no news available',
  true, '<a><img>', true, ' (h:i, d.m.Y)', 1, 1); ?>

this is the help-file what's so difficult... wink

put the code in your template or in a code or code² site .... (there without <?php ?>)..

regards martin
Logged

 
MarkNickolas

Offline Offline

Posts: 9


« Reply #2 on: February 10, 2009, 11:56:33 PM »

Thanks for the Fast replay mr-fan

i have just tryed the code u posted.

Code:

<?php display_news_items(012501
  
'The latest news''show full news text''uups, no news available',
  
true'<a><img>'true' (h:i, d.m.Y)'11); ?>



I guess i missed a few things i should have said.

That i am using long news posts only.

and the read more link still opens in same window.

How would the code look for that??

For some one new to php that is a bit hard to undersand how the parameters should be added.

I all so should say that its beeing insirted in a tempate. as well.

Thanks for all the help.
Mark Nickolas
Logged
mr-fan

Offline Offline

Posts: 1556


WWW
« Reply #3 on: February 11, 2009, 02:07:59 PM »

Quote
That i am using long news posts only.

and the read more link still opens in same window.

for this feature it would be better you take a look at the new upcomming module "topics"

http://www.websitebakers.com/pages/modules/interaction/topics.php

the anynewssnippet is only made to show the latest news with short text ....for your wishes you must ask the author of the anynewssnippet or search the threat of the snippet if there is a solution maybe with another .php file for the snippet. here is the threat:
http://www.websitebaker2.org/forum/index.php/topic,409.0.html

regards martin
Logged

 
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!