Jump to content

diogo

Moderators
  • Posts

    4,314
  • Joined

  • Last visited

  • Days Won

    80

Everything posted by diogo

  1. On top of what Reno just wrote, it can even be as simple as this: EDIT: As Reno pointed, this code is wrong, i was even taking in consideration only the last segment, which is not very clever... I will leave it here for the wall of shame if ($input->urlSegment1) { $mypage = ""; $template = ""; if ($input->urlSegment4) { $name = $input->urlSegment4; $parent = products; } elseif ($input->urlSegment3) { $name = $input->urlSegment3; $parent = collections; } elseif ($input->urlSegment2) { $name = $input->urlSegment2; $parent = kind; } else { $name = $input->urlSegment1; $parent = sex; } $name = $sanitizer->name($name) $mypage = $pages->get("parent=$parent, name=$name"); echo render($mypage); } else { // normal code for page without segments } Um Portuga, boa! Benvindo
  2. Name is not a normal field, so it doesn't even appear when you show build-in fields. I don't think you can't do this in an elegant way. The non elegant way is with javascript. Still, I think the most elegant way of all is telling the client to leave it alone edit: there you have it, Soma to the rescue! I keep my second statement though
  3. i love this guy http://grooveshark.com/album/Mes+Mauvaises+Frequentations/6366480
  4. But that's the name of the vídeo on the url, right? You have access to that code from the url to put it on a field in the admin, I guess. If so, It would be enough to have a normal text field where you put that code without the extension, and have the embedding code on the template: echo '<embed src="http://myserver/player.swf" width="320" height="256" bgcolor="FFFFFF" allowscriptaccess="always" allowfullscreen="false" flashvars="flvsource=http://myserver/uploads/' . $page->video_code . 'flv&preview_image=http://myserver/uploads/player_thumbs/' . $page->video_code . '.jpg&backgcolor=FFFFFF&autoplay=true&url_logo=http://myserver/images/playerlogos/logo-player.png&logo=top_right&floating_navbar=false&color_nav_bar_top=0x478dc2&color_nav_bar_bottom=0xE7EBEC&ads_background_color=0x00CCFF&ads_border_color=0xCCCCCC&scrubber_position_color=0x6AA1CE&scrubber_load_color=0x888888&scrubber_background_color=0xBBBBBB&volume_bar_color=0xBBBBBB&aspect_ratio=stretch"></embed>";
  5. If not, you can always find first the pages with speaker, then the pages without speaker, and then merge them.
  6. You didn't find anything?? http://processwire.com/talk/topic/71-categorizingtagging-content/ http://processwire.com/talk/topic/2976-get-pages-with-the-most-similar-categories-sorted/ http://processwire.com/talk/topic/2010-fieldtype-for-storing-tags/ http://processwire.com/talk/topic/1916-another-categories-question/ http://processwire.com/talk/topic/2519-nested-categories/ http://processwire.com/talk/topic/3085-getting-tags-in-use/ http://processwire.com/talk/topic/2309-best-way-to-organize-categories-in-this-case/ http://processwire.com/talk/topic/1679-find-pages-with-multiple-categorytags/
  7. I think so, Rjay. This is only for different domains.
  8. After having had such fun creating a first theme for Textadept (see here http://processwire.com/talk/topic/3518-what-ide-do-you-utilize/?p=34637), I now created another theme, this time inspired by the colors of PW You can download Textadept here http://foicica.com/textadept/ And the ProcessWire theme here https://github.com/ocorreiododiogo/processwire-theme
  9. I agree with Reno, and it's even possible to keep the same url structure with url segments. edit: Well, Soma was right
  10. Names must be unique only under the same parent edit: you can have this url if you want: domain.com/page/page/page/page/page/page/page
  11. Names are not unique. Look zyON's structure, the page "men" appears under different parents "brand1" and "brand2". The idea is to find all products that have a "men" page as ancestor.
  12. ah yep, but using several here wouldn't work without iterating...
  13. Great! This is the selector I was looking for since my first answer! So, answering the original question, apart from thinking that Reno's structure is more efficient than the original because there aren't pages (men, women, etc.): Shoes>Brand2 (Men or Women) $pages->get("/shoes/brand2")->find("template=product"); Shoes>Men (Any Brand) // I was convinced that this would work, but it doesn't $men = (string) $pages->find("name=men"); echo $pages->find("has_parent={$men}, template=product"); Surprise, surprise, it doesn't work... apparently, has_parent doesn't accept a 123|124|125 kind of string, but only one id. I get this error:
  14. same as $pages->find("id=1001|1002") or faster?
  15. Cody Lindley strikes again http://tech.pro/tutorial/1214/javascript-regular-expression-enlightenment
  16. But isn't it more difficult for the editor to remember to add all the necessary repeater fileds, then to browse all the fields and fill the ones that are needed?
  17. Reno, on your selectors, parent has to be "parent=/shoes/men/|/shoes/women/", or use the IDs, of course "parent=123|124"
  18. On the small chat window next to the video there is this guy "Philipp Pille Urlich" that seems to know a lot about PW
  19. What do you mean the source is random? On the embed code above, you are refering to this "PZDBCClXAP0td1rgBPqE.flv"?
  20. Wanze, the advantage I see on creating own users in a case like this is making a separation between members of the app and users of the website. They can behave in such different ways. One example is that editors should be able to create other editors, but not members of the app. Also, if you have thousand of members, the users page will maybe be too crowded. Also, as onjegolders said, pw user have some security limitations that make it more difficult to search and display them, and that's why he is being forced to keep twin users in two different places. Anyway, I didn't give this much thought as it isn't my work...
  21. Shoes>Brand2 (Men or Women) $pages->get("/shoes/brand2")->find("template=product"); I was trying to answer to Shoes>Men (Any Brand) in one line, but a "parents" selector is missing
  22. Go to phpmyadmin (or whatever there is on your server) and export the PW db. then go to phpmyadmin on xampp and import it.
  23. It's quite a project you have there! I won't lie to you, this is quite complex to build entirely on PW, even for someone very experienced. But if you plan to integrate other tools I think PW is perfect. Apeisa's Ecommerce module is an example, and for forum integration you can show interest http://processwire.com/talk/topic/3536-forum-integration-module I would say it will take a lot of learning and questions asked, but you seem to have things well planned, wish is good. youwontbeforgotten
×
×
  • Create New...