Mike Rockett
Members-
Posts
1,455 -
Joined
-
Last visited
-
Days Won
9
Everything posted by Mike Rockett
-
All resolved -- using the PW3 branch now. Thanks for the help.
-
I'm beginning to think you're using a different release or something... This is my controller now: $leaflet = $modules->MarkupLeafletMap; $view->mapHead = $leaflet->getLeafletMapHeaderLines(false); $view->map = $leaflet->render($page, 'map', [ 'height' => '500px', 'scrollWheelZoom' => false, ]); And this is the output: $(function() { var mleafletmap1 = new jsMarkupLeafletMap(); mleafletmap1.setOption('zoom', 14); mleafletmap1.init('mleafletmap1', -26.172777, 28.085833, 'CartoDB.Positron'); var default_marker_icon = L.AwesomeMarkers.icon({ icon: 'home', iconColor: 'white', prefix: 'fa', markerColor: 'darkblue' }); mleafletmap1.addMarkerIcon(default_marker_icon, -26.172777, 28.085833, '/contact-us', 'Contact Us', ''); }); There's nothing in MarkupLeafletMap.module that indicates the options I provide should be added, unless I'm adding multiple markers, in which case it adds to relevant addMarkerIcon function-call to the script. I could well set the two options require in init, but that's not the correct solution.
-
That's exactly what I need it to do, but it doesn't add the relevant option to the JS code... Let me investigate.
-
@gmclelland it appears that scrollWheelZoom is no longer supported..? It's not doing anything on my side.
-
Ah, got it. $inlineScript is not being added to $out, but rather being assigned to $this->page->inlineScripts... As such, this is passed to the MarkupAddInlineScript, which I accidentally uninstalled when getting rid of the Google map module. Now,as I don't use <head> and <body> tags, the module can't insert the scripts automatically, and so passing $page->inlineScript to the emplate fixes the issue. Hoping this can be documented, I'm sure I'm not the only one skipping out on optional HTML tags...
-
Is there any reason as to why the script markup is not being generated? It can't be a PHP support issue as no errors/warnings are being thrown...
-
Okay, resolved Simple Contact Form issue and uninstalled that for now... Just for reference, I'm using Latte for the templates: contact-us.php $map = $modules->get('MarkupLeafletMap'); $view->map = $map->render($page, 'map'); $view->mapHead = $map->getLeafletMapHeaderLines(false); contact-us.latte {block headscripts}{include #parent} {$mapHead|noescape} {/block} .. {$map|noescape} For $map, only the container is rendered. The script is not appended to it.
-
No, unfortunately none of that is rendered... and now I'm having a PHP 7.1 issue with Simple Contact Form and my enviro doesn't have PHP 7.0... (What a day )
-
As a follow-up to this, where exacty is allFields first declared before init() is called? Not sure what's going on there, because that's supposed to be an array, but it looks like PHP is calling it a string...?
-
That appears to be set by the renderer? -- This is the generated markup: <script src="https://unpkg.com/jquery@3.2.1/dist/jquery.min.js"></script> <!-- Styles supporting the use of Leaflet.js --> <link rel="stylesheet" type="text/css" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" /> <link rel="stylesheet" type="text/css" href="/site/modules/FieldtypeLeafletMapMarker/assets/leaflet-markercluster/MarkerCluster.css" /> <link rel="stylesheet" type="text/css" href="/site/modules/FieldtypeLeafletMapMarker/assets/leaflet-markercluster/MarkerCluster.Default.css" /> <!-- Scripts supporting the use of Leaflet.js --> <script type="text/javascript" src="https://unpkg.com/leaflet@1.0.3/dist/leaflet.js"></script> <script type="text/javascript" src="/site/modules/FieldtypeLeafletMapMarker/assets/leaflet-markercluster/leaflet.markercluster.js"></script> <script type="text/javascript" src="/site/modules/FieldtypeLeafletMapMarker/assets/leaflet-providers/leaflet-providers.js"></script> <script type="text/javascript" src="/site/modules/FieldtypeLeafletMapMarker/MarkupLeafletMap.js"></script> <!-- Extend Leaflet with Awesome.Markers --> <link rel="stylesheet" type="text/css" href="/site/modules/FieldtypeLeafletMapMarker/assets/leaflet-awesome-markers/leaflet.awesome-markers.css" /> <script type="text/javascript" src="/site/modules/FieldtypeLeafletMapMarker/assets/leaflet-awesome-markers/leaflet.awesome-markers.min.js"></script> <div id='mleafletmap1' class='MarkupLeafletMap' style='width: 100%; height: 500px;'></div>
-
Having troubles with this... On the front-end, I'm getting a blank area. Scripts are loading fine, and no errors in the console. Something I'm missing maybe?
-
Hi kongondo, I've bumped into this issue again, and still cannot see how to resolve it without rendering the menu through custom code. I need to have parents displayed (simple nav menu) without their children, but need to assign current_class to the parent when one of its children is currently open. This is for the newsroom part of the site I'm working with. I'm on the dev branch of MB. Is there no way to include an option like check_current_children on a local/global level so that it applies the current class even if the children are not listed? Or is there another really simple way of doing it? Thanks a ton!
-
You're probably going to need to do it manually. As Jumplinks 1 is not multi-lang-aware, there's no way for the destination field to know which language you need, unless you declare it manually, or by means of a mapping collection, one for each language. Destination selectors won't help as they are also not aware of languages. So your collection could be called "italian", and would contain this: 100=/it/uri/to/page 101=/it/uri/to/other/page 102=/it/uri/to/product And then define the language jumplink: Source: it/{all}/{id} Destination {id|italian} This assumes that your ids are all different between content types (like product, etc.). You would also need to build your collections via a script, and that would require each destination page having a field with the old ID.
-
Hi Peter, From the top of my head, you could potentially use mapping collections to make it language aware; however, that means importing the entire dataset and using multiple languages - one collection for each language. How are your other URIs being handled?
-
Thanks for letting me know. This date story has me in a tizz because I'm not seeing the correct way to use [auto-updating] timestamps and still support all MySQL enviros... Unless I'm missing something here. Had the same issue with Laravel, and they had to introduce nullableTimestamps() into the schema system. I'm actually using Illuminate for Jumplinks 2, but not sure if it'll work in every environment...
-
Hi @melody - thanks for the post. This has popped up before, and still not sure as to why. When it happened, I asked Zeka to delete the last_hit column and refresh the modules. It turns out that he had to delete the process_jumplinks_nf table as well, and it started to work properly. Why that is the case, I still do not know... You can follow the brief thread from here to see what happened: Let me know if those steps work for you. You might land up having to add the nf table manually and increasing the schema version in the module's configuration via phpMyAdmin or whatever tool you use to manually edit DBs.
-
SmartyPants Typographer incorrect curly quote
Mike Rockett replied to alexcapes's topic in General Support
If you battle to get this fixed, there also an alternative: http://modules.processwire.com/modules/textformatter-typographer/- 4 replies
-
- 1
-
-
- smartypants
- module
-
(and 1 more)
Tagged with:
-
Glad PW worked well for you And thanks for the Jumplinks recommendation. Did you make good use of wildcards? v2 is, sadly, being pushed and pushed as I just have too much on the plate these days... Edit: I see you're using ID-based jumplinks. I assume you used mapping collections / destination selectors?
-
I had a thing with signatures as well. Outlook is really picky though, and so everything would need to be formatted properly. Image DPIs also need to be considered, as, in Outlook, 72ppi and 96ppi are two vastly different things. Outlook prefers 96ppi, otherwise the image is enlarged for some reason. I once wrote an app for this, where a template was created using Outlook, and signatures were created based on the template. The app then compiled the signature in HTML, RTF, and plain text (using a different template created in, well, plain text). The signature was then installed automatically, and the user simply had to select the signature for the account in Mail Options -- done! The app has since been destroyed, though, as it didn't work on around half of the enviros it needed to, and it was no longer a viable option. The generating signatures part was good though.
-
Hi Peter Can any of these resources/uris be combined into a pattern? If there are 500 resources, I'm sure the tree can be simplified somewhat, albeit aside technicalities such as the difference in how the two platforms create URIs (or if they've been manually set in modx). If you do a sitemap, how will you generate new uris to map to PW Pages? At the end of the day, as long as things match up, I don't see any further issues. Not sure on how Modx works (I tried it once, didn't like it), but keep an eye out for trailing slashes as well. In your specific instance, the 404 monitor is limited to 100 - you'd need to change the code to get it to show more, and that might be client-resource-intensive. JL2 will handle this better.
-
Hi there - you will need to upgrade your version of MySQL. Version 5.5 is no longer supported, since end-2015. I recommend you use MySQL 5.7, or switch to MariaDB.
-
how to redirect old website url to new page?
Mike Rockett replied to adrianmak's topic in General Support
You'd be better off using Jumplinks as it is, as @eelkenet says, less problematic. However, if you really want to use mod_rewrite: # Place under RewriteEngine On RewriteRule ^oldpage.html$ /new-location/? [R=302,L] To make permanent, switch out 302 for 301. -
You'll also want to clear the cache for the site. Redirects are stored there too.
-
Yeah, Mix is great - though I had teething problems on Windows when it first came out. I'm sure they've been fixed since, but haven't needed to use it (yet).
-
Side notes: If you're on PHP 5.5, you should be using square array notation. So instead of array(...), use [...]. I also recommend that you upgrade to a newer version of PHP. The oldest version with any kind of support at all is 5.6, and so check if you can upgrade to that or 7.0 or 7.1. For local development, might be better to use EasyPHP as you can switch between versions easily.
- 12 replies
-
- 1
-
-
- comment email
- comment array
-
(and 2 more)
Tagged with: