-
Posts
1,011 -
Joined
-
Last visited
-
Days Won
8
Everything posted by SiNNuT
-
Not the most sexy looking in IE8, on my pc at work. Will have a better look when i'm on a decent browser.
-
I guess it would make sense to adjust the mysql settings to allow 3 (or even 2) character min word lenght. Or just use %= selector version. On the scale of the modules directory this would perform good enough i think. ( http://processwire.com/talk/topic/1544-bug-process-page-search/#entry13972 )
-
need help for CMS only for images/video and audio upload
SiNNuT replied to danielholanda's topic in Getting Started
Hi danielholanda, and welcome to the club. We're really a helpful bunch around here but at the moment i wouldn't know how to begin helping you. Have you studied the default templates? If so, plz specify your questions. -
Looking good. One thing; there seem to be a lot of missing amazon image links in the 'Selected Discography' section on the artists pages. Or at least, i'm getting a whole lot of red crosses.
-
I can't see what fields are in the Range repeater but maybe it's an option to just add a text field to the runtime repeater and just enter the ranges seperated by a delimiter of your choice, so: 1850-1875,1880-1882. You can use explode for front-end purposes. Of course this all depends on your needs. Most of the times when i see nested repeaters is start to wonder if there isn't a better way to structure your content.
-
Well, i hardly understand any of this regex stuff but i seems like this is their way of testing for utf-8 support. Now that you mention it. Wouldn't it be a good thing that PW files are always encoded as UTF-8 without BOM. Maybe as part of some Coding Standards. Every decent editor allows you to easily set the file encoding (and conversion if needed).
-
I'm not sure about this. I got the code for this check from kohana framework because i'm not an expert on this. Another one is: 00797 protected function envCheckPCRE() { 00798 if ( !function_exists( 'preg_match' ) ) { 00799 $this->showError( 'config-pcre' ); 00800 return false; 00801 } 00802 wfSuppressWarnings(); 00803 $regexd = preg_replace( '/[\x{0430}-\x{04FF}]/iu', '', '-АБВГД-' ); 00804 // Need to check for \p support too, as PCRE can be compiled 00805 // with utf8 support, but not unicode property support. 00806 // check that \p{Zs} (space separators) matches 00807 // U+3000 (Ideographic space) 00808 $regexprop = preg_replace( '/\p{Zs}/u', '', "-\xE3\x80\x80-" ); 00809 wfRestoreWarnings(); 00810 if ( $regexd != '--' || $regexprop != '--' ) { 00811 $this->showError( 'config-pcre-no-utf8' ); 00812 return false; 00813 } 00814 return true; 00815 } but i'm guessing this will have the same problem.
-
@ryan I'd send you a pull request but for some reason my git client doesn't play nice when syncing to GitHub and totally screws up the diff, so no real help there. Instead i'll just attach it here. Basically 'protected function compatibilityCheckPHPInfo()' is gone and i've added that stuff to 'protected function compatibilityCheck()'. This way it doesn't rely on phpinfo() parsing. I've also changed the way the PHP version is checked. I've only done some trial and error testing and all seems well but you and/or other pro's should give it a good look before using it. I hope it can be of some use. - edit - One of those days :S Forum software fucking with indentation. I'll just attach install.php. /me grabs a beer, cheers install.php
-
Ryan, i'll take a stab at it over the weekend.
-
That's a great looking site you've got there.
-
Overall i'm pretty happy with IP.Board.
-
That is php heredoc syntax and can be quite useful.
-
I wonder if there aren't better ways to check for compatibility and such. For example php version checking in install.php. There are existing functions for that: <?php if (version_compare(PHP_VERSION, '5.2.3', '>=')): ?> <?php echo PHP_VERSION ?> <?php else: ?> PW requires PHP 5.2.3 or newer, this version is <?php echo PHP_VERSION ?> <?php endif ?> <?php !extension_loaded('iconv') ?> <?php !function_exists('ctype_digit') ?> <?php !function_exists('json_decode') ?> etc
-
I haven't got a PHP 5.4 install to work with but i think Soma is right. A quick comparison of the phpinfo output on PHP<5.4 and 5.4 should explain why https://github.com/ryancramerdesign/ProcessWire/blob/master/install.php#L66 isn't finding json support correctly.
-
I've had the exact same problem with IE8 on my work PC (running XP). The workaround i used is to change the forum theme to IP.Board Mobile. Login is then available from where you change back to the default theme if you want to.
-
Reading and displaying data from a custom table
SiNNuT replied to einsteinsboi's topic in General Support
I agree, there are still a lot of data APIs/services that serve up xml but JSON is not far behind and growing fast. XML usage will shrink the next years. -
Reading and displaying data from a custom table
SiNNuT replied to einsteinsboi's topic in General Support
Ah, this does make a lot of sense and a perfect fit for PW. Import the xml data feed entries as PW pages and keep up to date via a cronjob. In this case i wouldn't go for a separate database. Create a template "feed_item". Add fields to the template that map to corresponding data you want to import from the xml feed. You can add as many of your own fields to go next to that. For the actual importing/updating you can write something yourself with the PW API, i'm a noob so can't really help you there but i'm sure Ryan or other veterans can help. You could also take a look a look at this (alpha) module for some inspiration or maybe it works for your use case: http://modules.proce...ss-data-import/ http://processwire.c...ller/#entry1647 Using this approach you eventually have all of the feed data and your own added fields as PW pages/data. From there you can display and do with it whatever you want. -
Reading and displaying data from a custom table
SiNNuT replied to einsteinsboi's topic in General Support
Generally 'product' and 'review' would be two different entities which relate one-to-one or one-to-many. If i understand correctly the products are in your custom table fed by an external resource and you want to make product reviews in the form of PW pages that link to products and use (some of) it's data? Maybe you can tell in a little bit more detail how you would want things to look and work in the front-end (url structure etc.) and in the back-end. www.mynewproject.com -/reviews/ <- list reviews, do some category stuff --/iphone5/ <- single review, PW page which uses some data from custom table -
Reading and displaying data from a custom table
SiNNuT replied to einsteinsboi's topic in General Support
This is an interesting question and i also am curious to hear how some seasoned pro's would approach this. Since it basically is just for display purposes i can't see why it would be necessary to create corresponding fields in PW and show the entries as pages. Since you can basically do anything you want in PW templates i would setup one template to act as some sort of controller for your custom table. I'm not sure there is any benefit from using existing PW database classes, so you can just connect via PDO/mysqli or even 3rd party database/orm classes. You can then query the table and use the data in the template. You could use urlSegments to cater to your display needs and logic. -
If you would want to test this you can turn it off in your config.php /** * protectCSRF: enables CSRF (cross site request forgery) protection on all PW forms, * recommended for improved security. * */ $config->protectCSRF = false;
-
Unless it's really small scale i wouldn't go down that path. It would become messy and unmaintainable really quickly i think. I would follow Pete's suggestion.
-
Nice looking site, love the illustrations. I'm not sure i like the fact that the about page is just one big image. It looks good but it's not accessible, for google, screenreaders, people who would want to copy some info etc.
-
It's neat that the framework can take care of that stuff, but there's nothing stopping you from using sass, less, stylus, coffeescript and whatnot in your projects today, be it with PW projects or other. If you are on Mac you can check out CodeKit. I'm on Windows myself so i haven't used it but i've heard good things. Also, there are many other tools available on all platforms that can take care of compilation, concatenation, minification etc.
-
Menu's can get messy so i generally stick to navigations which follow the tree structure. If it's only a couple of pages outside of the structure you could append or prepend..etc. - Ryan beat me to it - Couldn't agree more.