WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • Code Snippet: Display news items, anywhere
  • Print
Pages: 1 ... 8 9 [10] 11 12 ... 21   Go Down

Author Topic: Code Snippet: Display news items, anywhere  (Read 374184 times)

Offline Katerchen

  • Posts: 84
Re: Code Snippet: Display news items, anywhere
« Reply #225 on: January 06, 2009, 05:42:10 PM »
Okay, now it works. Thank you! BTW: The snippet has vanished from the "official" code snippet page...
Logged

doc

  • Guest
Re: Code Snippet: Display news items, anywhere
« Reply #226 on: January 06, 2009, 06:16:59 PM »
Quote
BTW: The snippet has vanished from the "official" code snippet page...
Thanks, forgot to activate the snippet - fixed.

Regards Christian
Logged

Maarten8

  • Guest
Re: Code Snippet: Display news items, anywhere
« Reply #227 on: January 13, 2009, 10:14:44 AM »
Is it possible to add it to a page?
Like if I go pages > add page?
If no, is it possible to just show it on only one page?

(really nice module btw)

Maarten
Logged

Argos

  • Guest
Re: Code Snippet: Display news items, anywhere
« Reply #228 on: January 13, 2009, 10:22:18 AM »
Quote from: Maarten8 on January 13, 2009, 10:14:44 AM
Is it possible to add it to a page?
Like if I go pages > add page?
If no, is it possible to just show it on only one page?
Sure, make a code section and put the snippet in there. I recommend using the code2 module: http://www.websitebakers.com/pages/admin/core-replacements/code-2.php. It's more versatile than the default code module.
Logged

Maarten8

  • Guest
Re: Code Snippet: Display news items, anywhere
« Reply #229 on: January 13, 2009, 11:10:53 AM »
Quote from: Argos on January 13, 2009, 10:22:18 AM
Quote from: Maarten8 on January 13, 2009, 10:14:44 AM
Is it possible to add it to a page?
Like if I go pages > add page?
If no, is it possible to just show it on only one page?
Sure, make a code section and put the snippet in there. I recommend using the code2 module: http://www.websitebakers.com/pages/admin/core-replacements/code-2.php. It's more versatile than the default code module.

Woah thanks for the fast response :-D
Logged

Offline Xagone

  • Posts: 482
  • Gender: Male
  • Developper
    • Xagone Inc
Re: Code Snippet: Display news items, anywhere
« Reply #230 on: January 13, 2009, 05:59:39 PM »
is there a way to link the title header to the news it's showing (when it's only 1 group)?

like in there http://www.votreespace.net/pages/nouvelles.php
the "derniere realistion" is another news in a subsection, other than making the link manualy in the call, can we activate a link to the group?

because something like this :
Code: [Select]
if (function_exists('display_news_items')) {
    display_news_items(0,10,50, 2,'<a href="/pages/nouvelles/derniere-realisations.php">Dernières mise-a-jour</a>', 'Voir...', 'oups, aucunes mise a jour');
}
do not seam to work.
Logged
Xagone Inc. (formerly VotreEspace)
http://xagone.com/

doc

  • Guest
Re: Code Snippet: Display news items, anywhere
« Reply #231 on: January 13, 2009, 06:14:35 PM »
Hello,

should be doable with the latest version of anynews released recently on the addon repository.

You can style the output of anynews by modifying the HTML templates included in the folder /htt of anynews as described in the README file.

Regards Christian
Logged

saiborg

  • Guest
Re: Code Snippet: Display news items, anywhere
« Reply #232 on: January 14, 2009, 09:42:00 PM »
Sorry, but im toooooo silly,

i can´t implement the code....i already changed some code in the anynews/include.php
but i can´t make the $max_news_length shorter

Code: [Select]
if (function_exists('display_news_items')) {
    display_news_items($max_news_length);
}


an what do i habe to change that there ist not the full short text, only thirty to fourty letters....

Code: [Select]
$group_id = 0, $max_news_items = 10, $max_news_length = -0, $display_mode = 1,         $header_text = 'Aktuel', $readmore_text = 'weiter lesen', $no_news_text = 'no news available yet...',         $strip_tags = true, $allowed_tags = '<a>',        $display_publish_date = false, $date_time_format = ' (g:i A, m/d/Y)',        $sort_by = 1, $sort_order = 1)
Thank you for your help

Saiborg
(sorry for my english)
« Last Edit: January 15, 2009, 10:01:56 AM by saiborg »
Logged

doc

  • Guest
Re: Code Snippet: Display news items, anywhere
« Reply #233 on: January 22, 2009, 05:29:42 PM »
Hello,

just released Anynews v0.34 on the WebsiteBaker Add-ons repository.

This version fixes a bug which made it impossible to make use of the custom output template files like: custom_output_display_mode_X.htt (X for a number between 3 and 99). Thanks to Erpe for reporting.

Further details can be found in the Readme file.

Delete any previous version and install the latest version afterwards.

Have fun
Christian
« Last Edit: January 22, 2009, 05:33:20 PM by doc »
Logged

Maarten8

  • Guest
Re: Code Snippet: Display news items, anywhere
« Reply #234 on: January 26, 2009, 02:31:46 PM »
Is it possible to put the anynews in a WYSIWYG page?
So if you make a new page and use as type WYSIWYG.
Because I would like it at the frontpage only (so no use to put it in template) and I kinda need to have a WYSIWYG page for some other users.

thanks.
Logged

doc

  • Guest
Re: Code Snippet: Display news items, anywhere
« Reply #235 on: January 26, 2009, 03:12:00 PM »
Hello,

yes, simply add a WYSIWYG section and a code section to a page. Then call the Anynews function from the code section. This way you do not need to touch your template. Details about section can be found on the WB help site:
http://help.WebsiteBaker.org/pages/en/basic-docu/working-with-wb/page-administration/manage-sections.php

Regards Christian
Logged

Maarten8

  • Guest
Re: Code Snippet: Display news items, anywhere
« Reply #236 on: January 27, 2009, 11:12:15 AM »
Quote from: doc on January 26, 2009, 03:12:00 PM
Hello,

yes, simply add a WYSIWYG section and a code section to a page. Then call the Anynews function from the code section. This way you do not need to touch your template. Details about section can be found on the WB help site:
http://help.WebsiteBaker.org/pages/en/basic-docu/working-with-wb/page-administration/manage-sections.php

Regards Christian

Thanks it totally works  :mrgreen:
Logged

Offline babsy

  • Posts: 337
Re: Code Snippet: Display news items, anywhere
« Reply #237 on: February 04, 2009, 12:33:43 PM »
hi.... i just updated, and my picture dissapeared, so now its. just text??
is it not possible in the latest update to have the picture in the small text??
Logged

doc

  • Guest
Re: Code Snippet: Display news items, anywhere
« Reply #238 on: February 04, 2009, 05:06:26 PM »
Hello,

need to check if the striptags options are missing for the short text in the last version of Anynews.

Regards Christian
Logged

Offline babsy

  • Posts: 337
Re: Code Snippet: Display news items, anywhere
« Reply #239 on: February 04, 2009, 05:53:33 PM »
ok, i tried to look through the old code, but i really don´t see what code is for the picture, so if anyone knows, please let me know!
« Last Edit: February 05, 2009, 04:07:37 PM by babsy »
Logged

doc

  • Guest
Anynews: Display news items, anywhere
« Reply #240 on: February 05, 2009, 08:40:30 PM »
Hello,

the bug should be fixed in the latest version available on the WB Add-ons repository.

Regards Christian
Logged

Ymmot

  • Guest
Re: Code Snippet: Display news items, anywhere
« Reply #241 on: February 18, 2009, 11:36:27 PM »
Hi all.
Thanks a lot for a great forum and dedicated community. :)
I am a fairly new user off website baker, I like it a lot!
I tweaked some files here and there and got most working like I want it.

Now to the topic:
What I would like with anynews is the ability to show news starting from news item X!

On the front page I would like to show one news item with text and 5 more with just links.

But with the code here under the first full will be the same as the first in the second group.

Any way to work around or any way it´s possible to add to the anynews code?

Code: [Select]
if (function_exists('display_news_items'))
{
display_news_items(0, 1, 230, 1, 'Latest News', 'show full news text', 'uups, no news available', true, '<a><img>', true, ' (Y-m-d)', 2, 1);

display_news_items(0, 5, 0, 2, 'More News', 'show full news text', 'uups, no news available', true, '<a><img>', true, ' (Y-m-d)', 2, 1);
}

Thanks for any tips and help!
Logged

Argos

  • Guest
Re: Code Snippet: Display news items, anywhere
« Reply #242 on: February 19, 2009, 10:58:31 AM »
Quote from: mr-fan on February 19, 2009, 10:56:16 AM
hi,

try it with two sections .....

first section take the "latest news" - modul from here....
http://www.websitebakers.com/pages/modules/listings/section-pages/latest-news.php

it shows the last news-post full...

second section take the anynews for the links to the rest of the news.... :wink:

I think the question was how to let the anynews module start with the second latest item, instead of the latest one...
Logged

daydreamer

  • Guest
Re: Code Snippet: Display news items, anywhere
« Reply #243 on: March 03, 2009, 12:32:04 PM »
Sorry this is all new to me, I need to show

5 posts
News Title
Short Description max 40 length
read more

What code would I need in my index.php

Many Thanks
Logged

mr-fan

  • Guest
Re: Code Snippet: Display news items, anywhere
« Reply #244 on: March 03, 2009, 12:37:41 PM »
http://addons.WebsiteBaker.org/modules/anynews/help/help_en.html

try and learn about this snippet and you can get the output of the newsmodule that you want... :wink:

regard martin
Logged

daydreamer

  • Guest
Re: Code Snippet: Display news items, anywhere
« Reply #245 on: March 03, 2009, 12:55:01 PM »
This is what I have but no short description is showing?

<?php display_news_items(0, 5, 50, 2, 'Latest News', 'read more', 'no news yet', '<a>', 'do not show publish date', '1', '1'); ?>
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Code Snippet: Display news items, anywhere
« Reply #246 on: March 03, 2009, 12:59:32 PM »
The 4th parameter should be set to 1.
2 means you will get a list of links only.

Quote
display_mode...    1:=details (default); 2:=unsorted list; 3-99 (custom template: /htt/custom_output_display_mode_X.htt)

Ruud
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

daydreamer

  • Guest
Re: Code Snippet: Display news items, anywhere
« Reply #247 on: March 03, 2009, 01:13:10 PM »
Thanks so much guys all sorted
Logged

Offline sparkdigital

  • Posts: 366
  • Once a baker, always a baker!
    • romantic hotels
Re: Code Snippet: Display news items, anywhere
« Reply #248 on: March 03, 2009, 05:24:30 PM »
How does this snippet deal with the possibility that there are more than one news pages? Can I specify which page I want to display the news items from?

Thanks,

Konrad
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Code Snippet: Display news items, anywhere
« Reply #249 on: March 03, 2009, 05:33:50 PM »
If you have multiple News pages you will need to use the group id.
Create a group for every newspage to use, and use the first parameter to show only that group.

It works fine for multilanguage sites. (used it like that before)
Groups like "Dutch news, English News, etc.."

Ruud

Logged
Dev4me - WebsiteBaker modules - WBhelp.org

  • Print
Pages: 1 ... 8 9 [10] 11 12 ... 21   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • Code Snippet: Display news items, anywhere
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2