Jump to content

Macrura

PW-Moderators
  • Posts

    2,776
  • Joined

  • Last visited

  • Days Won

    40

Everything posted by Macrura

  1. also, i wonder if you could set these up not hierarchically - just have concerts, tours, and diary. then when you create a concert you just select which tour it is (page select); so this way if there is a concert that is not part of a tour it doesn't get stuck down in that page tree; depending on the diary entry format, you could have a selector on that for the tour and the concert... the more i work with pw, the more careful i get about pigeonholing certain content heirarchies, since i've run into some issues when the client changed their mind about the relationships of their content; so now i use a lot of page field references to connect things together and less relying on the page tree...
  2. you would create a processwire template that hold the relevant fields for your database, then import or enter your data in the admin; now you have a database that you can 'query' using processwire api selectors and you can also setup all kinds of relational stuff using the fieldtype page
  3. Macrura

    I'm so stuck :(

    for your event calendar, you have to consider how many calendar-type features you need; with PW you can sometimes integrate other scripts, for example this is a very full-featured calendar: http://smartphpcalendar.com as far as forum, that's also something that i would integrate from another script; (ip board is nice!) likewise for shopping cart (i use foxycart, but Shopify is also great and Ecwid is a discreet ecommerce system that can 'float' on any site with a few lines of code). you can take apart the blog profile if you want to build your own blog using PW, or use that profile as a starting point
  4. extremely awesome design
  5. @lundy - 1. yes; 2. fields (as far as i can tell) are hard coded into the module - you would need to clone the module and mod it for your use. 3. i don't think so. 4. probably not much if you use caching
  6. @pwired you could use hanna codes to create the divs so that there is less potential for editors to screw things up that they can't see. [[div class=special-class]] text [[_div]] then setup hanna code to take that class variable and make it output in the div element; put all of the styling in your CSS; if you do need to do this on the fly in the editor, then add div buttons, background color buttons, font selectors etc to your TinyMCE; I remember in the bad old days of Joomla that the editor had so many buttons that it would sometimes take me a while to find the one i was looking for
  7. the page would be accessed by it's URL; the template markup would define what is presented on the page; you can echo any field on the template, or any field from any other page...
  8. yes, you could definitely use pages to store questions, pages are the 'cellular' object in PW, they can represent anything you want them to, folders, bits of data, chunks, whatever; you could create a template called questions and then another one called question, and then allow only pages with the question template as children of the questions template; then you could import your questions using the csv module or the api.
  9. most editors I've ever seen use <strong> for bold and <em> for italics. it's perfectly fine and not outdated at all, in fact these are semantic http://html5doctor.com/i-b-em-strong-element/ edit: oh and stay away from inline styles if you can.
  10. the templates are really fieldsets - you would have to add the questions field to a template; you could use a repeater field to store multiple iterations of a field on a page; or you could store the 10 questions in a text field and then pull them each out using php, like for example if each question was on a newline, you could easily pull each one out and then foreach through them in order to output them anyway you want, be it <li> or <p>.
  11. i think it would be good to have the stock error message as a default, but at least the option to override it in the field settings; also - i think you could possibly still use the form builder as a processor even if you do your own form markup, as in if you want to be able to take any advantages of the form builder features besides it just creating the form markup
  12. Hi gerhard - the default errors show above each individual field. there is probably an easy way to change it in the code to output below the individual field, though i think above the field looks/feels better - i think that's what Ryan opted to do it that way, it's sort of easier to notice. One thing i did just notice is that there is nowhere to change the required notice text for each field... i'll have to put that in as a feature request, right now if you miss a field it outputs "missing required value" but it would be better to be able to customize each message,like "please enter your first name" above a name field etc..
  13. done and tweeted
  14. hey - great site! the macaron tower is crazy!
  15. you mean like this? if($product->sc_price_drop) { $out .= '<del>' . $product->sc_price . " €</del>"; $out .= number_format($product->sc_price_drop) . " €"; } else { $out .= ($product->sc_price ? number_format($product->sc_price) . " €" : $na); }
  16. could you explain more? i'm not really getting what you're trying to do...
  17. Hi Niklas, i guess maybe when you say 'sites' you mean pages? this is something that can already be done pretty easily. for example i just did a site with 3 distinct types of data, classes (as in like an art class), sessions (as in the actual session that the class runs, start/end dates, instructor etc.) and events. For the classes, we setup a parent page called Class Database, and then a custom admin page for viewing the list of classes, and being able to click on one and edit it. the class database page used a template called class-database which only allows the page type class as a child. for sessions those are relational to classes and output on each class, the class is a page select on the session, and there is no template file for the session, so they won't show or be accessible on the front end. the classes are output using url segments and some url 'rewriting' logic that was demonstrated by Ryan's CMS Critic case study.
  18. hi alejandro - cool - glad that's working... and you reminded me that i probably don't need to put the server path, that's why i had the leading slashes, i can include those liek you did since they are in the templates directory...
  19. maybe $results->sort("-blog_date"); see http://cheatsheet.processwire.com/ $a->sort("property") Sorts the WireArray by the given item property (string). You may also specify the property as "property.subproperty", where property resolves to a Wire derived object, and subproperty resolves to a property within that object. Prepend a minus sign "-" to the property name reverse the sort.
  20. right - ok well i wouldn't use the page tree for categories, i would bucket the pages all under 1 page and then use Url Segments for the categorization; i do this for a lot of reasons, but one being that sometimes clients will want something to be in 2 categories. to do what you want to do would be pretty easy though, you would need to run a hook before the pages are saved; for that you might check the formbuilder thread there are some examples of code for running hooks with formbuilder.
  21. really not sure what you're trying to do... is this on the front end? once the forms are saved to pages you can do anything you want with them, check the cheatsheet that pretty much has everything you need to know http://cheatsheet.processwire.com/
  22. <?php $entries = $pages->get("/submissions/")->children(); foreach ($entries as $entry) { ?> <p><?=$entry->name_1;?></p> <p><?=$entry->description_1;?></p> <? } ?> though in this case i think this is better: <?php $entries = $pages->get("/submissions/")->children(); foreach ($entries as $entry) { echo "<p>{$entry->name_1}</p>"; echo "<p>{$entry->description_1}</p>"; } ?>
  23. Soma rocks!!!
  24. that's cool - didn't know you could request fc transactions via curl.. not sure why the code i posted didn't work for you though - i tested by re-feeding transactions from FC and was eventually able to have it reply with success and also it was successfully updating the processwire page (in my case decrementing the inventory)// did you include all of the scripts; // get these from http://modx.com/extras/package/foxycartinventory $rc4cryptPath = "/path/to/class.rc4crypt.php"; $xmlParserPath = "/path/to/class.xmlparser_php5.php"; i also have datafeed log working but commented out, since it's only needed for testing... anyway thanks for posting your solution, that could be useful at some point in the future...
  25. depends on where your opening php tag is, and this is not php comment <!-- use brackets then your editor can show you the matching bracket <?php foreach ($entries as $entry) { ?> <p><?=$entry->name_1;?></p> <p><?=$entry->description_1;?></p> <? } ?>
×
×
  • Create New...