-
Posts
4,296 -
Joined
-
Last visited
-
Days Won
79
Everything posted by diogo
-
I'm glad you will be sticking with us Here is the A-B-C: http://processwire.com/api/ http://processwire.com/talk/topic/693-small-project-walkthrough-planets/
-
@RIVO, I'm as surprised as you that you still keep coming back to ProcessWire. It really sound that this is not the tool you are looking for. That said, I will try to explain why PW is not as "usable" as others by listing some points. Flexibility (first and last point on the list)----- PW as a very well defined kind of user: coders (and willing to learn non coders) that look for extreme flexibility. The fact there there aren't many built in features makes it possible that (with some work, but not a lot) things will be exactly as you want them to be. It can seem a bit scary at first, but if you actually try to use the API you will understand how intuitive it is and how easy it is to come up with several ways of quickly building the features that you mentioned. Anyway, I can't say I agree with PW lacking those many basic features. Let's go through them one by one: There is a module for basic contact forms http://modules.processwire.com/modules/form-template-processor/. If this is too basic there's always Ryan's excellent form builder http://modules.processwire.com/modules/form-builder/ Really?? TinyMCE is exactly the same as in Wordpress and many other CMSs and there are plenty of instructions around the forum to extend it with buttons and plugins. If you prefer CKEditor (as I do) and are not able to install it, just ask in the forums, and I'm sure we will figure out what's happening. What do you mean? A frontend gallery? There are plenty javascript plugins for galleries. The advantage is that PW let's you easily use any of them. Here's is a tutorial on how to implement one of those (flexslider) http://wiki.processwire.com/index.php/Simple_Gallery_System. Please read http://processwire.com/api/multi-language-support/multi-language-urls/ Again, flexibility, flexibility, flexibility... PW will never touch your frontend code (plugins might do it, but not the CMS itself), you'll have to build the page yourself (use dreamweaver or an html template if needed), and in my opinion PW is by far the easiest and most flexible tool for doing it. Welcome to the forum
-
Very clever and useful. I'll use it for sure!
-
Did you change the default XAMPP credentials for mySQL? Does it work if you use these? $config->dbHost = 'localhost'; $config->dbName = 'change to your Db name'; $config->dbUser = 'root'; $config->dbPass = ''; $config->dbPort = '3306';
-
Hm, the logs don't help more than the first message. Check if your database credentials are correct on the /site/config.php file
-
No, the fastest way is echo '<a href="'.$pages->get(2)->url.'">this way to the admin</a>';
-
You shouldn't be changing the parents of pages like that. Use page fields to categorize the articles and you will be fine http://processwire.com/talk/topic/3579-tutorial-approaches-to-categorising-site-content/
-
Horst, look at what your pictures did to my avatar...
-
PW Best Practices: Application Structure (form handling)
diogo replied to alexeld's topic in Getting Started
Welcome to PW alexeld, PW doesn't impose any way of structuring your files, so you are free to use any way that you prefer. I think you will find this thread very clarifying http://processwire.com/talk/topic/740-a-different-way-of-using-templates-delegate-approach/ -
I don't mean that the array itself is useless, but echoing "Array" is. Like with pageArrays. the object returns an array, but echoing it turns it into a string with the page ids.
-
@xeo, what you want to do is not the intention of the module. In PW the urls follow the structure of the tree, if you would shorten your urls like you are saying, there would be problems with pages overriding other with the same name. Imagine that you have a page called "About" in the root of the website (mydomain.com/about), and you would write an article with the title "About". You would have a problem because they would share the same url. If you want to have short urls for your articles, you can put them under a parent that is on the root, and has a short name (not short title) -home --about --contacts --articles (name: a) ---article1 ---article2 This way, your article1 url would be mydomain/a/article1 If you want to have an even shorter url for the articles (avoiding urls like: mydomain/a/my-new-article-with-a-very-very-veeeeeeeeery-long-title), you can create a system that accepts their IDs on the URL (mydomain/a/123): <?php // on top of the template file of the "articles" page ("/a/") // url segments have to be activated on this template if ($input->urlSegments) { // if there are segments in the URL $id = (int)$input->urlSegment1; // get the first segment ant turn it into an integer $myURL = $pages->get("/a/")->find("id={$id}")->first()->url; // get the url of the page with the id in the segment if ($myURL && !$input->urlSegment2) { // if page exists and there's not a second segment $session->redirect($myURL); // redirect to the correct page } else { throw new PageNotFoundException(); // if not, throw a 404 } }
-
This avatars thread is turning the forum upside down. With Host's new avatar I'm too scared to come to the forum after midnight
-
Wouldn't it be $form->removeStatus(Page::statusUnpublished); instead?
-
I'm not sure what you are doing, but maybe it will work if you change $form->parent = $page; to $form->parent = $page->parent; edit: adrian was faster
-
if ($page->children->first()->parent->id === $page->get(28)->parent->id - 1)
-
if( $page === $pages->get(1) )
-
I agree that it sounds strange to upload the same image more than once to the system, but there is a gain in the way files are organized in PW. The fact that images are directly associated with pages makes it a lot easier to organize in most of the cases and more difficult that an image that is in use on the website is erased. It also makes it less probable that you have unused images wandering around because they get deleted with the page they are in. I really think it's rare that this needs to happen. If you predict that this will happen a lot, then maybe it's even good that the system forces you to organize everything in a more efficient way (not thinking of images, but of groups of images organized in special pages for them). If it will only happen once or twice, I wouldn't worry about the duplication...
-
André is very serious on that photo
-
Even for very simple changes, like correcting typos on the readme, youhave to fork the repo. This can even be done just by editing the file directly on the original github repo (I mean , on the website) This is what you will see: very handy
-
Or even: echo $pages->get(2)->name