All Activity

This stream auto-updates   

  1. Today
  2. Module

    Ok, thanks for the info.
  3. After my initial question via the contact form of the CMSCritic site in October 2016 was ignored, I asked @cmscritic again and will ask here too: Why doesn't @cmscritic cover ProcessWire 3 at all? Neither the first release of version 3 nor the latest stable version 3.0.61? For a site that calls itself: ... I find this really sad. I don't want to bash them, I would like just to know an explanation.
  4. Looks great, thanks for sharing the screenshots
  5. Thanks Zeka! This works: function qa_get_public_from_userids($userids) { global $users; $useridtopublic = $users->find('id=' . join('|', $userids))->explode('fullname', ["key" => "id"]); return $useridtopublic; }
  6. Also, there is more API-styled way to get flat array of id => name $pages->find('id=' . join('|', $userids))->explode("name", ["key" => "id"]);
  7. Module

    I am trying to make this module work, but I am stuck with this message: Uncaught ArgumentCountError: Too few arguments to function Pages2JSON::___getFields(), 0 passed in …/site/modules/Pages2JSON/Pages2JSON.module on line 182 What did I make wrong? $term = "update"; $results = array(); $limit = 3; $selector = "title*=$term, limit=$limit, template=entry"; $results = $pages->find($selector); header("Content-type: application/json"); echo $results->toJSON(); exit();
  8. You should see the details of the error when you're logged in. For instance when I <?php var_dump(wire()->users->find('id>0')); // lists all users I get an output like this object(ProcessWire\PageArray)#330 (7) { ["hooks"]=> array(2) { ["PageArray::render"]=> string(60) "MarkupPageArray->renderPageArray() in MarkupPageArray.module" ["PageArray::renderPager"]=> string(56) "MarkupPageArray->renderPager() in MarkupPageArray.module" } ["count"]=> int(2) ["items"]=> array(2) { [0]=> string(23) "/pw/access/users/admin/" [1]=> string(23) "/pw/access/users/guest/" } ["total"]=> int(2) ["start"]=> int(0) ["limit"]=> int(0) ["selectors"]=> string(45) "id>0, sort=sort, parent_id=29, templates_id=3" }
  9. $userlist is not an array - at least my version via $users-> and global. var_dump($userlist) produces a server error. echo $userlist displays a piped string of ids. I can't get wire() to work in the external script. In which file should I add 'namespace ProcessWire'? The function is in another script that bootstraps PW by including the index. Shouldn't that be enough? The var_dump(wire()->users->find('id>0')) results do not look like anything my script could use. Is there no simple way to convert a piped string into an array?
  10. Do you have namespace <?php namespace ProcessWire; declared on top of your files? What shows up when you var_dump($userlist) inside the function?
  11. Great additions, @tpr !! The translation workaround can be also useful when you're creating a site that initially isn't multilanguage, but will be in the future, so you can add the translations strings even if the backend doesn't have the multilanguage modules setup yet.
  12. I keep getting 'PHP Fatal error: Call to undefined function wire() ...', with or without '$config->useFunctionsAPI = true;' in the config.php This version had no error, but returns an empty (0/null) array: I have been trying variations of this for the last two days, going in circles. I have a custom field 'fullname', so ignore that, could be 'name' instead. Will try again later... I'd like to try array_combine or something like that. I'd need two valid arrays. var_dump($userids) returns a healthy looking array. Getting that second array of fullnames is my problem. Or would it work if I can get wire() to work? $userlist is not an array, so that foreach can never work?
  13. I came up with this idea for amigo.today. It's something like tinder, but for social events. User provides age and city name during sign-up, the I'm using Google API to set geolocation based on the city name/street (that can be updated later in profile). There is also age filter (max difference in age), and gender is mixed to not making it dating site. Every event last max for 7 days, after that they vanish. Users can join events, and after that they can review amigo. More recomendations results in bigger green recomendation bar. Leaving opinion without recomendation result in excluding user both ways (they can't see each other events). If there is no events you can always search by tags on the left side (categories) for last active user in that category (created/joined event in that category) and contact that person (and.. messaging system is not yet perfect). Events wall. Event page. It's not yet ready. I'm not skilled enough to finish this. I'd be happy if someone would like to join this project. Thanks!
  14. @SamC, I'm using Processwire with INFINITE AJAX SCROLL + semantic-ui. Messaging system is not yet working as I'd like it. I came up with this idea for amigo.today. It's something like tinder, but for social events. User provides age and city name during sign-up, the I'm using Google API to set geolocation based on the city name/street (that can be updated later in profile). There is also age filter (max difference in age), and gender is mixed to not making it dating site. Every event last max for 7 days, after that they vanish. Users can join events, and after that they can review amigo. More recomendations results in bigger green recomendation bar. Leaving opinion without recomendation result in excluding user both ways (they can't see each other events). If there is no events you can always search by tags on the left side (categories) for last active user in that category (created/joined event in that category) and contact that person (and.. messaging system is not yet perfect). Events wall. Event page, host on the left, on the right side participients (1). It looks simple, and works on mobile too.
  15. Hi @Publisher-in-Chief, Welcome to the forums! The link @abdus posted contains an example usage which displays the contents of an rss feed. Copy that example into your template file. Replace the example URL with the one you want to use. View the page. Additional information on usage can be found under the More Details section of that post. Let us know if you need help with what you want to accomplish.
  16. Can it be done? Absolutely. Is this an ideal first PW project? Hmmm... $64,000 question. It really depends on your level of front end development experience. I don't even say PHP here because you could use almost any front end - I assume nodebb uses node.js and AFAIK there isn't anything to stop you doing that if you really wanted to (but you'd really have to want to) and just use PHP for template files. My thoughts - Front end member registration, password retrieval, etc. Absolutely - simple (and not so simple) forms are easy with just html - no need for the API - just always use sanitizer. (There are a couple of modules for emailing users and forcing new passwords that might help, however.) Front end thread creation by all members (I assume each new thread would be a separate "page") <?php if($user->hasRole('member')){ echo "<form class='createNewThread'>.....</form>"; } You'll need to expand on the <form>, and server side check $user->hasRole() again for security, but that's pretty much all there is to it. Front end member profile editing See my answer re registration. Picture upload required to create each new thread This works lovely with PW (I'm just using it on a project.), for example. Handling the PW side is made much easier by reference to Soma's gist (which has become the de facto method as far as I'm concerned, at least). (Bonus hint - loads of other good stuff there, too.) Picture upload optional on all subsequent comments inside a thread See above. Front end post and comment uploads restricted to images only – .jpg, .gif, .png Because code referred to above uses WireUpload class, that's easy. Appropriate security to prevent uploading malicious files disguised as images See above, but with any security issue, take care. Optional tagging of each thread as it's being created Just search the forum/modules directory. Automatic SEF urls created based on the thread title ( e.g. http://site.com/forum/title-of-my-thread-12345 -or- http://site.com/forum/12345/this-is-title-of-my-thread ) Already built-in, as others have said. Sitewide search feature You'll need to roll your own, but it's not hard. The search page from Ryan's skyscrapers profile is a good source of ideas. I know much of the above duplicates what others have said, but it surely doesn't hurt to have a bit of confirmation.
  17. Thanks, I have read the support page and installed the module. This is all the support page provides: INSTALLATION The MarkupLoadRSS module installs in the same way as all PW modules: 1. Copy the MarkupLoadRSS.module file to your /site/modules/ directory. 2. Login to ProcessWire admin, click 'Modules' and 'Check for New Modules'. 3. Click 'Install' next to the Markup Load RSS module. --------------------------------------------------------------------------------- It only instructs how to install the module. But no tutorial on how to set it up. I would like instructions how to open a rss feed and display it on a page. Thanks.
  18. Hi @Tyssen, Thanks for your interest in Media Manager. No, not at the moment. The module creates its own fields for the 4 media types (audio, document, image and media). Each media item is a hidden page in the admin under respective media manager parent pages. I have been mulling adding this type of scanning functionality but haven't made a decision yet. Having said that, the module can currently scan /site/assets/MediaManager/uploads/ Please let me know if I can be of further help.
  19. Thank You horst, it works! Until now I'm not so familiar with namespaces - the man grows with its tasks...
  20. It seems to be wrong as you call wire() in the global namespace, but you must call it in ProcessWire namespace. What you do is calling \wire(), but it must be ProcessWire\wire(), what would be really weird to add it with every call to a PW function (in a PW programm). Best way would be to add the namespace on top of each *.php file in your template system, (template file, view files, snippet files, ...): <?php namespace ProcessWire; Than it should be valid and functional.
  21. Advanced mode is mostly meant to be toggled on just to edit the named settings and disabling it again (or at least for the live version).
  22. Hi, I have such a structure in my template folder (ProcessWire 3.0.58): main.php // the template file views/ views/snippets/ In the main.php I include a php-file from the "views"-folder. In this included file are sometimes also files from the "snippets"-folder included. So far, so good:-) But sometimes, after changing und saving a file in the "snippets"-folder, the following error occurs: Fatal error: Call to undefined function wire() in /site/assets/cache/FileCompiler/views/snippets/the_included_file.snippet.php on line 3 But there ist no wrong code. Also changing the file (for example comment out the complete code) does'nt effect something, the error is still the same. Only the manually empty of the "caches"-table in the database fixes the problem and the code runs correctly again. Can someone help me with this? Thank You, regards Sebastian
  23. Since the module hooks into Pages::saveReady and Pages::saveFieldReady, it should be called whenever $somePage->save() function is called and a change to DB is necessary.
  24. Hi @Robin S, I'd like to know if this modules works with API calls, or just within the admin page? Assuming I have a properly setup pages called cards and members that reference each other, and I write something like: $member = $pages->get(123); $card = $pages->get(456); $card->members->add($member); $card->save(); echo $member->card->title; Should I expect the code to output the card's title? I actually tried it out and it didn't work. But maybe I'm just doing something wrong. The fields work okay when setting them using the page editor. Thanks.
  25. It's done. I've considered the options and with @LostKobrakai's advice added beforeCmd config option allowing to run specified command after PW installation but before test suite execution. See more https://github.com/uiii/tense#beforecmd. Currently on master branch only.
  26. I just had this issue, the problem was caused by a full hard drive.
  1. Load more activity