Leaderboard
Popular Content
Showing content with the highest reputation on 11/02/2013 in all areas
-
Trust me, Ryan, I never pop! Sorry I have not been around. Couple of distracting bits going on earlier in the year and I was away a bit (serious glamping!) and also been working on an album for a publisher. My web activity has dwindled to nothing! I do have one little project for an angling club coming up, however, and of course I will be using Drupal, Wordpress, Joomla ... PROCESSWIRE for it. I suppose I should, as an amateur, stick to those things with thousands of clunky plugins, but for some reason I want the site to work and be more or less maintenance free. Fussy me. Hugs all round.8 points
-
I am currently sharpening up my branding credentials by doing an online course on branding. It is a free course which is being put together by the Open University (a remote access university in the UK) under the moniker of Future Learn. https://www.futurelearn.com/courses/secret-power-of-brands-2014 (The course will be restarting in the new year if anyone wants a go - it is very good.) Doing the course has reminded me that often the technical considerations of a website perhaps do not take into account the needs of the brand and its relationships with brand followers - the customer, mostly. So, I thought I would note down a couple of paragraphs of observations that although probably not new to most of you here, might also serve as a reminder about how important the brand is and how both the developers AND the clients should not be sidetracked by this wonderful new technology into undermining the brand, or losing the opportunity to reinforce the brand. Big Brands and Little Brands It is very easy to assume that a brand is something that only belongs to a colossus of a company - Coca Cola, Ikea, Virgin, Woolmarts. These brands pour huge amounts of capital and service expenditure into promoting and sustaining their brands and have built them over many years,. But a tiny company, organisation or even a single crafts person can also benefit from all the rules and ideas that are used to help large brands; it is but a question of scale. For instance, Coca Cola works hard to seek consistency of product throughout the world. As global travel has become easier and cheaper, this has proved invaluable as the loyal customer can enjoy the same drink, at the same quality, wherever they go. In a smaller but equally important way, a local builder/decorator will do better if his "brand," basically the person themselves, has a reputation for consistently good work. If they slip up on a job then they undermine their own brand and lose market positioning - their formally loyal clients will go find another builder. The words associated with branding actions may seem idiotic when applied to just one bloke with a paintbrush, but they are no less valuable. So, just because the website your are designing is for a local group of fisherman rather than a supermarket chain, does not mean that the brand can be ignored (even if the client does not realise they have a brand) Brand Types There are various versions of branding: 1. A mark or label saying that you own this brand 2. Guaranteeing quality by building a reputation for quality 3. Promising Pleasure - your life will feel better by owning this product 4. Inviting belonging - basically, building a brand in such a way that you build loyalty; you make people feel like they have ownership of the brand You can see that these are more or less in chronological order. The first version is how brands first appeared a few centuries ago. The second is something that grew up in the late 19th, early 20th century, the third version is something we recognise as much more modern and the fourth is very much the new approach to branding. The fourth is especially important to modern, large, multi faceted companies where they can build confidence in the main company brand that will then influence all their main products. A great example is Virgin where the "Virgin" brand informs us about how we feel about their planes, trains, record shops, broadband, cola and so on. Wally Olins, a world leading brand practitioner, defines a modern brand as: "Branding is a profound manifestation of the human condition. It is about belonging: belonging to a tribe, to a religion, to a family. Branding demonstrates that sense of belonging. It has this function for both the people who are part of the same group and also for the people who don’t belong." It is very easy to see how this might relate to some of the functionality that is possibly with a reactive and interactive web policy... The Fifth Brand The most recent version of a brand expands on version four to take in modern social media and the general interconnectivity that has come with the growth of the internet. This is where Brand can be seen as a platform, where the brand is making things useful to the user rather than being just about ownership. Ebay and Google are both good examples of where a brand is more than a product but is something useful too. Version five is a difficult fit for a lot of business out there with very traditional products and services but that does not mean it should be ignored. When we create a website for a brand, taking time to think about or quiz the client about how their product/service is viewed and used by their clients and how the website can connect with not just the client, but connect with how they use the brand, might mean that the website becomes more than just a brochure for the brand, but becomes PART of the brand. How can a website be the brand? Obviously, an website for an online shop where the shop is the brand, is the brand itself. It is not representing the brand, the brand is the shop. That is a bit of a no-brainer, you would have thought. But I have seen enough online shops that seem amazingly divorced from the brand. They use a very obvious template, take people through the catalogue in a very common way and give the shopper exactly the same "chopping" experience that every other online shop does. Oddly, bricks and mortar shops tend to do the exact opposite. They will work very hard at giving shoppers a unique experience, within a unique environment, all designed in such a way that the exercise of shopping becomes not just efficient, but enjoyable. The experience of shopping must have the same brand values as the very products themselves. Can not an online shop take into account the same criteria so that it too not only sells products associated with the brand but reinforces and becomes part of the brand? This same criteria can be taken away from the online shop and applied to any other kind of website. Again, just as with the shop, the website should, as part of a modern brand, become a useful thing. It should be an enjoyable and informative experience in line with any other manifestation of the brand. The website should offer the user (the client or visiter) the ability to be involved with the brand, to take ownership of it and to feel like they belong to it. But, this should be within the confines of the specific brand. It must have the tone and feel that the brand needs because the site will BE the brand, not just be reproducing the brand. Shared Value Companies, big and small, will often get involved with local or national issues either by offering time for nothing or by being philanthropic; giving donations to local causes and so on. Shared Value is the idea that a company can, rather than just give stuff away, design their product, services and the brand itself so that it brings benefit to society, local community, environment and so on without doing a give-away. By building the brand using the principles of shared value, the company can bring together the ideas of being beneficial while making a profit - rather than these being two mutually exclusive elements of the brand. Simple examples of this is, for instance, a company deciding to use energy from renewable resources or recycling any waste from manufacturing. These are written into the operating costs of the company and will benefit the brand and benefit the environment, for instance, at the same time - and this will help increase profits. Small companies can also use the idea of shared value. A local company, for instance, can, as much as possible, use local suppliers - benefiting the local economy directly while also selling to the local economy. The two work hand in hand without being philanthropic and so create profit directly. If a company decides to work in this way, then this should be taken into account with the website. Can the design process of the website use the companies specific philosophy of shared value? Does the website highlight how the brand works and is supported through Shared Value? For more on shared value, see this presentation on YouTube - it is long and badly filmed, but if you are into branding, then it is a must watch: So, there you go. A very short thought on branding and how, when creating a website, you should start with the brand and not with the technology. Personally, this is where ProcessWire is useful. Simply because it does not limit how your web design might work, it allows you to look at the brand in detail, work out how the brand should be embodied in this thing called a website, then use ProcessWire to quietly achieve not just a Web Site, but a Brand Site! (I should copyright that...) Joss3 points
-
Chinese Language Packs. note: The TinyMCE works in English, because I can't set the language code to zh-CN. click this link for detail. http://processwire.com/talk/topic/4803-i-want-translate-pw-to-chinese-and-need-support/ you can download this pack from github too. https://github.com/liyiwu/Chinese-ProcessWire update: cd wire grep -Rl '[>_][_nx](' * | uniq I find 90 files, and translate all of them that is translatable. Hope this can help others. Chinese-ProcessWire.zip3 points
-
Rest assured this will be added soon (along with Horst's updated ImageSizer stuff), and certainly before the version is bumped to 2.4. Thanks Soma for your updates here. There are a lot of people using dev in production, and there were just enough code changes/additions in this one that made me want to be sure I took the time go go through it thoroughly line-byline in the code, and then test thoroughly. It often takes me a couple hours to work through individual pull requests to feel like I've given them all the attention they deserve. So while I'm not good at being timely with it, I am generally good at being thorough with it. Also, as Soma mentioned, busy times (looming client project deadlines, which always seem to gravitate towards the final months of the year). But thankfully those busy times are just temporary, as ProcessWire is where I prefer to spend my time.3 points
-
I agree that article is pretty uninformed and it's that kind of rationale that is holding back the web on a large scale. It's why most of the web is powered by decade(s) old technology and thinking. I'm not sure why about.com would write such an article without any experience with the systems. I am guessing the author's experience is limited to WordPress, but he bundled Drupal into there because he heard it's big, and the other side of the coin to WordPress (for balance). I actually think the article would have been more valid if Drupal had been left out and it was clear that the audience was intended to be those with no web experience. It seems like some of the intended audience becomes more clear in the author's follow-up comments. I have actually developed sites in both WordPress and Drupal - I can think of a lot of folks I would recommend WordPress to (it's hard to beat for a simple blog), but really can't think of anyone I'd recommend Drupal to in this day and age. I like and respect a lot about Drupal actually, but it's for nostalgic reasons not practical ones. It's like tinkering around with my old mechanical calculator form the 1960s. It can still get the job done, but it's hard to rationalize using it given what else is available. The one thing I did like about this article was the follow-up comments by Diogo and Joss, that's where the real quality content is here. And it made my day to see Joss pop up in there, assuming it's the same one from here.3 points
-
Me too. Currently it is like this: http://www.harlestonanglingclub.co.uk/ It is made with a very old copy of Bream Weaver (sorry, couldn't resit the pun) by an old theatre director pal of mine. He is stopping his involvement, so I need to turn it into something the "committee" can handle without breaking it! Oh, and I think it needs a bit of prettying up! I will ensure it has a "Made with ProcessWire" on it. And I wonder if I should employ some hooks......2 points
-
Hey everyone, ajax enabled file uploads in the frontend is something, that I also always wanted, so I did a really dirty hands on to get it done without core hacking. You can find my current state here: https://github.com/bytebus/AjaxImageUpload I consciously don't want to put this into the modules subforum because it's definitely not even close to be used as a drop-in module. The way it works is more or less this: * Provide an API endpoint for ajax uploads. * On each upload, create a new, temporary page with an only an image field. * Provide a method to easily copy the uploaded image to a "real" page and delete the temporary page. I think the concept is definitely simple and ok, so this is why I'm still posting the code and hope it might be a starting point for someone doing a cleaner implementation. I'm also glad about all suggestions (and pull requests ) on how to implement this in a more easy to use and flexible way. P.S.: I originally wanted to use dropzone.js for this because of the nice user interface. On a more in-depth look at it, I had the feeling that it's not flexible enough, though. I used jQuery File Upload instead which seems to be more widely supported, more flexible and also provides drag-and-drop functionality.2 points
-
You add them in the field options. So for instance, go to edit field -> body and in the ckeditor settings->ckeditor toolbox text area, add the appropriate functions you want to have enabled. You can get a list of them from here: http://docs.ckeditor.com/2 points
-
2 points
-
This module allows you to automatically rename file (including image) uploads according to a configurable format This module lets you define as many rules as you need to determine how uploaded files will be named and you can have different rules for different pages, templates, fields, and file extensions, or one rule for all uploads. Renaming works for files uploaded via the admin interface and also via the API, including images added from remote URLs. Github: https://github.com/adrianbj/CustomUploadNames Modules Directory: http://modules.processwire.com/modules/process-custom-upload-names/ Renaming Rules The module config allows you to set an unlimited number of Rename Rules. You can define rules to specific fields, templates, pages, and file extensions. If a rule option is left blank, the rule with be applied to all fields/templates/pages/extensions. Leave Filename Format blank to prevent renaming for a specific field/template/page combo, overriding a more general rule. Rules are processed in order, so put more specific rules before more general ones. You can drag to change the order of rules as needed. The following variables can be used in the filename format: $page, $template, $field, and $file. For some of these (eg. $field->description), if they haven't been filled out and saved prior to uploading the image, renaming won't occur on upload, but will happen on page save (could be an issue if image has already been inserted into RTE/HTML field before page save). Some examples: $page->title mysite-{$template->name}-images $field->label $file->description {$page->name}-{$file->filesize}-kb prefix-[Y-m-d_H-i-s]-suffix (anything inside square brackets is is considered to be a PHP date format for the current date/time) randstring[n] (where n is the number of characters you want in the string) ### (custom number mask, eg. 001 if more than one image with same name on a page. This is an enhanced version of the automatic addition of numbers if required) If 'Rename on Save' is checked files will be renamed again each time a page is saved (admin or front-end via API). WARNING: this setting will break any direct links to the old filename, which is particularly relevant for images inserted into RTE/HTML fields. The Filename Format can be defined using plain text and PW $page variable, for example: mysite-{$page->path} You can preserve the uploaded filename for certain rules. This will allow you to set a general renaming rule for your entire site, but then add a rule for a specific page/template/field that does not rename the uploaded file. Just simply build the rule, but leave the Filename Format field empty. You can specify an optional character limit (to nearest whole word) for the length of the filename - useful if you are using $page->path, $path->name etc and have very long page names - eg. news articles, publication titles etc. NOTE - if you are using ProcessWire's webp features, be sure to use the useSrcExt because if you have jpg and png files on the same page and your rename rules result in the same name, you need to maintain the src extension so they are kept as separate files. $config->webpOptions = array( 'useSrcExt' => false, // Use source file extension in webp filename? (file.jpg.webp rather than file.webp) ); Acknowledgments The module config settings make use of code from Pete's EmailToPage module and the renaming function is based on this code from Ryan: http://processwire.com/talk/topic/3299-ability-to-define-convention-for-image-and-file-upload-names/?p=32623 (also see this post for his thoughts on file renaming and why it is the lazy way out - worth a read before deciding to use this module). NOTE: This should not be needed on most sites, but I work with lots of sites that host PDFs and photos/vectors that are available for download and I have always renamed the files on upload because clients will often upload files with horrible meaningless filenames like: Final ReportV6 web version for John Feb 23.PDF1 point
-
Ya, there were some problems in the previous code. This one is tested and should work: $queryArray = explode(" ", $q); // create an array with all the words $authorPages = new PageArray(); $titlePages = new PageArray(); $results = new PageArray(); foreach($queryArray as $word) { $authorPages->import($pages->find("author*=$word")); $titlePages->import($pages->find("title*=$word")); } // intersect both arrays by importing common pages to the $results array //foreach($titlePages as $p) { // if ($authorPages->has($p)) $results->import($p); //} // forget the above 3 lines, this is so much better for intersecting two arrays $results = $titlePages->find("id=$authorPages"); echo $results;1 point
-
Hi guys, i finally finished my personal website. PW and jQuery as always and Bootstrap as css framework. English version coming soon... http://complementaryart.com1 point
-
Antti, that should be fixed now, just pushed another version to GitHub. Looks like you can't set the value of inline CKEditor the way you'd set it for regular CKEditor, ie. find correct instance and use setData().. not even if you first "force" loading that particular inline editor. On the other hand, inserting value directly to inline CKEditor's container div with .html() seems to work but feels a bit hacky1 point
-
Adrian, sorry for some reason I got it stuck in my head that we were talking about API level adding of images rather than capturing those added from the admin. The install() method doesn't get called on images added from the admin because InputfieldFile puts them right in the target directory, if I recall correctly. So I think the hook that you would actually want would be one of these methods (both of which are already hookable): InputfieldFile::processInputAddFile($filename) This one adds the given $filename to the $pagefiles, perhaps you could rename $filename it on a before call and change the value of $arguments[0] to be your new filename? or... InputfieldFile::fileAdded(Pagefile $pagefile) This one is called after a new file is added, giving you the completed $pagefile1 point
-
It's using URL segments, where the number (id) is the URL segment. Here's the code from that template if it helps: <?php $id = (int) $input->urlSegment1; if($id < 1) throw new Wire404Exception(); $marker = $pages->get("template=map-item, id=$id"); if(!$marker->id) throw new Wire404Exception(); echo $marker->render(); That $marker Page is a page using template map-item. The map-item template contains the fields for each map marker item like location/coordinates, categories and notes. The implementation of the template file is just to output a <div> with that info in it, and that's what gets sent through that $marker->render() call above, which goes straight through ajax. It's not technically necessary to do it this way, but it does enable us to just pass through an ID on the front-end, since the full URLs take up more space without offering any real benefit in this case. So it's just more efficient to route through a known, consistent URL with an ID appended to it.1 point
-
1 point
-
Tested this one out, but seems like it might be very out of date? It apparently doesn't recognize HTML5, and is suggesting use of XHTML MP while quoting mobile compatibility from a year range of 1999-2007. There seemed to be a lot more false positive stuff, but I stopped looking after that. 2007 is pre-iPhone and Android and things have changed a lot.1 point
-
I just updated the sheet to 0.3 with hooks from latest dev version. + 22 hooks registered. - added teppo's article to info section links (http://www.flamingruby.com/blog/using-hooks-to-alter-default-behavior-of-processwire/) - added link to ryan's tutorial using hook to add method to PageArray (http://processwire.com/talk/topic/4834-simple-hooks-tutorial-turn-a-pagearray-into-a-list-of-links/)1 point
-
Thanks ryan! I use the code shown below. Because group tags by 26 characters is better than by thousands of Chinese characters. $letter = strtoupper(mb_substr($tag->name, 0, 1));1 point
-
That "$page->child->children->children" is the issue here; $page->child is a Page, $page->child->children is a PageArray and you can't ask for children of a PageArray. PageArray contains Pages, each of which has children -- PageArray itself doesn't have children. You'll have to iterate over all contained pages one by one and ask for their children <?php foreach ($page->child->children as $children) { foreach ($children->children as $child) { echo "<h1>{$child->url}</h1>"; } } ?> Does this make sense to you?1 point
-
Hi Gespinha, ProcessWire is trying to tell you that "projects" is not a valid selector. See http://processwire.com/api/selectors/ on how to write selectors, this being the key here: "An individual selector consists of three parts: the field you are looking for, an operator (like an equals '=' sign), and the value you want to match. For example, a basic selector might be: title=products". So you could use for example "name=products". But just fixing the selector is not enough here; you're using find() which returns a PageArray (even if there's just one match), not a single Page. If you're trying to get a specific page, you could use get() instead. It works like find() but returns only the first match (a Page object). Or you could say find()->first()->url to access the first found Page inside the returned PageArray.1 point
-
Try this: <?php echo $page->find("name=projects")->url ?> or you can use the path of the page, eg. if it is at the root of you site you can do: <?php echo $page->find("/projects/")->url ?> Also, be sure to install the selector test module - will help you figure out the right selector more easily: http://modules.processwire.com/modules/process-selector-test/ EDIT: Be sure to take nik's advice below about get vs find!1 point
-
I know it might seem confusing and unintuitive at first, but this is the PW way and I am certain you'll be convinced of the value of the approach in time. Here is some more reading on page fields: http://wiki.processwire.com/index.php/Page_Field Have a read of this thread from here on: http://processwire.com/talk/topic/201-fieldtype-select-aka-drop-down/?p=13637 We have all struggled with what seems overly complicated, but it really does work and it works well! Page fields reference child pages, but they are used as a way to allow the user to select from these items (pages) using select, multiselect, radio etc. Try not to think of pages as just being pages - they are used for everything in PW. Maybe someone else will chime in and be better able to explain how it all works, but I would say just dive in and try it - it will soon make sense once you have tried it.1 point
-
Take a look at this video for an explanation of how page fields work: http://processwire.com/videos/page-fieldtype/ They can be a little tedious to set up, but they are so very powerful compared to the way most CMSs handle storing content for select/radio etc fields that they are more than worth the effort. That module I pointed you to can make the entire process much quicker though - give it a try1 point
-
In the admin or a front-end form? In the admin you need to use the page fieldtype and then on the details tab choose single and on the input tab choose Radios in the input field type section. The page field select creator module can make this setup much easier: http://modules.processwire.com/modules/process-page-field-select-creator/ If you are after the radio buttons in a front end form instead, let us know and we'll show you through that.1 point
-
I would say that lots of us are running the dev version for production websites. Key thing is to check that all the functionality you need is working fine, especially any multi-language features as there have been some recent changes there. If it all works as expected, go for it1 point
-
Hi nik, Thanks for the response and for testing this on your system for me. I debugged the queries as suggested with the same weird result, number of rows returned confirming the above. I also installed the SelectorTest mod (which is damn sweet BTW) and no luck. In frustration I upgraded to PW 2.3 and problem sorted. I see in the docs the ^= selector works in PW v2.1 onwards. I previously had 2.2 I'm sure, possibly 2.1 at oldest, as when I first started using PW ver2.1 was the current release. Anyways, guess this is a good example of the advantages of being up-to-date. SelectorTest will be a must-have on all my PW site install from here-on-in. Very nice peice of work. Thanks nic1 point
-
Dear Ryan and All, I just installed PW on a shared server, for the first time, for a client, over at LiquidWeb.com. (I recommend them highly by the way. I've been with them for 8 years, with shared servers, VPS and dedicated servers, and their tech support is excellent.) I ran into two glitches, one of which was significant for the install.php file. 1. Although the shared server was quite full featured, for some reason it didn't have mod_env enabled. (And LW doesn't mess with changes like that once a shared server has been deployed -- unfortunately.) Therefore, the line in the .htaccess file to set a var to confirm that mod_rewrite was working, broke. So, I had to comment it out. # Set an environment variable so the installer can detect that mod_rewrite is active. # SetEnv HTTP_MOD_REWRITE On Then, because that no longer was in play, I had to comment out the block of code in install.php that looked for that var. Since I was able to confirm with a tech that mod_rewrite was on, I didn't need the install file to check it. I commented out these lines: /* if(function_exists('apache_get_modules')) { if(in_array('mod_rewrite', apache_get_modules())) $this->ok("Found Apache module: mod_rewrite"); else $this->err("Apache mod_rewrite does not appear to be installed and is required by ProcessWire."); } else { // apache_get_modules doesn't work on a cgi installation. // check for environment var set in htaccess file, as submitted by jmarjie. $mod_rewrite = getenv('HTTP_MOD_REWRITE') == 'On' ? true : false; if($mod_rewrite) { $this->ok("Found Apache module (cgi): mod_rewrite"); } else { $this->err("Unable to determine if Apache mod_rewrite (required by ProcessWire) is installed. On some servers, we may not be able to detect it until your .htaccess file is place. Please click the 'check again' button at the bottom of this screen, if you haven't already."); } } */ After that, the install worked. I recommend that a config flag be added somewhere, to allow the install.php file to run without checking for mod_rewrite, with the noted caveat that it would mean that the person installing it must check manually. 2. The second glitch was related to the fact that it was a shared server, and I added some Basic Auth code at the end of the .htaccess file to block the public while the site was being developed. When I did that, the server behaved the way I've seen .htaccess auth break in subdirectories. I'm not sure why it broke in the web doc root, but the solution was the same. (This has not happened in VPS's, so perhaps it's a symptom with shared servers.) The symptom, by the way, was that the Basic Auth directives were ignored, and the home page went to a 404 page. So, after adding this line at the top of the .htaccess file, it all worked. ErrorDocument 401 "Unauthorized" This line also worked, but I chose the the first option: # this was an alternate method to fix the above RewriteCond $1 !^(401.shtml) The second option was offered by a brainy LiquidWeb tech, which jogged my memory about the first option. Even though the second problem wasn't a specific PW issue, I thought it might be a valuable tip for anyone wanting to install PW on a shared server, when the home page has to be protected by Basic Auth. It threw me when I couldn't log into my admin url after installing PW. Anyway, after all this, PW seems to be behaving quite well on a shared account on LiquidWeb, which is a big step up from Drupal, which, as far as I know, doesn't work well at all in a shared environment. Plus One for PW. Edit: I also recommend that you place in the list of server requirements a note about Mod_Env as it relates to SetEnv. It's not only an issue for the installation, but also provides an extra security method for using Basic Auth on the admin login page, as I wrote about in my post here: http://processwire.com/talk/topic/3706-how-to-blockredirect-one-user-role-away-from-admin-pages/?p=46421 If I had known about this (or thought about it) before deploying the shared account, I would have specified that it was a requirement. Peter1 point
-
little confused. You don't need to touch htaccess at all. just create folder /anotherweb/ next to your site and wire folder and it should work just fine.1 point
-
Well you can modify the _init.php and _out.php files to have a conditional check. Something like on the first line of each: if(!$useWrappers) return; Then in your template file do: $useWrappers = false; Or something along those lines - whatever fits best with your workflow.1 point
-
The answer is relatively simple and there would be different ways but best would be to: In a autoload module (HelloWorld.module) add the hook to ready() where the page being rendered is already set in $this->page So this would only add property to basic-page templates: public function ready(){ if($this->page->template == "basic-page"){ $this->page->addHookProperty('hello', $this, 'helloHook'); } } public function helloHook(HookEvent $event){ $event->return = "Hello World"; } After all I'm not sure this would make a lot of difference to just add it pages globally. But I could see this being useful for certain situations.1 point
-
In defense of totoff, he did say this: Edit: Still, there is Open Source and Open Source, the fact that a project is Open Source doesn't mean that it should be immune to criticism. There's no doubt that the fact that some big Open Source projects are so widely used hurts the growth of smaller and much more competent projects, and comparisons should be made to combat this, and also to make those projects be aware that they can't stop getting better. Those are my two cents...1 point
-
Here's a cool approach from WillyC: http://processwire.com/talk/topic/1799-routes-and-rewriting-urls/?p=16708 Or you could add a line to your htaccess file (as devcow shows), or if this is a change from what the parent page used to be called this module would do the trick, but you need to have it installed before the change in the name of the page, http://modules.processwire.com/modules/page-path-history/ I guess you could change the name back, install the module, and then change the name again. It's an awesome module to have installed right from the start of development! EDIT: If you go with the htaccess route, you might find something like this useful so that all posts are taken care of: RewriteRule ^news/(.*)$ /blog/$1 [L,NC,R=301]1 point
-
Hello, I've recently updated a showcase website for (private) antique collection. http://agcat.net/ Module I used: - Procache - Batcher This website is expected to be written in Japanese/English, but English texts are not available yet. Developing this website, I thought Processwire would be a fantastic solution to organise and show cultural heritage such as museum collections!1 point
-
Hi muzzer! Did you already find out what was causing this odd behavior? I tried to reproduce what you're describing but I'm getting all those five pages returned with "title^=A". I guess you tried both selectors with the exact same setup? So no chance you've got a limit of some kind somewhere? You could also try those selectors with the SelectorTest module, just to eliminate other code lurking around. And with debug mode on try to find the actual database query for both (you can see all queries printed out at the bottom in the admin when debug is on). Maybe there's something there that helps finding the cause.1 point
-
It's always interesting when someone wants to put one Open Source project against another. First, we should be supporting, where possible, any Open Source project, especially PHP based ones. I honestly believe time is better spent with actual Case Studies and other technical documents that show the benefit of using ProcessWire over those systems and others.. I've used Joomla, Drupal and Wiordpress in the past. The botom line is that each and every project has it's inherent weaknesses and plusses. Some more than others. That's my two cents on this issue. Good Day.1 point
-
Peter, I am not sure if http://www.synbioproject.org/sbmap/marker/3210/ is an actual PW page or not, but there is certainly no reason that you couldn't use a PW page to generate the code on that page. There are so many ways you could go about this - really up to you and how you have the content structured. You could set up a parent marker page and marker.php template and allow URL segments and use the ID in the segment as the variable to grab the content from other parts of your page tree. Would that approach work well for you, or do you already have the content that you want in the InfoWindow already set up in child pages? It is possible that Ryan is using URL segments in a sbmap.php template file with the first segment to determine markers and the second to get the ID of item and use those to generate a selector to get the content from somewhere else in the page tree.1 point
-
joomla really is a dead end.. spent a large part of the last year converting joomla sites to processwire; IMHO i wouldn't start anything new with that, especially with all of the other options out there now. I still have a few sites that are stuck in Joomla 1.5, because of certain components that are being used which are no longer being developed and the functionality that those offer is too complicated/expensive to replicate in processwire. Echoing what Matthew said, the whole template override thing can get incredibly frustrating; as i mentioned in this post: http://processwire.com/talk/topic/3671-ohmspeakercom/?p=35862 , we started that project in Joomla and spent about 1 year (on and off) trying to get it right, and in the end it proved easier to just start over with PW. I recall spending hours writing CSS to get things to go where i wanted them, overriding the joomla classes output for modules.... aargh!1 point
-
Greetings, This is a discussion I am glad to get into... I'd want to know more details about what the client needs and expects to accomplish, because that would definitely help make stronger arguments against Joomla. But up front, my main arguments are... Joomla does not support custom fields in its core. The only way to be able to have custom fields in Joomla is to add what is known as a "CCK" (Content Construction Kit), and that essentially grafts what I call a sub-CMS onto the main CMS. Without a CCK, you are stuck with the basic fields that Joomla assumes you will use for all your pages ("articles"). It is extremely tricky to implement what we think of as routine JS and PHP elements in Joomla sites. You cannot properly work directly inside your page code, as everything in Joomla is done inside "module positions" for your pages. Speaking of templates, the templating structure of Joomla is extremely limiting. Everything in your site must be placed inside those "module positions," you must define everything that goes into those module positions using a convoluted back-end, and your templates inherit all sorts of core Joomla styling and layout assumptions. In other words, you cannot simply create various layouts and name them according to specific content types. Joomla core makes numerous assumptions about how things should look and behave. If you want to change how a blog list looks, for example, you must hack core settings of either your core Joomla install or your templates. If you simply want to say "See Full Story..." instead of "Read More..." at the end of your intro pages, you have to hack the core code. Joomla makes it extremely difficult to manipulate URLs in any kind of creative fashion. Because it assumes you must always insert an "article ID" into your URLs, you cannot go very far with dynamic pages because you cannot know the ID of your "articles" before they are created. The core installation of Joomla has a convoluted directory structure: 15 main directories and an arrangement of sub-directories that are a major challenge to follow. Often, sub-directories are literally repeated and material of the same type (such as plugins) can end up in several different directories. This is because Joomla is designed to be built completely in the GUI, which gets us back to the problem described above in #2. These are just a few of the problems that plagued my work with Joomla. But again, the real power comes when the client says, "I want this..." and you can show how much better and easier it is to do it in ProcessWire. Can you follow up with some of the specific requirements of the client? Then I can give you more particular arguments. Thanks, Matthew EDIT: onjegolders: yes, indeed... Looking back, I think I have actually posted a few "Joomla rants" here in the ProcessWire forums: http://processwire.com/talk/topic/2129-justifying-diy-coding-vs-installing-modules/?p=20438 http://processwire.com/talk/topic/4143-wordpress-dominates-19-of-the-web/?p=40964 http://processwire.com/talk/topic/3952-reservations-for-hotel-rooms-and-restaurant/?p=387421 point
-
Just. Don't. Use. It. Seriously: I worked with Joomla exclusively a while ago (around 2004/2005) and the whole concept hasn't changed imho. The main problem is: It is by no means a flexible content management system, it is more a portal system. Let me explain what I mean: Let's say you have a large scale company with 1000 employees. All of those employess have a name, an email, a title and a linked department. You want to display one/several employees on each page in a kind of sidebar. The PW way: - Create a employees template - Add desired fields - Create page field in your other templates for selecting employees - You are then totally free to select employees in your template and you are able to output what you like (HTML, CSS). - You also have the possibility to use that information somewhere else because these are just usual PW fields. - An editor selects the employee(s) where it is needed: While editing the page The Joomla way: - Look if a module exists for that does this job for you (perhaps there is one, but probably not). - even if there is one you have to add your employees in some kind of extra database, where you are tied to the output of the module (not necessarily, perhaps the script kid lets you customize it). - But the biggest problem: Your editor will not be able to select the employees where it is needed. They have to go the modules section in the backend, have to find the module, have to identify the page they want to edit and then have the possibility to select an employee. This is a ridiculous workflow, image you have not only an employee to select but also header images, other side information and so on. The rest of Joomla can be summed up: - Bloated - poor security - inflexible - poor templating Joomla totally is okay for smaller groups, clubs or where ever no technical experience is needed and where the requirements are low. Everyone can set up a site really fast and choose from a lot of plugins (mostly poorly coded though). But when it comes to comfort, flexibility for editors... it is just poor.1 point
-
Ryan has pushed the limit to 350 for now. So you can now again use the master ModulesManager version and set the limit to 350 in the module setting. He also removed the readme text from the feed so this will make the data loaded a lot smaller. Regarding save_mode, this is something that is deprecated in php 5.3 and removed in php 5.4, so not positive to add additional check for it. Thanks1 point
-
Or with the "classic" search in admin -> extended -> template. Just keep search input empty.1 point
-
let's say you have the following structure: - mypage -- post 1 -- post 2 -- post 3 etc. a post consists of a title and a text (to keep it simple). your goal is to display all content (title and text) from the posts on "mypage". that's pretty easy: 1. make a template "post" (it doesn't need to have a template file. it's just for holding the fields) with a title and a text field. assign it to your post pages and fill with content. 2. make a template "my page". assign it to mypage. from this template you loop over the child pages ("post") and retrieve their content. for example: <?php foreach($page->children as $post) echo "<h1>{$post->title>}<h1>"; echo "<p>{$post->text>}<p>"; ?> that should to the trick. EDIT: adrian was quicker. And sorry for the formatting of the code (which is not tested).1 point
-
very nice site. one thing to polish though: on the media page (http://www.tamperemusicfestivals.fi/jazz/fi/media/) hovering over the thumbnails shifts the rows a bit. i assume this is not by intention. EDIT: Win 8.1 (awful, don't buy), Chrome 30.0.1599.1011 point
-
PW uses bitwise operators for setting flags. It does the same thing for the page status field (ie hidden, unpublished, trash etc). You can see the various values for each flag at the top of this file: https://github.com/ryancramerdesign/ProcessWire/blob/a8024bb49785370aa2e3867bd683094663cfeabf/wire/core/Field.php The values are added together and stored in the flags field, which is why you saw a 5 = autojoin (1) + global (4) Hope that helps.1 point
-
Hi Ollie, Without looking at your code in too much detail, the first obvious problems are the single equals signs in the if($item->parent = statements. Try using == and let us know if that fixes things. Also, you'll probably need to do $item->parent->name1 point
-
Ryan, maybe curl, file_get_contents (using a full http:// url), or exec/wget can be used to fetch a test page. If the page returns a 404 status, mod-rewrite is off. Of course there's still a chance that one or none of these methods work, but you could try all including the env var and probably prevent a few folks from running into this problem. I'm happy to help, let me know if you want me to take a crack at this.1 point
-
Nice looking site. I like the "sec" style design. If i ever come to Groningen i'll have to remember this place for when im hungry.1 point
-
Hi ryan I also got the 404 issue and I believe it is to do with how various browsers (maybe?) handle this line: header('Content-Type', 'application/json; charset=UTF-8'); Changing that to the following, my issues were resolved on Firefox: header('Content-Type: application/json'); Hopefully that helps others - I guess there may be something "non-standard" or maybe not globally recognised in the line that's in the module - it's all a bit beyond me, but this change resolves it1 point
-
I'm using this feature quite a lot. Here's an example of creating a indented list for using with checkboxes, selects. IT creates a new PageArray and modifies the "title" to indent, and here with a (count) used in the context of the categories to see how many products are under that category. $children = $pages->get("/shop/")->children(); $list = new PageArray(); function mylist($children, $ind='', $arr){ $ind .= "– "; foreach($children as $cat) { $countproducts = wire("pages")->find("template=product,categories=$cat")->count(); $cat->title = $ind . $cat->title . " ($countproducts)"; $arr->add($cat); if($cat->numChildren) { mylist($cat->children,$ind, $arr); } } return $arr; } return mylist($children, $ind='',$list); This will produce something like –– Gewürze (0) –– –– Kräuter (27) –– –– Kräutermischungen (7) –– –– Einzelgewürze (0) –– –– –– Anis (2) –– –– –– Blaumohnsaat (1) –– –– –– Bockshornsamen (2) –– –– –– Chili (16) –– –– –– Glutamat (1) –– –– –– Galgantwurzel (3) –– –– –– Ingwer (4) –– –– –– Kardamom (4) –– –– –– Knoblauch (5) –– –– –– Koriander (2) –– –– –– Kurkuma (2)1 point