Jump to content

Joe

Members
  • Posts

    143
  • Joined

  • Last visited

Posts posted by Joe

  1. Got ColorPicker installed. Works nicely. Thanks!

    Just found a small issue when validating the admin page: "No p element in scope but a p end tag seen." I fixed it by moving the <p> tag in InputfiedColorPicker.module from line 51 to line 56 like so:

    from:

    		$out  = "\n<p><div id='ColorPicker_$this->name' style='border:2px solid #444; display:block;";
    		$out .= "width:40px; height:40px; background-color:";
    		$out .= $this->value == "transp"
    				? $this->value . "; background-image:url({$this->config->urls->InputfieldColorPicker}transparent.gif);"
    				: "#" . $this->value . "; background-image:none";
    		$out .= "' data-color='" . $this->value . "'></div>";
    

    to:

    		$out  = "\n<div id='ColorPicker_$this->name' style='border:2px solid #444; display:block;";
    		$out .= "width:40px; height:40px; background-color:";
    		$out .= $this->value == "transp"
    				? $this->value . "; background-image:url({$this->config->urls->InputfieldColorPicker}transparent.gif);"
    				: "#" . $this->value . "; background-image:none";
    		$out .= "' data-color='" . $this->value . "'></div><p>";
    

    My admin theme is modified a little, but I think the error came from this. Anyway, very useful module!

  2. Hello pwired,

    Thank you for your handy little script! :) It worked and and shows my server accepts automatic unzipping.

    Not sure here but how do you expect the zipped images to be displayed in the select image dialog ?

    Some background service or property/config of your editor ?

    Well, in the image field Input field settings there is a checkbox "Decompress ZIP files?" The comment there says "If checked, ZIP archives will be decompressed and all valid files added as uploads (if supported by the hosting environment). Max files must be set to 0 (no max) in order for ZIP uploads to be functional."

    So my assumption was that the zip file would therefore be unzipped automatically upon uploading it with this field and the images would be available with the page, just as if they were uploaded individually. So am I misunderstanding something here?

  3. Hi,

    I have an image field, the "decompress zip files" box is checked and "Max files" is set to "0". I´ve set "zip" as an allowed file extension, since otherwise the upload field did not accept zips.

    So I can upload zip files now. But the contained images are not displayed in the "select image" dialog when trying to add them with the editor. I suppose they have not been unpacked. The page´s folder in /site/assets/files/ is still empty.

    When I upload zip files to my server using the cPanel file manager or ftp I can unpack them on the server. So I´m not sure, it may still be a server setting that prevents automatic unpacking. I guess I can ask my server support. But maybe someone here knows something?

    Thanks!

  4. I have installed Page Edit Soft Lock as well as the Email Obfuscator Module. I find both very useful. :)

    There is a small isssue though in using both of them:
     

    When I log in as another user (at the same time as joe), the javascript popup message sometimes says the page is being edited by

    "joe (<span style="unicode-bidi:bidi-override; direction: rtl;"class="email-obfuscator-unreverse">ten.lmtf@liameoj</span>)"


    I believe it didn´t happen all the time, currently it does, haven´t investigated further yet... It only happens when the user has an E-Mail address registered, well, that´s clear to see why... => But it does not happen all the time, now the e-mail address shows correctly again, but I have not changed anything. It might be hard to find, it certainly doesn´t appear to be a major thing.
     

    (I have posted this in the Page Edit Soft Lock forum as well.)

  5. I have installed Page Edit Soft Lock as well as the Email Obfuscator Module. I find both very useful. :)

    There is a small isssue though in using both of them:

    When I log in as another user (at the same time as joe), the javascript popup message sometimes says the page is being edited by

     "joe (<span style="unicode-bidi:bidi-override; direction: rtl;" class="email-obfuscator-unreverse">ten.lmtf@liameoj</span>)"

    I believe it didn´t happen all the time, currently it does, haven´t investigated further yet... It only happens when the user has an E-Mail address registered, well, that´s clear to see why... => But it does not happen all the time, now the e-mail address shows correctly again, but I have not changed anything. It might be hard to find, it certainly doesn´t appear to be a major thing.

    (I will post this in the Email Obfuscator Module forum as well.)

  6. Tested this one out, but seems like it might be very out of date? It apparently doesn't recognize HTML5, and is suggesting use of XHTML MP while quoting mobile compatibility from a year range of 1999-2007. There seemed to be a lot more false positive stuff, but I stopped looking after that. :) 2007 is pre-iPhone and Android and things have changed a lot. 

    Regarding http://ready.mobi/ :

    I followed up on this and got this reply from them:

    Thanks for getting in touch.

    We're actually planning an upgrade to this service at the moment. We

    haven't yet announced dates for the availability of this but we're

    committed to getting this done because we think testing tools like this

    are very important.

    While I agree that the tool is somewhat out of date right now, bear in

    mind that much of its advice is still relevant if you want to reach the

    widest audience possible (people with no access to 3G/4G and people

    without smartphones).

    So keep an eye on our sites at http://mobiforge.com and

    http://deviceatlas.com. We'll post updates there as soon as we make our

    plans.

    Regards,

    Ronan

    dotMobi

    • Like 1
  7. So here´s a way to make the admin lightbox disappear in IE only. (and leave /wire/modules/Inputfield/InputfieldImage/InputfieldImage.module untouched). In /site\templates-admin/default.php I inserted the following:

    // Hack to keep the lightbox link from appearing in IE
    // Detects which version of Internet Explorer browser the user is using.
    function iever($compare=false, $to=NULL){
    	if(!preg_match('/MSIE (.*?);/', $_SERVER['HTTP_USER_AGENT'], $m)
    	 || preg_match('#Opera#', $_SERVER['HTTP_USER_AGENT']))
    		return false === $compare ? false : NULL;
     
    	if(false !== $compare
    		&& in_array($compare, array('<', '>', '<=', '>=', '==', '!='))
    		&& in_array((int)$to, array(5,6,7,8,9,10))){
                    return $m[1].$compare.$to;          // removed the dangerous line with eval here !
    	}
    	else{
    		return (int)$m[1];
    	}
    }
    if(iever('>=', 1)){ $content = str_ireplace("<a class='InputfieldFileLink' target='_blank'", "<a target='_blank'", $content); }
    // end IE hack
    

    I would have preferred to have the link open in the same window, however that way when pushing the browser back button, the CKEditor field is blank and the page has to be reloaded. I thought about removing the image link completely, but I´m not so good with regex (for taking out the link including the "</a> - and a bit too lazy to try and use it for a trivial thing like this ;) ) and even though I guess it would not cause problems I didn´t give in to the temptation of replacing "<a" with "<bogus IE tag"

  8. Thank you teppo!

    I´m using Magnific Popup myself for the public-facing site and it works very well. So that´s good news I think.

    Well no, I don´t think anyone needs to go to great trouble fixing it for the current PW release. I´ve come up with a quick fix for mine:

    Changed line 80 of /wire/modules/Inputfield/InputfieldImage/InputfieldImage.module from:

    "\n\t\t\t<a class='InputfieldFileLink' target='_blank' href='{$pagefile->url}'><img src='{$thumb->url}' alt='{$pagefile->basename}' /></a>" .
    

    to:

    "\n\t\t\t<img src='{$thumb->url}' alt='{$pagefile->basename}' />" .
    

    to make the lightbox disappear in the admin. While for my scenario the admin lightbox is nice eye-candy, it is not really needed. Don´t know yet if I get around to finding a conditional fix for IE. The main thing for me here is that users won´t feel like something has crashed.

    Looking forward to PW 2.4 to make a good thing even better! :)

    • Like 1
  9. :) Hi all, I came across what I think is a bug, so I guess this is the best place to post this:

    When using Internet Explorer (Version 10.01.11 on Windows7) the image preview for image fields in the admin area causes the browser window to freeze up, sort of. The screen gets darker, as when the lightbox pic loads, but nothing happens, the image doesn´t load, it stays that way, clicking anywhere in the browser window doesn´t change this, but the browser back button works.

    I tested this on a virgin Processwire install. Calling the same page with Firefox everything works fine.

    I don´t want to give the impression that I´m an IE-type ;), it´s just that I do have users who have Windows with IE as the standard browser and it´s lucky if they even know what a browser is, let alone installing another one.... As I said, I don´t need help in getting this to run on my machine, but I guess it should either be fixed or else I suppose the best solution is to remove the admin lightbox conditionally for IE...

    Greetings

    • Like 1
  10. Thank you, teppo

    First of all, there's one issue page limit won't solve: you'd also have to limit page name (or whatever you're using in your top level navigation) to make this even remotely useful. Otherwise users could simply create pages with names long enough to break your navigation anyway :)

    Yes, I´ve already resolved this by limiting the number of characters that can be used in the new page names input field and by using a fixed width font for the menu.

    Template approach would be feasible only if you want to limit pages on your top navigation but not after that. Otherwise you'd run into huge problems, such as having to create new template for children of each top level page (and another for each of their children etc.) It would make more sense to enforce a child limit for each (direct) parent page.

    So I could enforce a child limit for the home page template of 10 in this case and for the rest of the templates set the child limit to 6. That would then take care of the limit of 10 for the top level and 6 for the rest of the pages as in the example above. I think the problems you mention will only arise on larger sites, not if I wanted to only have the limit as per above, with no further children allowed?

  11. :) Hi all!

    I´m wondering how I can limit the amount of pages that can be added to a site. For example, I might want to limit the number of pages on the top navigation level to 10 (to not allow the menu to become too wide) and the number of child pages that can be added to 6 for each top level page.

    Looking here in the forum I haven´t seen anything on this, might have missed it. I suppose the way to go about it is to only allow  a certain number of pages to be created per template. Do I have to write some php function that counts the pages and then limits what can be done in the admin default.php or am I missing something and there is a setting somewhere that will do this?

    Thank you!

  12. Install db session module and you'll have a setup page with users. (not installed in core)

     I couldn't find anything like db session module but I figured, that's SessionHandlerDB.

    HI! could someone please clarify: what module?

    (I would like to see a list of logged in users when logged in as superuser.)

    Thanks!

  13. @ teppo

    I like the straightforward design of that site! It must display well on mobile devices, also because it uses graphics very sparingly.

    Remains the question about testing. Obviously the best approach would be to use a large stack of all the latest smart phones and tablets of all varieties. Lacking those I guess some of the services mentioned here will be valuable (to evaluate the visual result, not the code as you are pointing out).

    I suppose the simplest thing is to just adjust your browser window to a very small size, it already shows a lot. But it won´t show you how your website reacts to touch commands for example.

    I just downloaded and installed http://www.opera.com...r/tools/mobile/ mentioned at the top of this thread. Seems good. But again it can´t emulate all the latest devices (Samsung Galaxy S4 not on the list). Obviously this is not really possible, as they keep cropping up so quickly.

    I´m really no mobile-expert and find this quite challenging. The best approach might be to find out as much as possible on standards for mobile devices and then check your code against those (with http://validator.w3.org/ maybe?) plus some testing? :mellow:

    • Like 1
  14. Tested this one out, but seems like it might be very out of date? It apparently doesn't recognize HTML5, and is suggesting use of XHTML MP while quoting mobile compatibility from a year range of 1999-2007. There seemed to be a lot more false positive stuff, but I stopped looking after that. :) 2007 is pre-iPhone and Android and things have changed a lot. 

    oopsembarrassed.gif , I hadn´t realized that... Thanks Ryan for pointing it out! A shame, because as far as the concept goes this would be great, I think! Maybe I will find something to replace it. (oh well, I guess the one remaining good thing about it is then that if something validates well there it will be usable on older mobile devices as well as new ones...)

  15. Hello mangopo,

    I looked at your site, looks good. I have seen a detail though that is not working on all browsers apparently: At the very top the text in the black bar gets cut off when looking at your site with Firefox (current, 24.0) under Windows7. I have not tested with anything else, just happened to see this and wanted to point it out to you. I´m attaching a screenshot (only the relevant part) so you see what I mean.

    Greetings

    Hmm I haven't seen that in any test setups so it's very difficult to find a solution.

    Hi mangopopo,

    Yes, I know how it is, sometimes very tricky. Sorry, hadn´t seen your answer here before so I only got back to it now.

    I made another two screenshots: screenshot1 is while the page is loading and screenshot2 is when it is fully loaded.

    Firefox 24.0,

    Windows 7

    Device Type: desktop

    JavaScript: Enabled

    Flash: Enabled

    Screen: 1680x1050

    Window: 1680x911

    (It seems to be this way independently of screen and window size)

    I hope this is of any help. You might try to use one of these online testing sites that automatically generate screenshots of your page on different plattforms/browsers. I have seen several free ones of those, but don´t have the links now.

    Greetings, Joe

    post-1762-0-48611400-1383387010_thumb.pn

    post-1762-0-20969800-1383387012_thumb.pn

  16. Hi all! A quick question, if it has been treated somewhere else I´m thankful for the link...

    Is it possible to permit users to edit certain pages but keep them from deleting them?

    I´ve looked at the "Page Edit Per User" module, but that doesn´t seem to make this possible.

    This should only apply to specific pages, not all of them.

    Thanks!

  17. Thank you guys! Well I´ve beefed up my memory_limit to 1024M in php.ini (was at 128M), now I can upload half a dozen of those at the same time...  ;)  ...just as a test. In reality it´s kind of dumb to upload giant images just for them to be re-sized, but I have users who have never used any image manipulation software and just plug in their digital camera...

    I wonder where the possible disadvantages might be of upping the memory limit like that, I guess I could set it even higher... (assuming my hosting environment doesn´t prohibit it;-)

    • Like 1
×
×
  • Create New...