-
Posts
6,798 -
Joined
-
Last visited
-
Days Won
158
Everything posted by Soma
-
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.
-
I think this module has a little bit too much categories http://modules.processwire.com/modules/page-edit-per-role/
-
I'm not sure I understand, but can't you just set them "hidden"? The include this and that ID approach won't work with hierarchical tree of course, but exclude would. "id!=1001|1005" "parent=1002|1003" would also work but only for direct children. "has_parent=1002" only works for 1 parent, but would include all children levels. So best option is the one built for such things, make the pages "hidden".
-
If you're no aware of this, you can get the selectors string that is used to produce a resulting PageArray with $a->getSelectors(). http://cheatsheet.processwire.com/?filter=getSelectors&advanced When printing this out in your templates html, I noticed that if you have used a "<" operator it will cut off the string from there, because it's rendered in html. To get around this simply use: echo htmlentities($result->getSelectors());
-
Pull today's events to home page from fullcalendar event page fields
Soma replied to ljones's topic in General Support
The output formatting of date field you can define in the field settings "Details" and "Input" for in and output format. To get the timestamp value you have to get around output formatting: $timestamp = $child->getUnformatted("date_start"); I'm not sure about your problems with strftime. %i for strftime doesn't exist. http://www.php.net/manual/en/function.strftime.php To get pages from today you'd have to get the 00:00 and 23:59:59 from the day and compare it in the selector. Or you can use "today" or any strtotime keyword and PW will take it. $start = strtotime("today"); $end = strtotime("today + 1day"); $pages->get("/events/")->children("date_start>=$start, date_start<$end"); or $pages->get("/events/")->children("date_start>=today, date_start<tomorrow"); -
Turn off your Adblocker and it should be fine
-
Looks like a very useful module, thanks for sharing it Ryan. I just tried to install it using ModulesManager, and I can't install it right after downloading as it requires Textformatter module to be installed. TemplateFile: Module ProcessHannaCode requires: TextformatterHannaCode #0 [internal function]: Modules->___install('ProcessHannaCod...')... Couldn't it be installed when installing the process module? Edit: When I create a new hanna code and not enter a tag name and save I get an error and can't see the form.
-
Very cool! And it load so much faster than before!
-
I'm not sure what you're trying, but the module expects a "root" page from where it renders the children of that page. On a side note "has_parent" only accepts one id and only makes a difference if the parent is one of the children of the root page. To understand a little better, can you explain what you want with those id's? Are those the only page that should show up, or are they the "parents" from where it should render a nested navigation?
-
And they're not errors but warnings.
-
Yes you have to make sure it posts to a url with a trailing slash. Or it will redirect to the /test/ and change to GET. If urls segment is enabled, its without trailing slash like /test/segment. It doesn't get redirected without trailing slash.