-
Posts
7,479 -
Joined
-
Last visited
-
Days Won
146
Everything posted by kongondo
-
My opinion as I have expressed it is that the documentation could do with more examples and to be honest there has been some real effort to improve it. I have seen that since I started here. Only the last couple of weeks new sections have been added, the last one was last week I think (about multilingual sites). So, I am not saying the documentation is "good enough" full stop. My opinion is that it is good enough to get you started. You only need to read about $page, $pages and selectors to be on your way. You also need to try out some of the tutorials. Maybe, and I restate maybe, (not you in particular) some members try to jump in too quickly to create great things with PW or try to quickly to convert a site to PW without first trying to understand the basics. I don't think that's the way to go about it. Before jumping into the CMS world, I used plain HTML. I had to learn the basics of CMS world before I could make anything with Joomla. I am not saying that is how we should all learn; we learn differently. However, in any learning process there must be an understanding of the basics. In other words, the message is please help us help you. I must apologise if I sounded elitist. I did not mean to create offence. If I did, I am sorry. I cannot speak for Diogo but knowing him, he is not elitist. In fact, I have not encountered any elitists views in these forums. In my excitement to have you relate to my experience I probably did not choose my words carefully. Like I said, I was trying to relate to my situation. I did not know much about PHP before I started using PW. Yes, I'd seen an echo here and there and knew about variables but could never code anything beyond "hello world". PW has helped me improve my PHP skills. I see myself getting better at it daily, by asking questions and trying out things. As a btw, I am in the process of helping to improve "access" to PW by writing up tutorials. You may have seen my post about it. If not, check out my rather unfinished (erm, barely begun) site. On the issue of assuming things, I think there's some misunderstanding. PW assumes (in the sense of expects) that you have some basic knowledge of HTML, CSS and PHP (very basic). Otherwise, you will not be able to use the system. The other meaning of "assume" that is being conveyed is that PW does not make decisions for you regarding how you want to structure your site or what sort of logic you want to use. It does not "assume" that it knows what you want. It does not get in your way. Rather, it lets you use its tools to create what you want, how you want. I think that is what is being said here? There are several (maybe lots?) of posts that talk and teach how to do tagging in PW. Yes, we all agree they don't jump right at you hence the suggestion to use Google to search the forums (e.g. tags site:processwire.com/talk). This is a stop-gap measure as the references to examples and the docs are improved. This takes time. Hope you have noticed that pwired has started an effort to collate useful resources, code snippets and tutorials in one post to help newbies. You do not need to go and hunt thru all the threads. If you had time, I would suggest that you actually read as many posts as you can. My experience (which may not be your way of doing things) is that I read all the forum posts when I got interested in PW and before I joined the forum. It took me several months but it also helped me lots. I bookmarked stuff and read and re-read to understand stuff. I am not saying you or others must do this; just advocating it, if you have time. The rewards outweigh the costs. Then again, I am crazy I relate to your situation. I have been in your shoes. Most of us (all of us I think) have been in your shoes. The great Soma whose fingerprints you see all over this place has been in your shoes. He's shared his experience here in the forums. He read the docs and tried and asked in the forums and read more. Look where he is now . I am trying to encourage you here not to give up . Look at Diogo, Pete, Anti, Teppo, pwired and many more. They all started from not knowing much. Diogo is a designer. Pwired started with questions, he's getting more comfortable with the system everyday. Vineet Sawant is a designer but he's coding crazy things at the moment. How? By asking and trying, breaking and mending things. What am I saying? I do not think it is a good idea to ask for help to code snippets in a PM. Why? Because if you ask a question and are answered publicly, it helps the next person. I am not saying that you shouldn't PM someone for some specific question though. But it helps us all if we can share in both your question and the answers provided. So please, do not feel as if you have been pushed out of the forums. Please, ask questions; ask lots of questions . Questions have helped us all. I mean, even Ryan himself asks questions here in the forums. Yes, he does not know everything believe it or not . As for your question about 3 random posts.....an example.. $pages->find("template=posts, limit=3, sort=random"); Please also check out the examples in the docs. They cover most of this sort of thing.. Anyway, this post is way too long and has severely digressed from the original topic, sorry. Cheers!
-
Looking forward to this Jonathan!
-
Sorry, too many suggestions on my part! I'm just being picky As the links grow, we will probably it would be good to divide them (if possible) according to whether they are links to tutorials or code snippets or resources. Something like this: Tutorials Topic Link 1 blah blah Description etc Code Snippets Topic link 1 etc Description etc Resources Topic link 1 etc - e.g. link to a blog, docs, etc Description etc.
-
OK. So, maybe move your links and descriptions in post #3 to post #1 and place them right after you describe what this thread is about. Thanks Edit: In the first post (#1), also add what you say in post#5 - for members to PM useful links which you will then add to post#1
-
Use the full editor when editing your post
-
In an ideal world, all these links plus others should be in your first post. This saves people from scrolling searching for links down below. However, that would mean all such links contributed by others are sent to you (or a mod) to edit and include in the first post. It could end up being one long first post though. The rest of the posts below the first would be for talk, discussions, etc..
-
Great! Thanks for setting this up. We probably want to tweak the title of the thread a bit? E.g., not everybody will understand what "tutos" are , especially those not very comfortable with English. Maybe something like "Links to PW tutorials, code snippets and resources" ? I am not good at this so will let you and others improve it
-
I have previously raised the issue of FAQs and was rightly made aware that we do have a board for that in the forums . @pwired. If you can start a thread in the FAQ board to collate links existing tuts, code snippets that would be great. Maybe under each link have a short description of what the tut is about, etc.. Of course FAQs cannot cover each and every scenario but that's obvious . Ultimately, code examples should be in Gist (or similar) I think. Anyway, I and other members would support you for sure. Are you up for it?
-
@Zahari, Disclaimer: This below is not meant to be a criticism...just thoughts from my experience. I came in to PW from MODX and before that Drupal/Joomla and WP, etc. I feel what you are saying. Thanks for sharing your thoughts. I agree some stuff in the docs could be improved maybe with more examples. As you acknowledge, it is a community effort and any help is appreciated. On the other hand, it would be impossible to write docs for every use case. For instance, on the issue of a lack of a "categories" system you talk about, categories are predicated to systems that use them such as WP. A Drupal person will talk of where are the nodes? What about taxonomy? A MODX guy will ask for TVs and chunks. A.....you get the point . So how do we deal with this? I like what Ryan wrote in another post about focusing on the bigger picture, not the how can I do this or that. So, instead of focusing on how can I make a photo album or how can I create a menu in PW? you focus on the bigger picture, e.g. what are the basic building blocks in PW? You will notice the docs try to focus on the bigger picture. They tell you how to use the tools, those basic building blocks ($page, $pages, selectors, templates, template files and fields mainly). If you know how to use those tools you can build anything in PW. For PW, in order to effectively use its tools, you have to know some basic PHP. In other words, before you use my tools, please read the basic manual for the tools. This is nothing more than if, include, foreach, and echo. With foreach comes arrays of course. Those will suffice in most cases. However, for those willing to learn more PHP, it unlocks yet other doors and will enable you to do more with the tools. All of a sudden you can do more than echo stuff; using the API, you can delete, add, do maths, and before you know it, you have developed a small module. In essence, PW is not a turn-key solution nor does it pretend to be. On the question of more examples, I am thinking this should be a community effort (like examples on php.net). In fact, there are many examples in the forum (community contributed). Admittedly, currently it is only a handful of members who are contributing such examples. With time this will increase, I know. Hey, look at me, I only arrived recently yet I now feel comfortable enough to "contribute". I am no genius; I just learnt what I know from reading other members' contributions and the API docs . My only concern is that some of those examples will be "lost" deep in the annals of this forum. There's been community talk of collating code snippets in one place but I haven't seen that happen yet. I don't see that as a problem at all. Yes, PW assumes you have a basic knowledge of these like I said in order to effectively use its tools. In order to use this system, you need to have that knowledge. Similarly, in order to use Joomla, the system assumes you can use a mouse and a keyboard to click point and enter data . PW does not seek to replicate what those systems do. Maybe this should be made clearer in the docs if they are not clear enough. Looking forward to those videos! <btw>Come to think of it, I have seen a couple of "once this is finished I will write a tutorial to help others..." but in many cases I am still waiting for those tutorials . I am not saying the posters are not sincere; stuff just gets in the way I suppose !</btw> OK, back to WP and why I don't use it...
-
Hi Allan, Yes, please file a bug report and the possible solution on the profile's Github site (only possible if you have an account at Github)...or post in the profile's forum thread and/or send Ryan a PM. Github is best though. If you don't wish to create an account there, I can file the bug it on your behalf
-
nfil, see my post above yours
-
Have a read at this earlier post on page #4 of this thread. It talks about roles. Seems you can import roles actually. http://processwire.com/talk/topic/383-module-import-pages-from-csv-file/?p=10160
-
Glad it worked.... Ye, the docs are really helpful. Have a read and ask away if you have questions.
-
No need for a module for such a simple task IMO. Here's the code that is working for me...also borrowing from Diogo's code above . It is the whole topnav.inc amended to suit your need. foreach($pages->get($wire->config->adminRootPageID)->children("check_access=0") as $p) { if(!$p->viewable()) continue; $showItem = $user->isSuperuser() ? true : false; $info = array(); if(!$showItem) { $checkPages = $p->numChildren ? $p->children("check_access=0") : array($p); foreach($checkPages as $child) { if($child->viewable()) { $showItem = true; break; } } } if($showItem) { $class = strpos($page->path, $p->path) === 0 ? " class='on'" : ''; $title = strip_tags((string)$p->get('title|name')); $title = __($title, dirname(__FILE__) . '/default.php'); // translate from context of default.php //AMENDMENTS START HERE $pageID = 22;//in this example, I use PW Setup page id which is "22" if ($p->id == $pageID) {//if the page is the one we want an edit link to //create a new variable $href $href=$pages->get(10)->url.'?id='.$pageID;//based on Diogo's code } else { $href = $p->url;//else href is normal url } echo "\n\t\t\t\t<li><a href='{$href}'$class>$title</a></li>"; //changes made; assigned $href to be value of href='' //AMENDMENTS END HERE } } Try it. Change the value of $pageID to the id of your "settings" page. Of course, you can delete the comments I added to the code if you wish
-
Quickest I can think (without much thought )... You can output the p->url conditionally, i.e. something like if ($p->title == "settings") { //href='output link to edit the page' } else { href='{$p->url}'//example, snipped code... } Maybe even assign href value to some variable. This is probably quick and dirty and there could be a better way. Untested and it is just an idea.. Now, very important. Do not edit /wire/templates-admin/topnac.inc. Instead, copy the templates-admin to your site folder. That way, PW will instead serve your site templates-admin instead of the wire one. It will also survive an upgrade... Edit: Corrected code
-
HI joey. Welcome to PW and the forums! A quick one, that's because the code generating that menu at the top outuputs those pages URLs. So clicking on setup, renders setup. Clicking on access renders that...hence, clicking on your "setttings" renders that... This is the line outputting the URLs in the file topnav.inc, specifically the $p->url echo "\n\t\t\t\t<li><a href='{$p->url}'$class>$title</a></li>";
-
@Pete: Thanks for your thoughts. @Wanze; I'll PM you later to discuss how we proceed, thanks.
- 33 replies
-
- crud
- handsontable
-
(and 3 more)
Tagged with:
-
I meant both actually - custom tables in PW DB and in external DBs. But I see your point now that I've thought about it; you are right, that should be a different module....
- 33 replies
-
- crud
- handsontable
-
(and 3 more)
Tagged with:
-
PAGES: Yes, everything is a page. There's a topic that explains this approach but I can't find it atm. A page is an abstract term; it doesn't always map 1:1 with a web (or book) page. Being abstract, it can be used for various tasks including storing data, displaying content, etc. Have a read here too. CRUD: There's Batcher (check in modules) and this current discussion GLOBAL HEADER/FOOTER: There are various approaches. One is create pages to hold the information (respectively) and call those pages in your templates. See also the PW default install template files and this topic plus this in the docs. FIELDS: Templates help group your fields together. This is a big topic. Have a read here. Note that fields are reusable and are all custom; there is no required field in ProcessWire (although each page must have a name but that is not a field you create; it comes with the system). Templates can share template files, can have their own template files or can have NO template files Confused? It all depends on what you want to achieve. See this topic and this in the docs. Bottom line; if you want a page's content to be visible in the front-end, that page must either use a template that has a template file or that page must have its content pulled into and displayed by another template file. Gotta go. Meanwhile, you could search the forums for more info as others chip in. You might want to search this forums using Google; it is better than the forum board's search
-
The folders contain images uploaded on a page. The folder names are the IDs of the pages. See the following topic for a discussion about this issue: http://processwire.com/talk/topic/992-problem-with-assetsfiles-folder/ And an empty folder cleaner http://processwire.com/talk/topic/1585-module-clean-empty-directories-from-siteassetsfiles/ http://modules.processwire.com/modules/page-clean-empty-dirs/
-
<offtopic>@Zahari, no need to apologise for having a different opinion . We can't all think the same and nobody here expects us too </offtopic>
-
RE all pages in the tree looking the same, this module Template Decorator might interest you: http://modules.processwire.com/modules/template-decorator/
-
@Wanze, Thanks. Ye, HoT it is really awesome . Yes, I am already working on a module for Handsontable but it is at a very early stage. In fact, I am basing my code on yours (Batcher). Btw, your code has taught me a lot, thanks - well-written and commented and just makes me understand PW even better. Hmm, just wondering whether it makes sense to have two separate modules or one (Batcher) to rule them all! I have been planning to have my module handle both PW and external tables (data handling on demand basically), although that could add to the complexity. Like I said in the first post, I would need help in coding the module, especially settings/configuration to allow the user to enter options offered by HoT. It's also a good learning experience for me to better understand PW. I suggest we mull this over a little and hear other thoughts as well (i.e. one module or two). ATM, I don't see any reason why these should not be combined but I would (if possible) want the ability to edit external tables. What is your opinion about this (external tables)? So, in a nutshell, yes, I'd love to collaborate with you on this but let's make a final decision once we hear what a few others have to say...just to be sure we are considering all angles
- 33 replies
-
- crud
- handsontable
-
(and 3 more)
Tagged with:
-
@All thanks! @Pete, Ye, Marcin Warpechowski has done some amazing work with HoT.
- 33 replies
-
- crud
- handsontable
-
(and 3 more)
Tagged with:
-
Having looked at several PW Admin themes, I can safely say creating a PW admin is quite "easy". It is just a page after all. I have been toying with some admin theme ideas lately (too many ideas, so little time!) but haven't finished (er, haven't started) on any of them. Down the pipeline (very long pipeline) I will do a tut on how to port different admin themes to PW. It is just a matter of outputting the content you want in the "section" you want... I'm too lazy to search atm but yeah, this topic has been discussed before. I think PW aims to remain simple to use. And because it is simple to use and build things with, stuff like admin themes can easily be built/customised by the user rather than provided in the core. Just my 2 pence