• Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Kemal

  • Rank
    Jr. Member

Recent Profile Visitors

1,193 profile views
  1. 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, '://') === false && strpos($str, '://') === false && strpos($str, '://') === false) return; // 1: full URL 2:video id 3: query string (optional) $regex = '#<p>\s*(https?://(?:www\.)?youtu(?|\?v=|v/)?([^\s&<\'"]+))(&[-_,.=&;a-zA-Z0-9]*)?.*?</p>#'; if(!preg_match_all($regex, $str, $matches)) return; foreach($matches[0] as $key => $line) { $oembedURL = "$this->" . 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
  2. 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: 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?
  3. Hi. How can we use this form on AMP page? Here is amp-form example
  4. 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?
  5. 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: 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.
  6. 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!
  7. 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?
  8. 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
  9. Just one word -> Appriciate!
  10. i need help about this code here is my page: 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
  11. 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 how can i do it?
  12. 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=''></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="//"></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
  13. 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
  14. 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
  15. from admin panel modules -> configure -> InputfieldPageName click on it and its just give info about plugin. can you sgive me some documentatşon link about this modle configuration