-
Posts
461 -
Joined
-
Last visited
-
Days Won
7
Everything posted by Tom.
-
Apologies, I wanted to be more direct with the code examples I gave him so he could just drop it in. The guy above is the same approach I used.
-
Hello Laban, This is quite easy with ProcessWire, however it's not easy to explain over the forum. You need to use AJAX searching and it will mostly be driven by javascript. Just send me an inbox and we will discuss. Thanks, Tom
-
Wouldn't it be as below? function preparePost($item) { $item->set('foo','bar'); } $featured = $pages->find($selectorstring); $featured->each(preparePost($item)); var_dump($featured->each('foo'));
-
Can you do a search for "1464507951" in the column "created"? SELECT * FROM * WHERE created = 1464507951
-
Cannot edit or delete images in image field after update to 3.0.18
Tom. replied to MarcU's topic in Getting Started
No idea whats going on here, it looks like an error with CSS/Javascript. You did say you did an update from 2.7 to 3.0.18. So I would assume one of the two things: 1 - Caching is to blame, clear your browser cache and see if it updates the CSS/Javascript. 2- Wire folder was incorrectly copied across and you should replace your Wire folder with the 3.0.18 downloaded again. -
This is the first time I've come across such thing, I'll have a look into it myself. I'm always eager to stay up todate on technology. Is this a way to run things such as Debian using Googles cloud service? By significant change in cost do you mean cheaper or more expensive?
-
I've used $wire->addHook, it seems to be working, however I was just wondering if this was incorrect and that I should use the namespaced wire().
-
// create your hook function function myHook(HookEvent $e) { echo "30 Minutes have passed!"; } // add a hook to your function: wire()->addHook('LazyCron::every30Minutes', null, 'myHook'); I'm trying to use above in my template file, however I'm getting the error: Error: Call to undefined function wire() Any ideas why this isn't working? Edit: $wire->addHook seems to have got it. Is this still correct syntax?
-
Any news on this? Would love to see it implemented.
-
Sorry maybe I wasn't clear: Any child that is featured=1 will be sorted by the time they are on, and any child that isn't featured will be ordered alphabetically.
-
Hello, I was wondering if there is a simpler way of sorting like this using the API selector: $items = $page->children("sort=title"); $featured = new PageArray(); $featured->add($items); $items->prepend($featured->filter("featured=1")->sort("timeon")); Basically I'm wanting anything that's featured to filter by the time the artist is playing ("TimeOn") and for the rest to filter by title. I know above isn't exactly bloated, but I was just wondering if there is something simpler? Maybe a way of doing this inside the selector. This method is quite nice because ProcessWire automatically removes duplicates so it orders perfectly.
-
Hi am*, Welcome to the forum, you will find that ProcessWire is called a CMF over a CMS and for very good reason, it's incredibly flexible. There is nothing you mention which stands out of the ordinary. ProcessWire has been used from everything to simple one pages to Project Management Systems, and it performs extremely well in all walks of (development) life. I would encourage you to check out the new documentation https://processwire.com/api/ref/ Updating fields such as if someone becomes a paying user, it's incredibly easy: $user->of(false); $user->addRole('member'); $user->save(); One thing to remember in ProcessWire is everything is a page, this means the API is incredibly simple not matter what you want to do, as the syntax is completely the same across all different types of pages.
-
Really really glad you've updated Croppablefield! I have really wanted to use it in the past but had issues with 3.0, I assumed you was no longer support the project as it had been dropped a few times in the past. Keep up the great work! I'm going to use this in the future Great work to everyone involved with the new image field update! It looks amazing
-
I believe $pages->findOne() maybe useful here also
-
PW 3.0.15: New quick-tree, debug, view panels and more
Tom. replied to ryan's topic in News & Announcements
Would also be awesome for be able to utilise the PW Panels for the PageTable field. -
PW 3.0.15: New quick-tree, debug, view panels and more
Tom. replied to ryan's topic in News & Announcements
Next I would love to see quick search on the page tree still showing the parents if any. -
PW 3.0.15: New quick-tree, debug, view panels and more
Tom. replied to ryan's topic in News & Announcements
Amazing update! Thanks Ryan -
A year on, I've just ran into this problem. Is there any update on this? None is present on the date field, however it defaults back to one of the settings. Is this a bug? - I understand there is another option just for time fields using a plugin, however I feel this adds bloat if the functionality is already there.
-
redirect to last/previous page after user log-in
Tom. replied to adrianmak's topic in General Support
Correct -
redirect to last/previous page after user log-in
Tom. replied to adrianmak's topic in General Support
You could use javascript to redirect using the code below on your login page: <?php if($user->isLoggedin()) { echo "<script>history.go(-1);</script>"; } ?> -
Creating a slideshow and grabbing each child with image field
Tom. replied to Danjuan's topic in General Support
Hello - Welcome, It isn't possible to do PHP in CSS. However it's possible to do CSS in PHP. <!-- HERO--> <div class="section" id="hero"> <?php foreach($page->children as $child) echo "<div class='slide' id='hero-slide-$child->title' style="background-image: url('{$child->hero_image->url}')">$child->title</div>\n"; ?> </div> <!-- /HERO--> -
Oops, yes it should, however the previous format did work. It shouldn't have. It echoed out fine. Even with swap around it's still being replaced with spaces.
-
I'm sure I've used $sanitizer->selectorValue($value) many times before. However in this case it's getting rid of the | bar and replacing it with a space. Here is my code: $selection = implode($input->get->filter, "|"); $input->whitelist('filter', $selection); if($selection) { $selection = ", category.name=" . $sanitizer->selectorValue($selection); } $activities = $pages->find("template=activity|event, limit=1, sort=title{$selection}"); Filter is a checkbox.
-
Hey BitPoet, Mod_Security is enabled, however this has only just started happening. I've been using it for over a month now and this has only just started. It might be worth mentioning that this doesn't happen on a ProcessWire website hosting on the same server. It seems to have been the update to 3.0.8 that caused it? Thanks, Tom