Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 27, 2012, 12:02:50 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter
hier
und auf unserer
neuen Webseite
.
155556
Posts in
21715
Topics by
7737
Members
Latest Member:
gx-world
WebsiteBaker Community Forum
English
Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
(Moderator:
Argos
)
Codesnippet: Anynews
Pages: [
1
]
2
3
Go Down
Author
Topic: Codesnippet: Anynews (Read 1911 times)
cwsoft
Offline
Posts: 81
Codesnippet: Anynews
«
on:
February 11, 2012, 10:58:51 AM »
Hello,
this post is to inform you about my trial to revive the support of the Codesnippet "Anynews".
I pushed an initial release to GitHub with the version 2.0.0 (basically branched from AMASP Anynews v1.16a).
Anynews at his new home on GitHub:
https://github.com/cwsoft/wb-anynews
Next planned steps are to re-structure Anynews help using GitHubs markdown syntax, so users get an idea what the module is about BEFORE installing it on their system and to update the module to work with WB 2.8.3 (once released). On a longer term I plan to update the grown and painfull function call and to rework some stuff.
Feel free to contribute to Anynews using
GitHubs fork and pull mechanisms
.
Cheers
cwsoft
Logged
mdemaree99
Offline
Posts: 68
Re: Codesnippet: Anynews
«
Reply #1 on:
February 11, 2012, 09:57:11 PM »
Please update the jquery to use the normal 1.3.2 file vs modified file.
Currently if another module uses the real jquery 1.3.2 functions there are compatibility issues due to the differences..
Logged
cwsoft
Offline
Posts: 81
Re: Codesnippet: Anynews
«
Reply #2 on:
February 11, 2012, 10:12:23 PM »
Hello,
plans for the next Anynews release are:
- remove jquery 1.3.1 version shipped with Anynews and use WB version instead (WB 2.8.2 --> jQuery 1.7)
- check compatibility of Anynews jQuery plugins with jQuery 1.7
- check for alternative plugins supporting jQuery 1.7+
- remove jQuery support from Anynews if no alternative slider working with jQuery 1.7 is found
Cheers
P.S.: Seems the jQuery coda-slider plugin is no longer actively maintained (last commit 2009, required jQuery 1.3.1). Due to massive API changes from jQuery 1.3 to 1.7, I doubt that the coda-slider plugin will work with jQuery 1.7 without massive changes. So if I do not find a compatible plugin, I tend to remove it from Anynews.
«
Last Edit: February 11, 2012, 11:46:43 PM by cwsoft
»
Logged
cwsoft
Offline
Posts: 81
Re: Codesnippet: Anynews
«
Reply #3 on:
February 12, 2012, 01:03:59 AM »
Hello,
Anynews ships with the third Party JQUERY Plugin Coda-slider, which seems no longer be actively developed. The Last Update was 2009 and requires jQuery 1.3.1. WB 2.8.2 ships with jQuery 1.7, which is incompatible to 1.3.1.
The question is, how many People Out there are Using this anynews feature and how many of the People using this Feature have issues? Is there an alternative for Coda-slider, licensed under GPL and Running with JQuery 1.7+?
Are there any cracks Out there willing to Update the Coda slider jQuery stuff? The answers will help to figure Out if this Feature will be Removed with the next version or Not.
Cheers
Logged
kweitzel
Forum administrator
Offline
Posts: 6977
Re: Codesnippet: Anynews
«
Reply #4 on:
February 12, 2012, 12:34:26 PM »
I personally do use AnyNews but without the coda slider. The second one mostly because I never got it working to my satisfaction
Cheers
Klaus
Logged
WebsiteBaker Org e.V. - for WebsiteBaker
jacobi22
Betatester
Offline
Posts: 1376
Re: Codesnippet: Anynews
«
Reply #5 on:
February 12, 2012, 03:02:26 PM »
i used coda-slider in my test-space - with jquery 1.71, no Problems
Logged
LG Uwe
Wer sagt, Reichtum ist alles, hat nie ein Kind lächeln gesehen.
mdemaree99
Offline
Posts: 68
Re: Codesnippet: Anynews
«
Reply #6 on:
February 13, 2012, 05:39:46 AM »
I am using the Anynews with coda slider
The update will be great and should get rid of many of the compatibility issues with other modules.
Another nice to have as long as the coda slider is working.
Can you change the input box to match up with the height for the Short: description?
Allows users to know exactly how much room they have to work with when building a slide.
I originally modified my anynews for the height and ideally I would change width also, but this changes up the editor up a little to much for my taste.
I did have one issue. After changing the height, it seems I get an error message(everything works correctly even with error to m knowledge) when I change the title of the slide. Not sure if they are related, but only started getting message after I changed height of short description.
«
Last Edit: February 13, 2012, 05:42:19 AM by mdemaree99
»
Logged
cwsoft
Offline
Posts: 81
Anynews v2.1.0 ALPHA (FOR TESTING PURPOSE ONLY)
«
Reply #7 on:
February 15, 2012, 10:22:01 PM »
Hi,
I uploaded a first ALPHA version of the upcoming Anynews version 2.1.0 on
GitHub
The version is written for the WB 2.8.x series only, starting from
WB 2.8.2
and intended to be tested by more experienced users at a first place. The version is NOT YET ready for productive sites.
Apart from code restructuring, the handling of Javascript files was modified to make use of the mechanismns introduced with WebsiteBaker 2.8.1/2.8.2. In addition two new jQuery sliding effects were added: "coda-slida-2.0" and "flexslider" (set display_mode = 3,4 or 5).
To make the jQuery slida effect working, one needs to add the following code into the head section of the index.php of the frontend template:
Code:
<?php
if (
function_exists
(
'register_frontend_modfiles'
)) {
register_frontend_modfiles
(
'css'
);
register_frontend_modfiles
(
'jquery'
);
register_frontend_modfiles
(
'js'
);
}
?>
Note: CSS styling and parameters of the slida effects can be modified by the files located in folders css and javascript. The jQuery plugin files in the folder thirdparty should not be modified unless there is a real need for it.
Feedback welcome.
Cheers
«
Last Edit: February 29, 2012, 10:05:19 PM by cwsoft
»
Logged
DarkViper
Development Team
Offline
Posts: 1254
Re: Codesnippet: Anynews
«
Reply #8 on:
February 15, 2012, 10:41:56 PM »
a little hint:
if (function_exists('register_frontend_m
odfiles')) {
is never needed since 2.8.1. The funktion is included in the core now and always available for templates.
Logged
Anleitungen lesen und selber nachdenken ist anstrengend... Da lass ich doch lieber andere für mich denken...
In
1984
: Nineteen Eighty-Four is a unrealistic utopia!!
In
2012
: Nineteen Eighty-Four is a little piece only of our reality!!
cwsoft
Offline
Posts: 81
Re: Codesnippet: Anynews
«
Reply #9 on:
February 15, 2012, 11:06:40 PM »
Well I know, but as all templates shipped with WB 2.8.2 und 2.8.3 still include this, I decided to copy it over.
Its easier for me to explain to search for that code in the template and refer to Default templates, than trying to teach the right way off doing it
Cheers
Logged
cwsoft
Offline
Posts: 81
Anynews 2.1.0 - which jQuery slider plugin to implement ??
«
Reply #10 on:
February 19, 2012, 07:53:38 PM »
Hello,
I want to update the jQuery sliding/fading effect for the upcoming Anynews version 2.1.0.
So far anynews ships with a jQuery effect called
better-coda-slider
, which is a free rebuild of the commercial
Panic - Coda slider
. As the "better-coda-slider" has a lot of dependencies to other jQuery plugins and is no longer actively developed, I decided to drop it in favour of another jQuery plugin.
So far I have reviewed the following candidates:
-
flexslider
(my favorite so far, Open Source, last update Oct. 2011)
-
coda-slider-2.0
(GPL, but last update 2009)
-
innerfade
(simple plugin, but last update from 2008)
Before I pick one jQuery slider plugin, I would like to ask YOU, if YOU:
- know a better slider which is actively maintained, licensed under GNU (or equivalent), works with jQuery 1.7
- want to share your expertise in styling the slider to look good in Anynews (e.g. buttons, boxes, ...)
If you want to suggest another slider which fulfills above requirements and/or want to add your hands on the final CSS layout for the slider shipped with the upcoming Anynews (credits will be given), please post in this thread or send me a PM.
Deadline for your suggestions and/or help offers is
26th Feb. 2012
(one week from now). After that date I will carry on with the development of Anynews v2.1.0.
Cheers
P.S.: To get an impression of how jQuery effects will be integrated into Anynews 2.1.0, you may want to download and test the first ALPHA version announced in
post 7
of this thread. The ALPHA version includes all slider effects except the innerfade slider mentioned above.
Logged
mdemaree99
Offline
Posts: 68
Re: Codesnippet: Anynews
«
Reply #11 on:
February 20, 2012, 04:27:02 AM »
Flexslider looks good as long as it works with Anynews. I only see it working with images.
Already a fan of codaslider...
Couldn't get the link to innerfade work.
Another simple jq option is
http://bxslider.com/
Not sure on the last time it was updated though.
Logged
dbs
WebsiteBaker Org e.V.
Offline
Posts: 3719
Re: Codesnippet: Anynews
«
Reply #12 on:
February 20, 2012, 08:57:14 AM »
Old and good are also cycle-plugin
http://jquery.malsup.com/cycle/
.
I use it for Anynews.
Another is jcarousellite
http://www.gmarwaha.com/blog/2007/08/09/jcarousel-lite-a-jquery-plugin/
Used as Bakery-Item-Slider.
Both works with jquery 1.7.1, supports pause on mouseover, endless scroll and more.
Logged
cwsoft
Offline
Posts: 81
Re: Codesnippet: Anynews
«
Reply #13 on:
February 20, 2012, 04:18:48 PM »
Hello,
thanks for your feedback so far, see my comments below.
Quote from: mdemaree99
Flexslider looks good as long as it works with Anynews. I only see it working with images.
As flexslider is already implemented in Anynews 2.1.0 ALPHA, it should work (display_mode = 4).
Quote from: mdemaree99
Already a fan of codaslider...
Guess you are talking about
coda-slider-2.0
- right?
Only issue I have with this plugin is that it seems not actively maintained (last update from Oct. 2009).
Quote from: mdemaree99
Couldn't get the link to innerfade work.
The link posted below works for me. Maybe do a Google search for "innerfade jQuery".
Quote from: dbs
Old and good are also cycle-plugin
Thanks for the link, will have a look on this plugin.
Quote from: dbs
Another is jcarousellite
As this Plugin is not actively maintained (last update 2007) I doubt it will make it into Anynews.
Cheers
«
Last Edit: February 29, 2012, 10:03:38 PM by cwsoft
»
Logged
cwsoft
Offline
Posts: 81
Anynews - jQuery Slider Countdown
«
Reply #14 on:
February 22, 2012, 09:56:40 PM »
Hi,
just to remember.
You can vote for your preferred jQuery slider plugin until Sonday 26. Feb. 2012. Votes up to Sonday can be considered for implementation with the next Anynews version.
Please read posts before to see what requirements a jQuery slider plugin should fulfill in order to get considered as possible replacement for the outdated "better-coda-slider".
Cheers
Logged
cwsoft
Offline
Posts: 81
Anynews v2.1.0 RC2 released - please test
«
Reply #15 on:
February 26, 2012, 09:46:37 AM »
Hello,
the nomination phase for additional jQuery slider is over - thanks for your proposals and comments on that.
Based on your comments, I decided to keep the better-coda-slider distributed with Anynews and to add another - more flexible - jQuery slider plugin called
flexslider
as alternative solution.
Anynews v2.1.0 RC2:
A first release candidate (RC2) of the upcoming Anynews v2.1.0 version is available at GitHub.
The minimum requirements are
WebsiteBaker 2.8.2
(recommended 2.8.3) and
PHP 5.2.2
(recommended latest stable 5.3.x version).
Download: removed (newer version available)
README:
view README
Would be great if you could give Anynews a try and to provide your feedback in this thread.
Applied changes:
The Anynews CSS and Javascript file inclusion was updated to the loading methods introduced with WebsiteBaker 2.8.2. Third party code was seperated and moved to the thirdparty folder. The handling of jQuery plugins was simplified to allow other users to add their preferred jQuery plugins more easily. Anynews template files were renamed from
custom_output_displ
ay_mode_X.htt
to
display_mode_X.htt
. Use number range 5..98 for your custom templates. Template 99 provides a cheat sheet with all available Anynews placeholders available in templates. Anynews output is now wrapped in a div with class
mod_anynews
to prevent CSS clashes with other modules, templates or the WebsiteBaker core. Apart from that, I adapted Anynews to my latest coding practice.
By the way, the Anynews Readme was completely reworked - hopefully things are now more obvious than before
Cheers
«
Last Edit: February 29, 2012, 10:03:02 PM by cwsoft
»
Logged
cwsoft
Offline
Posts: 81
Anynews v2.1.0 STABLE - Released
«
Reply #16 on:
February 29, 2012, 06:10:57 PM »
Hi,
just released Anynews V2.1.0 STABLE at GitHub. The latest version requires WebsiteBaker 2.8.2 (recommended last stable 2.8.x version) und PHP 5.2.2 (recommended last stable 5.3.x version).
Changes compared to Anynews v2.0.0
Third party code was moved into a separate subfolder. Integration of custom Javascript or jQuery plugins was simplified. The additional jQuery slider effect plugin "flexslider" was added as alternative to the outdated "better-coda-slider" distributed with Anynews.
Location and naming of Anynews template files has changed from
/htt/custom_display_mode_X.htt
to
/templates/display_mode_X.htt
. The Anynews cheat sheet template providing an overview of all Anynews template placeholders is now displayed via
$display_mode = 99
(before
$display_mode = 4
). The HTML output of the Anynews template files is now wrapped in a div with class mod_anynews to avoid clashes with other modules, templates or WebsiteBaker CSS definitions.
Links
README
Download installation package
Anynews code history
knwon issues
Cheers cwsoft
«
Last Edit: February 29, 2012, 10:20:32 PM by cwsoft
»
Logged
Argos
Moderator
Offline
Posts: 2161
Re: Codesnippet: Anynews
«
Reply #17 on:
March 03, 2012, 10:27:04 PM »
Nice to see someone actively maintaining this often used snippet. Thanks for your efforts.
It would be nice to see offical section support added to it, besides groups support. There is a hack somewhere on the forums that shows how to use AnyNews with section ID, but that never made it into the official module. I believe few people use groups in News, most people would just use separate sections to show News about different subjects.
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
cwsoft
Offline
Posts: 81
Anynews v2.2.0 Release Candidate 1 - available
«
Reply #18 on:
March 04, 2012, 08:47:08 PM »
Hello,
issued a first release candidate (RC1) of the upcoming Anynews v2.2.0 at
GitHub
.
This version includes three improvements and additional features requested by forum users:
1. the hardcoded "no news available" text can now be styled or removed via Anynews template files
2. the flag
$lang_filter
allows to remove news entries not matching the defined
$lang_id
3. values of
group_id
can now be linked to
group_id, page_id, section_id or post_id
Apart from that a bug in the language file inclusion of v2.1.0 was fixed.
The Anynews v2.2.0 function signature has changed as follows:
The last two parameter are new and where added to the end of the function to not break older Anynews function calls. Paramter
$group_id_type
defaults to "group_id", paramter
$lang_filter
to false, which is the default behaviour of previous Anynews versions.
Code:
<?php
function
displayNewsItems
(
$group_id
=
0
,
// IDs of news to show, matching defined $group_id_type (default:=0, all news, 0..N, or array(2,4,5,N) to limit news to IDs matching $group_id_type)
$max_news_items
=
10
,
// maximal number of news shown (default:= 10, min:=1, max:= 999)
$max_news_length
= -
1
,
// maximal length of the short news text shown (default:=-1 => full news length)
$display_mode
=
1
,
// 1:=details (default); 2:=list; 3:=coda-slider; 4:flexslider; 4-98 (custom template: display_mode_X.htt); 99:=cheat sheet
$lang_id
=
'AUTO'
,
// language file to load and lang_id used if $lang_filer = true (default:= auto, examples: AUTO, DE, EN)
$strip_tags
=
true
,
// true:=remove tags from short and long text (default:=true); false:=don´t strip tags
$allowed_tags
=
'<p><a><img>'
,
// tags not striped off (default:='<p><a><img>')
$custom_placeholder
=
false
,
// false:= none (default), array('MY_VAR_1' => '%TAG%#', ... 'MY_VAR_N' => '#regex_N#' ...)
$sort_by
=
1
,
// 1:=position (default), 2:=posted_when, 3:=published_when (only WB 2.7), 4:= random order, 5:=number of comments
$sort_order
=
1
,
// 1:=descending (default), 2:=ascending
$not_older_than
=
0
,
// 0:=disabled (default), 0-999 (only show news `published_when` date <=x days; 12 hours:=0.5)
$group_id_type
=
'group_id'
,
// type used by group_id to extract news entries (supported: 'group_id', 'page_id', 'section_id', 'post_id')
$lang_filter
=
false
// flag to enable language filter (default:= false, show only news from a news page, which language fits $lang_id)
);
Setting
$lang_filter = true
shows only news items added from a news page which LANGUAGE type matches
$lang_id
. If no news page exist for this LANGUAGE, all news entries will be shown instead.
Feedback welcome.
Cheers
Logged
Argos
Moderator
Offline
Posts: 2161
Re: Codesnippet: Anynews
«
Reply #19 on:
March 04, 2012, 08:53:12 PM »
Looks very nice. Great to see the section-ID, page-ID and post-ID support added!
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
cwsoft
Offline
Posts: 81
Anynews - Update of language files needed
«
Reply #20 on:
March 05, 2012, 07:18:39 PM »
Hi,
forgot to mention that I do need some help in updating some Anynews text outputs into the following languages:
Estonian (EE.php)
,
French (FR.php)
,
Dutch (NL.php)
,
Serbian (RS.php)
for Anynews 2.2.0 stable.
English phrases which needs to be translated into languages above:
a)
"For details please visit "
GitHub. (GitHub needs no translation)
b)
"Number of comments"
Would be great if a native speaker could review the Anynews language files listed above for possible misspelling or grammar issues. You can post your translation/updates in this thread, download
Anynews 2.2.0 RC1
and add the modified files in this thread, send me a PM or send me a pull request via GitHub.
Thanks in advance
cwsoft
Logged
Argos
Moderator
Offline
Posts: 2161
Re: Codesnippet: Anynews
«
Reply #21 on:
March 05, 2012, 09:10:38 PM »
Will do for Dutch.
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
cwsoft
Offline
Posts: 81
Re: Codesnippet: Anynews
«
Reply #22 on:
March 05, 2012, 10:59:52 PM »
@argos: thanks for your offer, looking forward to implement the updated NL files
«
Last Edit: March 06, 2012, 10:02:11 PM by cwsoft
»
Logged
cwsoft
Offline
Posts: 81
Anynews v2.2.0 RC2 - released
«
Reply #23 on:
March 06, 2012, 10:09:24 PM »
Hi,
issued a second release candidate (RC2) of the upcoming Anynews v2.2.0 at
GitHub
. Updated the
README
to reflect the changes in Anynews v2.2.0.
The second release candidate solves an issues with a "buggy" implementation of the sort by comments feature. Number of comments can now be used in template files via placeholder {COMMENTS} and does no longer depend on selected sort by mode.
If no bugs are reported, I will issue Anynews v2.2.0 (stable) this weekend. So still some days left to get your translations included
Cheers
Logged
Argos
Moderator
Offline
Posts: 2161
Re: Codesnippet: Anynews
«
Reply #24 on:
March 06, 2012, 10:20:24 PM »
Here's the Dutch language file:
Code:
<?php
/**
* Code snippet: anynews
*
* This code snippets grabs news from the WB news module database
* and displays them on any page you want by invoking the function
* displayNewsItems() via a page of type code or the index.php
* file of the template.
*
* This file contains the Dutch language output.
*
* LICENSE: GNU General Public License 3.0
*
* @platform CMS Websitebaker 2.8.x
* @package anynews
* @author cwsoft (http://cwsoft.de)
* @translation
forum member Dave (ak D72), Argos
* @version 2.2.0
* @copyright cwsoft
* @license http://www.gnu.org/licenses/gpl-3.0.html
*/
// Dutch module description
$module_description
=
'Snippet om nieuwsberichten te tonen op elke pagina die u maar wilt. Functie kan opgeroepen worden vanuit de template of een code-sectie. Meer informatie is te vinden op <a href="https://github.com/cwsoft/wb-anynews" target="_blank">GitHub</a>.'
;
// initialize global $LANG variable as array if needed
if (! isset(
$LANG
) || (isset(
$LANG
) && !
is_array
(
$LANG
))) {
$LANG
= array();
}
$LANG
[
'ANYNEWS'
][
0
] = array(
// text outputs for the frontend
'TXT_HEADER'
=>
'Laatste nieuws'
,
'TXT_READMORE'
=>
'Lees meer'
,
'TXT_NO_NEWS'
=>
'Geen nieuws beschikbaar.'
,
'TXT_NEWS'
=>
'Nieuws'
,
'TXT_NUMBER_OF_COMMENTS'
=>
'Aantal reakties'
,
// date/time format: (9:12 PM, 31-12-2012)
'DATE_FORMAT'
=>
' (d-m-Y, H:M)'
);
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Pages: [
1
]
2
3
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...