Jump to content

Martijn Geerts

PW-Moderators
  • Posts

    2,769
  • Joined

  • Last visited

  • Days Won

    31

Everything posted by Martijn Geerts

  1. Assuming that those time entries alway have a start and an end. And as the date is not necessary I assume that those time stamps never overlap the span of 24 hours. I do think it's not that difficult to "rebuild" Soma's slider a bit. Set it to RangeSlider and set the Max value to 86400 (seconds a day). or to 96 ( all quarter of hours a day ) Then the only thing you need to change is the value for the slider labels.
  2. Sorry I don't answer this, but have these questions: What if number 3 is gets deleted ? You end up with 1, 2, 4, 5. And upon creation of the new one, will it have the number 3 or does it gets the number 6 ? Or when you decide rename 4 and 5 to 3 and 4, then the new one will be 5. ( SEO problems and loads of overhead )
  3. Then you need more likes, I gave you one xtra. (I appreciate that you're here)
  4. I have used services like http://www.noip.com/ & http://dyn.com/dns/ long time ago, those were free for several hostnames. ( Had a carracho server in those days )
  5. It's possible, but you have to script it your self. I do think captcha is not a good solution it's a problem on it's own. ( many times I can't read them and always can't stand them ) And i'm not alone in thinking this. Better to use a "honeypot" with javascript. Or write a simple turing test. (I don't want to be rude here, but I found a nice infographic that I want to show)
  6. People are already converting their sites with us! lol
  7. Don't know if there's a real benefit for this in-comparison with MAMP (no experience with MAMP). I started this setup before MAMP was there and it works without problems. It works with the default Apple shipped Apache & in the past you could turn on/off apache in your System Preferences. I do like the fact that I don't need an extra GUI app to put the environment on and off. Every time I start the machine Apache PHP & SQL is loaded, no questions asked. I especially like the ~/Sites setup. I can see the logs from the website working on directly in the same folder. There's room enough to store information needed next to the site when building. And It's all In your user home folder.
  8. Recently I got a brand new iMac so I needed to install PHP SQL and configure Apache. I'm using the same web develop environment for years and I'm really happy with it. Raymond is also using this and Arjen did the same recently. I love to share how I setup this environment in a step by step tutorial. Let's setup PHP, MYSQL and activate mail using gmail smtp for OSX 10.6 and up, perfectly suitable for ProcessWire. It doesn't install Apache, it uses the Apache installation, which comes with OS X. The PHP installer package is created by Liip and it is based on entropy's php package. For MYSQL we gonna install the DMG Archive (x86, 64-bit). After we installed PHP, we configure Apache & PHP so that we’re able to run the ProcessWire sites in our own ~/Sites directory. For El Capitan see Arjen's https://processwire.com/talk/topic/5797-setup-a-processwire-environment-on-a-fresh-macos-x-install/?p=103674 Install PHP We gonna use the PHP installer created by Liip. (more information) Go to: /Applications/Utilities/ Open: Terminal.app Type: curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5 Press: RETURN Type: your admin password Press: RETURN ( download starts and continues with a the install ) note: If you want to have an older PHP version, replace 5.5 with 5.4. (PHP 5.5 is the current stable) After the install is completed Apache is restarted and complains about “Could not reliably determine the server's fully qualified domain name, using your-computer-name.local for ServerName”. This notice is not a problem, we only use this Mac for local website development. Setup Apache Open a new finder window. Press: shift + command + g ( Go to folder ) Type: /etc/apache2/ Press: go Open: httpd.conf Find the line: #Include /private/etc/apache2/extra/httpd-vhosts.conf Remove the # infront to enable. Press save and enter your password when asked. Enable the use of ~/Sites folder:Open the folder /etc/apache2/users/ * Duplicate the Guest.conf and name it martijn.conf Open the duplicated file that we created * Change: <Directory "/Users/Guest/Sites/"> to <Directory "/Users/martijn/Sites/"> Change: AllowOverride None, to AllowOverride All Save the file. The file should look like: <Directory "/Users/martijn/Sites/"> Options Indexes MultiViews AllowOverride All Order allow,deny Allow from all </Directory> Configure the vhosts includes Open /etc/apache2/extra/httpd-vhosts.conf Comment out the 2 VirtualHost examples by putting a # in front Be sure that NameVirtualHost *:80 doesn’t start with a # sign. * Add the include: include /Users/martijn/Sites/_vHosts/*.conf at the bottom of the file. Save the file, password will be asked. The file should at least have these two lines: NameVirtualHost *:80 include /Users/martijn/Sites/_vHosts/*.conf * ( Replace martijn with your short admin name ) The ~/Sites folder (Users/martijn/Sites) Goto your user Home folder. Create the Sites folder in your user home ( if not exist ) Create inside the Sites folder a folder called _vHosts Create the folder domains inside the ~/Sites folder Create a folder inside the domains folder called processwire ( processwire will be the domain name ) Inside the processwire folder create 2 directories: 1. htdocs 2. logs ( make this writeable by right click the folder and choose Get info ) Create inside the htdocs folder a file called index.html with some content. The folder structure should look like: ~/Sites |`-- _vHosts | `-- domains | `-- processwire | |-- htdocs | `-- index.html | `-- logs Configure PHP Open the file: /usr/local/php5/php.d/99-liip-developer.ini ( This file is the last ini file that gets loaded, so perfectly suitable for your personal settings ) Make your personal changes here. ( setting xdebug.max_nesting_level=1000 for example if needed ) Save the file ( password will be asked. ) Make an alias the this file by right click and choose: Make Alias Name the alias _settings.ini or what ever you want to name it. Move the alias to your ~/Sites folder Create a vHostIn our ~/Sites folder we created a folder named _vHosts. This folder we gonna use for the vHosts. All files ending with .conf in this folder will be loaded when we (re-)start Apache. Create a new file with your favourite text editor. Type the following in the file: ( Replace martijn with your short admin name ) <VirtualHost *:80> DocumentRoot /Users/martijn/Sites/domains/processwire/htdocs/ ServerName processwire ErrorLog /Users/martijn/Sites/domains/processwire/logs/error.log.txt CustomLog /Users/martijn/Sites/domains/processwire/logs/access.log.txt common </VirtualHost> Save the file with the filename processwire.conf in the folder _vHosts The hosts fileGo to the Finder Press: shift + command + g ( Go to folder ) Type: /etc/hosts & press return Open the hosts file with you favourite editor Type 127.0.0.1 processwire below 127.0.0.1 localhost but above 255.255.255.255 broadcasthost Save the file Right click the file & choose: Make Alias Move the alias that you created to your ~/Sites folder Rename it to _hosts The file should look like: ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 127.0.0.1 processwire 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost Test the Apache & PHP setup Go to: /Applications/Utilities/ Open: Terminal.app Type: sudo apachectl restart Press: RETURN Type: your admin password Press: RETURN At this point Apache & PHP will be up and running.Go to a browser and type: processwire/ in the address bar and press enter. MYSQL For managing MySQL databases I use Sequel Pro it's a very handy tool and in this tutorial we set the root user password with it. For the SQL server we gonna use the MySQL DMG Archive (x86, 64-bit) Download the following: MySQL DMG Archive (x86, 64-bit) Sequel Pro Open the mysql-5.6.16-osx10.7-x86_64 image * install mysql-5.6.16-osx10.7-x86_64.pkg, MySQLStartupItem.pkg & install the prefPane * if MACOSX complains about: ( mysql-5.6.16-osx10.7-x86_64.pkg” can’t be opened because it is from an unidentified developer. ) You should open your System Preferences, go to Security & Privacy and Allow apps downloaded from: Anywhere Set the root user password Double click the sequel-pro-1.0.2.dmg. The disc image will mount Drag'n'drop the Sequel Pro.app to your /Applications/ folder. Open Sequel Pro Type by name: 127.0.0.1 Type by host: 127.0.0.1 Type by username: root Login Press command + u Select the root user on the left side Fill in the password Press apply We're Done ----- Todo how to use it after the setup is complete
  9. I felt the same about redundancy for this module after Ryan released Font-Awesome for the core. I didn't event thought someone was using it besides me. I did thought about a process module around Ryans way of using icons. but my available time is limited and this will be the next half year or so. IE7 support is not needed. People with IE7 can't login in the admin. (I hope/think) Thank you for making those changes that I should have done a long time ago ! I'll PM you.
  10. Welcome t2t2 Good first post.
  11. Since the 2.4 update the Fontawesome icons start with fa-
  12. Block his ip on http://www.pebblesthepuppy.co.uk/
  13. yep Tom, this community makes learning fun.
  14. Thanks, Now I understand the SQL error.
  15. When projects become more complex and need more logic, mostly I end up only using PHP. So never escaping HTML. ProcessWire has changed how I quote HTML. Before PW: <body class="tralala"> Now with PW: "<body class='tralala'>"
  16. Or difficult like this: echo $page->images->implode(function($item) { $large = $item->size(1200,800); $thumb = $item->size(400,300); return "<li><a href='$large->url'><img src='$thumb->url' alt='$item->description'></a></li>"; }, array('prepend' => '<ul>', 'append' => '</ul>'));
  17. $page->images->eq(1); // second image
  18. Output Formatting is basicly what it says. When you attach a TextFormatter to a field, Clean text from the database goes through the TextFormatter & changing the text on output. So **bold** wil be changed to <strong>bold</strong> when you use it. (TextformatterMarkdown) Say if you save the page with data, you must be sure that the saved text is clean. You want to save **bold** to the database, and not <strong>bold</strong> (TextformatterMarkdown). Setting of(false) will put all Formatters off, so clean text storage is insured. offtopic: $page->setOutputFormatting(true|false) $page->getUnformatted("field")
  19. I have a hard time to understand the getDatabaseSchema(Field $field) methode. I Looked at the Fieldtype.php but that doensn't make me any wiser. In your Fieldtype you have in that methode: $schema['keys']['data_height'] = 'KEY data_height(data_height)'; $schema['keys']['data_depth'] = 'KEY data_depth(data_depth)'; $schema['keys']['data_volume'] = 'KEY data_volume(data_volume)'; What do they do ? If I leave them out the Fieldtype seems to function the same (sure I miss something here) If one of the columns in the field table is of type TEXT & those keys are set, the field throws an error while creating: (SQLSTATE[42000]: Syntax error or access violation: 1170 BLOB/TEXT column 'data_tralalala' used in key specification without a key length) So basicly what do they do & when do I need to set that array ?
  20. @totoff position is everything @pwired, good luck!
  21. @pwired, consider Diogo's approach. The one you linked to, present the main column as last in the DOM. ( Higher in the DOM is more important then lower in the DOM )
  22. New admin died on experiment , Thanks Willy, gonna try! Notice::allowMarkup doesn't solve it here. The notice on top of the page can't handle MarkDown The notice on above the field can't handle html. (translated to < > etc. )
  23. I have a strange issue here: Using HTML based links doesn't work for the inputfield Setting Markdown based links doesn't work for the error message Somehow I thought this worked in PW 2.2
×
×
  • Create New...