Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/07/2015 in all areas

  1. I did another quick module, which plugs something I always kinda missed in ProcessWire. It's just a raw overview over the access management from the templates. Nothing fancy, but useful. The visible roles and the visibility of system templats can be setup in the modules settings. I'll add this to the modules directory later. But for now it would be great to hear if anyone is missing anything or if someone does have a better idea how to name the module. 12.03.15: Renamed the module and fixed wrong information for superusers and inherited rights from the required guest role. GitHub: https://github.com/LostKobrakai/ProcessAccessOverview
    10 points
  2. I'm migrating our corporate Intranet from Contenido to PW. ~8500 pages, 2 languages, 400+ users, about 20 modules and templates. I'm a little more than halfway there right now, most modules are working as planned and the first migration tests look promising, though I'm pretty sure a few headaches will be popping up when I start with bulk imports (though those won't be PW's fault...).
    7 points
  3. Processwire is a significant upgrade from WP. ProcessWire has a full and ever expanding landscape of tools that make things just work. Whomever is "forcing" them to migrate to ProcessWire is a very smart and knowledgeable manager or owner. The technical aspects of why ProcessWire is significantly better shouldn't need much work or research on anyone's behalf. We as Developers need to really believe in the web tools that we are using, otherwise what is the point? In my humble opinion, making a business or technical case for using ProcessWire is just too easy. Anyway, WP is great for Blogs --- until you have to maintain the website.
    4 points
  4. Ryan, Whatever train you are on -- don't get off. All this new stuff is great! I should just go to bed now (7:00pm here) so I can wake up at 3:00am and check all this stuff out while my kids are still asleep. Of course, that can be risky, one "this rules!" that's a little too loud and I have a one year old up several hours early. That's no picnic.
    4 points
  5. New dev branch updates for this week: Field editor now lets you target templates Optimization to field cloning Live-updated session viewing tool Session cleanup on certain Debian-based servers Configurable session fingerprints Session history from the API
    4 points
  6. I'm building a series of Process Modules for internal business functions. We have several processes that require complex forms. More than would be feasible to create using pages. So I decided to use FormBuilder to allow the appropriate users create and maintain the forms. There would be way too many fields required to send all these forms to pages using the built-in FormBuilder process. These are all lengthy forms (and this is a University), so think 10+ forms — some with up to 60 fields. Rather than save the form to a page, we hook into 'FormBuilderProcessor::saveForm' and create a page that references FormBuilder entry. (The page title is the same as the form entry, for example 1.817) I got a few tips from Ryan on that part. There is one base module called "ProcessAdminForms" that has all the common functionality. The modules that extend it can get as specific as needed. The screenshots below are from the "ProcessAdminIPIFs" module. It is an internal HR process that is required to hire a new employee or setup a new vendor. List of entries Show/hide columns (state saved per user via cookie) Viewing an entry Administrative comments & notifications
    4 points
  7. After reading Include & Bootstrap on the ProcessWire website I coded a simple shell script for outputting page informations. Here is the GitHub repository with further informations and usage instructions. Long story short, you can do things like pw get "/" which outputs this: or pw find "template=basic-page,parent=/about/,sort=-id,limit=4" id template rootParent which outputs this: I don’t know if it is in any way useful, but I think it’s a fun way to output PW content and to quickly get to page informations in a rather nerdy fashion.
    3 points
  8. The extended cheatsheet I setup quite a while ago would be perfect for those small examples for the API. Unfortunately the team refused to work on it since 1.5 year. Kinda sad as I spent many hours setting all up with workflow and such and each contributor has assigned a section. Instead they prefer to respond in the forums 100 times the same. /rant over
    2 points
  9. Exactly because I know how much Ryan is working on Processwire Core, is why I felt the documentation can be created by a team, I like the idea of a documentation team, if you got ways to execute this ideas please let me know so i can join, I can sacrifice some Skyrim time to do this.
    2 points
  10. I have to learn math for semester's finals at my university
    2 points
  11. The post count limit has been removed - the only registration requirement is that you need to create a forum account in order to post in the directory. I've also added a "Sites using ProcessWire" field as some way of us checking you use ProcessWire as well
    2 points
  12. here's a first try though untested as of yet... worked on this a bit... /** * render markup menu for bootstrap nested navigation * * @param PageArray $pa pages of the top level items * @param Page $root root page optional, if you use other root than home page (id:1) * @param string $output for returned string collection * @param integer $level internally used to count levels * @return string menu html string */ function renderChildrenOf($pa, $root = null, $output = '', $level = 0) { if(!$root) $root = wire("pages")->get(1); $output = ''; $level++; foreach($pa as $child) { $has_children = count($child->children()) ? true : false; $opening = ''; $closing = ''; if($has_children && $child === $root) { $output .= "\n\t<li><a href='{$child->url}'>{$child->title}</a></li>\n"; } if(!$has_children) { $output .= "\t<li><a href='{$child->url}'>{$child->title}</a></li>\n"; } if($has_children && $child !== $root) { if($level == 1) { $opening = "\t<li aria-haspopup='true'>\n<a href='{$child->url}'>{$child->title}</a>\n<div class='grid-container12'>\n"; $closing = "</div>\n</li>\n"; } if($level == 2) { $opening = "\n<div class=\"grid-column3\">\n<h4>{$child->title}</h4>\n<ul>\n"; $closing = "</ul>\n</div>\n"; } } $output .= $opening; // If this child is itself a parent and not the root page, then render its children in their own menu too... if($has_children && $child !== $root) { $output .= renderChildrenOf($child->children(), $root, $output, $level); } $output .= $closing; } return $output . "\n"; } it's also easier in this case to specify the outer markup and let the function do the rest.. $root = $pages->get(1); $pa = $root->children(); $pa->prepend($root); echo '<ul class="mega-menu">'; echo renderChildrenOf($pa,$root); echo '</ul>'; but probably you'll need to work on it because this really only works with that exact page tree structure..
    2 points
  13. I've been working part-time, for several months, on an administration and attendance tracking system for a local trampoline and gymnastics club where I also do a little coaching. Been trying to build this up incrementally in the form of re-usable modules and I have already released some of these (FieldtypeTime, markup crossfade & google calendar embed) but a couple of new fieldtypes and the major module - which handles club sessions, members, scheduling and attendance tracking - are still being tweaked. The system runs on the club intranet with the club administration being done via PW's admin interface and the homepage being displayed on the check-in kiosk at the front desk (a touch-enabled monitor in portrait orientation.) The athletes use the kiosk to check-in as they arrive and club information, signage and advertising can all be shown in the background on the kiosk thanks to the markup-crossfade module. Club staff can quickly and easily create new slides in the kiosk display sequence or modify what's already there (slides for fees-due, car blockages, session times etc) as well as seeing who is in attendance and for what. I don't yet have permission to post full screenshots of the athletes in public places (remember this is all internal to the club) but once I get permission I'll do a write-up of the site. In the meantime here's a few teasers. Firstly, on the check-in kiosk... ...and some from the back-end...
    2 points
  14. FieldtypeFontIconPicker Supported Icon Libraries FontAwesome 4.7.0 Uikit 3.0.34 IonicIcons 2.0.1 Cahangelog NOTE: Module store data without prefix, you need to add "prefix" when you want to show your icon on front-end, because some of front-end frameworks using font-awesome with different "prefix". Module will search site/modules/**/configs/IconPicker.*.php and site/templates/IconPicker.*.php paths for FieldtypeFontIconPicker config files. All config files need to return a PHP ARRAY like examples. Example config file : create your own icon set. File location is site/configs/IconPicker.example.php <?php namespace ProcessWire; /** * IconPicker : Custom Icons */ return [ "name" => "my-custom-icons", "title" => "My Custom Icon Set", "version" => "1.0.0", "styles" => array( wire("config")->urls->templates . "dist/css/my-custom-icons.css" ), "scripts" => array( wire("config")->urls->templates . "dist/js/my-custom-icons.js" ), "categorized" => true, "attributes" => array(), "icons" => array( "brand-icons" => array( "title" => "Brand Icons", "icons" => array( "google", "facebook", "twitter", "instagram" ) ), "flag-icons" => array( "title" => "Flag Icons", "icons" => array( "tr", "gb", "us", "it", "de", "nl", "fr" ) ) ) ]; Example config file : use existing and extend it. File location is site/configs/IconPicker.altivebir.php <?php namespace ProcessWire; /** * IconPicker : Existing & Extend */ $resource = include wire("config")->paths->siteModules . "FieldtypeFontIconPicker/configs/IconPicker.uikit.php"; $url = wire("config")->urls->templates . "dist"; $resource["scripts"] = array_merge($resource["scripts"], ["{$url}/js/Altivebir.Icon.min.js"]); $resource["icons"]["flag-icons"] = [ "title" => "Flag Icons", "icons" => array("tr", "en", "fr", "us", "it", "de") ]; $resource["icons"]["brand-icons"]["icons"] = array_merge($resource["icons"]["brand-icons"]["icons"], array( "altivebir" )); return $resource; After you add your custom config file, you will see your config file on library select box. Library Title (Location Folder Name). If your library categorized and if you have categorized icons set like uikit and fontawesome libraries, you will have category limitation options per icon field or leave it empty for allow all categories (default). Example : output if ($icon = $page->get("iconField")) { echo "<i class='prefix-{$icon}' />"; } MarkupFontIconPicker Usage // MarkupFontIconPicker::render(YourIconField=string, Options=array) echo MarkupFontIconPicker::render($page->YourIconField, [ 'prefix' => 'uk-icon-', // Icon class prefix, if you have different prefix, default is : "fa fa-" 'tag' => 'span', // Icon tag default is : "i" 'class' => 'fa-lg', // If you have extra cutom classes, for example : icons sizes, Array or Sting value 'style' => 'your custom styles if you have' // Array or String Value ]); Theme support Search support Category support
    1 point
  15. I've talked about this at various points over the past year or so and have a lot of code related to the forums software used here - Invision Power Board. What I would like to know from people is what level of interest there is in such a module. It's ideal for community-driven sites and blurs the line between site and forums. I'll admit I've gone slightly overboard with my own personal needs on one site and have a list of the following working, but not in a packaged state as of yet until I know if there is interest: Login integration (logins validated against forums, PW account created if one doesn't exist) Member bar (the one at the top of the screen here, but on your PW site) Create new posts Fetch posts from forums Reply to topics - this and the above two points allow you handle comments via forum topics instead of the Comments module - if you have privileges you can also edit and delete comments Access to all member info from the forums Latest topics list (per user-group so members don't see staff topics) Users online list Forum statistics (could be used alongside page statistics to show how many articles are on your site along with members, topics etc - you know, pointless stats that look pretty ) ...and some others I've probably forgotten I'm also interested in hearing if you would like the module to be written for other forum software as well as whether you would be happy paying for a small fee. Answers to these two questions will dictate whether I package it so it's easy to configure for other forum software as well and also whether I could afford to branch it out to other software It will have templates for some basic things too like the member bar so I just need to think of the best way to package those as well - probably have them in the module folder and moved to the templates folder during installation would be neatest.
    1 point
  16. InputfieldChosenSelect This topic (https://processwire.com/talk/topic/71-categorizingtagging-content/) showed the need for a Inputfield that would provide a real tagging UI to be useable with FieldtypePage. It uses the chosen library, which can be found here http://harvesthq.github.io/chosen/. It's meant for MultiPageFields and works kinda like asmSelect, but with a different skin. Features: Inline adding of new tags, which will then generate the corresponding pages. Sortable tags. Usage Install the Module Edit your pagefield and choose InputfieldChosenSelect as inputfield. Use Enter or Tab to create new Pages with the currently typed name. Enter will fill in the tab currently selected in the dropdown. http://modules.processwire.com/modules/inputfield-chosen-select/ https://github.com/LostKobrakai/InputfieldChosenSelect
    1 point
  17. Hi usually I don't create topics until i feel they are necessary but this is really become a chore for me in development phase, The issue is the Developer Documentation; its really hard for me to get the necessary information I need. I have to go through various topics and navigate through conversations just to find what am looking for. Just today I was looking for the API for the PageField to save a page as a value and I have no luck, I feel this can increase development time to those new to Processwire. i found out there's a site called wiki.processwire.com but it's been last updated 2012 and the cheatsheet.processwire.com doesn't go indepth enough for me to understand what's going on. ADVICE: I feel we can have a documentation page where users can edit and contribute text to it gradually, there's recipe.processwire.com but its still not enough, it would cool to have something like this http://framework.zend.com/manual/current/en/index.html Forgive my rant I come from a country where electricity is not guaranteed so its a big deal for me when I have to spend alot of time looking for information. I don't mind contributing examples or if we can find ways to allow community update the wiki.processwire.com. THANKS GUY Still looking for how to use code to save a PageFieldtype with another page
    1 point
  18. Hi Guys, So after reading multiple threads and searching for a solution required for a project, I decided to build a module to enable users to login to the CMS via their gmail account and hopefully the module can also be altered for LinkedIn and other Social accounts. Unfortunately the Facebook module does give you a Facebook ID and assigns the Facebook Role however I would like to assign the role, get the users email and create the user if its not in the system. I have basically taken the Facebook Login Module created by apeisa and manipulated the module to somewhat work with GMAIL. What it does now: It allows you to login but doesn't pull any data from GMAIL. Therefore it automatically logins in to the first account created in ProcessWire, but oddly changes the password, Im sure its due to the line of code in the module that is set to generate a random password via sha1. What I need it to do: If the user isn't in the system, get the gmail email, add the gmail email to the email field in ProcessWire, assign the gmail role or whatever role I want to auto assign it and log them in. ​My resources from Google: https://developers.google.com/accounts/docs/OAuth2 Please note, I will be updating the code as I make progress but please give input or help if you can. As always, thank you so much to everyone for their input and help, especially apeisa and craig a rodway for giving some direction initially. Here is what I have so far: <?php class GoogleLogin extends WireData implements Module, ConfigurableModule { const name = 'google-login'; //the google ID isn't used in Gmail so I am sure this will go away. const fieldName = 'google_id'; public static function getModuleInfo() { return array( "title" => "Google Login for Website", "version" => 001, "summary" => "Allows users to authenticate through their GMAIL account.", "autoload" => false ); } public function init() { } public function execute() { // Prevent association of Google Account to an existing user if ($this->user->isLoggedin()) { echo "Already logged in."; return; } $client_id = $this->googleAppId; $app_secret = $this->googleAppSecret; $redirect_uri = $this->page->httpUrl; $code = $_REQUEST["code"]; if(empty($code)) { $_SESSION['state'] = md5(uniqid(rand(), TRUE)); //CSRF protection $dialog_url = "https://accounts.google.com/o/oauth2/auth?client_id=" . $client_id . "&redirect_uri=" . $redirect_uri . "&state=" . $_SESSION['state'] . "&scope=profile email&response_type=code"; echo("<script> top.location.href='" . $dialog_url . "'</script>"); } if($_SESSION['state'] && ($_SESSION['state'] === $_REQUEST['state'])) { $token_url = "https://accounts.google.com/o/oauth2/auth/access_token?" . "client_id=" . $client_id . "&redirect_uri=" . urlencode($redirect_uri) . "&client_secret=" . $app_secret . "&code=" . $code; $response = file_get_contents($token_url); $params = null; parse_str($response, $params); $access_url = "https://accounts.google.com/o/oauth2/auth/user?access_token=" . $params['access_token']; // Add stream context $options = array('http' => array('user_agent'=> $_SERVER['HTTP_USER_AGENT'])); $context = stream_context_create($options); $ghUserData = json_decode(file_get_contents($access_url, false, $context)); $this->processLogin($ghUserData); } else { echo("The state does not match. You may be a victim of CSRF."); } } public function processLogin($ghUserData) { $id = $ghUserData->id; $u = $this->users->get("google_id=$id"); // First we create random pass to use in login $uniqid = uniqid(); $pass = sha1($uniqid . $id . $ghUserData->updated_at); // User has logged in earlier with Google id, great news let's login if ($u->id) { $u->of(false); $u->pass = $pass; $u->addRole(self::name); $u->save(); } // User has not logged in before and autogenerate is on else if (!$this->disableAutogenerate) { $name = $this->sanitizer->pageName($ghUserData->name, true); $u = $this->users->get("name=$name"); // All seems to be fine, let's create the user $u = new User; $u->name = $name; $u->google_id = $ghUserData->id; $u->pass = $pass; $u->addRole(self::name); $u->save(); } else { echo $this->renderCreateUserForm(); } $this->session->login($u->name, $pass); $p = $this->pages->get($this->redirectPage); if (!$p->id) { $p = $this->pages->get(1); } $this->session->redirect($p->httpUrl); } public function renderCreateUserForm() { } static public function getModuleConfigInputfields(Array $data) { $fields = new InputfieldWrapper(); // since this is a static function, we can't use $this->modules, so get them from the global wire() function $modules = wire('modules'); $field = $modules->get("InputfieldText"); $field->attr('name', 'googleAppId'); $field->attr('value', $data['googleAppId']); $field->label = "Google App Id"; $field->description = 'Client Id for your project. You can create one from here: https://console.developers.google.com'; $fields->add($field); $field = $modules->get("InputfieldText"); $field->attr('name', 'googleAppSecret'); $field->attr('value', $data['googleAppSecret']); $field->label = "Google App Secret"; $field->description = 'Client Secret for your project. Available in your project console here: https://console.developers.google.com'; $fields->add($field); /* $field = $modules->get("InputfieldCheckbox"); $field->attr('name', 'disableAutogenerate'); $field->attr('value', 1); $field->attr('checked', empty($data['disableAutogenerate']) ? '' : 'checked'); $field->label = "Don't set username automatically, but let the user choose username when doing the first login"; $fields->add($field); */ $field = $modules->get("InputfieldPageListSelect"); $field->attr('name', 'redirectPage'); $field->attr('value', $data['redirectPage']); $field->label = "Page where user is redirected after succesful login"; $fields->add($field); return $fields; } public function install() { $name = self::name; $fieldName = self::fieldName; $page = $this->pages->get("/$name/"); if($page->id) throw new WireException("There is already a page installed called '/$name/'"); $template = $this->templates->get($name); if($template) throw new WireException("There is already a template installed called '$name'"); $fieldgroup = $this->fieldgroups->get($name); if($fieldgroup) throw new WireException("There is already a fieldgroup installed called '$name'"); $field = $this->fields->get($fieldName); if($field) throw new WireException("There is already a field installed called '$fieldName'"); $role = $this->roles->get($name); if (!$role->id) { $this->roles->add($name); $this->message("Create role called $name"); } $fieldgroup = new Fieldgroup(); $fieldgroup->name = $name; $title = $this->fields->get('title'); if($title) $fieldgroup->add($title); $fieldgroup->save(); $template = new Template(); $template->name = $name; $template->fieldgroup = $fieldgroup; $template->allowPageNum = 1; $template->save(); $this->message("Installed template $name"); $page = new Page(); $page->template = $template; $page->parent = '/'; $page->name = $name; $page->title = "Google Login"; $page->addStatus(Page::statusHidden); $page->save(); $this->message("Installed page $page->path"); $basename = $name . ".php"; $src = $this->config->paths->SessionGoogleLogin . $basename; $dst = $this->config->paths->templates . $basename; if(@copy($src, $dst)) { $this->message("Installed template file $basename"); } else { $this->error("Templates directory is not writable so we were unable to auto-install the $basename template file."); $this->error("To complete the installation please copy $basename from $src to $dst"); } // Create hidden inputfield $input = new InputfieldText; $input->set('collapsed', Inputfield::collapsedHidden); // Create field called Google and set details and inputfield $f = new Field(); $f->type = $this->modules->get("FieldtypeText"); $f->name = $fieldName; $f->label = 'Google ID'; $f->description = 'Stores Google id for user'; $f->inputfield = $input; $f->save(); // Add the field to user fieldgroup (basically means user template in this context) $fg = $this->fieldgroups->get('user'); $fg->add($f); $fg->save(); } public function uninstall() { } }
    1 point
  19. DownloadGuard for ProcessWire About DownloadGuard This simple module was developed to give clients or users a unique download link to access file downloads you offer them. Installation & Usage 1. Place the module files in /site/modules/DownloadGuard/ 2. In your admin, click Modules > Check for new modules 3. Click "install" for __DownloadGuard__ 4. In the module Settings you can edit the default count for max downloads and the time, the download should be active. 5. During the installation a Page „Downloads“ is created in your PageTree. You can create children under this Page to make Downloads. In the children page you get your unique hash and the ability to upload your file. Todo - Let the system create the download links, for easy copy and paste. BitBucket Repository: https://bitbucket.org/m_knorr/downloadguard/overview Direct Download: https://bitbucket.org/m_knorr/downloadguard/get/master.zip
    1 point
  20. GitHub: https://github.com/owzim/FieldnameUnprefixer From the README.md: Makes it possible to access prefixed field names without the prefix. Usage Create some prefixed fields and add it to you desired template, for example prefix_myField and otherPrefix_myOtherField. Configure the prefixes, that should be removed in your /site/config.php, like so: $config->FieldnameUnprefixer = array( 'basic-page' => array('prefix_', 'otherPrefix_'), 'home' => array('prefix_', 'otherPrefix_') ); The first array keys are the template names. The Prefixes also can be assigned as a string if it's just a single one: $config->FieldnameUnprefixer = array( 'basic-page' => 'prefix_', 'home' => 'otherPrefix_' ); Now you can access the fields without the prefix, like so: echo $page->myField; echo $page->myOtherField; The unprefixed field names are now also accessible via selectors, but only for already fetched data, since the field is not really in the database: // not $pages->find('myField=something'); // but $pages->find('template.name=basic-page')->filter('myField=something'); Use case Prefixes are sometimes necessary to have fields that behave specific to the template, so you need to create a specific field and namespace it with a prefix, but don't want to access the fields differently on each template. // eeew! $client->client_address; $something->something_address; // yay! $client->address; $something->address; Might be not the ProcessWire-way because data access is abstracted, but I use it, and perhaps some of you find it useful too.
    1 point
  21. I gave you a "like" but you know what I mean - you are right. I think there are a few things like that where a truly community-wide effort might help but your particular case is something more experienced members would be better helping with - although there are simpler parts too that others could chip in with. In the case of the cheatsheet though soma, if you want to look over mine and ryan's pages that are awaiting review in the backend of the cheatsheet I would happily look over yours or we can split them somehow? There are 17 awaiting review and I don't think they would take too long to approve
    1 point
  22. On one hand I have to agree with you because all your statements are true, on the other hand I'm not so sure if these poitnts are of any interest for an editor. These are all things that are important for the admin/developer. But an editor doesn't really care if it's hard for you to develop feature x or how often you have to patch the cms because of security issues...
    1 point
  23. Btw.: A good way to find help is (at least for more advanced users) to directly look into the core files: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Fieldtype/FieldtypePage.module And I guess you can just do something like: <?php // the page containing the page field $mainPage = $pages->get('1234'); $mainPage->pagefieldName = $pages->get('4321'); // assign another page $mainPage->save(); ?>
    1 point
  24. Well I think you're right about this. In my opinion the wiki should be removed and it's helpful articles should become Tutorials in the Tutorial section (I think Joss is already working on this somehow?). I guess with 2.6 or 3.0 there will be a new complete documentation but at the moment Ryan is busy enough making ProcessWire more awesome every day Maybe there should be some kind of documentation team. Just an idea.
    1 point
  25. No js library used in frontend validation, but browsers own implementation works in most situations. Native field dependencies are available for form builder also.
    1 point
  26. it depends on what you are importing, I prefer to go the route of using PW in CLI to import contents. does Contenido allow bootstrap from CLI ?
    1 point
  27. Updated the module to incorporate an icon and settings to enable system templates, which are now hidden by default.
    1 point
  28. On the subject of subscriptions, other projects I've seen on Github that link to Stripe etc took the understandable view that subscriptions are handled slightly differently by different payment providers with some many not offering subscriptions at all, so the view on a few projects has been that the subscription should be handled by the system using the module, and payment modules are better off handling single payments. What I mean is, your PW project would keep track of the next time a customer should be charged and charge them an additional single payment. Et voila, you don't need to rely on the different implementations of subscriptions that the payment providers may or may not offer
    1 point
  29. Aye. MuchDev, are there selectors used in any of the included files. Especially ./includes/itemFunctions.inc raises my suspicions here if there is a function defined that is only used by this page. There are a few functions that appear custom ones, so that would be my next check.
    1 point
  30. I did think about this, but wanted to avoid confusion with Permissions itself. This would be more about "template access" but it would be kinda long with "overview" appended to it. You can change the visible roles in the modules settings. The guest user was not so useful for me, as only the viewable tab would be from use. All the others can't be assigned to the guest role. I did this, too, because I have used roles before to differ between different frontend-only user groups, so these roles could be excluded as well. Edit: Added the info about the settings in the intro post as well.
    1 point
  31. Interesting. How exactly were they forced to have the site converted? If they want Wordpress why not just let them have it? If they are forced to use Processwire for the reason that Processwire provides a particular feature that Wordpress doesn't then I would think the answer lies there. If there are constructive and genuine beneficial reasons for moving over to Processwire then the improvements should be naturally clear to see.
    1 point
  32. If {team->body} has hanna code formatter enabled, then it will not work as Hanna Code 1.9 does not support recursive Hanna code processing. Refer to my earlier post. Remove the {$team->body} statement from your code snippet and check the result whether it then outputs all 9 members. Once you see that working, try using the patched version of Hanna Code I submitted on Github.
    1 point
  33. I love it - very handy! Just a couple of small things. Need a nice icon for the module to show up under the Setup menu I would use the same labels as the template access tab, ie: VIEW PAGES, EDIT PAGES, CREATE PAGES, ADD CHILDREN and also in that same order.
    1 point
  34. It looks very active to me. I don't share the same thinking. Ryan did close all issues once that weren't active but I hate it when he does that. Then you look at http://processwire.com/blog/ and you're in awe.
    1 point
  35. This one is fixed now: The PW $config with recent dev versions now contains or can contain a variable logs: /*** 9. MISC ************************************************************************************/ /** * Additional core logs * * All activities from the API functions corresponding with the given log names will be logged. * Options that can be specified are: pages, fields, templates, modules * * @var array * */ $config->logs = array( 'modules', ); Per default it is set to include "modules". I have changed the croppableimage module to suppress loggin if this is enabled. If you use it with a recent dev version please update: https://github.com/horst-n/CroppableImage And I have tested it with PHP 5.3 and it works, so the requirements are updated too.
    1 point
  36. I will likely reposition a few buttons, and tweak some of the layout a little, but this is pretty close to done.
    1 point
  37. drowning in webshops - too many for my coding level
    1 point
  38. does team body have hanna code formatter enabled?
    1 point
  39. Regarding the HTTPS option: $pageData['canonical'] = preg_replace('%^http%Uis', 'https', $page->httpUrl); should be $pageData['canonical'] = preg_replace('%^https?%i', 'https', $page->httpUrl); This way the regex will capture all of the protocol string regardless of whether it is http or https at this stage. In my case I got a httpss in the resulting links from the first one as it matched the http, when the input was https. Tried a few other regexes (e.g. https?, etc.) as well which logically should've worked, but preg_replace in its true self proved to be inconsistent. Scratch that - read over the U modifier. Fix returns https for both http and https as input, so covers both eventualities in the context of where it's called in the codebase.
    1 point
  40. I'm busy with four at the moment, as part of building up my portfolio. The first is a simple site for a children's home here in SA - they urgently needed a site to bolster their online marketing. Will be live this weekend. The second is for a text-book producer and distributor in Cameroon. Their previous site was in WordPress, and was not build to perfection. The third, for which development starts today, is for a medium-sized auditing firm in Johannesburg. It's a migration from Joomla [no idea what version, but it's, dare I say, revolting - I don't know how people used the old Joomla], but there isn't a terribly large amount of content, so I'm porting it over manually, after editors have changed it up a bit. And, lastly, the fourth (brand new site) is for a diversified marine and oil gas supply and service company Nigeria. So yeah, quite a bit on my plate. Must say that I'm glad PW swooped in - it's literally taken over my business.
    1 point
  41. A website for a Swiss architect/photographer, one for a German dementia help association and one for a Portuguese small publisher (the one that published my small book ) All very simple, mainly using the core capabilities of PW.
    1 point
  42. Without looking at your code and just digging through the source it seems the error is thrown for an operator (i.e. the = or *= etc) being unrecognised. Since the function throwing the exception also has a nice debug entry it might help to run the template in debug mode and see what comes out of it. Quick glance over the code above does not flag up any major issues as far as I can see, but I'll take another look once I've drowned my brain in coffee.
    1 point
  43. Yep, FF has this too under developer tools since the last #n? major versions, but I need to click three times until I get this native tool. The other ones I use since FF before version 2 ! and I need to click only once to open it. Therefore I said / thought "something like that". But you are right @Lostkobrakai, - @pwired: you only need to open the network monitor from FFs developer tools and have a look to the response headers of your ogg-page.
    1 point
  44. In my Custom mod module (contains all the hooks that hook straight into the core, saving preventing me from modifying the core itself): wire()->addHookBefore('Session::init', $this, 'sessionInit'); # Session::init public function sessionInit() { ini_set('session.cookie_domain',".".wire()->config->httpHost); return; } Works a charm. Would be nice to have a config setting that allows cookies to be available for subdomains or not as this would make pw easier to integrate into existing projects. Although it could be argued that hacking two systems together should be made as hard as possible to stop people from trying it.
    1 point
  45. I see this approach is also loosely based on my GitHub Login "fork" of apeisas FB module Can you debug what is returned from... $ghUserData = json_decode(file_get_contents($access_url, false, $context)); ...and if $ghUserData contains the Google Mail address in the first place? That was the approach, to get a value (above its the GitHub Id) from the JSON and persist it on a certain user as a field value. Theoretically this should work as well with the email, which would then become $u->email. Also, this... // Add stream context $options = array('http' => array('user_agent'=> $_SERVER['HTTP_USER_AGENT'])); $context = stream_context_create($options); ...was somehow necessary for GH, but not in apeisas original module. It's quite interesting how often apeisas module appeared here lately. Screams for a generic OAuth2 module, doesn't it? // edit: It seems that the "grabs first user, changes their password, logs them in" phenomenon has its cause here: public function processLogin($ghUserData) { $id = $ghUserData->id; // (1) $u = $this->users->get("google_id=$id"); // (2) // First we create random pass to use in login $uniqid = uniqid(); $pass = sha1($uniqid . $id . $ghUserData->updated_at); // User has logged in earlier with Google id, great news let's login if ($u->id) { // (3) $u->of(false); $u->pass = $pass; // (4) $u->addRole(self::name); $u->save(); } Assumptions: (1) is empty/null (2) possibly translates as ->get() = ->first(), so returns first user (3) this is true, but the wrong user id (4) overwrite first users password // edit2: Your thread got me tweaking my GitHub Login module a little bit. I learned that I can only retrieve the (GitHub) user's email if its set to 'public'. Maybe thats similar in Google's API - either you aren't able to get the email at all, or it has to explicitly set as public. However, I think you have to solve said "phnomenon" first.
    1 point
  46. .hi stop and. enjoy trees two take.moment observed listens trees they listens.u 2
    1 point
  47. Hi Ryan, I just noticed the autogrow plugin isn't included with the latest CKEditor version. If I want to add the plugin back, what is the best method so it won't be overwritten on updates? Perhaps there is another method to accomplish the same thing with the new version?
    1 point
×
×
  • Create New...