Jump to content

Macrura

PW-Moderators
  • Posts

    2,778
  • Joined

  • Last visited

  • Days Won

    40

Everything posted by Macrura

  1. thanks Soma - btw have you considered a flattr account... i 'flattred' a few of your modules...
  2. right- if tags are a page select then diogo's way is better; if you do it with import, then you would need to probably sort the array at the end, instead of on the selector..
  3. maybe $images = $pages->find("parent=/visuals/, summary|title~={$input->q}, sort=title"); $images2 = $pages->find("parent=/visuals/, tags={$input->q}"); $images->import($images2); http://processwire.com/api/arrays/
  4. many thanks diogo - this maybe should be in documentation, since it's getting common now to include fb og tags, one of which is the image; so using a custom crop, one can provide facebook with a proper image in the event a visitor 'likes' a particular page.. <?php echo 'http://' . $config->httpHost . $page->image->url; ?>
  5. thanks WillyC & diogo - I was doing it Willy C's way, because the api outputs the trailing slash on the root url and then a preceeding slash on the image url; @diogo - are you saying that $config->httpHost doesn't output the trailing slash? somehow i thought it did, but can't test right at the moment...
  6. Regarding the image URL, is there an easy way to echo the full URL, including the domain etc..; for example if you needed to provide the full image URL for something like an open graph tag; So if this was available from the api, it could be useful: $image->httpUrl
  7. What Ryan says is completely true, my knowledge of PHP is simple, but i've built some interesting/complex things using only the basics listed, and the fact that you can build almost anything using only those basics and the cheatsheet is the strength of it's underlying design. With PW, i think it's more about how you can visualize the relationship between your content in the backend and how you will output that in the front..so more like creative thinking, problem solving... it is for this reason that processwire is so much fun as @yellowled points out, because you find yourself being inventive and coming up with cool ideas that no other CMS would 'provoke'... it's nice to finally be able to say to clients "yes that can be done"
  8. Macrura

    Before PW & After PW

    thanks raymond.. before got me in stitches ...watching again
  9. it would be cool if there were a searchable and tagged repository of PW code snippets; each code sample could include the commented code, tags (like menu, gallery, user, forms, search etc.) and maybe a description field where you could put in what the context was. i'm always bringing up previous sites that I solved a problem on to see what the code I used was, and then copying/modding it to the new project.. edit: i just installed CodeBox and looks good. can also send snippets to gist
  10. Hey Luis - thanks looking awesome! -marc
  11. for these types of situations, i always use a custom menu that is managed by a hidden page tree.. works great and lets you make your menus how you want, regardless of page tree structure... http://processwire.com/talk/topic/2787-custom-menu-not-related-to-page-tree/
  12. yay! this is awesome. couple of issues: 1.) comming soon (spelling is coming) 2.) is there any way to disable the module from showing any site IDs besides the one you enter? RIght now it shows all of the piwik sites, but i would only want to show the specified site, such as '6' (and not 1 • 2 • 3 • 4 • 5 • etc..)
  13. there was a post, can't find it now, where someone added the blog profile to an existing site; though i agree it will be easier to just 'roll your own' blog, the way you want, and there is some reusable code in the blog profile that should speed up things like categories, RSS , etc.
  14. hey i'll add to the rant @totoff - you mean themeforest i think ? i think the prefabs are necessary for some devs and users, and for certain projects; I'm a sworn PW user, but i have a site running joomla because there is a really good invoicing system called nBill; and some CMS have advanced prebuilt addons (a.k.a. plugins/modules/components etc..) like community, calendars etc.; so you have to do research and consider budgets before you choose the cms for the project. When you can use PW you'll be relieved, it has the best admin UI hands down of any CMS. i just got done converting a wordpress template, one that I liked a lot, to use in a processwire site – it was really educational; i was able to see how the wp theme was coded and it wasn't a pretty site. Tons of code bloat (but all necessary to make the theme usable to a wide audience); and then i was able to go and attain all of the functionality of the wordpress version and more using 1/20th of the code; and i'm able to do really cool things now with the content management, media (audio, video) that would be completely impossible in WP, or would be a ridiculous hack job...
  15. Hi Wanze - many thanks - great and simple solution, nice thinking! here is how i finally implemented: <?php $tags = $pages->find("template=tag"); foreach($tags as $tag) { $c = $pages->count("template=audio, tags={$tag}"); if ($c == 0) continue; ?> //filter <li> markup here <?php } ?>
  16. Hi all, i think i need some help with this: I have a field called Tags, which is a pageAutocomplete field, and allows the user to enter tags for a page; Then on the template i have an isotope display which has a filter, using the tags; Right now i'm just cycling through the tags (selector for template=tag) to create the list of filter links; but is there a way to check that a given tag is actually in use, by a page, since right now if someone enters a tag and then deletes it, that tag is still a tag page, but if you click on that filter, no items are displayed... TIA
  17. Hi Basil, processwire is great, but it's not going to be a turn-key solution like wordpress, joomla etc.. you will have to know a bit of php to really make it work; I would recommend to spend some time reading the forum, all of the documentation, as well as Joss' great tutorials; and also check out the cheatsheet. You'll also find that reading through the code in the different site profiles will give you some answers. i think i spent about 1-2 month reading the forum before i actually tried to make a site with pw.
  18. keep everything in your template the same, delete the slideshow items, then get your sideshow items from pw into an array, then cycle through them in foreach, sort of like this (this is untested psuedo-code, just to give you an idea) <?php if(count($page->images)>0) { foreach($page->images as $img) { ?> <li> <a class="thumb" name="drop" href="<?php echo $img->url; ?>" title="<?php echo $img->description; ?>"> <img src="<?php echo $img->url; ?>" alt="<?php echo $img->description; ?>" /> </a> <div class="caption"> <?php echo $img->description; ?> </div> </li> <?php }} ?>
  19. Hey Nico - great and useful module! It would be good to point out that this module requires PHP 5.3, else your whole site will WSOD. -marc
  20. Yeah, the flexible content is kind of cool if you have situations where you have a lot of pages that don't all really conform to any single template, but most of the time when you have your content really well structured, and analyze what the output needs to be, you might find that this type of thing is really not necessary; if your needs are not that complex you could create a sort of generic repeater, where there is a select list for what is contained in the text area, like content, teaser, etc. then you could check the value of that select field and output the markup accordingly.
  21. Hi Jennifer - really nice site; just also wanted to alert you that the contact button on the homepage also brings up a pop up with a 404; http://fyp.washington.edu/fyp/contact-form/ i think it is the /fyp/ that is causing that.. -marc
  22. @Matthew - I'm curious as to how things are going with Foxycart; I have a client who needs to pick a cart soon and we're looking at several options.
  23. this is definitely *THE WAY* to make a sitemap...! Thanks... spent a long time trying to make a 3 column sitemap using CSS3 column count, however it will not work if you have home as a 'parent' <li> to the rest of the list, because the browser will keep all of the child items of that <li> in one column... with the MSN module, you can prepend the homepage, so it is in it's own <li> on the same level as the rest of the site...
  24. Thanks Ryan - I think i will use the redirect template idea for some things..Right now there are no multiple URLs, everything is well organized in the page tree, diescrreet now you're giving me some ideas about how to improve this – right now the products are arranged heirarchially under one parent, and then 4 'categories' with all of the products under each of those; But now i'm thinking that ALL of the products should have the same parent, i think this will make it more flexible to show search results.. then i guess i'll use URL segments for the product category, application, name etc...if i do it this way, there will be multiple URLs to the same page, but i could then use canonical URLs;
  25. Hey Ryan - thanks for replying to this. RIght... i think in most cases using the PW tree to generate the menu is best; But it does speak to the flexibility of PW that you can do something like this with relative ease when required...and in setting this up I learned from Soma's bootstrap menu markup how to generate complex nav markup without using a plugin.. I have heard it said somewhere that the navigation menu should be optimized for the user and not be constrained by the hidden structure of the site, especially for larger sites. In this case, it is a company where many of the products overlap in functionality, so there needs to be several routes for different users to arrive at certain pages. And they are not extremely organized yet about the content, so i'm sort of dumping all of the content into the tree in what seems like a logical structure, and then linking to things as necessary, with the custom menu. It's also helping to prevent confusion in some cases for links to external sites, where those would have been showing in the page tree if we did it that way. This site will also have a lot of advanced search and filter types of things, so the nav is kind of secondary to that route for finding pages... -marc
×
×
  • Create New...