Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 27, 2012, 05:20:22 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
.
155555
Posts in
21715
Topics by
7737
Members
Latest Member:
gx-world
WebsiteBaker Community Forum
English
Archive (posts up to 2007)
(Moderator:
Argos
)
Output Filters
Pages: [
1
]
Go Down
Author
Topic: Output Filters (Read 1338 times)
scullion
Offline
Posts: 9
Output Filters
«
on:
December 13, 2007, 06:47:12 AM »
Hi there,
Is there any clean way to implement an output filter (or, better, a chain of those) without hacking into the WB core? As an admin module, perhaps?
Possible uses of such a module:
- tag removal/substitution;
- obscene language filtering;
- usage of system/custom constants in plain text blocks;
- etc.
Thanks in advance for any suggestions.
Logged
doc
Guest
Re: Output Filters
«
Reply #1 on:
December 13, 2007, 09:21:59 AM »
Hello,
have a look on the no spam script I posted somewhere in the forum (can also be found from the addons site; unofficial modules). The script searches for mail address links and replace some of it to make it not so easy for spam robots to extract mails (frontend.functions.
php).
Christian
Logged
scullion
Offline
Posts: 9
Re: Output Filters
«
Reply #2 on:
December 13, 2007, 01:38:02 PM »
Thanks, Christian.
If I see it correctly, your first module (nospam) does not actually process any output, merely offering the mlink() function instead, but the second one (spam_protection) -- that is really close to what I'm looking for! (And I hope I'm not the only one.)
Speaking of which, here is a suggestion: why not make this feature a bit more universal and use it not only for e-mail obfuscation but for virtually any kind of output filtering? One could define regex-powered substitution rules in, say, "Settings" section, which are then parsed by class.frontend or frontend.functions or whatever part of the core responsible for filtering and, finally, applied to the output one by one. (And no system file is touched, not even config.php!)
Of course it should be carefully considered how/whether to enable/disable such filtering on a per-page basis; how to specify/store rules; which rules to include by default etc., but I hope the idea is clear.
I think this is a useful and powerful feature that could become quite an addition to the next releases of WB.
Logged
doc
Guest
Re: Output Filters
«
Reply #3 on:
December 13, 2007, 04:25:53 PM »
Hi,
yes I was talking about the second tool in the thread (spam_protection). Well yes, it is very powerfull, but one needs to use this with care (as can be seen from the discussion). When using regular expression to filter out stuff, one needs a lot of thinking (classes, ids, styles ....).
This features may make up its way into the next WB version, however, I doubt that we will give the user the freedom to define regular expression by its own. Hope you can manage to modify the stuff to your needs.
Regards Christian
Logged
scullion
Offline
Posts: 9
Re: Output Filters
«
Reply #4 on:
December 13, 2007, 05:06:30 PM »
Hi Christian,
I'm afraid I don't quite understand what you mean saying that you "doubt that we will give the user the freedom to define regular expression by its own". To me, it sounds like you are going to voluntarily shoulder the load of defining regexps for thousands of users out there -- and then spending your time replying to their feature requests, updating the core and releasing new WB versions? Or, if not, then strictly limiting the possibilities?
Your spam_protection module is really great, but you are implementing a special case of a huge application domain. Of course using full power of this feature will require from admins quite a bit of thinking, but so does module or template development, doesn't it?
No doubt I can manage to make stuff work for me, this way or another, but I'd prefer doing it in a non-destructive way. And if at the same time it contributes to project's development -- even better!
Logged
doc
Guest
Re: Output Filters
«
Reply #5 on:
December 13, 2007, 05:18:43 PM »
Hello,
well personally I do not like the idea of output filtering at all. I implemented this as a measure against harvasting mail addresses. Think if we implement such a feature to any future WB 2.x version, we will limit the possibilities (only allow to switch on/off, only allow to specify replacements for parts of the mail address).
I think WB is a great CMS due to its simplicity. Adding tons of features to the backend will not help to keep this status. With WB 3.0 in mind, we should avoid putting more and more functions into WB 2.x tree. And the usage of regular expressions will be at least one level too high for most of the WB users. In addition this method does only work for output generated by WYSIWYG pages. Content outputs of modules are managed via the view.php of the individual modules.
Regards Christian
Logged
scullion
Offline
Posts: 9
Re: Output Filters
«
Reply #6 on:
December 13, 2007, 05:54:05 PM »
Hi Christian,
Okay, I agree that the core should stay as small and simple as possible, but how about giving more flexibility to module developers, then? For example, what about hooks that could allow modules interact with the core at different stages of page rendering? Of course it's a step away from simplicity, but the line between simplicity and inflexibility is very thin, after all.
Logged
doc
Guest
Re: Output Filters
«
Reply #7 on:
December 13, 2007, 06:06:07 PM »
Hello,
the only change in WB 2.x is to make us of the module type Code Snippets introduced with WB 2.6. They allow to define own functions which can replace the core files. What you are asking for would require to rewrite the entire WB 2.x core - what I believe will not happen.
However, you can express your wish to the board: WB 3.0 wishlist (search for WB 3.0 and Ryan). The work on WB 3.0 is not started yet, so it is still some time to get your ideas in.
Regards Christian
P.S.: Sounds you have some experience with coding. Are you willing to contribute e.g. modules or stuff like that?
«
Last Edit: December 13, 2007, 06:07:49 PM by doc
»
Logged
scullion
Offline
Posts: 9
Re: Output Filters
«
Reply #8 on:
December 14, 2007, 06:20:09 AM »
Thanks, Christian.
I doubt you'd have to rewrite the
entire
core to introduce hooks, but you should know better, after all, since you seem to have spent some time in the project.
I didn't take time to take a deeper look at the core yet.
On the other hand, I probably should do it. And, well, make the stuff work for me, as you say.
To be honest, this scares me a bit: every n-th reply in this forum suggests "go there or there and adjust file abc.php, this should work". Of course it will, but how to apply updates when another WB version arrives? One can't just go messing up with system files!
I was looking for a nice and simple yet flexible CMS, and WB caught my eye. (Hats off to the dev team!) And I believe that with some tweaking and "flexing" it can truly become the one I was looking for. But if it remains at the point of page and user management and does not solve such essential CMS tasks like content reuse, module chaining, output filtering etc. in an elegant way, I'm afraid I'll have to go on with my search.
As for contributing -- yes, I have
some
coding experience (10+ years of software engineering, in fact), and I'd like to contribute indeed. But I cannot start with modules until I understand what your road map looks like. So I guess I'll just stay in the forum and/or tracker for the time being, putting in my two cents every now and then, and see what happens.
Logged
doc
Guest
Re: Output Filters
«
Reply #9 on:
December 14, 2007, 08:51:37 AM »
Hello scullion,
thanks for your reply.
Well about 90% of the suggestions "go to file xx and change lines YY" come along with a clear statement that you need to keep in mind that every new version of WB will overwrite modifications applied manually. So it is up to the user. WB offers code snippets to put and/or overwrite core functions without touching the core files. Another solution is to write a module which fits this purpose.
However, all those "requests" are very special and not asked very often (as your request for output filtering). It was never my attention to offer a solution for filtering output, my intentions was to provide the functionallity to protect mail addresses with ease. Most likely this option will be integrated into a WB 2.7 release.
As the last X replies are not related to the spam module (which the whole thread is dealing with), I suggest we stop discussion in this thread. As already mentioned, please feel free to put your comments in the WB 3.0 thread started by Ryan. This is the right place to ask for a schedule, offer your help, or to address your feature requests like hooks to WB core functions.
Regards Christian
Logged
scullion
Offline
Posts: 9
Re: Output Filters
«
Reply #10 on:
December 14, 2007, 08:10:52 PM »
Thanks, will do that.
Logged
Pages: [
1
]
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...