-
Posts
214 -
Joined
-
Last visited
-
Days Won
8
Posts posted by felix
-
-
On a sidenote jwt is perfect when things need to "scale" (i.e. in a microservice architecture). Just share the secret across multiple instances and you don't have to care about syncing sessions and related data. The backend thus can be "stateless" (regarding logins) and just used to deliver data.
- 3
-
I've just recently used barba.js when relaunching the frontend of https://www.priotas.de/ (a processwire based website). As teppo mentioned: That's pretty much what you're looking for.
- 4
-
-
ProcessWire (again) is featured in the c't: One of Germany's biggest and most renowned IT magazines. The article is about alternatives to WordPress.
WordPress-Alternativen: CMS-Auswahl leicht gemacht
- 3
-
Thanks Horst. It worked. I'll ping Ryan soon!
-
Is there any chance that this module will be updated to work with 2.8.x?
-
Any updates on supporting PW3? As it's almost done now would be the time. Right?
- 1
-
I'll also start tracking my vital signs, soon. But after a lot of "research" I'm going to to buy a Garmin Vivosmart HR (longer lifetime, more accuracy...) instead. I'm also slightly overweight atm but cycle about 100-150km(63~93miles) per week (for the last 5 months). Currently I use Strava to track my rides. As I'm always cycling with my mobile phone as a tracker there was no need for a gps enabled device (otherwise I would most likely have chosen the vivioactive hr). You should really check out garmin products instead of fitbit from what I've heard and read.
- 1
-
Another post on t3n using processwire as an example of why classic CMS aren't always the best choice.
(And as expected: Immediately random Typo3 fanboys with no pw experience whatsoever popping up and start hatin'. Business as usual).
- 6
-
Same for me :/
-
This would be awesome!
-
Hey folks,
I'm trying to cache a lot of event & news entrys that get loaded on several pages. There are two conditions that - when met - require the cache to be invalidated:
- A page with the Template "news-detail" is saved
- The Cachefile is older than "Today at midnight"
The first condition is easy (see code below). What about the second?
Is there a way to combine both conditions (template change and caching time) using the cache api? Will I have to use cron/lazycron to purge the cache every 24hrs?
private function getCachedNews($parentId, \PageArray $filter = null) { $template = wire('templates')->get(self::NEWS_TEMPLATE); $cache = wire('cache'); $addedFilters = ''; if(!is_null($filter)) $addedFilters = '_' . $filter->implode('', 'name'); $newsSelector = 'news_' . $parentId . $addedFilters; $news = $cache->get($newsSelector, $template, function($pages) { // here be newslogic dragons [...] return $retVal; }); return $news; }
-
Google today announced it's competitor to Facebooks "Instant Articles": "AMP"(Accelerared Mobile Pages)HTML. Based on open source technologies (Basically it's a set of Web Components and a JS-Framework that loads and caches resources) it seems very promising. As far as I understand media is cached, served and proxied by google (and some tech partners).
Btw: processwire as a system could benefit from/partner with it, too: https://www.ampproject.org/faq/#accelerated-mobile-pages-9
I'm really looking forward to playing around with it. Anyone else already fired up his editor and started fiddling around?
- 4
-
No need for ORM. Processwire's way is to build your Model using Pages and Templates.
- 1
-
Okay. I'll have a look into those modules.
P.S.: Don't expect any PRs in the next days - it will take a while as I'm pretty limited in time, too (I'll do this in my spare time when my family is asleep )
- 1
-
Not exactly. I've build something like this already (textformatteroembed). I'm talking about a dedicated video button inside ckeditor that can also be used for self hosted videos.
- 1
-
I would love to have a possibility to embed videos via CKEDITOR the same way images are embedded (instead of shortcodes). This would be so much easier (i mean: after all video is just another html tag). Any plans on doing this?
If you ain't got time / plans to do this I'd be happy to help you with it (I thought about building this as a module for quite a long time).
- 1
-
Maybe this helps you. I'm using it in one of our sites for the exact same thing (you'll have to adjust the table names and get the coordinates of the given zip, though). The SQL Query uses the Haversine formula ( http://www.plumislandmedia.net/mysql/haversine-mysql-nearest-loc/ ) to find coordinates within the given radius.
/** * Retrieves a list of address records residing within the given $radius of the given geo location * * @param float $lat * @param float $lng * @param int $radius * @return array */ private function proximitySearch($lat, $lng, $radius = 20) { $sql = <<<SQL SELECT * FROM ( SELECT *, ( ( 2 * 6378.2 ) * ATAN2( ( SQRT( POW( SIN( ( ( $lat * PI() / 180 ) - ( lat * PI() / 180 ) ) / 2 ), 2 ) + COS( lat * PI() / 180 ) * COS( $lat * PI() / 180 ) * POW( SIN( ( ( $lng - lng ) * PI() / 180 ) / 2 ), 2 ) ) ), ( SQRT( 1 - ( POW( SIN( ( ( $lat * PI() / 180 ) - ( lat * PI() / 180 ) ) / 2 ), 2 ) + COS( lat * PI() / 180 ) * COS( $lat * PI() / 180 ) * POW( SIN( ( ( $lng - lng ) * PI() / 180 ) / 2 ), 2 ) ) ) ) ) ) AS distance FROM field_address_team ORDER BY distance ) AS distributordistance WHERE distance <= $radius; SQL; $result = wire('db')->query($sql); if(!function_exists('mysqli_fetch_all')) { $retVal = []; while ($row = $result->fetch_assoc()) { $retVal[] = $row; } } else { $retVal = $result->fetch_all(MYSQLI_ASSOC); } return $retVal; }
Usage (in this specific example the radius is extended by the factor 3 until at least 3 locations are found or the radius has been extended 3 times which would be 540km [(((20*3)*3)*3)] with default radius settings ):
public function getTeamsInRadius() { $teamsArr = new \PageArray(); $searchCount = 0; while (count($teamsArr) < 3 && $searchCount <= 3 ) { try { // extend search radius by factor 3 as long as result set counts less than 3 hits // $teams = $this->proximitySearch($this->latitude, $this->longitude, $this->radius * pow(3, $searchCount)); foreach( $teams as $team ) { $teamsArr->append( wire('pages')->get($team['pages_id']) ); } $searchCount++; } catch (\Exception $e) { break; } } return $teamsArr; }
A good idea when using this is to cache the results (see this blog entry for examples) for each entered ZIP until new entries are added to the database as the SQL Queries are pretty performance intensive. The benefit of this method is: You don't have to query Google Maps (or another GeoService) every time you're searching for locations.
- 7
-
I think he is talking about delivering different ressources (and propably markup) depending on the device that is accessing the application.
Have a look at: http://www.smashingmagazine.com/2013/10/responsive-website-design-with-ress/
- 1
-
As I've already commented under the article: It seems like there was an internal job called "write something about processwire" and somebody decided to give it a go because there was nothing else to do and he was bored or something. All his other (wordpress) articles are packed up with images, code examples and so on. It's a shame :/
- 4
-
I'd recommend www.getpostman.com the next time you're trying to test api requests.
- 1
-
I'm using Windows at the office and my macbook at home for work. Both worlds have their pros, cons and tools I'm missing on "the other system". I'm also using conemu for quite a while and found it to be the best console for Windows (in combination with cygwin). On Mac there is a similar tool: totalconsole. I configured both to scroll down from the top of the screen on shift+^ (quake players might remember that keys and style ). My primary editor on both machines is sublime text 3 with the same setup. This makes switching systems every few hours a real no-brainer (apart from some system dependant shortcut/keybinding stuff).
- 1
-
I'm not very familiar with the details of phpdoc but this sounds like it would fit your question (look at the answers): http://stackoverflow.com/questions/6395737/how-do-i-make-my-php-ide-understand-dependency-injection-containers
- 1
-
Marco you might want to have a look at beas "fieldtype image extra" which extends the image fieldtype in a similar manner: http://modules.processwire.com/modules/fieldtype-image-extra/
WireMailSmtp
in Modules/Plugins
Posted
Hi Horst,
would it be possible to implement a feature that overwrites the configuration variables (server, password...) from a config or .env File?
We've got several sites that do auto-deployments to different servers based on the git branch that is used. Currently, when deploying the local development version to a staging system we're copying the dev database and need to adjust the settings by "hand" (we've written a script for that). Having a file based configuration would make it possible to just dump a file on the server and save the config variables in it.