WBCE CMS – Way Better Content Editing.
You are not logged in.
Ich bin heute angesprochen worden, weil ich mich damit in WB-Classic schon ausführlicher auseinander gesetzt habe.
Was man auf die Schnelle nicht so einfach lösen kann ist die Abhängigkeit von PMF (Practical Module Functions), aber für die Hooks um die Dashboard-Filter im Core einzuhängen hab ich den Patch heute mal für WBCE angepasst.
Es ist zwar inzwischen modules/output_filter/filters/filterOpF.php enthalten aber lustigerweise wird es nirgends aufgerufen. Ich musste daher auch in den neuesten WB-Classic Versionen einen Patch anwenden, um das Dashboard nutzen zu können, und den habe ich jetzt auf WBCE portiert.
Vielleicht kann man das ja in einem der nächsten Releases mit reinnehmen (ist halt schlechtes Timing jetzt kurz nach dem Release, aber in WB-Classic hat es auch Jahre gebraucht, bis ein erster Versuch mal in den Core gewandert ist.
Offline
hier übrigens das Modul, da die Versionen, die im Wb-Classic Forum kursieren wohl teilweise nicht funktionieren, pmf gibts bei AMASP bzw. thorn noch: http://www.websitebakers.com/pages/libs/pmf.php
Offline
...und ein paar Filter bzw. Wrapper, die es erlauben die eingebauten Output-Filter z.B. in einer veränderten Reihenfolge abzuarbeiten (kann man hier auch mehrere Anhänge posten? ich hab jetzt halt mal alle zip-Dateien in ein weiteres zip gepackt)
Offline
Vernünftige Outputfilter wäre schon schön. Und ich denke die 2-3 Hooks werden dem Core nicht schaden.
Persönlich stören mich allerdings so einige Kleinigkeiten an der Implementierung. Zum Beispiel wärs einfacher wen die Filter als Dateien Vorlägen, eventuell als Klassen die automatisch nur bei Bedarf geladen werden .... naja, Autoloader kommt. Auch ist die Verknüpfung mit PMF wirklich extrem.
Danke für den Upload !!!
Last edited by norhei (26.09.2015 22:45:48)
Offline
<offtopic>Mehrere Anhänge -> Beitrag bearbeiten</offtopic>
Wir können die Hooks meinetwegen gern in den Core reinnehmen. Die ganze Filterthematik ist aber so komplex und speziell, dass ich das oder die zugehörigen Module nicht im Core haben möchte. Die Anwendungsfälle scheinen mir überschaubar zu sein, Otto und Emilie Normalbenutzer werden davon nur überfordert und verwirrt und viele "kleine" Modifikationen lassen sich bereits mit Droplets erledigen.
Sorgen sind wie Nudeln: man macht sich meist zu viele.
Offline
Das Modul kann so wie es ist auf keinen Fall rein. Aber über die Hooks werden sich doch einige freuen. Vielleicht später wenn es wirklich überarbeitet ist, oder wir was Eigenes haben. Auch dann könnte man die Interfaces als Admin Tools gestalten, damit man nicht jeden damit belästigt. Sprich, der unsichtbare Teil ist im Core, die Interfaces können nachgeladen werden.
Offline
ok
Sorgen sind wie Nudeln: man macht sich meist zu viele.
Offline
Also , in der Aktuellen Entwicklerversion sind die Hooks für OPF jetzt drinn . Es wäre wirklich toll wenn jemand testet !
https://github.com/WBCE/WebsiteBaker_CommunityEdition
Offline
Funktioniert bei mir einwandfrei.
Wenn man allerdings im Dashboard Filter-Dateien einbindet, die auch im regulären output_filter-Modul enthalten sind, dann wäre der Patch im Anhang noch hilfreich.
viele Grüße,
Martin
Offline
zu den Hooks fürs Dashboard habe ich noch herausgefunden, dass Modul-Filter nicht funktionieren (das ist wohl schon ein älteres Problem, auch in wb classic). Vor Urzeiten hat wohl frondend.functions.php auch die index.php includiert und alles, was dort eingebunden war geerbt. Inzwischen muss man dort separat die Dashboard-Funktionen einbinden, am besten irgendwo oben, z.B. bevor die Frontend-Funktionen beginnen:
// Load OutputFilter functions
if(file_exists(WB_PATH .'/modules/outputfilter_dashboard/functions.php')) {
require_once(WB_PATH .'/modules/outputfilter_dashboard/functions.php');
// use 'cache' instead of 'nocache' to enable page-cache.
// Do not use 'cache' in case you use dynamic contents (e.g. snippets)!
opf_controller('init', 'nocache');
}
auch hier in framework/frontend.functions.php nochmal eifügen, z.B. in Zeile 62 vor "// Frontend functions"
Ohne diesen separaten include sind die anderen Hooks für individuelle Filter auf Module und Spezialseiten wie Suchresultate in dieser Datei leider wirkungslos.
Offline
Mein Vorschlag wäre , einfach den Loader von OPF von unten in der Index.php auf vor dem laden der Frontend Functions zu verschieben.
// Collect general website settings
$wb->get_website_settings();
// OPF hook ,Load OutputFilter functions
if(file_exists(WB_PATH .'/modules/outputfilter_dashboard/functions.php')) {
include(WB_PATH .'/modules/outputfilter_dashboard/functions.php');
// use 'cache' instead of 'nocache' to enable page-cache.
// Do not use 'cache' in case you use dynamic contents (e.g. snippets)!
opf_controller('init', 'nocache');
}
// Load functions available to templates, modules and code sections
// also, set some aliases for backward compatibility
require WB_PATH . '/framework/frontend.functions.php';
Dann brauch man es nicht mehrfach zu laden und das require_once ist auch unnötig
Offline
Da hab ich den Wald vor lauter Bäumen nicht gesehen. Den include der Dashboard-Funktionen in index.php nach oben zu schieben ist natürlich die elegantere Lösung. Damit sind die Funktionen in frontend.functions.php bereits verfügbar und müssen dort nicht nochmal separat eingebunden werden. Super!
Das sollte man jetzt noch testen, aber ich bin zuversichtlich, dass das so funktioniert, wie du es vorgeschlagen hast.
Offline
ich hab's jetzt mal bei mir so wie von norhei vorgeschlagen getestet und das funktioniert einwandfrei.
Ich seh gerade, das ist ja schon im git. super Sache!
Offline
Hi,
this was one of my larger projects during the last weeks/months:
I have modernized the outputfilter dashboard (OPF) module. The old one was heavily based on PMF ("practical module functions). I always had to install these two modules together, but no other module was based on that framework. So the main goal of this release was to get rid of pmf and use up to date infrastructure of current wb installations. The main changes were (see CHANGELOG):
- removed dependencies from pmf
- use phplib templates and usual language files instead of the solutions of PMF
- removed cache functions which are disabled by default and for practical use anyway
- switched from tokens to ftan support
- update documentation (current patches and removed references to PMF from the documentation as well)
after this major re-engineering of the code it would be helpful if some of you could test this version. It does not require PMF anymore, and if you have used OPF in the past together with PMF, you should be able to uninstall PMF after upgrading to this version.
Martin
Offline
Sorgen sind wie Nudeln: man macht sich meist zu viele.
Offline
I have received a first feedback that in latest WBCE there is a problem that the menu is not displayed. Earlier releases of WBCE and WB classic are probably not affected. It's an annoying problem, but it's only cosmetic. I'll post a fixed version, as soon as we have clarified how exactly the changes needed have to look like.
Offline
here is the version that contains the fix for correctly displaying the menu. I just hat to run the upgrade script manually, but maybe it was a collision of two people testing on the same environment :-)
Offline
Uh, the version number... we just had some trouble with updating droplets due to a version number mess.
Could you please just give the fixed version the number 1.0.5 or 1.4.1?
Sorgen sind wie Nudeln: man macht sich meist zu viele.
Offline
no problem. I wanted to switch to single digits anyway (and just switched back in an attempt to work around these upgrade issues
the only thing I have changed now is the version number which appears in the file name, info.php and for information in all header comments.
Offline
Thanks, updated AOR
Sorgen sind wie Nudeln: man macht sich meist zu viele.
Offline
I have an update for the Output Filter Dashboard
It includes a lot of small fixes and improvements and ships again with the example filters which were part of the 1.3 release series.
Many thanks to all who have tested and contributed, especially to Norhei and StefeK for their engaged input.
Offline
here is an update which fixes a problem with the move-up-links and switches from FTANs to IDKEYs in many places of the backend.
This makes it more stable* and should allow to use some functions even without javascript (or when the page is not completely loaded yet when clicking the links).
PS: * In WBCE this was not really a problem.
Offline
Here is an update for OpF:
- a couple of cosmetic bugfixes (correctly display Umlauts in filter list, replace German ss special char with ss in filter description, remove unused filter_id from template parsing, properly initialize TPL_EXTRA_FIELDS_BLOCK in edit_filter, fix for using global LANG inside method in WBCE
- security fix: check ftan for upload
- several fixes for arrays as additional field (like in correct date example)
- fix css edit for filters that provide css
Offline
I have received some more feedback and have another update ready:
- remove unused code part from add_filter to fix array conversion warnings
- update plugin filters to use new placeholders introduced in 1.4.4
in order to pick up this change you have to remove the example filters before upgrading OpF
- update documentation: added a section which explains the use of the constants and placeholders
Offline
Updated it in AOR, sorry for delay
Sorgen sind wie Nudeln: man macht sich meist zu viele.
Offline