Jump to content

gebeer

Members
  • Content Count

    1,007
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by gebeer

  1. @adrian thanks for the suggestion. My string is coming from a TinyMCE textarea field, so it already has the required <br> and <p> tags. And I don't need to preserve the line breaks in my source code.
  2. Hello all, The map display used to work on my site, but now it is broken. You can see it here. In Firebug I get: SyntaxError: unterminated string literal. In my template I'm calling the map like this: $map = $modules->get('MarkupGoogleMap'); echo $map->render($page, 'map', array('markerTitleField' => 'fulltext', 'height' => '400px', 'useHoverBox' => false, 'useMarkerSettings' => true, 'markerLinkField' => '')); Looks like the string that comes from fulltext field causes the problem. This is a TinyMCE textarea field. The rendered code looks like this: <script type='text/javascript' src='/site/modules/FieldtypeMapMarker/MarkupGoogleMap.js'></script><div id='mgmap1' class='MarkupGoogleMap' style='width: 100%; height: 400px;'></div><script type='text/javascript'>if(typeof google === 'undefined' || typeof google.maps === 'undefined') { alert('MarkupGoogleMap Error: Please add the maps.googleapis.com script in your document head.'); } else { var mgmap1 = new MarkupGoogleMap(); mgmap1.setOption('zoom', 12); mgmap1.setOption('mapTypeId', google.maps.MapTypeId.ROADMAP); mgmap1.init('mgmap1', 49.926418, 10.875330); mgmap1.addMarker(49.926418, 10.875330, '', '<p><strong>Zahnarztpraxis</strong><br /> <strong>Dr. med. Gabriele Wunschik</strong></p> <p>Bamberger Straße 33<br /> 96103 Hallstadt</p> <p>T: 0951/71 797<br /> F: 0951/97 10 438</p> <p><a href="GOSPAM:ed.kihcsnuw-sixarptzranhaz@ofni"><span style="unicode-bidi:bidi-override; direction: rtl;" class="email-obfuscator-unreverse">ed.kihcsnuw-sixarptzranhaz@ofni</span></a></p>', ''); }</script> The line breaks in the string seem to cause the problem. Javascript strings can't break across newlines without an escape (\)? I have added this code to MarkupGoogleMap.js so I can display an Info Bubble: var infoBubbleContent = '<div class="infoBubble">' + title + '<br><a href="https://maps.google.com/maps?hq=dr.+gabriele+wunschik+zahnarzt+hallstadt&daddr=Bamberger+Stra%C3%9Fe+33,+96103+Hallstadt,+Germany&panel=1&f=d&fb=1&geocode=0,49.926427,10.875077&cid=17504796733665686542" target="_blank">Routenplaner<\/a>' + '</div>'; var infoBubble = new InfoBubble({ minWidth: 250, minHeight: 250, map: this.map, content: infoBubbleContent, position: latLng, shadowStyle: 1, padding: 10, backgroundColor: 'rgb(255,255,255)', borderRadius: 4, arrowSize: 50, borderWidth: 1, borderColor: '#cccccc', disableAutoPan: true, hideCloseButton: false, arrowPosition: 30, backgroundClassName: 'phoney', arrowStyle: 2 }); infoBubble.open(this.map, marker); google.maps.event.addListener(marker, 'click', function(e) { infoBubble.open(this.map, marker); }); How can I add the escape character to or remove the line breaks from the string in "title" variable in MarkupGoogleMap.js? Any help would be much appreciated. Gerhard EDIT: OK, got it. I first tried this in MarkupGoogleMap.js: var infoBubbleContent = '<div class="infoBubble">' + title.replace(/\r?\n|\r/g,"") +...' + '</div>'; Wouldn't work. Then I changed original line 204 in MarkupGoogleMap.module from $title = $options['markerTitleField'] ? $page->get($options['markerTitleField']) : ''; to $title = $options['markerTitleField'] ? preg_replace( "/\r|\n/", "", $page->get($options['markerTitleField']) ) : ''; This did it. Is there any PW API method that I could use instead, like wire('sanitizer')?
  3. Thank you Ryan, for the explanation. My multilingual project is running smoothly. I made the default language German because this is the main language of the site. So no need to change the guest user language. For me this seems the most logical way to setup multiple languages.
  4. @SiNNuT thank you for the links. With my limited knowledge of the subject I wasn't aware of the facts mentioned there. Very interesting, indeed and good points for discussion with my clients.
  5. @Ryan most of my clients require to have sites W3C validated and it is considered good practice anyways. Thus it is essential to have the title attribute in <a> tags. Would you perhaps consider to make this standard for PW's link dialogue with TinyMCE (and CKEditor)? I couldn't find instances of "pwlink" in the TinyMCE settings on both, 2.3 and 2.4 installs. When I switch to CKEditor, there are references "PWLink" in CKEditor Toolbar settings and "pwlink" in Extra Plugins. When I change PWLink to "Link" and remove the extra plugin pwlink, I get the standard CKEditor Link dialogue where I can enter a title attribute in the Advanced tab. Cheers Gerhard
  6. Hi everyone, I'm currently setting up my first multilingual project on a brand new 2.4 install. One of the things I tried to find out is how to change the default language. Fortunately I'm not the first one and I found good solutions. While reading through a lot of stuff I stumbled upon the suggestion to change the language of the guest user here and here. So I tried that and always get the error: "The guest role is required". Despite the error the language change gets saved. Two other users also reported this here and here. Like Relmos reports, after switching the guest user language, my site also displays in the default language. I checked with <?php echo $user->language->name; ?> in Chrome Incognito mode. This raises 2 questions: 1. Is setting the guest user language really affecting the language displayed on the home page or is it only determined by what language I set the default language to (like explained here)? 2. Can anybody reproduce the error message when switching language of guest user and what does it mean? The guest role is still there after switching. So I don't quite understand the meaning of that error message. Patiently awaiting partial enlightenment through this great community gerhard
  7. Hi Joss, I wish I could do that also. There's plenty of space in my garden but unfortunately the clients are not willing to pay for transition to PW :-(
  8. I spent the last 10 days or so fiddling around with some Joomla/Seblod installs that I have to maintain and totally missed out on the PW2.4 release. Now I quickly updated the config.php of my pwfoundation5 template on github to reflect all the changes.
  9. @Sérgio, thanks a lot for your help! I was not aware of the update issue with Foundation and will add the link to the readme. For production sites, I guess most people are still using PW2.3. But for those who want to use 2.4 I would like to add an alternative config.php to my repo. Could you please open an issue on github and paste your complete working config.php for PW2.4 there? I will then include it as an alternative in the repo. That would be great. Cheers gerhard EDIT: config.php is updated to 2.4 version
  10. @nfil, if Ryan's Foundation 4 profile is working for a multisite setup, mine should be, too. Because it is based on Ryan's. Only changes I made is adding Foundation 5 scss files and change the structure so that only a single css file is output.
  11. I just added this to the valid attributes on a 2.3 stable install and it is saving the title attribute just fine + it is showing up in the source.
  12. Thank you, Sinmok, for this module. I'm playing with it in my new Foundation 5 Profile and it seems to work nicely with text. Haven't tried with images yet. I might be using this on a live site for a client. Haven't looked at the module code yet. Does it check whether page is editable before loading required code/assets? I am not sure, so I prepended the code in my template with "if($page->editable())", so it looks like if($page->editable()) $inline = $modules->get("InlineEditor"); if($page->editable()) echo $inline->setupField("headline|title"); if($page->editable()) echo $inline->scripts(); Is this necessary at all? Thanks gerhard
  13. This looks great, Joss. Thanks for sharing. Nice implementation of the clearing lightbox. I also like the images. Why are those sheep annoying? And what a great name for the repo
  14. Thanks for clarifying this, kogondo. I went to https://github.com/r...ProcessWire.git, chose the dev branch and copied the clone URL. Ending up cloning the stable version. You can see, I'm not that familiar with git yet. I just read up on how to checkout a branch and now can see font-awesome stuff in my local branch.
  15. @kogondo Thanks, I didn't know that. I cloned from https://github.com/ryancramerdesign/ProcessWire.git dev branch and there's no font-awesome in there. So this must be 2.4 then?
  16. I also released my Foundation 5 SCSS template today. You can check it out at Joss's Foundation 5 template thread. Have a great day!
  17. @Joss now I had the time checking out your template. Nice work! Always good to see how other people approach things. I see you are using font-awesome. Thats a good inspiration. Wanted to check it out for some time and haven't done it yet. As far as I can see, there is no central scss file that handles all the @imports. So you are using the foundation scss stuff to compile foundation.css. And for the site.css there's no corresponding scss. If you take a look at my template, I combined everything, so that there is only one resulting style.css that includes everything, foundation and site specific styles. This way you can define your own scss modules and add more logic to the scss structure. Cheers gerhard
  18. Hi all, today I finally managed to get everything working together properly. Now here is my Foundation 5 dropin template: https://github.com/gebeer/pwfoundation5. It uses Foundation 5 SCSS files. There's a quite extensive readme file with instructions. The template is based on Ryans FoundationSiteProfile. My approach takes advantage of the SASS/SCSS/Compass technology. So the output of the final CSS is highly customizable and only one file (style.css) is put out. You have full control over which modules of the Foundation framework you want to include in your project. This results in smaller CSS files that can be minified upon compilation with Compass. You can use the template as is. But if you want to modify the CSS, you need to have additional software (Ruby/Compass/Zurb Foundation gem) installed on your machine. In the template's Readme.md you will find instructions on how to do this (for Mac and Linux machines - Windows: sorry I don't know). If you are familiar working with SASS/Compass you will find your ways around easily. I have setup a structure that allows for updating the Foundation framework independently and that separates the project specific css from the Foundation css. This is a work in progress and I'm planning on using it for the relaunch of my own website. If you find any bugs, please let me know here or on the github bug tracker. I will try to fix them. Everyone is welcome to contribute or ask questions. Cheers gerhard
  19. just a little followup: I'm still working on my template. Having trouble with correct configuration of compass / foundation scss to output the desired file in the desired location. Should be straight forward, I thought. But foundation documentation is a bit scarce on that topic. So I'm going through lots of trial and error with no satisfactory result so far. So it will take me take some more time until I can release something. Also hanging in for Joss's template, sounds great
  20. Just to be on the safe side I would need to know whether AJAX page load can lead to problems with multilingual sites and a language switcher. Haven't done a lot of AJAX so far and just wanted to clarify if this is possible on a multilingual setup without too much of a hassle. Thank you gerhard
  21. @Craig thank you, I will take a look and see how I can utilize this for my project. Cheers gerhard
  22. Hi all, great to see that so many of you are interested in an update to Foundation 5. So am I. I'm currently working on a Foundation 5 profile based on Ryans great work. I use the scss version of foundation as to have more control over the compiled css (compiling with compass). Also I'm including scss replacements for the main.css that get compiled together with the foundation stuff. So at the end I will have only one css file, minified. Not sure yet how to handle the foundation JS. At the moment I'm using the minified version with all modules included. But it would be nicer to generate my own js file that includes only the project-relevant modules. As there is no JS minifier included in Foundation framework, I'm looking for other ways to achieve this. If anybody has got an idea, please post here. Will take me a few more days until I release my work because tomorrow I'm off to the beach for a couple of days with no www access. But plenty of sun and Sangsom
  23. @Soma I had already checked for the right Apache/PHP user and it was the owner of the cache file. So something else must have gone wrong.
  24. gebeer

    Robots.txt

    @teppo thanks a ton. Strange is that I tried the root for favicon and it wouldn't get picked up by neither FF nor Chrome. I had purged my cache to ensure that it wasn't a cache issue. Not sure, maybe I should've closed and reopened the browser,too. I will give it another try. There's an interesting read "rel="shortcut icon" considered harmful" about link rel="shortcut icon" vs. rel="icon". It discusses html5 validation and browser compatibility issues. That is why I would like to go without the link tag in the head. Cheers gerhard
×
×
  • Create New...