-
Posts
2,862 -
Joined
-
Last visited
-
Days Won
47
Everything posted by Joss
-
Okay, so I think I know how to do this, but I can't quite get my head around it. When I publish an article on a site I am nailing together, it appears in various listings around the site - homepage, list of recipes, whatever. While it is unpublished, I want to be able to preview it in its various guises, not just the main article. I think it should be something like if logged in user=author, erm, also display unpublished articles by this author, or something. Though, of course, that might bring up a lot of rubbish too - all those unpublished articles I haven't got around to finishing. I suppose I could add a "preview" checkbox so that it will only display the various bits from an unpublished article if this checkbox is also selected. if logged in user=author, also display unpublished articles by this author where preview=1, or something else? Is this making any sort of sense to anyone? Diogo? Are you out there? You are normally good with my ramblings!
-
I thought I would just pop by to say how much fun I am having. I don't really get the chance to put websites together at the moment for some complicated reasons, but I have put some days aside to nail together a new blog about something. And I have thoroughly enjoyed it. Especially all the little tweaks I have been making. For instance, I want the layout on the front page to be very neat, but that means the titles of articles have to be a certain length, as do the summaries and the images, where they are available. That particular constriction doesn't necessarily work in other areas of the site. With PW, the answer is dead simple. TWO title fields, both with the counter switched on and a little note reminding me of the ideal length. I also have two summary fields for the same reason. I have a similar thing with images. I have made up a Photoshop template with Artboards for all my various image sizes - featured image, summary image for the front page, story images for the article, sidebar images and the SEO image. Of course, the fact that I can have an assortment of images in my PW template means I can take advantage of this PS template. And, because some articles just don't have an image, I have a little note telling me to write a longer summary if there is no image. Oh, and a bit of PHP that looks for the short title and uses the long one if I forgot to write a short one ... and so on. I know this is all mundane stuff compared to some of the cleverer functionality Ryan and the various mod devs are coming up with, but for me, it is this simpler versatility that makes Processwire so powerful. That I can just shove in another field to get around a certain problem and bring it up as an alternative with one line of PHP makes sites a joy to develop. Enough so that I actually spent a happy hour today neatening up my code, indenting it nicely and putting helpful little comments everywhere. I didn't need to do it, but I have worked so much faster than I could have with any other system, I had the time - so I had my little bit of fun.
- 2 replies
-
- 12
-
I have set one of my ckeditors to Inline and have used the supplied contents-inline css (which may not be an issue). When I try to insert an image, rather than placing it where my cursor is, it puts it at the head of the document. If I then move the image manually, when I save the page, the image is not saved in the ckeditor field. Any ideas, anyone?
-
So, here is the scenario. I am creating my own little advert management system on my new site. Basically, I have pages under a parent each with ad information in them - google ad code, other ad code, my own ads and so on. On the parent page, I have a little ProFields table. The first column is a selector where I can choose a position on the website. "Home Page 1st Ad Position" for instance. In the second column, I have a page select where I select one of the ads. Simple! Now, just to complicate it, one of my choices I want is "Random". Basically, if I choose this one, for a particular position, then it chooses randomly from all my ads. But how to add a "random" choice? Well, it struck me that I just create a blank ad called "random" and then I can choose that one. In my code I just put "if ad name is random then getRandom()" But then, that random selection would also include the random ad. So, that better be unpublished. Now I need to change my selector in the table to include an unpublished item. But then, would the random choice end up choosing the unpublished random ad.... oh god! I could see me causing myself problems. I scratched my head, stared at errors, walked around the house, shouted at the rain, played some solitaire ... And then it came to me. OBVIOUS!!!! Publish the ad page called "random" and just put an advert in it! DUH!!!!!!
-
I haven't seen that, but then I have had this shared hosting for several years.
-
Thanks, Sam, I will look through this later.
-
I have had two issues just today - the first was if I uncomment the https bit in the PW htaccess, it says it cant find the site. The second was with enabling php7.1.1. The site seemed to work untill I tried to edit on particular page. It got confused and sent me to a 404. Next I knew was that the site froze and I recieved an email saying I had overused php requests. Support realised it was a php compatability issue and put me back onto 56 which has solved the problem. That was a pain since I use php 7.1 locally and had no problems. But I am not sure what was wrong. The error they saw was: [Wed Feb 01 11:18:01.354468 2017] [core:error] [pid 20997] [client ipaddresshidden] End of script output before headers: index.php, referer:https://dancingbear.co.uk/dmin/page/edit/?id=1&s=1
-
I have had the company for 25 years, so not a lot of choice
-
I have just updated my music production site. This shows how even with a very simple site, Processwire has a place. The site is, for the moment, just a single page. I could have just made a static site without much trouble, but by building it on Processwire, I will be able to expand the site in the future without having to rethink the current site. The design used the profield Repeater Matrix for everything except the footer. So, I can reorder the panels easily should I wish. Here be the site: Dancing Bear Music (All graphics by me)
- 4 replies
-
- 11
-
I use Kualo in the UK for hosting. Actually, I have found them generally very good overall and normally nice and fast. They supply Let's Encrypt on their shared servers via CPanel, and it automatically renews. It takes seconds to set up - just hit the enable button for the domain or addon domain. https://www.kualo.co.uk/blog/lets-encrypt
-
Danke, Herr Kobrakai! That is good to hear. With the recent updates in Chrome browser and the way that search engines prioritise https (sort of), this is becoming more of an issue for everyone, not just those running more obviously secure web applications. Also interested to hear from others whether going SSL, even with lower security free solutions, should be pretty much automatic now. Should PW be promoting this? I sometimes think that software providers should not only be offering good, secure software (and Ryan, yours is one of the best) but should probably be promoting best practice too, now.
-
I thought I would ask this general question if, for no other reason, so that there is a definitive answer kicking around for anyone else. I have an existing PW site with no certificate. I want to upgrade it using the Let's Encrypt free certificate available through CPanel on my hosting provider. (This is an ordinary site, not a shop or anything). Once I hit the button, what should I change in my existing PW installation (configuration)? And what should I add to the htaccess file to redirect all the existing http incoming links? Joss
-
Okay - solved. Turns out the two sites in question were still on php 5,3. Switching to 5.6 solved the problem.
-
No idea. I will go look.
-
Just clicked on upgrades on a couple of sites and got: Error loading GitHub branches - https://api.github.com/repos/processwire/processwire/branches - HTTP error(s): - Check that HTTP requests are not blocked by your server. No other errors. Any thoughts? Not having this problem on a local box and my hosting provider does not know of anything their end.
-
I saw that. And a few others. I have tried adding always_populate_raw_post_data = -1 to the ini file, but it didn't seem to achieve anything. Thought it might be the culprit, too, so that was a let down.
-
Okay, it is definitely the php config. I just remembered that I also had 5.4.16 on the box, so I used that instead on a test site, and uploads seem to work. So, I wonder what is up with 5.6.25?
-
Ummm.... So, any suggestions? I am guessing this has something to do with the default php 5.6.25 configuration, but I have no idea what to look for.
-
Do you mean the link on the left under "name"? If I do that, I end up with headers, preview, response and timing. Headers just gives files details Preview is the image, obviously Response says no response data available Timing says stalled. I am assuming there is something wrong with my php installation - or a module missing or something. This is where I am well and truly out of my depth! Joss
-
-
Hello chaps and chappesses. I have just cobbled together a new dev server (er ... that was hard) using Centos and Webmin. I have two installs of PW on it, both are working, except neither are uploading images to a standard image field. The problem seems to be that it all gets stuck with the uploading twirly thing going round and round and round and..... So, errors: Fatal error: Call to a member function getConfigData() on null in <b>/home/aworldcalleddirt/public_html/wire/core/Pageimage.php</b> on line 486 Error: Call to a member function getConfigData() on null (line 486 of ...../public_html/wire/core/Pageimage.php) In console on Chrome: Uncaught SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<anonymous>) at Function.parseJSON (JqueryCore.js?v=1481814737:2) at XMLHttpRequest.<anonymous> (InputfieldImage.js?v=119-1481814737:1403) This is the most recent dev version of PW and I am using php 5.6.* (something) Nothing helpful in apache logs. I have dug through various posts and am now dizzy Help.........!
-
-
Er.... I already have 29 - how to I get the fix?
-
Yeah, I am getting the same error creating a new page. As above, creating the page with a title is no problem, but saving that page either as publish or keep unpublished throws the error Error: Call to a member function add() on a non-object (line 629 of /xxxx/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module) Happening on two sites on the same shared server. Error: Call to a member function add() on a non-object (line 629 of /home/dancingb/public_html/cchogan.com/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module)