Jump to content

mike77

Members
  • Posts

    50
  • Joined

  • Last visited

Everything posted by mike77

  1. Hi Fokke. I missed that topic and didn't realize that the solution is also in API Thank you very much.
  2. I'm not sure whether someone asked for it previously but I've noticed that default search script returns nothing when it searches for a string shorter then 4 characters. Where can I change that? I need to be able to search for names and words consisting of 3 letters. Thanks.
  3. Thanks for suggesting to push memory_limit higher. max_input_time is no matter in my case because Im working on localhost and the upload is quite fast. I must check it on live server though. Thanks again
  4. Hi Martijn, Well I altered php.ini like this: upload_max_filesize = 150M post_max_size = 150M memory_limit = 128M max_execution_time = 120 max_input_time = 120
  5. When I'm uploading a bigger file (90Mb for example) it stops on 99% or 100% and freezes. I have done all PHP configuration required. What could be the problem?
  6. I want to dynamically change page template when a certain condition is satisfied. For example: if ($page->numChildren == 0) { //change template } I tried to set new template when such situation occures but I'm getting errors.
  7. The simplest way to make the images added in textarea field show after migration is to preserve the same folder structure and folder names as it was on the previous machine. For example if your image was originally stored in let's say: localhost/project-name/site/assets/files/... don't change that to for example: localhost/changed-project-name/site/assets/files/... Just keep the original folder naming and structure and it should work. On live server you should use the same methodology as with localhosts. If you can't do it for some reasons maybe you should edit htaccess file and try to rewrite the old URL of the folder containing your images to the new, like: RewriteRule ^/olddirectory(.*) /new-directory$1 [R=permanent,L] I didn't check the second way so I'm not sure if it works. All this fuss with images not showing is because the URL of images added in textarea field are stored as they are and when you change the structure or names of the folders the URL is no more valid. The Firebug will show you error 500 (which is unfortunate) but when you change the DocumentRoot in Apache config to folder where you keep the website files the error will be 404 - which means that the image wasn't found due to wrong URL. I hope I made myself understandable
  8. Yes, something went wrong and I need to find out what it is as I installed the PW on my localhost which means I didn't upload anything. Thanks for assistance Soma.
  9. It seems when I added the missing files (icons too) - I wrote about it second ago here http://processwire.com/talk/topic/4431-tinymce-templates/#entry44432 - the icons in your theme showed up.
  10. Well, what can I say it doesn't work on my side (on 3 computers, 3 browsers). Considering that one of the jquery ui styles is refering to an image that doesn't load it would be strange if it worked. Nevermind, maybe someone else had some experience with it - and if not let's leave it there. The theme is still very nice and I willl use it
  11. I tested it in firebug and it seems the problem is somehow in jquery ui css file. There is a "ui-icon" class appended to the element where the clickable area is and and it uses a wrong sprite image which overrides the proper one. Once that background image is disabled the right one shows up and the bin is visible.
  12. The icon does not show on ff, ie and chrome (latest versions). The theme version is the actual - 1.0.4.
  13. Smashing theme. It's great! I found a little "bug", though. There is no trash bin icon (image deleting) on the blue bar when you use image field. The place where the icon should show is clickable and everything works, but lack of this tiny icon is a bit confusing for people not familiar with the original Ryan's interface (clients for example).
  14. Thank you Ryan, all clear now. In fact I need 24h system so I will leave "G" and erase "a".
  15. The timezone works correctly now - my obvious mistake, thanks for pointing it. It's like this: when someone sends data via the form (created in Form Builder) the data is then inserted into the DB. When I check time of the entry (lets skip the date to simplify things) in phpMyAdmin it shows me for example 13:30 - and everything is OK by now. But when I generate the data stored in DB as an output on the webpage the time of the entry is: 13:30 pm. To generate the date/time I use: $entry['created'] So my question was how can I make am/pm not to appear To get things more transparent here is the code for generating DB entries, plain and simple: <?php foreach($forms->get("wall-form")->entries->find() as $e) { echo "<div class='post'>"; echo "<h3>{$e['temat']}</h3>"; echo "<p><b>Dodane:</b> {$e['created']}</p>"; echo "<p><b>Autor:</b> {$e['autor']}</p>"; echo "<p><b>E-mail:</b> {$e['e_mail']}</p>"; echo "<p>{$e['wpis']}</p>"; echo "</div>"; } ?>
  16. Ryan thanks for your reply, two more things though: 1. After changing timezone in config file I'm still getting wrong timestamp of DB entrties through Form Builder - its 2 hours late. Perhapse I'm doing something wrong - I just changed original zimezone America/New_York to Poland/Warsaw. I also tried other cities in the same timezone like Germany/Berlin - no luck. 2. I see it in directly in phpmyadmin and as an output on the webpage, too. If you could also advise how to convert time format to 24h it would be great. Thank you!
  17. Is there a way in PW's Form Builder to convert hours from am/pm to proper 24h system? Now I get funny output, like this for example: 13:30 pm. BTW: while messing around with module I made a Form Builder themes preview (v. 0.2.2) to avoid switching and saving settings. Maybe someone who wants to use the preset form styles will find it usefull. Here is the link to screen shots: http://bit.ly/123dcpZ
  18. CSS way is great but still the code is ready to copy & paste if needed.
  19. Here is a simple script I wrote for my project and I thought maybe someone will find it useful just to avoid writing obvious things. If you use File type field in your template and want to display added files in nice graphic manner instead of ordinary file name this code may help. The script - when included to the template - recognizes extension of added file and displays apprioprate icon as an output on the page. In present form the script can deal with these file extensions: pdf doc docx xls xlsx xlsm mp3 txt ppt pptx wmv mp4 mpeg html The file extensions mentioned above must of course be added in "Details" section of File field in admin panel. <?php $fsize = 90; //icon px width in output $field = 'file'; //name of the field in ProcessWire panel $pdfImg = 'http://cdn1.iconfinder.com/data/icons/CrystalClear/128x128/mimetypes/pdf.png'; $docImg = 'http://cdn2.iconfinder.com/data/icons/sleekxp/Microsoft%20Office%202007%20Word.png'; $pptImg = 'http://cdn2.iconfinder.com/data/icons/sleekxp/Microsoft%20Office%202007%20PowerPoint.png'; $txtImg = 'http://cdn1.iconfinder.com/data/icons/CrystalClear/128x128/mimetypes/txt2.png'; $xlsImg = 'http://cdn2.iconfinder.com/data/icons/sleekxp/Microsoft%20Office%202007%20Excel.png'; $audioImg = 'http://cdn2.iconfinder.com/data/icons/oxygen/128x128/mimetypes/audio-x-pn-realaudio-plugin.png'; $videoImg = 'http://cdn4.iconfinder.com/data/icons/Pretty_office_icon_part_2/128/video-file.png'; $htmlImg = 'http://cdn1.iconfinder.com/data/icons/nuove/128x128/mimetypes/html.png'; $fileImg = 'http://cdn3.iconfinder.com/data/icons/musthave/128/New.png'; $files = $page->$field; foreach ($files as $f) { switch (get_file_extension($f)) { case 'pdf': $img = $pdfImg; break; case 'doc': $img = $docImg; break; case 'docx': $img = $docImg; break; case 'txt': $img = $txtImg; break; case 'xls': $img = $xlsImg; break; case 'xlsx': $img = $xlsImg; break; case 'xlsm': $img = $xlsImg; break; case 'ppt': $img = $pptImg; break; case 'pptx': $img = $pptImg; break; case 'mp3': $img = $audioImg; break; case 'wmv': $img = $videoImg; break; case 'mp4': $img = $videoImg; break; case 'mpeg': $img = $videoImg; break; case 'html': $img = $htmlImg; break; default: $img = $fileImg; break; } echo "<a href='{$f->url}' target='_blank'><img src='$img' title='$f' width='$fsize' /></a><p>{$f->description}</p>"; } function get_file_extension($f) { $ftype = pathinfo($f); return $extension = $ftype['extension']; } ?> show-filetype-icon.php
  20. Is it possible to search for a certain file (using name of that file) added through File field in admin panel? Simply adding a name of the Field in search.php as is written above generates an error of course. Can I perhaps retrive names of the files from the records stored in field_file table in DB put them into an array and then pass somehow into the $matches variable in search.php? Will it work with PW API?
  21. It seems I have a problem with repeater, too. I'm using PW version 2.3 and after adding a repeater field (containing two simple fields image and text) and saving, the page crashes and I get this feedback: Error: Maximum function nesting level of '100' reached, aborting! (line 170 of C:\xampp\htdocs\mickolsvn\home-dream\wire\core\Data.php) I cannot enter the site in admin panel again. When I upin the repeater filed everythings comes back to normal. Any ideas folks?
  22. Thanks. Acctually I had searched stackoverflow with no succes
  23. I just wanted to know if you know the solution to something I'm stuck with. I have a select in my form which I want to: 1. disable when someone chooses and clicks the option in it 2. activate it if someone clicks the button and set the first select option (empty option in my case). The code looks like this: var selectDisable = {}; selectDisable.select = function() { $('form.visit_form option').click(function() { $('form.visit_form select').attr('disabled', 'disabled'); }); $('input.cancelChoice').click(function() { $('form.visit_form select').removeAttr('disabled').val($('form.visit_form select option:first')); }) }; All seems OK however disabling select dosen't work in chrome and safari. I tried to change "attr" method to "prop" also change the second argument from "disable" to "true" but non of this works. Has anyone encountered this kind of issue?
  24. Sounds very useful. Will the module allow to remove bunch of pages with one click after marking them (with checkboxes for example)?
×
×
  • Create New...