Jump to content

kkalgidim

Members
  • Posts

    32
  • Joined

  • Last visited

Posts posted by kkalgidim

  1. 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. 

  2. 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>

     

  3. 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

  4. 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?

    image.thumb.png.a742b84d3f60ff0cb2e36870467a45d8.png

     

     

    image.thumb.png.c29a18dca492ea8a913755db48cb3277.png

     

     

    image.thumb.png.f19556dbb4ca052eccb05ca8e68be923.png

     

  5. 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?

     

    Untitled-4.jpg

  6. 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

     

  7. @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)

     

  8. 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.

     

    • Thanks 1
  9. 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

  10. 2 hours ago, 3fingers said:

    Does this works?

    
    
    if($config->ajax) {
    
    	$language = $languages->getLanguage();
        $searchresults = $pages->find("has_parent!=2, $language");
        header("Content-type: application/json"); // Set header to JSON
        echo $searchresults->toJSON(); // Output the results as JSON via the toJSON function
    
    } else { ...

     

    no ?

    i also tried
     

    Quote

     

     $currentLanguage = $user->language;

    $searchresults = $pages->find("has_parent!=2, $currentlanguage");

     

    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

    Quote

    $searchresults = $pages->find("has_parent!=2, langparam={$currentlanguage}");

     

  11. 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

    Quote

    // Check if ajax request
    if($config->ajax) {

        $searchresults = $pages->find("has_parent!=2"); // Find all published pages and save as $results
        header("Content-type: application/json"); // Set header to JSON
        echo $searchresults->toJSON(); // Output the results as JSON via the toJSON function

    } else {

    result attached as image

    Untitled-1.jpg

  12. 							<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
    								<?php foreach($pages->get("/treatments/")->children as $t) {
    								
    					   
    									$count = $pages->count("template=clinic, cliniclocation=$page->id, treatmentprice.clinictreatments=$t->id");
    									if ($count!=0){
    										
    									echo "<a class='dropdown-item' href='$page->url$t->name'>$t->title ($count)</a>";}
    								} ?>
    							</div>

     

    Hi you see code above.

    Its a multi language web site.

    When i change the language instead of default language,  url section ( t->name  ) not  change!

    for ex: 

    default language english

    http://www.domain.com/en/locations/turkey/dental-implant

    select turkish language

    http://www.domain.com/tr/konumlar/turkey/dental-implant

    it must be 

    http://www.domain.com/tr/konumlar/turkey/dis-implanti

     

    if i use

    $t->title 

    instead of

    $t->name

    translation works fine but not as url. as usual it echoes title

    it look like 

    http://www.domain.com/tr/konumlar/turkey/Dis Implati

     

    if i use $t->url

    it echo konumlar/turkey/dis-implati

     so if i get last segment of url it will works fine.

     

    What can i do for that?

     

  13. Hi,

    I am trying to implement a search section for a project

    Can any body tell me about this search method of the site . Link below

    https://www.qunomedical.com/en/

    I think its called morping search

    It cover screen and filter results by characters you type.

    It lookslike live search i think. Is there any module for processwire? I found Ajax search module by @Soma 

    If anybody show me a way about this i will be appricate.

     

×
×
  • Create New...