-
Posts
30 -
Joined
-
Last visited
Recent Profile Visitors
2,470 profile views
Kemal's Achievements
Jr. Member (3/6)
0
Reputation
-
I am creating new web site with 30 language processwire + google cloud app engine + cloudflare is my solution for fast hosting and cdn I see that bitnami has lastest version of processwire 3.0.62 https://bitnami.com/stack/processwire As a hosting Hostgator cloud system is another alternative forme https://www.hostgator.com/cloud-hosting What do yout think? Any body uses this system? @tpr @LostKobrakai
-
Kemal started following Map Marker Map , ProcessWire and Google Cloud (Google App Engine) , 3.x: To many languages breaks MySQL index limit and 3 others
-
3.x: To many languages breaks MySQL index limit
Kemal replied to phiro's topic in Multi-Language Support
Any solution for this i am also getting same error SQLSTATE[42000]: Syntax error or access violation: 1069 Too many keys specified; max 64 keys allowed my web site have 32 language. I contact with host about upgrade the limit but i still waiting. Is there any thing i can do? What is the limitation of the language number for this? -
Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)
Kemal replied to ryan's topic in Modules/Plugins
Hi, i need youtube video id Is there any way to get this id from template file.? I was looking into TextformatterVideoEmbed.module file public function format(&$str) { $this->embedYoutube($str); $this->embedVimeo($str); } /** * Check for Youtube URLS and embed when found * */ protected function embedYoutube(&$str) { // perform a strpos fast check before performing regex check if(strpos($str, '://www.youtube.com/watch') === false && strpos($str, '://www.youtube.com/v/') === false && strpos($str, '://youtu.be/') === false) return; // 1: full URL 2:video id 3: query string (optional) $regex = '#<p>\s*(https?://(?:www\.)?youtu(?:.be|be.com)+/(?:watch/?\?v=|v/)?([^\s&<\'"]+))(&[-_,.=&;a-zA-Z0-9]*)?.*?</p>#'; if(!preg_match_all($regex, $str, $matches)) return; foreach($matches[0] as $key => $line) { $oembedURL = "$this->http://www.youtube.com/oembed?url=" . urlencode($matches[1][$key]) . "&format=json&maxwidth={$this->maxWidth}&maxheight={$this->maxHeight}"; $videoID = $matches[2][$key]; $queryString = isset($matches[3][$key]) ? $matches[3][$key] : ''; $embedCode = $this->getEmbedCode($oembedURL, $videoID); Can i use something like below from my template file $page->video->$videoID; There are hundreds of youtube video fields entered with TextformatterVideoEmbed module . And i can not get these url with because it embed iframe and shows youtube video not the url If i can grab video url i can get the id from there. I want to keep working this way but i need this url or video id for use on amp-youtube tag -
Hi, I am using pagination with ajax. When i click on any page number url not changing because of ajax call So when i click on page 3 and then click on page 7 i hit the back button it returns to page 1 because url never changing Here is my site: www.sediremlak.com For real estate sites if visitor find a property on page 4 and click on that property page. After click on back button site jumps to first page or home page not page 4 How can i fix this problem?
- 1 reply
-
- backbutton
- pagination
-
(and 1 more)
Tagged with:
-
Hi. How can we use this form on AMP page? Here is amp-form example https://ampbyexample.com/playground/#url=https%3A%2F%2Fampbyexample.com%2Fcomponents%2Famp-form%2Fsource%2F
-
Hi, is there any module or tutorial about amp pages for processwire? I want to make an amp version of my regular page. My idea is create a new template file(amptemplate.php) coded with amp html i will create a folder named "Amp" on admin panel and connect that template for child pages is it works?
-
Hi, I installed simple contact form module and Wire Mail Smtp module. they are working fine. What i want to learn is 1- how can i use ajax? i tried example at the tutorial but not working on me. there must be something related with class names, i am not good at this. <div class="content"> <div class="container"> <div class="row"> <div class="col-md-10 "> <style> #Inputfield_scf-website { display:none; } #wrap_scf-date{ display:none; } #wrap_Inputfield_scf-website { display:none; } </style> $scf = $modules->get('SimpleContactForm'); echo $scf->render($options); </div> </div> </div> </div> this is my code for ajax code if ($('.js-simplecontactform').length) { $.simplecontactform($('.js-simplecontactform')); } and for php <?php if ($config->ajax) { $modules->get('SimpleContactForm')->render(); } else { // html, header, nav etc. $modules->get('SimpleContactForm')->render(); // html, footer etc. } there must be some modifications to work this code. but i dont know how to do. my web site: https://www.sediremlak.com/en/contact/ 2- second question is how can i use my own css for simple contact form? is there a easy way to modify css? when i just put echo $scf->render($options); default options are rendering. is there a way to use instead of render function? sorry for my dummy questions. i would be appriciate if any one help me.
-
Thanks, you forgot to add jump top of div code i add it var $container = $("#container1"); // avoid calling jQuery all the time $container.on('click','.MarkupPagerNav a', function() { $container.load( $(this).attr("href") + " #content1", function() { $("html, body").animate({ scrollTop: $("#container1").offset().top }, 'slow'); // add old code here to scroll top of the div $container.removeClass('loading'); }).addClass('loading'); return false; }); now works fine. Thanks for your help diogo!
-
thanks for your solution. i hope this helps other beginners who try to use pagination with ajax. i have one last problem. loading gif! $("#container1").on('click','.MarkupPagerNav a', function() { $('#loading').show(); -> show loding gif $('#container1').animate({opacity:0.1}, 200); -> back ground dark $("#container1").load( $(this).attr("href") + " #content1" ); $("html, body").animate({ scrollTop: $("#container1").offset().top }, 'slow'); $('#loading').hide(); ->hide loading gif $('#container1').animate({opacity: 1},200); ->background light return false; }); how should i place them?
-
what about ? $("#container1").animate({ scrollTop: 0 }, 'slow'); i change the script as $("#container1").on('click','.MarkupPagerNav a', function() { $("#container1").load( $(this).attr("href") + " #content1" ); $("#container1").animate({ scrollTop: 0 }, 'slow'); return false; }); but not scroll to #container1 after i click on next button of pagination what if i use $("html, body").animate({ scrollTop: 0 }, 'slow'); it goes to top of the page normally not top of the container1 div
-
Just one word -> Appriciate!
-
i need help about this code here is my page: www.sediremlak.com i am trying pagination with ajax <div id="container1"> <div id="content1"> <?php $pagination = $vitrin->renderPager();?> <?php echo $pagination; ?> <?php foreach($vitrin as $p) { ?> bla bla <?php } ?> </div> </div> <script> $(".MarkupPagerNav a").on('click', function() { $("#container1").load( $(this).attr("href") + " #content1" ); return false; }); </script> every second click of next button on pagination, page jump to top on load. reload page i think, whats wrong? everything i need is pagination like this forum uses on . you can test it from www.sediremlak.com
-
Hi, again i have another question, i need to mark region not specific coordinate. i mean when i click on map it will mark 2 km2 area here is example what i want https://developers.google.com/maps/documentation/javascript/examples/circle-simple how can i do it?
-
hi, i tried forked version of @ukyo , i installed it and and get the apikey (browser type) for my project. then i add api key from module config page. now admin panel works fine with map. i add <script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?sensor=false'></script> to template file as told on the read me file. When i try to load the template it said "opps ! something went wrong" so i added <script type="text/javascript" src="//maps.googleapis.com/maps/api/js?key=API_KEY&sensor=false"></script> now it works fine. Is it bad for me to use this with api key on my template? because everybody can see my key by view soruce of page