-
Posts
50 -
Joined
-
Last visited
Posts posted by mike77
-
-
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.
-
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
-
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
-
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?
-
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.
-
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
- 1
-
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.
-
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.
-
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
-
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.
-
The icon does not show on ff, ie and chrome (latest versions). The theme version is the actual - 1.0.4.
-
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).
-
Thank you Ryan, all clear now.
In fact I need 24h system so I will leave "G" and erase "a".
-
The timezone works correctly now - my obvious mistake, thanks for pointing it.
I'm still not clear about where you are seeing this in ProcessWire
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>"; } ?>
- 1
-
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.
All date/time formats are configurable. Where are you seeing 13:30 pm? I can tell you where to change it.
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!
-
Regarding submission date, Soma is correct that it would be contained in $entry['created']; as a unix timestamp.
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
- 1
-
CSS way is great but still the code is ready to copy & paste if needed.
-
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']; } ?>
- 1
-
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?
-
It works now. Thanks for a tip Dave.
-
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?
-
Thanks. Acctually I had searched stackoverflow with no succes
-
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?
-
Sounds very useful.
- Add as many pages you like by clicking "+add Page".
Will the module allow to remove bunch of pages with one click after marking them (with checkboxes for example)?
- 1
Searching for shorter strings (PW search engine)
in General Support
Posted
Hi Fokke.
I missed that topic and didn't realize that the solution is also in API
Thank you very much.