Leaderboard
Popular Content
Showing content with the highest reputation on 08/26/2014 in all areas
-
UPDATE: 14.09.2014 We've launched lightning.pw! Create a new ProcessWire site in under 30 seconds with lightning.pw . Our new service will help developers to work together on a new site, enable new ProcessWire users to explore the CMS and you can now easily test a feature or module. Our goal was to replace the long localhost setups so that you can instantly start developing. Features Current launch features: Create new ProcessWire sites Choose between ProcessWire 2.4 and 2.5 or the latest dev version Choose a profile on installation We setup a custom subdomain and will provide you a FTP login for file access ProcessWire works as expected. Every feature (except PHP sendmail) works. Install modules, write templates and create new sites as you wish Dashboard to manage multiple sites Upgrade (or downgrade) ProcessWire with a single click Free Hosting for module developers. Planned features: Save and use your own installation profiles Custom subdomain names github/bitbucket integration Create snapshots of your site Free integration of minimize.pw for image compression Pricing lightning.pw is free to use. You can buy credits to expand a site after the free usage timeframe of seven days. Credits start at 3€ per month but get cheaper the more you buy. If you develop a customer site for an average of 6 months, you would pay 15€ for the whole development setup. If you think the price is high, please notice that we don't want to oversell our servers and that we want to build further features. If you have developed a free module for ProcessWire, you can contact us to get free hosting for your showcase or development site. Bonus: You can use the coupon code PROCESSWIRE to get a free month. Just enter the code under the Payment section on the dasboard. About The first intention for this project was our own need for a simple development solution. lightning.pw is build with Ruby on Rails and uses a custom written ProcessWire installer. We worked hard to maximize security and stability of the service. We create a backup of every site every 12h and can scale within minutes if server load increases. You can ask questions here on the forum or follow us on Twitter for updates (and maybe coupon codes ) Try lightning.pw and tell us what you think. We appreciate every form of feedback! --- original post --- I will keep this short. We worked on a new project for the last couple of days. Instant ProcessWire hosting for development, testing and as a showcase for ProcessWire. The idea was on our mind for over a year, rested when the community won the bitnami contest but was finally started when we needed a better tool for our internal development. Excuse my bad mix of Englisch and German and watch the short video that explains and shows the basics: The features includeInstallation of any ProcessWire version in under 60 seconds Complete setup of a profile for ProcessWire, you can select the profile FTP access to the /site/ directory Login to ProcessWire with your lightning.pw account Own and custom subdomains Complete ProcessWire where everything works as expected Secured and fast server, restricted access and daily backups. Every site is free for seven days and will be deleted afterwards, except if you choose to extend the site with credits you bought. Module developers can host a showcase/demo for free. Our plan is to get the best experience for PW developers and small teams. Maybe it will help ProcessWire grow or maybe it will just stay a tool we use for our own sites. We have a github/bitbucket integration, custom profiles and an export workflow on our roadmap. We would be glad to hear your opinions and your feedback on this idea and the current execution. What feature would really make this attractive for you?6 points
-
Ivan, I have learned things in lots of different ways. Some from searching/browsing the forum, some from studying the core code, some from looking at other's modules, sometimes looking back at my own modules. I sometimes have a hard time remembering how to do something, but I usually remember where I did it or where someone else did it, or at least the right term to search for. In this example, I have used Markup a couple of times in my modules now, but the first time I went to do something like that, I remembered that Hanna Code has a huge chunk of text under "PHP and Javascript usage notes" on the Code tab, so I went and looked how it was done!6 points
-
@adrian It is nice we can ask such questions here and get the perfect answers. But how do you know the answers? Is it just experience or you quickly look up somewhere (docs, source code, etc.)? Could you explain that in detail? Teach me how to fish (but share some fish also ).5 points
-
@renobird, I have to say thanks for making your post today. I read your post this morning and decided to finally create my first ever Process Module. It was easy and very addicting.' Best Regards, Charles4 points
-
Ivan, Things like this are a bit more advanced, so there might not be too much documentation (outside the forum topic you linked to above). At least not yet. In the meantime, I find I learn a lot by looking at the modules in the /wire/ folder. It gives you some idea of the things you can tap into. I also look at the source for just about every non-core module to see what other devs are doing — you can learn a lot (quickly) that way.4 points
-
@Vizz, i'm interested to see what ProcessWire work you did. Can you please post some links from sites you've build ?4 points
-
The module works by creating a page with only json content that you can get via URL either by JS or PHP (or whatever you want). It allows you complete control over the data that gets passed to json, so you don't have to have any problems with sensitive data being exposed. If you get the json from another site with PHP in your templates, there's no way Google will know where it came from.3 points
-
Something like this can be done Top root menu // default root is "/" echo $treeMenu->render(array("max_levels" => 1)); Submenu $root = $page->rootParent; // top root parent of current page echo $treeMenu->render(array("max_levels" => 1), null, $root);3 points
-
This is possible, of course. It's a "normal" ProcessWire after installation where you can access the /site/ folder. So you can create a new demo user, modify the config.php and then you have a showcase. It's also easier for developers to test a module against multiple versions of ProcessWire because you can change the version as you wish with a single click. So trying out my module in the latest dev? No problem.2 points
-
2 points
-
2 points
-
Nice! Let's hack all WordPress sites and bring them down. I anyway don't like WordPress.2 points
-
@LostKobrakai, are all url assets used in WYSIWYG fields abstracted by default ? So are they are converted at runtime to valid urls? I know there's a module that can do that, but is it now the default in ProcessWire ? And what about url used in javascript, stylesheets etc. It's just a good practice to make your dev environment the same as the real domain.2 points
-
$field = $modules->get("InputfieldMarkup"); $field->value = "Your paragraph text here";2 points
-
Sometimes you need to generate full urls, e. g. if you send emails. More generally, everytime the url should be used without the context of "this is the current domain", which the browser has, if you're already on the website.2 points
-
Thanks Antti, I wasn't setting the template access in the admin properly. Working nicely now2 points
-
RSS: http://modules.processwire.com/modules/markup-rss/ or better use the webservices module? (http://modules.processwire.com/modules/service-pages/)2 points
-
I have your Wordpress database in minutes. Blad 1 - Wordpress 0 .Fix what I put you in the private message or install and learn processwire.2 points
-
I agree — ProcessModules are the way to go. They might look intimidating at first, but if you start with a very simple example, they really are very easy. Here is a super simple example that lists all pages with the template "news". (I'm sure there are others out there, but it only took a few minutes to write so...) <?php /** * Simple Process Module Example. * This is a very basic example to learn from. * I have no intention of expanding on this sample module. * * @author renobird * * ProcessWire 2.x * Copyright (C) 2011 by Ryan Cramer * Licensed under GNU/GPL v2, see LICENSE.TXT * * http://www.processwire.com * http://www.ryancramer.com * */ class SimpleProcessModule extends Process { public static function getModuleInfo() { return array( 'title' => 'Process Module (basic example)', 'summary' => 'A very simple process module as an example on how easy they are to create.', 'version' => 100, 'href' => '', 'permission' => '' ); } public function init() { // initialize the parent parent::init(); } public function ___execute() { // Find some pages $items = $this->pages->find("template=news"); /** * Create a table to display results * There are other ways to do this using MarkupAdminDataTable module, but let's keep this simple for now. */ $out = "<table width='100%'>"; $out .= "<thead>"; $out .= "<th>Title</th>"; $out .= "<th>Date Created</th>"; $out .= "<th>User</th>"; $out .= "<thead>"; $out .= "<tbody>"; // If $items pageArray is not empty if ($items->count() > 0){ foreach ($items as $item) { $out .= "<tr>"; $out .= "<td><a href=". $this->config->urls->admin . "page/edit/?id=" . $item->id .">" .$item->title . "</a></td>"; // title $out .= "<td>" . date("F j, Y", $item->created) . "</td>"; // date created $out .= "<td>" . $item->createdUser->name. "</td>"; // user that created $out .= "</tr>"; } } else { // empty pageArray message $out = "<tr><td>No pages matching your criteria were found.</td></tr>"; } $out .= "</tbody>"; $out .= "</table>"; return $out; } } Usage: Install the module Create a new page under /admin/ Set the process for the new page to SimpleProcessModule If you have never created a module, just focus on the execute() method. Most of what is there is coded exactly as you might from a page template.2 points
-
HelperFieldLinks Just got a new module working that is only visible to superusers, and is handy for when developing a site, or investigate someone elses. 1. It adds a shortcut link to all fields on page in the backend. The link name equals the field name, so on very large complex sites with lots of fields, it can help to quickly see what name the field has. 2. It also adds a shortcut to the used template (in the template select field under "Settings" tab). They appear on bottom right corner of the field. Any suggestions for a better module name and general feedback is welcome. ProcessWire Modules Directory: http://modules.proce...er-field-links/ Direct github download: https://github.com/s...elperFieldLinks1 point
-
This module adds a preview and zoom button to InputfieldTextarea for live previewing the content after being formatted by the text formatters assigned to that specific field. It's pretty alpha still but it already works. For now I was only playing with the Parsedown formatter, but it should work with every other formatter as well, even with Hanna Code, not sure though, haven't tested it. It's restricted to regular textareas, meaning TinyMCE et al are not supported yet, because they need specific change listeners. Will look into it though. The result is fetched via ajax from a process page, the default style sheet contains some Github-like styles but the style sheet is configurable, see module settings. Github: https://github.com/owzim/ProcessTextareaPreview Open for suggestions1 point
-
Hi all, I am building a page that contains a quite complex request form. To do this, I created a page based on a "contact-form" template, and inside this template I put all the code needed to display the form and manage the results. The form is built using PW API, the code is inspired from some examples I found here on the forum. My problem is that I don't know how to insert a text paragraph between the fields, anyone has idea on how to do this? Here's a very simplified version of my code (only two fields displayed), in this case I would like to append a custom paragraph (simple html) between Company and Name fields. The only solution I found is to use an additional field of Fieldset type, without content, and on the label I set the text I need to output. However in the label field I am not able to insert html tags... Any help is very appreciated... Thank you! // create a text input $field = $modules->get("InputfieldText"); $field->label = "Company"; $field->attr('id+name','company'); $field->required = 1; $form_fields[] = $field; // create a text input $field = $modules->get("InputfieldText"); $field->label = "Name"; $field->attr('id+name','name'); $field->required = 1; $form_fields[] = $field; // submit button $submit = $modules->get("InputfieldSubmit"); $submit->attr("value","Send"); $submit->attr("id+name","submit2"); $submit->skipLabel = '4'; // create the form field (also field wrapper) $form = $modules->get("InputfieldForm"); $form->action = "./"; $form->method = "post"; $form->attr("id+name",'contact-form'); foreach ($form_fields as $field) { $form->append($field); } $form->append($submit); // append the form in $out variable $out .= $form->render();1 point
-
I'm an independent contractor and work with a lot of different clients. Most of the sites I do are light, medium or heavy content-based sites. ProcessWire is my go to system for these types of sites, or WordPress if the client really insists. I stay fairly busy and I've reached a point where I need to have a reliable, go-to developer that I can subcontract work to when I am too busy to take on the work by myself. This could lead to be a steady stream of projects to work on. I'm looking for someone with the following skills: strong php skills can do design conversion correctly (that is, taking a PSD and hand-converting it into html/css/js); also knows how to do mobile-first responsive design with either framework strong experience with Bootstrap and/or Zurb Foundation; using it SASS or LESS is a plus some experience with Grunt, Bower (the basics) knows how to make a theme/template from scratch (ideally using a starter theme like Roots.io) and organize files and code in a modular/partialized way (note: for my ProcessWire based sites, I use a starter template based on Roots.io for ProcessWire) strong experience with ProcessWire or WordPress (at least one of the two) understands how to best organize information and properly structure a site based on a CMS's capabilities (for example, using Custom Post Types and Taxonomies in WordPress; when to uses Pages vs. Custom Post Types, etc.) very organized and takes pride in their work If you are interested, please send me a private message or email (jlahijani at gmail.com) with the following: a list of some recent sites that you have done along with a couple sentences about each explaining the CMS, tools and approach used. i don't care much about the design of the site as opposed to the development part. your general preferred approach in developing medium-large content sites your location a little about yourself your website (if you have one) anything else you feel that you'd like to say Thank you, Jonathan1 point
-
I switched CMS too......I've the comfort of a small project without a deadline. But learning PW is faster as any other cms ! As fast as this forum and the real talented users share and awnsers1 point
-
We're neither using one of the three you named. At the moment, we (2 people, sometimes 3) setup a subdomain on our webserver and develop together via FTP. For large projects, we're using git (via bitbucket) and we commit to the repo and then the server replace the files. This is far from optimal but it works, we can show the progress to clients, work on the same database etc. I would really like something were I can use GIT as a tool to monitor code changes but have the flexibility of a simple ftp login and where I can show progress to clients.1 point
-
1 point
-
Did you check your language setup ? ============================================================================== Begin of Language setup 1. After a fresh install of processwire go to Modules => Core => Language => Install Language Support Click on the back button in your browser Install Languages Support Fields Click on the back button in your browser Install Languages Support Page Names Click on the back button in your browser Install Languages Support Tabs 2. Go To Setup->Languages and add new languages. Please note, that the default one is also the default language of your site. Add new languages with name and title: name: default Title: Default (e.g. german) name: english Title: English name: spanish Title: Spanish 3. SET URL FOR EVERY LANGUAGE Go to Pages => Home => Edit => Settings and under each language tab setup a url for every language, e.g. default = de/ de english = en/ en spanish = es/ es 4. Go to Setup => Fields Change title field from PageTitle to PageTitleLanguage Change headline field from Text to TextLanguage Change body field from Textarea to TextareaLanguage and then go to Setup => Fields => Body => Details => inputFieldtype Change inputFieldtype from Textarea to TinyMCE Change sidebar field from Textarea to TextareaLanguage Example use: Go to Pages and edit your About Us page go to Headline and edit About Us in the 3 languages e.g. Über uns - About Us - Sobre Nosotros End of Language Setup ==============================================================================1 point
-
@Ivan Gretsky If you've needed it once you know the answer, maybe a quick look for the exact syntax, but that shouldn't be difficult if you know what you're searching.1 point
-
There are some things wrong in this code. data: "country="+$("#country").val(), "province="+$("#province").val(), These commas aren't for seperating different data, but to seperate different datahashes in the object, like this: { name: data, name: data, name: data } Then you need to take a look at the jQuery docs, which types "data:" does accept and use: http://api.jquery.com/jQuery.ajax/ The important part: So you need to concat your data to a object, string or array and then pass it to data.1 point
-
It shouldn't matter where your developing, as long as you don't hardcode anything. The only thing to change, if it's going live, is /site/config.php to reflect the new domain. Edit: For future reference, maybe the RewriteBase has to be changed as well, but this depends on the server configuration.1 point
-
I don't know how familiar you are with Process Modules, but I posted a quick example a while back. Once you get started, they are super addicting. You can build just about anything.1 point
-
Thanks a lot renobird. I am going to have a look at that and at process modules. I think I am trying to run before I can walk on this admin area. It is the 'pulling it together' in the admin area that I am vague on. So thanks a lot for the tips.1 point
-
If the ajax call works, just return $_POST as a string from the backend and see if the right values get send to the backend. If there's something wrong with the ajax call, the send data shouldn't matter. Just try to debug both parts seperatly.1 point
-
1 point
-
As horst said, the service-pages module would be a perfect fit for this. Although I don't understand why you have to keep the sites in separate servers from a SEO perspective... couldn't you just have different domains?1 point
-
still believe that aluminium wings can cut through concrete and steel columns ? even the tip of the wings ? Then don't read this: https://firstlook.org/theintercept/article/2014/08/25/icreach-nsa-cia-secret-google-crisscross-proton/1 point
-
@Mel: here is a post that describes how to use a watermark that is uploaded into a single image field (to make an image field a single image field you have to setup the field to only allow 1 file, otherwise, 0 or greater 1 it is a multiple files field): https://processwire.com/talk/topic/4264-release-page-image-manipulator/#entry41883 The general how to you can read in the initial post here in this thread: The $pngAlphaImage can be a filename (full path and not an url!) or a pageimage. Example with filename, assumed you have uploaded a png watermark image per FTP to your server into a directory besides wire and site, called "_mystuff": $png = $_SERVER['DOCUMENT_ROOT'] . '/_mystuff/' . 'basename-of-my-watermark.png'; foreach($images as $image) { $watermarked_image = $image->pimLoad('tw', true)->width(500)->watermarkLogo($png, 'southeast', 0)->pimSave(); echo "<img src='{$watermarked_image->url}' />"; } An example with png from an imagefield, assumed it is called 'watermarkfield' and is on a page with the name/url '/tools/'. The tools page isn't visible from the frontpage, it is only a page that holds some fields and stuff that I need around the site on different places: // assumed the watermarkfield is a single image field: $png = $pages->get('/tools/')->watermarkfield; // assumed the watermarkfield can have multiple images and I want use the first one: $png = $pages->get('/tools/')->watermarkfield->first(); foreach($images as $image) { $watermarked_image = $image->pimLoad('tw', true)->width(500)->watermarkLogo($png, 'northwest', 0)->pimSave(); echo "<img src='{$watermarked_image->url}' />"; }1 point
-
Is the template access denied from guest user? Public pages will still use normal "unsecure" folders, only the templates that are restricted get secure files.1 point
-
Thanks for the feedback. I note your ideas @soma and @adrian. Update coming soon1 point
-
It sounds like the master site would benefit from having some form of RSS feed or web service making the content available. The other replica/satellite sites can read this feed when convenient, parse and download the information, and create local copies for their own purposes. ProcessWire will make this easy in several areas. You could use the MarkupRSS module to create the necessary feeds on the master site. PW's API is a breeze to use in order to create pages programmatically from various sources. You could schedule this to run on a regular basis to keep the sites up to date. This is just one way, and the way I might do it - but there are probably multiple correct ways to approach this problem with ProcessWire.1 point
-
I don´t like wordpress...easy to hack. Mod note: Blad, thanks for alerting Vizz about a potential vulnerability on his/her WordPress site. I wrote you a private message but my recommendation is that you change to processwire. Sorry for the tests. Everything is as it was1 point
-
1 point
-
@adrian getUnformatted is definitely the PW way , but i'm not entirely sure that it saves a conversion step. Seeing as a datetime field is a Y-m-d H:i:s field on the database side of things a strtotime is always necessary. I've always thought that getUnformatted on a datetime field gives you the wakeupValue: // in FieldtypeDatetime.module /** * Convert value from Y-m-d H:i:s string to timestamp * */ public function ___wakeupValue(Page $page, Field $field, $value) { if(empty($value)) return ''; $value = strtotime($value); if($value === false) $value = ''; return $value; } I'm guessing this wakeupValue is always present, if thats the case it does indeed seem to save a conversion1 point
-
This is one thing that Zend Framework nailed perfectly; in typical setup your entire application lives one level beyond what's directly accessible from the web. I liked it, and it's also something that the security chapter of Programming PHP and the OWASP PHP Security Cheat Sheet suggest.1 point
-
about point 10 in my list, post what would be better than 777 and I upgrade my list. Very good, I like it. There is also that you can move important files and directories one level above your site root on the server so the bad guys will have a much harder time to access it. Edited and added this to the list in point 14.1 point
-
The problem especially with any markup-generating modules -- there's an unlimited amount of possibilities. Unless the thing you're trying to achieve is relatively simple ("list tweets from this user account") or implements very extensive markup configuration options, you'll end up with a ton of modules doing just about the same but with slightly different markup Definitely something to consider for us too: as a general guideline, if there's a module that does just about the same already, it would be awesome if module authors would seriously consider working together instead of posting near-duplicates just to address some minor difference of opinions. Just saying -- I know it's not easy in real world use cases. Still I've seen that happen many times over on our modules, which is great1 point
-
Well I don't have the recording mode done yet, but thanks to Nico we now have the ability to migrate content from a Wordpress site into PW. Firstly, this module has been renamed - now it is simply: "Migrator" https://github.com/adrianbj/ProcessMigrator so please uninstall your old one and install this new version. The module now supports 3rd party plugin modules for migrating content from other sources. The first one is: MigratorWordpress: https://github.com/NicoKnoll/MigratorWordpress Here's what it looks like in action. Not much action in that screenshot I know, but you can see how MigratorWordpress adds in a new data source option (a WordPress xml export file). There are instructions on exporting in the MigratorWordpress readme. For those of you who still have access to a WordPress site, simply run WP's built in exporter, then import the resulting xml file into Migrator. At the moment the Wordpress site needs to still be live because any embedded images are installed to PW from their full existing URL. Also if you have ideas for other plugins, please feel free to start coding If there is interest I'll write a guide defining what is required for the module to be recognized by Migrator and also about the JSON schema that is required. So please test out and let us know how things go.1 point
-
Just pushed an update to 1.0.5 to fix issues once again (!) - updated to account for current new development on admin theme - some optimizations - kinda fixed an issue with the new LanguageFieldsTabs. - It was getting overlayed by the tabs. Also the LanguageFieldTabs alters the field content via JS and appends the tabs, which results in my Helper links being at the top instead at the bottom! Annoying and not possible to fix from my side, but if LanguageFieldTabs.js would prepend() the tabs instead of append() it would be better. I don't see an easy way to account for this issue from my side, maybe someone has an good idea. - but for now it's on top of those fields using language tabs. - added new feature to toggle a layer when clicking on the little gear icon, with some infos on the field settings, which can be useful when developing without going to the field editing screen. There maybe still issues in some cases I haven't tested or thought of. Thanks1 point
-
Oops, sorry. And I thought someone had a really deep understanding of processwire. Maybe I should remove the links, so they doesn't get backlinks from here?1 point