Jump to content

MarcC

Members
  • Posts

    380
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MarcC

  1. Thanks for sharing, Marty. Neat site. I like the bg texture. I listen to music like this when I'm coding sometimes. There's an app I use called Brain Power with a setting called "Tesla's Lab" that seems to help a lot. Prior to that I would either put on a Chromaticus album or listen to on "loop single track"
  2. I ran into something crazy today. It seems like so fundamental of a bug or design issue that surely the root of the problem has to be some crazy server configuration issue on my webhost's end, but even if this is the case, Ryan and other PW devs should know about it. Here is the simple test-case. My site has 4 pages below the root. Their names are about-us, member-info, articles, and site-map. Of these, about-us, member-info, and articles have subpages and can thus be considered "categories." When I'm on the homepage, (that is, $page is '/'), if I do foreach ($page->children() as $child) { echo "{$child->name},"; } I get what you'd expect: about-us,member-info,articles,site-map, OK, now navigate to a "category root" (2nd-level page, doesn't matter which one, I tested them all). Let's say member-info. Let's get the same list as before: foreach ($pages->get('/')->children() as $child) { echo "{$child->name},"; } I again get what you'd expect: about-us,member-info,articles,site-map, Now the rub: navigate to a category child (3rd level page). Let's say /member-info/foobar/ . Let's attempt the same loop as above: foreach ($pages->get('/')->children() as $child) { echo "{$child->name},"; } The result? about-us,home,articles,site-map, What? "home"? Sure enough: echo $page->url; // Prints http://mysite.com/home/foobar/ echo $page->parent->name; // Prints home echo $page->parent->title; // Prints Member Info [like it should] echo $pages->get($page->parent->id)->title; // Also Member Info [like it should] echo $pages->get("/{$page->parent->name}/)->id; // 0, because there is no page named "/home/" So yeah. Basically most properties of the parent page seem to be correct, except name and things that involve name (like url). I have no clue why name is getting changed to "home". The siblings of the page in question are fine. Anyway, thought you should know that it's happening. Any ideas to test are appreciated! This is the problem behind my issue with Soma's module. This client is on a Pair Networks shared server.
  3. Can you create a field that holds a concatenation of those two fields? Then choose to display that single field? Just an idea.
  4. Can you paste the code from that template?
  5. Simplest version of Ryan's code for this (that I've found): http://processwire.com/talk/topic/860-videos-inside-processwire-how-to-embed-videos-inside-processwire/#entry7280 The nice thing is, you wouldn't need to use preg_replace and some crazy regex. You'd just need to replace the preg_replace function with str_replace. For this reason I'd recommend using some special word rather than just "gallery". Maybe "renobird" or something. More of Ryan's code: http://processwire.com/talk/topic/1768-video-embed-fro-youtube-vimeo-etc/#entry16447 (in case it's helpful)
  6. Thanks Mats--that looks slightly different. I believe that sets up a single list without pagination, correct? I'm wondering if there's a way to do actual pagination.
  7. I have a list of businesses that I need to paginate alphabetically, so that there's a menu on the page like: [show All] A B C D E F ... Can anyone recommend a way to do this using the PW API? Thanks!
  8. A variation of Ryan's subsitution code for videos or embeds would probably do the trick. You could type "gallery" on its own line and your template logic could find & replace that with an actual gallery of your choosing. Or is this some different type of thing I'm not understanding?
  9. Does count($page->comments) work too?
  10. I like to use the style of whatever system I'm working with, be it a language, app framework or CMF or whatever. I had been using the CodeIgniter style guide previously, where you use Allman-style indenting like: if (blah) { stuff { instead of if (blah) { stuff } I also had been using underscores in my variables. But I noticed that Ryan uses camel case and the non-Allman indenting (whatever it's called). So I started mixing the two sometimes and that's not good. Is there a style guide (external to the ProcessWire project) that fits this style? Guessing not, but just wondering since CodeIgniter has one.
  11. Thanks for sharing your experience. I stopped working on WordPress sites some time ago, but I offered to help a friend with his WordPress site recently and was surprised by how little had changed. That's rarely the case, but I did have a big client request WordPress once. They were very amenable to other suggestions though, as the work got rolling. Pretty soon the WordPress site was a thing of the past, and the character of the work changed toward a more flexible, powerful collection of tools and resources. Earlier this year I sat in a meeting with a client, across the table from a social media consultant who looked at me and said at one point, "we are using WordPress for this site, correct?" I was sort of shocked, but she didn't really know of any other software, and was used to using WP for everything. She is a bit frustrated that she has to re-train just to use a client's site, but what can I say...it's not like learning new stuff is some rare thing in our industry. This client would have been lost with WordPress. I'm even frustrated by MODx these days, so I must be turning into a real CMS snob. Just got a client's OK to move a large, fairly prominent MODx site to ProcessWire after I built a newer, smaller site in PW for them. So looking at my work, it'd almost seem that "the right tool" is always ProcessWire. But I think it's mostly that ProcessWire is a flexible tool that is well designed to solve common problems.
  12. Thanks Soma, I just sent you a message with specific information.
  13. Hi Soma, I just downloaded and installed this on a new site, and there's a weird problem: I have pages like: Home About Us More About Us Even More About Us Donate Online Contact Us If I click on "More About Us" above, the page loads fine. But, if I click on "About Us" from the "More About Us" page, I get a 404 Page Not Found error. The menu has prepended "/home/" to the URL instead of "/about-us/". So if I try to go to "Even More About Us," I also get a 404, because the URL is now "/home/even-more-about-us" instead of "/about-us/even-more-about-us" Do you know what could cause this? I thought it might have to do with show_root but that wasn't it. Thanks!
  14. That was a cool promotion, and the library subscription is fairly cheap. I had a difficult time choosing a book though. I ended up with a jQuery book, but there are many "beginning X' books at Packt. Very broad, not super deep, or so it seemed to me. I wish they had more up-to-date (or highly-rated) books on the various PHP frameworks.
  15. This is perfect--I set it up for a colleague today and was really grateful to see Skeleton in use. We don't seem to be able to manipulate comments, though--we can find & click on a single comment (admin side) but nothing happens. Any advice?
  16. Thanks guys. Cost-to-build (and maintain) is a real issue here. I know it could be done in ProcessWire, but I'm also looking at AMember and Machform because I've had some experience with them in the past, and there is a lot to be done from front end to back end that others have already done. Love to see if the PW community can come up with something though.
  17. I have a client who is doing some low-cost, low-volume class activities. They want to allow students to register online. I've looked into EventBrite for this, but I'm wondering if anyone here can recommend another service or software package. Thanks!
  18. Answer to my own question: Define the style in a custom editor.css file, then give TinyMCE configuration the path to that CSS. Example entry would be "span.Highlight_Yellow". Then use theme_advanced_styles similar to Ryan's example in the TinyMCE configuration area, to give the entry a proper name such as "Yellow Highlight." Finally add a "styleselect" entry to theme_advanced_buttons_1.
  19. Nice, thanks Ryan. I tried 'backcolor' and that works, too. My only concern is that this client pastes almost everything from Word. Will this allow Word's crazy style stuff through, too? If so, is there some way to just assign a class the client can select such as "yellow_highlight"?
  20. I have a client who requested the ability to highlight text (basically change the CSS background color between a few options). Looking at the TinyMCE documentation, I tried adding this to the field's advanced TinyMCE options, but it didn't seem to take effect. Any tips? hilitecolor : {inline : 'span', classes : 'hilitecolor'},
  21. Martijn, that would be a huge improvement.
  22. Thanks guys! Martijn, not sure I understand. What's the entry for?
  23. I recognize that this is probably great for security, but it's just not working for my client right now. I just upgraded the site, and one staff member got the wait time incremented to 90 seconds before she saw the message about waiting So then she said she was going to put off working on the site for a few days, because she couldn't deal with it for now. I can't have this mental block happen with other staff or other clients--how do I turn it off? Thanks
  24. It seems the site is loading 62K of Facebook javascript. That must be annoying. It's a good thing you have deflate turned on. Also, looks like jquery is loaded twice. You could combine a few of these scripts probably too. But the site doesn't seem too slow to me. Nice work.
  25. The site looks great. First time I've seen output buffering used in a PW template, I think. Can you explain why you chose to use it?
×
×
  • Create New...