Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/18/2015 in all areas

  1. Ok, module has been renamed to Module Toolkit and can now be considered in beta. In addition to the new functionality noted in the second post, there has been lots of cleanup and one new feature - if you are also running Ryan's ProcessWireUpgrade module, there will be a new button on that module called "Batch Upgrade Modules" that will bring you directly to this module's Upgrade page where you can confirm which modules to upgrade and do them all with one click! I know that there likely is still some needed improvements in error checking and reporting, but otherwise I think all functionality is working well! If you have a chance please test and let me know of any issues you come across.
    7 points
  2. Hi, first of all I'd like to thank you all, and in particular Ryan, for this great project which is ProcessWire. I'm using ProcessWire for the first time and frankly I'm finding it quite good, despite my lack of experience. Anyway, I created this post to introduce you the following module, on which we are working, and I'd like to share it with the community which could benefit from it and maybe improve it. You can find the module here: https://bitbucket.org/mauro_mascia/processwire-social-login/ Basically, it adds the ability to allow a social login (using the HybridAuth library - https://github.com/hybridauth/hybridauth) as well as a standard login, user profile and registration. The module is clearly not complete and it is at its first stage of maturity and I hope you can forgive me if I have not fully complied with the PW best practices
    5 points
  3. First make sure you are using at least PHP 5.3.8
    3 points
  4. yes, the helloworld tutorial is a good starting point! thereafter you can easily setup a kind of "sub-template-system" (how you call it) like this: this is the "default intermediate edition" profile - just install this on your dev-environment and read the files _main.php, _init.php and basic-page.php and you will understand how easy it is to setup very flexible and custom things with processwire! also welcome to the forum ps: actually you would only have to append "<?php" on top of _init.php and all your template files - everything else is ready to use!
    3 points
  5. This looks like a great timesaver! Thanks for creating this module. I will try it next week. One minor feature I would like to see added: As I often use forks of modules or custom modules or which are not in the modules directory it would be great if the "list of modules to install" could also contain links to zip files. But also without this addition I think this module will be my new favorite way to install modules when setting up a new site.
    2 points
  6. The module is now fully functional again and its version number is set to 2.0.0, because it was a full rewrite. Finally it supports all sorts of crops again: cropExtra what is needed by CroppingTools north - south west | east And by x/y params and centered of course too. I updated the first post here in the thread, where yo can find the links to Github and the modules directory.
    2 points
  7. This seems to gain some traction, great job @marcus
    2 points
  8. Just a note that complex reporting seems to be a weak spot performance-wise in PW based on this anecdote.
    2 points
  9. Tell a bit more about your aplication so we can give some more help. If your application sends email than Form Builder is the way to go for sure. And you should get Form Builder anyway. I am getting my copy of a developer version this week. It is great! Edit: Got it!
    2 points
  10. As it is your first appearence in the forums, bluerobsn (greetings, by the way ), I suggest you may be new to the way PW works in general and its terminology. So maybe you are asking about very different thing. If it is not the case, sorry. Just ignore everything below. In Processwire all data from all pages is accessible via api from each template file. So you can get content from any page from any other page and use it there. Just get your head around all this, go through a tutorial or two and it'll make sense.
    2 points
  11. I've just started a new project and decided to test/use Wireshell. After I had successfully created a new project I missed the opportunity to download modules. You've received a new pull request. Maybe you have some time to test (and hopefully implement) it.
    2 points
  12. Hi everyone, Just added some new features (not in the repo just yet), but wanted to get some feedback on a new name for the module. It still functions as a way to migrate modules and their settings from one PW install to another, but now also includes: batch download and install modules from a list of class names entered in a textarea field batch module updating Name ideas: ModulesManager wouldn't be bad, but already taken ModulesMigratorInstallerUpdater would be the most accurate, but obviously ugly ModulesInstaller is OK, but doesn't cover everything ModulesHelper ? ModulesToolkit ? Free like for any suggestions Here are some screenshots for inspiration: THE OPTIONS EXPORTING INSTALLING (FROM MIGRATED ZIP) INSTALLING (FROM LIST OF CLASSNAMES) BATCH UPDATING MODULES WITH AVAILABLE UPDATES
    2 points
  13. https://github.com/adrianbj/ProcessModuleToolkit It allows bulk automated migration installation and upgrading of modules (and their config settings) from one PW install to another, so it should be very handy in setting up new sites with your standard collection of favorite modules and settings. Allows includes batch installing by a list of module class names. Go to the Setup > Module Toolkit and follow the prompts. During the import, you can choose which modules from the collection to import. You can optionally import the module config settings from the source install. The one caveat is if a particular setting includes a reference to a page, template, or field ID, it won't work, but you can easily update this setting on the destination install. Batch install new modules directly from the modules directory with a list of module classnames or URLs to module zip files. You can optionally, automatically update all of the imported modules (if they are in the ProcessWire modules directory) to their latest available versions. It copies the module files so you can use it to migrate modules that are not available in the PW modules directory, or on Github. Great for all those custom helper modules you've created. Full restore feature in case something goes wrong / you change your mind. I maintain a dedicated test PW install for installing and configuring modules which I can then export for use in my projects using this tool. Please test and let me know what you think!
    1 point
  14. Thanks, I already use sorting, but this is not reliable enough, since I would have to make sure that that items with type one come before items with type two. And if I want to, for whatever reason make two the prio type and one the fallback else where I would have to resort. Is there another way to mimic the WireData behavior? Hmm, I might just as well wrap the additional logic I wanted to prevent in a method and hook it into WireArray and be done with it
    1 point
  15. WireData::get simply explodes given string from "|", iterates found keys, and compares them one by one to existing items. In the case of WireArray::get the argument is used as an actual selector string, which means that in your first example there you're asking for all items with type "one" or "two", and the rest depends on sort settings. You might be able to use "sort" to do what you're describing here, though it really depends on your actual use case
    1 point
  16. YEAH!!! Thanks a lot. Now everythings works well! BTW. The second option didn't work. Perhaps because the lines above still redirect the non-www to the www url ... Thanks a lot and a nice day!
    1 point
  17. Just found this: http://www.ubtutorials.com/tutorial/1124/how-install-processwire-ubuntu-vps
    1 point
  18. I edited some module posts and added the module tag. I hope other module authors will see this and adapt it themselves now
    1 point
  19. So I seriously think LightWire should be the default CKE skin.
    1 point
  20. Numbers preceded by a 0 are parsed by php as octal numbers (base 8). var_dump(013); // outputs int(11), because it's 1*8 + 3
    1 point
  21. Ok here we are - fixed version number. Thanks cstevensjr, done. @BernhardB - don't worry APP ID/Secret are fakes
    1 point
  22. Go to the "More Reply Options" button (which is to the right of the Post button)
    1 point
  23. Thanks dudes. I've fixed the version number. Now a couple of informations: in the providers config file can be specified all providers supported by HybridAuth. For now we have enabled and tested just Facebook and Twitter, and enabled Google but not tested yet (but if it works for "i" and i+1 it should work also for i+N). Each provider will be shown as collapsed fieldset, if not enabled, to save space. Attached, there is a picture of this. This configuration file is used for: create the module edit section (as shown in the above picture) show enabled providers in the login form (see) retrieve info to be processed when the user is doing a login with a certain provider (see) Naturally more providers can be added, following the structure of the returned array.
    1 point
  24. Ok. Perhaps that info should be mentioned somewhere ... Now that i know these issue i can either use a subdomain for developing or do the redirects later on the live server. So no problem! Thanks for your help and the great module!!!
    1 point
  25. Yeah I think you should start with the tutorial and then you come back and will realize how easy it is to do this with processwire (and maybe that my post above isn't that wrong)
    1 point
  26. If your hoster allows it you can even use something like: <?php // fetch the json displayed on the service page $dataJson = file_get_contents('http://url.com/service-page/'); // transform it into a php array $data = json_decode(dataJson, true); ?> If this shouldn't work you can use file_get_contents_curl (not default PHP function but you can find it here: http://stackoverflow.com/a/8543512/4044167) instead of file_get_contents()
    1 point
  27. @triples When you edit a page, go to the "Settings" tab and under "Templates" change "Home page" for whatever other option there is. The following pages are using these templates: About -> "Basic page" Features -> "Basic page" Services -> "Basic Page with Sidebar items" Contact us -> "Contact us page" You can of course also still use "Home page" and replace the content of the home.php template file with the content of another template file, if you want the homepage to be a little different for exemple. This profile uses a "delegate approach".
    1 point
  28. Hi Gayan Thank you for taking the time to write this site profile - I like it a lot. For my site, the Blue-VR homepage is a lot more than I need, but the rest of the pages are idea. Please how do I make the homepage look like the rest of pages across the site? Kind regards, Luke (Derby, UK)
    1 point
  29. There's no need to justify why a module exists. It's always nice to have options, even if they solve the same thing in different ways.
    1 point
  30. 1 point
  31. Like I mentioned in another topic I'm working on a theming system for Processwire. Today I finished a huge step in the right direction: A theme switcher. How does it work It's really easy. Frontend Themes are modules, (I added two testing Themes to the attachment), which only contain the module information (version, author, name, ...). They are based on a module called "WireThemes" which is included, too. WireThemes is the main controlling class. It rewrites the path of "$config->paths->templates" and "$config->urls->templates" which afterwards pointing to the folder of your Theme and contains the installing and uninstalling methods. What I'm still working on ProcessWire's great strength - but in case of theming a big complication - is that you have to/can create fields by yourself. So it's hard to create a theme which fit's on every system. That's why I'm still brainstorming how to make this easier. Possible solutions I see at the moment are: Creating a site profile with the most used fields Creating a json file for ProcessMigrator Hoping that the 2.5 default site profile includes the most used fields so I wouldn't have to change something ... Please try it and tell me about any problems. And if you have additional ideas this is the right place to write about them. Download: https://github.com/NicoKnoll/WireThemes
    1 point
  32. Oh yes - Ryans post screams to be put on a subsite like processwire.com/philosophy.
    1 point
  33. I've updated renderList to include the pagerOptions here too in the dev branch. I've got to be honest and say that arrays in GET vars have always bothered me. They are so darn verbose and ugly. Why have a query string like this: var[]=1&var[]=2&var[]=3 When you can do this: var=1,2,3 All it takes is encoding your array like this: $input->whitelist('var', implode(',', $var)); and decoding it like this: $var = explode(',', $input->get->var); That's just my preference anyway, but not suggesting it should be anyone else's unless these things also keep you up at night.
    1 point
  34. After Ryan's latest incarnation of Blog Profile I wanted to see if I could learn something from there to my own workflow. It turned out very nicely and this seems like a perfect template approach for me. Wanted to share it with you guys. Folder structure under templates folder: templates/markup/ templates/markup/helpers/ templates/markup/layouts/ templates/scripts/ templates/styles/ And it all begins from here: templates/markup/index.php -this is the "complete" html file, it has doctype, head and starting and ending body. There is very little "logic" here, it's more like a container. There is one very important code snippet there though: <?php if ($page->layout) { include("./markup/layouts/{$page->layout}.php"); } else { include("./markup/layouts/default.php"); } ?> Code above goes between header and footer of your site, that will be the main content. I call it layout, but the better name would be "content layout" or "inner layout" or something like that. Then the templates/markup/layouts/ folder will keep at least default.php file, but probably few others, like "threeColumns.php", "frontpage.php", "gallery.php" etc.. you got the idea. Each of the actual pw template files are then purely "controllers" - no actual markup generated there. All markup are done in files inside templates/markup/ folder and it's subfolders. This is how template file templates/home.php on one site I am building right now looks like: <?php // Carousel items $t = new TemplateFile(wire('config')->paths->templates . 'markup/helpers/carousel.php'); $t->set('carouselPages', $page->carousel); $page->masthead = $t->render(); // Tour themes $t = new TemplateFile(wire('config')->paths->templates . 'markup/helpers/items.php'); $t->set('title', "Get inspired from our <strong>tour themes</strong>"); $t->set('items', $page->featured_themes); $t->set('description', $page->themes_description); $t->set('url', $config->urls->root . "themes/"); $t->set('linkTitle', "All themes"); $page->main .= $t->render(); // National parks $t = new TemplateFile(wire('config')->paths->templates . 'markup/helpers/items.php'); $t->set('title', "Seven beautiful <strong>national parks</strong>"); $t->set('items', $page->featured_parks); $t->set('description', $page->parks_description); $t->set('url', $config->urls->root . "national-parks/"); $t->set('linkTitle', "All national parks"); $page->main .= $t->render(); $page->layout = "frontpage"; include("./markup/index.php"); This uses few "helper" markup files from templates/markup/helpers/ folder (namely carousel.php and items.php). Here is the carousel.php for your reference: <?php /* Generates the markup for the frontpage carousel */ if (count($carouselPages) < 1) return; $styles = ''; echo "<div id='carousel'><ul class='rslides'>"; foreach($carouselPages as $key => $p) { echo "<li class='c-item c-item-$key'>"; echo "<img src='".$p->image->getThumb('carousel') ."' alt='' />"; echo "<p>$p->summary</p>"; echo "<a class='button' href='{$p->link->url}'>$p->headline</a>"; echo "</li>"; } echo "</ul></div>"; Then populates the $page->masthead and $page->main properties and then set's the inner layout to "frontpage". That templates/markup/layouts/frontpage.php file is very simple on this site, but could be much more complicated if needed: <div id="masthead"> <?= $page->masthead; ?> </div> <div id="main" class="wrap"> <?= $page->main; ?> </div> Frontpage is rather unique and I could have done all the markup on the frontpage.php file also. But I do want to re-use those "carousel" and "items" components on other places as well. But if I do have totally unique stuff, where I do want to get "quick and dirty" this approach allows it. Then my template file would be something like this: $page->layout = "campaign2012"; include("./markup/index.php"); And then all the markup would be in that templates/markup/layouts/campaign2012.php Blog profile really gave me a good ideas (cleaner folder structure etc) and using TemplateFile class adds nice possibilities. This is of course just a one way to manage your templates, but hopefully someone of you finds this helpful when thinking about how you like to structure this stuff. PS: If you are just getting started with PW, then I recommend using the head and foot includes method from demo install. There is nothing wrong with that method and only more complicated sites starts to benefit from these methods introduces in this topic.
    1 point
  35. Good ideas, we'll definitely have to look into these for future updates in the comments module. However, I also want to note that we already do have an alternative built in, that I've found to be just as effective as a captcha (if not more so) on the sites where I use it. Look at the 'requireSecurityField' option in /wire/modules/Fieldtype/FieldtypeComments/CommentForm.php. This option can be enabled in the options to the form: echo $page->comments->renderForm(array('requireSecurityField' => 'security_field')); I typically hide my comment form with CSS to prevent the possibility of false positives: #CommentForm { display: none; } Then use JS to show the comment form, and append a security field to it: $(document).ready(function() { var $input = "<input type='hidden' name='security_field' value='1' />"; $("#CommentForm form").append($input).parent().show(); } No more spam. The only downside is that your comment form now requires Javascript to use. But since you are hiding it with CSS and making it visible with JS, at least you won't be disappointing anyone.
    1 point
×
×
  • Create New...