arjen
Members-
Posts
1,222 -
Joined
-
Last visited
-
Days Won
8
Everything posted by arjen
-
Can you post the full example of the code? The error could be from code above the snippet you posted - i.e. a missing semicolon -;- or closing bracket -}- or something. Alternatively you could try: $class = $page->is("name=blog|documentation") ? "on" : "";
-
Don't get me wrong, but there are other topics where DigitalOcean is recommended or mentioned. If you use ServerPilot.io (which I do for two accounts: one production and one test) the set-up is extremely simple and straight forward. You could also search my friend if you want hosting recommendations
-
Building a module - Stuck on getting users
arjen replied to FuturShoc's topic in Module/Plugin Development
Hey FuturShoc, Please see this thread and post. Also, when you are developing you should add: $config->debug = true; in your /site/config.php. It makes debugging a lot easier. Or copy $config->debugIf to your /site/config.php. -
Setup a ProcessWire environment on a fresh MacOS X install
arjen replied to Martijn Geerts's topic in Tutorials
I just installed El Capitan and once again when you upgrade Mac OSX the system creates a brand new /etc/apache2/httpd.conf file. You'll want to make some changes. Here are some quick fixes to make this set-up work again: First backup the new httpd.conf in case something goes wrong. Diff the new httpd.conf with your old httpd.conf.pre-update file. Apply the changes in the new httpd.conf file. Restart Apache and you good to go. I had to change: Enable rewrite_module on line 168 Enable php5_module on line 169 Change User and Group to my own to avoid messy permissions stuff on lines 181-182 Enable Virtual hosts on line 499 I used to mess for hours with this stuff. Nowadays it's pretty straight forward and I got it up-and-running in under 5 minutes. -
I'm seeing the new one too.
-
Glad to hear you sorted it out. Dns can be frustrating at times.
-
Dns is strange. I've seen this before. In the end (after a week) it was solved, but I have no clue why it took so long. 1. When did you change the A record for the first time? 2. When did you change it for the second time? 3. I've noticed that both www and non-www are loaded separately. Perhaps the www subdomain was changed later on? You can change the .htaccess so traffic is directed to either www or non-www. I always use http://dns.squish.net/ to determine if the DNS is setup correctly ( medstarlab.com resolves to 192.186.217.98).
-
PageTable on user template isn't working as expected
arjen replied to arjen's topic in General Support
Martijn created an issue and we have tracked it down towards to the editable() function. We might be off, but when we disable this check the PageTable works as suspected. -
Hey B3ta, apologies for replying awfully late. I was on holiday when you posted and it seems I lost track of it. These files are for translating the back-end. For completeness sake: you can download the Dutch translation files from GitHub. I wonder why it's gone (has it ever been there) from the Language Packs in the modules directory. I will add it again. If you want to enable the front-end you can install and inspect the multilangual profile. It's a great start on how to work with different languages in the front-end. If you have any questions: do ask.
-
-
First things that comes to mind: is the language still active (checkbox after "name" under the Settings tab) for the homepage?
-
No problem. Checkout the following code for more insight. All written in the browser, so it's not tested. But you get the idea. <?php // Create a form using the API. You can thank soma > $form = $modules->get("InputfieldForm"); $form->action = "./"; $form->method = "post"; $form->attr("id+name", "form"); $field = $modules->get("InputfieldText"); $field->label = "Name"; $field->attr("id+name", "name"); $field->required = 1; $form->append($field); $field = $modules->get("InputfieldHidden"); // A hidden field to populate which product should be stored in the session $field->attr("id+name", "product"); $field->attr("value", $product->id); // You can use the value (i.e. $product->id) to save the data $field->required = 1; $form->append($field); $submit = $modules->get("InputfieldSubmit"); $submit->attr("value", "Subscribe"); $submit->attr("id+name", "submit"); $form->append($submit); if($input->post->submit) { $form->processInput($input->post); if($form->getErrors()) { $out .= $form->render(); } else { // Always sanitize user data $name = $sanitizer->text($input->post->name); $product = $sanitizer->text($input->post->product); $session->name = $name; // Using $session->name you can get this data back on another page $product->product = $product; // Idem dito $session->redirect($pages->get("PAGE_ID")->url); // The page (PAGE_ID) you want to send the user to (i.e. the checkout page) } } else { $out .= $form->render(); }
- 6 replies
-
- 2
-
- variables
- user action
-
(and 1 more)
Tagged with:
-
There are several options here. You could use $session for this. For example: <?php // First process your form and then set a variable $session->product = 1234; // 1234 is the ID of your product $session->amount = 1; // 1 is the amount ordered // On your other template you can call these variables echo $session->product; // This will get the ID echo $session->amount; // This will get the amount Be sure to $sanitize this if you want to do something with the data (i.e. save the order). Another option is to post the form to another page and get the data from there using $input. I've used both ways and came to a conclusion that sessions are more flexible. If you want to get fancy you can even store arrays in the $session.
- 6 replies
-
- 1
-
- variables
- user action
-
(and 1 more)
Tagged with:
-
You're welcome. Glad to help you.
-
You don't need the brackets or the last ?>. What's $page->children doing there? Just use ... echo $content; ... and you're fine. Complete solution: <?php $content = ""; // Set variable $content .= "<div class='pollino_poll'>"; // .= means append this string/text too $content .= "<div class='inner'>"; $content .= "<h3>$page->title</h3>"; $content .= $modules->Pollino->renderPoll($page); $content .= "</div>"; $content .= "</div>"; echo $content; // Output variable
-
We use DigitalOcean with a ServerPilot managed layer so you can easily add additional users and apps. Works great and we never had any outage or unexpected downtime and support from ServerPilot is really good.
-
Hey Nico, sorry for responding late. Been on a long, long holiday. This is off course another option which I've used in the past too. Thanks for adding.
-
Hi, everyone started somewhere. It's really easy once you have done it a few times. Check out this legendary post. Or use FormBuilder.
- 1 reply
-
- 2
-
What else is there to remove? 5¼-inch floppy, serial ports, 3½-inch floppy, CD-rom, DVD-rom, most video outputs, trackpad buttons, ethernet and finally USB. Hopefully power will be next...
-
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.
-
FieldtypePageWithDate & InputfieldPageWithDate
arjen replied to Raymond Geerts's topic in Modules/Plugins
Finally got a use for your fieldtype Raymond. Works really nice. -
But what if they don't actually visit your website pwired? They steal your analytics ID in a "normal" visit and begin to simulate clicks. They will show up in the GA results unless you filter them out.
-
Sent a PM to Nico. But does he have an Analytics module? Do you mean this one by wanze? I have thought about a module too, but this might be broader than ProcessWire. There are several ways to do this and it also depends on the setup of your GA. Anyhow it seems to be possible.
-
Blocking using .htacess only stops those bots who are actually visiting your site. Most of these bots hijack your Analytics ID and won't even visit your website. Therefore they are still showing up. The only way I know to block them completely is to create a filter in GA *and* use .htaccess to make sure your data is more reliable. It seems to get more worse and worse. New ones are showing up every week. Google should update their list more often Piwik is sharing a list of these spammers so you easily add these to your .htaccess and files.
-
Determine old vs. new value of field when saving
arjen replied to Jonathan Lahijani's topic in Modules/Plugins
Hi jlahijani, Do these posts from ryan and soma will work for you as a starting point?