-
Posts
7,479 -
Joined
-
Last visited
-
Days Won
146
Everything posted by kongondo
-
@Diogo, I haven't had time to test the second version. Will do so sometime. Meanwhile, I have been busy playing with the module and here's a taster...a CRUD system for: a db external to PW (see video) PW pages (attached screenshots) Just fooling around at the moment. It is WIP as I learn the ropes of PW. In these examples I am using jTables. Will soon switch this to the great DataTables. Soma has a module of this one in the forums. Here I show how easy it is to implement using your module Many thanks for your awesome module!
-
@Soma, nice catch, hehe! I was typing as fast as I could so as to beat you to a response
-
Dragan, Welcome to PW! PW is very flexible....your decisions will not be frowned upon but of course advice will be offered, especially when it comes to security . So, as for best practices, my experience is that PW is very flexible and in most cases there is not one way of doing anything. I know, it sounds like a cliche...but seriously, you'll notice this very quickly once you start getting your hands dirty. One thing you will notice is that with PW, you will end up writing less code It's simply that good. Yes; extending PW is in most cases quite easy.... Have a look at this module (WIP). You will get ideas how you can create your CRUD script....It's using DataTables to display PW pages. You can create your own to do something different, e.g. your CRUD stuff using either native SQL or PW's db class. Having worked in the industry that long I don't need to tell you care needs to be exercised if handing a client that much fire power . There is also this new kid on the block...a new take at making custom admin pages... Oh, btw, am ex-MODx as well. There's more in here Enjoy!
-
I love that reaction PW causes....
-
Thanks Apeisa. I didn't think of that
-
Hi Ryan, Congrats to you and your family! Enjoy your little one
-
Hi Billy! Welcome to PW! Mary's right; there's everything to love about PW! In your hands you now have an easy to understand and very powerful CMS/CMF. I assume you've been digging round the docs but If you have any questions, feel free to ask away. Folks here are nice and friendly
-
Btw, Is there any advantage/disadvantage of using $pages->get()->url; over $config->urls->root? as shown below? <form method="post" action="<?php echo $pages->get("/contactengine/")->url;?>"> versus <form method="post" action="<?php echo $config->urls->root?>contactengine/"> Thanks
-
@PWired, I've seen this approach before but it has various problems. One, it will invariably cut words in the wrong places, leaving some sentences "hanging". It can cut off a perfectly "harmless" word into one that has a totally different (even offensive) meaning! The better approach, IMO, is to use a summary field for summaries and a body/content field for main content. Of course if the summary field is empty then there will be no summary . You can get round this by making the summary field a required field or outputting a summary field only if it is not empty...which may not be desirable in some cases. The code above has only 1 field; the summary field. The "url" bit will be grabbed for you automatically by PW. It is a property of the $page object, so called "Built-in Fields Reference". See the API docs. I suppose you are looking at some basic PHP tutorials? Depending on how comfortable you are at the moment, two of your best friends will be print_r ($exampleVariable); and var_dump ($exampleVariable); These will show you all the stuff within a $page object. I don't mean to be rude but I suggest you really dig into the PW default install as well as the "simpler" API documentation, i.e. selectors and variables ($page and $pages). Even if you have read them before, look at them again and again. That's what has been helping me. They are my constant companion. Try things out by example. For instance, in my tests site, I have a test page exclusively for testing variables and selectors. Of course you can use the selectors module but I do this to see things how they will really look like on a website. I hope this makes sense. Another suggestion I'd make is to take a simple working HTML page and convert that to PW. Along the way, document/annotate the logic you will use and why. For instance, what will be a field in a page and why? What will be pulled in from other pages? E.g. pull in the summary fields of the first 5 pages in the category articles, etc.
-
PWired, I think what is being said here is that there is more to site rankings, SEO than writing lots and lots of articles. Of course, you can write lots of articles if you want...but it doesn't mean your site rankings will go up. There are a number of issues you raise here so maybe not good to get mixed up. Here's my take. Blog: You can easily create a blog in PW. This will come with all the ease of templating and powerful API that PW offers. Of course you can create one in WP too and none of us will be offended . Personally, I wouldn't create anything with WP..I've tried it before and don't want to go there again SEO/Site rankings: Whether a blog or some other sort of site, there are tips on how to improve your search rankings. Google these. Templating: There are a number of approaches. Key questions are these: Do I need lots of templates or few? How do I justify whether few or lots? The fewer the templates you can get away with the better for you, I think. By using PHP conditional statements (if's) with PW you can be as versatile as possible and use a few templates. How to organise your pages: Here I refer to the images questions. I'm sure you know that there are various approaches to this in PW. You can use Soma's image manager (in Alpha currently!); You can create one page to hold all your images. You can upload multiple images for each page. You can include inline images in the rich text editor (not all like this ). Which one you choose depends on your needs. Read more, etc...that's ridiculously easy in PW. Have you looked at the default PW installation? There are a number of ideas there. E.g. , the text before the read more can come from a description or summary text field. You click more it shows you the whole article. E.g. echo "<p>{$myarticle->summary}<a href='{$myarticle->url}'>Read more...</a></p>"; That will give you something like: I gotta run. I'll probably write more later. This reminds me, I really need to write that tutorial about how to approach templating... Hope this helps...
-
Cool tips Diogo, thanks! Btw, If having both Image and PWimage it's probably good to use a different icon for PWImage just not to confuse the client
-
@Andrew, Thanks for this! This has really helped me, thanks for sharing!
-
Aah, I get you. Hmm..,sorry I can't help with this one
-
Diogo, Oh my, oh my! Just tested this. Awesome!!! OK, maybe am delusional but this is a game changer! I've been playing around with creating some simple modules but this makes me even lazier; all I need are template files! Hehe. I'll continue with learning how to do modules though I see "endless" possibilities with this module. Alternative pages view (I love the PW tree, but if an alternative view is needed...), product listings, galleries, etc, etc. From my testing, it seems this renders the first child of the custom page, no? This means that to create other custom pages I'd need to repeat the process - create a new custom page that uses "Admin" template and assign the "ProcessAdminCustomPages" process then create a child page for this page... Would it be possible/easier to have multiple children of the one custom page (drop down menu) which will then render children pages with the custom content? This could be useful in some cases where there are quite a number of custom pages? Just thinking out loud here...Maybe the version 2 you've posted above would do allow such a scenario? Many thanks for this! Watch out for examples of how I've been playing with this module!
-
You mean you want to grab those images and browse/display them in the backend/Admin?
-
Well done Diogo! Looking forward to test this . Is it based on your idea in this post? Thanks.
-
How to set up a multilanguage site using a single page tree
kongondo replied to choppingblock's topic in Tutorials
Choppingblock, Welcome to PW! Awesome first post! Yes, most stuff is in the forums but we do need all the help we can get to write docs and tutorials . Thanks for this and have fun with PW! -
http://processwire.com/talk/topic/3219-images-manager-alpha/ It's still in Alpha and you won't find it in the Modules site
-
Nice find to teach one the basics!
-
Well, in his 2nd post, PWired specifically asked about "flexible grid systems and responsive design" and by his 3rd he was happy to go and try out Foundation . CSS Frameworks do many things one of which is layout (grid).
-
Thanks Diogo
-
Hi, I am sanitizing some variables coming in via GET through Ajax as follows before passing them on to a selector. Is this the correct way of doing it? Secondly, can I instead type cast where I am expecting integers? Thanks. $sort = explode(" ", $sanitizer->selectorValue($input->get->SortX)); $sortOrder = $sort[1] == "DESC" ? "-" : "" ; $sortValue = $sort[0]; $start = $sanitizer->selectorValue($input->get->StartX); $limit = $sanitizer->selectorValue($input->get->SizeX); //Would this suffice as well since I am expecting integers here? //$start = (int) $input->get->StartX; //$limit = (int) $input->get->SizeX; //What about this (access as array index)? //$start = (int) $input->get["StartX"]; //$limit = (int) $input->get["SizeX"]; $results = $pages->find("has_parent!=2, id!=2|7, include=all, start=$start, limit=$limit, sort=$sortOrder$sortValue");
-
Good to know, thanks here as well.
-
Hi Madmax555, Welcome to PW! About SQL injections in PW, see the answer by Ryan (main developer) in this thread - they are a non-issue with respect to PW API These will also be useful http://processwire.com/talk/topic/1380-duplicate-entries-registration-form/?p=12369 http://processwire.com/talk/topic/314-idea-create-calendar-events/?p=2183 http://processwire.com/talk/topic/1380-duplicate-entries-registration-form/ http://processwire.com/talk/topic/2038-distinct-selector-in-processwire/?p=19268 http://processwire.com/talk/topic/2385-custom-string-in-names-of-database-tables/
-
How to setup Relations (?) for a MP3 DB with PW?
kongondo replied to horst's topic in Getting Started
Horst Simply a-ma-zing! I'm liking this more and more..