Leaderboard
Popular Content
Showing content with the highest reputation on 10/08/2013 in all areas
-
What if we make the animation able to configure so you could set a time or turn it off with 0. I'm sick of the animation taking long time when it needs to open a branch on 3-4 level. something like in the module settings of ProcessPageList or through $config? $config->pageListAnimationDuration = 100; $config->js(array('pagelist' => array('pagelistAnimationDuration'=> 0)));4 points
-
4 points
-
Here is our website using ProcessWire, still work in progress: http://www.mokkivertailu.fi/ The site is a search engine for rental cottages in Finland. Cottage owners can register and add their information while users can search and browse the database.3 points
-
Hi. I have been working on a simple mailchimp integration module. It is probably pretty bad written as I don't fully know my way around the processmanager module creation process yet. Anyway this is basically what you need to do. Create a mailChimp account (free), get the API keys for your account. Add the API key to the config.inc.php file. Create a mail friendly template: Inline CSS with supported CSS tags so dont use floats or position for instance. Create a "root" page where you Newsletter will reside under. This case root is called "newsletter" want another name just change in the module. (Line 27) Install the module. Some screenshots: This is the admin section where Lists is being fetched from mailchimp and newsletters is being fetched from under the root page you set up earlier. Click send and your mail is on the way. Result page. So what have happened now, you have created and sent a new email campaign through mailchimp. For detailed reports regarding delivery status you need to log on to mailchimp. For subscription you can build your own form or use some of the one provided by mailchimp, if you want to skip the "verify subscription" mail you need to create your own subscribe form see example attached. ProcessMailChimp.zip subscribe.php I am not saying that this is a 100% completed module but it cover my needs and I have seen some questions regarding this kind of functionality roaming the forum.2 points
-
2 points
-
I'm not a fan of hard-coding id's, obviously for this purpose it's fine, but for app building, I use the config var in case the page id ever changes (if a new version of PW is released and the admin id is now 3, your code won't break). echo '<a href="'.$pages->get($config->adminRootPageID)->url.'">this way to the admin</a>';2 points
-
I was not angry Sorry if i sounded that. Its just way i am writing text as i am not native english speaker... I agree with you.2 points
-
Hi Radek, Sorry - I think my reply may have come across wrong. I was not suggesting that localization support shouldn't exist at all. I think it is very important! I guess my reason for mentioning that I don't have a use for it was to emphasize how impressed I am by your efforts, even though they don't have direct benefit for me in the english speaking world. I have played around with localization a little in PW in development of some modules, which is why I pointed to that thread on distribution of module translations - I think it is important that this becomes easier and standard. Hope I didn't offend in any way.2 points
-
I have made a few minor tweaks / cleanup, but mostly improved the documentation in the Github readme and also in the first post in this thread, along with some new screenshots showing all the functionality in use. Will need a bigger chunk of time to deal with the major enhancements etc, but hopefully now you can get a better idea of what it does and it will be a little more user-friendly to test out. Send me feedback!2 points
-
I think there should be only one repo per language containing all module translations. One repo per language per module is overkill I think, because most of the modules need only one language file, right? Just for the sake of an comprehensive view in the repo, each Module should have its own folder. The repo then can be managed by someone who speaks that language and can take pull requests from other contributors. I think this central way is more approachable for those who want to help. What could be problematic is that the language files are created in only one line, compressed, which makes it hard to track line by line changes in a repo. I am willing to open such a repo for German if no one else wants to =)2 points
-
Lately there have been lots of people that are not enjoying the default admin theme, so we've been working on making something new. Not trying to solve all issues or add every new feature we'd like, but just trying to come up with something to have as an interim replacement for the default admin theme until we can afford the time to do something broader in scope (like Phillip Reiner's great admin theme design for example). So this theme doesn't necessarily break a lot of new ground, but hopefully has some of the improvements that people are looking for. Visually, the goal here was to find a lighter, more modern look and reduce the boxes-in-boxes feel of the current admin theme. I've opted to commit it to the dev branch because it requires the latest version of ProcessWire on the dev branch, and likely will continue to with updates. Meaning, I can't distribute this one as a 3rd party theme very easily. This is because I'm making core updates related to the admin theme at the same time. So if you want to help test this new theme, you'll need to grab the dev branch of ProcessWire. The new admin theme is in /site-default/templates-admin/. That means you'll see it as the default theme if you are installing a new copy of PW. But if upgrading an existing copy, you'll continue to get the old theme. If you want the new theme, then just copy the /site-default/templates-admin/ directory to your /site/templates-admin/ directory on your existing PW install. This would be in addition to replacing your /wire/ directory with the latest one from dev, as usual for PW upgrades. The existing default admin theme also remains in place in /wire/templates-admin/. So if you want to stick with the existing/stable admin theme, then just make sure you don't have a /site/templates-admin/ dir in place (unless you are using a 3rd party admin theme). This admin theme is probably not production ready, as it's not been tested in many browsers yet. I personally haven't yet tested it in anything but Chrome and Firefox in OS X. Please let me know if you experience issues in other browsers. I fully expect things won't be pretty in IE... but they never are. To start, this comes with 3 color schemes (though we'll be adding more too): Warm: Modern (similar to processwire.com site colors): Classic (similar to existing admin theme colors): To switch to one color theme or the other, specify a GET variable of 'colors' in any URL you are accessing in the admin: /processwire/?colors=warm /processwire/?colors=modern /processwire/?colors=classic To specify a default, edit your /site/config.php and set to one of the following: $config->adminThemeColors = 'warm'; $config->adminThemeColors = 'modern'; $config->adminThemeColors = 'classic'; We'll probably make this switchable in the user profile at some point, but that comes later. This theme also comes with some new features (most of which have been copied/inspired from the work of others here, whether in other admin themes, modules or designs): It now uses Font-Awesome icons rather than jQuery UI icons. We now only use jQuery UI icons for actual jQuery UI widgets. Note that asmSelect and our file/image inputfields are built as jQuery UI widgets, but I don't think anything else is. Basically, the majority of icons in the system are now Font-Awesome icons. You can associate Font Awesome icons with templates. When associated with a template, the icons will appear in the page list, in front of the page title. To use this, edit any template and go to the Advanced tab. In the "List of fields to show in admin page list", you can type in any Font Awesome icon name (in addition to the field names you could before). For example, in the Page List screenshots above, I have my "search" template configured with the value: "icon-search title". You can associate Font Awesome icons with fields. When associated with a field, the icon will appear at the beginning of the input. For example, I associated a coffee icon with my "title" field in the screenshot below. To do this, edit the field, click on the Advanced tab, and enter the icon name in the new field provided for it. The top navigation now supports simple dropdowns. A new "user" dropdown has also been added that contains profile and logout links. The main Pages screen contains an "add new..." button, that is itself a dropdown to a list of templates that are configured adequately for us to know where they would be added. To use this, you have to configure your template "family" settings. The search box is now ajax powered, though this was introduced a couple weeks ago in the existing admin theme too. The theme is responsive too, of course. This is all kind of preliminary and open to changes. I'm trying to keep the scope of the project fairly small since I don't have much time to work on it. But just wanted something to quiet the haters a bit for a little while, so that we can take our time on the bigger admin theme project for longer term. We'd appreciate your feedback if anyone has time to help test.1 point
-
Hello ProcessWire community At first I like to thank and congratulate Ryan for this wonderful work and I wished that I knew Ryan a long time ago And by the way you look awesome in the overview video Ryan And now a little bet about me: My name is Faisal Halwan from Saudi Arabia. I work in web development over 14 years now, and have dealt with various content management systems and PHP scripts in general. I was always dreamed of a flexible content management system for use in almost anything or what is now called CMF or allow me to say ProcessWire Thank you Ryan, you make my dream came true Yet I couldn't find any result in for any Arabic article talking about ProcessWire I will do my best to present ProcessWire and provide support in Arabic as soon as possible. Thank you and keep up the good work1 point
-
I had to leave Drupal behind, because it didn't serve my community. Basically it was too expensive and it's really starting to cater more to enterprise clients. I'll probably never use Drupal again, unless it's for an enterprise client with a big budget. Building a simple blog site is fast and easy enough by cloning an existing Drupal site, but the problem is the ongoing costs of maintenance. I can knock out a fairly robust Drupal site in a week and charge less than $2-5k, but at that price point, I'm not attracting clients who will pay the $2,500 - $5,000 a year to maintain (both the server and the software) and host Drupal (In my experience Drupal needs a dedicated or vps server for sites w/o any significant amount of traffic). My clients are small businesses and uneducated regarding their options. They think Drupal is the next WordPress w/o realizing it's not even close to being as simple, it's more expensive, and it's not all that easy to maintain. On top of that, Drupal devs charge between $90 and $175 per hour. From a business perspective, Drupal is fantastic (a cash cow). There's always an upsell, always a problem to fix, always a new update to apply (then fix). It's too bad I'm not it in for the money. I prefer to get paid less and enjoy the work I do (PW is fun, Drupal is a pain in the ass). I want to provide quality, charge a fair price, and work with great people, not dupe someone into buying a boat as it were, which is what I see a lot of Drupal web agencies doing. They don't choose the best platform for the client, instead they put them on Drupal... the recurring income stream because it's good for their business. Inexperienced devs/freelancers will do the same thing, but for the right reasons most of the time. They just don't have the experience with Drupal to know what problems lie ahead. The only advantages I see of using Drupal, -Drupal has a huge community testing and reporting bugs which makes it more stable, secure and more accessible to more server/hosting environments. -Drupal has a ton of quality free modules. -Drupal is great for enterprise clients. The costs at this scope are quite reasonable and Drupal seems to meet the needs of these clients very well (talking about huge companies). For example putting the .gov site in Drupal was smart, the whitehouse has the budget and resources to do the job right and they have a much better solution for the price than building something that large from scratch. My rule of thumb, if a client is getting 100K unique visitors a month, then consider Drupal, but also consider whether or not the client can afford it. If you sell someone a Drupal site that they can't afford, you will have nothing but conflict and unhappy clients. Sometimes too you need to consider the level of sophistication of the client. Even if a client has the budget, it's sometimes better to put them on a platform which grows as their understanding of websites grows. A way to illustrate this... Say I work at a snowboard shop and i have a customer who has only been snowboarding once. I wouldn't sell them them to top of the line board unless they insisted. Instead I'd try to get them to purchase a board that is more appropriate for beginners. Not only will the board be cheaper, it's not built for precision like the high end boards. The customer will have an easier time learning on the entry level board and have more fun as a result. If sold them the high end board, they may have difficult controlling it and fall a lot or run into a tree. To address some of your points on the difficulty of selling PW... My point is, change your sales strategy for each client. You may think PW is the best thing since sliced bread (it is), but if you are interested in being successful in business, sell people what they want, not what they need. They will be ecstatic with you and your services and you'll have a fat wallet and more work than you know what to do with. As your relationship with these people grows, you'll be able to move them to a better platform like PW when it's time for a new website or when they decide they need something that their current platform doesn't provide. My boat reference: A boat is a hole in the water into which you pour money.1 point
-
Ok, I have good working solution I think: set the tree-parent-page sort-setting to "Manual drag-n-drop" when it is empty. (empty == has no children now!) Then with the importer script I use this code: $parent = wire('pages')->get('template=TreeParent'); // get your tree-parent-page $first = $parent->child; // get the first child $p = new Page(); ... $p->sort = (0!=$first->id) ? $first->sort -1 : 99999; $p->save(); that way I get this output with my foreach loop: 99991 :: jh2142 99992 :: jh2141 99993 :: jh2140 99994 :: jh2139 99995 :: jh2138 99996 :: jh2137 99997 :: jh2136 99998 :: jh2135 99999 :: jh2134 and after some manual changes (2134 to top, and 2142 to bottom, and 2135 above 2140) and adding one new page to it with the importer script, I get this: 99990 :: jh2143 99991 :: jh2134 99992 :: jh2141 99993 :: jh2135 99994 :: jh2140 99995 :: jh2139 99996 :: jh2138 99997 :: jh2137 99998 :: jh2136 99999 :: jh2142 You only need to set the startvalue high enough, I think. [ max can be 2.147.483.647 ]1 point
-
yep, I didn't think about that and my workaround doesn't do you any good in this case. I had a look at the module and this is by design, but I don't think Ryan had considered the case where you may want a zero, but not negative numbers. I think it needs to be submitted as a bug. In the meantime, try commenting line 30 in wire/core/modules/InputField/InputfieldInteger.module and let me know if that works.1 point
-
Private file handling is your solution. You would abstract all files from public access by doing something like... /files.php?file=myfile.jpg vs. /myfile.jpg Then in your private file handler you can check permissions and show the users the correct image according to their access level. I'm not sure if idea is native to PW.1 point
-
put this into one of your templates and you can see the admin url and login: echo '<a href="'.$pages->get(2)->url.'">this way to the admin</a>'; found here: http://processwire.com/talk/topic/4491-unable-to-log-into-processwire-website/?p=443231 point
-
Personally I really have no need for language translations (although perhaps I should - maybe it is a typical english speaker's arrogant oversight ), but I am still amazed at the work you have put in on this. It does make me think we need to revisit this topic though: http://processwire.com/talk/topic/2583-delivering-module-translations/1 point
-
Czech Localization Pack. Current version: 0.9.8 (93 files) + README.txt Changelog: Added multiple strings (Font-Awesome and new admin theme features from git dev, ...). Updated multiple strings and cleaning (Markup, Home, autojoin, ...). Czech Localization Pack for external modules. Current version: 0.3 (17 files) + README.txt Added: new default theme support from git dev templates-admin (complete for testing - may change soon) /site/templates-admin/default.php /site/templates-admin/shortcuts.inc Updated: FieldtypeCropImage (complete) FormBuilder InputfieldCKEditor (complete) TextformatterVideoEmbed (complete) pw_czech_098.zip pw_czech_modules_03.zip1 point
-
I asked Ryan about this module and he is happy with it going in the modules directory, so I have submitted it: http://modules.processwire.com/modules/process-redirect-ids/ It is fine to have it run on all your pages/templates (the default), but don't forget to check out the module config settings where you can limit this. Remember it is only called by pages that return a 404 so I don't believe there should be any overhead on normal page loads. So please feel free to start using it and let me know if you have any improvements you'd like to see.1 point
-
WOW: Very nice, friendly and clean Design. I especially like the use of subtle shadows, the 3d buttons and how you are using the curved angles! From a frontend POV: You could save a lot of requests and kilobytes (500!) by minifying and gzipping your js/css resources (i'm using grunt for concatenation and minification). And you should definitly use schema.org data to enrich your content for search engines!1 point
-
1 point
-
Ok so now that would be the 4th integration attempt ( I still haven't get to share mine )1 point
-
1 point
-
Hey horst - did you see this thread: http://processwire.com/talk/topic/3327-new-page-on-top/ EDIT: and this: http://processwire.com/talk/topic/1428-create-new-child-as-top-sibling-rather-than-bottom/1 point
-
@Roope: Assigning an object does not copy the contents of the object, only its identifier. After the assignment to $slides, the variable holds the same object identifier as $page->advertize_homepage. So you're actually using the very same object there, which explains the behavior you're facing. Like Fokke said, you should use clone to make a copy of an object to keep the original object intact. See http://php.net/manual/en/language.oop5.references.php for more information on objects, object identifiers and references in PHP5.1 point
-
The PW forum is great! I learned a lot but still have a long way to go to contribute more. At least I hope the other members can learn from some of my newbie mistakes. Congrats to all the PW community and a big thanks for sharing their knowledge.1 point
-
Thanks for the report, I just pushed an update. and should be working now. Problem was I never used dates, and I had page outputformatting turned off for easier image handling. Drawback of this is there's no N/A when there's no image found.1 point
-
Like it - nice additions One thing I was thinking about a while back was being able to maybe use a colorpicker to select 3-4 primary colours and have a module save those to a CSS file so the admin colours could be changed easily. Might be something worth considering time-permitting? Obviously you can end up with some pretty garish colour schemes that way so would be one for superusers to control I think.1 point
-
Ok, A new version has been pushed to GitHub. This takes care of the first two enhancements mentioned in the first post There are a few new options in the field's Input tab: Number of poster images to generate Images will be captured at intervals from throughout the video. This determines how many will be created. The user can choose which one is available to templates via $page->video_field_name->poster NB - if you change this to more than one (default), I would recommend also checking: "Display thumbnails in page editor?" to keep things looking manageable. Copy poster image to dedicated image field? This will create a copy of the poster images in an image field of your choice. NB This is not necessary for accessing the image. Name of the field that you want to have the poster image copied into This is only relevant if you have the checkbox above checked. Lots more to do, but thought you might like to see the next iteration. I am not sure on some of the behavior regarding copying all created thumbs to an images field (if selected). It might be better to just copy the one selected by the user. Code is still a bit of a mess - want to get features created first, then will clean up.1 point
-
No worries, that's pretty much what I already do. Unless a block of code is instantly understandable to me, I generally recode anything that goes into the core so that I can fully understand and comment it. That's why it sometimes takes me awhile to bring in PRs. But since I've got to support the code in the future, I figure I need to go through the process.1 point
-
The PagefilesManager::url() method is now hookable on dev. For high volume functions like this, I go a little further than just prepending 3 underscores and instead implement both a hooked and non-hooked version, just to reduce any potential overhead. Meaning, PW's hook system doesn't get called upon unless/until the function is hooked. Not sure it really matters, but it's just a minor optimization.1 point
-
A little bit of new fun stuff on the 2.3 dev branch: Anonymous functions and hooks You can now use PHP 5.3+ anonymous functions when attaching hooks. All the syntax below will work either from your template files, modules, or any Wire derived class. If using outside of template files or Wire-derived classes, then replace $this with wire(). Though anywhere that you can use $this you can also use wire(), so syntax is also a matter of preference. Example: Add a "hello()" function to all pages that returns "Hello World!": $this->addHook('Page::hello', function($event) { $event->return = "Hello World!"; }); Result: echo $anyPage->hello(); // outputs: Hello World! Example: Add a 'hi' property to all Users that contains the value "Hi [their name]!". $this->addHookProperty('User::hi', function($event) { $user = $event->object; $event->return = "Hi $user->name!"; }); Result: echo $user->hi; // outputs: Hi Ryan! Example: Add a grandparent() function to all pages. $this->addHook('Page::grandparent', function($event) { $page = $event->object; $event->return = $page->parent->parent; }); Result: $myPage = $pages->get('/about/news/categories/sports/'); echo $myPage->grandparent()->url; // outputs: /about/news/ Example: Save a message to a log file for each new page that is added. $pages->addHookAfter('added', function($event) { $page = $event->arguments(0); $this->message("Added new page: $page->path", true); }); Result: The message is added to log file /site/assets/logs/messages.txt when a new page is added. Example: Add a 'createdString' property to all Page objects that is the same as $page->created except that it outputs in a human readable format rather than a unix timestamp: $this->addHookProperty('Page::createdString', function($event) { $page = $event->object; $event->return = date('Y-m-d H:i:s', $page->created); }); Result: echo $page->createdString; // outputs 2013-04-30 03:05:00 This just touches on the possibilities with some overly simple examples. But you can use these anywhere you'd use any other hooks: from within modules, templates, or anywhere in ProcessWire. I think that the anonymous function syntax is particularly convenient within templates, when you can define your own helper functions in your head.inc or init.php or whatever file you have starting your templates. Don't forget you can add stuff in /site/templates/admin.php too in order to hook into things that happen during administration. Error and message logs ProcessWire has always maintained logs, but I'm guessing that most don't know how to write to them. So I setup a simpler syntax for you to save things to PW's system log files: $this->message("This text will be saved to /site/assets/logs/messages.txt", true); $this->error("This text will be saved to /site/assets/logs/errors.txt", true); This is the same as these functions worked before, except for the second "true" argument, which tells it to write to the log file. From the admin side, it'll still display these messages interactively. If you only want it to log and not display the messages in the admin, then replace the "true" with "Notice::logOnly". Though if you are doing this from templates, then you don't need to consider that since templates (other than the admin template) don't typically output ProcessWire's notices. --- Edit: I changed the wire() syntax in the examples to $this. Though either works from template files and modules, but I think $this syntax is more familiar to most.1 point
-
I was thinking about this alot in the past since translations are in PW. I can't remember if it was discussed already, I think only little. That's a valid question or concern I think we should have to recommendations for 3rd-party modules. I don't think it's tedious, just a question of how you handle it. Translations in core was added not so long a go and was a sponsored by Antii's company (?) feature Ryan added. It's s very well implemented but in some areas still a little rough (no offend Ryan). It works all well and even resulted having language text fields (adds inputfield for each language automaticly) and even possible to have alternate language fields (fieldname_de,fieldname_en) which is awesome. Creating language packs is hard work, but it's always possible to extend some things or create helpers int he future (did one recently created one here for Radek http://processwire.com/talk/topic/2540-czech-localization-textdomainhelpermodule/). Adding languages is easy but I still am not happy with the interface where the json files are stored. Hard to get an overview and deleting all is cumbersome (70+ files) manually. But the system is there and it's maybe only a matter of building a more advanced manager for the files, which shouldn't bee too difficult. Just takes some time. We are still not even a year into PW added translation and people are now slowly coming in and start to point out issues cause they're using it. So thanks for everyone sharing he's thought to show there's some need. I know Ryan doesn't use multilanguage feature and most western don't. We in Switzerland have the opposite, 90% of the sites have at least 3-4 languages. Mostly we do the front-end translation using yaml or php vars to have translatable strings at it doesn't have to be done with PW. Also, rarely we use modules that then would need translation for end users and most of the time the editors are one-languaged group of people. So haven't really come to using it that features much apart from the core admin. Some things may could be considered as mandatory for modules added to repository: All 3rdparty module should have it's text strings translateable. (some module were built before core translation, like Thumbnails) All 3rdparty module should have some folder for translation to be added. So other's translating it can add the json file.1 point
-
There is a way. // first get parent and it's first child $parent = $pages->get(1001); $first = $parent->child; // create new page with same sort as first child $p = new Page(); $p->template = $templates->get("basic-page"); $p->parent = $parent; $p->title = "Make me first"; $p->sort = $first->sort; $p->save(); // move first child to second position $first->sort++; $first->save(); Now your new page is at first position. However this only work if you got manual sorting on parent of course.1 point
-
Hi seddass, Go to modules overview and look for the page name input field. Click on it, there you can define the rules for the char replacement. Try to include the Cyrillic characters there.1 point