-
Posts
1,360 -
Joined
-
Last visited
-
Days Won
49
Everything posted by flydev
-
Maybe a dumb question, but do you have the directive AllowOverride None in your setting ?
-
I run my PW websites on PHP 5.6 and I have not encountered any issue during installation. (somes migrated from php-5.5). Can you give us any server log error ? Also, I suggest you to double check the PHP extensions between your two severs.
-
A bootstrap 4 alpha version exemple with navbar and dropdown : <nav class="navbar navbar-dark bg-primary bg-faded"> <button class="navbar-toggler hidden-sm-up" type="button" data-toggle="collapse" data-target="#exCollapsingNavbar2"> ☰ </button> <div class="collapse navbar-toggleable-xs" id="exCollapsingNavbar2"> <a class="navbar-brand" href="#">Responsive navbar</a> <ul class="nav navbar-nav"> <li class="nav-item active"> <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> </li> <li class="nav-item dropdown"> <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Languages <span class="caret"></span></a> <ul class="dropdown-menu"> <h6 class="dropdown-header">Dropdown header</h6> <?php foreach($languages as $language) { // determine the "local" URL for this language $url = $page->localUrl($language); // output echo "<li><a class='dropdown-item' href='{$url}'>{$language->title}</a></li>"; } ?> </ul> </li> </ul> </div> </nav>
-
As szabesz said, everything will work. Until you do not hardcode your urls but use the API, all good.
-
Hello and welcome theo. I think that your best bet would be a subdirectory. You create your directory, upload processwire and the important step to get it working is to modify your .htaccess. What the documention say about that : If you installed ProcessWire in an subdir you have to adjust the RewriteBase to it. So for example if your installation lays in a folder called "pw" (your URL woud look like "http://yoursite.com/pw/") your RewriteBase should look like the following: RewriteBase /pw/ More info there : https://processwire.com/docs/tutorials/troubleshooting-guide/page3
-
A simple call with the right option should do the trick : $(document).ready(function(){ var popup = new Foundation.Reveal($('#myModal')); popup.open(); }); the docs : http://foundation.zurb.com/sites/docs/reveal.html
-
This is just a directive. You can include the code without any issue. [doc]
-
Hello, you might look at this module for the login thing : https://processwire.com/talk/topic/8387-page-protector and some snippets code there: https://processwire.com/talk/topic/107-custom-login/
-
Cool ! but... I forgot the following line in step 3, class hnsmtp; In the constructor we need to add $this->emailMessage->smtp_certificate = $this->smtp_certificate; I edited my previous post containing the instructions. Nice module and thanks for the update, I tested it right now and it work like a charm!
-
The possibility to manage clients without their credentials is very exciting. I will give a try today. thanks @diogo
-
Bumping an old topic but I have the exact same question. Their control panel can be set to english ?
-
A small contribution: Add an option to have ability to use Self-Signed Certificate on a given SMTP server with WireMailSmtp and PHP >= 5.6 What PHP say - source : https://secure.php.net/manual/en/migration56.openssl.php HOWTO: ----------- 1) In file smtp.php, class smtp_class, we add a member variable and a small function : /* Allow self signed certificate */ var $smtp_certificate = false; Function AllowSelfSignedCertificate($allow = false) { $version=explode(".",function_exists("phpversion") ? phpversion() : "3.0.7"); $php_version=intval($version[0])*1000000+intval($version[1])*1000+intval($version[2]); if($php_version<5006000) return; if($allow) { stream_context_set_option($this->connection, 'ssl', 'verify_peer', false); stream_context_set_option($this->connection, 'ssl', 'allow_self_signed', true); } else { stream_context_set_option($this->connection, 'ssl', 'verify_peer', true); stream_context_set_option($this->connection, 'ssl', 'allow_self_signed', false); } } and, in the Connect() method, call the function just in before we check for the result of stream_socket_enable_crypto : Find : $this->OutputDebug('Starting TLS cryptograpic protocol'); if(!($success = stream_socket_enable_crypto($this->connection, 1, STREAM_CRYPTO_METHOD_TLS_CLIENT))) Replace to $this->OutputDebug('Starting TLS cryptograpic protocol'); $this->AllowSelfSignedCertificate($this->smtp_certificate); if(!($success = stream_socket_enable_crypto($this->connection, 1, STREAM_CRYPTO_METHOD_TLS_CLIENT)) 2) In the file smtp_message.php, class smtp_message_class, add a member variable : /* Allow Self Signed Certificate */ var $smtp_certificate = 0; In the method StartSendingMessage() , assign the new member variable: $this->smtp->smtp_certificate = $this->smtp_certificate; 3) In the file WireMailSmtpAdaptator, class hnsmtp, add a member variable : private $smtp_certificate = false; and in the method set_var_val(), add a case smtp_certificate for our checkbox : Find : case 'smtp_ssl': case 'smtp_start_tls': case 'smtp_debug': case 'smtp_html_debug': Replace : case 'smtp_certificate': case 'smtp_ssl': case 'smtp_start_tls': case 'smtp_debug': case 'smtp_html_debug': In the class constructor, add : $this->emailMessage->smtp_certificate = $this->smtp_certificate; 4) In the WireMailSmtpConfig.php file, add a field : add : $field = $modules->get('InputfieldCheckbox'); $field->attr('name', 'smtp_certificate'); $field->label = __('PHP >= 5.6 - Allow self signed certificate'); $field->attr('value', $data['smtp_certificate']); $field->attr('checked', $data['smtp_certificate'] ? 'checked' : ''); $fieldset->add($field); 5) In the WireMailSmtp.module file, add a settings to the getDefaultdata() : Find : 'valid_recipients' => '' // email addresses of valid recipients. String that we convert to array at runtime. Add after (take care of comma ','): 'smtp_certificate' => 0 // allow or not self signed certificate (PHP >= 5.6) Result : Hope it help. Sorry for my english
-
We are all falling in love with PW good luck dude
-
ProcessWire ApiGen (dynamic + up to date + all branches)
flydev replied to kongondo's topic in API & Templates
Wow, thanks for that! -
and giving the option dateFormat directly to the function, it works for you ? exemple: $page->comments->renderAll(array('dateFormat' => 'm/d/y g:ia',));
-
About The exception Invalid email address (processwire@localhost); She is triggered when we leave empty the configuration field "Notifications From Email". Just finished to give a try at your solution (with PW3) and everything work fine. No idea about formatting the time output atm. Have you tried editing your field in the configuration page ? It say :
-
I was trying to reproduce @Zahari issue but I ran into another problem with email settings, I got an exception : Exception: Invalid email address (processwire@localhost) (in \pw\wire\core\WireMail.php line 81) WireMailSmtp is installed and correctly configured. Any idea ?
-
Switch language tabs using ctrl+right, ctrl+left
flydev replied to tpr's topic in Module/Plugin Development
Yeah thanks. this. -
Thanks you guys I got it. Elegant solution there
-
Hello, I have a PHP script being called by AJAX request. At this moment everything work perfectly, but my script is in the root directory, bootstraping PW. request = $.post('/public_html/pw/contactus.php', serializedData); My question is, it is possible to put this PHP script in my templates directory and call it from there ? (if I hardcode the path I get a 403 HTTP error and doing that can cause problem between dev environment and production); How I should code my path in the Javascript code ?
-
I am just finishing a new website with PW and Bootstrap v4 alpha and it work very well. Uikit could be the best alternative imo.
-
Thanks for this - If I can help improve the translation, let me know. merci encore.
-
Thanks you two times kongondo. I also figure that my params for the `foreach` loop was inverted
-
Hi and thanks for this modules sir. For days, I follow https://web.archive.org/web/20150227095218/http://www.kongondo.com/tutorials, the docs, the forum and the source at https://github.com/kongondo/Blog/blob/master/MarkupBlog.module. Time for me now to ask help. I would like to know what is the best way to get only posts's title, for example to show them in list in the footer of a page ? Note: I have a newbie's experience with ProcessWire <div class="col-sm-4"> <h3>Recents</h3> <?php $blog = $modules->get('MarkupBlog'); $posts = $pages->find("template=blog-post, limit=5"); foreach ($post as $posts) { var_dump($post); } ?> </div>