Leaderboard
Popular Content
Showing content with the highest reputation on 04/27/2015 in all areas
-
Adding to todo and required fees : - WP Vulnerabilities Maintenance Tax3 points
-
security in WP is like a never-ending story: http://klikki.fi/adv/wordpress2.html2 points
-
Not sure if you're aware of this module: https://processwire.com/talk/topic/3219-images-manager-beta/?hl=%20images%20%20manager2 points
-
Some of us still maintain Wordpress sites, so.... Security Advisory: XSS Vulnerability Affecting Multiple WordPress Plugins https://blog.sucuri.net/2015/04/security-advisory-xss-vulnerability-affecting-multiple-wordpress-plugins.html1 point
-
Today we've relaunched the website of one of the most beautiful castles in Germany: "Castle Marienburg". The Castle was built as a birthday present of King George V of Hanover (1819-1878) to his wife Queen Marie (1818-1907). Located right next to neuwaerts hometown Hanover and being one of the greatest Tourist attractions in our region it was a real pleasure to be allowed to bring the feeling of this venerable building to the digital age. // Some parts of the website are not yet translated. We know about this I'll add some details and technical notes next week (if anyone is interested).1 point
-
ProcessWire LazyCron Module This core module provides hooks that are automatically executed at various intervals. It is called 'lazy' because it's triggered by a pageview, so the interval is guaranteed to be at least the time requested (and maybe more) rather than exactly the time requested. The more pageviews your site gets, the closer it is. This is fine for most cases, but if you need it to be fully accurate I'll describe how you can make it not-lazy a little further down. How to download and install This was built as a core module for ProcessWire 2.1 (development version), so you need to grab the latest commit of the development version and you will have the module. This module is not compatible with PW 2.0 (stable version). ProcessWire 2.1 is at: https://github.com/ryancramerdesign/P21 If you already have the latest commit of ProcessWire 2.1, go to your modules menu, click "check for new modules" at the bottom, and then click the "install" button for the LazyCron module. LazyCron is now installed and ready to be used by other modules or via the API. Hookable time intervals These are the function names you can hook from LazyCron. The function names describe the time intervals they provide. If you think I'm missing any important time intervals, please let me know and I can add more. every30Seconds everyMinute every2Minutes every3Minutes every4Minutes every5Minutes every10Minutes every15Minutes every30Minutes every45Minutes everyHour every2Hours every4Hours every6Hours every12Hours everyDay every2Days every4Days everyWeek every2Weeks every4Weeks How to use it This module is mainly of use inside the API and to other modules. You hook one of the named intervals mentioned in the list above, and the function you provide will be executed at approximately that time interval. Here's how you do it, both from a class (module) and outside of one: Usage in a class/module <?php // initialize the hook in your AutoLoad module public function init() { $this->addHook('LazyCron::every30Minutes', $this, 'myFunc'); } // the function you want executed every 30 minutes public function myFunc(HookEvent $e) { echo "30 Minutes have passed!"; } Procedural usage (like in a template or elsewhere in the API): <?php // create your hook function function myHook(HookEvent $e) { echo "30 Minutes have passed!"; } // add a hook to your function: wire()->addHook('LazyCron::every30Minutes', null, 'myFunc'); Arguments provided to the hooks If desired, you can retrieve the number of seconds that have actually elapsed since your hooked function was last called: <?php function myHook(HookEvent $e) { $seconds = $e->arguments[0]; echo "30 Minutes have passed! (actual seconds were: $seconds)"; } Note that in production usage, you probably wouldn't want to echo anything from these hooks because they are executed after the pageview was already delivered. So while you can directly echo output from these, it's probably not that useful (other than for demonstration purposes, like this). How it works When installed, LazyCron hooks into ProcessWire's ProcessPageView::finished() method. This ensures that the scheduled tasks are executed after the pageview has already been delivered rather than before or during it. This hopefully avoids any perceived slowdown if the scheduled tasks take time. LazyCron provides a bunch of hooks that anything else can hook into. These functions are outlined in the section above titled "Hookable time intervals." These functions are called at the interval specified in their name. LazyCron simply uses ProcessWire's existing hook system. So when you hook into any one of these functions, your hook will also be executed at that same time interval. LazyCron hooks are only executed during pageviews that are delivered by ProcessWire. They are not executed when using ProcessWire's API from other scripts. How to make it not-lazy In most cases, the way that LazyCron works out of the box is just fine. But if your need requires assurance that the module will always execute at exactly the interval you need (rather than possibly later), you need to setup a real cron job to trigger a pageview in your site. So if you needed accuracy to 1 minute, you'd setup a cron job to execute every one minute, and pull a page from the site. There are any number of ways you could pull a page from your site, but here is one using wget: wget --quiet --no-cache -O - http://www.your-site.com > /dev/null That command basically says to pull a page from the site, don't tell us anything, don't cache the request, and discard any output.1 point
-
Sorry about that, I never tested in a multi-language environment. I just took a quick look and committed a fix that seems to be working fine here. Could you please try out the new version and let me know if it works for you.1 point
-
There is a comments fieldtype that makes adding comments to pages a breeze. Since reviews are some kind of 'comments', maybe you can use that module and then extend it to add a rating star system. EDIT here's a thread about adding additional fields to the comments system https://processwire.com/talk/topic/2898-adding-additional-fields-to-comments/1 point
-
Git is a version control system and not a backup system. It's meant to handle source code and not user content. There are dozens of better ways to backup a whole site.1 point
-
hi mattcohen, welcome to the forum! your code looks like you have not yet fully understood what processwire is and can do for you to make your life easy the key to success is structuring your content, then you can easily access all your data by simple foreach ($page->children() as $review) { echo $review->title ... $review->body ... $review->rating ... and so on } maybe this is a good read for you: https://processwire.com/talk/topic/3579-tutorial-approaches-to-categorising-site-content/ did you go through the hello world tutorial? https://processwire.com/docs/tutorials/hello-worlds/1 point
-
Of course you can totally roll your own table and SQL, but the “ProcessWire way” would be to have a Review template and a separate page for each review. There are a couple of different ways to model the relation between reviews and their pages, the simplest being just making them children. So you’d have --Listing (?? or whatever) ----Review 1 ----Review 2 If you don’t want to pollute your page tree with this, and/or have the convenience of editing reviews directly from the page edit screen, you may use a page field, a page table field, or possibly a repeater field. PageTable would probably provide the nicest UI for editors, if that’s a concern. If you’re interested in accessing the database, these threads about the $db variable may also be of interest: Functions/methods to access the DB? Reading and displaying data from a custom table1 point
-
https://cloud.google.com/launcher/details/bitnami-launchpad:processwire?gclid=CjwKEAjw9uypBRD5pMDYtsKxvXcSJACcb9AYQYmo3gq6uBZnB--Gx_25FwkcigJ4YaYbR7TNh-OF_hoCMwnw_wcB1 point
-
Th bots are also known not to visit your website since they will guess the Analytics ID. I've read a lot of these stuff and sometimes adding a second ID (xxxxxx-2 instead of xxxxxx-1) will stop them for about a month or so before they try the -2 of -3 or -4 version of your ID. It's all automated and they only way they can be stopped is if Google blocks them. Or if you use a filter or an Advanced Segment to either filter them or segmentize. On language specific websites I tend to segmentize only the country and/or language to view relevant data. Of course I will block out potential data, but the harm coming from these bots is greater. Google should fix this mess.1 point
-
OK, I'm finally going to be breathing some life into this project. I got the title sequence done (well a near final draft) along with intro music (bought the track music from audiojungle). Here's a little teaser: http://jonathanlahijani.com/wirecasts-teaser.mp4 The title sequence is a little choppy. Need to fix that. It's actually just a screen capture of an animation I made using plain old html/css with animate.css. I have about 15 videos done so far, but another 18 to go. This WordPress vs. ProcessWire series will cover many different features and quickly compare the two systems. It will not be biased and will compare the best of WordPress to the best of ProcessWire.1 point
-
You're welcome ! I think that I found the new instruction : echo $modules->MarkupSocialShareButtons->render(array("theme" => "templates/mythemes/mytheme"); I'm gonna try it !1 point