Jump to content

Joss

PW-Moderators
  • Posts

    2,862
  • Joined

  • Last visited

  • Days Won

    47

Everything posted by Joss

  1. If you wish, but did you read the images documentation I pointed you to? If you have an image field, you can grab the image and then, by using the size function, you can create a thumbnail. This will produce a resized image on loading the page. The new version of the image is stored with the size as part of the file name. $page->image-field->size(100,100)->url That creates the thumbnail and gets the url. So, to create a thumbnail that is clickable for the full sized image. I have overwritten it a bit to make it clear. <?php echo "<a href='{$page->image-field->url}' >"; echo "<img src='{$page->image-field->size(100,100)->url}' >"; echo "</a>"; ?> As you can see, the size command is used to produce a thumbnail 100x100. You can also use the width command to define the width only. It is all in the images documentation, including all the other parameters you can use to control image quality and so on.
  2. I have not used the beginner profile, so I have no idea what is in it. However, in the docs, there is a guide to how to retrieve images from an image field, which includes specifying the size https://processwire.com/api/fieldtypes/images/ Also in the docs, dig through the tutorials that various people have written - lots of clues there
  3. Hi JeevanisM Oh, terribly, terribly old! No idea where those files are now, to be honest, but they were built with an older version anyway. However, it is not really necessary. Basically, the trick is in parent-child relationships. The simplest way to build a news portal is to create a home page and then create pages under that - one for each article. Using the PW API you can then list them on the homepage. See here: https://processwire.com/api/ref/page/children/ The first example produces all the children in an unordered list: <?php echo "<ul>"; // Render navigation for all child pages below this one foreach($page->children() as $child) { echo "<li><a href='$child->url'>$child->title</a></li>"; } echo "</ul>"; You can see that you could use any html markup you like, for instance your blocks. Processwire does not hamper what html/css/js you use - just think of the /site/templates/ folder as the root of your site and put it together as you would do for a static site - just with the API, if you get my drift. Now, that is the simplest example, but you can go lots of ways from there. If you wanted to have simple categories, then you can create category pages under your home page and then articles under those: home -- news -- -- I lost the election -- sport -- -- I won the race -- food -- -- I got fat That is the most logical site and you can use the parent-child relationships in the api to list things. With this sort of site, you can almost get away with creating just one template-file and using it for everything, as long as you want everything to look the same. However, you can get much more complicated. Using the Page Field, this allows you to list pages in your template that have a specific parent. So, for instance, you can use this for tags. Home -- tags (hidden page) -- -- tag1 -- -- tag2 By being hidden, the tags parent page does not appear in any menu structure you may create and nor is it accessible easily. However, the tag pages, the children are. Using a page field, you can now list those pages as a select dropdown. But you can also tell the field to allow you to create new pages from the dropdown - making it a perfect tagging system. Just a note: Don't be put off by the expression "page." In processwire, that is basically one data record. It can contain just one field or hundreds - doesn't matter. Basically, everything chunk of data that relates to a template is a page - but may not be used as a "web page" as such. However, it means all data, however simple, is treated uniformly throughout the entire system and is accessible using the API. There you go - not a tutorial as such, but maybe some clues for you. Good luck
  4. If you think about the /site/templates/ folder as if it is the root of a static html site, then it is easier to see what happens. When I use sass, I have a scss folder somewhere on the site (it can be within templates, or elsewhere, it doesn't matter). I then compile the main scss file and output it in /site/templates/css/ as something like site.css. Then your templates in your templates folder simply reference that file. I personally use Prepros, but there are a lot of systems out there.
  5. You can probably do this with .htaccess, to be honest. See this: http://stackoverflow.com/questions/5730092/how-to-remove-html-from-url
  6. It is difficult this simply because every time I think I have found the perfect host, they mess up somewhere. However, recently, I have had good service from http://www.kualo.co.uk/ Can't guarantee it will stay that way!
  7. Hurumph! I actually have my original Creator disc, sent in the post to me by Gehard Langling (I think that was his name) with a hand written label. This eventually became Logic, and is now rubbish. But back then was amazing. I now use Cubase 8.5 with things like Hollywood Strings and so on, but back then, I had an Emulator 1, and Atari ST (which I replaced with the Mega 4 shown above). My first hard disc was 10 mb, I think. Something stupid like that. But I thought it made me really cool. Other stuff, a little later, were Lynn drums, Jupiter 8 keyboard, Emu 2 (I upgraded), Oberheim and Prophet 10, which was a 2 keyboard version of the Prophet 5. Gaud - this is all a long time ago! Mind you, despite all the computer stuff, I was still recording on 24 track analogue, and George Peckham (who had the office next to mine) was still cutting vinyls for everyone: https://en.wikipedia.org/wiki/George_Peckham Now I feel old, I am going to have my dinner and put on my slippers.
  8. Er, not totally sure what you mean here. But there are several routes. You could use Repeaters, especially the updated repeaters on the PW 3 branch (and look out for the forthcoming matrix repeaters which would be very powerful) You could use page table, which is similar, but you get to choose where the pages are stored - eg, under the parent that holds all the tabs, or under another parent that is, perhaps, hidden so that that part of the tree does not appear on navigation. You could use a page field so that the client is free to choose pages from wherever you stipulate on the tree. I am not sure what you mean about the ckeditor, but I haven't used repeaters for a while as I have been using page table. When it comes to creating tabs or accordions, then surely you only create them out of the available published and un-hidden pages? So, there will be not tab available to be clicked on, if you see what I mean.
  9. I am stuck on Windows 7 for the time being at least since with my music composition software and plugins the chance of the upgrade failing is very high. The general warning from the music community is to wait until you change systems, which I cannot afford to do.
  10. This is interesting https://www.wordfence.com/learn/2015-wordpress-security-survey/ It is an annual survey of 7000 plus members of the Wordfence community. I was particularly drawn to this line in the conclusion at the bottom: Since many clients coming to PW might well be coming from WordPress, this survey might be useful in client presentations.
  11. It depends on what I am doing. On article orientated sites I use CKEditor a lot in conjunction with Hanna code. So I might create code for spoilers or blocks and so on. It is all down to who is updating that part of the site and how much training they have. I never use it fully configured, however.
  12. Joss

    404 Hits

    Yes, I had a few fckeditors as well. As I said, if those are the files that intruders are looking for to find vulnerabilities, it is a warning list of files and locations of files that you should probably avoid!
  13. Joss

    404 Hits

    Didn't know they had a utility directory.
  14. Joss

    404 Hits

    Just been having a peak at my 404 logs. Various Wordpress files are featuring very highly, but also many attempts to find my jquery.js file. Another one that comes up a lot is /utility/convert/data/config.inc.php and variations. What is that from? But by far the most popular are wp-XX files. It shows that if you have a WordPress site, you WILL get hundreds of attempts to take it down each day, even on your little-visited blog. How comforting ...
  15. I had a dream that I was locked in a fancy store full of strange amber liquid and as I stared into the golden abyss a passing stranger brushed away the fluffy snow to show the words... Oh, sorry, that wasn't a dream - I fell into my Weissbier last night. Just remembered. Happy Crimble!
  16. Joss

    404 Hits

    Yes, I have always been very good at telling people where to go. Not ever done it via an admin address though....
  17. Joss

    404 Hits

    That could end up a long list!
  18. Joss

    404 Hits

    Just for interest, I wonder how many PW users rename their admin? I always do, normally something relating to the site. So, if I had joss.com (which I don't!) I would create jsadmin or something. I vary the system quite a lot, but useful to keep it vaguely memorable for client sites. The ability to rename admin I think is a particularly neat security feature in PW. It might not be uber-powerful, but is so simple and just creates a nice little hurdle for bots to trip over.
  19. Yes, Dave is right and that sounds like a performance issue - not so much with ProcessWire perhaps but with the server not loading resources. I have had that once or twice on shared servers when there has been a heavy load on the server (not my site specifically). Interestingly, I had a particularly bad day a few weeks ago when someone else on the shared server was being attacked, but it was interesting to compare systems. My PW sites were as slow as hell, but were just about hanging in there. However, my one remaining WP site was on its knees crying for mercy!
  20. Joss

    404 Hits

    Just a cursory glance at the logs shows mostly wp-login, attempting to find it in various places: /wp/ or /wordpress/ or /news/blog/ and so on. Actually, it is probably a pretty authoritative list of the most common places people install wordpress. I get the odd other wp- files and then also quite a few attempted hits on jquery.js (in places where I don't have it, of course). The IP addresses tend to be mostly Dehli with some Ukraine and one repetitive address in Tulsa. IP address 67.20.55.130 was having a good hunt around for vbullitin last night and also looking for bigdump.php and a couple of backup.sql scripts. So, this is also proving to be a list of file names you should not have in your web accessible hierarchy because they are searched out by intruders. I have blocked a couple of the ip addresses on CPanel for interest and there was less activity in the last 24 hours, though I suspect that could prove a full time occupation if one were not careful. It almost needs an automated script that says: "If an IP address attempts to find a file name from a blacklist more than N number of times, then block IP" So, in our cases, we would put on the blacklist common files from Drumalpress and a couple of forums, plus some things like backup.php which we do not have. It would need to be domain name specific, of course or you could end up blocking yourself!
  21. Joss

    404 Hits

    Kixe, I have installed your logger, so it will be interesting to see what it kicks out. I know wp-admin is the most common one, but I don't think it is all of them. Nice tool.
  22. Joss

    404 Hits

    Good idea - though to be in keeping with the joke the module would have to demand weekly updates to avoid catastrophic bugs.
  23. Joss

    404 Hits

    Actually, perhaps Processwire should come with optional pages for wp-admin and a couple of other WordPress standards that are nicely written and polite. "Should have chosen Processwire."
  24. Joss

    404 Hits

    For Processwire, of course....
×
×
  • Create New...