Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/10/2013 in all areas

  1. Hi Everyone, the last days i read a lot about the ongoing process of "modernizing" the admin theme, adding some features and getting some marketing buzz from people who aren't currently aware of processwires awesomeness due to the fact they didn't like the current admin theme. I must admit that at first was one of those "design oriented" guys and didn't dig deeper into the system because i didn't liked it's look & feel (or at least i thought it doesn't look "professional" enough to present it to our customers). Fortunately a colleague of mine finally managed to convice me giving pw a second try. After digging deeper i started to really like the concepts behind it. I tried different admin themes and git stuck with "ergo" which we currently are using on several pw instances. Although i weren't completely happy with it's look and feel on several details (but that's just me: i never heard one of our customers complaining ). The Idea of doing a theme by myself started to grow in my mind. After doing several layouts that "just beautified processwire to my taste" (i can post a "design evolution summary" if anyone is interested) i took a step back and started doing some more conceptual work and research. Specifically i thought about which "personas" are using processwire and for what reasons they are using it. Also i tried or looked at screenshots of some more "hyped" systems (ghost, anchor, craft...), asked out some (dev) co-workers and others who are content editors (which are the two main "groups" of personas imo) what parts of processwire could be done better or used in a more efficient way. The good (but not surprising) news is: There were almost no complaints about the current features. Long story short: With the "benchmark" in mind and some feedback i again started layouting. I rearranged some buttons, menus and tried to give processwire a more modern, clean and "up to date" look. But before i'm going to code all of this i wanted feedback from a broader audience so i can propably fix or correct things that you as everyday users aren't happy with. Here we go: I used the "w" of the processwire logo as a "picture mark" as it is pretty unique and can easily be recognized and remembered (You could also use this as a favicon). I kept using "processwire colors" for brand/product recognition (i know ryan stated people are complaing about them) but also tried to use them in a very minimalistic way so there is nothing that distracts editors from the content. I chose the menu to be positioned right for two reasons:1) Content first! The most part of work in processwire is editing and creating content. So why shouldn't content "rule" and be the first and most important thing (at least for LTR Readers)? 2) With the buttons and the menu both at the right side there is a "cluster of functionality" which makes it more efficient: Shorter ways for eye- and mouse movement, less things to "overlook" when actually editing content. The pages options within the tree are hidden (again: reduce visual complexity) into a dropdown with only the most commonly used one (edit) beeing shown (this should be configurable). The Font is the beautiful Fira from Mozilla <3 The messages are displayed "growl style" and can easily be closed by the user (or close themselves after a certain amount of time) I chose to use the content of ryans "new theme" example screenshots to make it easier comparing them in terms of visual hierachy. As you scroll, the buttons on the top will pin and scroll with you. This way it's always possible to save or view the page at any scroll position (the save/publish buttons are part of a module that's currently in devlopment here). The bar at the bottom will contain some shortcuts as well as less frequently used / system related stuff (i.e: user profile and logout). "Zen Mode" with closed menu. Just you and your content For those who like it bright: An example of an alternate version which is even more minimalistic.From my point of view there are some things still missing. I thought a lot about including a possibility to open the page tree from everywhere (as in Nico Knolls Dark Business and the ongoing Discussion in the Two column admin theme concept). I think this might be more effective to just test it from a ux perspective when actually coding the theme. My Idea is to build a static clickdummy and put it on github before actually releasing a "real" theme (with all the logic / js work to be done) to do some usability testing. Thanks for reading and i hope there will be some feedback! Best regards, Felix
    18 points
  2. what.cliente ask.4 drupal or wordprass ? cliente ask 2 be able do this.or that or other not what cms u use cliente.want to do some thing web devaloper is 1 to say.what to do with web devaloper is expert on.tool not cliente unloss yur client.is also web devaloper love -willyc
    4 points
  3. This looks super clean! Also I think this builds upon PW strengths without trying to "re-invent" everything. If you pull this with same quality code than these UI screens are, I think this would be definitely great candidate as a next default theme. As Ryan has mentioned the current improvements are some "first aid" for the theme challenge, all doors are open to take this to next level.
    4 points
  4. I don't know who thought it would be good idea.... Just one word. Annoying! It only sounds useful but it's annoying and causes a lot of "arrrrg". Just imagine clients, when even I constantly 50 times a day get caught by it. Can we remove it or at if kept, make turn it able to turn ON in a config? I don't know why it was added and was never in for it. Thanks
    3 points
  5. NP manol. I?m just kidding. BUt this would be more of a formbuilder support question. FB is special in that it needs other methods: function hookForm($event){ $form = $event->object; $file = $form->get("file"); print_r($file->attr("value")); } $forms->addHookAfter("InputfieldForm::processInput", null, "hookForm"); echo $forms->load('contact-form')->render(); But I'm not making any money out of form-builder (but Ryan) so I'm not too keen on helping out. I don't mean it really... Also there's some threads about this exactly and you better search via google as mentioned.... Edit: Ok, maybe not so good searching via googel as the form builder forum is private
    2 points
  6. Hi Matthew, gosh that's rough isn't it. I've been there before (as I share below). However I don't believe you lost the gigs to WP or Drupal. I think you lost the gigs, because you didn't provide a service that your clients wanted. And... You assumed you knew what was best for your client, when they specifically told you what they felt was best. You were probably correct in your assessment of their technical needs, but I can't imagine you would have a good understanding of their needs from a larger business perspective without having worked for/in that business for a few years. Last Jan. I had a 12 month contract for $48K to build/upgrade an existing Drupal site and to help build a foundation that would help them bring in more revenue. While I was doing a great job for them, I was focused on the bigger picture, the needs and demands of the business. I should have been focused on the "wants" of the clients, because they terminated the contract and I took a $35K hit to my income this year. They canned me for the same reason you didn't get those gigs, I wasn't providing them what they wanted. They couldn't understand their "needs", because they didn't have the experience of growing an online business. So from their perspective, they were paying good money and not getting what they wanted. They had no idea what I was actually doing for them. Imagine going to a fast food restaurant for a burger and having the cashier say, sir, your overweight, I know you really want this burger, but trust me I know what's best for you and what you "need" is a salad. You can buy the salad, but the burger is not on the menu. This is essentially why we both lost our gigs. I'd guess over 85% of the websites are powered by WP or Drupal. That means 85% of the people who need web work need Drupal or Wordpress services. You can choose to only support PW, but now you are trying to sell services to a fraction of the remaining 15% which is going to be difficult. PW is new, we are early adopters, it will take at least five more years before PW gains traction (and much longer to start taking market share away from Drupal & WP, though I'm confident this will happen). Right now, you should be supporting WP and Drupal, but start positioning yourself to offer PW services when the demand is greater. I'm only selling PW to people who trust my judgement implicitly. They are sold on me, they really don't care what platform they use, because they trust me so it's an easy sell. I'm not selling PW to new clients unless I can show them a side by side price comparison between WP/Drupal and PW. That's an easier sell. They don't want to understand how the technology is better, they want to know what features they will be getting and at what cost (e.g. contact form, blog, fb integration, etc.). If they can get more bang for their buck with PW, they may go for it. The key to selling services... don't "sell" people anything they don't want or aren't asking for (I'd change my strategy for products). It really couldn't be easier. If you are "convincing" someone, you aren't selling. Just listen to what they want and give them a price. If you don't provide the service, this is your opportunity to provide something of value to them, find a qualified person who does and connect them. They will leave the experience with a good impression of you and will tell others about you or come back later when their needs change. You can also take on the project and hire someone else to do the work (if you don't have the skills, or if you are like me and don't want to use Drupal anymore). If you do this, you'll need to take a percentage for your salary (now as a project manager) and a percentage needs to go back into your business to help you grow the biz. The rest goes to your developer. I also do passive selling. So back to your scenario, in that case I would have sold them the Drupal or WP site and I would also mention to them that I provide other services that they may be interested in utilizing. I don't do this with any expectation of actually selling them something "today". I just let them know what I offer, so that when the time comes, they think of me. For example, after the successful launch of their website and when my client is ecstatic with my work, I may mention that I provide ongoing SEO and marketing strategies to help grow traffic and revenue. I don't even ask if they are interested, I simply say, "Keep me in mind if you ever need SEO". You'd be surprised. SEO may be not be on their list of priorities, but when it is, they think... "I need SEO, and I already know and have a relationship with someone who's offering these services". I do like your strategy about positioning PW against PHP Frameworks, because it's a product best suited for developers (right now). This tagline is very similar, but would do just that. ProcessWire is a RAD PHP content management framework that helps developers build better custom websites and applications faster and more securely. That being said though, I trust Ryan, I don't know where he wants to take PW or who his target demographic is. I can't even begin to know if this is a good idea without getting the full picture from Ryan. Same offer I made to pwired goes for everyone here. You are welcome to send me your skills and work examples and when I have a client that needs your skills, I'll reach out. I'm here to help and we can all be more successful by working together. If you have questions, get in touch.
    2 points
  7. Here's my first draft for the Spanish translation. Please note that: It's fairly complete, but not quite ready for production. Spanish is not my mother tongue (I'm French), but I've been living in Spain for 10 years so it should be acceptable. Contributions and suggestions are welcome. I will post updates as necessary. This is Spanish for Spain. Some parts of the translations might not be appropriate in South American countries for example. In particular, I've used the less formal, more direct version of "you": "tú" as opposed to "usted", which is much more common in Spain. I love ProcessWire and I'm glad I can contribute to this awesome project. UPDATES: December 10, 2013: Translation files updated for dev version 2.3.8 (see "spanish-spain-december2013.zip" below) March 4, 2014: I've created a Github repository that I plan to update whenever possible. All updates will be posted there from now on. June 16, 2014. Update to 2.4.4. spanish-spain.zip spanish-spain-december2013.zip
    1 point
  8. ProcessWire Site Profile Using Zurb Foundation 4 This is a drop-in replacement for the default ProcessWire site profile. See the live demo at: http://processwire.com/foundation/ It is mobile-first and fully responsive, capturing all the benefits of Zurb Foundation 4. Ready to be expanded upon with built-in support for deeper levels of navigation nesting in the sidebar. Pagination ready with Foundation-specific pagination output, when/if you want it. Improved search engine, relative to the basic profile. Library of Foundation-specific markup generation functions included, primary for generation of navigation (in _nav.php). Uses ProcessWire 2.3+ prepend/append template file settings making it easy to work with. It is largely stock Foundation 4 in terms of look and feel, with a few tweaks. To Install Download this profile from GitHub or mods.pw/4u. Start with a copy of ProcessWire 2.3 or newer, and its default site profile. If starting with an uninstalled copy of ProcessWire Replace the /site-default/templates/ directory with the templates directory from this profile. Replace the /site-default/config.php file with the config.php file from this profile. Run the ProcessWire installer. If starting with an already-installed copy of ProcessWire Replace the /site/templates/ directory with the templates directory from this profile. Add the following two lines to your /site/config.php file: $config->prependTemplateFile = '_init.php'; $config->appendTemplateFile = '_main.php'; Desktop Screenshot Mobile Screenshot
    1 point
  9. This module is obsolete - please use the Console Panel in Tracy: https://adrianbj.github.io/TracyDebugger/#/debug-bar?id=console Ok, this is really not very fancy, but I think it will come in quite handy - for me at least It provides an admin page where you can test code without the need to edit template files. It runs from a new item under Setup called "Code Tester" Simply enter your code, including an opening <?php and click "Run Code". Page will refresh with the code block still in editor, and with an iframe containing the results of your code below. In some cases the output may not be relevant if your code is manipulating pages etc via the API, rather than outputting content to a page. Then you can easily make code changes and run again. Github: https://github.com/adrianbj/ProcessCodeTester Installation Install as normal, then move the included file "code_tester.php" to your site's templates folder. Depending on your sites template structure, you may want to edit this file. I have set it up using the head.inc and foot.inc approach that is used in PW's default profile. There are detailed instructions in the file to make it easy to modify as needed if you prefer using a single main.inc or other approach. Install the ACE Text Editor module if you want syntax highlighting. That's It! How it works Nothing very high tech - when the module installs it creates a new template: code_tester and a new unpublished page: Code Tester. When you click "Run Code" it creates/updates this file: /site/assets/files/ID_of_Code_Tester_page/code_tester_code.php and writes your code to the file. This file is included from the code_tester.php file and the code is run and the output processed. Note that I am using ob_start(); include; $out = ob_get_clean(); so that this will work take the approach of populating variables that are output within a main/shared markup file like main.inc If you want to use a variable other than $out in your test code, you will need to edit the code_tester.php file accordingly. Things you can do It may not be immediately obvious as to some of the things that work with this, so here are some examples: echo 'test'; $out .= 'test'; //list page titles matching the selector foreach($pages->find(selector) as $p) $out .= "<li>$p->title</li>"; //populate the results frame with the page returned by the selector. You must use $getpage as the variable! $getpage = $pages->get(selector); // bulk delete pages matching the selector foreach($pages->find(selector) as $p) $p->delete(); So really it is more than a code tester - it can also be used as a way to test selectors and return the resulting page and also as a way of running admin maintenance scripts. Hopefully you guys might find it useful. Please let me know if you have any thoughts for improvements.
    1 point
  10. Hi Manol, not sure if this would help, but last time i had to add a hook to FB, i used something like this, in the form-builder.inc file: $forms->addHookBefore('FormBuilderProcessor::saveForm', null, 'hookCampaignMonitor'); function hookCampaignMonitor(HookEvent $event) { $form = $event->object->getInputfieldsForm(); // make sure it's the form you want if ($form->name != 'product-inquiry') return; // grab the data $email = $form->get('email_address')->attr('value'); $first = $form->get('name_first')->attr('value'); $last = $form->get('name_last')->attr('value'); $subscribe = $form->get('subscribe'); $name = $first . ' ' . $last; // check to see if they subscribed if($subscribe->attr('checked')) { $cmurl = 'http://www.example.com/?some-var=' . urlencode($email) . '&cm-name=' . urlencode($name); // post the data $http = new WireHttp(); $http->post($cmurl); } }
    1 point
  11. PW is defintely more a CMF than a CMS. As a marketing strategy it is difficult to say which way is better. For technical people I have explained that PW is Django of PHP world.
    1 point
  12. Thanks Apeisa. Issue logged in Git. https://github.com/ryancramerdesign/ProcessWire/issues/257
    1 point
  13. It's also to know what to search I remembered this and looked at FormBuilderProcessor.module, I found this in the FB forum with "formSubmitSuccess" http://processwire.com/talk/topic/4188-managing-successerror-messages/?hl=formsubmitsuccess#entry41151 In case of FB you may want to only hook if the form is submitted successful and you could do this in yet another way (yeah it's not easy) function hookForm($event){ $form = $event->arguments('form'); // as per the argument in the hooked function could also be arguments(0) $field = $form->get("file"); // familiar? print_r($field->value); // file field // do stuff } wire()->addHookAfter("FormBuilderProcessor::formSubmitSuccess", null, "hookForm"); echo $forms->load('contact-form')->render(); Or FormBuilderProcessor::formSubmitError accordingly It's all a little different with formbuilder and I had to try and lookup myself. You can't hook, at least I couldn't find out how (maybe Ryan maybe knows more) into the inputfield processInput directly as with regular InputfieldForms.
    1 point
  14. Nice advice to search with google for the general forum, you're not getting money with FB, but whenever you come to Spain for sure as many beers as you can drink.
    1 point
  15. NOTE: I'm really sorry but sometimes is really hard to find the right information in the forum, I try hard to found it before making people losing time, and is not a complain at all, people here is in generaly very keen on helping others as I do when I have the knowledge. Special thanks to Soma, he really has helped me a lot and still does. Anyway, what I'm trying is to hook a formbuilder form embedded with option C, I would like to copy some files and data from the form to an external database and I need to hook the form after submit to get the results but I'm totally unable to do that, even the above code is not working for me, I thought I had understood how it works and even make a little resume to help others here but no way to do it after hours researching, I know I'm near the solution but no way to get it work. Any help is welcome.
    1 point
  16. I am not too keen for it either. only accidentally done that few times.
    1 point
  17. Sorry Manol - I don't have formbuilder, so I really don't know how it works, but maybe this post from Soma might help: http://processwire.com/talk/topic/3105-create-pages-with-file-upload-field-via-api/?p=30979 EDIT: Speaking of the man himself
    1 point
  18. maybe try something like this? to get the field it sometimes easiest to use a find() or maybe simply $field = $form->get("name=reconocimientos"); function hookEmail($event){ $file = $event->return; echo "value: ". $file->value; } $form = $forms->get("reconocimientos"); $field = $form->find("name=reconocimientos")->first(); echo "field: " . $field->name . "<br/>"; $field->addHookAfter("processInput", null, 'hookEmail'); echo $form->render(); the hook needs to be before you render the form too. but not sure what you want to achieve
    1 point
  19. I'm currently migrating a large 3 languages site to PW couple thousand pages...
    1 point
  20. If it's interesting for other people maybe post the 'solution' as well??
    1 point
  21. Thanks Martijn, I'll certainly look into this. Found some more useful threads on the forum here too so looking into them further now. Thanks again, Konrad
    1 point
  22. That's a good point. There's no point to wasting time or trying to sell something to someone who already has their mind set on WP. If you are dead set on only using PW, then focus on identifying the type of client who will appreciate why you have chosen to work with PW exclusively (put this philosophy on your about page, but don't get too techy). I would look into providing services to developers, agencies, CTOs, and entrepreneurs, (I fall into three of those category's hint, hint). Folks who have already been through the process of building a website may also be a better fit for your model. That being said, what's the reasoning behind this approach? Seems to me you are choosing a difficult path and your client acquisition costs will increase while your profit (if any) will go down. I can't imagine this model generating more than $65k per year for a sole proprietor. You'll be lowering your client lifetime value too, because you won't be able to retain your clients as long (they will need a service you don't provide and will eventually leave). This is a problem, because a profitable services business is built off compounding revenue from existing clients who need ongoing services, not individual gigs from new clients or one off gigs/clients. That time you spent and were not compensated for gets added into your client acquisition costs. Letting just two clients slip through your fingers, because you didn't want to provide them a WP site, probably cost you $10-$30K over a period of 3 years (just a guess, it's probably higher). I'm not any happier about coding in WP or Drupal, which is why I'm willing to hire a developer for this task (and no task is beneath me so I'll still use WP and Drupal). In that scenario I get paid to be a project manager and interface with the client, some money goes back into the business and the rest goes to my developer. I know the amount of money I'll make on the job is much less when I hire out, but I'd rather have a smaller percentage of something than 100% of nothing (and let's not forget about the additional services the client will purchase throughout the years). Are your clients paying you to educate them? If not, limit the amount of time you spend with a potential client until you have a signed agreement. Put some educational material on your website that you can steer them too (maybe also include a two minute video where you explain what PW is why people should care). Not only will this build up your SEO, but you will save time by not having to educate every new client over and over again. That gets expensive and as you have recently experienced. It's also deflating when you spend your time providing value to someone and they ditch you just before go time. Chalking it up to a bad week is commendable. Sometimes I really beat myself up over things like this, when in fact it was just that, a bad week. Don't forget to consider your client's experience. The better their experience the more likely they will hire you, refer their friends, and come back for repeat business. Make it easy for them. Sometimes low tech clients are overwhelmed by the tech talk. Even if you think you are dumbing it down, you are probably assuming they have some at least some tech knowledge that they do not. Sometimes they are too embarrassed to tell you they don't know what you are talking about (they don't want to sound dumb). Other times, perhaps more often than not, they may be afraid you'll take advantage of them. With new clients not enough trust has been established and they have no way to validate the information you are giving them. When they try to do so, they use google or talk to their friends and in this case, you are right, they are going to find a lot of info on WP and feel much more comfortable going that route. Here's a good resource that I review often: http://freelanceswitch.com/clients/12-breeds-of-client-and-how-to-work-with-them/ Another thing to consider when reading my responses. They are tailored for today. In the years to come PW will gain traction and the word will get out there. You won't have some of the issues you are having now, because the work you do will be in demand. In the meantime, if you want to convert clients to PW incentivize them, but don't use manipulation, fear, coercion, pushiness, etc. I just sold a PW site to someone for $1,200. The actual cost was $5,700, but the client was rewarded for taking a risk and putting their trust in me. You may try offering a 100% satisfaction guarantee or a substantial discount.
    1 point
  23. Nope, not luck. I've never handed out a single business card. I work harder, longer, smarter. Where others give up, I keep going. There's a fine line between doing good work and great, and I put forth the effort that others don't to produce great work. I'm also very careful not to think about what I don't want, but rather what I do want. For example, while you are thinking about prices in the supermarket, elec, gas, rent, etc. your perception shifts to fear and scarcity. Afraid you can't pay rent, afraid you don't have enough work, afraid you'll be in debt. You attract what you think about. I'm an entrepreneur, and yes, I have the same concerns, but instead of worrying I'm thinking about solving problems for others, growing my business and how I can provide value to others. Which thought pattens do you think will serve you? If you want to build websites, how does thinking about supermarket prices help you do that? Money and success is a natural bi-product of correct thinking and providing value to others. So that's one aspect, and it takes practice to correct thought patterns that aren't serving you (limiting beliefs, e.g. the market sucks, there's no jobs. Some of my most successful times were during my nations worst economic recessions). Looking at this from another perspective... If you aren't getting work, asses your skills and talents. If you are skillful and have the talent, then you may need to just get out there more. Do more networking, ask family and friends if they know anyone needing a website, talk to local businesses, reach out to design agencies, reply to tons of classified ads frequently. Make unsolicited call, send emails, stand in front of a supermarket and embarrass your self with a cardboard sign that advertises your services (if that's what it takes). It's a numbers game. In e-commerce there's something called a conversion rate. Converts are the website visitors that actually buy something from the website, not just a site visitor who stops by to look. A good conversion ratio is between .5% and 1%. That means that for every 200 site visitors only 2 of them will buy something. The same idea applies to getting paying gigs. Have you offered your services to 200 people this week? If so, maybe you'll pick up a gig or two. If not, hustle. Reply to 20 classified ads a day, five days a week. That's 100 people who know you now. Go out into your community and find another 100. Maybe that means sending unsolicited emails and making phone calls, maybe it means stoping by the shops that you like. Go to book stores and libraries and slip your biz card into the how to build website books. If you want some help, send me a list of your skills and some examples of your work. I'll keep you in mind when I or a client needs someone with your skills. If you have any questions, I'm happy answer them over skype, email, this forum, etc. Some good resources to consider: Marketing Without Advertising: Easy Ways to Build a Business Your Customers Will Love and Recommend 177 Mental Toughness Secrets of the World Class Business Lessons for Entrepreneurs Change Anything: The New Science of Personal Success Mind Performance Hacks: Tips & Tools for Overclocking Your Brain http://fundersandfounders.com
    1 point
  24. I'm doing it also here https://github.com/somatonic/BlocksContent/blob/master/BlocksContent.module Works fine. Can't say except that the path has to be correct and file exist or it will ignore it. Also maybe the context or hook is different in your code.
    1 point
  25. Setting template filename only works if it starts with full root path. Make sure your paths are correct. The root path you have you can see with: $this->config->paths->root So $this->config->paths->templates . "view/mytpl.php"; works fine in a hook I don't think you can set the template filename in the template for the page as it's already rendering it. Also $event->return = $page->template->filename; isn't needed if it's in a before render hook.
    1 point
  26. @mvolke the module I'm working on synchronizes structure only - Templates, Fields and Fieldgroups. It stores captured model operations in JSON files. I currently have no plans to synchronize content (Pages) though it may prove to be necessary at some point - because Pages are used for so many things, certain Pages may need to synchronized, for example options for drop-downs. I'm having Ryan take a look at the module now, and his initial reaction was positive - I think we can make this work, and I think it'll work well. You would think that, but if you look at the ProcessWire codebase, the entire meta-model, with all possible operations, is encapsulated and supports hooks - so it is actually perfectly feasible to implement this in ProcessWire. As proof of concept, I already have all Field operations captured and repeatable. Because this is implemented at the lowest API level, it is actually independent of controllers and user-interface - that is, if you were to build your own admin modules that (for some reason) make changes to any part of the meta-model, those changes would be correctly captured and would be repeatable, independently of any admin UI. There is still substantial work to do on this module, but I would say it's about half-done at this point, and there are no major roadblocks to completion - the fundamental idea is proven and works, so it's a matter of building it out completely.
    1 point
  27. Thanks Fernando for your contribution. A Latin American version is indeed sorely needed. I'll be more than happy to collaborate with you so we can have two (or more) rock-solid Spanish versions. As a matter of fact, I was planning on revising my original work for a new Web project in Spanish that I'll be starting in about a month, and enlist the help of a native speaker from Spain to double-check everything. My translation is for an older version of PW, so I suppose there must new fields to be translated anyway. As regards to your question about how to get started with the translation, if I remember well, I did everything from the control panel. As it's not always easy to determine the context of the original text in English, I think it's best to move back and forth between a live site and the control panel to sort out the intended meaning, which I did not do fully enough in the first place. Jacques
    1 point
  28. The best way to check if the language is default is: $user->language->isDefault(); …but if you prefer to add your own fields to the Language template (like 'code') then that's fine too. Another alternative is that you could add your own defines to a common include, and then compare against them. define("EN", 123); // ID of english language page define("ES", 456); // ID of Spanish language page define("FR", 789); // ID of French language page Then whenever you want to compare a user's language, you could do something like this: if($user->language == FR) { // user's language is french } We will be adding more multi-language fieldtypes as time goes on. Thus far there hasn't been a lot of demand for more than the ones we've already got, but it's always been the plan to keep adding more.
    1 point
×
×
  • Create New...