-
Posts
4,035 -
Joined
-
Last visited
-
Days Won
66
Everything posted by Pete
-
Certainly useful for larger sites and I can think of at least one that would make use of this.
-
I would actually separate out each Vendor and each invidivual Product to be under their own tree like: /vendors/vendorname/ /products/product-1/ You then just use a Page fieldtype to link products to relevant vendors: http://processwire.com/videos/page-fieldtype/ and then use code on the product name something like this to pull the vendor into the product page: <?php $productvendors = $pages->find("template=vendors, id=$page->vendors"); // Assuming you could have more than one vendor per product $productvendor = $pages->find("template=vendors, id=" . $page->vendors->first()); // Or just one vendor You can also do it the other way to view a vendor page and list all products they sell: <?php $vendorproducts = $pages->find("template=products, vendor=$page"); // Assumes your Page field is called vendor
-
I do have a habit on a couple of sites of having the current page added to the breadcrumb but without a link. It just feels more complete to me. If it sounds odd, go back to the fairy tale and assume that the current page without a link is the spot you're standing on without dropping any breadcrumbs. "You are here, in case you didn't know and don't see the title in an obvious location on the page" can actually be relevant if you arrive at a page from search results for example, but I think it's more about personal tastes than anything else.
-
Since each field is its own table, I would sync any beginning with "field_" as well as fieldgroups, fieldgroups_fields, fields and templates as a minimum (which is actually the vast majority of them). If you're developing a site where permissions will change a lot then you'll probably want page_access too.
-
How to hook into comments module to change notificationEmail?
Pete replied to apeisa's topic in General Support
I was assuming each author has their own account and therefore they would receive those emails instead of/as well as the system admin - I might not be understanding your setup well enough though. In fact, it's not as simple as I thought as individual authors couldn't moderate just their own comments with the module (assuming you wanted to?) unless you rewrite a chunk of the module and let them have access to the comments manager. Well that just got more complicated -
I'd agree with the above. You would almost want to give your template developers naming conventions for fields and a list of fields currently available, then whoever is managing the backend receives the new templates with a list of any new fields they need to create. Once the fields are there you can drop the templates in and they'll just work It is possible to work this way even without a local database when people are proficient with the API, but the problem is when you get a larger team and how someone has set up a field locally isn't necessarily the same way the person managing the backend does it. I suppose if you had a site that big some sort of field settings exporter would be nice.
-
How to hook into comments module to change notificationEmail?
Pete replied to apeisa's topic in General Support
I think that a config option in the core module might make sense here, and I don't usually suggest that but in this case I see it just being a checkbox labelled "email post author when new comments are made" which seems a but much having a whole module for it. In this case it would work for one blog with multiple authors or multiple blogs as well. To be honest, you'd then want another one to toggle whether the admin email address gets an email with every comment as well as this might then be unnecessary on some sites. The more I think about it the more options I want to add to the config but then we're getting away from a simple config option -
I think you might get access to the password value if you hook before the page is saved, but I don't have time to give an example just now (Soma or someone else with fast typing fingers will doubtless be here soon with an example).
-
Repository of php Scripts for Templates
Pete replied to thetuningspoon's topic in Wishlist & Roadmap
In fact, the functionality for this is simple - allow users to post links to each gist they want to list here, on submit split the gust ID off the end of the URL, check it's accessible (not private) and the sky's the limit Obviously some thought needs to go into categorisation and other relevant fields, but aside from that it's relatively straightforward. -
Repository of php Scripts for Templates
Pete replied to thetuningspoon's topic in Wishlist & Roadmap
Ah, now that is perfect because of the API: http://developer.github.com/v3/gists/ Just needs some thought about the code behind it and having users here list their own gists (wouldn't want to get all for a user unless they're relevant). -
Repository of php Scripts for Templates
Pete replied to thetuningspoon's topic in Wishlist & Roadmap
Surely this is the modules directory? Or am I getting confused? -
The general rule of thumb is that anything that the majority of people wouldn't use exists as an add-on module rather than in the core. That's not to say something like this isn't useful, I know it would be, but it's not often you would need full-blown emailing capabilities like that. It's usually relatively easy to implement external packages as modules though to make config nice and easy through the ProcessWire admin and make it easily callable without needing to know paths etc so maybe that is the way forward for it.
-
You should be able to iterate through fields without knowing their names - the Cheatsheet should help you there. Something along the lines of get the page template, iterate through template->fields and then you have access to do something like $page->($field->name)->removeAll(); Just typing that quickly on my phone but hopefully you get the idea.
-
I'm not sure how to troubleshoot that but I do believe ProcessWire will require PHP 5.3 minimum at some point in the not-too-distant future so I'm hoping someone can help you with the 5.3 issue you encountered. You should be fine for now though but thought that that was worth mentioning.
-
That's cool to know, but you would almost think the function would be called clearold() I guess though makenew() is there to set up new fields for a new page usually before they're populated so I was just trying to be funny above
-
That should be fine Mark as you can set the PHP ones in your PHP.ini, but -indexes is there for security really so it doesn't list files in folders ny default if you type in a directory name so I'd question the security of a host that doesn't let you do that to be honest... assuming I got all that right The main thing is you're up and running and the fun starts NOW!
-
Welcome to coding sanity, fun and faster development work
-
First Year Programs at the University of Washington runs on ProcessWire!
Pete replied to Jennifer S's topic in Showcase
I always just do this usually Copyright <?php echo date('Y'); ?> Great site by the way -
Welcome to the forums ProcessWire, like most CMS', can only edit pages in its own database so I don't think you'll find many systems that allow you to edit your own static pages that haven't been created with a CMS well as add new ones that have been created with a CMS - that's just not the way they usually work. That said, if you can share a link to your site it really is much easier to import a currently existing site into ProcessWire than with other systems so we can certainly help you there. Depending on the complexity and size of the current site it really can be a quick process.
-
Hmm, that all sounds okay... when you access your site you're accessing it at www.yoursite.com/fyp then according to your first sentence? If not and you're accessing it at www.yoursite.com then change the .htaccess rewritebase to just / Other than that, I would suggest double-checking your index.php file is readable - setting permissions to 0755 should be fine.
-
There is also the issue that .htaccess won't work on IIS unless I'm mistaken? This should help get around rewrite issues though: http://processwire.com/talk/topic/268-processwire-on-windows72008-server-with-iis-webserver/
-
How can i integrate HTML Kickstarter with processwire?
Pete replied to siulynot's topic in Getting Started
Your copyright notice at the bottom is a bit far into the future- 29 replies
-
- html kickstart
- html
-
(and 1 more)
Tagged with:
-
I like doing it all in one go Joss and having "umms" and "errrs" in there - pads it out a bit Love the app Luis and thanks for pointing me to that PDF class. I have been using a different one that I got to work and had even checked out this one before a few years back but when I looked at it recently it mangled my HTML - turns out they all have their quirks and now I've spent today getting my templates nice in this one it means my ~450kb PDF files that take 5 seconds to generate are now ~45kb and generate almost instantly
-
What did you use for PDFs? That was very quick to generate and open