WebsiteBaker Community Forum

WebsiteBaker Support (2.10.x) => Modules => Topic started by: tsaenger on March 07, 2017, 12:07:32 PM

Title: AnyNews 3.7.6
Post by: tsaenger on March 07, 2017, 12:07:32 PM
Hello,
i upgraded my WB to 2.10
Now i get the message form AnyNews:

Code: [Select]
Anynews benötigt Website Baker 2.7 oder höher.
I have installed version 3.7.6

Does s.o. has an idea how to fix it?

Thanks a lot

Tobias
Title: Re: AnyNews 3.7.6
Post by: Hollol on March 07, 2017, 12:28:37 PM
Hi,

please change this:

Code: [Select]
// output message for outdated Website Baker versions
    if ((double) WB_VERSION < 2.7) {
        echo $LANG[0]['TXT_REQUIREMENTS'];
        return;
    }

to:

Code: [Select]
// output message for outdated Website Baker versions
    if (version_compare(WB_VERSION, '2.7', '<')) {
        echo $LANG[0]['TXT_REQUIREMENTS'];
        return;
    }

See here: http://forum.WebsiteBaker.org/index.php/topic,29961.0.html (scroll down)


Edit: if this doesn't work, please delete the whole code. I don't know, if it's necessary.
Title: Re: AnyNews 3.7.6
Post by: Gast on March 07, 2017, 12:36:16 PM
Version 3.7.6??? wo hast die denn her?
Bis zur Projektaufgabe von cwsoft war hier die 2.14.0 die letzte offizielle Version. Ich selber verwende die 2.10.0 mit WB 2.10.1 und PHP 7.1.2. Und bei den Sternchen's ist man wohl bei Vers 3.0.0, weit weg von deiner Versionsnummer.

Sicher, das es die richtige ist? und nicht etwa die vom News?
Title: Re: AnyNews 3.7.6
Post by: sky writer on March 07, 2017, 03:51:57 PM
I received the same message (in English) as the OP after upgrading an old site from 2.8.1 - 2.8.30 - 2.10.0, which still had AnyNews 1.16a running - http://www.websitebakers.com/pages/code-snippets/listings/anynews.php

I upgraded to the newest version I had downloaded - cwsoft-anynews 2.15.0 and all was well.  I originally downloaded this version from cwsoft's github, but now I see there is a new version there.

It is a little confusing.  I can now find three different Module versions floating around:
3.0.0 - https://github.com/cwsoft/wbce-anynews#readme
2.14.0 - http://addon.WebsiteBaker.org/pages/en/browse-add-ons.php?id=0C80D11
2.10.0 - http://forum.WebsiteBaker.org/index.php/topic,23355.msg208185.html#msg208185

Are all of these compatible with WB 2.10.0?  Is one more recommended, and if so, for what reasons?
Title: Re: AnyNews 3.7.6
Post by: dbs on March 07, 2017, 04:09:28 PM
Normally something from the addons repo is the best choise.
- wbce is not wb (WebsiteBaker)
- 2.10 is smaller than 2.14
- seems 2.14 ist right

without testing.
Title: Re: AnyNews 3.7.6
Post by: sky writer on March 07, 2017, 04:37:16 PM
Normally something from the addons repo is the best choise.

I realize that is the case... normally.  But that version 2.14 was released before WB 2.10.0 and News v3.7.6, so I just wanted to see if there was a definitive recommendation or any updates available.

P.S.
I didn't realize that cwsoft github development had changed over to wbce.  Thanks for pointing that out.  My version 2.15 was developed for WB when I downloaded it.
Title: Re: AnyNews 3.7.6
Post by: dbs on March 07, 2017, 04:48:43 PM
I see in my 2.10 test-installation a anynews-dev version 3.x
Works, but is maybe still in development. jacobi22 or Dietmar knowing more, i think.
Title: Re: AnyNews 3.7.6
Post by: tsaenger on March 07, 2017, 04:53:14 PM
Hi
Thanks for your answers.
i changed the code and it works.

Verson 3.7.6 was a misstake. This was the newsmodule.

Thanks a lot

Tobias
Title: Re: AnyNews 3.7.6
Post by: Gast on March 07, 2017, 05:43:18 PM
Quote from: sky writer
I didn't realize that cwsoft github development had changed over to wbce.  Thanks for pointing that out.  My version 2.15 was developed for WB when I downloaded it.

http://forum.WebsiteBaker.org/index.php/topic,27995.0.html

http://forum.WebsiteBaker.org/index.php/topic,27994.msg194918.html#msg194918

Quote from: dbs
I see in my 2.10 test-installation a anynews-dev version 3.x
Vers. 3.0.0-dev x is a not published version from Luisehahne, complete different to cwsoft-anynews

i use this version here with WB 2.10 -> http://forum.WebsiteBaker.org/index.php/topic,23355.msg208185.html#msg208185
Title: Re: AnyNews 3.7.6
Post by: sky writer on March 07, 2017, 07:40:41 PM
Yes, I knew cwsoft stopped developing this module, and left (as you can see by my post wishing him well, in your link).  But as I said (and he noted in his post), his github was still WB when I downloaded the module.  I had not been back to his github for a long while and so when I posted that link today, I overlooked that the github files are now for wbce.  Hope that clarifies my comment.

But to your comment:
i use this version here with WB 2.10 -> http://forum.WebsiteBaker.org/index.php/topic,23355.msg208185.html#msg208185 (http://forum.WebsiteBaker.org/index.php/topic,23355.msg208185.html#msg208185)

When I download that link module the version reads 2.10.0.

And you state:
in attachement a older version of anynews, the latest before cwsoft stops this project here.

But I thought v2.14 was cwsoft's last official version.  Can you give any insight as to why you use version 2.10.0 over the latest 2.14.0 - http://addon.WebsiteBaker.org/pages/en/browse-add-ons.php?id=0C80D11

Thank you for your help.

Title: Re: AnyNews 3.7.6
Post by: Gast on March 07, 2017, 07:50:16 PM
wie erfolgt der Aufruf bei dir? über das Droplet oder über die Funktion? Falls letzteres, bitte mal den exakten Versionsaufruf posten.

{SYSVAR:MEDIA_REL}  ist ein Platzhalter für das media-Verzeichnis. Dieser Platzhalter soll bei einem Serverumzug die vorher notwendige manuelle Korrektur der Bilderlinks in den Beiträgen überflüssig machen. In der Theorie wird in der späteren Ausgabe solch Bildercode eingelesen

Code: [Select]
<img alt="" class="img-responsive" height="100" src="{SYSVAR:MEDIA_REL}/haus/workcamp2009_009_th.jpg" style="" width="137" />
und durch den Filter automatisch ersetzt durch deine WB_URL + Media-Verzeichnis. Zuständiger Filter ist der ReplaceSysvar im Ordner modules/output_filter/filters/filterReplaceSysvar.php.
In der index.php des output-filter-Moduls muß dieser Eintrag vorhanden sein

Code: [Select]
return OutputFilterApi(
            array(
                'WbLink',
                'ReplaceSysvar',
                'CssToHead',
/* ****************************************************************** */
/* *** from here insert ordered requests of individual filters    *** */
/* ***                                                            *** */
/**/
                'ScriptVars',
                'LoadOnFly',
                'Jquery',
                'SnippetJs',
                'FrontendJs',
                'Droplets',
                'Email',
                'OpF',
/* ***                                                            *** */
/* *** end of individual filters                                  *** */
/* ****************************************************************** */
                'WbLink',
                'ReplaceSysvar',
                'RelUrl',
            ),
            $sContent
        );

der Filter ist ab Version 2.10 standardmäßig in WB integriert. Es schaut mir eher so aus, als wäre der bei dir (in der index.php) nicht drin oder in der Datenbank nicht aktiviert.
Ein manuelles Module-Upgrade für den Output-Filter sollte helfen (Erweiterungen -> Module -> Erweitert -> manuelles Upgrad -> Output-Filter


english
how do you call the anynews-function? via droplet or via function? if the last, please post the complete function call here. Thx

{SYSVAR:MEDIA_REL} is a Placeholder for the media-directory in the database. with this placeholder, its not longer needed, to search & replace hard-coded image url in the backup-file, when you move from server A to Server B
in WB 2.10.0 the default activated filter ReplaceSysvar replace all this placeholders in the output with the real WB_URL + Media-Directory.

look also to the index.php from the output filter module, and compare the Array with the code in the top. if you have a different code or a disabled replace-sysvar-filter in the database, start a manuell upgrade of this filter module in Addons-> Modules -> Advanced -> maual upgrade -> output-filter






Title: Re: AnyNews 3.7.6
Post by: Gast on March 07, 2017, 07:55:48 PM

in attachement a older version of anynews, the latest before cwsoft stops this project here.

But I thought v2.14 was cwsoft's last official version.  Can you give any insight as to why you use version 2.10.0 over the latest 2.14.0 - http://addon.WebsiteBaker.org/pages/en/browse-add-ons.php?id=0C80D11


i ask in the past cwsoft for a new function variable, because, i need a SQL-Limit (example: 1. section show only news 1-4, second section shows news 5-8), but no way, so i implement it to my locale version. today i know, i can use twig for that, but the module in vers 2.10 run's, not needed, to spend time in a upgrade
Title: Re: AnyNews 3.7.6
Post by: sky writer on March 07, 2017, 08:09:09 PM
Okay, thanks for clarifying.
Title: Re: AnyNews 3.7.6
Post by: Gast on March 07, 2017, 08:23:00 PM
alternative solution (but need also a working filter module)

anynews - include.php search for this line (in my version ~231)

Code: [Select]
$row['content_short'] = ($strip_tags) ? strip_tags($row['content_short'], $allowed_tags) : $row['content_short'];               

and add behind this new line

Code: [Select]
$row['content_short'] = OutputFilterApi('WbLink|ReplaceSysvar', $row['content_short']);

then search for this line

Code: [Select]
$row['content_long'] = ($strip_tags) ? strip_tags($row['content_long'], $allowed_tags) : $row['content_long'];                 

add here also a new line with

Code: [Select]
$row['content_long'] = OutputFilterApi('WbLink|ReplaceSysvar', $row['content_long']);
Title: Re: AnyNews 3.7.6
Post by: tsaenger on March 08, 2017, 09:19:35 AM
super, vielen Dank das hat geholfen.

Thanks a lot, now it works!

best regards

Tobias
Title: Re: AnyNews 3.7.6
Post by: cwsoft on March 08, 2017, 09:38:53 AM
@skywriter: My latest WB release of Anynew was 2.14.0 and can be found here: https://github.com/cwsoft/wbce-anynews/releases

The documentation for this WB release can be accessed via: https://github.com/cwsoft/wbce-anynews/blob/62ec7993223e4380041168f8c316ed811d49833e/README.md

However you should use the version provided and maintained by the WB community to have the latest available version for WB.

Hope this helps to clarify.

Cheers cwsoft
Title: Re: AnyNews 3.7.6
Post by: Gast on March 08, 2017, 10:37:17 AM
super, vielen Dank das hat geholfen.

Thanks a lot, now it works!

was davon genau?