-
Posts
30 -
Joined
-
Last visited
Everything posted by Kemal
-
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
-
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
-
Hi, i am using processwire v3 i installed mapmarker module. crate a map field and add it to temple. When i try to open template from admin field map not coming. ! mark comes and says js file error. what should i do? some people says api key related but i dont know what to do
-
Now i understand the problem, when i click on pagename module configuration from admin panel it says on top : Character replacements configuration is disabled because $config->pageNameCharset is UTF8. because of that configuration window not opening. i remove $config->pageNameCharset line from site/config.php file then it works. i would like to use both of them together. i mean arabic or foreign language characters on url and also modification of some characters like s instead of ş so, i put $config->pageNameCharset line again and i add extra characters to $config->pageNameWhitelist. now: ş ->ş desire ş->s
-
Hi, to enter some character conversion on url for Turkish language i was modifying InputfieldPageName.module file. It was working fine. But on v3 modification of this file not working. 'ź' => 'z', 'ş' => 's', 'ğ' => 'g', 'ı' => 'i', 'İ' => 'i', i added these characters when i enter title url become empty character not i instead of ı is it related with .htaccess file ? because i edited it for use utf8 characters like arabic character urls
-
I was using 2.7.2 thanx for your reply, i will try v3
- 2 replies
-
- arabic language
- multi language
-
(and 2 more)
Tagged with:
-
Hi, I am creating Multilanguage site for my customer. One of the languge is Arabic. What should i do for arabic language support? i installed multilanguage profile but when i type arabic language characters its not seen in url part. Its empty and when i hit the save button it become default url (english) I tried to modify inputfieldpagename.module file but its not working. It only translating the foreign character to latin character
- 2 replies
-
- arabic language
- multi language
-
(and 2 more)
Tagged with:
-
How to add field called flagicon to Setup >Languages Section?
Kemal replied to Kemal's topic in Multi-Language Support
cool, i did not know show system templates i try to add image field and upload a flag icon the try to call from home template $language->icon->url but it just give the file name not url so i delete filed and i used text field to store icon path it worked this way thanx i just wondering why cant i get the url of the image file with $language->icon->url -
Hi, i am using multi language profile. I would like to use flagicon instead of the language name on top to switch languages. So i would like to use $language->flagicon instead of $language->title. On Setup>Languages>Add New Language is it possible to add imagefield or text filed which store imagepath? so i can call it as i said above. If is there any other way to do that help me pls.
-
now its perfect. is there any way to add this urls to sitemap.xml? i am using Markup Sitemap XML module