Leaderboard
Popular Content
Showing content with the highest reputation on 06/28/2013 in all areas
-
Some fun stuff just pushed to the dev branch: the core now includes a Modules Manager "Lite". The screenshots below best describe how it works. But it lets you install modules from the directory just by typing (or pasting) in the module's class name. It also provides a 1-click capability to check for a given module's updates and upgrade it when necessary. Beyond that, the modules screen is now split into tabs: Site, Core and New. Site shows just your /site/modules/, and Core shows just your /wire/modules/. The New tab is where you can install modules. I really wanted a solution that kept the actual browsing for modules out of the CMS. Not because I think it's a bad idea (it's a great idea) but because I wanted the modules directory (modules.processwire.com) to serve that purpose as much as possible, at least as a default. That way I don't have to worry about scalability as the size of the modules directory increases. Plus less automation might make the newbies be a little more careful about what they are installing and where it's coming from. The power of the automation in ModulesManager here is so powerful it scares me, so think it's better for the users that know what they are doing. Lastly, ModulesManager is one of the best modules out there and Soma does an amazing job with it. Bringing a little taste of ModulesManager into the core I thought would help both projects. Most credit for the new core "Modules Manager Lite" goes to Soma (though he doesn't yet know that). It's all built around his code lifted directly from Modules Manager. Hope that's okay Soma? Your code now powers not just the new stuff in ProcessModule, but also the new WireHttp::download function, and the new wireUnzipFile() function, all added this week. People who want the most power will still want to use Soma's Modules Manager. That does a whole lot more than the built-in one does, including installation of themes, checking for updates en-masse, and browsing and filtering through the modules directory. But now you can install ModulesManager or other modules without having to manually FTP things to your server (so long as your /site/modules/ is writable). Please let me know if you guys run into any issues with it.6 points
-
Go to Admin > Modules > find module called "Page Search". There's a setting for "Default fields to search".6 points
-
------------------------------------------------------------------- LanguageFieldTabs is now included in ProcessWire by default (version 2.4). Unless you are using version 2.3 DO NOT install this module, instead navigate to Modules and then core and you will find the module in the Language section ------------------------------------------------------------------- LanguageFieldTabs Beautify and organize you Field Languages into tabs! DOWNLOAD - Github DEFAULT UI UI IN "UNIFY" ADMIN THEME Sorry for the lack luster write up, will add to Modules Directory later, late, long day tomorrow. Enjoy! (very much beta maybe alpha, minimal testing, just quick evening idea at this point). Changelog v1.0.2 Improved styling capabilities (added surrounding class "LangTabsContainer" ) Added admin wide support Fixed description text order (was being pushed to bottom) v1.0.3 Added support for toggling tabs display and faded labels to represent empty fieldsv1.0.4 Fixed tabs destroy error Moved toggle into Inputfield ui-widget-header3 points
-
I'm building something like block elements for processwire, it's just as with such system that they are complicated to do and often the system you implement them come to limit in terms of functionality or UI. If you are interested I could share the bare bone WIP proof of concept. We use a CMS at work for many years which allow such block system to build directly in the template that then is editable for the end user. You add a new block, select what type of block, and it will load the "template" with the field defined there. And so on, you can limit the count of the block, sort them and so on. Unfortunately the CMS has many flaws and is somewhat bloated and sometimes becomes a burden. It's as open as PW regarding what you build with it, I'd even go as far as saying it is a lot more flexible than PW. PW is just a lot more convenient to build structured data as is, simple and modular extendable and a lot more fun and reliable. If you want it's like Repeaters on steroids. This is what I originally imagined that repeater would be, but it came a little different. There were some people also discussed this when repeaters were introduced. Imagine Repeaters where you can select a "template" for each item. Each of them representing custom fields as many or different as you like. Those "templates" could be associated with a repeater. What I tried is to find a way to use the repeaters as a base for this and I think it would be possible to adapt them to work this way. Just a lot of work I then started building something from scratch just for fun that works like repeaters but only in the frontend. In the template you define the blocks you want to use for the repeater and it then will render a editable, sortable simple interface if logged in to manage block, and render them when not logged in. The block are pages saved unter a parent in the admin. There's no interface for the admin as this would go too far for now. You then could define a text field for a title and a textarea for the paragraph, and image with alignment, another with a video, another with a map etc. And if Wysiwyg used it would only to be able to set links, bold and such things as basic styling. This way you can get away from using a Wywiwyg as the main content editor and put everything in there which we have to agree is only as good as the editor, and we all know they can cause troubles. Rather than having building a complete new system with UI and not what for within a textarea or Wysiwyg, which would already exist if it would be a good way, I'd rather see the repeaters on steroids, for block based content easy to edit and build.3 points
-
Added support for toggling tabs display and faded labels to represent empty fields. Rough for now but useful for feedback I'm sure. Thanks guys.3 points
-
And now, for something completely different http://line25.com/inspiration/line25-sites-of-the-week-for-june-28th-20132 points
-
Take all my code and money too. Well the latter comes in form of code. Serious, I'm very proud to have played a role. I agree with what you said and will first go check it out and come back later...2 points
-
BTW you guys know you can add predefined templates to TinyMCE that can be selected and inserted to fill in? Those are html templates and they can contain tags that will be replaced with current date, user name or anything. You even see the preview when selecting them from the dropdown. It's much like what Macrura posted just "better".2 points
-
If you have phone numbers written down, you usually have a name written down next to each number, right? This is metadata that puts the numbers in context. So yeah, data-types like phone numbers and e-mail addresses are necessary, but they usually have metadata associated with them to give them meaning. They're also both examples of data you can associate with a human relation. Images? not so much. Anyhow, we're edging on that topic again, so I'll just say - I still think the real problem is WYSIWYG, which is too limited and simple. For every other thing the user would enter into a user interface, we have some kind of interface that provides guidance, meaningful constraints, structure, advice, context, process, or flow - except for the most important type of input, the one for the actual content... for that, we're perfectly happy leaving the user at his own devices, working with the raw media (HTML) without any real constraints or guidance, short of picking an image from a list - censoring certain dangerous HTML tags, or otherwise crippling the user-interface to limit their use of the medium. It's just no good. Solutions involving codes or tags are usually chosen because they're easier to implement, not because they're "better" - after all, you wanted a WYSIWYG in the first place, and codes or tags are not "what you get". Somebody went through hell and high water to create a WYSIWYG, to enable the end users to work with the raw code without seeing the code - and then we just go and invent more code, and put it back in the WYSIWYG. To me that completely defeats the purpose of using a WYSIWYG in the first place. Anyhow, I've said all this before, but I don't think working with the raw medium is the answer. Yes, content management should be visual - but somebody (me? if only I had more time) needs to invent a proper abstraction for content. Something that accommodates images, as well as other media-types, as well as any other solution-specific data-types, without having to climb Mt. Everest to get there. On thing that comes to mind is these Bootstrap drag-and-drop design tools that are cropping up every week now, have you guys seen those? They provide a structured, guided, visual way to build entire web-pages out of components, which is not precisely what I'm looking for - but something along those lines. Something that allows you to get creative without editing raw HTML or entering codes or tags. Something that guides you through the creation of rich, structured content, without getting in your way - and where you can easily drop in another component template at the user's request. I will keep dreaming of this in obstinance until I or somebody else creates it2 points
-
Easily insert any complex HTML, Javascript or PHP output in your ProcessWire content by creating your own Hanna code tags. This module is based loosely on the WordPress Hana Code Insert plugin. A Hanna code tag looks like [[hello_world]]. A Hanna code tag with attributes looks like [[hello_world foo=bar" bar="foo]] using HTML style attributes or [[hello_world foo=bar, bar=foo]] using ProcessWire selector style attributes. After installing the module, you define your Hanna codes in Setup > Hanna Code. These Hanna codes that you define can then be entered within your body copy (or other text where you allow) and they will be replaced with the values defined or generated by your Hanna code. A common use case is to embed scripts or other bits of HTML or codes that would usually be stripped out by an editor like TinyMCE. However, Hanna codes can be more than just static snippets--they can be dynamic PHP or Javascript that outputs different things according to the request. PHP-based Hanna codes have access to the entire ProcessWire API. Hanna code accepts named attributes in the tag that can be passed as variables to PHP and Javascript Hanna codes. These attributes can be specified either in HTML attribute format or ProcessWire selector format. In either case, quotes should be used around the attribute value when the value contains whitespace or a comma. How to install Place the module files in /site/modules/TextformatterHannaCode/ In your admin, click Modules > Check for new modules Click install for TextformatterHannaCode Now to go Setup > Fields and locate the Textarea field(s) that you want to use Hanna codes with ("body" for instance). When editing the field, click the details tab, and select "Hanna Code" as the Textformatter. Save. Now go to Setup > Hanna Code and start defining your Hanna Codes! You may want to use one of the examples from this document to get started. Tag format Below is a Hanna code tag named hello_world with no attributes. If you pasted this into your body copy, you would get whatever the replacement value is that you defined. [[hello_world]] Below is a Hanna code tag named hello_world being passed attributes of foo, bar and foobar. If this were a PHP-based Hanna code, it would receive the variables $foo, $bar and $foobar: [[hello_world foo="bar" bar="foo" foobar="foo bar"]] Below is the same Hanna code tag as above, but with attributes more like ProcessWire selectors. You can use whatever format you prefer. Just note that unlike regular ProcessWire selectors, quotes (single or double) are required around any value that has whitespace. [[hello_world, foo=bar, bar=foo, foobar="foo bar"]] How to use Please make sure that you have completed the How to install section first. Then in your admin, go to Setup > Hanna Codes. Each Hanna code that you add has a type of either: Text/HTML, Javascript or PHP. The Text/HTML type is literally self explanatory in that your [[custom-tag]] is replaced with exactly the text you paste in. Anywhere that you type your [[custom-tag]] in your body copy will be replaced with exactly the static text you defined. More power opens up with the Javascript and/or PHP types of codes. These codes execute at runtime and thus can contain specific logic to produce different results. In fact, PHP Hanna codes have access to the entire ProcessWire API and are executed in the same manner as template files. Your PHP-based Hanna code should simply "echo" or "print" the replacement value. PHP example Create a new Hanna code with the name "children". Select "PHP" as the type. Paste in the following for the code: foreach($page->children as $child) { echo "<p><a href='$child->url'>$child->title</a>"; } Now go and edit a page that has children. In the body copy, enter [[children]] in the place where you want the output to appear. View the page, and you should see the rendered list of links to children. PHP example, part 2 Now lets take the above example further... Go back and edit your "children" Hanna code, as we are going to modify it to respond to a "parent" attribute. Change the code to this: if(isset($parent)) { // If $parent is an ID or path, lets convert it to a Page $parent = $pages->get($parent); } else { // otherwise lets assume the current page is the parent $parent = $page; } foreach($parent->children as $child) { echo "<p><a href='$child->url'>$child->title</a>"; } Go back and edit the page where you previously inserted the [[children]] tag, and change it to: [[children, parent=1]] (specifying the homepage) or [[children, parent=/path/to/some/parent/]] if you want to try something else. View the page and you should now see it showing the children of the homepage (or of another parent you specified). Please see the Javascript and PHP usage notes on the Hanna code entry screen. Security There are major security implications with a tool that will let you enter unfiltered text and code from your web browser. As a result, Hanna codes are meant for definition only by superusers and we recommend keeping it that way. Download Download the Hanna Code module from the ProcessWire modules page or from GitHub.1 point
-
Today I needed to install the latest Textile on an older site for a client, and figured I would go ahead and make a PW2 module out of it at the same time. Textile is the markdown language included with Textpattern CMS and apparently also used by Basecamp and Google+ to some extent. More information about Textile and syntax here: http://en.wikipedia....kup_language%29 Textile is very similar to Markdown (already included with PW), though now that I've spent some time with the syntax, I think I might like Textile a little more. To Install Download or clone from GitHub at: https://github.com/r...ormatterTextile Place files in /site/modules/TextformatterTextile/. Go to Modules in the admin, 'Check for new modules' and click install for Textile under the Textformatter section. You'll also see 'Textile Restricted' and that is a separate version of the module that may be used with untrusted input like user-supplied input or blog comments. The regular Textile should only be used with trusted input. To use Add this to any textarea (or text) field, and that field will interpret Textile codes and output XHTML markup on the front end of your site. Note that Textformatters appear on the 'Details' tab of the field editor when editing a text or textarea field. Use the regular 'Textile' unless the field in question may contain untrusted user input, in which case you should use 'Textile Restricted'. Please note Don't use this in combination with other text formatters like Markdown. Don't use with TinyMCE (there would be no point). This module may be used with any version of ProcessWire: 2.0, 2.1 or 2.2+.1 point
-
OK, Is the following the situation? So, your tree goes something like... recipient acorn foundation althorp trust aglow int abilities in action 1st O. scouts Each of those child recipient pages (aglow, etc.). have several repeater fields. And, adding the totals on each child page (e.g. aglow) adds up fine with the code on your first post And, now you want to pull those child totals and list them as shown in the link to recipient list? E.g. aglow $1000 acorn foundation $4000 althorp trust $7000 Right?1 point
-
Greetings, I felt a needle-like pain in my head, and wondered where it was coming from... Ah, there it is -- Joomla and Artio. All jokes aside, it is true that in Joomla there are ready-made components that take care of a whole range of actions. But then you have to override what you don't want or need, wage mortal battles where various pieces of baked-in Joomla code conflict with your modules and plugins, and spend hours trying to get a developer's attention long enough to figure out where in the world they placed the code for a particular action you need to customize, and why they put it there. And let's not forget that no Joomla component can be used without... Joomla! Which means you are also inheriting its migraine-inducing template system, admin area, lack of custom fields, mind-numbing dummy menu entries and plugin ordering (Joomla people will know what I mean by these last two). OK, let me take a breath... I understand the idea of using something that has "been done already." But since I started using ProcessWire, in all seriousness, it takes me less time to create something from scratch than to wrangle with any of Joomla's "ready-made" code. Two better ways to go: 1. Get part-by-part help from the community 2. Find ready-made JQuery, PHP, and other components that can hook into ProcessWire Thanks, Matthew1 point
-
1 point
-
This is a little bit of a tough one because dates are basically sortable integers. So a 0 is considered end of 1969 (or somewhere around there). You can query for those with a 0 date value and those with a date>$now with separate children() calls. But when it comes to pagination, the question becomes how you would want to sort those with no date value and those with a date value. If one or the other can be consistent at the front or back, that will make pagination simpler. Also you can manually set the pagination limits on a PageArray with $all->setLimit(); $all->setTotal(); etc. Another option is that you could always query the database manually to find the IDs of the matching pages, then bundle that into your children() query. Here's two example, one using PDO (PW 2.3.1 and newer) and one using mysql (PW 2.3.0 and earlier): // using PDO $now = date('Y-m-d H:i:s'); $sql = 'SELECT pages_id FROM field_expiration_date WHERE (data IS NULL OR data=0 OR data>:now)'; $query = $database->prepare($sql); $query->bindValue(':now', $now); $query->execute(); $ids = $query->fetchAll(PDO::FETCH_COLUMN, 0); $expired = $page->children("limit=20, date<=$now, id=" . implode('|', $ids)); // using mysqli $now = date('Y-m-d H:i:s'); $sql = "SELECT pages_id FROM field_expiration_date WHERE (data IS NULL OR data=0 OR data>'$now')"; $result = $db->query($sql); $ids = array(); while($row = $result->fetch_row()) $ids[] = list($row); $expired = $page->children("limit=20, date<=$now, id=" . implode('|', $ids));1 point
-
Another one finally online: http://pwpromotion.de A site for a recruitment agency, specialized in the beauty sector. No fancy PW features here although the application form built with the incredible Form Builder is quite complex (choose one "Fachrichtung" to open even more fields) ;-)1 point
-
Great form builder implementation you've got here too. I love the way you styled it and the way you've setup JS-based field dependencies. Awesome work.1 point
-
Hi there! I just started using PW about a week ago and I'm loving it so far -- it's so much more powerful and flexible than Wordpress, where I came from. I don't think I'll ever go back to Wordpress unless I'm actually making a blog. I'm building a website for a sports league nonprofit, and the time has really come for a CRM / member management solution, because we have about 150 teams and each team has around 20 individual members each. We're looking into Salesforce, which I know can integrate with PW, but it has a lot of features we don't really need and doesn't seem like a perfect fit, so I'm looking into CiviCRM as well. Has anyone used CiviCRM with PW? I know they have a version that integrates with Wordpress, and does anyone have any idea how hard it would be to tailor to work with PW? I'm on the beginner end of the intermediate spectrum with PHP; I've built tons of Wordpress templates with a lot of customization, though I trip up a bit with object-oriented PHP. I have a lot of time to learn and improve, though! Thanks in advance!1 point
-
Thanks for the update–It works perfectly here! I will submit a pull request to you that makes the title attribute translatable. I also moved the hook-attach logic to a ready() method (rather than init), and made it attach the hooks only if the page template is 'admin'.1 point
-
You should describe in more detail what you want to achive, I'm sure you'll get answers here1 point
-
There are long pages in my project, and I'm tired to scroll up/down to save the page. So I've installed this module again and added this little fellow - "return false" "e.preventDefault()" to the function savePage in AdminHotKeys.js and browser doesn't fire "save dialog box" any more on Ctrl+S. if($('button[id*="submit"]').length > 0){ function savePage(e){ $('button[id*="submit"]').trigger('click'); e.preventDefault();}; $(document).bind('keydown', hkconf.hk_save, savePage); } Soma, thx again 4 the module. upd: fellow changed %)1 point
-
Thank you so much, guys, for responding fast and being such great helps And I am excited to start my first project in processwire, will probably come back for more answers1 point
-
1 point
-
Hi Billy Koch, there are also some threads existing which cover relevant things to userpages / communitysites and that like. There are also code examples or strategies on how to implement things best. So, you have to look around for this and some existing modules and have to put together found parts to become your desired site / module. And like Matthew already said, if there is a part you need help on, ask here ...1 point
-
1 point
-
Greetings, Interesting to see someone mention Yii here. I have spent a lot of time with Yii, and before that with CodeIgniter and Laravel. I think it is an interesting topic -- integrating framework elements into ProcessWire. But I think it belongs in a separate discussion from "configuring template path." I started one here: http://processwire.com/talk/topic/3934-integrating-framework-elements-into-processwire/ Thanks, Matthew1 point
-
you would decide which pages need to have that tag, so for example if they were all pages of a certain template named "something" you would use this in the head: <?php if($page->template == 'something') { ?> <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> <?php } ?> or if you had a checkbox called "no_robots", then like this: <?php if($page->no_robots == 1) { ?> <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> <?php } ?>1 point
-
What about making a website for your self about a specific topic that is interesting for many people. Build this website up for a couple of years, rank it up in google and then make money with google adsense / adwords and payed advertisements from local businesses ? I know a german man who is living not far from me and who is working from home and made this website by him self (check the advertisements from the local shops and business) http://www.comprendes.de This website is for german tourists and german people who live in spain and this website is making enough money for him so that he can live from it. Just another example that it is really possible.1 point
-
This worked perfectly and the documentation is a big help. Thanks Ryan!1 point
-
one important key to professionalism is to take professional rates. 15/20 euros is not enough to make a living from. this is, why you attract clients who doesn't take you for serious. they simply doesn't consider you as an professional. however, if you feel you are not market ready do a regular job and in you off-time work on a really good project you love to work on. do this for a person/client you like and who doesn't set you under pressure. use it for learning and improvement. once ready, you have something to showcase. than go to the market and tell prospects: this is what i can and i'll do it for you for a professional rate.1 point
-
Yep, this is great module. I also want to encourage people to write their own import scripts. It is simpler than you can believe and you can re-import easily.1 point
-
Greetings, I'll jump in as well... Not too long ago, I used this module to run the initial import for a TV station project, where I needed to get 550+ pages from an old Joomla site. After getting the data into the right csv format from the database, it was unbelievably smooth and easy to populate the pages. I kept thinking, "Something will certainly go wrong with this," but it didn't! I got all the existing Joomla pages into ProcessWire perfectly. After that, the client used ProcessWire to create new pages. My next goal with this -- build a front-end way for clients to do the imports themselves. By the way, I was prompted to post this after reading and responding to this post: http://processwire.com/talk/topic/3917-importing-users-and-content-from-joomla/ Thanks Ryan! Matthew1 point
-
Just wanted to say Thank You for this great module. I am working on a quite large project at the moment for which this module already has helped a lot.1 point
-
I don't find it "scary", but I have been building web sites for long enough to know that many clients will reject the idea of having to type in codes, out right. It doesn't matter how "easy" or "clever" your codes are - code is code, and many clients want WYSIWYG and simply will not accept that. For myself, personally, it would work great - probably much better than a WYSIWYG. But you and I are programmers. A lot of non-programmers will throw their arms up in despair at the sight of an angle bracket. And I get that. We should be able to come up with something better for those people. Something that is as easy and as visual as a WYSIWYG, without sacrificing ease of use or introducing codes. I say we should be. I don't think it has been done yet - if it has, I still haven't found it...1 point
-
Just to defend again ImageManager... you can select and insert images in wysiwyg as usual.. just browse the pages and select the image. It's mentioned in the description. Also I don't think it's hard or complicated to copy a tag into the body.. and after saving you'll see the image and can threat it as with all image s in tinymce.. for example change the image or resize it in the editor. But I think people are too scared to even try it so it's a little hard without people testing and giving feedback to further develop it.1 point
-
Let's face it, the more you know about driving the faster you can drive your Porsche. If you are not skilled enough, you might get your car to 120 mpH, and that's your limit. Whatever product you build, you always have to compromise between accessibility (may be used by everyone) and scaleability (not for everyone, but the sky is the limit). PW has opted for the second route and that's a wise decision imho - though it clearly limits accessibility/popularity. There are enough CMS out there with which the less experienced can click together a website. A good example is Contao (though it is a good system with a strong foundation). Need a quick mockup, site structure, easy to use and maintain? Done in a second with Contao. Need a headline in two colors and therefore a nested span? And the whole thing must be maintainable by the client? Uh, think twice and check you budget again. No, from my point of view, the market gap is there for a system like PW, not for another click-ready-solution. I'm not a coder at all, my PHP skills are on a very basic level. But I feel as if I always get the support I need though it remains true that everybody has to climb his learning curve by himself. That's the price you have to pay for an open system. Just my two cents.1 point
-
I didn't realize before that PageLinkAbstractor doesn't work in this scenario, so will have to put some time into correcting that. But for now I think the best bet is to just search/replace your DB dump when migrating it from dev to live (and this is what I do regardless).1 point
-
This is an simple example module one can create within minutes to add a custom template variable "$channel" you can use in templates if you load the module (note it's not autoload). The important part here is the $this->fuel->set("channel",$this); in the init() function, which creates the template variable (like $pages) and attaches the class to it with $this. Just a simple $modules->get("ModuleName"); will do it in the start of you main template or, you could also make it autoload if you really want to load in on every request (front and backend) Create a module MyChannels.module with something like this, install it and you're set. You could create also one module for tags. class MyChannels extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'My Channels', 'version' => 100, 'summary' => 'Useful functions for templates.', 'href' => '', 'singular' => true ); } public function init() { $this->fuel->set("channel", $this); } public function countMedia() { $count = $this->pages->count("template=media-channel"); return $count; } } To load the module in a template $modules->get("MyChannels"); // load the module // now you can use echo $channel->countMedia(); Another method would be to have a helper module, that also isn't autoload, but you instance it on a variable and use it to call different module public methods. Same code but slightly different in that you only have one module with lots of functions and use it slightly different. class MyHelpers extends WireData implements Module { /** * getModuleInfo is a module required by all modules to tell ProcessWire about them * * @return array * */ public static function getModuleInfo() { return array( 'title' => 'My Helpers', 'version' => 100, 'summary' => 'Useful functions for templates.', 'href' => '', 'singular' => true ); } public function init() { // maybe good to add hooks here if needed in the project } public function countMediaChannel($options = null) { $count = $this->pages->count("template=media-channel $options"); return $count; } public function countMediaTag() { $count = wire("pages")->count("template=media-tag"); return $count; } } To load this module in a template $mediahelper = $modules->get("MyChannels"); // load the module // now you can use it echo $mediahelper->countMediaChannel(",include=all"); I do this a lot, and sometimes only because it's fun and feels good, but also helps. Everybody can do it, even I. This is only some pseudo code, but there's nothing else involved. If you familar with PW API in templates you can code modules. Also take a look at the HelloWorld.module that comes with the basic-profile install. There's also more examples like properties1 point