Jump to content

Pretobrazza

Members
  • Posts

    57
  • Joined

  • Last visited

Posts posted by Pretobrazza

  1. Hi @kongondo,

    I'm in the process of having to merge 2 Joomla/Seblod sites with several types of 'search' pages. Most of them have a search-box with a combination of dynamic search + one or more input boxes for a text search

    In the documentation I couldn't find find any reference to the fact that your module effectively supports a combination of dynamic search + one or more input boxes for text. If it can do what I do as in the link below, I'll buy your module immediatly. 🙂

    Hereunder one example, of one type of filtered search page with such a box (text+dynamic), paging and a responding url from a collection with 44000 items: 
    https://sincfala.be/museumcollectie/collectie?cck=collectieitems&art_title=&collectienaam=Audiovisuele+materialen&rubrieknaam=Prentbriefkaarten&onderrubrieknaam=Duinbergen&zoek_op_een_trefwoord=hotel&search=collectieitems&task=search

    Kind regards,
    Bernard

        

     

     

  2. 12 hours ago, gebeer said:

    I moved from Joomla/Seblod to ProcessWire about 10 years ago. It was the best decision I ever made in my developer life. Happy coding with PW 🙂

    @gebeerFor sure I remember you from those days. That's when I jumped over too. For sure I didn't make many sites (one for a soccer club and a shop) but I used PW especially at the time for a setup of touchscreens in a museum I work for. Nearly each room in that museum had a different screen layout being powered by one PW. Even though I'm not a good coder, I even managed to make streetview to look into the right direction in each of the POI's (from a setting in admin). The poi's on the left of the map are more documented but this only shows the power of PW and what it can do: https://durvenleven.be/pw/handelszaken/  In another room there was something like this:   https://durvenleven.be/pw/personen/

    (truly sorry that I'm out of the tread but I couldn't help it)
         

    • Like 1
  3. @Macrura 
    Hello Marc,
    Really, you're a champion 😀😍

    Anyone from a Joomla/Seblod content (and maybe others too) wishing to import content in bulk and being worried about the images, this is a lifesaver! 

    This morning I updated PW to 3.0.212 and  ImportExternalImages to 2.0.14. In the script to import the pictures after I imported the articles and all their fields I needed with ImportPagesCSV,  I used the script hereunder (subject to be improved - Noobs will love you for this 😉 Maybe with a (total) img import counter as well at the end of the ride??) to monitor the process: 

    <?
    $p = $pages->get(2356);
    $m = $modules->get('ImportExternalImages');
    try {
        foreach($p->children as $c) {
    	$c->of(false); 
    		echo "Saving child page: " . $c->title . "<br>";
    	$m->importImages($c);
    	$c->save();
            if($c->isChanged()) {
    	echo "Child page " . $c->title . " was saved.";}} // didn't get the echo's though
    } catch (Exception $e) {
        echo $e->getMessage();
    }
    ?>

    At one point during impot, in one of the articles, the img had a typo mistake of  width="25ù" instead of width="25%" (Azerty keyboard key) and the import halted. When correcting the typo error in the article of which the title was reported thanks to the script, by refreshing the 'import' page the script went happily on importing pictures. At one point there was a timeout, but who cares ... I just refreshed  page again and the module went on doing what it was supposed to do. 

    Upon inspection, I couldn't help to be astonished as even the alignment of the pictures as in the original articles was maintained. Really: Hats off! 😀

    Again, congratulations! Let this be a lifesaver to many people wishing to join the PW family!

    Kind regards,
    Bernard    

    (temp overview https://kusttram.com/1325pw/overzicht-heemkundige-teksten/Pagina134 of a site in development without layout and temp pages - I will install dynamic search from @kongondo and from there seblod might be in the rear view mirror for many coming from the Joomla/Seblod setup - Here is the joomla/seblod combi I'm going to migrate from: https://www.zwinstreek.eu/geschiedenis/heemkundige-kringen/zoeken-in-publicaties?search=pdf&task=search  )

     

     

     

    • Like 1
  4. @Macrura, Indeed it's not always obvious to be in pace when the elements around are changing. I'm glad to have run into a problem and that the cause has been found. If things go wrong at my next trial, don't worry as I already deleted the content twice an re-imported it with ImportPagesCSV. 

    So, what would you like me to try to import images in bulk? 

  5. @Macrura 
    Hi Marc,

    Did you have time to think about a solution to import the pictures in bulk? If you want to, I can always test new ideas you might have. I'm more than willing to change the script in your module to test if it would work. You know, I've got a gut feeling that it has got to do with the hook that your module is only supposed to kick in after  $c->save("textarea");

    Kind regards,
    Bernard

  6. @Macrura 

    Hi Marc,

    I tried a different script as hereunder.  I tried save "body" as well as "textarea" (the field where the links are) but to no avail. The output gives me 3420 lines in the style of:

    Saving child page: Akkerzieken in de Zwinstreek
    Saving child page: 't Heistenaartje - Ode aan de zeedijk
    Saving child page: 't Heistenaartje - Jacobus Landuyt
    Saving child page: 't Heistenaartje - Mijn eerste vaart
    etc etc

    The script is:

    $p = $pages->get(2356);
    try {
        foreach($p->children as $c) {
            echo "Saving child page: " . $c->title . "<br>";
            $c->of(false);
            $c->save("textarea");
            if($c->isChanged()) {
                echo "Child page " . $c->title . " was saved.";
            }
        }
        echo "Children saved successfully!";
    } catch (Exception $e) {
        echo $e->getMessage();
    }
     

    Kind regards,
    Bernard

     

  7. @Macrura 
    Hi,

    In a site under development, I imported 3420 articles with img links to a joomla/seblod website. Now as I did before I want to import those images into their respective pages in PW. 

    In 2020, I went to Batch Child editor where I 'Unpublished' the articles in bulk and published them again. In the process your module pulled in all the images. This time, I seemingly cannot do this anymore.
    So, amongst many other trials,  I created a template in admin and an empty page where I put the script as hereunder. The script runs but none of the images are pulled over. I see that your module uses a hook-after-save.  How can I make your module to work to convert those pages in bulk? 


    $p = $pages->get(2356);
    $p->children->find("limit=3420");
    try {
        foreach($p->children as $c) {
            $c->of(false);
            $c->save();
        }
        echo "Children saved successfully!";
    } catch (Exception $e) {
        echo $e->getMessage();
    }  

    Kind regards,
    Bernard 

  8. @Macrura - You really deserve a gold medal a) for the speed you responded and b) for how the module sailed through all the articles, pulling in all the images smoothly.

    On (3) however, I wasn't successful as somehow the script didn't work in Tracy Debugger's console but not to worry ... I went to Batch Child editor where I 'Unpublished' the articles in bulk and published them again. In the process your module pulled in all the images. ;) 

    Once again, Thank you very much! 

    • Like 2
  9. Hi,

    I'm importing a fairly large Joomla site that exist since 2009. The module is a lifesaver BUT I encounter 2 problems where nothing happens:

    • When the extension ends in .JPG (all caps) the image gets skipped
    • Even if one image width is expressed in e.g. 30%, the whole import process gets aborted

    I'd be VERY happy to find out where I can adjust the script so that the module would run flawlessly. 

    On a second breath, can someone point me to a script where all children of a parent get opened and saved one by one so that all the images get imported automatically with this module? 

    Thanks in advance! 

  10. Hi all,

    I have been searching a bit everywhere but except for UIkitty (for Drupal) I can find very little reference to CKeditor and UIkit combined.

    Unless anyone can convince me otherwise, I would love to have my CKeditor to run with UIkit classes. Is anyone doing it? 

    What files must I add, where do I find them  and what must I change where? Not only for me but for anyone wanting to use UIkit in the front- and backend, I think it would be wonderfull to be able do so ...  

    Many thanks in advance!

     

  11. On 11/5/2017 at 10:15 PM, loukote said:

    Hm, funny: the map appears when a user is logged in the back-end, does not appear otherwise.

    For me the problem with the map either or not appearing on the front-end lied with the " Front-End Page Editor " module. When uninstalling that module the problem dissapears as well.

  12. This morning I tried again and only found 1 error in JqueryCore.js:2:40351 ( /wire/modules/Jquery/JqueryCore):  Use of getPreventDefault() isn't supported anymore. Instead use: defaultPrevented.   ->  I did so and the error went away. 

    On the other hand, when I try and drop a CSV in the the ImportPagesCSV upload box, it doesn't accept it, so I have to press the upload button. For normal fields an even pictures the the ImportPagesCSV module  is working fine but not for the Leaflet submaps.  Same problem with BCE.  

    My version of PW is 3.0.61 - Leaflet V 1.03 - php 7.1  now

  13. Hello @Robin S,

    Thank you for your reply!

    Since yesterday I tried those combinations but to no avail. Just now I turned the php7 to 5.6 but there too it doesn't work for me.

    In one of the existing pages I had already saved an address but after uploading 2 records with an address (with $page->$name->address = $value;) , that one too disappeared. Could it be pw 3.0.61  which causes an issue?

    Tonight I tried with BCE too but there too  .. no success :(

  14. Hello,

    Now I have come to the stage whereby I want to import hundreds of pages via CSV with addresses. 

    I tried to find a solution in this forum via Google search and tried all the possibilities  that were suggested for Batch child editor  as well as in the code of the ImportPagesCSV module being used/suggested  for Ryans's MapMaker but both of them refuse to work and import the adresses, lat lng zoom in one way on another into the Leaflet mapfield.

    Now I have 2 questions:

    1. Is anyone succeeding at the moment to upload CSV's to the Leaflet Map addressfield?  How?   My version of PW is 3.0.61 - Leaflet V 1.03 - php 7.0. 

    2. If so, here's my second question (to @gebeer,  I think?):     Say, I only upload the address, will it geocode automatically? If not can it be done or will I be to geocode the addresses externally beforehand before I upload the CSV's?

    Kind regards,
    Bernard   

  15. Hi,

    I'm using PW 3.0.61  with PHP7 and yesterday I downloaded this module as I urgently need to import coordinates to link those pages to my map in the frontend.  As I'm using  Leaflet Map Marker in the admin, the subfields in the 'map' table in the database are:

    map.data map.lat map.lng map.zoom map.status
    e.g. Albatrosstraat, Knokke-Heist, BE 51.34085 3.242333 18

    -100

    As I have to import 1000's of pages, I have no option but to work by batch georefferring and csv imports.

    I tried everything to make the import of the subfields work but to no avail. Could it be that the module is not compatible with PW 3.0.61  or that Leaflet Map Marker has other settings, or am I missing something somewhere?

    I tried to pair CSV column number and Processwire field names as in:

    1:title
    2:
    map.data (tried map.address too)
    3:map.lat
    4.map:lng etc. 

     

     

  16. Hello,

    I managed to render a leaflet map with wms in a barebone template in processwire.

    Seen that it works, I added a new provider in leaflet-providers.js and I also updated providers.inc and providers.json files.

    In leaflet-providers.js  I added:

    		.......
    		}, <--- didnt forget the comma ;)
    		GRB: {
    			url: 'https://geoservices.informatievlaanderen.be/raadpleegdiensten/GRB/wms?',
    			options: {
    				layers: 'GRB_BSK',
    				format: 'image/png',
    				transparent: true,
    				attribution: 'Realized on Processwire'
    			}
    		}

    As a proof of concept first, in order to render the map I must replace the L.tileLayer by L.tileLayer.wms somewhere in the script so that I can obtain a:

    whatever = L.tileLayer.wms("https://geoservices.informatievlaanderen.be/raadpleegdiensten/GRB/wms?", {
                layers: 'GRB_BSK',
                format: 'image/png',
                transparent: true,
                attribution: "Realised on Processwire"
            }).addTo(map);

    After a hint from @gebeerI tried to do so  in MarkupLeafletMap.js line 47. but I don't think I'm doing it right.  

    Is there a particular syntax I should use?

  17. Hello everyone,
    Hello @gebeer

    After having tested lots of modal rendering scripts, for 3 solid days, I ended up with Featherlighta very lightweight jQuery lightbox plugin, which seems to harness many possibilities.

    1. From a 'Title' field in a Leaflet map popup, I can now render  child pages with a map in modal windows overlaying each other.  However now I need every map to get a different ID  instead of 'mleafletmap1' otherwise they won't render. I tried to put $page->name but as soon as there are hyphens, it doesn't work. Any idea of which dynamically generated variable I could use as an ID for the maps in the base-template?
    2. In the popover  the title has to be clicked twice to fire a modal page. How (where) can I change this behavior?
    3. Even though everything is working fine inside the map, at the bottom of the modal windows with a map I find this:
    $(function() { var percelen = new jsMarkupLeafletMap(); percelen.setOption('zoom', 14); percelen.setOption('scrollWheelZoom', 1); percelen.init('percelen', 51.341845581086325, 3.268561363220215, 'OpenStreetMap.Mapnik'); var default_marker_icon = L.AwesomeMarkers.icon({ icon: 'home', iconColor: 'white', prefix: 'fa', markerColor: 'green' }); });
    
    (in a map with markers this gets much longer)

    Is it an error that this appears under each modal map or is it something I will have to look into on the side of Featherlight?

    In any case, at least I'm moving on now and as soon as the problems above can be solved (especially the first 2), I will start playing around with basemaps  and wms and see what happens ... 

  18. @rick

    To call the map in the test page map I use:
     

    <?php $options = array('markerIcon' => 'flag', 'markerColour' => 'purple', 'markerTitleField' => 'title',); 
      echo $map->render($page, 'map'); ?>

    to zoom into my question in the options I find among many others::

    `markerLinkField` | Page field to use for the marker link, or blank to not link (type: string; default: url)
    `markerTitleField` | Page field to use for the marker title, or blank not to use a marker title (type: string; default: title)

    I'm missing something like markerTitleLinkField whereby I could call a dialog box, am I right? 

  19. Thank you for your quick reply, but in the ### Options of the leaflet-PW module, can I control the behavior of  the `markerTitleField` (or alternatively markerLinkField) which means that the dialog box  would be triggered to load the content of a page. What do I put in the the `markerTitleField` (or alternatively 'markerLinkField')  option to do so? Is it possible? Does the corresponding .js or other file in the module provide for it?

    19 minutes ago, rick said:

    A dialog box, whether sliding or animated fade, doesn't have anything to do with ProcessWire. You can use Uikit, Bootstrap, or any other css framework to present that information

     

  20. Hello @gebeer

    11 hours ago, gebeer said:

    @Pretobrazza It might be related to the jQuery version you are using. 1.11.0 is a bit outdated. You might want to try a newer one. My map is rendering fine on 2.2.4

    Unless I'm missing something important about the version of jquery on my testing page I was using //ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js in the template file. Now I changed it to  //ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js and everything is fine with the map. The testing page takes a few seconds to load as There are 600+ pw children streets which will eventually be shown in the end ;) (look at the source). 

    Next step for me to endeavor into :

    I saw in the options of the leaflet-PW module, that one can control the behavior of  the `markerTitleField` (or alternatively markerLinkField) which means that a sliding pane or modal window would be triggered to load the content of a page. What do I put in there? Is it possible?

    I'm looking around for a versatile Leaflet script (there are many it seems) to put content in a slider pane OR modal window, so that when someone clicks in the title link  in a popup or on a marker, instead of opening a new page, in the browser, a responsive page gets called up in a sliding pane or modal window inside the map with the possibility to have extra controls around them (eg. close, fullscreen, 'like', post a comment, mailto,  etc etc).  

    .... but first finding the versatile sliding window (and/or modal) script to load any type of content into is already a challenge for me as I want to stick to the latest version of PW as well as of leaflet (1.0.3)  ...  Does anyone a suggestion?

    Even though there is streetview in this example, I'm convinced that with the Leaflet Map module PW will render a page like this on it's socks, not so? 

    (The next step after this will be even more of a challenge.to broaden the scope of this module even further)

  21. @gebeer

    I replaced/added  the content of these files in /pw/site/modules/FieldtypeLeafletMapMarker/assets/leaflet-markercluster

    MarkerCluster.Default.css    add oldie styles     3 years ago
    MarkerCluster.css    Corrected spiderfy leg anim and leg opacity option     2 years ago
    leaflet.markercluster-src.js    Tag v1.0.4     29 days ago
    leaflet.markercluster.js    Tag v1.0.4     29 days ago

    EDIT: IT IS WORKING !! Thank you very much @gebeer

    setup: PW 3.0.58 © 2017  Leaflet 1.0.3 with modified files as above is FieldtypeLeafletMapMarker/assets/leaflet-markercluster

  22. @gebeer

    I tested it on the V3 version and changed the content of the files as suggested. The map in the screen stays blank and the consoles says:

    ==> jquery.min.js:2:31515
    jQuery.Deferred exception: t is undefined o.Util.trim@https://unpkg.com/leaflet@1.0.3/dist/leaflet.js:5:1149
    o.Util.splitWords@https://unpkg.com/leaflet@1.0.3/dist/leaflet.js:5:1230
    o.Evented<.on@https://unpkg.com/leaflet@1.0.3/dist/leaflet.js:5:3878
    L.MarkerClusterGroup<.initialize@http://durvenleven.be/pw/site/modules/FieldtypeLeafletMapMarker/assets/leaflet-markercluster/leaflet.markercluster.js:6:515
    o.Class.extend/e@https://unpkg.com/leaflet@1.0.3/dist/leaflet.js:5:2729
    jsMarkupLeafletMap@http://durvenleven.be/pw/site/modules/FieldtypeLeafletMapMarker/MarkupLeafletMap.js:54:19
    @http://durvenleven.be/pw/straatnamen/abraham-hansplein/:36:20
    g/</j@https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js:2:29946
    g/</k<@https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js:2:30262
     undefined
    
                                                                                    
    ==> TypeError: t is undefined[Meer info]  leaflet.js:5:1149
    	o.Util.trim https://unpkg.com/leaflet@1.0.3/dist/leaflet.js:5:1149
    	o.Util.splitWords https://unpkg.com/leaflet@1.0.3/dist/leaflet.js:5:1230
    	o.Evented<.on https://unpkg.com/leaflet@1.0.3/dist/leaflet.js:5:3878
    	L.MarkerClusterGroup<.initialize http://durvenleven.be/pw/site/modules/FieldtypeLeafletMapMarker/assets/leaflet-markercluster/leaflet.markercluster.js:6:515
    	o.Class.extend/e https://unpkg.com/leaflet@1.0.3/dist/leaflet.js:5:2729
    	jsMarkupLeafletMap http://durvenleven.be/pw/site/modules/FieldtypeLeafletMapMarker/MarkupLeafletMap.js:54:19
    	<anoniem> http://durvenleven.be/pw/straatnamen/abraham-hansplein/:36:20
    	g/</j https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js:2:29946
    	g/</k< https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js:2:30262

    In InputfieldLeafletMapMarker.module - Lines 61 and 64 I also bumbed the version to 1.0.3 for the admin side and there the 'map' is working fine. (rendering-georeferring, saving etc) 

  23. On 9/4/2017 at 2:20 PM, gebeer said:

    1. As stated in the MarkupLeaflet.module file, you are required to add the link to leaflet.js yourself. You can change the version to 1.0.3. Then you also have to change the link to the leaflet css in the same file line 106.
    If you decide to use the getLeafletMapHeaderLines method for injecting JS and CSS then you need to change lines  168 and 173.

    @gebeer

    Thank you for all the info! I already prepared long reply but I first want to sort out a little problem I'm having when going to v 1.0.3. The admin side works perfectly but on the front-end the map remains blank and an error is being thrown. In the console I read:

    Uncaught TypeError: L.MarkerClusterGroup is not a constructor at new jsMarkupLeafletMap (MarkupLeafletMap.js:54)  -->
    
    var markers = new L.MarkerClusterGroup({polygonOptions: {color: 'teal', weight: 1, opacity: .39, lineJoin: 'round'}});
        var marker = '';

    When I cancel out these 2 lines the map shows up but obviously without the markers.

    Did anyone encounter the same problem?

    ProcessWire 3.0.58  -

     

×
×
  • Create New...