Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/27/2013 in all areas

  1. hi all, new PW site launch: http://www.ohmspeaker.com/ some of the modules that were helpful or essential for this: cropimage formbuilder fredi importcsv minify piwik analytics procache batcher redirects version control template decorator modules manager page link abstractor sitemap xml admin custom pages markup simple navigation (for the sitemap) forum topics related to this site dev: Legacy Site URL redirects: http://processwire.com/talk/topic/3641-redirect-legacy-url-to-new-pw-page/ Clean up spelling: http://processwire.com/talk/topic/3519-use-api-to-spellcheck-whole-siteclean-up-spacing/ hashes in URLs on change selected product http://processwire.com/talk/topic/3496-help-with-url-param-change/ FormBuilder http://processwire.com/talk/topic/2904-how-to-redirect-by-id/ http://processwire.com/talk/topic/2821-3rd-party-send-conditionally/ http://processwire.com/talk/topic/2820-use-session-to-remember-form-selections/ Custom Menus http://processwire.com/talk/topic/2787-custom-menu-not-related-to-page-tree/ other notes: The skyscraper profile provided the example for how to get started with the advanced product search, a.k.a. the speaker finder. The standard search has been extended to show results in different categories. there is some use of Soma's word limiter for the news teaser text, and for making meta descriptions out of body fields, from this topic: http://processwire.com/talk/topic/3429-how-to-set-text-linecharacter-limits-in-templates/ the design is built on twitter bootstrap framework Fredi proved to be totally essential for the client, in being able to rapidly edit things without having to find things in the admin. This site is going to replace an existing site on a different domain (ohmspeakers.com). At some point we weren't sure if/how we would be able to handle the shopping cart element, and then found foxycart, which proved to be the best choice, very flexible, and easy to implement for this type of site. FC is hands down the simplest and easiest way (imho) we could achieve things like the legacy product pages, where there are various parts and upgrades displayed on 1 page. this version is sort of a "v1", and will be expanded/improved a lot for a v2, which would happen in about 4 months.. BTW - these speakers are really good; i now own 3 pairs ... they look great and do sound totally amazing...! -marc
    3 points
  2. The file name is the key. $gal_page->images->get("myjpg.jpg")->description = "34512";
    3 points
  3. Thanks! IMO, if you build new sites today and don't care about mobile devices, you're doing something wrong (well, at least if you're doing this professionally) btw: one of the many things about PW that awed me from the start was the mobile friendliness of the backend - out of the box. Over the weekend I was out of town and spotted a little typo; it was quickly fixed with my phone.
    2 points
  4. thanks apesia, for bringing up this topic... hopefully by the time i get to V2, i'll come up with a way to deal with that; i'm using jquery validate for another form on the site, maybe there would be a way to integrate that with FB.. i also forgot to include in the first post a little about how that project evolved and ended up with PW.... it started a long time ago when we first tried to do the site in Joomla, using RedShop; that was basically a disaster; RedShop promised all of the 'features' you could want, but was rife with problems and almost nothing worked. I found myself on the RedShop forum almost every day reporting bugs, spelling errors in the component etc.; then Joomla 1.5 reach EOL, and we tried to upgrade, and that failed in many ways also (components, template etc..).. once i found processwire, the plan was to do a simple corporate brochure site, which would be like a product catalog, no ecommerce. During the work on that, i experimented with csv import on another PW site and discovered how to easily import the old website data, so that it took only a few hours to import the existing relational product database (MSaccess/Cold Fusion); And then i read about foxycart, so that became the solution for the parts store, since the existing site provider was discontinuing CC transactions on their servers, i guess they are not PCI compliant; Once we got that going, it was just a small step to enable add to cart buttons for the 'current' product line...
    2 points
  5. It's an outdated version of processwire.com, what's up with that?
    1 point
  6. The site's been live for about 2 months now, but I thought I would share the first of many projects I plan to build with Processwire. http://romania-meubelen.nl is a site I designed and built for a small Dutch company specializing in Teak furniture. There's a lot of complex logic built into the calculating of the prices when combined with different sizes and finishes, but Processwire definitely made it a whole lot simpler to build.
    1 point
  7. Ok! Then i tried to do a checklist: Translate the documentation in this order Brief description of PW Installation of PW Installation of language pack Start to translate also this part: http://processwire.com/api/ (PDF) Collect all the italian sites for a little showcase (i have only 1 site really active, the rest is on development) http://www.estreti.it/ http://smartenergysite.infofactory.it/ (Under development, on the next week is completed). http://sincronpolis.infofactory.it/ (Under development) Check if we use Ryan hosting or my server or whatever other hosting. Make the site! Any suggestion are welcome!
    1 point
  8. Cool! Image field (or any other file field type) is array if it's allowed to hold more than one file. You can set this from field setup under Details tab: Maximum files allowed. So your first attempt would also work if you set your header_img Maximum files allowed to 1.
    1 point
  9. Those two output exactly the same - what better suits your need. So if $header_imgs is a repeater I asume that $header_img field is defined for multiple images (like it is by default). Then you just have to remember that image field is also array and you can loop trough or get items using WireArray methods. So not much to add to your first attempt: <?php // get first image from last repeater object $img = $pages->get(1)->header_imgs->pop()->header_img->first(); // output relative url echo $img->url; // output absolute url echo $img->httpUrl;
    1 point
  10. .. and now it should definitely be password-protected, hidden or removed to avoid unnecessary confusion / people browsing that instead of real site. Good point, @owzim
    1 point
  11. a. Looks ok except you get the page with the argument given to saveReady $page = $event->arguments(0); I often use a little trick to debug to find why it doesn't work. Enter $page = $event->arguments(0); echo $page->title; exit(); In the hook function, if the hook works you should see a white screen and the page title. b. Remove the trailing ?> at the end, not needed and could give header already sent errors. c. Other than that I can't produce the session error (what was it exactly?) Module works, install uninstall ... Why do you wanted to uninstall the module? To change something in modules you usually don't have to uninstall it, except if you change stuff that would need to have it installed from scratch. If you run into problems with a module, you should remove files AND the entry in the DB table "modules" for the module. Then start again.
    1 point
  12. 1 point
  13. you can look in the browser URL when you roll the mouse over the edit link for a page;
    1 point
  14. 1 point
  15. Since I pretty much got the hang of PW: Christian Raunitschka, Berlin http://ch.rauni.me Though, you might want to use this photo instead of my wierdo blueish one =) http://photos3.meetupstatic.com/photos/member/d/b/b/c/highres_80216252.jpeg
    1 point
  16. just had a look at the answers in this forum - Ryan has worked himself through every unanswered post! On a Sunday afternoon...
    1 point
  17. I agree. I also moved this topic to pub where we can raise glasses.
    1 point
  18. Greetings Everyone, Sorry I missed this discussion until now. Yes, I am working on a ProcessWire book and companion Web site. As a technical writer/developer/designer, ProcessWire has been an inspiration on multiple fronts: creating Web sites, going deeper with design/development, and writing/documenting the system. I've been working regularly on the book project, and I have about 175 pages completed already. I'll have much more to share in the coming weeks. Stay tuned, Matthew
    1 point
  19. ... no answer. I decided to help myself and hope somebody else will profit from it. I changed the following lines (450 ff) in the module-file from: if ($this->user->avatar) { $cropped_avatar = $this->user->avatar->first()->size(150); $avatar = $cropped_avatar->url; } to: if ($this->user->avatar->first()->url) { $cropped_avatar = $this->user->avatar->first()->size(150); $avatar = $cropped_avatar->url; } Now its working. About security: After logging-in each user can reach every profile about other users via profile/info/username. I think I will make some modifications for my personal use in this line (481): if($this->user->isLoggedin() && $this->input->urlSegment1 == 'info' && $this->sanitizer->name($this->input->urlSegment2)) { I would also recommend to include a field which inquires the old password before giving the allowence to set a new one in the edit-area. Until going deeper in PW I like it more and more and can image how big the potential for the future is. kixe
    1 point
  20. You're mixing vanilla PHP with PW API. Selectors are PW specific. I don't know you guys know that you can also do this in PW (usually people miss this) if($page->is("template=home|basic-page")) echo "has template";
    1 point
  21. I think this would be pretty straightforward to do. Assuming you are recording a per-page count, then you'd want to add a integer field to the page (called 'pageviews' or something like that). Then at the bottom of your template: <?php $key = "pageview" . $page->id; if(!$session->$key) { $page->pageviews++; $page->save('pageviews'); $session->$key = 1; } You may also need to add a $page->setOutputFormatting(false) above that if PW throws an error. And you might prefer to take it a little further and use an array in your $session var. The only real problem with this method is that a portion of pageviews on any site are going to be from bots, spiders, etc. You can eliminate nearly all of those by setting up a new template/page that does nothing but record pageviews and hit it with javascript. The example assumes you set this up at /tools/pageview.js (a PW page), and you would paste this somewhere in your template that powers the pages you want to track: <script type='text/javascript'> // write the script statement with JS so that spiders don't attempt to include it document.write('<scr'+'ipt type="text/javascript" src="/tools/pageview.js?id=<?=$page->id?>"></sc'+'ript>'); </script> Then your template running /tools/pageview.js: <?php if(($id = (int) $input->get->id) > 0) { $p = $pages->get($id); if($p->id && $p->fields->has('pageviews')) { // page was found and it has a 'pageviews' field $key = "pageview" . $page->id; if($session->$key) { // pageview already recorded for this page, so skip it } else { // pageview not yet recorded for this page for this user session $p->pageviews++; $p->save('pageviews'); $session->$key = 1; } } } echo "// this JS file intentionally blank"; I assume you meant thousands not hundreds. But regardless of the number (or even if it has a couple extra zeros), it should not be a problem. You won't notice a difference in performance. And given that you are just saving one field 'pageviews', rather than the entire page, it'll be especially fast (at least in 2.1).
    1 point
×
×
  • Create New...