Jump to content

Martijn Geerts

PW-Moderators
  • Posts

    2,769
  • Joined

  • Last visited

  • Days Won

    31

Everything posted by Martijn Geerts

  1. Trying to install MarkupCSScompress module, but PW respond with: Unable to install module 'MarkupCSScompress': You must save Fieldgroup 'MarkupCSScompress' before adding to Template 'MarkupCSScompress' Who can help me out ? souce code on github tnx
  2. @adamspruijt, Will check it tomorrow.
  3. You could add fieldsets to your templates, then let the content related stuff on the left and the storage & settings related stuff on the right side This way you could save some space. Template fields: fieldset_content (set to 60% width) title headline summary body fieldset_content_end fieldset_storage_settings (set to 40% width) images files amazing_checkbox etc... fieldset_storage_settings_end
  4. There's a little glitch in this module. It tries to create tabs in fieldsets. Though not ideal, the code below will remove the unused div with uncomplete ul. $(".ui-tabs-nav").each(function(){ if($(this).find('li').length == 0) { $(this).parent('.langTabs').remove(); } });
  5. Thank you Adam, Lovely addition !!
  6. We have to thank Diogo for that! (oops sorry kongondo, i'm a bad reader...)
  7. Now we have this, I can imagine we have a "snippet" bucket somewhere were we can share some high quality "snippets".
  8. This is great! Thinking loud here: If you add tags to images, (lets say: cars, beaches or skyscrapers) then you could easily create albums. [[gallery tag=skyscrapers]]
  9. Pete, tnx letting me smile all day !
  10. Pete, where is your parrot ?
  11. Hey Pete, I used these color functions in a project, as I needed also to use soma's Sliders for color outputs. Maybe you can use one or more of them to. // rgbToHsl function rgbToHsl ( array $rgb ) { list( $r, $g, $b ) = $rgb; $r/= 255; $g/= 255; $b/= 255; $max = max( $r, $g, $b ); $min = min( $r, $g, $b ); $h; $s; $l = ( $max + $min )/ 2; if ( $max == $min ) { $h = $s = 0; } else { $d = $max - $min; $s = $l > 0.5 ? $d/ ( 2 - $max - $min ) : $d/ ( $max + $min ); switch( $max ) { case $r: $h = ( $g - $b )/ $d + ( $g < $b ? 6 : 0 ); break; case $g: $h = ( $b - $r )/ $d + 2; break; case $b: $h = ( $r - $g )/ $d + 4; break; } $h/= 6; } return array( $h, $s, $l ); } // hslToRgb function hslToRgb ( array $hsl ) { list( $h, $s, $l ) = $hsl; $r; $g; $b; if ( $s == 0 ) { $r = $g = $b = $l; } else { $q = $l < 0.5 ? $l * ( 1 + $s ) : $l + $s - $l * $s; $p = 2 * $l - $q; $r = hueToRgb( $p, $q, $h + 1/ 3 ); $g = hueToRgb( $p, $q, $h ); $b = hueToRgb( $p, $q, $h - 1/ 3 ); } return array( round( $r * 255 ), round( $g * 255 ), round( $b * 255 ) ); } // Convert percentages to points (0-255) function normalizeCssRgb ( array $rgb ) { foreach ( $rgb as &$val ) { if ( strpos( $val, '%' ) !== false ) { $val = str_replace( '%', '', $val ); $val = round( $val * 2.55 ); } } return $rgb; } // cssHslToRgb function cssHslToRgb ( array $hsl ) { // Normalize the hue degree value then convert to float $h = array_shift( $hsl ); $h = $h % 360; if ( $h < 0 ) { $h = 360 + $h; } $h = $h/ 360; // Convert s and l to floats foreach ( $hsl as &$val ) { $val = str_replace( '%', '', $val ); $val/= 100; } list( $s, $l ) = $hsl; $hsl = array( $h, $s, $l ); $rgb = hslToRgb( $hsl ); return $rgb; } // hueToRgb function hueToRgb ( $p, $q, $t ) { if ( $t < 0 ) $t += 1; if ( $t > 1 ) $t -= 1; if ( $t < 1/6 ) return $p + ( $q - $p ) * 6 * $t; if ( $t < 1/2 ) return $q; if ( $t < 2/3 ) return $p + ( $q - $p ) * ( 2/ 3 - $t ) * 6; return $p; } // rgbToHex function rgbToHex ( array $rgb ) { $hex_out = '#'; foreach ( $rgb as $val ) { $hex_out .= str_pad( dechex( $val ), 2, '0', STR_PAD_LEFT ); } return $hex_out; } // hexToRgb function hexToRgb ( $hex ) { $hex = substr( $hex, 1 ); // Handle shortened format if ( strlen( $hex ) === 3 ) { $long_hex = array(); foreach ( str_split( $hex ) as $val ) { $long_hex[] = $val . $val; } $hex = $long_hex; } else { $hex = str_split( $hex, 2 ); } return array_map( 'hexdec', $hex ); } /** * * Output to a "r, g, b" string * */ function colorStringRGB($h, $s, $l ) { $output = ''; $hsl = array($h, $s, $l); $color = cssHslToRgb($hsl); foreach( $color as $rgb ) $output .= $rgb . ', '; $output = rtrim( $output, ', ' ); return $output; }
  12. Sorry it's so quiet around the fieldtype... The development is stand to a hold, cause there's to much work on the table. One other thing, segmenting the list & interrest groups are quite complex if you're not an experienced developer like me. (that is were it is now localy) Next to that, there's a lot of overhead in the way I programmed it.
  13. Welcome jlahijani! Have a great time over here.
  14. http://responsivepx.com/?processwire.com (tnx Remy Sharp)
  15. Congratulations Ryan.
  16. Did you transfer the .htaccess ? I like to transfer all files within a zip & then unpack it on the server. If you're on mac, use the terminal for zipping. ( sudo zip -r zipfile.zip directory ) This way the read/write stays intact and no single file missed issues.
  17. I love JB !
  18. We do the same as Marty. We have several empty email templates. Pages with empty email templates may receive pages with content blocks, that way we can build a newsletter. Then the source of the rendered newsletter is copied to the Newsletter Server.
  19. Hi Ronnie, Using a mail service to send is the best thing to do ( You can get easily banned on ip or IP range etc. ) On our Job we still use interspire emailmarketer. But we want to shift to MailChimp. I was busy with a fieldtype that creates a campaign & update it to mailChimp. It's finished for 90% but I lack the time to finish the interrest groups. I will not bring sending within this module cause I think that can be done with a seperate module If finished, I will share it with the PW community.
  20. If you use it on backend, I think so. The jSon is generated by ProcessWire self.
  21. Glad its working now!
  22. Add this to your head. <script> var config = {"JqueryWireTabs": {"rememberTabs": 0}}; </script>
  23. Also think of validating your post, to be shure that the post is save.
  24. <script> $(function(){ if($("#youtube_wrapper").size()) { $("#youtube_wrapper").WireTabs({ items: $("#overview_wrapper, #upload_wrapper"), id: 'tabs', rememberTabs: 1 }); } }); </script> Should work I think
  25. Thats correct.
×
×
  • Create New...