Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/30/2013 in all areas

  1. First of all: welcome to the forum, @NoDice! Not that much really, though it naturally depends on your past experience and so on. With CushyCMS (as far as I can tell from a quick look at their video guide) you'll have to learn how their system works, insert special attributes within your HTML markup and stuff like that. With PW you'll be learning how to insert basic PHP tags within your markup -- not that big a difference. Before you install PW and dive into it's default templates, I'd suggest that you read the basics of working with PW from our docs. ProcessWire is a very simple system to learn: all you really need to understand in order to get started are the basic concepts of pages, templates and fields (and a little bit about querying them and their values with the API.) As an example, you could have a template called basic-page with fields "title" and "body". By default that template would use basic-page.php in /site/templates/ as it's template file. To print out whatever values those fields have you could do this in said template file: <h1><?php echo $page->title; ?></h1> <p>This is static content, not coming from any page field. This will appear on <strong>each page using "basic-page" template</strong> as-is.</p> <?php echo $page->body; ?> Doesn't look too complicated, now does it? Of course you will pretty soon need a few other tricks, such as using foreach to iterate through things like image field containing multiple images, but that's all described in the docs and it's also dead simple. As @MarcC pointed out, it's possible but since multiple pages typically share one template you'd be affecting all of those pages. Then again, if you have a special page for something specific (such as "contact us") you can always create a new template (and a new template file) for that page.. OR you could do something like this in any of your template file: <?php if ($page->url == "/contact-us/") { ?> <h3>Our office is located here:</h3> <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q=disneyland,+paris&output=embed"></iframe> <?php } ?> With ProcessWire your options are almost limitless. Don't worry, it'll all fall in place once you start playing with it It's a bit ugly and not something I'd recommend, but: you can also have a field (or a couple of fields) in your templates (all of them or just some) that spit out raw HTML, CSS, JS etc. I say it's "ugly" because it could easily lead to various problems, such as broken page structure and so on, and I certainly would like to avoid such a thing on a client-managed website -- but as long as the site is managed only by you and a few other all of whom know enough to be careful not to break anything and not to insert any dangerous, external scripts etc. it's feasible option. Edit: just wanted to point out that essentially you're wondering whether to use an easy-to-use yet full-blown CMS with almost infinite possibilities (PW) or something that's designed to be "an easy way to change content" (CushyCMS.) Think about it this way: getting used to PW will take more than those "few minutes" CushyCMS promises, but once you do learn how to use it there's absolutely no limit to what you can do with it. On the other hand, if you're a) certain that your needs will stay small and b) really prefer a hosted, service-free tool then you should definitely go with CushyCMS. All in all it depends on your needs and preferences
    4 points
  2. PW puts no limits on your front-end design. Your resulting web site could be completely unstyled html, all laid out in tables or the latest cutting edge CSS3. That part is up to you. PW just organises your content and page hierarchy, if that is all you need from it.
    3 points
  3. Think about pw as: once your mind has embraced a higher dimension, it will never want to go back again. PW destroys the paradigm cms because you can structurize, combine, templating and profiling your html/css/js in any way you want and hook it all up with a very powerful api - so - you will always have more freedom and win time with pw. PW is fast on the front-end and back-end, lots of modules and easy editable for clients, 4 very important issues. Yes - for someone with a design focus like you - you need to invest some time to get familiar with pw and it's api but it will pay off. People with a coders mind will have a very short pw learning curve. Here my must read pw starters link collection: http://processwire.com/talk/topic/1041-raydale-multimedia-a-case-study/ http://processwire.com/talk/topic/1015-switching-from-drupal-to-processwire/page__view__findpost__p__8988 http://processwire.com/talk/topic/3691-tutorial-a-quick-guide-to-processwire-for-those-transitioning-from-modx/ http://processwire.com/talk/topic/2296-confused-by-pages/ I found this also somewhere (it isn't mine) but can't remember where I found it. Well I think most people think page == what you see instead of page == container Well, you gotta understand the power behind pages. At first I didn't get it either - because I only saw pages as, well, normal pages, just like in other systems. Not as a content container which can be called via the PW API. So yeah - once you got it, you got it. But it takes a while, I think. Especially when you look at and test many CMSs for just a short time. So I think this power feature/USP got to be explained again and again - to attract new developers... And here some good Stuff to read about pw http://www.mademyday.de/why-i-chose-processwire-over-modx.html http://en.wikipedia.org/wiki/ProcessWire http://getsymphony.com/discuss/thread/79645/
    3 points
  4. Console doesn't show any error. I don't know how to check the ajax request ;-( I must say it doesn't happen with skyscraper demo on processwire.com, so the problem has to be with the installation, not the browser, right? I think i will reinstall it. Isn't it always good to reinstall?;-)
    2 points
  5. Galaxy, See Diogo's code above. That should work for you. My problem was that I suggested code "independent" of your "result foreach" (I was starting with the $dollars = blah blah), which you don't need if you use your "result foreach" as Diogo suggests.. .....I'll eat my hat if Diogo's code doesn't work...I'm sure it will!
    2 points
  6. One of the things to add to the excellent answers above is that a lot of what you will learn with PW is standard PHP, so it is a transferrable skill - not like a bespoke templating language that only works with one CMS, but a skill you could use in other circumstances.
    2 points
  7. To create a sitemap.xml you can use Pete's Sitemap XML module, or you can create a template file and page to do it for you. This post explains how to create a template to do it for you. The benefit here is that you may find it simpler to tweak a template file than a module, though either is a good solution. Here is how to do it with a template file and a page: sitemap-xml.php <?php namespace ProcessWire; /** * ProcessWire Template to power a sitemap.xml * * 1. Copy this file to /site/templates/sitemap-xml.php * 2. Add the new template from the admin. * Under the "URLs" section, set it to NOT use trailing slashes. * 3. Create a new page at the root level, use your sitemap-xml template * and name the page "sitemap.xml". * * Note: hidden pages (and their children) are excluded from the sitemap. * If you have hidden pages that you want to be included, you can do so * by specifying the ID or path to them in an array sent to the * renderSiteMapXML() method at the bottom of this file. For instance: * * echo renderSiteMapXML(array('/hidden/page/', '/another/hidden/page/')); * */ function renderSitemapPage(Page $page) { return "\n<url>" . "\n\t<loc>" . $page->httpUrl . "</loc>" . "\n\t<lastmod>" . date("Y-m-d", $page->modified) . "</lastmod>" . "\n</url>"; } function renderSitemapChildren(Page $page) { $out = ''; $newParents = new PageArray(); $children = $page->children; foreach($children as $child) { $out .= renderSitemapPage($child); if($child->numChildren) $newParents->add($child); else wire('pages')->uncache($child); } foreach($newParents as $newParent) { $out .= renderSitemapChildren($newParent); wire('pages')->uncache($newParent); } return $out; } function renderSitemapXML(array $paths = array()) { $out = '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'; array_unshift($paths, '/'); // prepend homepage foreach($paths as $path) { $page = wire('pages')->get($path); if(!$page->id) continue; $out .= renderSitemapPage($page); if($page->numChildren) $out .= renderSitemapChildren($page); } $out .= "\n</urlset>"; return $out; } header("Content-Type: text/xml"); echo renderSitemapXML(); // If you want to include other hidden pages: // echo renderSitemapXML(array('/path/to/hidden/page/'));
    1 point
  8. Hey Friends of Webanalytics, I've finished the main work on porting Wanzes GA into a PiwikAnalytics Module. Just uploaded it to the modules directory. It does pretty much the same like GAModule So take a look at the module post: http://processwire.com/talk/topic/1609-processgoogleanalytics/ You could download the module in the directory or directly from my site: http://misterui.de/site/assets/files/1087/piwikanalytics.zip Cheerio
    1 point
  9. Module: MarkupCSScompress 0.8.5 (beta) convert $config->styles array to a single gzipped & cached CSS file and give <link rel="stylesheet" src="/processwire/styles.min.css/"> tag back. I love using the $config->styles array on the front-end. One disadvantage is, I like it that much that I end up with a multitude of styles with their corresponding links. To much requests for the browser if you asked me. So my thought was: I wish I could combine all styles, compress the css and serve 1 link back to the browser. But I don't like struggling to find CSS selectors in a compressed file. So I add the setting: Caching & concatenating disabled for superusers. For caching I used Ryan's beautiful MarkupCache module. Cons: Doesn't work with external CSS files ( All CSS files have to exist in processwire )How to use: ( important ) Put the MarkupCSScompress.php into the template folder. Place <?php echo $modules->get('MarkupCSScompress')->render(); ?> in the head where normally the CSS <link> would be. Install this module. Totally open for changes & improvements. download from github view on github modules on PW Todo: Change al relative urls to absolute urls in the CSS cache files. ( done ) Check PW version compatibility
    1 point
  10. Galaxy, I marked my answer as the solution instead of yours
    1 point
  11. .... Yeah, where you place the $total = 0; determines whether you get cumulative totals, sub-totals or grand total
    1 point
  12. I added this line later: $total = 0; Do you have it in your code?
    1 point
  13. Hallelujah diogo! And, thanks Kongondo for perservering with this. This indeed works:
    1 point
  14. Galaxy, you are too concerned about the html tags and I think that's what's confusing you. Listen to kongondo's advice: think of the content; understand how things get grouped; and only then add the tags into the right places.
    1 point
  15. // taking your code from some posts ago: foreach($result as $child) { echo "<li>"; echo "<a href='{$child->url}' class='list-title'>{$child->title}</a>"; $image = $child->logo; if (count($child->logo)){ echo "<span style='padding-right:140px;'><a href='{$child->logo->url}'><img src='/site/assets/uploads/yes.png'></a></span>"; } else{ echo "<span style='padding-right:140px;'><img src='/site/assets/uploads/no.png'></span>"; } // and from here on do the same as you did in the individual page, but adapted ($page is now $child) $total = 0; foreach ($child->grants as $grant) { $total += $grant->amount_approved; } echo "Total grants: <span>\${$total}</span>"; echo "</li>"; }
    1 point
  16. OK, are those totals correct? E.g., is the total for YMCA = 2000?
    1 point
  17. Why simpler? When transfering a site locally to the server, I'm always using phpmyadmin. Export all data to a mysql file takes me one minute, importing is just as easy. I think it doesn't matter how you export your stuff - more important is (if there's no other backup running) to do it at all
    1 point
  18. Why reinvent the wheel? Of course you can do that. I just prefer using phpMyAdmin for this
    1 point
  19. That problem happens only with links that are stored in the database. An example would be a link in a tinyMce text area, and those are the ones that the module solves.
    1 point
  20. @NoDice: shouldn't be any specific problems with that - though it wouldn't hurt to do some kind of test-run for moving the site before actually publishing it. You know, just to make sure. Regarding link issues, check this thread too, there are couple of methods to fix and/or avoid these mentioned. In short, either do the page save trick introduced by Soma, dump SQL and search+replace as mentioned by Ryan or install Page Link Abstractor to avoid the whole issue entirely (read the module description carefully, though, as it changes the way your links work a bit.)
    1 point
  21. It is a difficult situation pwired. I guess all you can do is sacrifice your evenings and weekends to some extent, even though your brain may be fried by the 9-5 work. I think to get back into the half-and-half situation again you need to to the extra work whenever you can to build up the client base and enough money to go back to half-and-half. Not sure how else you would do it.
    1 point
  22. Yeah, just don't put any PHP in your templates, I guess. But you need to keep in mind that typically many pages will share one template--that's a big advantage because you aren't repeating your work. Now if you want to back away from such dynamic usage in favor of plain HTML/CSS/JS, you may need to assign a separate template for each page on your site. If your site has a lot of different pages, that's sort of annoying--you'll want to take advantage of the dynamic PHP stuff as soon as you can. At the very least I would encourage you to work with the default templates that come with your first PW install, watch how they use includes, and try to see if you can combine the include statements with e.g. echo $page->title and echo $page->body to get something simple and dynamic up and running.
    1 point
  23. I think the problems inherent with a table booking system are as follows (and this is with no real research by the way): Do restaurants have a good grasp of how long a table will be occupied for? If so, give them an option (maybe default to 2 hours per table) Different table sizes will affect the booking. You need to enter your party size ideally to see what is available. That or the restaurant may be able to push tables together in many cases - how do you deal with that? If you're using a web booking system for a restaurant and it needs to be up to date, the system needs updating whenever walk-in customers come into the restaurant. Either that or you can only book online X hour in advance (4 hours default maybe?). Basically, what I'm getting at is that there are far more variables in play than other booking systems. Booking a holiday cottage is easy - it's got a fixed number of beds - no problem. Booking a hotel room is slightly trickier - you have more options, not just with how many beds per room, but type of room. The more I think about it, the less likely every eventuality will be covered just by the module I'm creating. I think it far more likely that each scenario needs to be tailored and that they might be best as site profiles since there will be a lot of templates with them. As such, the module I'm working on may help as a starting point for accommodation/asset-based booking, but won't be much help for table bookings and other time-of-day based scenarios. At least, not in version 1.
    1 point
  24. This isn't correct, as the CSS selector is specific to focus on the panel you asked about. It's already targeting the settings tab, and the ":first-child" as part of your CSS selector focuses it on the "who can access" field. Without that, it would hide the "info" field as well. But I agree it's better to use Soma's solution as that removes it from the markup entirely.
    1 point
  25. Looks good to me. I never changed any of the default settings for a simple sql export Cheers
    1 point
  26. 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.
    1 point
  27. I think one of the harder questions here is how do you create a project proposal for a really huge site project along with a project 'budget'. I have been researching it and came across some interesting sites: http://redfoxwebdesign.com.au/blog/getting_your_website_designed/how_much_does_a_website_cost http://www.designquote.net/html/dq_estimate_wizard.cfm https://quoterobot.com/ http://www.pearsonified.com/2006/06/how_much_should_a_design_cost.php
    1 point
  28. 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
  29. 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
  30. Thank you so much! It works now perfectly! Maybe this three lines are helpful for other "newbies" like me (this is what I've done): 1. find the line "# RewriteBase /" 2. delete the "#" 3. Important: put in the whole URL of your processwire-folder without the "http://" Example for 3.: - My website was http://www.mywebsite.com - Have installed processwire in the folder http://mywebsite.com/test/process - So I've put the following line into the .htaccess file: " RewriteBase /test/process/ " (without the annotations, of course) Again, thank you, nik!
    1 point
  31. I have the Same "problem" with my host. Cant look right now but I think the solution was to look in your .htaccess for a commented line with the RewriteBase, just uncomment it so that it is like RewriteBase / Will look tomorrow at my installations.
    1 point
  32. Just pushed new UI for cropping.
    1 point
×
×
  • Create New...