-
Posts
4,296 -
Joined
-
Last visited
-
Days Won
79
Everything posted by diogo
-
[solved] moved Local-PW online: Error=Call to a member function hasRole()
diogo replied to horst's topic in General Support
This is the function that is throwing that error: /** * Is this page public and viewable by all? * * This is a state that persists regardless of user, so has nothing to do with the current user. * To be public, the page must be published and have guest view access. * * @return bool True if public, false if not * */ public function isPublic() { if($this->status >= Page::statusUnpublished) return false; $template = $this->getAccessTemplate(); if(!$template->hasRole('guest')) return false; return true; } I don't think what you are having is the intended behaviour, but try changing the status of the page before moving it. If it's unpublished, publish it. If it's published, unpublish it. One really obvious thing that you are doing wrong, is to show the raw error info at a public forum. There's a reason to it being shown only to superusers I will edit your post to remove the sensible information. -
It's good that you posted it. The title is clear, and your own answer is also. We will leave it for reference. Here is another thread that explains it http://processwire.com/talk/topic/176-fieldsetopen-fieldsettabopen-%E2%80%93-what-is-it/ I edited your post to separate the answer from the question – hope you don't mind – and marked the thread as solved.
- 3 replies
-
- 1
-
- input fields
- fields
-
(and 3 more)
Tagged with:
-
There is a very simple discussions module by Apeisa http://modules.processwire.com/modules/discussions/, and the possiblity of a IP.Board module was already discussed http://modules.processwire.com/modules/discussions/. I don't know if Peter is working on it. If you don't need anything too complex, you could also have a look at http://tal.ki/, since it looks pretty easy to integrate on your own website.
-
"north, northwest, center, etc" is perfect
-
Great! I think it could be even more complex than that. Ideally it would have these options: width height background-color (including the possibility of rgba if possible) x-position y-position Does it make sense like this?
-
Matthew, while this isn't available, have a look at https://launchpad.net/phatch (I linked to it on another post). It's a friendly and very impressive tool. There's no reason to do this manually on a bunch of photos. Here is the documentation: http://photobatch.wikidot.com/
-
Horst, would you consider adding a resize mode that adds a colored or transparent padding instead of distorting the image? Something like this:
-
Clone Fieldsets Issue? edit: fixed. Please delete...
diogo replied to Zahari M.'s topic in General Support
All post are valuable I will just mark it as solved, if that's ok for you. Since I can't mark the original post as best answer, Martijn will have the honors -
owzim, that's an old one, use the version of the module that is on github, and follow the instructions from there https://github.com/ocorreiododiogo/pw-admin-custom-pages I will remove that file from that post...
-
I run into a problem with the code that I posted above. After deleting a template via the API, I can't create a new one with the same name, and get this error message: You must save Fieldgroup 'x' before adding to Template 'x' This seems to be the same problem that Martijn had here: http://processwire.com/talk/topic/3962-you-must-save-fieldgroup-markupcsscompress-before-adding-to-template-markupcsscompress/, and modifying the code above to delete the fieldgroup with the same name as the template (besides the template itself) seems to solve the problem.
-
Quick and dirty interface to batch delete unused templates by selecting them with checkboxes: if ($input->post->submit) { foreach ($input->post as $t) { // proceed only if the input is an integer different from 0 if (!(int)$t) return; $t = $templates->get($t); $templates->delete($t); $name = $t->name; // delete the fieldgroup associated with this template. more info in the next post $fg = $fieldgroups->get($name); $fieldgroups->delete($fg); // verify that the template is not there and print the confirmation if (!$templates->get($t)) echo "<p>template {$name} was deleted.</p>"; } } else { // print the form echo "<form method='post'>"; echo "<ul>"; foreach ($templates as $t) { // name of the temlate and number of pages it uses echo "<li>" . $t->name . " (" . $t->getNumPages() . " pages)"; // include checkbox if the template is not used by pages, and set it's id as value if (!$t->getNumPages()) echo " <input type='checkbox' value='{$t->id}' name='{$t->name}'>"; echo "</li>"; } echo "</ul>"; echo "<input type='submit' value='delete these' name='submit'>"; echo "</form>"; } Edit: Added "if ($templates->get($t)))" to the "template was deleted" line. Now we are sure that it was really deleted Edit2: Edited the code based on the problem explained in the next post
-
Refreshing $page object after deleting child records
diogo replied to Peter Falkenberg Brown's topic in API & Templates
Although is true that PW keeps getting better. I think Martijn's sentence is more accurate -
What Useful Free/Cheap Tools/Software for freelancers/solopreneurs do you use?
diogo replied to einsteinsboi's topic in Pub
I didn't have a good experience at all with inDesign for this... ended up using Sigil (linked on my previous post), and correcting everything by hand on the code. -
What Useful Free/Cheap Tools/Software for freelancers/solopreneurs do you use?
diogo replied to einsteinsboi's topic in Pub
I also want to join the party Some of these I use a lot, some I just find interesting and bookmarked: http://copypastecharacter.com/ <- absolutely love it!! http://webanywhere.cs.washington.edu/ <- screen reader anywhere http://www.monstaftp.com/ <- this one is very recent, so I hope it will get better http://photobatch.stani.be/ <- for photo batch editing. website is not working right now, see here https://launchpad.net/phatch http://redpen.io/ <- very simple tool for getting feedback on designs https://draftin.com/ <- for collaborative writting. I love where they are going with this https://delicious.com/ with this chrome extension <- still use it a lot for public and private bookmarking http://codepen.io/ <-everyone knows this, right? http://color.hailpixel.com/ <- nice color picker http://tinypng.org/ <- make pngs smaller https://avocado.io/ <- for couples. use it everyday https://aerofs.com/ <- very fast file sharing http://www.justbeamit.com/ <- also for sharing files without an intermediary server https://www.hightail.com/ <- speaking of file sharing. Did you know that yousendit changed? http://www.adminer.org/ <- my favorite for managing mySQL https://code.google.com/p/sigil/ <- for making ebooks http://elementaryos.org/ <- not an app, i know... but this is my current OS http://codev.it <- for quick file editing through ftp http://flackr.github.io/circ/ IRC client for chrome https://talky.io/ very easy video conference edit: added codev to the list edit2: added CIRC edit3: added talky -
Here I have mostly vruuums and beeps, and even dling-dlongs from the church bell Edit: "Here" means Frankfurt, not Porto
-
And have you seen the posts from Horst?
-
How do make a selectbox fieldtype with static values?
diogo replied to alkahest's topic in General Support
@alkahest, as always the built-in way to do things in PW is the simplest possible: create a new page "selects" under admin (like this it will be automatically hidden from the editors), and create any new selectors and it's options under it. edit: Martijn was faster -
Where do I put functions specific to a profile?
diogo replied to alkahest's topic in General Support
I don't know why your init.php file doesn't work if it's included before all other files. Anyway, have you seen this in the config file? /** * prependTemplateFile: PHP file in /site/templates/ that will be loaded before each page's template file * * Uncomment and edit to enable. * */ // $config->prependTemplateFile = '_init.php'; -
I don't know if this will help, but can you try this $children = $page->rootParent->children("menu_name!='')->sort("sort");
-
Understood
- 11 replies
-
- experimental
- showcase
-
(and 1 more)
Tagged with:
-
Although Tumble has a great API, making it really easy to pull things to your website, personally I don't think you should do it without considering that you will lose all the social things that Tumblr has to offer. You can, of course, style the tumblr blog to fit better visually and you should definitely have, either a link back to the website, or even all the navigation on the blog.
-
Independently of this discussion, I find this a good idea.
-
Tiago, maybe you could rethink your only JS approach. I know this is an experimental website, but it would give so much more flexibility to do it in be a different way. You could for instance create all the postcards as divs (or articles in html5) and have them, already styles, in a normal posts structure. Then, with JS you would have only to pick them and put them inside the box.
- 11 replies
-
- experimental
- showcase
-
(and 1 more)
Tagged with:
-
It does distract me. I love to listen to silence when I'm focusing on it only. When I'm focusing on something else, it distracts me. I like to work with music or in a coffee place. But that's me. Maybe I am empty and never noticed it