-
Posts
147 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Webrocker
-
+1 - I just tested a site with webpagetest.org and had a bunch of jpgs, saved as "progressive" in Photoshop, but a bit too large in dimensions for the final display. As soon as image->width() or image->size() was used to scale these images, none of them were "progressive" anymore. maybe @horst has something up his sleeve?
-
Batch creation of pages through images field
Webrocker replied to Webrocker's topic in General Support
I have it working in the current 3.x version (3.0.30 devns), no problems or hick-ups so far. thanks for the module @adrian @mr-fan -
Batch creation of pages through images field
Webrocker replied to Webrocker's topic in General Support
The PW oekosystem never ceases to amaze me. Thx! -
One thing I notice -- you should reverse the order of your rules. You have the generic ones before the specific ones. so a request to /solutions/eventdirect/eventdirect-advisory-board/ will never be resolved, because the more generic condition /solutions/eventdirect/ will always be reached first, so "eventdirect-advisory-board" will not be reached at the new location. cheers, Tom
-
For me here your link works - no 404? I've had strange effects with .htaccess and local browser caching - make sure to flush all caches, or restart your browser and check again… cheers, Tom
-
Hi again. I think the problem is that you added the rules too late, somewhere down in the htaccess when PW is already involved. What you want is to catch the "wrong" requests as early as possible -- so add the rewrite rules for your old URL scheme at the beginning of the htaccess file: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^(.+).html$ /$1/ [L] </IfModule> ################################################################################################# # START PROCESSWIRE HTACCESS DIRECTIVES ... cheers, Tom
-
Hi, I'd like to use the images field for uploading of, surprise, images But, instead of having the images attached to the page with this image field, I'd rather have a new child-page for each image. So basically I'd use the images-field ease of use to upload a bunch of images, but have distinct "image"-pages for the storage of information for each image. my theoretical setup: - images-page (template with title and one images field) - image-page (template with title and one image field (max items:1), body field, additional fields....) I don't know where to look/hook - is it the "save" action of the "images-page"? Where would I put the logic/code needed -- is the ready.php the right place? I think the logic would be something like this: Foreach image in the "images" field, a new child-page of the "images-page" is created. The "image" field of that child-page gets the current image as a value, the image file's name is used as the title/name of that page. The "real" image-file needs to be moved from the "images-page"'s asset directory to the asset directory of that page. Save and repeat for the next image. Is this doable? cheers, Tom
-
Hi, a bit difficult to say without seeing the complete .htaccess, but I think you need to add a "L" to the first rule. RedirectMatch 301 (.*)\.html$ http://pw.bielenberg-soerup.de$1/ [L] so if this rule is matched, no other redirects will happen afterwards. If you have querystrings, add [L,QSA] ("query string append") so that the new destination will receive the query parameters. And make sure that this rule is before the index.php rule which acts like a catch all -- everything (that hasn't been caught by other rules before) will be redirected to the index.php and the querystring is appended. Basically what you are saying with that rule is: "everything that ends with ".html" will be taken to the new location and be appended there with a slash at the end. Depending on your site/url structure this may be enough, or you need to add a more precice rule what to redirect. cheers Tom
-
Hi, I think I have a first working version, I just tested it on my site. Here's the code/commit on github, all changes are in /wire/modules/Fieldtype/FieldtypeComments/CommentForm.php https://github.com/iamwebrocker/ProcessWire/commit/85638d14a1843cb6c14b48aad20e4679ac6cf2b6?diff=unified&w=1 not sure if this'll suffice to create a pull request, but for my installation, it works :-)) The "HoneyPot" Field is customizable (name and label) via the form options (similar to what is stated in the documentation for the "securityField"). $formOpts = array( 'headline'=>'', 'labels' => array( 'text' => 'Your Thoughts', 'submit' => 'Leave a reply', 'canttouchthis' => 'Leave this empty' ), 'requireHoneypotField' => 'canttouchthis' ); $page->comments->renderForm($formOpts) this results for example in <p class="CommentFormHoneypot CommentForm_honeypot"> <label><span>Leave this empty</span> <input name="canttouchthis" value="" size="3" type="text"> </label> </p> cheers, Tom
-
Thanks! I'll try to mod the module as you suggest.
-
Hi, I'd like to add an input field to the page comments that should act as a honey pot: if this field has a value, the comment will not be sent. From what I can tell from the documentation, currently the spam check is only possible with an external service or with JavaScript to apply a hidden input with a pre-defined name. To me relying on JS in order to enable a site's visitor to leave a comment seems wrong, so I'd like to go the other way: Hide the honeypot input visually so it won't get filled by (human) visitors. If a (dumb) bot fills in every input it finds with values, it'll tap also in the honey pot field -- and the spam comment will not be sent. Maybe this option could be added to the comment field's settings? Cheers, Tom
-
Module FrontendUser: login, logout and register users / members
Webrocker replied to pwFoo's topic in Modules/Plugins
Hi pwFoo, I think I have discovered a small part for improvement towards the user. Currently, when a user chooses a username containing umlauts and/or mixed case (like: MötörCode), the first email will display the username as given, since it was sanitized by "text" only. in the next step, the username in the session (which still has umlauts and mixed case chars) will be put inside the username field. If the user now chooses a password and submits, this name will be sanitized by "pageName" - which in the above example will result in "mtrcode". This username is correctly displayed in the second and final E-Mail. Since PW stores username as a page pagename is correct, but I think it should be displayed as such in the first email as well. And I would propose to use sanitizer "pageNameTranslate", since then the above would result in "moetoercode". Regarding the first email, I think FrontendUserRegisterEmailValidation.module line 90: wire('session')->set('registerUsername', $form->fhValue('username', 'text')); changed to wire('session')->set('registerUsername', $form->fhValue('username', 'pageNameTranslate')); would do. For the second part, I've hooked into before save, $fu->addHookBefore('save',function($event){ $event->object->userObj->name = $event->object->form->fhValue('username','pageNameTranslate'); }); but I'm not sure where this would be covered best in the module's process. Let me know what you think, unsure about the "username" part, since maybe it would be of greater flexibility to have a "nickname" field (which can keep up and lowercase and umlauts), independently from the "name" field - but even then "pageNameTranslate" would make for better page names in the backend for umlauterists. EDIT ah, I just re-read the documentation on bitbucket, and in the plugin section I see you have covered the nick name case. Nice! Cheers, Tom -
Update 2.6dev to 2.7.2 stable - Page tree menu gone
Webrocker replied to Webrocker's topic in General Support
Thanks for the info! (and the Reno Admin theme, btw) ) -
hi, I have a strange thing that I could reproduce in three different installs - after updating from a former version to 2.72 stable, the left menu (in reno admin theme) is missing the 'tree' menu item underneath 'pages'. the backend is fully functional, I can navigate to the tree view by clicking 'admin' in the breadcrumb at the top, so no sweat, I just want to see/here if others have had a similar effect? cheers tom
-
The newest Zurb Foundation seems to have learned quite a bit from other, more customizable, systems like Susy or Singularity and let you use their inner workings/mixins for your own css selectors, so no more row, col, hide, show classes littered through your markup.But I haven't looked much into that, since I use Susy2 for most stuff. It took a little while to get the concept of context (say you have an eight col grid, and inside an 4 of 8 spanning element you nest another element with span(2 of 8) - what width would you expect?) but once it clicks, working with Susy is really fun. but like processwire it leaves a lot of decisions to you as the developer, not offering pre-setup solutions, so compared with bootstrap or foundation it seems less comfortable at first glance. but if you really need to, you can easily integrate parts like the forms- or navigation patterns of foundation into Susy, and what I really like about Susy is, that I can keep my markup clean and can go from early prototypes to full production code with the same code basis, adding fidelity and complexity as the project progresses.
-
hi, seems like a problem with php strtotime() and 32bit systems http://www.php.net/manual/en/function.strtotime.php (see notes)
-
hi, outsourcing the usage-info into a queryable field like bitpoet describes seems a very good idea. I think you can limit your fields query like this $fields = $template->fieldgroup->find('name^=_meta'); and save the substr check later on, maybe this also improves performance a bit by reducing the loop iterations. not 100% sure about that, maybe it needs to be $metaFields = $fields->find('name^=_meta'); and the looping over $metaFields, not $fields edit: ah, scrap that, I just see that you're using inputField($p) <-- (where does $p come from?) nonetheless, if you only want the fields whose name starts with '_meta', the above could still work, and the make a check if the current field is not in ignoreFields and then use inputField($p)…? cheers, Tom
-
hi is this the thread you were looking for? https://processwire.com/talk/topic/11577-how-do-you-develop-on-a-live-site/?hl=%2Bdevelop+%2Blive+%2Bsite cheers, Tom
-
PageLister and PageFieldType is tedious on duplicate titles
Webrocker replied to mn-martin's topic in General Support
hi, can you add a second filter for the parent pages? Categories has ..... Categories.parent has .... this would reduce the confusion with the similar page titles cheers, Tom- 2 replies
-
- pagelister
- pagefieldtype
-
(and 4 more)
Tagged with:
-
Hi Soma, thanks, this indeed clearifies what going on , missed that entry (my user "webrocker" isn't allowed to view the pro support*, b/c we purchased the lister w/ another account, so I din't see Ryans answer while logged in as me // update: the changes suggest in that discussion didn't resolve the problem, though. even with the one template which is used by all items selected in the config, the unpublished items won't show. setting the "inlude=" to "published alone is not possible, it always resets itself to "hidden + unpublished", which then is rejected according to that error message ("only include=hidden allowed"). *) off topic but related: my user is set to view the purchases and support request of the "buying" user (and vice/versa), but I cannot view the support forum section. Creating a dedicated "agency" user for the purchases (and support) seems a bit against the personal/member idea of the forum, but only having one person/member getting support for a product that has an "agency" license and as such may be used by more than one dev at a time isn't very practical I'm afraid… ?
-
hi, I want a non-superadmin user to use the lister-pro listings for items of a certain template. all works fine, but items which are "unpublished" will not show in the lister, no matter what is set in the lister's config (i.e. "include=all"). Above the lister a "Nur 'include=hidden' ist erlaubt" (only 'include=hidden' is allowed) ist shown in red. the user's role has all page-related permissions, including hide/show and publish/unpublish pages. and of course the "page-lister" permission But something seems to prevent the listing of unpublished items… is there a special permission I'm missing? cheers Tom
-
PW 3.0.7: Expands Field Rendering, Page Path History and More
Webrocker replied to ryan's topic in News & Announcements
ha! well spotted! of course, since I only have the blank/bare install, my only page currently is the home page. stupid me ) thx! -
PW 3.0.7: Expands Field Rendering, Page Path History and More
Webrocker replied to ryan's topic in News & Announcements
hi, I just installed a clean 3.0.7devns with blank profile, added language support, enabled advanced mode and debug, to test and play with the fields rendering, because this will be of great use in a upcoming project… but somehow this (maybe too clean?) installation only renders the file found directly in /site/templates/fields/ my test setup: just a basic page with title field (changed the field type to: PageTitleLanguage, but changing it back to PageTitle doesn't change the behaviour). /site/templates/fields/title.php <--- prints out title in green /site/templates/fields/basic-page/title.php <--- prints out title in red the code in the title.php files is: <header> <h1 style="color: green;">(in /site/templates/fields/title.php) <?php echo $page->title; ?></h1> </header> <header> <h1 style="color: red;">(in /site/templates/fields/basic-page/title.php) <?php echo $page->title; ?></h1> </header> the code in the basic-page.php template is: <?php echo $page->render('title'); ?> in the frontend I only see the green title, from the blog post I would expect the red title to show. If I remove the title.php directly under /site/templates/fields/ the frontend rendering is unstyled. Am I missing something? cheers Tom -
Ok, I completly managed to miss ->getUnformatted m( thx Tom