-
Posts
10,902 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
$users->setCurrentUser() does not give desired result
adrian replied to Harmster's topic in API & Templates
Does this code from Nik help? https://processwire.com/talk/topic/1901-possibility-to-login-user-through-api-without-knowing-password/#entry21465 -
There are other libraries, but this one is pretty powerful: phpexcel.codeplex.com Moved to here https://github.com/PHPOffice/PHPExcel I have used it to generate excel files from PW. Cool thing is that it also allows you to automatically generate charts from the data.
-
Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)
adrian replied to ryan's topic in Modules/Plugins
You can use Video embed for YouTube/Vimeo and GetVideoThumbs together without any problems. Are you having issues? -
No worries - I haven't revisited this one in a while, so please let me know if you think of any improvements. I know the soma is not keen on the fact that currently you can't reuse templates as each new page field creates a new paired set of parent/child templates. So maybe I should aim to add an option for that, but I am definitely curious to hear your feedback.
-
There is an option in the module config settings for that - it's called Redirect Type: Redirect vs Load. You'll want the load option. Just an FYI - the modules automatically adds a canonical link to the full url to help search engines.
-
Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)
adrian replied to ryan's topic in Modules/Plugins
This module will get the thumbnails for you automatically: http://modules.processwire.com/modules/process-get-video-thumbs/ -
horst - just a quick question - what about the versions of the imagick extension - are they both the same or at least both recent? The only other time I have come across colors being too bright in IM is with conversion from PDF. I really doubt it is related to the problem you are having, but it might be worth comparing the delegates.xml files between the two installations to see if there are any differences. Here is an explanation for fix for that particular issue: http://www.lassosoft.com/CMYK-Colour-Matching-with-ImageMagick Maybe it will be a lead in the right direction, even if it's not the exact problem you are having. The other things I can think of that might be worth a look is setColorspace vs setImageColorspace Also in my experience with images from PDFs I had to set the colorspace before reading the image. Maybe not an issue with ordinary images, but maybe worth investigating?
-
Looks like Angular might start making use of polymer elements, which would be really cool. Ember might be getting involved too. So much cool stuff happening - hard to decide which way to go. Throw Meteor in the mix as well and app development is starting to get really fun
-
Accessing module config fields values
adrian replied to rusjoan's topic in Module/Plugin Development
Hi rusjoan, Sorry you're having a bad experience at the moment, but I don't think it helps to get angry at PW. Just having a quick look, I see a couple of issues with your code. $config->paths will be empty because when you're inside a function you need to use wire('config') or $this->config depending on how you are using it in the module. This is because of PHP variable scope - there are lots of posts about this. Same goes for your use of $user and $input->get Try fixing those and see where you are at. I think there are probably more things amiss, but let us know what happens with those changes first. If you are calling the module on a use specific basis in your templates, which I think is what you are doing, then autoload false makes sense. -
You can definitely foreach over an array - no need to use implode. Implode is usually reserved for when you want to convert an array into a string with a particular separator between each item in the array - you could still use foreach for this as well - it's a matter of choosing the cleanest, most efficient and readable option in the given situation. If you are having trouble with the foreach, show us your code.
-
Hey diogo - thanks for the clipmenu link - that looks pretty cool - I might be able to retire jumpcut finally An alternative to unarchiver that you might find worth a look is keka (http://www.kekaosx.com/)
-
Does this do what you are looking for? http://modules.processwire.com/modules/process-redirect-ids/
-
Hey Ryan - I actually get this is some cases and not others: Not sure why - not a big deal. I thought as much - just thought maybe you could store an array matching values to the variables and replace them on display. Again, no big deal - much more important things to do
-
You can either foreach through the field: foreach($page->select_field as $selected){ echo $selected->title . '<br />'; } or implode: $page->select_field->implode("<br />", "title"); https://code.google.com/p/jquery-asmselect/issues/detail?id=46
-
I wish you could extend me - might be preferable to a clone (that would just be scary). Too much work, not enough sleep, don't know what task to tackle next.
-
You still need to add a ->url after that. At the moment you are referencing the entire article_secondimage. You need to add the url property. Other options include, filename, description, ext etc.
-
Well you have to remove it from the template, then you can delete the actual field. Not exactly related, but if you want to delete a template - you need to remove it from any pages that have it assigned. The trash will come into play in this case - you'll need to remove the page from the trash before you can delete the template.
-
One template doesn't recognise any paths, but one works fine
adrian replied to JohnHalsey's topic in General Support
And I blindly copied you! Last time I do that -
You are looking for: foreach ($settings->music as $piece) { echo "<audio src='$piece->song->url'></audio>"; } There is no "path" for a single file - take a look in the cheatsheet.
-
One template doesn't recognise any paths, but one works fine
adrian replied to JohnHalsey's topic in General Support
Do you have PW installed in a subdirectory of your html/www root? If so, then /site etc won't work either. You really should be using: <link rel="stylesheet" href="<?php echo $config->urls->templates?>/styles/site.css"> like Martijn suggested. -
Hi Joe, This is a mysql setting - there is a discussion about it here: https://processwire.com/talk/topic/3426-search-not-returning-3-letter-words/ Obviously that discussion is about PW searches and not forum searches, but it will explain what is going on. Regardless the forum search mechanism is terrible anyway and most of us here use google: site:processwire.com/talk php version
-
Yeah, I don't understand that selector. Maybe it's just too early here, but you can't use "field" in a selector like that. I might well be not understanding, but is this what you are looking for: foreach($pages->find("template=product") as $p){ echo $p->prod_calc_a1; echo $p->prod_calc_a2; echo $p->prod_calc_a3; echo $p->prod_calc_a4; echo $p->prod_calc_a5; echo $p->prod_calc_a6; } or are you trying to limit the find to specific values for each of these fields?
-
I fixed the mis-matched single/double quote. Weird it's not working for you. Are you using Nik's Selector Test? It won't work in there.