Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/15/2013 in all areas

  1. function siteMap($page, $output='') { $output .= "<li><a href='{$page->url}'>{$page->title}</a>"; if($page->numChildren) { $output .= "<ul>"; foreach($page->children as $child) $output .= siteMap($child); $output .= "</ul>"; } $output .= "</li>"; return $output; } $homepage = $pages->get("/"); $siteMap = "<ul>" . siteMap($homepage) . "</ul>"; Think this will work Lesson: - first look if Soma, Diogo, Nik, Ryan, etc. etc. are active on the forum. - then, don't post at all ( cause they will be first )
    3 points
  2. @Joss: like Pete pointed out before, what you're describing there is not only doable but actually very simple to do in terms of module development. In the most basic scenario you'd have a module with only the required methods and most of it's functionality would happen within ___install() and ___uninstall(). This way once the user installs that particular module, it would automatically add required fields, templates and pages via API calls. At least in my experience it's quite common for a client to want new "apps" later on, when site has already been built. In my opinion it would definitely make sense to have a library of "app profiles" (perhaps not the best name, but you'll get the point I hope..) that you could install via simple installer module, possibly even complete with basic "skeleton" template files. Sorry, I know I'm being more than slightly heretic here, but I'm not really promoting the use of modules which create their own markup -- more like modules pointing out that you could use this kind of very basic markup and modify it to your needs. Granted that ProcessWire makes building these kind of things from scratch very easy, still especially for simple, repeatable things these kind of modules could cut boring manual work (making developers happy) and unnecessary costs (making clients happy) and so everyone benefits. Of course this mostly applies to things like news and events etc. which most of the time fit the needs of multiple clients after only superficial modifications (CSS) Regarding original post, I believe that having more ready-to-use profiles is a good thing and something ProcessWire will really need to grow and reach more (especially less technology-oriented) users. One of the things that make our dearest competitor WP so compelling is the fact that you can simply pull out complete template if that's what you're looking for; we should keep in mind that even though PW makes building state-of-the-art hand-made sites very easy, it's not always what a client/user will want and/or would be ready/interested to pay for. Those hand-made piece-of-the-art websites are what I'd prefer to create all the time, but sometimes that's just overkill. Not to mention that sometimes even us developers would prefer to take something basic and just start using it. Anyway, this is just a quick thought and I'd love to elaborate it further, but now I'll have to run to a meeting
    2 points
  3. Hi all, this is my first post here so i must tell that ProcessWire is the best CMF i know. Good work Ryan and others. After 14 days with PW i made two sites and alpha version of czech localization package. After hard time translating PW backend i found that i need one more tool. Tool which can find json files used on specific page. We speak about it on IRC with Soma and he made awesome new module for me TextDomainHelper.module https://gist.github.com/4520324 This module gives new posibility to Chrome PHP Debug module. In js output i can find all used strings and where are stored. Without this tool its much more dificult to translate PW! Example output: textdomain:/srv/http/pw_dev_translate/wire/templates-admin/default.php Text:Admin This module needs to have LanguageTranslator::getTranslation hookable. Ryan, can you make it hookable please?
    1 point
  4. Hello there, well, it's my first time working with ProcessWire and I simply love it - I've used Joomla, Wordpress, Drupal, WolfCMS and Typo3 before but somehow ProcessWire was the perfect choice for that kind of page. So I decided to rebuild the website of my Goju Karate club here in Germany. It's not responsive or anything special but I just wanted to present it. There's still some work to do (fix the background image on the right for lower resolutions), but basically it should look OK on 1280+ resolutions. http://www.esv-karate.de Long time since my last private web project. I also have to say that I'm not a professional web designer. In work life I'm a web developer (Oracle) so don't be shocked if you don't see anything innovative . Regards Seuche
    1 point
  5. Slightly off topic, have you seen Dylan Moran's description of how GB owned the world? it's brilliant! [NSFW, language]
    1 point
  6. Exactly. agree i.do do.i thank y.ou so much
    1 point
  7. Stop it you bloody wankers! --- Would I pass for english guy?
    1 point
  8. Hi I use Cloud Flare all the time for my own sites - the free version. It is very customisable and has a very good and intuitive UI. At its basic level it just hosts your zone files and uses their name server. But if you go via their full system, it filters out a lot of potential problems as jacmaes points out above. In addition it can cache various elements of your site - for instance your JavaScript files - so that they are not being served from your server. On a quiet site that does not make a huge difference, but on a busy site can be quite substantial.
    1 point
  9. Should work fine from this point forward: and and EDIT: And that other one where he's undecided is now:
    1 point
  10. Actually had the same issue as you had marc. Soma solved that for me then. I left out the tab & new-line as it provides more flexibility in CSS. for example: ul { display: block; text-align: center; } li { display: inline; } This way you don't have the extra "white space" between the li items & you can text-align the li's. For navigations etc. I use a modified MarkupSimpleNavigation from Soma that don't output any tab, newline or any other white-space thingy. Hopefully Soma will simplify his module & leave them out by default. (I only use generated source if I'm not ripping JS ) example: http://codepen.io/anon/pen/FDrim
    1 point
  11. <?php function sitemapListPage($page,$siteMap='') { $siteMap .= "<li><a href='{$page->url}'>{$page->title}</a> "; if($page->numChildren) { $siteMap .= "<ul>"; foreach($page->children as $child) { $siteMap .= "<li><a href='$child->url'>$child->title</a></li>"; sitemapListPage($child,$siteMap); } $siteMap .= "</ul>"; } $siteMap .= "</li>"; return $siteMap; } $outMain .= "<ul class='sitemap'>"; $outMain .= sitemapListPage($pages->get("/")); $outMain .= "</ul>"; You need to pass along the variable. $siteMap='' argument is default to avoid passing an empty one. If defined it will get overwritten ans passed along.
    1 point
  12. Maybe after you got it working you could use the MarkupSimpleNavigation module to do it
    1 point
  13. Well not to Cumbria because from you North West will take you into the Irish Sea. Eventually you will hit the Isle of Mann of course and then you will be in all sorts of trouble. I suppose we could hold the meet up at the new place on the top of Man Tor in Derbyshire. No idea what the internet connection is like up there but at least it is pretty much in the middle. Good beer in Castleton as well, I vaguely remember.
    1 point
  14. Do you want for example to redirect always to the first child of a landing page? You could give your landing pages a template "redirect" and in the template file: $session->redirect($page->children->first()->url); This would redirect you to the first child-page
    1 point
  15. Greetings, We have similar lines here in the Colonies. I'm North; Ryan is South. When we cross the Atlantic, we're all the same. Thanks, Matthew
    1 point
  16. Good idea. I've added a role exclusion feature to the module's configuration so you can check boxes next to any roles you want excluded from sending notifications. https://github.com/ryancramerdesign/LoginNotifier/commit/178c45681deab344e120eb64e4270a23866626e8
    1 point
  17. Yes that looks like the case I've upgraded to the latest dev version and that seems to have fixed the problem. Thanks!
    1 point
  18. Another way to display all fields is to use the "MarkupPageArray plugin module, which is installed by default and adds a render() function to all fields that return a PageArray (as many functions in ProcessWire do)." # echo $page->render();
    1 point
  19. Hi onjegolders, You might try printing out all the fields of your page as well as their values. You will see if your page's headline field is there or not. foreach($page->fields as $field) echo "<p>{$field->name}: " . $page->get($field->name) . "</p>";
    1 point
  20. I would vote for a group named "Helpers" for such modules, that provide functions that may be used by other modules or provide API-additions.
    1 point
  21. Sorry, disregard this post. I really should read the (awesome) PW docs more attentively...
    1 point
  22. Is your comments field name "comments"?
    1 point
  23. Greetings Everyone, I was involved in Joomla for about four years before coming to ProcessWire. I also did a fair amount of work with ModX, ExpressionEngine, Drupal, WordPress, and Concrete5. For frameworks, I got involved with CodeIgniter, then with Laravel. I can honestly say that -- in my experience -- ProcessWire allows the smoothest, cleanest path to the development of my concepts. I feel that with ProcessWire there is a shorter distance between what I am imagining for a site and how to get there. As diogo explains, that does not mean that ProcessWire has nothing to learn from other systems. And a positive discussion like this could be amazing if ProcessWire can gain from it. I've taken some time to look at my work with the CMSs, and I actually don't see anything ProcessWire can learn from them. Looking at Laravel and CodeIgniter, I see some potential for comparison (but nothing too major here): 1. Validation. Using the API to build forms in ProcessWire is an effective way to add validation. But it would be great to have more validation in the admin forms. 2. Form Creation. Again, we can create forms using the ProcessWire API. But when you want to build forms that lead to creating or editing new pages, I wonder if a more obvious "form helper" might be good (for example, something like CodeIgniter's: http://ellislab.com/codeigniter/user-guide/helpers/form_helper.html). These are the only two I can come up with at the moment. And again, in both cases, there are ways to achieve it in ProcessWire. It's more a question of whether there might be an even easier way. Thanks, Matthew
    1 point
  24. It's on my list of things to do at some point
    1 point
  25. There is other CMS'???
    1 point
  26. Soma, before I read your reply HTML Kickstart came to mind so your use of the word "kickstarter" amuses me as we were thinking along similar lines I think it would actually be better if we had a few profiles as really basic templates and picked a few main frameworks. So as an example off the top of my head, one of us builds the gallery profile in the PW admin, then chooses HTML Kickstart and does the front-end templating. Someone else (or the same person) then re-does the front-end template in Skeleton, then in Twitter Bootstrap and I think that that would actually create some very simple starting points in 3 mainstream frameworks for people to run with. Again, this is possibly more useful for devs but at least with two of those frameworks (Twitter Bootstrap and HTML Kickstart - Skeleton would take a bit more work as it's more streamlined), but it would also give less technical users a good starting point too. What do you reckon to that?
    1 point
  27. Yes we also discussed on profiles and how well they would serve as starter tools and of course marketing tools. I completely agree with this. And PW profiles make it really easy to build and export a setup (without permission and users). What I think would be best to keep them really simple and see them as kick-starter examples and resources to look at and learn. Ryan's blog profile is a little a different beast and goes very far already, with css framework to change "easily". Also the Skyscraper is a really cool resource that finally is now updated and people love it to see how it's done. Another thing we discussed (antti) is also the possibility to add functionality through modules. By installing them they setup fields and templates needed and builds a basic setup, along with some snippets it would also be possible to have blog, news, galleries etc in one click ready to then adapt. This would allow much more flexibility than just a profile that then misses the blog section and there's no way to install 2 profiles melted together. This is fun to discuss, lot's of possibilities and so few time
    1 point
  28. Annd who will build this. One big problem (no not again soma) I see and why I havent done any is it will bring in a lot of support an problems. In that one profile may not the way person x needs this and that. Also the way the profile is built may just one way to do it and either too advanced or too simple and could lead to many frustrations and people asking for things they can't build with your profile. It's like buildig a shop that in the end isnt flexible enough because its prebuilt and making it all configurable is hard and ends with being limited at best. I'm not saying dont do it. But just saying why I havent yet. I love PW for the fact it is so simple to build these things from ground up the way I need it. Thats me. But I see a lot of new people building now sites with PW that have no php or coding skills at all before. I think best way is to have better docs and tutorials on how to build a simple blog or portfolio. So to say there isnt really much. This is pw not wp.
    1 point
  29. All internal links are relative links, but I just realized that I had a <base> tag in the header specifiying the default URL. After commenting this line out, typing subdomain.domain/some_page did not redirect to the main domain anymore. Thanks a lot for pointing me in the right direction! Cheers, Stefan
    1 point
  30. Exactly, to be honest I was more thinking about as groups and didn't even think of assigning more than one group to a user. Thanks to your explanation, I now got that it's more like distinct feature sets. Coming from MODX with its completely over-the-top-for-most-projects permission system, this is really a simple and smart solution.
    1 point
  31. You just create a role and don't give it page delete permission. Add that role to the user. Edit: Now add access control to the template(s) you wish and set the role to edit pages.
    1 point
  32. Hello boys and gals. I have made little adjustments to the module to show shorter textdomain and the original and translated string. If a text doesn't show up, there's no translation there. Only string that are _("Text") 'ded will show.
    1 point
  33. We're planning to have JSON export/import for fields. Templates are a little different in that they have a file on the disk too. But we can still make the data structures templates portable in the same way as fields.
    1 point
×
×
  • Create New...