Jump to content

kongondo

PW-Moderators
  • Posts

    7,479
  • Joined

  • Last visited

  • Days Won

    146

Everything posted by kongondo

  1. Welcome hop_along_kid! You are going to enjoy this ride I can promise you that
  2. I have a feeling PW date selectors will obey stuff you can throw at PHP strtotime
  3. The rest are in Soma's head The guy knows everything . Jokes aside, I think they are buried deep in PW code. I recall Soma saying when he was getting started he studied module code and looked in PW modules, etc. Edit: Adding hopefully relevant links to collate date selector stuff in one place.. http://processwire.com/talk/topic/3290-sort-by-date-range/ http://processwire.com/talk/topic/2795-selector-with-dates-and-checkboxes/ http://processwire.com/talk/topic/2260-search-articles/ - Nice one! See post by Ryan
  4. Browser caching issue then? What happens in Safari only, does the re-ordering stick? What about in the DB, do things change there?
  5. Hehe. Am trying to help Andrew here....Andrew, you are for real, no?
  6. I am having difficulty following you. Do you want to create a site in which some pages will have flash content and others not? Yes, you can do that in PW. PW does not generate your mark-up though. You would have to code your flash scripts which you can add to the template file for those pages that need the flash content. I haven't coded flash for many years so don't even know how I would go about that . See this thread for ideas. Are you new to PW? If you are, have you read the docs? They are super helpful
  7. You position could be right,...ESC delete!...Kyle will enlighten us....
  8. I think this is where the confusion arises. I am assuming Kyle means "ADs for User 1, etc"...according to their City, but your example suggests "ADs by User 1, etc". Question is, who is posting the ADs?; these Users or others?
  9. Aaah, I forgot the user bit. Thanks Diogo...However, the ADs belong to the City and I think they should be together. In addition, I don't think the City is associated with the user. I think it is the other way round. The user is associated with the City. If the user is no longer registered, the City remains . Would it not be possible to restrict users to their Cities using the City template (access rights)? This way, we only have one instance of each AD but this can be accessed by multiple users. In your example, are those ADs repeating for each user? I would create users using normal PW access model. Maybe I am not reading this properly.
  10. Kyle, If an AD can only belong to one City and one Category, then I would probably do it like below (almost similar to what you have...). Cities would be parents of ADs. Categories would be children of Category... City 1 AD 1 - C1 AD 2 - C1 City 2 AD 1 - C2 AD 2 - C2 AD 3 - C2 AD 4 - C2 City 3 AD 1 - C3 AD 2 - C3 Category Electronics Furniture Books This will keep my setup DRY. I do not have to repeat categories like you have in your example. ADs will have Single Page Reference Fields. I would restrict selection in this field to just children of Category (electronics, etc.). Cities will have a "cities" template with minimal fields. ADs an "ads" template with all the necessary AD fields + a Single Page Reference Field to select one category. Categories would have "categories" template probably with just a title. Searching: Written quickly, there could be errors, etc //find all ads of a city. 1007 is the ID of the city; you can use path or name of the city as well $ads = $pages->get(1007)->children("sort=title, limit=50"); //find all ads of a city that belong to electronics category. "category" is the name of the single page reference field. "electronics" is the name (title works as well I think?) of the category page $elecronicAds = $pages->get(1007)->children("sort=title, limit=50, category=electronics"); //find all ads belonging to electronics irrespective of city $elecronicAds = $pages->find("category=electronics, limit=50"); //find all ads and sort them by city, then category $allAds = $pages->find("template=ads, sort=parent, sort=category, limit=50"); There's probably better ways of doing this + you have other selectors at your disposal, but this should give you an idea
  11. @Kyle, The principle is the same. Basic questions to ask yourself: Can an Ad belong to more than one type (e.g. electronic, furniture, etc.) Can an Ad apply to more than one City? Remember, page fields give you access to ALL information about pages selected via the page field...e.g. $page->selected_single_page_field_name->title will give you the title of the page currently selected in that page field (here, single page reference field type)...You can do this for other fields belonging to the selected page, can iterate its other fields, etc.
  12. Spam? ..apologies to OP if it ain't This is how Google translates the above... with CSS understood well how to insert a Flash site at all wanted to do at MODX not completed PW decided to change my mind but do not quite understand what's what's website need to insert a flash on the main page without the other hxttp://xxxxxxxxxxxxx/ FLASH hxttp://xxxxxxxxxxxxxx
  13. Minor niggle - you are using a phone icon for contact us. After clicking that, I was expecting to see a phone number only (or online calling). Instead, I see phone numbers, email, etc on the actual page. Not a big deal..
  14. You are welcome. I've updated my post with a link to the docs...
  15. @cstevensjr I get what you are saying about different situations but of course you can still search for hidden and unpublished items by using "include=hidden" or "include=all" in your selectors. You can also use $pages->get to get one page, hidden or not. . I suppose it's about using what best suits the situation.. @Horst - the above code was definitely not a waste of time!
  16. @Adrian, You've been posting some really nice stuff - code and this module. Would you be able to put these stuff on Github and Gist so we can easily locate (and fork ) them and follow their development and perhaps contribute to? Many thanks.
  17. You might want to use PW online installer if FTP is slow - http://processwire.com/talk/topic/3602-pw-online-installer-download-of-latest-pw-install-to-server/ You never have to touch anything inside the wire folder
  18. The Fatal Errors suggests you do not have a field by that name. Have you checked typos? Do you really have a field called premium? Otherwise your selector should work. Also post your query code here if you've doubled-checked field name is correct...Uninitialised string offset error can also occur if you are treating a string as an array...
  19. @Anowitz: this thread about categorising content might prove useful
  20. Alevine, I'm somewhat confused by your approach. I do not understand your scenario and what you want to achieve. Why would you have your end users have access to selectors? Why not have the selectors as "normal" - in the template files? Won't page reference fields achieve what you want? I am guessing you are looking to provide choice? Anyway, since am not clear about the situation I can't comment further
  21. Hi Hendrik, Welcome to PW and the forums! Normally, if it has the right setup, PW will rename site-default to site after install. Do you mean to say you have both "site-default" and "site"? Rename "site-default" to "site" and get rid of the other "site" folder. Create your templates files inside "site". Note, you can also create templates without template files but that's a bit advanced for you right now Edit: Martijn was faster
  22. Thanks Soma......I have a feeling IM is soon coming out of lazy development and into the module repository
  23. Sorry to be picky, but just in case newbies get confused, page name (found under Settings Tab when editing a page) and page title (May or may not be found under Content Tab when editing a page - it is a custom field ) are different things in PW
  24. Hmmm, I don't think so. Never heard of area of a cube . You can get surface area though using SA = 6 × a2. Here, I believe Anti is referring to a two dimensional surface, in this case a square/rectangle..
×
×
  • Create New...