Jump to content

ukyo

Members
  • Posts

    241
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by ukyo

  1. Yes its possible, you can configure module as your needs - Corredted with last commit, you can download 0.0.6 version
  2. Its not good solution for me, because i have some slide items on homepage and some other stuff, when my customer add some data do this slider whole cache will be cleared also. Homepage is not symbolic page for me, I am using homepage for website settings also other main things also. I have cache_expire field on homepage also, in dev mode making value "0" for production changing it.
  3. Little Test Results : Single page load times : LOCAL TEST - Before : - After : SERVER TEST - Before : - After: Homepage load times (Homepage getting slider and some of other data from different page->children and homepage have 2 repeater and website settings data etc..): LOCAL TEST - Before : - After : SERVER TEST (With custom .htaccess rules and google page speed module) - Before : - After : If @ryan put a clear cache button on admin panel, it will be good than delete caches manually from database , also i think website cache and module and other system cache need to be separated. Also, Cache Class could have an option about use file cache or db cache. Current cache function here : public function get($name, $expire = null, $func = null) If we can send an bool value like : $fileCache=true Cache class could use file caching. If false or nothing Cache class could continue to use db cache. public function get($name, $expire = null, $func = null, $fileCache=false)
  4. Hi, I wrote a little function for get last modified date from pages. What is this function making ? You can get last modified page modified date from given id, parent or from all pages. What can you do with last modified date? You can use it for caching pages. Here is little function and some example usages. /** * Get last modified page modified date from given $id, $parent_id, $templates_id or from all * * @param bool $id * @param bool $parent_id * @param bool $templates_id * @return mixed|string */ function getLastModified($id=false, $parent_id=false, $templates_id=false) { if(!is_null($id)) { $where = ""; if(is_bool($id) != true) { $where = " WHERE"; $where .= ($parent_id) ? " parent_id = {$id}" : " id={$id}"; $where .= ($templates_id) ? " AND templates_id = {$templates_id}" : ""; } $results = wire('db')->query("SELECT MAX(modified) as modified FROM pages{$where}"); if($results->num_rows > 0) { $result = $results->fetch_assoc(); $search = array(' ', '-', ':'); $replace = array('', '', ''); return str_replace($search, $replace, $result['modified']); } } return ""; } Gist : https://gist.github.com/trk/a9d7e01ecfa6e40b65bcExample Usages : <?php echo $cache->get("top-navigation" . getLastModified(true), function($pages) { echo renderYourNavigation(); }); ?> Here we are checking all pages and getting last modified date from database. With this way you don't need a cache time. If you update any page from your site, your cache file will be updated also. <?php echo $cache->get($page->name . getLastModified($page->id), function($page) { echo $page->title; // Do what you want... }); ?> With this usage : you can use $page->name + last modified date as cache name and you page will be cached and to be updated always.. <?php echo $cache->get('news-' . getLastModified(1234, true), function($pages) { $pages->get(1234); // Print out your news... }); ?> If you set second parameter as "true" function will check pages if have parent_id = 1234.
  5. I created Module with last dev version. Let me check for last stable version and i can see what is problem for oldest versions. Edit: Problem solved can you confirm after update to v0.0.5
  6. My solution for simple forms : Validation Module I used GUMP validation library with my custom usage additions. You can check my usage additions : https://github.com/trk/Validation/blob/master/README.md#example-long-format Also i wrote recaptcha module for form security, but didn't publish it yet: https://github.com/trk/Recaptcha Usage: $recaptcha = wire('modules')->get('Recaptcha')->verifyResponse($_POST['g-recaptcha-response']); if(!$recaptcha) { echo 'reCAPTCHA validation not ok!'; } You can add recaptcha as a rule to validation module like: 'g-recaptcha-response' => array( 'label' => 'Security Question', 'rule' => 'required|boolean', 'type' => 'captcha' )
  7. For compatibility, i will change [$foo, $bar] to array($foo, $bar). - Edit : Done. You can update module.
  8. Z-index values looking ok, but how copyright informations coming up? When i check page render result with firebug, footer section looking ok, .container element inside footer section coming up of absolute element. My solution is hack #content element or #footer .container element by little jquery code. Add a z-index value when document ready to #content "z-index: 2;" or #footer .container "z-index: -1;". Problem solve with this method. You can change InputfieldFontIconPicker.module line 94 with this code, I will update repo also : $output .= "\n<script> \n\tjQuery(document).ready(function($) { \n\t\t$('#{$options['id']}').fontIconPicker({ \n\t\t\tsource: {$options['icons']}, \n\t\t\t{$settings} \n\t\t}); \n\t\tif($('#content').length) { \n\t\t\t$('#content').css('z-index', 2); \n\t\t} \n\t}); \n</script>";
  9. Thanks for your feedback! Z-index problem causing from content section ("<div id='content' class='content'>"). Icon selector z-index value is "10000" and not effecting outside of "content" section, if you add z-index value = 2, to "<div id='content' class='content'>" element its looking ok. Need a hack for ("<div id='content' class='content'>") section by jquery or core team can add a z-index value for this section. If core team can do it, i don't need a hack for z-index. If they can't i can add a little hack for this problem. Will wait for core team answer.
  10. Yes, I submit it. Waiting for approve. Also if you can, can you correct the url of my dev profile False -> /alt-ve-bir-bilisim-teknolojileri/ (Loosing small "ı") True -> /alti-ve-bir-bilisim-teknolojileri/ (Turkish characters ). ı -> i note: I added logo also again. When you make post on dev form profile, if validation is not ok fields coming as blank field.
  11. If you want to access to admin page what will happen? I offer you use an module like Page Protector. Also you can create your custom view file, when you active protector for which page you choose.
  12. V.0.0.2 MarkupIconPicker Markup added.
  13. Thanks for your feedback ! I think, duplicate problem is not actually a problem. Why ? : I took all icons from font-awesome website by categorized and 1 icon may in more than 1 category. I see @Ryan module, i am trying to use always dev version of processwire and i can follow updates, new things better, but you can't use it on page as a field. @Ryan solution is good for templates and field icons select. If you think from customer side : Simple example, think you have links page for social network website. You need an icon for each link page and you can easily select icon from select list. you don't need to search icon class inside font-awesome website or inside a icon class guide. Just select it from list. Also its possible to limit icons from input setting tab by category.
  14. FieldtypeFontIconPicker Supported Icon Libraries FontAwesome 4.7.0 Uikit 3.0.34 IonicIcons 2.0.1 Cahangelog NOTE: Module store data without prefix, you need to add "prefix" when you want to show your icon on front-end, because some of front-end frameworks using font-awesome with different "prefix". Module will search site/modules/**/configs/IconPicker.*.php and site/templates/IconPicker.*.php paths for FieldtypeFontIconPicker config files. All config files need to return a PHP ARRAY like examples. Example config file : create your own icon set. File location is site/configs/IconPicker.example.php <?php namespace ProcessWire; /** * IconPicker : Custom Icons */ return [ "name" => "my-custom-icons", "title" => "My Custom Icon Set", "version" => "1.0.0", "styles" => array( wire("config")->urls->templates . "dist/css/my-custom-icons.css" ), "scripts" => array( wire("config")->urls->templates . "dist/js/my-custom-icons.js" ), "categorized" => true, "attributes" => array(), "icons" => array( "brand-icons" => array( "title" => "Brand Icons", "icons" => array( "google", "facebook", "twitter", "instagram" ) ), "flag-icons" => array( "title" => "Flag Icons", "icons" => array( "tr", "gb", "us", "it", "de", "nl", "fr" ) ) ) ]; Example config file : use existing and extend it. File location is site/configs/IconPicker.altivebir.php <?php namespace ProcessWire; /** * IconPicker : Existing & Extend */ $resource = include wire("config")->paths->siteModules . "FieldtypeFontIconPicker/configs/IconPicker.uikit.php"; $url = wire("config")->urls->templates . "dist"; $resource["scripts"] = array_merge($resource["scripts"], ["{$url}/js/Altivebir.Icon.min.js"]); $resource["icons"]["flag-icons"] = [ "title" => "Flag Icons", "icons" => array("tr", "en", "fr", "us", "it", "de") ]; $resource["icons"]["brand-icons"]["icons"] = array_merge($resource["icons"]["brand-icons"]["icons"], array( "altivebir" )); return $resource; After you add your custom config file, you will see your config file on library select box. Library Title (Location Folder Name). If your library categorized and if you have categorized icons set like uikit and fontawesome libraries, you will have category limitation options per icon field or leave it empty for allow all categories (default). Example : output if ($icon = $page->get("iconField")) { echo "<i class='prefix-{$icon}' />"; } MarkupFontIconPicker Usage // MarkupFontIconPicker::render(YourIconField=string, Options=array) echo MarkupFontIconPicker::render($page->YourIconField, [ 'prefix' => 'uk-icon-', // Icon class prefix, if you have different prefix, default is : "fa fa-" 'tag' => 'span', // Icon tag default is : "i" 'class' => 'fa-lg', // If you have extra cutom classes, for example : icons sizes, Array or Sting value 'style' => 'your custom styles if you have' // Array or String Value ]); Theme support Search support Category support
  15. You can use core translator for translate default "English" language. You will see "/modules/Validation/Libraries/gump.class.php" file when you want to make site translation. If you don't use multi language module you can directly edit this file, you will see lang terms, but for module updates its not good idea edit module file directly.
  16. I am using this module with 2.5.10 dev version and i see 1 issue for updating current cart not working, maybe it causing from my mods. I have some modifications for form validations and call custom view files.
  17. Thank you @Pete ! Also here many example usage : https://github.com/Wixel/GUMP/tree/master/examples but don't forget replace GUMP() with Validation
  18. Validation Module for ProcessWire, Validation module using GUMP standalone PHP data validation and filtering class. That makes validating any data easy and painless without the reliance on a framework. Usage almost same with original GUMP validation class. Extended original validation class for make it multi-language and added 2 new function 1 for field labels, 1 for set and get fields. Module Link
  19. Thanks, First post with a huge translation , I hope it will be helpful for PW Users.
  20. ProcessWire 2.4.2 Turkish Core Translations Status (100%) and some of modules translations included. Turkish Translation Github Repo (For Support)
×
×
  • Create New...