-
Posts
4,956 -
Joined
-
Last visited
-
Days Won
100
Everything posted by LostKobrakai
-
It's down. http://isup.me/www.aaahosting.de
-
Project Management for Developers: How you do it?
LostKobrakai replied to Vineet Sawant's topic in Pub
I do like Slack, too, but never came to use it as I mostly work on my own. -
In your php.ini look for the value for this key: memory_limit.
-
If you only need to remove them once, so that you can work further with the cleaned texts, just use the api like this: $text = $page->getUnformatted("body"); // Just to be sure that no textformatters change something $page->of(false); $text = str_replace("<p>", "", $text); $text = str_replace("</p>", "", $text); $page->body = $text; $page->save("body"); Edit: If you have normal paragraphs, too, you should use a more sophisticated search/replace option.
-
If I understand correctly you have a PageField, where someone can select between "Chair" and "Vice Chair" and if they do so they should fill out an email field on this page. If your Pagefield consists of exactly three values (empty, 1062, 1063 OR 1061, 1062, 1063) you could do it with this: !chair_vice='' !chair_vice=1061 But anyway, have you tried using your second suggestion? Maybe it's already implemented by now.
- 2 replies
-
- inputfield
- dependencies
-
(and 3 more)
Tagged with:
-
How do I determine if a pagefield is emtpy via a selector? The pagefield is setup as single entry with boolean false return value.
-
ProcessWire doesn't store metadata of changes, it only stores the new values and that's it. If you want to get this functionality, you would need to build a small module which hooks into page::save and saves the date to a hidden date field, if the checkbox got checked. This way you can store and sort by date and status.
-
Yeah, after a little but of pulling my hair out I found the culpit. I had a page field with this selector: return $page->event->children(); which of course should be this: return $page->event->children;
-
I was trying to find out, why one of my PageTables always refused to add a new page, instead it replaced the old entry. This all happened via the api. I have a setup where theres a folder for event applications (own template) and the applications as children. Now if I want to manually add a child to the folder I get this error. The old pages, which already exist there are still editable, while the new one also throws this error if I try to edit it. Does someone know what could cause this problem? PW-Version is 2.5.3
-
Do I remember wrong, or is the fancy send to trash icon thingy gone from the theme? Edit: It's still there, if you go to "move" the item.
-
@kongondo I don't want do discurage buying pro modules, especially if you earn money with it. But for private/small websites, this can be an option, which I wanted to highlight. There are also other reasons to buy the pro version.
-
@jacmaes One wouldn't even need the Pro Version to do this. If you don't need the flexibility to set this up in the admin backend, you can easily fork the existing ProcessUser module, to get what you described.
-
Thanks for all your replies. I know about closures and context (even if I'm not perfect in it). I tested it further and found that the issue doesn't have to do with the way I build my object. I get my postet throttle function to work, if I use it like felix did in his jsfiddle. This works: … $(window).on("scroll", this.throttle(function, 200)); … But this doesn't: … $(window).on("scroll", this.scroll); … scroll: function(e){ HONourables.throttle(HONourables.function, 200); } Each time the context should be the window object as it's fireing the scroll event. But somehow the throttle function in the first version is only called/initiated once, while the second one is, as I would expect it, called over and over.
-
Look at the field settings of your image-field, if it's accidentally a file-field, try to change it. That's what I think cstevensjr meant.
-
I had to think about Somas answers a bit, too. To clarify for others looking at this: Deleting the page also removes the page from all pagefields it's assigned to. That's why the find doesn't return the expected results, even though the id is still saved as a variable.
-
set checkbox to checked based on 'if else' statement
LostKobrakai replied to pjf5066's topic in General Support
ProcessWire handles checkboxes internaly with 0 and 1 integers. So you need to do this, to enable the checkbox field and save it. $page->of(false); // disable output formatting $page->checkbox = 1; $page->save(); -
Does this work in 2.5 stable? Thought it's been added only on the dev version.
- 206 replies
-
- standarisation
- templates
-
(and 1 more)
Tagged with:
-
An addition to Soma's argument. You don't need to write the markup as php strings if you use templates, which you later parse to a string you can store in a variable. It's actually quite easy: $template = new TemplateFile($config->paths->templates . "PATH_TO_TEMPLATE"); $template->set("headline", $page->title); // Will be $headline in the template-file $markup = $template->render(); This way you can write markup, as you do now, for single parts of the page, which you can dynamicly stitch together on page render. This should be more scaleable than copy pasting them from one template to another.
- 206 replies
-
- standarisation
- templates
-
(and 1 more)
Tagged with:
-
I'm currently trying to build all my javascript in a own object namespace for the first time. Now I wanted to implement a throttle function to limit the scoll and resize event calls. While I found a working debounce function I didn't manage to get one which calls the event function at a limited rate instead of at the end of all those event calls, which is especially important for the scoll events. var HONourables = { win: $(window), init: function(){ this.establishEventListeners(); }, establishEventListeners: function(){ this.win.on("scroll", this.scroll); … }, scroll: function(e){ HONourables.fixHeader(); }, throttle: function(fn, ms){ }, […] } That's my current structure and ideally I'll be able to throttle the function calls in scroll() independently. Sadly all the ones I found all broke after putting them in the object structure, while working in a simple jsfiddle testcase. Can somebody point me in a direction to get this working? Edit: One of the functions I found: http://jsfiddle.net/vu9hrrvk/
-
Filter system for extensible data modification
LostKobrakai replied to gyo's topic in Modules/Plugins
As you call it, they are TEXTformatters. The given example with the select field, which has a label and a key, is more than text. I could also image using this, if you use more than one date format throughout your layout and you would like the ability to quickly customize each of the formats. -
+1, even lots of weeks later
-
User admin roles..that can only add new users with certain roles
LostKobrakai replied to Sinmok's topic in General Support
The first question to ask would be, if you want this to happen in the processwire admin backend or via a selfwritten frontend form on your site. The latter is explained by davo, while the first one would need a different approach. Initially the backend only offers a "user-admin" permission, which grants full user editing permission. You would need to enhance the permission management via a small hooking module to get your restrictions working there. -
Make languages installable via modules
LostKobrakai replied to Nico Knoll's topic in Wishlist & Roadmap
I think the core translation could easily be a module. Module translations could also be a module, this could even add the ability to depend the translation to specific versions of the module. But the site translation is something I don't know if it should be a module, as it's nothing that's getting installed, it just grows as you develop the site. -
It's looking really nice and clean. Even if it's stuffed with navigational elements all the time. I have some small things which I noticed. The calendar icon in the header is not clickable, while being the most poping thing of the navigation. Also I don't know if the phrase "zu den Privatpraxen" will be noticed as standalone link easily, es every other link in the header is a button. It could also be an additional label vor the "Ärzte" button. The other thing is more to please my typographical background. You're using the wrong dashes for the timetables. The normal dash " - " is a "Divis", only to be used for hyphenation or appending units to numbers and such things. The little larger one " – " is the "–" html-entity or also "Gedankenstrich" in german. It's one usage is kinda like a comma to divide different thoughts in a subordinal cause, but a little bit more visible. The other big usage is in things like timetables. Every time you're calling stuff "von … bis …" the "bis" should be replaced with the ndash. This fits not only for times, but also for example for routes: Berlin to Paris. There's also the really long one " — " (—), which is called "Geviertstrich" but it has no distinct usage in modern typography. Shortcuts for Mac: Alt + - => – Shift + Alt + - => — Shortcuts for Win: Hold Alt and hit 0150 on the number block => – Hold Alt and hit 0151 on the number block => —