Jump to content

diogo

Moderators
  • Posts

    4,296
  • Joined

  • Last visited

  • Days Won

    79

Everything posted by diogo

  1. Is this being called by the same user? I think you can't delete yourself when logged in. Try this: //untested $the_user = $this->users->get("name=$page->name"); if ($the_user === $this->user) $session->logout(); $the_user->delete();
  2. I'm with soma here. If I wouldn't mind lots of buttons in a code editor I would be using a full featured IDE like netbeans for a long time already. Speaking of that, I really like the semantic commands in light table. You press ctrl+space, write "op"... oh "open file" is already there. You press ctrl+space, write (set)... oh "user settings" are already there.
  3. Hm, one thing doesn't have to do with another. This thread refers to a place where people can share snippets of code. On that editor you would only have the ones that are useful for you, not all of them. It's like saying that you don't need a modules repository because you can have all of them installed on your sites, no?
  4. There were more posts promoting this software on other threads, always by first time posters. It's a friendly spam, but it's still spam
  5. Vinnet, I'm sorry to interrupt your talk with anika.hanan, but I just marked that post as spam and deleted it.
  6. Like they say, with PHP you don't get inline eval, but auto-complete is also still a bit sparse.
  7. I would welcome the possibility of choosing a theme per role or user, like this we could build customized themes only for clients without worrying about a big part of the system (template editing, modules page, etc). From there, even deeper changes could be done.
  8. Interesting cross-platform solution, still in alpha http://www.lighttable.com/ (the project collectected $316,720 on a kickstarter campaign in 2012 http://www.kickstarter.com/projects/ibdknox/light-table) ------------ edit: I took some minutes to follow the getting started http://docs.lighttable.com/, and I must say I'm impressed (support for PHP is not great yet though)
  9. In the case of Nico's theme, that I still have installed on one site to see if I could get used to it (this is probably the longest that I had a theme installed on a website instead of the default), The problem is that the sidebar has two moments (menu and tree), which is pretty confusing for me, especially on smaller screens (I'm talking 15.4'', not an ipad). The content area is too small, when the tree is open, and you can't hide the menu without hiding the tree. Besides this, the items on the menu behave differently when pressed ('pages' opens the tree, while the others open their pages with a browser window refresh. Custom pages simply kill the sidebar). Phillipp addressees some of these problems pretty well in my opinion, but ...read under Bigger text and iconography are exactly what I dislike in this solution. I think the default admin makes a great job at being minimalistic (not in a trendy, but in a practical sense) and very usable. In my opinion Icons are distracting.
  10. Hm, unfortunately I'm including your theme (which I love) here:
  11. Is your map field collapsed? There is a known problem with the rendering embedded google maps when they are hidden on page load.
  12. Alessio, that's the intended behavior of filter. It changes your wireArray forever Use find() instead on your first foreach. $page->images->find("limit=4")
  13. Nice work Philipp. I like it that the tree is always present while working with pages. There were some tries to do this already, but in my opinion, none of them worked well. Are you planning to have the sidebar within each page (refreshing when the page refreshes), or to bring the pages to the content area via Ajax?
  14. I'm not sure if it's more efficient, but your variable could be also: $skiptrash = "parent!=7";
  15. I've never done this, but the first idea that comes to my mind is to create all the promotions as pages with a field for the code and another for the discount: -promotions --promo1(title, code, discount) --promo2(title, code, discount) --promo3(title, code, discount) When someone submits a code, you can look for the discount with: $discount = $pages->get("parent=/promotions/, code=$code")->discount; You can generate your dscount code with something like this http://stackoverflow.com/questions/3521621/php-code-for-generating-decent-looking-coupon-codes-mix-of-alphabets-and-number (first result on my google search), and make sure that the code is unique by turning that code into a function, and matching the result against your other discount codes: // written on the browser and not tested. might be completely wrong function generateCode(){ $chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; $res = ""; for ($i = 0; $i < 10; $i++) { $res .= $chars[mt_rand(0, strlen($chars)-1)]; } foreach (wire('pages')->get("parent=/promotions")->children as $c) { if ($c->code == $res) { $res = 0; break; } } if ($res == 0) generateCode(); return $res; }
  16. Hi Bill, You can simply add the .xml part in the name of the page. PW will accept it gladly. What I still don't understand is why you use $page->path instead of $page->url. javascript can't access your computer folders, it only works with urls... or am I missing something?
  17. You can't do this. jQuery's $() lets you select elements from your html tags. I'm not sure what you are trying to do here, but what you wrote above will look for an element with the id 'cgalleryXMLpath' <div id='cgalleryXMLpath'/> Not what you want, I presume. I also see that you are using document.write() above. Not ideal, but I'll try to ignore that, since you have all the code written already. That tells me that you are putting this script element somewhere inside the body, but you have to make sure that the variable 'cgalleryXMLpath' is set before the external javascript file is incuded.
  18. I never used apeisa's module, but I think that's the intended behavior. You can also create two trees under "home" on one install, and play with the permissions, so that one tree is shown to some users, and one tree is shown to other users.
  19. You can have two different installs that share the same core with the first option from here. But they won't share templates as you wanted. You can't share the content of the two trees, because they would be in two different databases, but you can bootstrap on installation from inside the other by bootrapping it http://processwire.com/api/include/.
  20. There is no different method. The same field can't be repeated on the same page because of how the database is built. The fieldset doesn't take any part on structuring the fields on the database, so you should consider it merely like a cosmetic thing for the admin. Right now, the only way to group fields as you want is the repeater, but I think that in your case the best would be to have independent fields like "group1_title", "group2_title" and edit their labels to read only "title". On the admin side it will be no different from your first idea.
  21. Honestly, I think it's a bit soon for considering this. I can certainly make a one to one relation with the time that I spend here helping people (two modules and one language pack are not very impressive to refer ) and the working time that I economize because I use PW and not another tool for my work. I feel that I owe so much to Ryan and to this project (community included *), that I wouldn't try to get a compensation for contributing in the present or in a near future. If someone deserves a compensation for all his time, that someone is Ryan**, and he told already that he wants to get it from his payed modules and not through donations. * I may not ask lots of questions, but I profit a lot in silence from the answers to questions that others make ** I feel that I should open an exception to refer Soma also. The work he has already done for PW is huge (https://flattr.com/profile/philipp.urlich)
  22. Help on the way https://www.google.com/search?q=processwire+error+Maximum+function+nesting+level+of+'100'+reached%2C+aborting&oq=processwire+error+Maximum+function+nesting+level+of+'100'+reached%2C+aborting&aqs=chrome..69i57j69i64.6964j0j1&sourceid=chrome&ie=UTF-8
  23. Or even better. By making it configurable, you can perfectly have a much lower default.
×
×
  • Create New...