-
Posts
6,808 -
Joined
-
Last visited
-
Days Won
159
Everything posted by Soma
-
I can't reproduce and I don't have Database.php #118 (empty line) What is the PW version and PHP, MySQL ? The error states that it tried to set a string on the integer field, and there's nothing wrong with RangeSlider. (BTW, your code would need a $clone->of(false), or it will throw an error) $clone = $pages->clone($pages->get('/test1/')); $clone->of(false); $clone->title = 'Test1 Clone'; $clone->name = 'test1-clone'; $clone->save();
-
The error says exactly what you have to do: Save the page before files can be accessed...
-
No it's only as complicated as you make it A ship full of. This might work.... Its name is "delete_fieldname_hash" and this is how PW does process it $id = $this->name . '_' . $pagefile->hash; ... if(isset($input['delete_' . $id])) { $this->processInputDeleteFile($pagefile); $changed = true; } So I think you can simply loop the pagefiles you have on page and create the id as above and check for if any checkbox is set and delete the file. foreach($page->pagefiles as $file) { $id = "pagefiles" . "_" . $file->hash; if(isset($input["delete_" . $id)) { $page->pagefiles->delete($file); } }
-
Page link abstractor doesn't work with language text fields.
- 6 replies
-
- textareaLanguage
- TinyMCE
-
(and 1 more)
Tagged with:
-
Sorry, I think I missed this or ignored it because it's very hard to decifer your code and with very little initiative from you trying to find out. You may already have solved it but after taking a short look at the code I think I found something $field->addOption($d,$d); I think the problem is that the $d is a formated date string? Maybe the value (first argument) should be a timestamp... or at least converted to timestamp before assigning to the $page->time. You know that's lots of beer there?
-
Kongondo. Thanks for doing this but you better wait until Ryan updated the sheet to 2.3 v.
- 24 replies
-
- processwire book
- ebook
-
(and 1 more)
Tagged with:
-
I just setup my install to again use this module and copied the code you linked and it works "out of the box". It's hard to say without knowing/seeing what you got. Also I don't know if you're aware that I recommend to use the new LanguagePageNames module now in latest core. Though it would be possible to switch later. Just so you know. LPN solves all drawbacks this module has and it was a workaround in the first place.
-
It's the forum software cheating on me
- 24 replies
-
- processwire book
- ebook
-
(and 1 more)
Tagged with:
-
Why do you want this anyway? The current parents are already marked with a class you can define. Default "parent". I'm not too excited to add another template option, as we will have a new option every other week someone thinks this would be useful. However, for that reason I created a function (getTagsString) you can hook into to change a child's output. There's some example further up this thread, but just to give another example: $nav = $modules->get("MarkupSimpleNavigation"); function hookTagString(HookEvent $event){ $child = $event->arguments('page'); // current child in navigation $parents = wire("page")->parents; // parents of current page if($parents->has($child)){ // is current child an active parent? $event->return = "<span class='parent'>$child->title</span>"; // return something } } $nav->addHookAfter('getTagsString', null, 'hookTagString'); echo $nav->render();
-
PW Online Installer (download of latest PW install to server)
Soma replied to Soma's topic in Modules/Plugins
Looks like you don't have openssl installed... It says in the readme, "put this script where you want to install PW" so yes it will download files to where the script lies. Yes the DB you have to create yourself. -
Goto http://cheatsheet.processwire.com , File -> Save Page as... or context click on page -> Save as... Enjoy.
- 24 replies
-
- 2
-
-
- processwire book
- ebook
-
(and 1 more)
Tagged with:
-
Pull today's events to home page from fullcalendar event page fields
Soma replied to ljones's topic in General Support
You have input (backend) and output (front-end) formatting for date fields. I think you miss understood what I was trying to say about output formatting: To get the unformatted timestamp of a datefield you can do $timestamp = $child->getUnformatted("date_start"); instead of $timestamp = strtotime($child->date_start); Which depending on the format the date has, will fail to get the right timestamp. So a more bullet proof way is to do this in your code: strftime("%l:%M %P", $child->getUnformatted("date_start")); -
There's nothing special about it, it just works. Page url is localized automaticly by current user language.
-
Proof of Concept: ProcessWire Admin Theme Switcher
Soma replied to kongondo's topic in Themes and Profiles
No problem, I just commited an fix update regarding openssl check which was a faulty if/then check introduced by a pull request... But has nothing to do with your issue. Sorry to hijack you thread -
Proof of Concept: ProcessWire Admin Theme Switcher
Soma replied to kongondo's topic in Themes and Profiles
I'm not sure. It works well: It just downloads and move or replaces the site/templates-admin/ folder. -
Proof of Concept: ProcessWire Admin Theme Switcher
Soma replied to kongondo's topic in Themes and Profiles
In MM there's a "download" button on themes that have a url, just click download and voila. -
Page edit per user module has 3 categories that make sense. Yours had 10+ and some nothing to do with this module.
-
Proof of Concept: ProcessWire Admin Theme Switcher
Soma replied to kongondo's topic in Themes and Profiles
Im not sure I can follow, but did you know you can switch themes with ModulesManager? -
Ah I think you're best off with setting the outer wrapper template to '||' and add opening and closing UL after. I then also think it would be nice to have a include in the top level thing.. and if has_parent would allow multipe it would already be easy... have to think a little more. With checkboxes it would still be the same issue with parents.
-
If you think I missunderstood, why not show what the result should be like? I think I understood what you want and showed what parent and has_parent does. There's so many ways to archive something there might be a better solution. You could for example add checkbox to top level pages and use that instead of making the top level pages you dont want to show hidden.
-
@kongodo, but I don't use Modules page anymore I didn't see that the Textformatter is the mother module. At the end it got installed but it's confusing. Of course it has to do with ModulesManager and the nature of the modules. Modules Manager doesn't know what modules are there and how to install. It takes the module "class name" that is entered on modules.processwire.com to create folder and installs the main module. It's all information I got from modules.processwire.com and there's no manifest, dependencies or lifecycle informations to modules in PW (which IMO is requires rather sooner than later) For some reason it seems now Ryan has changed the module class name to "TextformatterHannaCode", and this should work better now. Though changing those settings "class name" is dangerous once the module is installed via ModulesManager, because there's actually two different folders for the same module.