-
Posts
11,175 -
Joined
-
Last visited
-
Days Won
371
Everything posted by adrian
-
drag and drop fields in a template does nothing?
adrian replied to gyaani's topic in Getting Started
Hi gyanni and welcome to PW! You can echo out any field that is available in the template that is assigned to the page you are viewing, just like in your example. Drag and drop sorting of the fields in the template changes the order that the fields will appear in when editing any pages that have that template assigned to them. Does that make sense? -
Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)
adrian replied to ryan's topic in Modules/Plugins
Hey Pierre-Luc, There is actually a note about https on github: https://github.com/ryancramerdesign/TextformatterVideoEmbed/pull/3 Perhaps you should add to that issue, or start a new one. That will be the easiest way for Ryan to track the problem. -
Glad you got it all working as you wanted. Remember we are all learning everyday, whether it is something new in PW or learning something else in another code language that I haven't needed to do before. It's part of the fun and the frustration
-
I don't think I completely follow - if you are on a page with a single blog post, then $page should refer to that one post. I am not sure why you are selecting the children of the page. However, if you are on a parent blog page showing more than one post, then you'd need to limit your selector to each specific post. If neither of those make sense for what you're trying to do, you could get really ugly and populate an array inside your foreach and only echo the author if it is not already in the array: $authors = array(); foreach ($page->children->find('author!=""') as $child) { if(!in_array($child->author->title, $authors)){ echo $child->author->title; } $authors[] = $child->author->title; } But you really shouldn't have to do that - I think you just need to get your selector specific to your post.
-
Are you talking about articles that are rendering at the moment you want to query this, or just all the articles that have the currently viewed video selected in the video page field on the article's page? I am still not convinced I know what you want - sorry, but if the latter, then something like this would do it: foreach($pages->get("template=articles,video=$video_id") as $article){ echo "<li>{$article->title}</li>"; }
-
If I am understanding you correctly (which I am not sure I am), then I don't think pageStack is going to help you here. From your video page you need to do a search through the page field that is in your articles template and look references to the video that is currently being displayed. Does that sound right?
-
Sorry, the lowercase 's' was my bad!
-
Ok, here it is: Modules Directory: http://modules.processwire.com/modules/process404-search/ Github: https://github.com/adrianbj/Process404Search Includes a small tweak to also convert dashes and underscores to "+" which should improve search results.
-
No problem, Having given you those commands, please remember that permissions are not the only thing that must be considered. You must also take into account the owner/group of the files, which is why some web hosts will need different permissions to others for things to work as expected. The typical setup however works with the 755/644 that you are used to seeing. This is a reasonably decent writeup of things if you are interested in a read: http://www.linux.com/learn/tutorials/309527-understanding-linux-file-permissions
- 7 replies
-
- 1
-
-
- htaccess
- permissions
-
(and 1 more)
Tagged with:
-
I have been using this for a while now and it is incredibly useful. They have also just released a beta version which is so clean I am sure there are other tools out there like it, but this one has made my life so much easier many times. http://json.parser.online.fr/beta/ Be sure to check all the options under the settings cog!
-
Thanks to Craig (http://processwire.com/talk/topic/5770-processwire-website-css-issue/?p=56336), the Chevron fix is: .subnav li a { background-repeat: no-repeat; }
-
Good spotting on the solution though. I can confirm that: background-repeat: no-repeat; does indeed fix the problem. Ryan, Pete - anyone like to take care of this?
-
Thanks Craig - already reported and discussed here: http://processwire.com/talk/topic/5718-new-logo/?p=55866
-
644 is standard for files on most server configurations. I am curious why they ended up as 600 in the first place though? In case you don't know, and you have terminal access, this will recursively set all files to 644: find . -type f -print0 | xargs -0 chmod 644 and if you ever need to do any changes to just folders, this will do the trick: find . -type d -print0 | xargs -0 chmod 755
- 7 replies
-
- 1
-
-
- htaccess
- permissions
-
(and 1 more)
Tagged with:
-
Any thoughts on whether this should be released as a module in the directory? I am thinking that I will start using it on all sites now. I can't see any negatives with the way it is working now. Obviously I'd prefer a one click install, but can't see a way around having to add that one snippet to the search.php file. Anyone have any strong thoughts one way or the other?
-
Forgot to mention, in case you don't know you can send your own variables, arrays to the template file using render. eg: echo $pages->get(1169)->render('./lib/markup/foundation/pages/pg_Video_Element.php', array('myVar' => $myVar, 'myArray' => $myArray); Then retrieve them in your pg_Video_Element.php with $options['myVar'];
-
I would try again with the 2.4 htaccess file, but take a look at the RewriteBase setting in the 2.3 version that is working and copy that across.
- 7 replies
-
- htaccess
- permissions
-
(and 1 more)
Tagged with:
-
Hi Zahari, I haven't used pagestack before, but from what I just read, you don't send it with the render call. You would use: $options['pagestack'] in your pg_Video_Element.php template file. It is an array of the pages that rendered the template so you would foreach through: $options['pagestack'] to get the article page. Let me know if that works. Maybe I should go test it too
-
As Jeff pointed out, your example should work as coded. However I am thinking from your example that you don't actually want the repeater id, but an auto-incrementing number starting at 1. Is that right? If so, simply define: $i=1 before the foreach starts and then $++ just before the loop closes. Then use the $i instead of $item->id Does that help?
-
tiptronic, The way of installing admin themes changed drastically in PW 2.4 which hasn't been out very long. I would recommend that at the moment you steer clear of alternate admin themes until we have some new ones designed for 2.4 - I know there is one very close to being ready. So, try the modules manager for installing other cool modules - lots of great tools to try: http://modules.processwire.com/modules/?sort=-likes (here are the most popular ones on top), or just sort by likes in the modules manager itself Is there any functionality in particular that we can help you with?
-
On 5.2.17: http://processwire.com/talk/topic/5543-processwire-24-possible-to-run-on-php-533/?p=54099
-
If you add this line at the end of the array in public static function getModuleInfo() { 'permission' => 'page-view' it will give your other users access. You could even give it a new custom permission, like: 'permission' => 'analytics-view' then create that permission and assign it to the role of the users you want to allow access to. Of course these options are hacking the module core code and so hopefully Luis will reply soon with something along these lines. Hope that helps in the meantime.
-
One of these should get you going: http://modules.processwire.com/modules/page-edit-per-user/ http://modules.processwire.com/modules/page-edit-field-permission/ http://modules.processwire.com/modules/custom-page-roles/
-
Ah yes, the client who can't remember a password - I am sure they will be a ancient relic sometime soon, but still. Passwords that is, not clients I have had pretty good luck with environmental scientists and Pydio/Ajaxplorer over the years, and they are usually my benchmark for the bottom end on the tech scale.
-
Hey Joss, Did you find the share option in Pydio? It is awesome - you can right click on a file (zip if you like) and share it with a unique url which gives them a one click download - no password required. I have Pydio hooked into a parent folder that is above web root so the files are not directly accessible, but I can still map the folder as a drive (SMB etc), so we have multiple ways to access the same stuff. You can set up user accounts with all sorts of access levels. It's not perfectly bug free, but it is still the best tool I have found that allows me to manage our own server and still share files very easily.