Leaderboard
Popular Content
Showing content with the highest reputation on 08/08/2013 in all areas
-
4 points
-
This is my first attempt with Processwire. I must say that I am impressed with this CMS. I know Drupal, Wordpress, Liferay, Concrete5, and so far, PW would be certainly on top of the list now (perhaps at the same level as Concrete5). My mother had made her own website with FrontPage. So all photos are from her, and I did only structure it with Processwire. The site use basically four templates. 1) Front 2) Front-mosaic 3) Mosaic, and 4) Basic (used in the timeline). The site is not finished. It was done in 20 hours (5 hours for the design process, 5 hours structuring the site, 10 hours creating pages and dumping the photos (there are a lot!). http://irenegiguere.com3 points
-
3 points
-
In my opinion CSS3 selectors (nth-child) are really the way to go for this kind of presentational stuff. Browser support is widespread ( http://caniuse.com/#search=nth ), but if you still care about <IE9 you're out of luck unless you use something like http://selectivizr.com/ or go with pure jQuery as Soma showed.2 points
-
$count = 1; foreach($children as $child) { $type = $count % 2 == 0 ? "even" : "odd"; echo $type; $count++; } No need for a function Or pure css: section ul li:nth-child(even) { /* Do stuff on even list items */ } Written in the browser, but you might get the idea.2 points
-
That's an excellent suggestion. I'm honestly not yet sure how to implement it though. I've gone ahead and added a "data-language" attribute, with the language ID, to the LanguageSupport wrapper that goes around each multi-language field. The next step is to get the TinyMCE and CKEditor pwlink.js plugins to pull the language ID from the wrapper–this is the part I can't figure out yet. Once we've got that, the TinyMCE/CKEditor plugins can easily bundle it into the iframe/model request URL as a GET variable. Then the ProcessPageEditLink.module can detect and use it from there.2 points
-
Hello and welcome Guy Verville, I definitly get what you say and I agree to it. If you can work with the images- or file inputfields in a project, you don't want change to a completly different concept. It is beautyful simple working with the file-inputfields, (also for sometimes dump employees ) (@Macrura:) And it would be very useful and straightforward to have a replace link that let you upload a new file for an existing one. Replace means that an existing file gets deleted and a new one would be stored there with the exact filename as the previous one, regardless of what file the person selects on his/her computer for the upload. So with the upload there should be at least only allowed to select a single file with the same filename-extension. So, there are also (many) scenarios where it is better to go with the "single-file per page solution", but if it suites fine with the file- and images-inputfields, the replace-link is definitly missing!2 points
-
Hi all, I'm a big fan of the Sublime Text 2 text editor and of course of huge fan of ProcessWire, so I went ahead and created a library of PW snippets to be used with the ST2 Snippet system. I followed the PW cheat sheet, and created Advanced and Basic versions. The Advanced version contains only those seen in the advanced mode of the cheat sheet, so if you want the full set, you'll want to get both Basic and Advanced. They are on GitHub here: https://github.com/evanmcd/SublimeProcessWireSnippetsBasic https://github.com/evanmcd/SublimeProcessWireSnippetsAdvanced I've just submitted the Advanced set for inclusion into Package Manager, so hopefully that will be added soon. See the README for more info. Any feedback welcomed1 point
-
I am so far impressed by Processwire and still learning it (well, it is so easy!). I will certainly propose this CMS to my future clients. One thing is puzzling me, though, is file references. I have numerous clients who make references throughout their pages. Say, for example, that a PDF or an image is found in three pages. In Concrete5, since there is a file manager, it is easy to replace a file without losing the reference to it, because there is a replace command. Then, you are sure that at all the references of that file has not changed throughout the site. I don't see this in Processwire. I understand that I can reference a file coming from another page. But to just replace it (for example, the document has to be updated because of a typo), the only solution I see is to go to the asset directory and change the document there. This is not very user friendly for a regular user. Perhaps an example would be more clear. I am making a gardening site. Each page can contain 20 photos of flowers, which are tagged and documented. Then, somewhere else, a reference may be made to one photo specific photo. Now, that photo, which is included in a list of twenty other ones, has to be updated. I could delete the file, upload another one and rewrite the information. But the reference is now lost where the other image is cited. Right?1 point
-
Very impressive - http://sarasoueidan.com/blog/s-gallery-responsive-jquery-gallery-plugin-with-css3-animations/1 point
-
currently I'm back working on the ImageManipulator. I've put it into a module that extends PageImage. It integrates nicely into PWs workflow. There are only a few things that I have to solve before I can release it: finishing and testing the watermark-methods write documentation and some examples provide support for imageVariations, namely: removeVariations() with point 3, I already have a method that can be called when in PIM-mode (PageImageManipulator-mode) which unlink all PIM-created files, but I think it would be more comfortable if a user calls one of the PageImage-methods getVariations() or removeVariations() if the PIM-created variations are included in the collections. EDIT: in the meantime, we have had a release already: http://processwire.com/talk/topic/4264-release-page-image-manipulator/ ----- here are a screenshot of my current Testpage1 point
-
решил проблему has solved a problem <ul id='topnav'> <li><a id='topnav_home' href='<?php echo $config->urls->root; ?>'>Directory of United States Skyscrapers</a></li> <li><a id='topnav_cities' href='<?php echo $config->urls->root; ?>cities/'>Cities</a></li> <li><a id='topnav_architects' href='<?php echo $config->urls->root; ?>architects/'>Architects</a></li> <li><a id='topnav_about' href='<?php echo $config->urls->root; ?>about/'>About</a></li> </ul>1 point
-
Now I think I understand your question It sounds like your editor isn't styling your code as PHP because of the .inc name. It must rely on the file extension to decide how to color the code. You could easily rename these files with a .php extension. The .inc is not necessary for them to work. Otherwise there are other code editors out there that will style the php sections of a .inc file correctly. SublimeText is one example that I am familiar with, but I am sure lots of others do as well. Also, there might be a configuration option in your editor to set the styling of .inc files to php. Hope that helps.1 point
-
What you are looking for is probably $page->localName($user->language). The LanguageSupportPageNames module modifies the output of $page->path() / $page->url(), but not $page->name. That's because it's kind of a primary identifier for a page that needs to stay consistent at runtime regardless of language.1 point
-
You are reading it wrong . '%' is a modulus operator giving you the remainder of the division of its operands. For example 10 % 3 = 1 (10 = 3 * 3 + 1). So your first if actually means "if $n is NOT divisible by 2".1 point
-
You can use a slightly different form of foreach to get also the index on each iteration, like this: foreach($children as $i => $child) { echo doAlt($i) . $i; } That should do the trick. Without the inner foreach of course.1 point
-
Exactly what I was referring to above as instantiating MyAwesomeModule in the included file Taking another look at this situation: in case that you need any class variables of the original MyAwesomeModule instance, you'd probably be better off sending it ($this) to your included function as a param as explained in my previous reply.. and you might even want to send the $event object as another param, in case that you need to do something there that's related to the page you're saving: // in MyAwesomeModule: functionFromIncludedFile($this, $event); // and then in that function in your include file: function functionFromIncludedFile($awesome, $event) { $awesome->bla1(); $page = $event->arguments[0]; // etc. } This still sounds like something you could do without dependencies going all over the place (first class depending on second class depending on methods / variables of first class..) but I won't go there as I still don't know nearly enough of your needs1 point
-
There are several different, and no "correct" way of structuring a site in PW. The default profile uses head.inc and foot.inc, the skyscraper demo makes use of the _init.php and _out.php files, as set in the config.php file. Some people use one main.inc file that contains all the framework HTML etc. Each template populates content to a variable (eg: $out), which is then echo inside the appropriate content div in the main.inc file. Here is a discussion about a different approach altogether: http://processwire.com/talk/topic/740-a-different-way-of-using-templates-delegate-approach/ Lots of options and it really comes down to what makes most sense to you.1 point
-
That's ok. I wasn't clear in the first place. You can imagine the strife I get into at home1 point
-
I think I have something sorted (thanks to Ryan of course): http://processwire.com/talk/topic/1716-integrating-a-member-visitor-login-form/?hl=%2Bpassword+%2Breset#entry158941 point
-
Hey Marty, the password is encrypted, which is why this isn't really possible. I guess you could hook into user save and make a copy of the password in a plain text field that could then be emailed, but I am sure everyone would agree that this is not a good idea1 point
-
@macrura I use Synk here too and I love it. I also recently discovered BitTorrent Sync which is useful in some situations: http://labs.bittorrent.com/experiments/sync.html And one for the photo nuts: http://rawtherapee.com/1 point
-
@OrganizedFellow - on mac i would use Synk to keep a synchronized copy of the 2nd folder in the local dropbox; Synk runs in the background and keeps 2 or more directories cloned at all times; i don't know if there is similar Windows program;1 point
-
I use Feng Office (community edition) + Dropbox for project management, file sharing, collaboration, tasks, and other things; Feng covers most things, but Dropbox is better for large files such as website assets (images, audio, video..) I just started using Totals from Kedisoft for invoicing; I like it a lot, though it's not without it's limitations, so far has proven to be the most flexible way to manage billing for me...1 point
-
I like using Google Drive for all kinds of stuff. In concept phase, you can create a doc that you share with your client, and everyone adds his / her thoughts. Or simply as a place to upload text-files and photos.1 point
-
So, I added a FieldtypeTemplates to my template and set data to it like so: if(isset($_POST['templates'])){ //comma separated list of template ids $templates = explode(',', $_POST['templates']); } $mypage->the_templates_field = $templates; $mypage->save(); and this resulted in an unset templates select field - like the field was newly added. Took me awhile to figure it out but in FieldtypeTemplates::sanitizeValue() line #43: foreach ($value as $k => $v) { // we allow integers if (is_int($v) && $this->templates->get($v)) continue; // we allow templates if ($v instanceof Template) continue; // but we don't allow anything else unset($value[$k]); } I changed is_int($v) to is_numeric($v) as noted here http://php.net/manual/en/function.is-int.php and got the desired behaviour.1 point
-
Hi alishaantony, welcome! Which plugin do you mean exactly? I suggest to read through the docs first. It's as simple as this: // In template where your html markup is, we output the title of each page in the <title> tag <title><?= $page->title ?></title>1 point
-
Have you created the fieldset fields? They only appear if you actually created a fieldset or fieldsetTab field.1 point
-
Feature request: When creating a link in TinyMce in a language other than default, ProcessPageEditLink generates the url of the default language, not the "local" one. Would be nice if ProcessPageEditLink inserts the url based on the language of the field one is creating the link. I guess this could be a tricky one...1 point
-
Inside functions you need to use: wire('modules')-> Same goes for wire('pages') etc. This is due to variable scope issues: http://php.net/manual/en/language.variables.scope.php If you are ever writing a long function where one of the PW variables is used many times, you can always define it at the top of the function: eg: $modules = wire('modules');1 point
-
I don't think you should immediately discount the example in the link provided by DaveP; because even though it was a WordPress site, that is a very small part of the example. Instead of WP posts, you would just be processing your static files that contain HTML, I think - if I understand how Jekyll works. All you need to work out is how to programmatically parse your existing pages. Alternatively, there is a module that allows you to import pages via CSV file, which might help "as it is". If not, it might at least give you an idea of how you could re-code it to suit your needs and the way that the current site is structured. http://modules.processwire.com/modules/import-pages-csv/1 point
-
I think kyle is right - as long as there is some structure to the way Jekyll stores its data (and there must be), it should just be a matter of identifying what is what, and writing a script to read that structure and create PW pages from it. Take a look at http://processwire.com/talk/topic/3987-cmscritic-development-case-study/, where Ryan describes converting a site to PW.1 point
-
I'd like to add a bit to the great material that has already been posted... Journey From the "Big Three" to ProcessWire... It might seem that ProcessWire is "elitist" because it doesn't assume anything. But let me share my experiences with you, which have led me to the opposite conclusion. I came to ProcessWire from the world of Joomla (and Drupal and WordPress), where all manner of web development building blocks are set up and built ready for you to use, to make your life easier. In fact, you might say that in this way a system like Joomla is the most un-elitist system out there. It assumes you know nothing, and holds your hand through every part of building a web site. For a couple of years, this was good for me. Until one day, when I learned some JQuery and wanted to implement some new concepts, or when I read on Stack Overflow about some creative ways to make PHP do what I need, or wanted to create a unique layout for a client and needed to start from a blank slate, or wanted my user registrations to look unique, or wanted my articles to have 20 separate fields, or wanted a tagging system that looked and behaved in a particular way, or wanted to set up custom search functions for my site. Suddenly, everything about Joomla's un-elitist approach felt stifling. At every step, if I was not doing something the "Joomla way," it didn't work or was 10 extra steps to override something. When I posted about this to the Joomla leaders, I was essentially told, "You don't do it that way in Joomla." When I switched to ProcessWire, I realized that I was now free to implement any good coding ideas I discovered on my own, or discovered on Stack Overflow, or read about in various CSS, Javascript, and PHP realms. Core Assumptions... ProcessWire makes only two assumptions: first, that you have a good grasp of foundational building blocks of the web; second, that you explore the API. On the first point, the assumptions ProcessWire makes are generally the same basic assumptions that would be made if you were developing sites in "pure" PHP/HTML/CSS/Javascript. In other words, any knowledge you gain about these foundational building blocks can be immediately implemented in ProcessWire. On the second point, yes, there are system-specific API elements you need to understand. But they are designed to cleanly facilitate depth and creativity in those foundational building blocks. ProcessWire Trusts Your Intelligence and Capabilities... Put all this together and what do you have? Well, you have a situation where you can create anything you want, because you can get at the foundations of systems that exist on the web. For example, if you need a tagging system, you can learn what constitutes a tagging system. What are the core principles of tagging? Once you understand it, you can build it in ProcessWire. Not only that, but you can build it your way, with no assumptions, freely. If you come from a system like Joomla, Drupal, or WordPress, this means you may have to learn a few new ways to work. But those ways of working -- again -- go directly to the basic building blocks of the web. I know from experience that the un-elitist approach used by Joomla, Drupal, and WordPress seem to be nicer but actually turn out to be very harmful to your individual progress because they delay your exploration of these foundational building blocks. With ProcessWire, because it trusts you to use those foundational building blocks, the knowledge you gain using ProcessWire is applicable beyond ProcessWire and helps you no matter how you create web applications. Put another way, ProcessWire allows you to explore and build in the most un-elitist way possible. With that Said... After all this, there is of course some system-specific material to learn. There is the ProcessWire API, which is unique to ProcessWire. The system has been developed to get as close as possible to "pure" expression, and the syntax of ProcessWire's API calls have only what is needed to get at your data. But yes, there is API syntax to learn here, and the list of specific calls is pretty long. There are "best practices" for combining API elements. There are general goals that we all need for our web applications (galleries, tagging, user registrations, forms, etc) and somewhere there is a good combination of ProcessWire API calls to make them happen. What are those combinations? Well, usually there is more than one, because it depends on what you want to do in your application. The answer may not be pre-packaged, so you may have to hunt a bit. But I definitely agree that it would be great to have documentation of various methods (combinations of ProcessWire API calls and "pure" PHP/CSS/JS) to accomplish various goals. For that, we need what I would call "goal-oriented" documentation. I am proud to say that I am working on this right now. I have been working in silence. But discussions like this make me want to get it out there sooner. * * * I hope this helps a bit. Embrace the way ProcessWire allows you to work! Thanks, Matthew1 point
-
http://processwire.com/talk/topic/1036-markupsimplenavigation/?p=228871 point
-
Nice find, thanks Dave. Recently I've not looked further than http://dimsemenov.com/plugins/royal-slider/ but this looks like it might compliments that well.1 point
-
This won't help with the database, but have you considered using git? For my workflow I develop on XAMPP and I use git. It allows me to easily work between my laptop and desktop. And when I am ready to show the site to a client, I log into my server do a git pull and then I update the database.1 point
-
I saw this website after it was tweeted by smashingmag, and had to share it here http://designersfriend.co.uk/ Very risky idea, since it could become very unfriendly for non-coder visitor, but I think Andy did a great job with the planning, and I happen to find it very intuitive.1 point
-
I work locally using MAMP Pro (OS X). The 'problem' for me has been getting a development version in front of a client. I can't use port-forwarding and DynDNS at all and I'm a command line & GIT noob. But I recently discovered Pagekite which lets you tunnel your localhost to a publicly available URL. With a bit of tweaking on the MAMP Pro side of things I can serve a locally running site to a client for, not only review, but for them to add content. Example. The last bit of the process is uploading the site files and moving the database when going live. If anyone is interested in more details of my setup let me know.1 point
-
makes sense, although in a purely semantic logic i would say a page can't be sibling of itself, and for me it would make more sense to write $page->parent->children for that... even if longer.1 point
-
Diogo, I guess it works this way as it's a very common need to find a position of current page or it's neighbour element in retured array. Just used it recently myself1 point
-
I think that's the right way indeed. But I'm surprised that siblings return also the page itself...1 point
-
Think I may have sorted it with: <?php $siblings = $page->siblings(); $siblings->remove($page); foreach ($siblings as $sibling) { ?> <li><a href="<?php echo $sibling->url; ?>"><?php echo $sibling->title; ?></a></li> <?php } ?> Would be interested in finding out if this is the right way of going about it or I just got lucky? Thanks.1 point
-
Alex, welcome to the forums. That can be done from admin site. Just edit page "Admin" on your page tree and change it name under settings tab.1 point