-
Posts
1,489 -
Joined
-
Last visited
-
Days Won
43
Everything posted by gebeer
-
If your images have meaningful names, you could also substitute the image file name for the description if the description is empty. Something like this $img = $page->my_image_field $imgDesc = ($img->description == "") ? $img->name : $img->description; //echo out your img tag This way you wouldn't need custom module or hooks into InputPageName or custom form validation in backend. It would be a nice feature though, if we could set the description to required in the image field settings.
-
The quickest way to see the name (or URL) is to click on a page and then hover over the "view" button. Then you see the URL in the bottom left corner of your browser. When I quickly need to find the id of a page, I just hover over the edit button.
-
Thank you for clarifying. So I guess your module is restoring the session then. Or do I have to pick up and process the cookie data in my custom login logic? Cheers
-
Thank you for this module! I'm trying to implement it on a 2.5.2 install and have some issues/questions. I installed, activated and configured the module to be automatic without fingerprint and only assigned to 1 specific role. These might me dumb questions, but I'm still asking 1) is this module intended for backend or frontend usage or both? 2) how do I go about testing? I logged in to the backend on a live server in Chrome with a user that has the specified role. After login I can see that a persist cookie has been created. Then I opened a Chrome incognito window and went to the backend login address. But I'm still presented with the login form. I want to use it on the frontend. So I switched off automatic mode and added this to my login logic: //login user $u = $session->login($username, $pass); if($u) { // make login persistent if user checked Remember me if ($u->login_persist && $u->login_persist == "1") { $persist = wire('modules')->get('LoginPersist'); $persist->persist(); } } When I now login to the frontend, I can also see that a persist cookie is created. I tried testing it the same way as above with the backend login. No success. When I log out of the frontend session, the cookie is gone. 4) Will the login still persist, even if the user logged out of there previous session? I guess not.
-
I'm not a PW guru at all, but the first thing that comes to my mind is the Hanna Code module. Marcrura beat me on this one
-
I can confirm same behaviour for CKEditor 4.4.3 I also tried it with the native CKEditor link plugin. But I couldn't get it to work, either, other than switching off HTMLPurifier :-(
-
I think it is better to handle incorrect data inputs with proper form validation. To me your plugin is very confusing, too. Maybe you can have a placeholder text instead that shows the expected input format.
-
This is a nice looking, clear design. I don't miss borders around the form fields or focus styles at all. But this depends on personal preference, I guess. The light grey type renders clean on Linux Chrome and FF But to me it could need a little more contrast. Personally, I hate long forms like this. Maybe you want to split it up and make it a multi page form. Your idea of breaking the form into a wizard would help in keeping it shorter. From my own experience it is easier to obtain the info that you want to collect through your form in a personal chat with the client. A long form like yours would drive me away. So you might want to consider asking less questions and trying to put the focus more on convincing the clients to give you their contact details. Then you can call them and talk about all that other stuff.
-
Hello bowenac and welcome to the forum! The standard editor is CKEditor which is widely used on the net and has many configuration options. There is an extesive thread about it: https://processwire.com/talk/topic/3023-module-ckeditor/ If you don't like it, you can also go and install TinyMCE or the very lightweight Trumbowyg. When I did my first site with PW, it was quite challenging. But it was well worth to spend the time learning it. I wouldn't want to miss it and develop all new sites with PW now. You find tons of help and info in this board, in the docs section and the API Cheat Sheet can be particularly helpful. It is also useful to take a look at the different site profiles that come with PW 2.5. You can learn a lot about how things are working. Have fun with PW!
-
Name format for children based on any field (not just title)
gebeer replied to Lars282's topic in General Support
For the concatenating part you can have a look at module FieldtypeConcatenate. -
Integrating a member / visitor login form
gebeer replied to thetuningspoon's topic in General Support
I'm in Thailand where it was 9 in the morning when 3 in the morning in Berlin. At 3am I was sound asleep -
Integrating a member / visitor login form
gebeer replied to thetuningspoon's topic in General Support
When you create a user through the admin or through the API, it always gets assigned the guest role along with the custom roles that you assign. So if you assign a custom role "user", your user will have 2 roles: guest and user. Now you can check if a user has the role "user" and a total of 2 roles assigned. In PHP: if (count($user->roles) == 2 && $user->hasRole("user")) { //do stuff here } -
My profile is based on Ryan's Foundation 4 profile. So I already did all the hard work of updating classes etc. to fit Foundation 5. If you are going to use my profile, please be aware that it uses SASS/SCSS. If you are not familiar with that it might take a little more effort to understand how things are working in the beginning.
-
Notice: Undefined index: searchFields after update to 2.5 dev
gebeer replied to gebeer's topic in General Support
My post about that might be a little confusing. I do not get any error messages when I set debug to false. I was referring to the system messages from my screenshot in post #3 that are persistent. Sorry if this has caused you additional work.- 12 replies
-
- Undefined index
- searchFields
-
(and 2 more)
Tagged with:
-
Notice: Undefined index: searchFields after update to 2.5 dev
gebeer replied to gebeer's topic in General Support
So this is overwriting the php.ini settings then, I guess. Good to know I don't have to fiddle with php.ini settings- 12 replies
-
- Undefined index
- searchFields
-
(and 2 more)
Tagged with:
-
Notice: Undefined index: searchFields after update to 2.5 dev
gebeer replied to gebeer's topic in General Support
OK, I see. But what worries me more is the system messages (screenshot in post #3) that are persistent no matter whether I set debug to true or false.- 12 replies
-
- Undefined index
- searchFields
-
(and 2 more)
Tagged with:
-
Notice: Undefined index: searchFields after update to 2.5 dev
gebeer replied to gebeer's topic in General Support
Thank you Raymond. Will update soon to the latest dev branch and try again. About those SysUp messages, they are even there when I switch $config->debug to false.- 12 replies
-
- Undefined index
- searchFields
-
(and 2 more)
Tagged with:
-
If I understand you right, you are looking for a field type that can store values in multiple rows. Have a look at the Inputfieldtype Events. This stores multiple values as rows in it's own DB table which makes searching really fast. I'm using an altered version to store thousands of timestamps with a page and searching them is really performant.
-
Notice: Undefined index: searchFields after update to 2.5 dev
gebeer replied to gebeer's topic in General Support
Thank you. This helped partially. But it is only a temporary fix because with the next upgrade it will be overridden. I would consider this a bug. Now when I login, I can see the admin but all update messages are persistent When I click them away, they always reappear on the next page load. When I try and edit a page I get a notice but can edit the page. That line says $limit = $pageListConfig['limit']; So things seem a bit messy overall after the upgrade and I would really like to be able to fix this.- 12 replies
-
- Undefined index
- searchFields
-
(and 2 more)
Tagged with:
-
Hi, I upgraded a site in development from 2.5 stable to 2.5.7 dev by copying /wire/, index.php and .htaccess over. After the upgrade, I get a notice on frontend and before login to the admin, when $config->debug = true After login there is no admin page visible, only debug info. I can see in the Variables on local scope that $admin returns a nullpage. When I switch debug to false, I can see and use the admin. Couldn't find anything related here in the forum. Any pointers how I can fix this? Thank you.
- 12 replies
-
- Undefined index
- searchFields
-
(and 2 more)
Tagged with:
-
Does anyone know when OR condition s will be available?I' be willing to donate towards developmentin near future.
-
Doing it server side has the advantage that only the code you need for mobile clients will be served which can save quite some kB. If I understand response.js right, first the whole DOM needs to be loaded before response.js can swap things around or deactivate them. If you do things server side, on mobile devices you don't output elements you need for the desktop and vice versa. There is a module for minimizing images. Or you can use image compression tools. A good overview here. I have used ImageOptim on the Mac and Trimage on Linux. Both work well and can help saving bandwidth. Don't know about Windows tools. But some of them use the same libraries, I think.
-
First tests on a shared host (uberspace.de) reveal nothing good for only 1000 requests and 100 at a time and searching only through 10 pages. Running ApacheBench on the same server that my app is on. Concurrency Level: 100 Time taken for tests: 10.772 seconds Complete requests: 1000 Failed requests: 20 (Connect: 0, Receive: 0, Length: 20, Exceptions: 0) Write errors: 0 Total transferred: 1321560 bytes HTML transferred: 1144560 bytes Requests per second: 92.84 [#/sec] (mean) Time per request: 1077.164 [ms] (mean) Time per request: 10.772 [ms] (mean, across all concurrent requests) Transfer rate: 119.81 [Kbytes/sec] received Now comes the hard part: improving my code
- 4 replies
-
- Performance
- test
-
(and 1 more)
Tagged with: