-
Posts
4,054 -
Joined
-
Last visited
-
Days Won
67
Everything posted by Pete
-
Hi guys I'm trying to hook Session::init in a module and essentially replace what it does. The reason for this is that I am trying to integrate a third-party application that also has user accounts and when ProcessWire's session::init() function is called it overrides the session from the other application and I can't access the session data from the other system. I am thinking I could get around this in a module if I can hook the session::init function, grab the user ID from the session from the other application before it is overridden, store the user ID in a session var, let ProcessWire do its thing and then re-load the user in the other app after ProcessWire is loaded. I can't see any other way around the session collision here so this seems to be as elegant as I can make it and, as far as I am aware, is still safe. My hook looks something like this (it's in a module, extra code stripped to keep it short!): public function init() { $this->session->addHook('init', $this, 'sessionreplace'); } public function sessionreplace($event) { // My custom code here @session_start(); // This is the same as in Session::init $event->replace = true; // I think this is required? } I'm sure I'm doing something wrong though as nothing I do here works. I also have this feeling that session_start() runs before other modules are loaded so this will never work and I will have to think of something else.
-
Thanks man - easy purchase!
-
Thanks for the input guys - it didn't seem to work in the admin.php template and, yes, the actual frontend template would be too late. For now, I edited the MarkupHTMLPurifier module and changed the purify() function around line 108 to this: public function purify($html) { $this->set('Attr.AllowedRel', array('nofollow')); return $this->getPurifier()->purify($html); } That works a treat I think it would be a relatively trivial task to make it so we can have config options with this module, so I might have a look into that over the weekend unless someone beats me to it!
-
Hi guys I've been trying to allow rel=nofollow in links when editing the source of a page in CKEditor but it strips them out when the page is saved. CKEditor version is 4.2.0 (older version of the module but not too old I don't think). I can get it to work if I turn off the HTMLPurifier option in the field's Input tab but would rather not do that. I thought perhaps something like a[rel](*) in the Extra Allowed Content field might work but it doesn't. Any suggestions? I'm sure it will be something simple.
-
I have nothing more to add here except to say that I have made my position clear and that we have now posted clear Community Rules & Guidelines in our News & Announcements forum. If anyone has any issues whatsoever, please refer to that topic to determine the appropriate course of action.
-
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 reply
-
- 23
-
-
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 reply
-
- 20
-
-
Lisandi: you have linked to that post about pootle four times from different topics now in the space of a few hours. Please stop doing this as it is spamming. If people want to contribute to your discussion about pootle then they will but linking to it four times because you think it is important is spamming.
-
There is also the table profield where you can create useful tables of data in the admin, but for truly huge (thousands and thousands of entries) datasets then a custom module with its own take fan be useful. The table field is a bit more beginner friendly but might not do everything you want - I think in this case it would though. I have added countries as pages in the past because they actually do change from time to time. In the UK postal boundaries can change and there are some confusing overlaps too in places so I'm sure there are other countries where these things change. It is never very often though. I think the beauty of it is that with a small dataset like countries if you have it as pages you might just want the country names to start with but on another project you might want to add currencies and flags, capital cities etc and it's a bit more flexible. If you then cache that data on the frontend (if it was for dropdowns for country or currency) then it's not taking up any more resources than disk space on your server really since even databases are stored on disk. Caching prevents the more expensive database calls but has to be used wisely and where appropriate.
-
Have you not heard of a contract or an NDA before? I explained what I'd done and furthermore posted that you are only limited by your imagination. The latter means no examples are really necessary - you can do what you like in ProcessWire - if you can imagine it you can build it. I cannot show you what I have done on that intranet and nor am I going to spend many unpaid hours anonymising it to show you mocked-up data that doesn't mean much out of context in some of those areas - you will have to take my word for it that I built those things As much as I would love to share a video, I cannot and I suspect there are plenty of others here in the same boat who have a lot of paid work on and can only share what they are allowed to when time permits. Take our word for it though - you can build what you like. More examples will come with time, but I don't think a shortage of examples is preventing people from using the system - it's more likely a shortage of free time. What little I see of other systems suggests a younger userbase where they have more time, though I may be wrong - anyway, our productivity will only increase as the community grows. Also, please don't swear and expect any sort of civil replies - I think you're getting confused about what people are talking about with maintainablility. To my mind, the huge cohesive modular system you are talking about doesn't touch the core - you're right there - but would be a mammoth task to build and maintain. It is scary - don't play that part down please. I have built a handful of modules and struggle to answer issues on GitHub - scale that up by a factor of a hundred (or more) and you can see where the problem is. Also, as someone already said, ecommerce in its more comlpex form (product variations etc) as in Magento and even lighter-weight scripts is months/years of work so there is a huge amount of work involved in what you have listed that then needs to be maintained - not just the ecommerce bit. None of that is meant to suggest it won't happen eventually - I'm sure it will, but it's not going to happen instantly and only productive discussion will make it happen, not frustration (from any side of the fence, if indeed there really is a fence). The ProcessWire API is abstracted as it is solely for usability and to prevent things breaking, so no worries there. I shudder to think about a system where the core devs would change things purely to break someone else's work and I very much doubt (though I've not read nor do I have the time to at 3.30am) a core dev team would do that on purpose unless they were refactoring their core code for good reason (PHP versions march on and there are benefits to be had from changing code). With ProcessWire though, ryan could completely rewrite the whole thing from the ground up and as long as the API calls were the same it wouldn't matter - that's the beauty of it - you don't have to worry about what the core module code looks like behind the scenes or about your modules breaking over time EDIT: Sorry, I am able to reply to closed topics and I wasn't aware this was closed before I posted and it's very early in the AM here so that wasn't intentional to get the last word in.
-
This looks great Marvin. My only suggestion would be to have the GUID as a separate field and not use the name field. I think I know why you have, but for example I already have an Intranet with a lot of code that relies on the name field doing what it does now for some other checks I have (yes, it's a bit selfish of me ). What you could do is have the module install a new field for the GUID and attach it to roles template as well as the users template so that the role name displays in the list instead of the GUID - same with the user name at the bottom-right of the screen. You could then have the module hook into field delete to make sure that field doesn't get deleted by anyone unless they uninstall the module. You also then have some meaningful content in the name fields if someone did un-link their site from AD for whatever reason. Either way, this is amazing work and I would happily pay for it if it's a commercial module
-
Teppo has nailed it. It's the unfriendly comments from earlier on that derailed it and hence the replies - it shouldn't be surprising that people got upset when you talk about the death of a platform that is alive and healthy because it's not headed in the direction you want and basically ignoring the many others who are happy with it doing what it does. But let's put that aside for now or we will be going in circles. So firstly, as teppo says, Processwire is a framework. It is possible to extend ProcessWire to work in the way you want, but I know this is frustrating you as you want examples. There are too many examples - I have a whole Intranet running news, asset tracking for thousands of assets, purchase orders and invoicing, health and safety observations, contract information and tracking, ship tracking (with some maps integration) and a knowledgebase that links heavily into the assets so we have instruction manuals and guides on how to fix them as well as their fault history). What I can't do is show you any of it because it was built for a client. So that is a Web application - when its function is to process business data. The back-end of an ecommerce shop to me is an application too. The reason people say "you can do anything" is because you can. Your imagination should be allowed to run wild - because Processwire is essentially a framework that still let's you use PHP you can theoretically build anything you can see out there that is already in PHP but it depends on programming skills to make any of it happen.
-
Yeah, when is that? *prods ryan* We've already done the "if you build it, they will come" part - just needs everyone driving to a cornfield in the middle of nowhere now doesn't it? Preferably with good eateries.
-
So sad to hear you've only read a third of my ramblings
-
(For some reason I thought I'd clicked post on this at lunchtime but it's been sitting in my browser waiting for me and I nearly lost it all - it should go before dazzyweb's post in the order of things, but that post serves to confirm that everyone has their own opinions and that we're not all clones ). - - - - - - - - - - - - I've only skim-read bits of this topic because I disagree with much of what you have said lisandi (everyone will have slightly different opinions of course ), but I think maybe reading the other threads on comparing PW to WP/Joomla/etc will help understand why you may be getting replies that confuse you. This one especially where from start to end where some people share your views to some degree, but specifically the post from ryan that I linked directly to: https://processwire.com/talk/topic/7565-making-pw-more-userfriendly/?p=73748 I don't think anyone's being obstinate in not wanting to change interfaces drastically, but the very short version of the counter-argument to your points is that not all CMS' have the same audience a more user-friendly interface is subjective (that thread above proves that) and the end user in theory should just be managing content, not modules/plugins/themes if the person/company who installed the CMS has done their job properly but of course it depends what kind of site you are building and who it's for Whilst nobody is ignoring these conversations completely, being the "zillionth-and-one" person to post a lot of the same stuff suggests having not read the other topics, and perhaps asking for change that simply isn't happening for good reasons as mentioned in one of those topics. If you understand ProcessWire and the infinite number of directions the front-end can go in whilst it doesn't make any assumptions out of the box, you will see that you simply cannot have one-click installs for frontend modules that will work with a theming system, or a library of themes that could even work from one site to the next. That said, it is relatively simple to convert any HTML template to ProcessWire if you are willing to learn (and there is an element of learning in any system). There is nothing about this that will spell the doom for ProcessWire that you keep mentioning and that is the part I disagree most strongly with. There has been rapid growth here these past few years and many success stories that prove your statements about digging ProcessWire's grave wrong. The majority of us (and those countless others who don't participate on the forums) are making a decent living using ProcessWire in some way to make that happen. There is no desire from the majority for ProcessWire to be the "one-click-install king" and rightly so - it is a more flexible system than the others the way it is and, if used correctly, can help you build bespoke websites without limitations quicker than other systems with interfaces that are easier for customers to use (you can build some really intuitive admin template layouts with just a few minutes' work and I would be happy to share in another thread if I get time). That's not to say that the blog module and others aren't worthwhile efforts. They do add a level of accessibility that you are talking about, however it is not the primary focus of the project and the project will not fade into obscurity by staying true to its current path - to suggest that is silly. On the other hand, it is silly for you to mention we should start digging ProcessWire's grave and equally silly for me to say otherwise. In ten years' time will anyone be using Facebook or Wordpress any more? Will "normal" websites still be a relevant marketing platform or will everything be mobile or displayed on a watch? Who knows - the point is that technology moves on and ProcessWire is a very modern bit of kit that is not trying to be like other systems based on older ways of thinking and legacy code. Will this mean that less techy people will use one of those other systems for a simple blog? Sure, it almost certainly will, but if you want a blog and lots of themes then use Wordpress - we're all for people using the right tool for the job and it won't always be ProcessWire (but for us, most of the time, of the time it is ). ProcessWire will do just fine continuing down the path it is on. User feedback is welcome (I'm just the forum admin by the way, so I'm speaking for myself and not the wider project) but no project will incorporate every suggestion, no matter how often some may arise, if it doesn't fit with the goal of the project or its intended audience - in this caseit is those people willing to learn a little more than in other systems if they want to build a site for themselves. The audiences are a little different - call it "the thinking person's CMS with endless possibilities" if you like, and assuming that's not too offensive a tagline
-
Are you sure you're in London or were you being sarcastic with that wink? My own view of London is through Lock Stock tinted glasses so it might be more polite than the media portrays
-
Hmm... you know you should probably have your memory tested when you don't remember writing a module like this one (was about to do it again) despite having posted in this topic a few short months ago. Definitely losing the plot!
-
Any custom fields are unaffected by upgrades, so it's not a problem.
-
Can I ask why you want to handle page transitions differently on mobile (AJAX as opposed to simply going to another page the "normal" way)? I would likely use a framework myself - either Foundation or UIkit and go from there as the various breakpoints are alread built in. Then, if I wanted to serve different images depending on size I think someone here has a module for that, although I can't find it just now.
-
As a few have said above, mock ups of the admin can help sell the system more effectively than any technical talk. Take the case study for National Geographic India: https://processwire.com/talk/topic/7494-case-study-the-triumph-of-national-geographic-traveller-india-in-processwire/ I've done similar in the past - without getting too deep into the technology you can mock up the admin interface for a few of the client's key sections and they should be happy at how simple it is to use. At the end of the day that should be one of their main concerns sorted.
-
We'll be here with a box of tissues and some kind words. Maybe even some help
-
Teppo's version is shorter than mine I think a lot of us were timid when we started doing web development - it can feel odd doing a job you enjoy - but at some point it all boils down to you being the expert and the client listening to you. A really rubbish plumber analogy would be if you were talking to a client and they wanted lead pipe instead of copper, what would you do? A crappy job with lead pipe that would taint their water supply or walk away?
-
"Dumbing down" Teppo's points to something a non-technical customer will understand a little easier : ProcessWire has most common features built-in, custom fields and admin templates are easy to do as well so it can be set up to work around your needs ProcessWire is the ideal platform to grow on - there are no roadblocks that can appear in other systems (it's capable of doing almost anything and doesn't mind you changing direction along the way) ProcessWire is secure. Never had a security flaw unlike some other systems where they patch for security systems every other month ProcessWire is fast - faster with ProCache (the fastest you can technically get!) ProcessWire is scalable, so if you need to support hundreds of customer accounts, or run an online ordering system, you can ProcessWire is Open Source and well-supported. It keeps costs down and there's an excellent community of developers behind it. I crossed out bits that I initially wrote that can be skipped as they are a bit negative, but left them there if you want to use them. As for the "Why can't you do it in Wordpress for me?" I think you answered that in your previous post pwired - if they insist on that then skip the job The thing a lot of people get hung up on is selling the system. At the end of the day, aren't people hiring us because we're skilled at what we do? If they don't value your knowledge and expertise despite explaining the benefits and want to use something else then you have to make a choice - use a system you don't want to use or turn down the work. To be brutally honest, if they won't listen to you at this stage it's worth considering if that might continue throughout the whole job and sap all the fun out of it for you. Having worked in retail a long time ago, I disagree with "the customer is always right". I prefer "the customer may have some valid points", but more-so in web development they should be listening to your suggestions. They then make the decision whether to take that advice or not of course, but you've at least done your best up until that point. --- A day I'll always remember working in retail is the time I was asked by a customer to check if an item of clothing was available in other sizes upstairs, Having just brought out all the sizes we had, I informed him there were no other sizes. He insisted I go and check. I assured him they were all out. He stormed off after telling me that I had lost a sale because I couldn't be bothered checking. You can't help some people
-
I think the last time this came up someone mentioned there is a unique user ID in Active Directory that would be worth storing (objectGUID). My scenario is if someone gets married and you remember to change it in AD you might not remember to change it in other places. Therefore they would be treated as a new user in this module. It would be amazing if when it can't find the user it checks details via LDAP but then also checks the objectGUID against the PW database and update name and other details accordingly. Just a thought, but I know how annoying it can be the more pieces of software you have to remember to change logins across. Even armed with a checklist it can take more time than it needs to EDIT: This comment on PHP.net might be of interest: http://php.net/manual/en/function.ldap-get-values-len.php#111899
-
Here you go guys: https://processwire.com/talk/topic/2387-the-structure-of-fields-and-templates/?p=22762 (found via a link halfway down this article: http://www.flamingruby.com/blog/anatomy-of-fields-in-processwire/ ) I know ryan has explained this several times over the years but I agree that as one of the real "what the heck?" points that come up when you're first exploring ProcessWire some page dedicated to it on the site and linked to wherever fields are mentioned might not be a bad idea
- 206 replies
-
- 6
-
-
- standarisation
- templates
-
(and 1 more)
Tagged with: