-
Posts
733 -
Joined
-
Last visited
-
Days Won
9
Everything posted by SamC
-
New image upload options - client side vs server side resize
SamC replied to SamC's topic in General Support
Ok so I read through this, client side seems a pretty good idea. What isn't so good is that it does require width and height settings whereas I used to just set the max height. I don't care about the width so much (no panoramic photos going on here). I'm uploading stock images so the sizes do vary. I'm not 100% sure how this works tbh. As it stands, I set the max-height to 1200 and use server side resize. I just uploaded an image of dimensions 1920x1280 and the resulting image on the server is 1800x1200. So I guess I could just set the max-width to some large value like 4000 (width will always be within this boundary) so the height will always end up as 1200. -
Admin panel showing Error 500 Internal Server Error with no logs
SamC replied to desbest's topic in Getting Started
My hosts changed how I was allowed to connect remotely to secure tunneling. Previously I simply used (my) whitelisted IP address to connect and used a shared database between the live site and the local one. Then that suddenly stopped working (although i got error connecting to database rather than 500). Maybe they have changed something as you mentioned earlier. -
Admin panel showing Error 500 Internal Server Error with no logs
SamC replied to desbest's topic in Getting Started
Are the permissions set up correctly? https://processwire.com/docs/security/file-permissions -
Admin panel showing Error 500 Internal Server Error with no logs
SamC replied to desbest's topic in Getting Started
Is a live site, is this not risky? Although I know it would be only for a few minutes. Maybe also try and work out whether this just happened suddenly or not i.e. I was on the site, logged off, logged back in and got a 500. Any changes to the .htaccess before this happened? Upgrade? -
Glad you got it working
- 76 replies
-
- 2
-
@MilenKo I'd go with Less if you're using uikit as you can make your own theme. Maybe you can do this with the Sass version but I didn't bother trying as there doesn't seem much point being stuck knowing just one or the other. You can get comfortable enough with both then you're free to choose whatever framework you want, or write some stuff yourself from scratch, whatever suits you best. Once it's set up, it's not that difficult, and they give you a build script too so you're literally up and running in about 5mins. Then you just override variables, hook existing stuff (like cards, accordians etc...) and add your own custom rules. All compiles to a nice minified CSS file which you can then link to from your webpage. I'm starting a new guide about Uikit on my tutorials site as I've found the uikit instructions to be lacking in detail and an absolute beginner to css pre-processing would have a tough time with it. The guide will serve as a base for when I get round to writing about customizing the PW admin theme, which will be easy once someone has read the first guide.
-
$config->imageSizerOptions doesn't seem to do anything?
SamC replied to a-ok's topic in General Support
Maybe take a look at this thread. It covers a bunch of stuff about image options. One of the points was not to override the imageSizerOptions like in the very top example code in this thread. -
If you go the 'modify ckeditor' route, as you say, you need to create the list (i.e. select the text, then click the list button in ckeditor), then select the list again, then use the 'Styles' dropdown to apply the classes. I find this a bit convoluted. If you are using less to compile uikit, you could always try extend. I use this in sass a lot, the syntax is different with less, but something like this: .wrapper-for-ckeditor-field { ol { &:extend(.ol-pretty); &:extend(.uk-list-large); } } i.e. just style out any ol within .wrapper-for-ckeditor-field (which would be in your template). No need for applying classes via ckeditor. This wont work for you if you need: a) Different styled lists within the outer class b) You're not compiling less Just an idea. I don't like messing around with ckeditor, find it quite infuriating, but sometimes you have to.
-
I know this is an old thread, but if someone finds this, I also would absolutely recommend this module if you're working with tagging pages: I use it on pwtuts.com and it makes it very easy. In the footer of the aforementioned site, there is a tag list, which is pulled from this file /includes/tags-list.php: <?php namespace ProcessWire; ?> <h2>Tags / <a href="/tags/">See all</a></h2> <ul class="tag-block list-unstyled"> <?php $tags = $pages->get("/tags/")->children; foreach ($tags as $tag): if (count($tag->blogPosts)): ?> <li>#<a href="<?= $tag->url; ?>" class="<?= $tag->name; ?>"><?= str_replace("-", "", $tag->name) ?> (<?= $tag->blogPosts->count ?>)</a></li> <?php endif; endforeach; ?> </ul> ...because the blogPosts fields are connected to the tags, it's just a case of using count() on the tag i.e. if it has page ref fields (blogPosts), print them. Count is used again to output how many posts are associated with each tag. This would have been more awkward for sure without this module, you'd have to get each tag, then find the number of posts that have that tag etc...
-
It's really easy to customize the admin to however you want it to look. I think I may write a tutorial about how to do this. Just need nodejs/npm, create a single (your theme) .less file, import it to _imports.less, and use their included build script.
-
lol. Gonna have a read of this post later. Guess you could say I'll be having it for dinner.
-
Did you try putting the namespace at the top of the _contact-controller.php file? What I reckon is $v is a Valitron object, and your error is complaining about a 'non-object' being referenced (trying to call a method called errors() on it). $v is in _contact-controller.php and your calling a method on it in contact.php. These two files don't 'know' about each other (even though you have the namespace in header.php). Maybe unnecessary, but to avoid things like this (undefined functions is another one that crops up) I just add the namespace to the top of every template. It's not that much hassle as I never have tonnes of templates anyway. Therefore I would think that adding the namespace to _contact-controller.php would solve your issue. Now I might be wrong but I'd try this if you haven't already. I can't see anything wrong with the code at a glance, especially if you copied it from a working example. The only difference I see is that yours doesn't have the namespaces.
- 76 replies
-
- 2
-
Hi @Batyr and welcome to the forums I'm rushing out the door in two seconds but I can see this thread on the phone. Have you got the namespace at the top of your template files (contact and _contact-controller)? <?php namespace ProcessWire; ?> Also, the error points to line 49, what's on that line? I wish the forum had line numbers sometimes.
- 76 replies
-
@diogo that's really cool! Big thumbs up from me
-
New image upload options - client side vs server side resize
SamC replied to SamC's topic in General Support
Hahaha wow, me are dumb. Saturday night on the PW forum, I need to go to bed! -
New image upload options - client side vs server side resize
SamC replied to SamC's topic in General Support
Ah, thanks for the link. My 3.0.41 install doesn't have these options though. -
Just noticed a few new options have sprung up in v3.0.82 when I checked out my image field. Now I only wanted to control the height but the use client-side says: When using client-side resize, please specify both max width <em>and</em> max height in the fields above, or max megapixels in the field below. Am I to presume I was using server-side resizing before updating PW? I didn't choose client-side, this is how it looked when I just checked out the field. Also, if I haven't set a max width, is server side resizing the fallback or does non occur? Does client-side mean the original will not be on the server? I don't want to set a max width because it may be the case that the height ends up less than 1200px. Bit confused with this one. Any more info about these options would be awesome, thanks.
-
I can install via github clone and then create a theme quite easily, but I'm struggling with the docs in regards to uikit via npm. I've done: mkdir testproject cd testproject npm init npm install uikit --save cd node_modules/uikit npm install npm run compile Now, I'm stuck. Where do I create my theme? In the node_modules folder? Do I have to use my own build process when installing with npm? My needs are certainly a 'typical web project'. Cloning the repo explicitly says "including build scripts", implying that the build scripts are not included with npm. But they are. Running 'npm run compile' inside 'testproject/node_modules/uikit/' builds the source into the '/dist/' folder. I'm so horribly confused with the 'modern' way to make websites. Think I need to grow a neck beard and join a JS cult in order to understand all of this madness. Looking at webpack, and thinking does it replace gulp? Been reading this: https://getuikit.com/docs/webpack ...and I'm looking for the 'translate' button to turn it into English. Exasperated is an understatement of how I feel right now. I'm hoping to start learning how to create PW modules over the weekend but all this other stuff is really playing on my mind. I guess I'd like to know, how does everyone else use uikit in their PW projects? It's popular around here and I presume everyone doesn't just use the stock theme or override a few CSS variables. Any advice would be awesome. Give me a chance to grow my hair back. = edit = This helped me with the basics, getting a better idea about webpack. Still interested in hearing about how others use uikit though. https://youtu.be/lziuNMk_8eQ
-
Now this I like I've never used Joomla. And after reading this thread and using PW for over a year, can't say I've got a strong desire to try it! Good luck.
-
I read about the fines regarding non-compliance, and they're HUGE.
-
Lol. I'm going to get clients to buy their own hosting too. I was all set up with a reseller account, then thought, actually, this is a bad idea for a one man band. My hosts kindly switched the account and transferred the files/databases, the whole lot for me. One issue was that they dumped the public_html folders, inside the public_html folders, so I ended up with four sites with /public_html/public_html/index.php... doh! I did appreciated them moving the databases though, saved me a lot of hassle
-
Sorry, should have explained. It looks like the products are at the front, but the dropdown disappears behind the white diagonal. Maybe could use a light grey with opacity for the dropdown background? If it's white, that explains the disappearing act. As I said, not sure of it's intentional but it sure caught my eye.
-
+1 for that. The site does indeed feel faster now too, nice work, looks impessive One thing I noticed, whether intentional or not:
-
Sounds interesting. What sort of scale are we talking about here when using stripe/paypal vs needing a complete ecommerce solution?