Leaderboard
Popular Content
Showing content with the highest reputation on 09/15/2016 in all areas
-
Simply said: YES! There are more then one, but ... The biggest point is, that you don't need any module to run complex sites and very complex sites with PW. PW at first is a framework, and then a CMS on top of that framework. I can put all my application logic into template files and the site/init.php, site/ready.php and site/finish.php via hooks. No need for modules at first place. So, in a second place, modules also can be very valuable. We have some of them in the directory. And of course, PW 3 should be able to run with most of them, at least if there is stated that they are compatible with PW 2.7. As a side information: The modules do not belong to the PW core. Most of them, (if not all minus ryans personal modules) are from "third party" authors. So, as of now, PW 3 is DEV-branch, and most of the modules authors simply haven't updated their module directory entries. But this is not that relevant. If you are interested in using a module with a PW version that is not listed there, you can ask in the dedicated support forum thread of that module. Here you normally will get fast answeres, I believe. But now to the biggest second point, why it is useful to use PW 3, when most of the modules in the directory stated as not compatible with it: https://processwire.com/blog/posts/processwire-3.0.14-updates-file-compiler-fields-and-more/ PW3 has a file compiler for template files and modules, that in 99% of the PW 2.7 modules simply make them compatible with PW3. Nice eh? (And if you are unsure, ask in the dedicated support forum thread) Thank you for reading and enjoy PW3, (or what ever you like)!6 points
-
This page points to a forum post that is no longer valid (probably because of the Forum update?). Current url: Anyway, it is easier to install a beta version of the profile which is also good for checking out how it was made (blog-site2.zip linked from this post): For a more up-to-date blog profile I recommend:3 points
-
I couldn't get @LostKobrakai's blueprint to work. I putted together some of @LostKobrakai code with some investigated source code from ProcessWire. Here's a full working solution: <?php class PayActions extends Process { public static function getModuleInfo() { return array( 'title' => __('Quick Pay/Unpay Method', __FILE__), 'summary' => __('Adds Pay/Unpay actions to pages that use reservation template.', __FILE__), 'version' => 102, 'singular' => true, 'autoload' => 'template=admin', ); } // MODULE INITIALIZATION public function ready() { // Default actions can't use AJAX // $this->addHookAfter("ProcessPageListActions::getActions", $this, 'hookPageListActions'); // Use Extra Actions if you need AJAX $this->addHookAfter('ProcessPageListActions::getExtraActions', $this, 'hookPageListActions'); $this->addHookAfter('ProcessPageListActions::processAction', $this, 'hookProcessExtraAction'); } // ADD ACTIONS public function hookPageListActions(HookEvent $event) { $page = $event->arguments[0]; $actions = array(); // Apply only to reservation pages if($page->template == 'reservation') { if($page->reservation_paid) { $actions['unpay'] = array( 'cn' => 'Unpay', 'name' => 'Unpay', 'url' => $this->config->urls->admin . "page/?action=unpay&id={$page->id}", 'ajax' => true, ); } else { $actions['pay'] = array( 'cn' => 'Pay', 'name' => 'Pay', 'url' => $this->config->urls->admin . "page/?action=pay&id={$page->id}", 'ajax' => true, ); } } if(count($actions)) $event->return = $actions + $event->return; } // PREPARE ACTION public function hookProcessExtraAction(HookEvent $event) { $page = $event->arguments(0); $action = $event->arguments(1); $success = false; switch($action) { case 'pay': $page->setAndSave('reservation_paid', 1); $success = true; $message = $this->_('Paid'); break; case 'unpay': $page->setAndSave('reservation_paid', 0); $success = true; $message = $this->_('Unpaid'); break; default: $message = $this->_('Failed'); } // If this action was successfull return result if($success) { $result = array( 'action' => $action, 'success' => $success, 'message' => $message, 'page' => $page->id, 'updateItem' => $page->id, 'remove' => false, 'refreshChildren' => false, ); $event->return = $result; } } } What this module does: For each page with the template "reservation" you're able to mark it as "Payed" or "Unpayed" without having to edit it:3 points
-
You can probably find enough on xdebug with Google. It's a debugger/profiler for PHP and not unique to ProcessWire. Reading this thread will give enough info i guess. If you don't use xdebug you can turn it off altogether or adjust the setting LostKobrakai mentioned in php.ini3 points
-
It takes time for the developers of the Modules to update their code.2 points
-
It all depends on name formatting of the old crop variations! Please, to be sure, can you give one or two examples of the filenames (original image + varition name of the crop)? Also, how do you call them in templates. (with the older CroppableImage and the CroppableImage3, we use $image->getCrop("suffix")). I'm sure, we will find a practicable solution, but want to be thouroughly and careful. EDIT: How many cropsettings / thumbsettings are defined with a typical field in your sites? Can you post an example of the textarea content?2 points
-
New version is up (v065): new RenoTweak "hoverTopSubmenus": show topnav submenus on hover instead click use slider for LongClickDuration instead plain text input do not load submodule JS/CSS files on login page Here is how the slider looks like for LongClickDuration: I wanted a traditional tooltip-style tooltip but Chrome has overflow and css-transition issues inside CSS3 columns, so I had to fallback to this.2 points
-
For me, it follows a principal called 'separation of concerns'. Running analytics has nothing to do with the actual running of your site, and so it should be kept separate, on another domain (or subdomain, which is technically another domain). So my recommendation is the same - move PW site to the public root and move analytics to a subdomain public root.2 points
-
This afternoon i was setting up a new laptop with Win7 64bits. Having used it in the past with no problems i decided to use Wampserver 2.5 to setup my webdev environment. Having set up an existing project and a vanilla PW install i noticed that some front-end pages took quite long to respond/render. After logging in i also noticed this in the back-end. Especially opening a template edit page performed bad, with a noticeable 2 to 3 seconds delay in the response. This was not at all the case with the live site running the same code base. After some hair-pulling i discovered that it was xdebug slowing things down. In Wampserver it comes bundled with the following settings in php.ini (to which i added the max_nesting_level because the default 100 will cause problems in PW) : ; XDEBUG Extension zend_extension = "c:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5-5.5-vc11-x86_64.dll" ;xdebug xdebug.remote_enable = off xdebug.profiler_enable = off xdebug.profiler_enable_trigger = off xdebug.profiler_output_name = cachegrind.out.%t.%p xdebug.profiler_output_dir = "c:/wamp/tmp" xdebug.show_local_vars=0 xdebug.max_nesting_level = 200 After commenting out all of the above, basically disabling xdebug altogether, my PW installs where back to normal, snappy performance. Because i don't use xdebug for debugging or profiling i'm fine with totally disabling it. This might be a tip for people experiencing bad performance in relation to xdebug. What i do find surprising is that with the above settings no actual debugging/profiling is enabled. The only thing xdebug needs to do is collect info for it's stack trace. Would this really cause such slowdowns?1 point
-
FYI - "FieldtypePageTable" is not related to ProfieldsTable at all. FieldtypePageTable is free and a core module, just not installed by default.1 point
-
https://github.com/ryancramerdesign/ProcessWire/blob/devns/wire/modules/LanguageSupport/LanguageSupportPageNames.module#L395-L406 Here it's defined1 point
-
You cannot return things from hooks via the return statement. Instead pass the return value into $event->return like I did it in my example.1 point
-
It doesn't feature shopping cart, but custom booking forms (as far as tour reservation is considered: https://www.tripsite.com/tools/reservation/1275).1 point
-
Hi all, After a lot of searching and experimenting I came up with a working solution. If someone else is looking for something like this, you can check it out here:1 point
-
I'd prefer - only once per day though - The rest of the time just silence.1 point
-
Update the max_nesting setting of xdebug. 300 should be enough.1 point
-
If RenoTweaks is on with FixedHeader>CompactHeader on, the Search field is overlapping the "Save" field, which needs more space in German ("Absenden")1 point
-
Ok, fixed. The obvious problem there was that the folder was the wrong name. Maybe this could be remedied in Padloper by having a relative link to the folder instead of the absolute one. OR add make sure the module is called X to your installation instructions?1 point
-
1) pasting from db (adminer) to sublime it looks the same, just like whitespace 2) like str_replace(' ', ' ', $body) ? no difference Aha..thanks to your suggestion I then tried preg_replace('/\s+/', ' ', $body) and it worked! Thanks guys So what exactly happened here? what are those mysterious falty white spaces in reality? @Francesco Bortolussi hemos encontrado algunos italianos aka en el perú haha1 point
-
Imagine this case: - The site has English as default language and Portuguese (pt-PT) as an alternative and you decided to suppress the language code on the URL, like in your example above. Everything looks fine but a new page is added with a name that is ambiguous, like '/actual'* (which is a false cognate, as it means 'current' in Portuguese). Event if PW's handle the routing fine, what about the users? What language is the page in if they only see the URL? So, a pt/actual/ will be better. * 'Actual' is used just as an example, as it's now spelled 'atual', after Portugal, Brazil, and other Portuguese-speaking countries agreement on vocabulary issues back in 2008 I think.1 point
-
Very good point guys - sorry I hadn't thought about it that way! So to clarify a little further (just because I am still learning), what about: "/pt/apresentacao/" vs "/apresentacao/". You've all convinced me not to do UTF8 page names, but what about including the "pt" url segment vs setting a session variable? I realize that I don't yet know how PW remembers the language selection between page loads if it's not in the URL - is it automatic, or do I need to handle that myself? Thank you - I had forgotten about the PW language profile and I will definitely read that Google link also. In my case it is aimed at Brazil, rather than Portugal, but I'd still rather refer to PT than BR - I think it makes more sense.1 point
-
1 point
-
@can que bueno. Yo me encuentro en Italia. Y pues si, latinoamerica se presta mucho para proyectos como el tuyo: mucha tierra, clima y gente. En donde vivia Venezuela caería de maravilla tu proyecto ya que ni comida hay. Exito. PD: all other's forum member's sorry for the off topic.1 point
-
1 point
-
Do you know if there is a high setting allowed for timeout on this host? If so, you may try to temporarily add a line into your site/templates/admin.php (before the controller.php) $timeLimit = 60 * 15; // sec * min <= adjust to your needs set_time_limit($timeLimit); ------- In general, you also simply can copy all files to a new location. You then will need a mysql dump too. If you have no other tool at hand, you simply can install the PW module ProcessDatabaseBackups, before you do the copy. Create a full backup from within the PW admin, before you copy the files. The backup can be found under site/assets/backups/ database/...1 point
-
By the way, I don't remember which version introduced this, but you can use $field->getLabel() instead http://processwire.com/api/ref/field/get-label/1 point
-
I haven't really read all of this thread, but just wanted to chime in with a brief overview of a help desk system I built. I can only show you screen shots from the test server — since the real one has sensitive data — but I think you get the idea. Unfortunately it's all pretty specific to our environment here, and was never intended to be released. Ticket List This is pretty small in the test environment. The lighting bolt icons open a modal that shows some "quick look" information for admins. Last comment, ticket history, etc... It's just a way to quickly peek into a ticket without opening it. Ticket View Many of these test tickets are filled with a ton of content, but here's one that shows some of the features. It's conversation based. You can attach specific equipment (we have several equipment databases managed in other PW modules). You can add files/images to any reply. Typical help desk stuff really. Reply options This is at the bottom of the discussion, a lot like it is here in the discussion forum. Agents can reply or create an internal note.1 point
-
As vagely mentioned the LanguageSupportPageNames module is the problem here, as it doesn't load in a Bootstrap it seems. There's no page rendering happening so ready() method of it will never get called. I'm using heavy page creation importing with multilanguage and also ran into this, and also need a solution sooner or later, so i tried again. A solution I found is to add a hook yourself in the script on Pages::saveReady and delegate that to the LanguageSupportPageNames which usually seem to handle this part of page name saving. So if you add this code above your bootstrap, it will work as if in a page template. wire()->addHookAfter("Pages::saveReady", null, "hookPageSaveReady"); function hookPageSaveReady($event){ wire("modules")->LanguageSupportPageNames->hookPageSaveReady($event); }1 point
-
1 point