Jump to content

kkalgidim

Members
  • Posts

    36
  • Joined

  • Last visited

Everything posted by kkalgidim

  1. You are totally right about what you said. My project is about roblox game item trading system. So my visitor target is between 8 - 15 years old. Probably most of them uses their parents phone or laptops. Visitor information not important for me. I dont need any email address Sytem must be quick and easy. wihout registration. Also the trade will be deleted in 24 hour. If bad guy try to hack the system there is nothing to lose for me. Also there is nothing the hacker needs in the system. I install it again and run the project. But probably you right , my ip approach is sucks but easy to use like Windows ?
  2. Thanks for your approach. My project creates a trade page when submit form. After 24 hours pages deleted. So i add ip field on trade template (every time when form submitted saved session ip to trade page) then count trade pages with that ip. $ip=$session->getIP(); $submitCount = $pages->count("template=trade, userip=$ip");?> just add conditon if ($input->post->btn_submit){ if($submitCount<5){ $p = new Page(); $p->of(false); $p->template = 'trade'; //or whatever your template is called $p->parent = wire('pages')->get('/trades/'); //or whatever the parent page is called $p->title = 'Form submission from ' . date('Y-m-d H:i'); $p->robloxusername = $input->post->text('robloxusername'); $p->userip = $session->getIP(); } if($submitCount>=5) { $message = "You have a total of 5 trades. You've reached your daily limit. Try again when your trades are deleted within 24 hours."; echo "<script type='text/javascript'>alert('$message');</script>"; } } because trades are deleted after 24 hours i dont need to control the time for ip address. Thanks for your help.
  3. Hi, I have a form that writes in db. I am trying to find a way to limit the guest user from ip address. 2 Form request daily. When User try to submit 3. post it will be blocked. Is there any way to do it?
  4. Here is my frontend form selecting multiple items. OFFERED ITEMS AND REQUESTED ITEMS here is my admin tree inside of the trade template admin panel i am using asm select. What i trying to do is when user select items from frontend form. I want to save that into trade page items_offered and items_requested asmselect as shown in the screen shot. i can do it for robloxusername with this code if ($input->post('robloxusername')) { $p = new Page(); $p->template = 'trade'; //or whatever your template is called $p->parent = wire('pages')->get('/trades/'); //or whatever the parent page is called $p->title = 'Form submission from ' . date('Y-m-d H:i'); $p->robloxusername = $input->post->text('robloxusername'); $p->save(); how can i do it to checkboxes ? Here is my form html <form method="POST" action="<?php echo $page->url; ?>" id="id01" class=" w3-container w3-black w3-text-light-grey w3-margin"> <span onclick="document.getElementById('id01').style.display='none'" class="w3-button w3-text-white w3-xlarge w3-display-topright">&times;</span> <div class="w3-row-padding w3-left w3-card w3-dark-grey w3-round w3-margin " > <h2 class="w3-center">WHAT DO YOU OFFER? SELECT MAX 4</h2> <?php $x=1?> <?php foreach ($pages->get('/en/items')->children as $r) {?> <div class="w3-center w3-col m3 l2 s4 w3-round " > <div class="cont-checkbox"> <input class="w3-check" type="checkbox" id="x<?php echo $x;?>" /> <label for="x<?php echo $x;?>"> <img class="responsive" src="<?php echo $r->image->url;?>"> <span class="cover-checkbox"> <svg viewBox="0 0 12 10"> <polyline points="1.5 6 4.5 9 10.5 1"></polyline> </svg> </span> <div class="info"> <?php echo $r->title;?></div> </label> </div> </div> <?php $x=$x+1;} ?> </div> <div class="w3-row-padding w3-left w3-card w3-dark-grey w3-round w3-margin " > <h2 class="w3-center">WHAT DO YOU REQUEST? SELECT MAX 4</h2> <?php $a=1?> <?php foreach ($pages->get('/en/items')->children as $m) {?> <div class="w3-center w3-col m3 l2 s4 w3-round " > <div class="cont-checkbox"> <input class="w3-checkreq" type="checkbox" id="a<?php echo $a;?>" /> <label for="a<?php echo $a;?>"> <img class="responsive" src="<?php echo $m->image->url;?>"> <span class="cover-checkbox"> <svg viewBox="0 0 12 10"> <polyline points="1.5 6 4.5 9 10.5 1"></polyline> </svg> </span> <div class="info"> <?php echo $m->title;?></div> </label> </div> </div> <?php $a=$a+1;} ?> </div> <div class="w3-col m12" > <div class="w3-container " > <div class="w3-row-padding w3-card w3-dark-grey w3-round w3-margin " > <input class="w3-input w3-border w3-xlarge " name="robloxusername" type="text" placeholder="ENTER ROBLOX USERNAME"> </div> </div> </div> <div class=" w3-center"> <input type="submit" value="Send" class="w3-button w3-xlarge w3-center w3-section w3-blue w3-ripple w3-padding"/> </div> </form>
  5. WireMailSMTP module installed and when i test it from setting it works perfectly. Can you give me a working simple code with html form. For Example: Name, subject, Message i will use it on home page. I need an example code with html.
  6. I want to clarify my question. according to infinity scroll example <body> <div id="element"> <!-- render load.html --> </div> <!-- read JQuery --> <script src="https://code.jquery.com/jquery-3.6.0.min.js"> </script> <!-- infinityScroll.min.js --> <script src="dist/infinityScroll.min.js"></script> <script> const config = { type : "html", data : "load.html", loadListClass : "is-load-list", renderInit : 2, scrollEndMessage : "read all contents!", } $('#element').infinityScroll(config) </script> </body> According to my processwire home.php <body> <div id="deneme" class="container" > <!-- PAGİNATİON SECTİON --> $limit = 9; // the "limit"-setting used on this page $results = $pages->find("template=property, limit=9, sort=-date"); $totalpages = ceil($results->getTotal() / $limit); // PAGINATOR: set SEO tags for Google if ($input->pageNum) { if ($input->pageNum < $totalpages) { echo "<a class='pagination__next' rel='next' href='" . $page->url . $config->pageNumUrlPrefix . ($input->pageNum + 1) . "'>Next "; } else { echo "Thanks for browsing, you have reached the bottom of this page!"; } } ?> <!--PAGINATION SECTION ENDS --> <div class="row prop-grid"> <?php foreach($results as $l) { ?> <div class="row-eq-height cf-xs-6 cf-sm-6 cf-lg-4 col-xs-6 col-sm-6 col-md-4 prop-i-col"> <div class="prop-i"> <a href="<?php echo $l->url;?>" class="prop-i-img"> <img src="<?php echo $l->images->eq(0)->url;?>" alt=""> </a> </div> </div> <?php } ?> </div> </div> What should i do for load.html section? i do not have another file to load content. its already foreach loop? will it be home.php? or template name (property) . I confused <script> const config = { type : "php", data : "load.html", loadListClass : "prop-i-col", renderInit : 2, scrollEndMessage : "read all contents!", } $('#deneme').infinityScroll(config) </script>
  7. @Klenkes Thanx for your reply. I tried all variations but still not working. I located jquery to top and infinitecroll script to bottom still same. maybe its related with path: '.pagination__next', i removed standard pagination system now i am just echo the next page a href link with class="pagination__next" but infnite scroll not working
  8. Hi, i implemented pagination for my site : http://www.diana-homes.com Now i want infinite scroll for home page. I did all the things according to https://infinite-scroll.com/ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <script src="https://unpkg.com/infinite-scroll@4/dist/infinite-scroll.pkgd.js"></script> <script type="text/javascript"> $('.deneme').infiniteScroll({ // options path: '.pagination__next', // append: '.emlak', history: false, });</script> <div class="deneme row prop-grid"> <?php $results = $pages->find("template=property, limit=9, sort=-date"); $pagination = $results->renderPager(array( 'linkMarkup' => "<a class='pagination__next' href='{url}'><span>{out}</span></a>" )); echo $pagination; ?> <?php foreach($results as $l) { ?> <div class="row-eq-height cf-xs-6 cf-sm-6 cf-lg-4 col-xs-6 col-sm-6 col-md-4 prop-i-col"> <div class="prop-i"> <a href="<?php echo $l->url;?>" class="prop-i-img"> <img src="<?php echo $l->images->eq(0)->url;?>" alt=""> </a>...</div></div></div> here is the code i used but when i try it nothing happens. I think jquery not triggering. Appricate for any help. You can inspect on my site: http://www.diana-homes.com
  9. I think its related with default langugae change. When i change the default language on admin panel url works fine. But still languages are not active
  10. Hi, i have a "page reference" field called "konum". "Allow new pages to be created from field" true i did all necessary things below 1. Both a parent and template must be specified in the “Selectable pages” section above.2. The editing user must have access to create/publish these pages.3. The “label field” must be set to “title (default)”. When i try to create new field for "konum" the url of field become "untitled-0220623163620" so like this /en/location/untitled-0220623163620/ whats the problem?
  11. echo title; Output -> Murat Övünç Konseri After i save page title become like this on admin panel -> Murat &Ouml;v&uuml;n&ccedil; Konseri Here the code i save page $p = new Page(); // create a new page $p->template = 'home'; // choose template $p->parent = wire('pages')->get('/posts/'); // choose parent page $p->name = $wire->sanitizer->text($baslik[1]); $p->title = $wire->sanitizer->text($baslik[1]); $p->save(); // save the page Its multilanguage profile template ı attached the admin panel output what should i do?
  12. It works now. Thanx for fast solution!
  13. Apache 2.4.41 Running DirectAdmin 1.60.1 Running Exim 4.93.0.4 Running MySQL 5.5.31 Running Named 9.8.2rc1 Running ProFTPd 1.3.5b Running sshd Running dovecot 2.3.9.2 (cf2918cac) Running Php 5.5.38 Installed
  14. I am getting error when i try to install it from admin panel module install section. Compile Error: Arrays are not allowed in class constants (line 58 of /home/alanyaduyuru/domains/alanyaduyuru.com/public_html/site/modules/InstagramBasicDisplayApi/InstagramBasicDisplayApi.module) line 58 refers to const mediaTypes = [ 'carouselAlbum' => 'CAROUSEL_ALBUM', 'image' => 'IMAGE', 'video' => 'VIDEO', ]; Is it related with instagram update or just related with me? I am using fresh installed multilanguage profile if its matter. @nbcommunication
  15. @kongondoI am using opencart one of my project and i am waiting for padloper 2 to transfer it. important things for me is -international multi language and currency system.(detecting customer language and redirect him to that language) (also adding shipping and custom prices according to location of customer) - integration with local store barcode software. (when product sold in real store stock must be populated on online store)
  16. Hi, i found solution and i would like to post it here. Maybe it helps someone. i removed echo $searchresults->toJSON(); i used the code below instead of toJSON function $myPages = $pages->find('template=clinic|doctor|treatment|location|resource'); $data =$myPages->explode(['title', 'url']); echo wireEncodeJSON($data); now it shows the current language results You have to set the $.typeahead({ cache: false, if you dont set cache : false it still show the cached language result even you change the language.
  17. Hi, here is my question Home - Clinics - Doctors doctor.php template -> reference_clinic (page reference field) when i create new doctor i select the related clinic from reference_clinic field. Works fine! What i want is when i select related clinic on doctor template at the same time clinic template -> reference_doctor updated so, if i create a doctor i want to select a clinic. if i create a clinic i want to select doctor. Help please
  18. @Mats can you give an example for it. i think that there must be a simple way to filter page array to current language but i coundnt figure it out
  19. i tried it but its not working. thanks for your reply @3fingers
  20. no ? i also tried but its not working. i think find function does not accept variable parameter. maybe if i know the value of the laguage param it can be something like that
  21. @bernhard I used the module below. I dont really know about json files. Just what i want is live search system. https://modules.processwire.com/modules/pages2-json/ What does this do? Simply adds method toJSON() to Page and PageArray elements, is capable to converting image and file arrays to URL containers, travels recursively all objects before outputs actual JSON.
  22. Hi, i am using multi language system i have ajax search system (live search) When i enter the word into search box it find the related topics but also show the other langugae titles. How can i made it for current language? Here is the code that i use result attached as image
  23. The url segment l try to get is on the sub category of treatments page so url segment is for the present page i think. I get the url of treatment url or title of treament bit i cannot get the last segment of treatment url
×
×
  • Create New...