-
Posts
4,040 -
Joined
-
Last visited
-
Days Won
66
Everything posted by Pete
-
I took the liberty of merging your two forum accounts - the details from your newer one should work fine. I very much doubt a full-blown forum solution in ProcessWire will appear any time soon - the general suggestion is to use another piece of software. This is because forum software is usually really complex, taking teams of developers at least a year to create and years after that to perfect. I know this is why ryan at least suggests using other software for this side of things - see here: http://processwire.com/talk/topic/572-release-discussions/?p=48129 If you've ever looked at forum admins for the likes of Invision Power Board you'll see that there are dozens of pages just for managing them as well so it's not as straightforward as it might seem at first. That said, it is possible to build modules that bridge the membership between forum software and ProcessWire. I've done it myself (and will one day get around to polishing and releasing the module): http://www.strategycore.co.uk - note that you would still manage the forum in the forum admin but you then have available the membership functionality and members and their groups exist in ProcessWire as well. As kongondo says, Moodle is an entirely separate piece of software. I have, in the past, shoehorned several different applications to work together and the results are always painful when you have to update one of them (not usually ProcessWire as the API functions stay the same) but even something like the forum bridge mentioned above could rbeak on a newer release of the forum software as other developers just will not design a good API and stick to it. That's one of the things that makes ProcessWire exceptionally different - ryan has gone for as close to human readable code as possible and it doesn't matter so much how the code works behind the scenes - it could all change behind the scenes (but it won't) and the functions available to you in the templates to pull out the data would still be the same. I think you may need to step back and take a look at what you want to achieve in terms of functionality as Moodle for example already has its own forum module. No offense intended, but you appear to be looking at different solutions, liking the idea of some of them and then deciding you want them all, rather than explaining what features you need. I would suggest that it is actually possible (with enough time and money) that you could recreate what you want from Moodle in ProcessWire and do away with one of the three software packages entirely, then hook it up to something like IP.Board if you didn't like Moodle's forums, but depending on your requirements from Moodle you could be talking about a year's work easily. That said, you can have forums, course modules and site pages all just in Moodle, so if time and budget are your constraints then you could already do it all in one package. There are also dozens of categorised plugin modules for Moodle on this page: https://moodle.org/plugins/
- 10 replies
-
- 5
-
-
- university
- college
-
(and 3 more)
Tagged with:
-
Looks awesome - some really great photos there!
-
Possible buggy url Segments / Page Numbers Interaction
Pete replied to tiagoroldao's topic in API & Templates
You could also do this: foreach ($pages->get("/tags")->children() as $key => $tag) { if ($pages->find("parent=$page, tags=$tag")->getTotal() > 0) { echo "<ul>"; foreach ($pages->find("parent=$page, tags=$tag") as $tagpage){ echo "<li><a href='$tagpage->url$tag->name' $active>$tag->title</a></li>"; } echo "</ul>"; } } I just threw in the wrapping UL elements, but if you want to paginate the results it needs some more work anyway- 8 replies
-
- Bug
- Url Segments
-
(and 1 more)
Tagged with:
-
Possible buggy url Segments / Page Numbers Interaction
Pete replied to tiagoroldao's topic in API & Templates
Hi there Could you try it with getTotal() instead of count() - click on getTotal on this page as it seems to explain this in relation to pagination: http://cheatsheet.processwire.com/ Hope that helps!- 8 replies
-
- Bug
- Url Segments
-
(and 1 more)
Tagged with:
-
I can't remember how I sized them - I think it was to cater for the various screen sizes but I may have left the thumbs too big at max size - I'll take a look, thanks! All of the language stuff was just from this page: http://processwire.com/api/multi-language-support/multi-language-urls/ Cool Never been there myself, but it looks nice!
-
There's a little bit of unnecessary code in your original post (and a bit of mixing $page and wire('pages') ) during the first two lines - you could also write it like this if it helps: $tdsphotos = $pages->find("tagsx.title=$page->title, limit=8, sort=-created"); One thing I would like to mention to everyone is that in double quotes you can to this: $page->title but not $page->somepagefield->somethingelse - as soon as you throw in the second -> (I'm not sure of the technical term!) you need to wrap the whole thing in curly braces like this: {$page->somepagefield->somethingelse} or you'll be troubleshooting it for hours like I did a few months back Alternatively you can concatenate as usual to avoid the curly braces requirement, so: $tdsphotos = $pages->find("tagsx.title=" . $page->title . ", limit=8, sort=-created");
-
Thanks guys - it came together quickly, but it didn't have too much fancy content to deal with. Probably the way the Who's Who section is handled behind the scenes would be a good example to show you as all people are the same in the backend, but through a variety of checkboxes and showIf's there are four people that are highlghted at the top with photos, with the President only showing at the top and not in the list further down. I love conditional fields in the dev branch already as it just made it so neat and tidy
-
Where do I find the FIND function in the skyscrapers demo?
Pete replied to Chris Rosenau's topic in Getting Started
I think you should probably take a look at the concept behind ProcessWire first, then some of the other docs and the cheatsheet as Macrura suggest - start with the Concept page from here: http://processwire.com/api/ The Cheatsheet then gives you a look at most the possible functionality at your disposal in page templates to access your data and files. As for explaining the line of code you quoted: $skyscrapers = $page->skyscrapers->find("limit=3, sort=random"); From memory, "skyscrapers" is actually a "featured skyscrapers" field, so is just a Page field that links to other pages (probably the most useful fieldtype there is. Here is the exact translation: "For the current page (homepage in this instance), find 3 random pages from the skyscrapers field". The $skyscrapers = bit is just storing the results in a PageArray (it's in the docs linked further up my post here) that can then easily be iterated through to print whatever output you desire. If you're wondering why the demo doesn't seem to pick three random pages, I think page caching must have been accidentally left on here so it's always showing the same 3 in the demo, but that's easy to switch off The syntax is based on jQuery and aims to be human-readable. If you imagine that there are a few database tables and queries behind that code, you can easily see how quick that is to write and all without a line of SQL. You can make all sorts of queries like: $architectsCalledPaul = $pages->find("template=architect, title*=Paul"); // finds all architects (pages with the template "architect" with the name Paul somewhere in the title field // and so on... The idea behind ProcessWire is that once you've learned the basics you can build pretty complicated data structures in the admin quicker than you'd be able to writing database tables from scratch and you have a hugely powerful set of functions at your fingertips to do with that data as you please. Most folks here would agree that it has shaved hours/days/weeks/months off their site build times depending on website scale, but any time saved is good! -
I like movie soundtracks - thing is that when sosomething exciting is happening in the music it can be as distracting as vocals I'll try a few of the links in this topic I think and see how I get on.
-
It would also be awesome if we could match things like parent.template in the future as well.
-
Finding and posting repeater fields from another template
Pete replied to melissa_boyle's topic in Getting Started
Stop me if I'm wrong, but does the stockist template only apply to one page? If that is the case, you need to create a stockist.php template file which will load when you browse to that page with something like the following code: <?php foreach ($page->store_middle as $store) { echo "<h5>$store->store_name</h5>"; echo "<p class='less_padd'>$store->store_address</p>"; } However, if you have more than one page using the stockist template then something like this would work: <?php foreach ($pages->find("template=stockist") as $stockist) { foreach ($stockist->store_middle as $store) { echo "<h5>$store->store_name</h5>"; echo "<p class='less_padd'>$store->store_address</p>"; } } What I have noticed is that you mentioned _left and _middle in your code, so that might be causing an issue too. You also hadn't closed your opening <p> tag which might be hiding some content perhaps? Hope that helps. -
I've added this issue to the list on Github: https://github.com/ryancramerdesign/ProcessWire/issues/288
-
Great stuff - I can see a few places in several sites of mine that would benefit from these to keep the code a bit cleaner!
-
I think that's the key - ryan's posted his interpretation of it here on the forums so you have the software author's permission - I can't think of a scenario where a court would argue against the software author's intentions partly because the GPL can be interpreted several ways as we've seen. I agree that something on the main website would be a good idea as well spelling out ryan's intentions - either on the plugin modules page or maybe a separate commercial modules sub-page that perhaps also links to commercial modules in the directory (if there's a way of filtering those? Not sure why you'd want to now I'm saying it though as it's better to search for something you need rather than filter by paid/free ).
-
I think ryan and my reply in the post you link cover it really. You're not altering the core, you're building something that merely talks to it so you shouldn't be worried. When ryan himself has said what you can and can't do then I would take that as permission to go ahead with commercial modules. Your specific worry about it extending the class - I get that, but that's the only way to create a module that accesses the API. In this case I think it's fair usage.
-
There are already commercial modules - ProCache and FormBuilder. I understandably concerns but wouor say don't worry about it If you take the commercial modules from a certain popular blogging platform as an example, theit functions would interact with the core code as well so it's a bit similar to that except you can tie in Mich more with ProcessWire's functions in PW modules. I don't believe you're bound by the license just because you're building a module. There was a discussion around this a long time ago but I can't find the topic - can anyobe remember where it is? I vaguely remember ryan giving his opinion on thus subject. Edit: you linked to it at the start - oops!
-
Events Fieldtype & Inputfield (How to make a table Fieldtype/Inputfield)
Pete replied to ryan's topic in Modules/Plugins
If you are talking about one question and answer per page with a comments section beneath (or just a question with all answers as comments) then the current comments module would be your best starting point as it's already built to scale up. If the questions will all be separate pages like Stackoverflow for example then you could just do that with a normal page. It matters less about scalability there as you would only display one at a time, or if browsing tthrough all questions you would paginate them with 20 to a page or categorise them some other way. -
That's really great ryan - I need this for something I'm doing right now
-
Events Fieldtype & Inputfield (How to make a table Fieldtype/Inputfield)
Pete replied to ryan's topic in Modules/Plugins
Indeed - it's a separate DB table like ryan says - if you take a look at the MapMarker module and a few others where they create their own tables you'll see that instead of just being a collection of different fields in their own tables like normal PW fields created in the admin these are like going back to a "normal" table with multiple fields. Very useful for some situations where you don't need to re-use fields elsewhere and have a pretty bespoke dataset that needs to scale to potentially millions of rows. This would also be good for things like invoicing systems, shopping carts etc where you want to store fields like item name, price, tax, total etc where you just wouldn't really need them as separate fields in the admin - they only make sense in the context of a single module. Which unfortunately means I need to change something I've done in an as-yet-unpublished module at some point to make it scale better -
Thanks Manfred - that was odd! I'd saved the page which was set to clear the cache but for some reason it didn't. I'll have to keep an eye on that as the only way I could clear it was deleting the cache file in FTP for some reason.
-
I've officially launched this site today: http://www.kidderminster-husum-twinning.co.uk/ For those not familiar with twinned towns/cities - many places (in Europe at least) are twinned with other places in the world and these are two such places which have built links between their cultures, clubs, associations etc. It was a relatively straightforward site. A design I had made many months ago actually lent itself to the Foundation site profile (which I upgraded to Foundation 5 without too much hassle) and most of the content benefits from the default styling in this case, which was a bit of a fluke as I'd not done anything with Foundation when I originally designed this I was in two minds whether to use Foundation as I'd not really touched responsive before, but it works nicely on mobile and I'm glad I did it. There's a bit more going on behind the scenes than meets the eye, and I think that because this looks like a simple site it might well be worth a full case study with a few tutorials of how I personally approach things. As for the tools I used, here's my list of modules: CKEditor Markup Yahoo Weather (a modified version) Page Link Abstractor (I always use this now so links in the body don't break when moving the site to the live server) Thumbnails (I couldn't imagine a site without this!) Languages - all of the core modules for languages, as there are English, German and Danish versions of each page (not all translated before anyone spots that but I shall leave that to the Twinning committee ) I also turned on caching for each of the templates. Due to the weather constantly updating on the sidebar I didn't use ProCache on this occasion - I toyed with making the weather a JS/AJAX/PHP combo but it then loses it's synchronisation with the two images in the slideshow on the homepage and that looked so nice that I can live with what is still a relatively quick site without making design sacrifices for the benefit of a bit more speed. What do you think?
- 10 replies
-
- 16
-
-
I really like the idea of that site/tool, but I would still worry that a crowdsourced translation might not be accurate. It's weird though, as I've been working on a multi-language site recently (soon to be launched!) and would feel happy to receive translation help from our German members on the forums here, but I sort of feel like I know them more than a stranger translating my content from afar if you know what I mean? I don't know them that well, but there's a level of trust here between members - it's a nice feeling On the other side of the coin, you can always run a crowdsourced translation back through Google Translate and check that the message is generally the same. This doesn't always work with technical terms, but definitely helps to reassure you that nobody's dropped in any swear words or anything malicious. I think there might be times I would use the website you linked to, but they would be for community/group projects where it's a small team and they can't afford the translation service or don't have the skills in-house. For all other sites I would pretty much always recommend a professional service as there's some sort of Service Level Agreement in place so you have someone to shout at work things through with in a short space of time if the translation is wrong
- 2 replies
-
- 1
-
-
- localization
- translation
-
(and 1 more)
Tagged with:
-
Welcome to ProcessWire dhamilton51! The general way people work with websites is to treat local and live copies of websites completely separately. This usually involves working on it locally first and then going live by uploading the finished/near-finished site to the live server. Is there a reason you want your local copy to talk to the live version's API? Are Martijn or I actually understanding what you're doing? I think with some more details we can certainly help you
-
If you need any help, just let us know. Everyone here teaches everyone else something at some point
-
Ah, cool. The cheatsheet says that "matches" matches the selector, whilst "is" matches template, status or selector. And for those that haven't read the Cheatsheet by now, here you go: http://cheatsheet.processwire.com/ Soma - I feel like we've just taught a class or something