-
Posts
7,480 -
Joined
-
Last visited
-
Days Won
146
Everything posted by kongondo
-
include.php, $ _GET, $ _POST and How to change the title to this topic
kongondo replied to blad's topic in General Support
Yes you do ...Just use the 'More reply options' when you are editing the first post you created and you'll get the full editor... But I can change it, no worries -
@Ryan, Would it be possible to also make HTML Purifier configurable then - much like what you've done with CKEditor?
-
include.php, $ _GET, $ _POST and How to change the title to this topic
kongondo replied to blad's topic in General Support
Btw, the including class can of course extend the included one... -
include.php, $ _GET, $ _POST and How to change the title to this topic
kongondo replied to blad's topic in General Support
...maybe let's just change the title to something more descriptive, mark this as solved and maybe you can buy me coffee when am next in Spain? -
include.php, $ _GET, $ _POST and How to change the title to this topic
kongondo replied to blad's topic in General Support
Include as normal...at the top of the class...e.g. require_once(__DIR__ . '/NameOfYourPHPFILE.php');//am assuming this is a class as well class BackendChat extends WireData implements Module { //your class methods } For $ _GET and $ _POST. See $input: http://processwire.com/api/variables/input/ In a module: $this->input->post; wire('input')->get should also work in a class I believe as well as a function. Otherwise, normal use is $input->post, $input->get, $input->cookie -
Well at least three of us (read above...) have tested this and HTML Purifier is stripping the 'benign' HTML5 tags that have been added to the extra allowed content field Sure
-
Mike, not sure you've read previous posts. To avoid wanton stripping of tags, in CKEditor, Turn off HMTL purifier and add add the extra code you want in the 'extra allowed content'....Disclaimer - not sure if this is the best way to go about this + Purifier important if you will be using inline editor mode...
-
OK... Sounds like a job for the new group selectors [OR-groups] See here: https://processwire.com/talk/topic/3768-processwire-dev-branch/?p=64049 Another example here: https://processwire.com/talk/topic/7370-search-for-one-field-or-another-but-with-different-values/ This other related improvement might also be of interest https://processwire.com/talk/topic/3768-processwire-dev-branch/?p=58722
-
Add fields to templates via Configurable Module
kongondo replied to yesjoar's topic in Module/Plugin Development
Done... -
You can't. Well you can do it manually, but you would have to change things around - the code, the templates, etc. Currently, Pages using the template 'category' cannot have children... Btw, the Blog Profile has its own support forum. No need to start a new thread
-
Yeah, go and watch Lionel Messi play . Enjoy your trip though!
-
Schedule Posts Publish and Unpublish dates using SchedulePages module Hello Bloggers and devs! I would like to hear your thoughts on this matter. As you know, there have been requests to implement such a feature in Blog. I have decided to use the module SchedulePages to accomplish this. In fact, I have already implemented this in my dev version and it works brilliantly. Thanks to Jasper for a great module. OK, I need to make a decision whether: Scenario #1: This should be an optional add-on to Blog, i.e. those who want to use the auto-publish feature should go ahead and install SchedulePages and optionally maybe, if found on your server but not installed, Blog would go ahead and install it for you. Blog would then use the feature VS. Scenario #2: Require that auto-publish is always used. In this scenario, the user would first need to install SchedulePages before Blog is installed. If they don't, installation would halt. The issues with #2 is that I feel I would be forcing users to use a feature they may not be interested in or a feature they could implement using other means, e.g. normal normal cron vs lazy cron. I am therefore inclined to go with #1; make the feature optional. Those who want to use it to go ahead and install SchedulePages and Blog would detect that and work with it in blog-post template and quick post dashboard. The way I see it, there's 4 camps of users:. SchedulePages already installed but user does not want to use it with Blog SchedulePages already installed but user wants to use it with Blog SchedulePages not installed but user wants to use it with Blog SchedulePages not installed and user does not want to use it with blog Going with Scenario #1 would cater best for above 4 user camps, I think. Maybe make this configurable in the module post-install screen. Tick a box if you want to use SchedulePages. In that case, the checkbox would be locked for ticking unless SchedulePages was already installed [not just available] on the system (I'll see whether this is doable). Note that SchedulePages itself installs and works with two date/time fields - 'publish_from' and 'publish_until'. Blog would need to add these to the 'blog-post' template after ticking of the above checkbox. This should be doable via an include in init() that would run only once/if checkbox was ticked and SchedulePages already installed. Hope I am not complicating this. Maybe there are simpler ways to effect this? I would like to hear and consider your thoughts, thanks .
-
Ta. In fact thought about this further. I will make this optional. If the user wants to use SchedulePages Blog will use it if it is installed if not, they won't get the experience. I'll write more in the Blog forum...
-
Thanks guys @Adrian, But getInstall() will only install modules available to install on your server no? I mean, it will not go to the ProcessWire modules directory to download (like ModulesManager) and install the 'missing' module, would it? I have tried and I get the message 'SchedulePages' installed but it isn't. I guess I could just write a script to go and download the module if it is not on the server, then install it. I am trying to avoid bundling the third party module with Blog if I can, thanks. Not to worry guys. Changed my mind..., too much effort......I'll just abort if people don't follow instructions
-
Is there a way to abort the installation of a module using the API if a certain condition is not met? I am trying to incorporate the module SchedulePages in my module Blog. Instructions would be for the user to first install SchedulePages. But users being users.... ....In case they attempt to first install Blog, I would like to halt the process if SchedulePages is not found. The reason is Blog will need to grab the two date fields created by SchedulePages and add them to the template 'blog-post'. I tried adding some logic in ___install() and init() but got no joy. Blog module was installed anyway. Should I be hooking into something? What is the process flow when modules are installed? What is called first? This situation I describe also arises because currently, AFAIK, PW will not download and install a third party module from the modules directory just because another module requires it. In my case, just because Blog says it requires 'SchedulePages does not mean PW will install it automatically if it is not bundled with Blog . Such third party modules need to be bundled with the module trying to install them. I suppose that is still the case. I tried Thanks.
-
@Zahari, Not sure that's what Teppo meant? How I understood this is that: 'the moral of the story, if you want to use HTML5, turn off HTML Purifier', no? You are then free to use CKEditor's extra content to add your extra tags. BUT. if using CKEditor's inline mode, IT IS HIGHLY (am not shouting ) recommended to use HTML Purifier
-
Update: Version 1.3.0 - 31 August 2014 Summary of Changes Version 1.3.0 BlogPublishDate - Part of the Blog module suite, new small autoload module to save and preserve a Blog Post's publication date. The value (current time and date) is saved on Post's publish. It can be manually modified. Unless manually modified, the original published date is preserved between subsequent unpublish/publish events. Thanks @Adrian for idea, @SiNNuT and @Soma for code. For new installs, the new module will be automatically installed by PW when you install ProcessBlog. For existing installs, you will have to manually install BlogPublishDate. You will also have to set the field 'blog_date' not to automatically default to current date. Change this in Setup->Fields->blog_date. On the Input tab, scroll to the bottom and find 'Default to today's date?'. Untick the checkbox. Posts Dashboard (see screenshot) Date column: Now shows 'Pending' for unpublished posts (never before published ones), 'Expired' (published then unpublished posts) and published Date for currently published posts Date column: Date shown is formatted according to the format user set in 'blog_date'. Blog's default is 'j F Y g:i a', e.g. 8 April 2012 Date column: Sorting by date column now works correctly. Thanks @webweaver and @Teppo for solution Posts Dashboard, Categories Dashboard, Tags Dashboard Number of posts/categories/tags per page now shown - e.g. 'Posts 1 to 10 of 120' Customisable number of posts/categories/tags to show per page (via a drop-down select). Default is 10. Selected value is preserved (state saved via a cookie - browser specific, of course) per context (e.g. can have different values for posts, categories and tags dashboard) and per ProcessWire user. Thanks to @Nik for code idea. Some code clean-up Pending: - Featured image widget - Auto-publish/unpublish by set date Note: Issue in Dev: If you are running latest Dev, you will get an error about TinyMCE not being the default editor (if it is not installed), etc. when editing Posts. Follow the instructions given by PW. Once PW 2.5 is released, I will change 'blog_body' to use CKEditor.
-
How to set text line/character limits in templates?
kongondo replied to photoman355's topic in General Support
Aaah, thanks. Didn't read it properly, thanks. -
LOL-eeeeeeest!
-
Ah, I see. Yes, it doesn't work directly with video and figure if you add these to the 'Format Tags' box. It worked for me this way though. 1. Add figure, video, etc to the extra allowed content box - see screenshot 2. Switch off HTML purifier - otherwise it strips off your html5 tags later (after save) 3. Use source code editor in CKEditor... It works - i.e. the tags don't get stripped (but no video was loaded ) Now, I am not saying this is how it should be done. I don't know much about the HTML purifier but maybe there is a way to have it allow some tags. Also, there are other ways of customising CKEditor as shown in this tut http://www.flamingruby.com/blog/processwire-weekly-14/#1-4 using a custom config settings file. I don't know if that works with tags though...
-
Hehe...what's a couple of decimals between friends?
-
I did (as shown in that screenshot) and it worked just fine....I tested the editor after adding 'div' to the list of allowed tags. I also tested with the 'extra allowed content' - div[class](*) to allow me to give classes to the divs. Worked fine. The edits stuck even after closing the page I was editing. . Not sure what's going on in your setup but maybe try the latest dev?
-
2.6(+) is not too far
-
How to set text line/character limits in templates?
kongondo replied to photoman355's topic in General Support
Not really....see Ryan's mini-tut here: http://www.flamingruby.com/blog/processwire-weekly-13/#1-2 You can easily do this using CKEditor's Wordcount plugin... Edit: Misread first post. Disregard my post. -
Zahari, On dev branch, CKEditor is currently the default editor. It is highly configurable. Go to the field using CKEditor -> Input -> scroll down to 'Format Tags'. There's a bunch of other extras in there as well