modularization – What design pattern we call for a kind of general purpose template based editor supporting many development framework

I am halfway through developing a general purpose editing tools which once finished can be used to develop any application project as well as making a simple document file. I call it a general purpose rapid templating and editing system. As for now it is a cloud service. Have no yet any plan to convert it into a native application.

How does it works?

There is a middleware system where middle user may use to build a template that specifically supports a type of project or a document format. For example, they can build a template represent an application development project, a design project, a website framework, a content management system, or even a document format like HTML, PDF, office document, and etc. I’m also provide support for a programming language of my own to be included for more complex functionalities. A template can also be built derived and extended from a base template.

On the other end, end user who actually need the system may use it to create whatever kind of stuff they want as long as required template is there, already developed by middle user. For example let say they need to create an e-book in EPUB file format, the system will serve as an alternative EPUB editor specifically for files structuring or editing. They only need to choose a template, following the rules set for the template, provide all required details into a form, attach chapters HTMLs and image files, and put them all together into a project directory before submit it. System will compile it and generate an EPUB file. The same process goes to other projects or files.

It’s like modularizing a project development into two parts, templating and creating a project, allowing users to not doing much repeating programming task or no programming at all, as well as avoiding users from complex files structuring and installation. If you’ve learned about a Turing complete notation technique called Backus-Naur form which is used to build any programming language, yes I’ve made it capable of doing that too.

It is quite a useful tool at least for me. That makes me wonder. I was looking everywhere for something similar to what I am building in hope it was already exists so no need for me to reinvent it. But so far I’ve found nothing similar perhaps because I don’t know what terms to use to search for it. So actually I just want to know whether I’m building something new, or something already exists and wasting time reinvent it. What terms we use to search for it? What’s it called?. Any examples?. If no one ever built it before, then why is that?

Wildcard subdomain for WordPress – WordPress Development Stack Exchange

I would like to add a cool little function for my website. In nutshell there is https://domain.com and I want everyone could access from any subdomain. So like https://yourname.domain.com basically any random text and numbers they could figure out, without registration. And if you access the site from there I could grab that name with PHP and write a custom message. I don’t have registration on my site and I don’t want that at all, but it would be fun if they could change that string in the text.

I have read many posts here, and the official WordPress documentation, and based on that we set up the hosting side for https://*.domain.com so that must work, but after I tried https://randomname.domain.com on my site I got an error like:
DNS_PROBE_FINISHED_NXDOMAIN

It not seems Worpress related at all. But on my localhost I’ve played last night and there from yourname.localhost always redirected to simpla localhost so I can’t get the string from url, so I had to force it to make statis so I could develop the feature. If I removed the index.php and just used a custom one then this redirection not happened. So I think WordPress have much role of rooting these things. And offcourse SSL not gonna help in this case also I guess.

As I told I’ve read a lot but every different user want to solve different problem, some want to redirect for their webshop, some want registered users to apper there, so I’m confused what is the ideal solution for me. Do I need multisite enabled also? But I don’t want multiste I just want people can access my site with https://yournam.domain.com/ and if they give the direct link to other menu then https://yourname.domain.com/menu and I really need thats to remain in the adress bar so I can gather the info for my script.

Anyone did something similar? Anyone can suggest how could I solve this?

plugin development – I would like to show the short month instead of full month in wordpress?

I would like to show short name of month instead of full month. March>Mar Like this.

is there any way to do in WordPress? I am using Yoast plugin and Genesis Framework as theme.

Already changed the default format to custom “j M. Y” in WordPress setting>general.

PS: I am using Yoast premium version and support didn’t helped me in this.

TuchaKube container infrastructure service is available for the construction of high-load IT systems and development management | Proxies123.com

TuchaKube container infrastructure service is available for the construction of high-load IT systems and development management

From now, all users can use the service of launch applications in the container cloud from Tucha is available. This feature is implemented by the TuchaKube platform, which is based on Kubernetes clusters. The service helps you automate some of the work related to CI/CD processes.

For high-load IT systems, TuchaKube service provides:

– fault tolerance and easy scaling;

– maximum performance of the disk storage;

– efficient traffic distribution.

This is achieved by simultaneously running multiple identical replicas on different nodes, distributed storage systems, and dedicated load balancers.

TuchaKube for development management is:

– quick creation of test environments;

– standardization of development in distributed teams;

– automatization of CI/CD processes with the help of Tucha DevOps engineers.

All microservices required to run an application are packaged as stand-alone images that can be run multiple times in a cluster. A geo-distributed cluster provides a high level of system fault tolerance, horizontal scalability, and maximum efficiency. In more detail about TuchaKube for us on a web-site

 

web development – Please help!- file permissions, how do I keep my site invisible to the public until I am ready to publish it?

I’m relatively new to website design and need help.

I am creating a website and it is very important that the page does not become available to the public until it is fully created, something that will definitely take time. These are the steps I have taken and what is not working.

I created a test subdirectory.

I password protected it with “Directory Privacy” and created a user and password.

I uploaded a theme.

Got a message that I needed to overwrite the .htaccess file to upload the theme.

Finding no way around it, I did.

Found I had to reset the password protection via “Directory Privacy”.

Was able to log into sitepad and edit site with password I had just set.

Site was visible at domain name when I logged out, even after I cleared my cookies-exactly what I did NOT want.

Logged in, followed my hosting site’s directions and set “permissions” to 700, instead of 750.

Was unable to log in to edit the site.

Site no longer accessible to the world, but also inaccessible to me for creation purposes.

What am I doing wrong? What is the way around this?
Thank you so much for you time and help!

modularization – A conceptual universal general purpose editor supporting many development platforms

I am halfway through developing a general purpose editing tools which once finished can be used to develop any application project as well as making a simple document file. I call it a universal rapid templating and editing system. As for now it is a cloud service. Have no yet any plan to convert it into a native application.

How does it works?

There is a middleware system where middle user can use to build a template that specifically supporting a type of project or a document format. For example, one can build a template for a specific application development project, a design project, a website framework, a content management system, or even a document format like HTML, PDF, office document, and etc. I’m also provide support for a programming language of my own to be included for more complex cases. And a derived template can also be inherit and extended from a base template.

On the other end, end user can use the system to create whatever kind of stuff they want as long as required template is there. For example let say they need to create an e-book in EPUB file format. They can use system as an alternative EPUB editor especially for files structuring or WYSIWYG editor. Only by choosing a template, provide all required details in a form, attach chapters HTMLs and image files, and put them all into a project directory following the rules set by template before submit it. System will compile it all and generate an EPUB file. The same process goes to other projects or files.

It’s like modularizing a project development into two parts, allowing user to not doing much repeating programming task or no programming at all. If you’ve learned about a Turing complete notation technique called Backus-Naur form which is used to build any programming language, it is capable of doing that. It’s quite a useful tool at least for me so makes me wonder. I was looking everywhere for something similar to what I am building in hope it was already exists so no need for me to reinvent it. But so far I’ve found nothing similar perhaps because I don’t know what terms to use to search for it.

So basically I need to know whether I’m building something new, or something already exists and wasting time reinvent it. If it’s nothing new, what terms to use to search for existing system as such?. Any examples?. But if not which I still doubt that, why no one built it?

bitcoincore development – Two threats to Bitcoin: Quantum Computing and Mining farm seizures – what new BIPs are needed before it is too late?

  1. How resistant is bitcoin blockchain against physical attacks? Contrary to other consensus mechanisms, Bitcoin’s PoW model is dependent on massive Mining Farms with tons of ASIIC hardware. These farms are known to everyone, especially the government of respective country.

Every mining farm in every country, could be sized as one example of a possible future.

What does the bitcoin blockchain do to mitigate such attack of government seizure of all mining farms in one country?

  1. The bitcoin network is not using signatures or encryption methods that are especially suited against quantum computer attacks. Especially Bitcoin’s ECDSA and the PoW mining process would become easily vulnerable with quantum computers.

Many bitcoin developers here have the opinion that there is still many years time, let us wait and see what methods the NIST will be selecting.

But this is very naive thinking. Even when nobody knows it for sure, History has always proven to be like this: Very major technology breakthroughs were known way in advance before they hit the public.

When you stick to waiting philosophy, it will be too late to act when NIST picks a cipher. Something should be done before that, adding a new signature type to Bitcoin can be done with a soft fork easily for example.

What is the status of Core Developers regarding this topic?

web development – Can a CMS export html files?

Based on response to my comment on the question, first you’d have to install the CMS on your laptop somehow. I don’t know what OS you run, but you can look at MAMP for OSX or Wampserver for Windows.

At that point, you can use MODx to build out your site, etc. and when done there’s a feature to dump it out as static HTML. (I think those instructions are for Evo; it’s been a while. But I’d imagine the feature is still around in Revo; the demo I’m trying to access is borked at the moment.) You should then be able to upload those files to the server.

But this is a rather less than ideal process and I’d suggest resolving whatever it is that prevents you from installing software on the server itself instead, if possible.

theme development – Google not locating user location when clicked on Button

Hey I have this Ghar ka khana website which uses this custom map code to locate user. When user clicks on button it’s stuck on white layer. The button class is “geo-location” which has these code attached to locate user.

    var $ = jQuery.noConflict();
var mapStyles = (
    { featureType: "water", elementType: "all", stylers: ({ hue: "#d7ebef" }, { saturation: -5 }, { lightness: 54 }, { visibility: "on" }) },
    { featureType: "landscape", elementType: "all", stylers: ({ hue: "#eceae6" }, { saturation: -49 }, { lightness: 22 }, { visibility: "on" }) },
    { featureType: "poi.park", elementType: "all", stylers: ({ hue: "#dddbd7" }, { saturation: -81 }, { lightness: 34 }, { visibility: "on" }) },
    { featureType: "poi.medical", elementType: "all", stylers: ({ hue: "#dddbd7" }, { saturation: -80 }, { lightness: -2 }, { visibility: "on" }) },
    { featureType: "poi.school", elementType: "all", stylers: ({ hue: "#c8c6c3" }, { saturation: -91 }, { lightness: -7 }, { visibility: "on" }) },
    { featureType: "landscape.natural", elementType: "all", stylers: ({ hue: "#c8c6c3" }, { saturation: -71 }, { lightness: -18 }, { visibility: "on" }) },
    { featureType: "road.highway", elementType: "all", stylers: ({ hue: "#dddbd7" }, { saturation: -92 }, { lightness: 60 }, { visibility: "on" }) },
    { featureType: "poi", elementType: "all", stylers: ({ hue: "#dddbd7" }, { saturation: -81 }, { lightness: 34 }, { visibility: "on" }) },
    { featureType: "road.arterial", elementType: "all", stylers: ({ hue: "#dddbd7" }, { saturation: -92 }, { lightness: 37 }, { visibility: "on" }) },
    { featureType: "transit", elementType: "geometry", stylers: ({ hue: "#c8c6c3" }, { saturation: 4 }, { lightness: 10 }, { visibility: "on" }) },
);
function createHomepageGoogleMap(_latitude, _longitude, _locations, source_path) {
    setMapHeight();
    var ggMapsTypes = google.maps.MapTypeId.ROADMAP;
    if (map_type == 0) {
        ggMapsTypes = google.maps.MapTypeId.ROADMAP;
    } else if (map_type == 1) {
        ggMapsTypes = google.maps.MapTypeId.ROADMAP;
        mapStyles = "";
    } else if (map_type == 2) {
        ggMapsTypes = google.maps.MapTypeId.SATELLITE;
        mapStyles = "";
    } else if (map_type == 3) {
        ggMapsTypes = google.maps.MapTypeId.HYBRID;
        mapStyles = "";
    } else if (map_type == 4) {
        ggMapsTypes = google.maps.MapTypeId.TERRAIN;
        mapStyles = "";
    }
    if (document.getElementById("map") != null) {
        if (_locations.length > 0) {
            if (typeof _locations == "string") var data = jQuery.parseJSON(_locations);
            else var data = _locations;
            var centerPos = new google.maps.LatLng(_latitude, _longitude);
            var map = new google.maps.Map(document.getElementById("map"), {
                zoom: maps_zoom,
                scrollwheel: false,
                center: centerPos,
                mapTypeId: ggMapsTypes,
                styles: mapStyles,
                zoomControlOptions: { position: google.maps.ControlPosition.RIGHT_CENTER },
                streetViewControlOptions: { position: google.maps.ControlPosition.RIGHT_CENTER },
                disableDefaultUI: is_mobile == 1,
                zoomControl: true,
                gestureHandling: "cooperative",
            });
            var i;
            var newMarkers = ();
            var iconMarker = source_path + "/img/marker.png";
            if (icon_marker) {
                iconMarker = icon_marker;
            }
            for (i = 0; i < data.length; i++) {
                var pictureLabel = document.createElement("img");
                pictureLabel.src = data(i)("type");
                pictureLabel.width = "26";
                pictureLabel.height = "26";
                var boxText = document.createElement("div");
                infoboxOptions = {
                    content: boxText,
                    disableAutoPan: false,
                    pixelOffset: new google.maps.Size(-100, 0),
                    zIndex: null,
                    alignBottom: true,
                    boxClass: "infobox-wrapper",
                    enableEventPropagation: true,
                    closeBoxMargin: "0px 0px -8px 0px",
                    closeBoxURL: source_path + "/img/close-btn.png",
                    infoBoxClearance: new google.maps.Size(1, 1),
                };
                var marker = new MarkerWithLabel({
                    position: new google.maps.LatLng(data(i)("lat"), data(i)("lng")),
                    map: map,
                    icon: iconMarker,
                    labelContent: pictureLabel,
                    labelAnchor: new google.maps.Point(50, 0),
                    labelClass: "marker-style",
                });
                newMarkers.push(marker);
                var htmlWindow = "",
                    is_bookmarked = data(i)("is_bookmarked") ? " bookmark-added" : "",
                    is_compare = data(i)("is_compare") ? " compare-added" : "";
                htmlWindow += '<div class="infobox-inner">';
                htmlWindow += '<div class="infobox-image" style="position: relative">';
                htmlWindow += '<a href="' + data(i)("link") + '" style="display:block">';
                if (data(i)("featured-image") != "") {
                    htmlWindow += '<img src="' + data(i)("featured-image") + '">';
                } else {
                    htmlWindow += '<img data-src="' + data(i)("holder-image") + '">';
                }
                htmlWindow += "</a>";
                htmlWindow += '<div><span class="infobox-price">' + data(i)("price") + "</span></div>";
                htmlWindow +=
                    '<div class="actions">' +
                    '<a href="#" class="bookmark' +
                    is_bookmarked +
                    '" data-propertyid="' +
                    data(i)("post_id") +
                    '"></a>' +
                    '<a href="#" class="compare' +
                    is_compare +
                    '" data-propertyid="' +
                    data(i)("post_id") +
                    '"></a>' +
                    "</div>";
                htmlWindow += "</div>";
                htmlWindow += '<div class="infobox-description">';
                htmlWindow += '<div class="infobox-title"><a href="' + data(i)("link") + '">' + data(i)("title") + "</a></div>";
                htmlWindow += '<div class="infobox-location">' + data(i)("address") + "</div>";
                htmlWindow += "</div>";
                htmlWindow += "</div>";
                boxText.innerHTML = htmlWindow;
                newMarkers(i).infobox = new InfoBox(infoboxOptions);
                google.maps.event.addListener(
                    marker,
                    "click",
                    (function (marker, i) {
                        return function () {
                            for (h = 0; h < newMarkers.length; h++) {
                                newMarkers(h).infobox.close();
                            }
                            newMarkers(i).infobox.open(map, this);
                            setTimeout(function () {
                                Holder.run();
                            }, 1);
                        };
                    })(marker, i)
                );
            }
            var clusterStyles = ({ url: source_path + "/img/cluster.png", height: 37, width: 37 });
            var markerCluster = new MarkerClusterer(map, newMarkers, { styles: clusterStyles });
            google.maps.event.addListener(markerCluster, "click", function (cluster) {
                if (cluster.getSize() < 2) {
                    return;
                }
                var m = cluster.getMarkers();
                for (var i = 0; i < m.length; i++) {
                    if (i > 0 && (m(i).getPosition().lat() !== m(i - 1).getPosition().lat() || m(i).getPosition().lng() !== m(i - 1).getPosition().lng())) {
                        return;
                    }
                }
                var sameLatitude = m(0).getPosition().lat();
                var sameLongitude = m(0).getPosition().lng();
                multiChoice(sameLatitude, sameLongitude);
            });
            $("body").addClass("loaded");
            setTimeout(function () {
                $("body").removeClass("has-fullscreen-map");
            }, 1e3);
            $("#map").removeClass("fade-map");
        }
        $(".geo-location").on("click", function () {
            if (navigator.geolocation) {
                $("#map").addClass("fade-map");
                navigator.geolocation.getCurrentPosition(showPosition, error);
            } else {
                error("Geo Location is not supported");
            }
        });
        function showPosition(position) {
            var myLatLng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
            var userMarker = new google.maps.Marker({
            position: myLatLng
        });
 }
    }
}

function success(position) {
    createHomepageGoogleMap(position.coords.latitude, position.coords.longitude, ZonerGlobal.locations, ZonerGlobal.source_path);
}
function error(err) {
    $("#map").removeClass("fade-map");
}
function initMap(lat, lng, pictureLabelSrc, icon_url) {
    if (ZonerGlobal.gm_or_osm == 0) {
        var subtractPosition = 0;
        var mapWrapper = $("#property-detail-map.float");
        if (document.documentElement.clientWidth > 1200) {
            subtractPosition = 0.013;
        }
        if (document.documentElement.clientWidth < 1199) {
            subtractPosition = 0.006;
        }
        if (document.documentElement.clientWidth < 979) {
            subtractPosition = 0.001;
        }
        if (document.documentElement.clientWidth < 767) {
            subtractPosition = 0;
        }
        var mapCenter = new google.maps.LatLng(lat, lng);
        if ($("#property-detail-map").hasClass("float")) {
            mapCenter = new google.maps.LatLng(lat, lng - subtractPosition);
            mapWrapper.css("width", mapWrapper.width() + mapWrapper.offset().left);
        }
        var ggMapsTypes = google.maps.MapTypeId.ROADMAP;
        if (map_type == 0) {
            ggMapsTypes = google.maps.MapTypeId.ROADMAP;
        } else if (map_type == 1) {
            ggMapsTypes = google.maps.MapTypeId.ROADMAP;
            mapStyles = "";
        } else if (map_type == 2) {
            ggMapsTypes = google.maps.MapTypeId.SATELLITE;
            mapStyles = "";
        } else if (map_type == 3) {
            ggMapsTypes = google.maps.MapTypeId.HYBRID;
            mapStyles = "";
        } else if (map_type == 4) {
            ggMapsTypes = google.maps.MapTypeId.TERRAIN;
            mapStyles = "";
        }
        var mapOptions = { zoom: 15, center: mapCenter, disableDefaultUI: false, scrollwheel: false, mapTypeId: ggMapsTypes, styles: mapStyles, gestureHandling: "cooperative" };
        var mapElement = document.getElementById("property-detail-map");
        var map = new google.maps.Map(mapElement, mapOptions);
        var pictureLabel = document.createElement("img");
        pictureLabel.src = pictureLabelSrc;
        pictureLabel.width = "26";
        pictureLabel.heigth = "26";
        var markerPosition = new google.maps.LatLng(lat, lng);
        var marker = new MarkerWithLabel({ position: markerPosition, map: map, icon: icon_url, labelContent: pictureLabel, labelAnchor: new google.maps.Point(50, 0), labelClass: "marker-style" });
    } else {
        setMapHeight();
        var mbUrl = "https://tile.thunderforest.com/" + ZonerGlobal.open_street_map_type + "/{z}/{x}/{y}.png?apikey=" + ZonerGlobal.open_street_map_key;
        var mbAttr = '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors';
        var grayscale = L.tileLayer(mbUrl, { id: "mapbox.light", minZoom: 0, maxZoom: 20, attribution: mbAttr }),
            streets = L.tileLayer(mbUrl, { id: "mapbox.streets", minZoom: 0, maxZoom: 20, attribution: mbAttr });
        var map = L.map("property-detail-map", { center: (lat, lng), zoom: maps_zoom, scrollWheelZoom: false, closeOnClick: true, layers: (grayscale) });
        var markers = L.markerClusterGroup({ showCoverageOnHover: false });
        var _icon = L.divIcon({ html: '<img width="26" height="26" src="' + pictureLabelSrc + '">', iconSize: (40, 48), iconAnchor: (20, 48), popupAnchor: (0, -48) });
        var marker = L.marker(new L.LatLng(lat, lng), { title: "title", icon: _icon });
        markers.addLayer(marker);
        map.addLayer(markers);
    }
}
function contactUsMap() {
    var mapCenter = new google.maps.LatLng(_latitude, _longitude);
    if (map_type == 0) {
        ggMapsTypes = google.maps.MapTypeId.ROADMAP;
    } else if (map_type == 1) {
        ggMapsTypes = google.maps.MapTypeId.ROADMAP;
        mapStyles = "";
    } else if (map_type == 2) {
        ggMapsTypes = google.maps.MapTypeId.SATELLITE;
        mapStyles = "";
    } else if (map_type == 3) {
        ggMapsTypes = google.maps.MapTypeId.HYBRID;
        mapStyles = "";
    } else if (map_type == 4) {
        ggMapsTypes = google.maps.MapTypeId.TERRAIN;
        mapStyles = "";
    }
    var mapOptions = { zoom: 15, center: mapCenter, disableDefaultUI: false, scrollwheel: false, mapTypeId: ggMapsTypes, styles: mapStyles, gestureHandling: "cooperative" };
    var mapElement = document.getElementById("contact-map");
    var map = new google.maps.Map(mapElement, mapOptions);
    var iconMarker = source_path + "/img/marker.png";
    if (icon_marker) {
        iconMarker = icon_marker;
    }
    var marker = new MarkerWithLabel({ position: mapCenter, map: map, icon: iconMarker, labelAnchor: new google.maps.Point(50, 0), labelClass: "marker-style" });
}
function createHomepageOSM(_latitude, _longitude, _locations, source_path) {
    setMapHeight();
    if (document.getElementById("map") != null) {
        if (_locations.length > 0) {
            var data = jQuery.parseJSON(_locations);
            var mbUrl = "https://tile.thunderforest.com/" + ZonerGlobal.open_street_map_type + "/{z}/{x}/{y}.png?apikey=" + ZonerGlobal.open_street_map_key;
            var mbAttr = '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors';
            var grayscale = L.tileLayer(mbUrl, { id: "mapbox.light", minZoom: 0, maxZoom: 20, attribution: mbAttr }),
                streets = L.tileLayer(mbUrl, { id: "mapbox.streets", minZoom: 0, maxZoom: 20, attribution: mbAttr });
            var map = L.map("map", { center: (_latitude, _longitude), zoom: maps_zoom, zoomControl: false, scrollWheelZoom: false, closeOnClick: true, layers: (grayscale), tap: false });
            if (is_mobile == 1) map.dragging.disable();
            map.on("popupopen", function (e) {
                Holder.run({ domain: "galleryFrontEnd.holder", use_canvas: true });
            });
            var markers = L.markerClusterGroup({ showCoverageOnHover: false });
            function locateUser() {
                $("#map").addClass("fade-map");
                map.locate({ setView: true });
            }
            function onLocationFound() {
                $("#map").removeClass("fade-map");
            }
            new L.Control.Zoom({ position: "bottomleft" }).addTo(map);
            for (var i = 0; i < data.length; i++) {
                var _icon = L.divIcon({ html: '<img width="26" height="26" src="' + data(i)("type") + '">', iconSize: (40, 48), iconAnchor: (20, 48), popupAnchor: (0, -48) });
                var title = data(i)("title");
                var marker = L.marker(new L.LatLng(data(i)("lat"), data(i)("lng")), { title: title, icon: _icon });
                var fimg = '<img width="100%" data-src="galleryFrontEnd.holder/555x445?text=' + pl_text_property + '" alt="" />';
                if (data(i)("featured-image") != "") {
                    fimg = '<img width="100%" src="' + data(i)("featured-image") + '">';
                }
                var htmlWindow = "",
                    is_bookmarked = data(i)("is_bookmarked") ? " bookmark-added" : "",
                    is_compare = data(i)("is_compare") ? " compare-added" : "";
                htmlWindow += '<div class="infobox-inner">';
                htmlWindow += '<div class="infobox-image" style="position: relative">';
                htmlWindow += '<a href="' + data(i)("link") + '" style="display:block">';
                if (data(i)("featured-image") != "") {
                    htmlWindow += '<img src="' + data(i)("featured-image") + '">';
                } else {
                    htmlWindow += '<img data-src="galleryFrontEnd.holder/555x445?auto=yes&text=Property">';
                }
                htmlWindow += "</a>";
                htmlWindow += '<div><span class="infobox-price">' + data(i)("price") + "</span></div>";
                htmlWindow +=
                    '<div class="actions">' +
                    '<a href="#" class="bookmark' +
                    is_bookmarked +
                    '" data-propertyid="' +
                    data(i)("post_id") +
                    '"></a>' +
                    '<a href="#" class="compare' +
                    is_compare +
                    '" data-propertyid="' +
                    data(i)("post_id") +
                    '"></a>' +
                    "</div>";
                htmlWindow += "</div>";
                htmlWindow += '<div class="infobox-description">';
                htmlWindow += '<div class="infobox-title"><a href="' + data(i)("link") + '">' + data(i)("title") + "</a></div>";
                htmlWindow += '<div class="infobox-location">' + data(i)("address") + "</div>";
                htmlWindow += "</div>";
                htmlWindow += "</div>";
                marker.bindPopup(htmlWindow);
                markers.addLayer(marker);
            }
            map.addLayer(markers);
            map.on("locationfound", onLocationFound);
            $(".geo-location").on("click", function () {
                locateUser();
            });
            $("body").addClass("loaded");
            setTimeout(function () {
                $("body").removeClass("has-fullscreen-map");
            }, 1e3);
            $("#map").removeClass("fade-map");
        }
    }
}
function multiChoice(sameLatitude, sameLongitude) {
    var isAgencyPage = is_agency_page;
    var isAgentPage = is_agent_page;
    $.ajax({
        url: ajaxurl,
        data: { action: "zoner_get_multiitems", sameLatitude: sameLatitude, sameLongitude: sameLongitude, isAgentAgencyPage: isAgencyPage == "1" || isAgentPage == "1" },
        success: function (html) {
            console.log("custom-map.js::multiChoice", html);
            if (isAgencyPage == "1" || isAgentPage == "1") {
                $("#map.agency-map").append('<div class="modal-window multichoice fade_in"></div>');
            } else {
                $("body").append('<div class="modal-window multichoice fade_in"></div>');
            }
            $(".modal-window").html(html);
        },
    });
    $(".modal-window .modal-background, .modal-close").live("click", function (e) {
        $(".modal-window").addClass("fade_out");
        setTimeout(function () {
            $(".modal-window").remove();
        }, 300);
    });
}