Leaderboard
Popular Content
Showing content with the highest reputation on 12/17/2014 in all areas
-
The thing with Processwire, for the security conscious, is that you can create a huge variety of sites and address many different types of content WITHOUT touching any plugins other than what comes from Ryan's safe hands. You can add all the seo stuff you would ever need, add connections to social websites with links and opengraph or whatever, add caching and so on, without ever having to move outside the box - you just stick them in your template files and feed them from a field somewhere. And if you want singing and dancing with JQuery plugins, again, you just use them raw - you don't have to set up new database connections or anything else clever to make them Pw compliant - you only use the trusted API and keep the two well and truly apart. With WP, on the other hand, if you want anything more than the simplest of blogs, you are already on a plugin-fest from hell before you ever get going. Noting all that, I think it is VITAL that this principle is sustained with processwire with the vast majority of modules being about admin functionality (and vetted first as much as possible) and front end functionality left to the site development where the developers can make reasoned choices. If you want a completely plug-n-play CMS, unfortunately that will ALWAYS come with plug-n-play security issues ....8 points
-
As described in this post (https://processwire.com/talk/topic/8551-custom-urls-for-pages/?p=82742) the option 'Name Format Children' under the tab 'Family' in template settings doesn't work properly and also not as expected. I had a look inside the code and made some changes which are working properly, which offers much more options, more consistency and less code too. The result is the following. You have 3 Options for generating name and title, which could be combined in endless variations. Name is always derived from title, same like creating pages manually. type date: if function detects # character anywhere in the string, conversion will be: deletion of # and string will be used as format parameter for PHP date() function type field: if string is a fieldname of the parent page the value of this field will be used type string: if string doesn't fit to the 2 preceeding it will be taken as it is All parts (separated by comma) will be composed in the order of setting. You can use unlimited numbers of parts I made a pull request on github: https://github.com/ryancramerdesign/ProcessWire/pull/831 Example screenshots Setting ... will result in6 points
-
I guess this counts as "on the web": http://www.phparch.com/magazine/2014-2/december/.6 points
-
Without going into too much complication, I have done something vaguely similar with a car site where you select a manufacturer or a model. In this case I used Hanna code to help me out. So, I might have a paragraph that says Bring your [[vehicle]] to my gararge now! We really will love your [[vehicle]] Then, the hanna code looks at the url and does the swap: if($input->urlSegment1){ $vehicle = str_replace("-"," ", "$input->urlSegment1"); $vehicle = ucwords($vehicle); $titlesuffix = "{$vehicle} "; }else{ $titlesuffix = "vehicle"; } echo $titlesuffix; If that segment does not exist, then it just prints out "vehicle", but if it does it prints out "audi quatro" for instance If you go to: http://claysvehiclerepairs.uk/servicing/ Look at the menu lower down on the right. Then click on one of the manufacturers in the grid and look at the menu again on the manufacturer page - the menu is regenerated and now adds the manufacturer name on the end - that is the URL segment that is picked up by the hanna code. It takes a bit to get your head around, but it is perfect for localisation. But one big warning - you risk duplicate content which might not sit well with search engines. So try and be as imaginative as possible. Maybe add some variation or something. You can even add whole specific blocks. So you can call in information from some child page somewhere that is specific to a county. Again, the URL segment and say if($county = some-name) print out this special para, else print out the default para. Or something. It does mean some extra work, but might make feel visitors and search engines loved5 points
-
Thanks to Soma: https://processwire.com/talk/topic/3875-module-to-add-userid-to-pages-and-control-edit-permissions/?p=37915 Also check out the revised version a few posts below from pogidude. And also this version from tinacious: https://processwire.com/talk/topic/3271-can-i-limit-page-editing-to-the-user-that-created-that-page/?p=321213 points
-
I wonder if bugs were running the show, would they suffer from malicious humans?3 points
-
Hello there, ProcessWire has been the perfect CMS for me so far but I always missed the Laravel way of doing things when working with PW. Therefore I've built a package that will integrate Laravel into ProcessWire. It's already working out really well and I can imagine a lot of stuff to come in future. Anyways I'm hoping for some peoples support / pull requests / ideas / opinions ... Here's the link: https://github.com/hettiger/larawire Enjoy!2 points
-
Self promotion is such an undervalued artform..... (I must write that down somewhere - one of my better ones)2 points
-
To make the audit process easy enough, there probably should be something automatic code analysis going. Like sensio insight.2 points
-
This is the key point here: API. It improves the security a lot compared to having to rely on plain SQL, which is always more or less prone to human error, leading to injection vulnerabilities, etc. Another thing is that most modules seem to avoid potentially harmful methods like exec, shell_exec, passthru, etc. Not sure if that's really anything specific to ProcessWire, though Anyway, one can still easily write a ProcessWire module that trusts user input too much, or trusts input from wrong users, or simply displays too much to unauthorised users. This is why some sort of security audit process would be most welcome, though perhaps as an addition, not something that automatically applies to every module submitted to the modules directory.2 points
-
Totally agree, and tell that Apple, those f*#%ers made me update to iOS 7 to fix the SSL bug. Now my iPhone 4 is slow as hell. /rant2 points
-
I am also not sure if using die/exit is the only way, but it is what I used in my Table CSV Export/Import module: https://processwire.com/talk/topic/7905-profields-table-csv-importer-exporter/ - see the "Export as CSV" button at the bottom of the first screenshot. The one thing in that module that you might find useful in this module is the hidden iframe technique I used to make the download work without the need to open an extra page: https://github.com/adrianbj/TableCsvImportExport/blob/master/TableCsvImportExport.module#L191 Take a look at the JS file in that module to see how I am modifying the src of the iframe on the fly when the Export button is clicked: https://github.com/adrianbj/TableCsvImportExport/blob/master/TableCsvImportExport.js#L6 Hopefully you might find something to copy, or maybe someone else will have a better idea!2 points
-
I Fully agree with that. ============================================================= But here is what I see coming: It looks to me that since 2.4 the need for making it shine and show is creeping in. I have no problem with _main.php and delayed output since 2.5 but why putting more bells and whistles in the core ? Processwire is famous because of it's fast and bare bones core, leaving it up to the user to build on top of it. Extending should only be done with modules. Another example: Same thing is happening right now with OpenCart. Until version 1.5.6.4 the core was fast, barbones and came with a back-end that was easy to understand for everyone. Missing functionality can easily be extended with extensions/modules. With the latest release 2.0 things start to shine and show with more whistles and bells with an admin on the brink of becoming confusing. Somehow things can not stay fast, barbones, easy and free to build on for everyone. In the end, stuff that makes it shine, show, bloat, and confusing always creeps in.2 points
-
Hopefully we won't be going to 2.6 without, at least, merging some things from current dev branch to master (2.5). Just saying. New features are one thing, but there are also bugfixes there, as far as I can remember correctly. IMHO minor versions (x.x) should always be stable and contain no known bugs. Unless support for 2.5 is dropped instantly when 2.6 comes out, which I hope we won't be doing -- upgrading from one minor version to another shouldn't be required just to get bugfixes in2 points
-
12000 is the normal mailchimp free offering. The business model is that serious list users shoot past that limit fairly early on and then it is a good earner. Mailchimp free offering has a Mailchimp logo at the bottom of any sent email.2 points
-
A module that uses the db-ip.com IP Geolocation service to fetch geolocation information when given an IP address. I wrote this quickly to help anyone who might be stuck with the #VATMOSS mess and need a way to geo-locate a customer's IP address. You will need to register with db-ip.com in order to get an api key but they have a pretty generous daily-query allowance even for the free key (2000 lookups a day.) Here it is on github. And in the module repository.2 points
-
Ok next round up.... Horst forgot to link his module https://processwire.com/talk/topic/4758-release-pagetree-add-new-child-reverse-on-top/ And like Horst wrote - sorting pages for templates in pagetree is not needed if you setup your content and cathegories right. Maybe you've missed the field dependencies for tagging or combining content that is under different parent-pages but stays together: https://processwire.com/talk/topic/4323-field-dependencies/ => give us a concrete example of your problem please. if you have a basic-page template under cathegories - why this is needed??? cathegories only cathegories....that used on the normal (basic-what-ever-template) pages....with the field dependencies. if your wanna really different content "blocks" on one page so pagetable module would be interresting. https://processwire.com/talk/topic/7459-module-pagetableextended/ "dummypages" make no sense - don't waste energy to achieve something that could be done in an easy way. Make your problem as clear as you can instead running into a one way - i think here is always a helping hand that try to explain the things until you say aha...... regards mr-fan2 points
-
What about modules in processwire? Everything safe? Maybe we need a tag [security-checked] given by an accredited team of PW developers.2 points
-
adrian, yeah, but the massive amount of plugins to do great stuff out of the box is one of the key points pro-WP-people make. If you can't trust them plugins, there are not many pro arguments left.2 points
-
Image Animated GIF v 2.0.2 Module for PW 2.5 stable or newer, but is obsolete for PW Versions greater then 3.0.89 (... read more ...) This module helps with resizing and cropping of animated GIFs when using the GD-Library. The GD-Library does not support this. This module is completely based upon the fantastic work of László Zsidi (http://www.gifs.hu/, builts the initial classes) xurei (https://github.com/xurei/GIFDecoder_optimized, enhanced the classes) I have ported it to a PW module and it works with core imagefields, together with Pia and with CropImagefields that uses the new naming scheme since PW 2.5. ------------------------------------------------------------------------------------------------------------------------------------------ read more in this post about the rewrite from version 1.0.0 to version 2.0.0 ------------------------------------------------------------------------------------------------------------------------------------------ You can find it in the modules directory: https://modules.processwire.com/modules/image-animated-gif/ and on Github: https://github.com/horst-n/ImageAnimatedGif ------ A preview can be found here1 point
-
for users from phpclasses.org. Today I have read a bit from this podcast. A short explanation about Mandrill and transactional emails can be found right after the introduction in the text at "Mandrill by Mailchimp promotion for PHP Classes users (1:03)". You simply need to go to Mandril through a link or put in the promo code "phpclasses" on the Mandrill site. ALso they have a free plan for 12.000 per month without any promo code!1 point
-
1 point
-
@apeisa: definitely. I've been test-driving a few locally-hosted solutions, with mixed results (some were "kind of useful", but none really convinced me). Sensio Insight seems interesting alternative, though so far it seems to think that my code is safe, which is a huge red flag to me .. oh, and for the record: programmatic vulnerability scanning is helpful, but I'm always a bit worried that people could trust it too much. There are too many logical issues for it to be "perfect", and thus it might give some users false feeling of safety.1 point
-
1 point
-
Try this: <?php header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); ?> Or this with sunday as example: <meta http-equiv="expires" content="Sun, 01 Jan 2014 00:00:00 GMT"/> <meta http-equiv="pragma" content="no-cache" /> header('Expires: Sun, 01 Jan 2014 00:00:00 GMT'); header('Cache-Control: no-store, no-cache, must-revalidate'); header('Cache-Control: post-check=0, pre-check=0', FALSE); header('Pragma: no-cache'); You can also do random Generated Numbers on the files you dont want to be cached.1 point
-
The field is not an object but a string. Turn off output formatting.1 point
-
I am not sure if all modules or plugins will ever be completely 100% secure. Someone correct me if I am wrong as I am not an authority on security. Can we really say that the vulnerabilities found out in some Wordpress plugins won't be found in Processwire sometime in the future with or without checks when Processwire becomes more of a target like Wordpress currently is? The plugin in question for Wordpress is a big plugin with 100 thousand plus installations and I am sure that as many checks as possible were made with it(but obviously not enough). The way I see it is that bugs happen and mistakes will always happen as long as humans run the show.1 point
-
This is something i'm also missing. And I think most of you don't get what ryanlath means: Sometimes it's just a waste of time to create special "folder" templates just to structure the information in the page tree (especially if they need different icons to distinguish them easier). It would be great to have some sort of pre defined "folder" or "strucure" element that doesn't (necessarily) create an url-slug. Example: I always create a template called "folder" (sometimes even 10+ just for the icons) and on the root of the page tree there are 2 or 3 folders like "meta" (containing legal information, contact...), Data (containing PageTable items), [...]. Those folders wouldn't need their own url-slug but i don't want their contents to "mess up" my page tree. This is just a matter of keeping things easy to navigate (in the backend) rather than grouping information in a semantic way.1 point
-
There are already some posts about this. I remember Soma did some good recommendations. I also remember something about approval. Something to let a module go through some kind of approval check before it becomes downloadable. I will look for those posts later on. Let's stick our coding heads together and make Processwire Modules the safest on the planet.1 point
-
Hi, thank you for your help. This straight answer saves a lot of "Frickelarbeit". In this way I will use the option creating Tags manually. This keeps also a better overview of which tags are actually created.1 point
-
1 point
-
@kongondo I still don't understand the reason for naming groups (foo=(...)) ... is it just for readability? I have to admit I don't like the OR syntax, it is not intuitive to me. Why not just use the single pipe like everywhere else in selectors? Or at least the double pipe. Don't get me started with the @ for AND matches, instead of the known &&, but that's just me. Edit: I guess the parsing for that is not too trivial an might make things slower, don't know though.1 point
-
Well I am trying - wish I wasn't failing you though One thing I just noticed is that you can remove all occurrences of $this - with this code in a template, you just need $input->post...... I have no idea why this would make a difference, but have you tried: $np->set($f->name, $input->post->{$f->name}); Both work for me, and the $form way is better, but thought this might help us debug.1 point
-
Thanks, Adrian. The new notifications system will be interesting, but in the meantime I took a break, then found what I was looking for in Notices.php. The answer is: $this->message("This message contains <a href=''>a link</a>", Notice::allowMarkup); The code from Notices.php couldn't be clearer: /** * Flag indicates the notice is allowed to contain markup and won't be automatically entity encoded * * Note: entity encoding is done by the admin theme at output time. * */ const allowMarkup = 32; /** * Create the Notice * * @param string $text * @param int $flags * */ public function __construct($text, $flags = 0) { $this->set('text', $text); $this->set('class', ''); $this->set('timestamp', time()); $this->set('flags', $flags); }1 point
-
It’s not Processwire that does that, though. It’s your browser. Any link without the scheme will be treated as local. Check this one: strabic.fr/Adobe-le-creatif-au-pouvoir1 point
-
I haven't used it, but take a look at this module: http://modules.processwire.com/modules/inline-editor/ Keep in mind that it is listed as a proof of concept. The other options which are much more mature, but not exactly inline, are: http://modules.processwire.com/modules/fredi/ http://modules.processwire.com/modules/admin-bar/ Hope that helps.1 point
-
@Danjuan09, I am in a bit of a rush but wanted to say welcome to PW and the forums! I understand moving into a new 'house' can sometimes be confusing because things may not be how/where you expect them to be .. Others will explain better (or I will later) but PW does not really have (frontend) themes in the sense that WP and other systems have. In PW, any HTML can be your frontend 'theme' although we really refer to them as template files. Being a very flexible system, this is usually up to the developer to implement as they wish. However, to help get some people started, a few developers here and the PW install offer what are called site profiles. These are more than a collection of template files to output frontend demo content but also include fields, template and pages to get you started rapidly. Some people use them others don't and instead install PW with the blank profile. As for the backend, there are admin themes which can be installed (since PW 2.4? I believe) as modules. Before that, there were other ways of changing the admin theme. Not all 'older' admin themes listed in the modules directory have been updated to be installable as modules (in fact probably none of them has!). To help you get the best of PW, I'd suggest to first go through the basic tutorials found in the links below. I'd suggest not to worry about 'themes' at the moment until you get the basics of how the system works. It will require, in some cases, some 'unlearning' on your part about how other systems you've previously used worked . So, get to know your new house first...changing the paint and decor will naturally fall into place later . Wish you a nice stay here! Start here: http://processwire.com/docs/tutorials/simple-website-tutorials/ Or here: http://processwire.com/docs/tutorials/hello-worlds/ Then here: http://processwire.com/docs/tutorials/but-what-if-i-dont-know-how-to-code/ Feel free to ask for clarity....1 point
-
Yes we do...OR-groups Both of these work for me (not sure if the second one is the better syntax though for this particular case): $test = $pages->find('template=basic-page, foo=(external_status=""), foo=(external_status!=accepted), sort=title'); $test = $pages->find('template=basic-page, (external_status=""), (external_status!=accepted), sort=title'); https://processwire.com/talk/topic/3768-processwire-dev-branch/?p=64049 Related new(ish) selector, selector grouping https://processwire.com/talk/topic/3768-processwire-dev-branch/?p=587221 point
-
Try this- $keywords = preg_split("/[\s-]+/", $q); $selector = ''; foreach($keywords as $kw){ $selector .= "Meta_keywords|DMCcontact_Country|DMCcontact_Address_2|DMC_Email~=$kw, "; } $selector .= "template=dmc, limit=50"; //echo $selector; $matches = $pages->find($selector); You can uncomment the penultimate line for debugging (and/or understanding) purposes. That won't help with the regex, but, essentially the important bit is within the square brackets, where \s means a space (or similar) and the dash after means literally a dash. You could add others there. Note Written in browser, but should work. (Now where's that fingers-crossed emoticon?)1 point
-
@pwired, I don't get your post. @hettiger, thanks for the module, looks interesting, have to look into it at a later point in time though.1 point
-
There's a option to set a PageArray as the root page https://github.com/somatonic/MarkupSimpleNavigation#build-a-menu-using-a-pagearray-instead-of-a-single-root-page So you could very well create a top level menu with a multiple page select using asm select for input so you could sort them. Or get the top level pages and then append or insert a page $items = $pages->get("/")->children(); $other_item = $pages->get(1234); if($other_item->id) $items->append(); echo $treeMenu->render(null, null, $items);1 point
-
if you want to go further, you can use the nested accordion which allows for child accordions of the main topic; you would need to create child pages for each main subject; in that case your template might look like this: <?php $docs = $pages->get(4259); ?> <div id="docs"> <ul id="cbp-ntaccordion" class="cbp-ntaccordion"> <?php foreach($docs->children as $doc) { ?> <li> <h3 class="cbp-nttrigger"><?php echo $doc->title ?></h3> <div class="cbp-ntcontent"> <?php echo $doc->body;?> <?php if($doc->children->count()) { ?> <ul class="cbp-ntsubaccordion"> <?php foreach($doc->children as $child) { ?> <li> <h4 class="cbp-nttrigger"><?php echo $child->title?></h4> <div class="cbp-ntcontent"> <?php echo $child->body?> </div> </li> <?php } ?> </ul> <?php } ?> </div> </li> <?php } ?> </ul> </div> <script src="<?php echo $config->urls->templates ?>_admin_custom/js/jquery.cbpNTAccordion.min.js"></script> <script> $( function() { $( '#cbp-ntaccordion' ).cbpNTAccordion(); }); </script> in this code the sub-accordion is shown if there are child pages, and then it outputs the body of each child page in a sub-accordion, and it will end up looking something like this: a more advanced implementation with edit links and an add new doc for superusers: <?php $docs = $pages->get(4259); ?> <div id="docs"> <ul id="cbp-ntaccordion" class="cbp-ntaccordion"> <?php foreach($docs->children as $doc) { ?> <li> <h3 class="cbp-nttrigger"><?php echo $doc->title ?></h3> <div class="cbp-ntcontent"> <?php echo $doc->body;?> <?php if($user->hasRole('superuser')) { ?> <div style="float:right;font-size:11px;"> <a href="<?php echo $config->urls->admin?>page/edit/?id=<?php echo $doc->id?>">Edit: "<?php echo $doc->title?>"</a> </div><?php } ?> <?php if($doc->children->count()) { ?> <ul class="cbp-ntsubaccordion"> <?php foreach($doc->children as $child) { ?> <li> <h4 class="cbp-nttrigger"><?php echo $child->title?></h4> <div class="cbp-ntcontent"> <?php echo $child->body?> <?php if($user->hasRole('superuser')) { ?> <div style="float:right;font-size:11px;"> <a href="<?php echo $config->urls->admin?>page/edit/?id=<?php echo $child->id?>">Edit: "<?php echo $child->title?>"</a> </div><?php } ?> </div> </li> <?php } ?> </ul> <?php } ?> </div> </li> <?php } ?> </ul> <?php if($user->hasRole('superuser')) { ?> <div style="float:right;font-size:13px;"> <a href="<?php echo $config->urls->admin?>page/add/?parent_id=4259"> <button class="ui-button ui-widget ui-corner-all head_button_clone ui-state-default" name="button" value="Add New" type="button"><span class="ui-button-text"><i class="fa fa-plus-circle"></i> Add New Doc</span></button> </a> </div><?php } ?> </div> <script src="<?php echo $config->urls->templates ?>_admin_custom/js/jquery.cbpNTAccordion.min.js"></script> <script> $( function() { $( '#cbp-ntaccordion' ).cbpNTAccordion(); }); </script>1 point
-
ProcessWire Forum Rules Version 1.1. Last updated November 10, 2014 Purpose of the Forums The ProcessWire forums are a self-help support forum where users can also contribute towards the future of ProcessWire. It is comprised of individuals from across the globe who want to help each other and who are giving much of their free time to do so. Many members have commented that the ProcessWire forums are exceptional in how equally friendly and hospitable they are to those who are very knowledgeable and those who are only just beginning to learn. A word about the rules The rules are here for the benefit of everyone. It says something about a community that we have not required any for four years despite the occasional heated debate. However, as the community has grown it seems only fair to create rules for both members and staff alike. Rules are not the same as laws. They are applied to each individual situation as the need arises and can be interpreted by the staff after reaching a consensus, where appropriate, or they may be enforced quicker in the case of situations requiring immediate attention or that are in very clear violation of the rules. Please respect the outcome of any decisions made by the staff. Rules for posting No Flaming. Never threaten the project, developers or other forum members. Threatening behaviour will be dealt with swiftly by staff and may result in a ban.. No Spamming. Spamming violations may result in your post count being reset, revocation of posting privileges, or even permanent banning from the site. There are several types of spam: Off-Topic posts outside the off topic “Pub” forum. If you wish to make an off topic post, please do this in the “Pub” forum. Multiposting. Multiposting is repeating the same message several times in the same topic, or, making a post directly after another, when you could have edited the additional comments into your first post. Multithreading. Multithreading is posting the same message in several different threads. If you do not receive a reply to your post, it may be that people do not have an opinion or are simply not online. Be patient. Unauthorized Advertising. Any unauthorized advertisements will be deleted and the offending member may be banned. Please note that linking to your company website is permitted in your signature as a plain text link. No discussion of politics or religion anywhere on these forums including the Off Topic boards - there are many other websites where you may discuss these topics. Please avoid very bad language. This is not an adult only forum so treat it as being family friendly. Please respect others’ opinions. Do not state that they are wrong and dismiss them in a derogatory manner. Please try and offer constructive counter-arguments when joining a topic containing a debate. If in doubt, don’t post. Please don't tell other people to go and search if they ask a question that has been asked before. If you like, inform a member of staff or a moderator via the reporting feature and we will do our best to merge it into a relevant topic, or you could suggest in a polite manner so as not to offend that they Google the forums via this link - just remember to be friendly as a link on its own can be mistaken for frustration or impatience. Please do not make demands of the developers of this project or of those who manage the forums. It is disrespectful to the people who give so much of their free time to this community Please contact us if you have an issue with another member or even a staff member - the relevant points of contact are at the bottom of this post Please respect the privacy of others. If a member chooses to use a pseudonym rather than their real name, that is their privilege. Please respect their wishes and do not out them even if their real name is common knowledge. Keep to one identity. Do not create alternate avatars and just stick to the one. If there are technical reasons why you need a new one (can’t rescue the old one, perhaps) be open about it. If you are angry about something, step back, take a breather and try to post a reasonable reply. If you feel that someone is being wholly unreasonable or stubborn, please contact a member of staff. Please try and use Common Sense. No set of rules can cover everything. If you think about what you are posting before posting, you shouldn’t run into any trouble. Remember, this is a forum about a software project, not world peace. It is doubtful ANY argument is important enough to be angry about. Please note that these rules may be updated from time to time. If you continue to use these forums it is assumed that you agree to them. Rules for using the Personal Message system The boards have a simple and unrestricted personal messenger - please use this responsibly. In addition to the above rules regarding posting: Please do not use the personal messenger to threaten anyone, tell them off or send a message that is likely to upset or offend. Please respect every member’s privacy and only PM someone if you feel they will be happy to receive a message from you. If you receive any messages that you feel are inappropriate, please contact a member of staff rather than taking matters into your own hands. Please do not copy and paste private messages into the public forums without the consent of the sendee. Actions we might take At the sole discretion of the forum staff and/or administrators, you may be given a warning if you break the rules. If the infraction is deemed severe enough, you will be banned. If you repeatedly break the rules or are belligerent in your response to staff/admin messages about an infraction then you will also be banned. If we do contact you it will be via the personal messenger system on the forums or, in the event of a ban, we will contact you via your registration email. We will not conduct conversations in public nor will we reply to any public conversations about a particular case. Points of contact If you have an issue that requires staff attention, in the first instance you should report the content using the “Report” link at the bottom-right corner of the relevant post. If you wish to, please contact a particular member of staff directly about an issue. If your issue is about a particular member of staff, please contact Pete and/or ryan via Personal Message. Please don't be put off by these rules. They are in place to help make sure that the site keeps its nice and friendly atmosphere. We're not here to rule with an iron fist - we’re here to discuss ideas and help one another, but we will act when people disregard the rules or ruin the atmosphere.1 point
-
Posting Guidelines In addition to the rules, it is recommended that you read the following guidelines to get the most out of your interactions with this community. Interpreting other members’ posts Our community is a global community and as such posts and intentions can be misunderstood. If you encounter a reply that seems “short” and contains links to other topics that may answer your question, this may be due to the large number of members who use the forums on their mobile devices and want to help but don’t have time for a more complete reply or for whom English is not their first language. Please try and give people the benefit of the doubt when posting. Please do not dismiss their views out of hand (constructive replies are welcome). The forum language is English. We really appreciate the effort everyone makes from countries around the world to post in English. After careful consideration and experience on other forums, it makes sense to have one common language for discussion here so that ideas can be shared and not missed in language-specific forums - the same applies for debates that might get out of hand as we do not want to miss those either. There are more and more country-specific ProcessWire websites cropping up however so if you find that a group of you are in agreement and wish to set up a language-specific forum of your own then please feel free. Suggesting new modules/features Many of the features of ProcessWire have been born out of suggestions by users or discussions within the community, but that does not mean that every suggestion can be taken on board or that it might even be in tune with the overall strategy for the project. If you have suggestions for new features or modules, please feel free to propose them in a simple, open way in the Wishlist & Roadmap forum, but don’t be upset if no one is interested. Developer’s needs vary greatly. Your suggestion might well be something that is better developed as a third party module; in fact that is often the case. You are free to develop that yourself or work with others on a project, or even post a job to get help in the jobs board. However, whatever your idea or wish for a new feature, please do not make your suggestion sound like a demand, or tell the developers they have “got it all wrong,” or that you know what is best for ProcessWire. That is simply unfair to those who have been working on the project for free for years. Answering topics If you can help your fellow members then that’s great! Giving something back to the community in a constructive manner is always welcome. If someone replies in a topic you started and you think it is the best answer then please click the “Mark Solved” button at the bottom-right of the relevant post. Staff may mark a post as the best answer for you or change the chosen answer at their discretion if there is a better/more comprehensive answer later on in that topic. Some of the most prolific posters in the community do not count themselves at experts, but are very good at pointing new members in the right direction - you don’t have to be an expert in order to help out. Please don’t tell someone off for asking a silly question - there is no such thing! Every question is being asked because the person genuinely does not know the answer and might not know where to look. Raising issues or disagreements Nobody frequenting this forum should feel threatened when voicing their opinion as long as they are doing so constructively. Please be mindful however that everyone is unique and may interpret situations differently which could lead to misunderstandings. If you find that you disagree with someone, they may simply have a different point of view - this does not automatically mean that their view is wrong or your view is right. If multiple people disagree with you, it could be that a point has been raised many times before and/or that your point is not clear. Please seek clarification and remain calm or go talk about something else. If someone appears to be being simply argumentative, repetitive or belligerent in their replies then please do contact a member of staff and refrain from being drawn into the discussion further. To repeat, we are not solving world issues here, nothing is really so important that you HAVE to say something. If in doubt, say nothing and read another topic.1 point
-
<?php /** * Page edit per user created id * */ class PagesCreatedEdit extends WireData implements Module { /** * getModuleInfo is a module required by all modules to tell ProcessWire about them * * @return array * */ public static function getModuleInfo() { return array( 'title' => 'Pages created edit', 'version' => 1, 'summary' => 'Page edit only for created pages by user', 'href' => '', 'singular' => true, 'autoload' => true, ); } public function init() { // add edit permission hook for admin pages $this->addHookAfter('Page::editable', $this, 'editable'); } public function editable($event){ $page = $event->object; if(!$this->user->hasRole("editor")) return; if($event->return) { // only if edit rights are true if($page->created_users_id == $this->user->id){ $event->return = true; } else { $event->return = false; } } } } THis will get you there, not many different from frontend coding.1 point
-
I don't know the drawbacks of this, but I just managed to do make the dynamic stylesheet proposed on css tricks work has a pw template. So, this is how to do it (someone stop me if this is a bad bad thing to do): 1. Create a template file css.php and put all your css code inside. On the top of the file put this code <?php header("Content-type: text/css"); ?>. 2. Create a "css" PW template with that file. 3. Create a "css" page and give it the "css" template. 4. Link to the stylesheet like this <link rel="stylesheet" href="<?php echo $pages->get('/css/')->url; ?>">. 5. use the PW API on your stylesheet Extra: 6. put some fields on the "css" template and use them on your css Examples: the color picker field for colors; an image field with your style pictures (background, logo, etc). edit: onjegolders was faster! edit2: not the same answer. Mine is more interesting1 point