Jump to content

Leaderboard

Popular Content

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

  1. Inputfield And Fieldtype ImageFocusArea requires ProcessWire 2.5.6 or later This Inputfield makes it possible to select the important part of the image and use this area for different cropping options. This module is not a replacement for the existing Thumbnails module, though depending on your need it probably could replace it in many cases. I think a more flexible cropping approach than the existing Thumbnails module is useful especially when using the new html <picture> and you don't want the editor to define multiple thumbnails. Usage Create a new Inputfield ImageFocusArea and add it to the desired template. Edit a page with this template and add an image to the new field. You will see a link "Add Image Focusarea". Click the link and you will see a popup with a cropping tool similar to the Thumbnails module. Select the important part of the image, click "apply" and save the page. By default the Field hooks into Pageimage::size and automatically populates the cropping option with percentages of the center of the selected focusarea. You can always override this behaviour by calling $image->size with a different cropping option (e.g. $image->size(100,100,array('cropping'=>'center'))). The module introduces 3 new cropping options: align: This is the default if you do not override it with another cropping option. When resizing a image the module only adjusts the alignment of the crop. You will get the most zoomed-out result of these options. inside: Only parts inside of the selected area are used in the resulting image. You will get the most zoomed-in result of these options. outside: The resized image will contain the whole selected area. The surrounding imagearea will be used to reach the targetsize. This is also true for upscaling=false. Upscaling will only happen if the source image was smaller then the targetsize. API usage examples // here we force the old/usual 'center' mode: echo "<img src='{$page->image->size(200,200,array('cropping'=>'center'))}' />"; // by default if you did not define a cropping option, the cropping option gets automatically populated // Both calls will result in the same image: echo "<img src='{$page->image->size(200,200)}' />"; echo "<img src='{$page->image->size(200,200, array('cropping'=>'align'))}' />"; // the resulting image will be the center area of the selected focusarea echo "<img src='{$page->image->size(200,200, array('cropping'=>'inside'))}' />"; // to get an image with exactly the same ratio as the focusarea use width()/height() instead of a size() echo "<img src='{$page->image->width(200, array('cropping'=>'inside'))}' />"; echo "<img src='{$page->image->height(200, array('cropping'=>'inside'))}' />"; // the whole selected area will be part of the image, the surrounding imagearea will only be used to reach the targetsize echo "<img src='{$page->image->size(200,200, array('cropping'=>'outside'))}' />"; Flexible CSS Background Images Additionally you can access a new property cssBackgroundPosition, which could be useful for frontend responsive images. The visual result is similar to the cropping='align' mode, but depending on the size and postion of the focusArea and your images source and target size your mileage may vary. This property is intended to be used together with background-size: cover;. It is important that the background-image has the same ratio as the original image! <style> .cssimg{ background-size: cover; width:200px; height: 200px; } </style> <div class="cssimg" style="background-position: <?= $image->cssBackgroundPosition ?>; background-image: url(<?= $image->url ?>); "></div> Downloadhttps://github.com/phlppschrr/ImageFocusArea remember, this modules requires ProcessWire 2.5.6 or later There are still known bugs with upscaling=false, but I am not sure if it is a bug of this module or a ProcessWire bug. (fixed in ProcessWire 2.5.6) Thanks to Ryan and especially Horst for all the new great API additions for Pageimage und ImageSizer which made this module possible. This is my first module. If you notice any problems or unexpected behaviour post here or fill an issue on github. I am open to all suggestions. Do you think the cropping option names (align, inside, outside) are descriptive enough? Any better ideas? -- Edit: Renamed the Module to ImageFocusArea and updated the github link Edit 2: Reformatted this post and added some additional information.
    8 points
  2. For me, it looks more like this: I get asked if I can build a site I make an offer and they accept it After that I write the bill, and they pay Now I begin building I upload a beta on my server and we put content in and do changes until it's ready I move it to the client's server (if they already have one) or recommend a hoster (sometimes with a little provision) Now we're done My approach used to be a lot like yours but I've learned to take this approach throughout the years because too many times I've had clients decide at the last possible moment that our initial agreement was out of their budget or that the site wasn't as important to their business model as they initially anticipated. The company I work for doesn't write a single line of anything unless the client has agreed both on paper and with their payment that the work should commence. No partial payment, no half now and half later. I've followed their lead in my independent work and it's worked out much better for me since I started doing this. I ensure clients get what they are asking for and work with them every step of the way until it's done. As far as offering maintenance, I only offer what's needed and what I have the time to do. I offer small packages based on my hourly rate, with a little discount. This way, if they need something like a new template file, pages added, database backup, etc., they don't have to pay me a-la-carte, it's all inclusive up to the agreed number of hours and the hours don't roll over into the next month. Sometimes, with certain sites, I don't offer this at all because of the site would need a more dedicated schedule to maintain it properly. These things are usually discussed at the onset of development, to give them a clear picture of where I'll be after the completion of the project. I used to resell web hosting, I stopped after sites would slow dramatically due to resources not being available (being oversold, even on VPS) or server halts. I don't like being in a situation where people are looking at me to do something about their site being down and them losing money when I don't have any control over the hardware. All you can do in that situation is call whoever your provider is and complain - but that doesn't help your client feel any better! I like being responsible for what I can readily address, not for things out of my hands.
    5 points
  3. I have two clients and spoken to other companies who have hosting with their previous designers and have had real problems getting out of their relationships with them - the designer not answering the phone, changing passwords and so on. I have one case where the client has registered the .co.uk website some years ago and has just discovered that the designer registered the .com and is refusing to let it go. I am recommending a small, narrowly targeted nuclear missile. Consequently I make a point of "I will not tie you into me by buying your domain name for you or insisting you host with me" - that sort of thing. Apart from not wanting the hassle when the server goes down, I would just be a reseller, not a hosting company - it feels like cheating the client. I want the client to feel that they can dump me in the future (and vice versa) if the relationship breaks down. Loyalty is the goal - but loyalty out of mutual respect, not by contract.
    5 points
  4. hi totoff, using the TemplateFile class is perfect for this, have a look at ryans blog profile: https://github.com/ryancramerdesign/BlogProfile/blob/master/templates/archives.php#L101 simple way: file "site/templates/markup/contact-markup.php" (naming it -markup here to point out the difference to the standard template file) John Doe<br> Sample Street 1<br> Sample City template file eg "site/templates/contact.php $contact = new TemplateFile(wire('config')->paths->templates . 'markup/contact-markup.php'); echo $contact->render(); // don't forget to echo! more flexible: with variables! markup/contact-markup.php <?= $name ?><br> <?= $address ?><br> <?= $city ?> contact.php $contact = new TemplateFile(wire('config')->paths->templates . 'markup/contact-markup.php'); $contact->set('name', 'john doe'); $contact->set('address', 'sample street'); $contact->set('zip', 'sample city'); echo $contact->render(); edit: in your case you can do $sidebar = $contact->render() instead of echoing it... forgot the point of delayed output
    4 points
  5. Hi Nico, my workflow looks very much the same with two major differences: whenever possible I work according to the principle "content first". That is, I'm trying to have the - written - content ready before I start making the site. Thus I have a better idea of what design is needed and how the site needs to be organised. I never ever offer hosting. The legal situation in Germany means so much risks for a hosting service that I decided not offer it. Just inform yourself how many "Datenschutz" rules you have to consider if - for example - you have access to your clients emails (which you definitely have if you host their site). I would say: It's not worth doing it. Hope that helps
    4 points
  6. Cloud hosting options make it relatively easy to set up even "per-client" environments, but a shared setup still remains a viable option. In the latter case you'll want to consider how secure it is, though, and what happens if one site is somehow compromised, under DDoS attack, etc. Probably the best advice I can give right now would be researching available options carefully and trying to be prepared for all possible (and seemingly impossible) issues -- consider it just a matter of time before they happen to you In any case, I wouldn't call it "like making money without doing stuff". Regardless of what kind of deal you make with the client (and perhaps another company that does the hosting for you), the client will consider you, personally, responsible if something goes wrong. This is also why you'll want to define very clearly what your responsibilities are, what kind of SLA you offer, how fast you'll have to react to issues, what kind of services you provide on a 24/7 basis, and so on. Oh, and trust me: being on call 24/7 gets on your nerves after a while..
    4 points
  7. I'd give the second one 34% then it's at least symmetrical
    4 points
  8. Hi Nico Best is probably to use one of those introduction packages. And I pm you tomorrow with some example sites so you don't have the hazzle to need to setup TYPO3. Export is possible via [.t3d typo3] - attention when you search in Google as t3d is also used for other stuff not TYPO3 related. T3D is basically an XML file. Choose the uncompressed version if you do not intend to import it back to TYPO3 You can specify very exactly what needs to get exported and also what you wantto modify before importing or while importing i.e. some names or paths or email etc. Than this .t3d puts all together db data, files from fileadmin/uploads and exports the complete stuff and you can import it elsewhere. In TYPO3 6.2 you can now even make a backup from only one specific extension data tables and only export those. this would be anotherway but it exports only db Data so related images or relations to other files and records might be missing but they are not missing when using .t3d! The good thing on .t3d export is that you can export only a Page or one record , a branch or severeal specific pages or branches or a complete site etc. It is very very flexible. Sometimes it is necessary to do several exports because in the past ithad problems when the .t3d was getting much to big. Die extension die diesen export gewaehrleistet heist impext. (import/export) https://forge.typo3.org/projects/typo3cms-core/repository/revisions/master/show/typo3/sysext/impexp http://typo3forum.hosting-agency.de/vorgefertigte-typo3-templates-als-t3d-import-t3004.html da hast du quasi einblick in die Erzeugung dieser Datei .t3d. --------- Bezueglich des einlesen woanders wuerde ich bei dem Drupal migrator und typo3_migrator von Drupal (ab)schauen. https://www.drupal.org/project/TYPO3_migrate but it can actually only export tt_news /tt_news categories and standard content elements like text/text with image / image etc --------- how to import a site via .t3d since TYPO3 6.2. there are distributions. also they work with .t3d files distributions are more or less similar to profiles in processwire or distributions in drupal. http://wiki.typo3.org/Distributions https://forge.typo3.org/projects/typo3v4-distribution/wiki http://docs.typo3.org/typo3cms/CoreApiReference/ExtensionArchitecture/CreateNewDistribution/Index.html Some distributions are here: https://github.com/Ecodev/typo3-cms-speciality-distribution http://wiki.typo3.org/Introduction_Package http://typo3.org/extensions/repository/view/introduction ------ In real sites (beside the introduction package) you usually have also extensions installed. I wil setup some examples tomorrow for you so you can use them. ------- TYPO3 is facing currently lots of challenges as they started to abandon the very userfriendly templaVoila templating engine in favor of less friendly stuff like flux https://fluidtypo3.org/ or Gridelements http://t3sbootstrap.de/t3sbootstrap/ with Fluid Flux http://t3bootstrap.de/de/typo3-bootstrap-template/ with TemplaVoila in 6.1.* http://t3bootstraptv.de/de/typo3-bootstrap/or a combination of in TYPO3 Themes http://typo3-themes.org/ (it is very very flexible as it orientates on the framework for templaVoila but uses now gridelements to store the data as a real record) Framework for templaVoila - many US Church websites have been build with that and they are now without that package anymore as the webempowerd church which made all this great userfriendly stuff in TYPO3 possible abandonned TYPO3. Here would be a great resource for conversion projects in US and Germany. https://github.com/webempoweredchurch http://www.hopoffacloud.com/webempoweredchurch/ Lots of chiurch websites have been build on the wec starter package https://github.com/webempoweredchurch/starter_package with one click more or less you have a complete and complexe website for churches up and running incl example data - with calendar, events management, jobboard, podcast extension, userrights management, news, blog, guestbook, gallery and much more - all those are now actually potential processwire customers if we could provide them an easy way to switch and a similar church package but based on processwire. The Framework for TemplaVoila whichwas the base for that package in its version 1.* has also been used by lots of companies all around the world. http://templavoila.busynoggin.com/ They all are facing now the same problem. TemplaVoila is working in 6.2. but the newest framework for templavoila extension which is 2.1.3 is not publicly available in TER. so many don't even kmnow how to get it (it's actually still free but you ned to contact the developer) To be honest most customers like all that hazzle anymore which ahrmed TYPO3 a lot since years. So they are looking for alternatives. As TYPO3 6.2. is also slower than 4.7. and many extensions don't work anymore so they arefrustrated and woudl need to convert their old TYPO3 site (many based on templaVoila) to the new version 6.2.6. The time needed to do that is probably much much more than simply starting using Processwire ;-) and converting their data and content to Processwire. The great thing is that Processwire already has more features which are usefull for enusers than TYPO3 IMHO - it has separate core, is multilingual and multidomain capable (we currently have to convert a multilingual church website for 400 churches in one TYPO3 from TYPO3 4.5 LTS to TYPO3 6.2.6 LTS and it is also using that framework of Ron Hall and we finally will convert the content to be used with typo3-themes. CRAZY if you ask me but there is currently no other way to get the site again working in TYPO3. More and more customers with actually the same problems will come. From a marketing perspektive I would suggest that Processwire needs an import tool to import TYPO3 sites from TYPO3 4.5 LTS / TYPO3 4.7.* / TYPO3 6.1.* and TYPO3 6.2.5+ mainly for sites using TemplaVoila!!! Those are the customers sitting on a sinking ship with a huge whole in it! ;-) Prosesswire can be the safe groud for all of them. Afterthat migration tool exists we start promoting it in the German and English Onlline Magazines i.e. http://t3n.de - this will open up the eyes of lots of customers. Additionally we can ask the former manager of the WEC to help promotinga Processwire Church Pakcage and of course also the Company Package which includes that migrator. I am pretty sure that lots of people will switch as especially the saftey and security record of processwire is definitley better than The one of TYPO3 and a huge huge difference to stuff like those insecure applications since years i.e. wordpress, joomla, and drupal. Checkout the secunia security index. http://secunia.com/community/advisories/search/?search=processwire http://secunia.com/community/advisories/search/?search=typo3 http://secunia.com/community/advisories/search/?search=joomla http://secunia.com/community/advisories/search/?search=drupal http://secunia.com/community/advisories/search/?search=wordpress I hope that helps a bit to make clear what treassure is actually out there. Andi
    3 points
  9. Another month went over and I want to give you a quick update on the lightning.pw project. Thanks so far to all of our users. Bad things first: Yes, we face challenges with our FTP service. The daemon is quite fragile and the only helpful solution is to restart FTP every 60 minutes on the server. We're looking into this issue and are trying other programs at the moment. If you have a problem, just drop an email or tweet us on twitter. After over a month we now have 80 users and 136 sites running. Five of those sites are hosted for free as a demo. The Default profile was used the most, followed close by the blank one. Since we started the service, Ryan has pushed 61 versions of ProcessWire (including updates, dev,stables) to the github repo. With lightning.pw it is easy to always have the latest beta ready and running We were kind of busy with our other student jobs and with the development of some modules you might have heard of.... Anyways, a Dropbox-Sync is on it's way and we will also integrate the snapshot/recover function with the next update. The user defined profiles still have a high priority. We made updates behind the scenes to improve stability and to fix minor issues.
    3 points
  10. Oh hey, how did I miss this topic? We might have something with lightning.pw that we can call cloud hosting. It is build for ProcessWire and we're working on new features that focus on making development easier. Unfortunately we have to fight against big problems with our FTP service and we did some minor backend improvements. Next up is the Snapshot and own Profile function, then a Dropbox integration and everything beyond is just a point on the roadmap at the moment. I just want to remark that lightning.pw is only intended for development. We don't want to handle the hosting of a real live site because. That's why we have those random names and the long domain. A migration tool between a life site and dev would be nice and might be coming in the future. _ Maybe you can find a hoster that doesn't has the "cloud" stuff in their marketing but just offers solid hosting with a snapshot functionality? I could also think, that the backup module from PW 2.5 offers a great way to "save" a site. But that doesn't help with the staging functions. Did you had a look at DigitalOcean?
    3 points
  11. New line starts after 100%. 33+33+33=99% so the next one tries to fit within that last 1%. But there is not enough space so it floats into a new visible line. Then the "real" new line starts but repeats again. This is just default CSS behavior;) Make two columns 33% and give the third one 34% to fix this. No one will notice the 1% difference.
    3 points
  12. @jmartsch The title field is actually good as you can use it as a browser title field which can differ from the page title or an ulr pathsegment etc.
    3 points
  13. As a sidenote, regarding the detection of imagefields if (! (bool) ($field->type instanceof FieldtypeImage)) continue; // the only way I know to find all image fields, also those coming in the future, is to check for the instance of FieldtypeImage, what also is true if a field extends FieldtypeImage . As of today (date of this post) we allready have those known image fieldtypes that extend the core images fieldtype: Cropimage -> (also known as Thumbnails) ImageFocusArea -> (formerly known as ImageFocusrect) ImageExtra -> ImageExtraLanguage -> CroppableImage (a fork of Cropimage, coming soon) Images section is growing!
    2 points
  14. Hi Philipp, at first, to get the original name from a variations name, you simply have to drop all after the first dot in the basename: (this works with all PW versions, 2.2, 2.3, 2.4 and also with the changed NamingScheme in PW 2.5.+) $imageName = pathinfo($variationName, PATHINFO_BASENAME); // I do not use PATHINFO_FILENAME here because this way it also matches original filenames $imageName = substr($imageName, 0, strpos($imageName, '.')) . '.' . pathinfo($variationName, PATHINFO_EXTENSION); // determines where the first dot is and drops all after that position, and simply add the extension // the only way to find all image fields, also those coming in the future, is to check for the instance of FieldtypeImage, what also is true if a field extends FieldtypeImage: foreach($page->fields as $field) { if (! (bool) ($field->type instanceof FieldtypeImage)) continue; // if no images field, go on //if (count($page->get($field->name)) == 0) continue; // this isn't needed I think because the next check with ->has() covers that case too // find the field that holds the image if (!$page->get($field->name)->has('name=' . $imageName)) continue; // if you reach this line, you have your field and your original image If you are in template scope, you may test to switch of outputformatting when asking with ->has(), or it could raise an error if the imagefield only allows a single image and doesn't return a wireArray. (I'm not sure on this, - just want to note not to forgett to test on this)
    2 points
  15. I just added a new (experimental) property 'cssBackgroundSize' to Pageimage for supporting frontend responsive images without javascript. Should be used together with background-position: cover. In my tests this worked amazingly well. The result is similar to the 'align' mode. <style> .cssimg{ background-size: cover; } </style> <div class="cssimg" style="background-position: <?= $image->cssBackgroundPosition ?>; background-image: url(<?= $image->url ?>); width:200px; height: 200px; "></div>
    2 points
  16. And besides all what @Totoff has said: regarding the german tax (Steuer, Finanzamt), it very differently handles those things. If you are 'only' working as a designer, you maybe able to write 'only' bills with MwSt 7%, but if you also do other things, like selling webspace etc. this is another business what need to take MwSt 19%. And really, you will end up with double and triple work on this (tax, finanzamt) site if you go into this hell. (And of course you need to work with a good 'steuerberater', and he will bill you the 'double', maybe.) I never have heared about something functional in regards of "making money without doing stuff". (at least not for people without some million euros/dollars, - also not for people with some million euros/dollars and with morality)
    2 points
  17. Sounds like a really great module. Will test this out. Thanks. I would use ImageFocusArea as a module name.
    2 points
  18. @interrobang: Great! I will try to test it in the next days and give some feedback. But because the issue with "upscaling = false" I'm 99% sure this is a bug in imagesizer and not in your module. It is allready filed at GitHub: https://github.com/horst-n/ProcessWire/commit/6640df43212620532bcd7c24c5936823178d3af6
    2 points
  19. Great discussion people... This is never a "one size fits all" arena. I still think the most important aspects of client relationships is bringing solid communication and enthusiasm to the table. Some web guys enjoy studying and deploying multiple systems. The question then becomes "do you need to act like a heavy Swiss Army Knife when a single sharp blade will do?" The lines between designer and developer can get quite blurry. Having both skills in solid quantities is a blessed thing for sure. I am not one of those guys. Still, I think it is better to have design, color, typography, CSS, usability and written/verbal skills than it is being a master of several complicated systems. A studio can offer clients more options due to the advantage of greater staff experience and skill levels. But what about the one man band? There is no harm in saying "I have spent a lot of time investigating all the Droomlapressengine options and have decided that Processwire is the best fit for me. Therefore if we work together it is also the best fit for you..."
    2 points
  20. 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.
    2 points
  21. Good to hear! Not really. The if, as a whole, applies to whatever is in the brackets following it. Yes, $page->sidebar is in the mix, but not as a true/false evaluation any more. So, you've got this bit; if (some-boolean-expression) { // If the expression evaluates as true do this stuff... echo "True!"; } Now you have to peel the if "onion", from the outside in, to find what's happening... if (strlen(X) > 0) : // Checks if the string length of X is greater than 0. This is the true/false decision. // Now let's peel another level and look at what X is... trim(Y) // X is the trimmed version of Y // And Y is? $page->sidebar Putting it together again, from the inside out, the if statement says... 1) Read the contents of the $page->sidebar field. (Even when this string field is empty in PW's admin page it's coming to us with length 1 after the textformatter - probably the TF adding whitespace) 2) Trim it - The trim function trims leading and trailing whitespace (amongst other things) - so now we have an empty string. 3) Measure how long the trimmed version is (Now it's 0) 4) If that length is > 0 then do this stuff (This stops us showing the empty string as the length is no longer greater than zero. You might find this, simpler, if statement works for you too... <?php if (trim($page->sidebar) != '') : ?> ...and I think that's what Soma was suggesting earlier in the thread. Hope that helps.
    2 points
  22. Hi Tom, Would it make any sense to have an option that allows you to keep the Pages sub-menu open all the time? On my installs I often have spare vertical space in the left-hand menu and having that sub-menu always open would allow single-click access to the pages tree/find/recent links. Thanks for the lovely theme regardless!
    2 points
  23. What about this: $np = $pages->clone($page); $np->of(false); $np->title = 'New Page'; $np->name = 'newpage'; $np->save();
    2 points
  24. So you've developed this shiny new website but your editors and marketing guys keep complaining they need more "native embedded content" with shiny share and retweet buttons because otherwise their text will look like ...text? Look no further: This processwire module has you covered! TextformatterOEmbed for processwire What it does At this point this module basically wraps the fabolous Essence PHP library by Félix Girault and adds some processwire magic to parse your boring Textareas and make your content look more bling blingthan ever before. Disclaimer: This Module is heavily inspired by TextFormatterVideoEmbed by the awesome guy who created processwire: RyanCramer. Requirements php 5.4+ curl and/or allow_fopen on Features Supports the following 32 providers out of the box (That's a lot of Hanna-Codes you can get rid of now, eh?): Add your own providers in the blink of an eye (if you're not good at regex - like me - it will propably take you a cup of coffee and a google search) Easy styling: Wraps embedded items with customizable BEM-Style classes including modifiers for every provider and embedtype. Choose to either add CSS directly in the modules configuration or to your existing stylesheets Choose to add pre defined Fluid Video CSS for your responsive design (or - again - feel free to add your own) Usage Click check for new modules in ProcessWire Admin Modules screen. Click install for the module labeled: "oEmbed for processwire". Install the module Open the modules Settings page Add css classes either within the "Custom CSS" field or in a seperate CSS file. Every provider is wrapped with the following markup: <div class="pw-oembed pw-oembed--providername pw-oembed--embedtype"> <div class="pw-oembed__inner pw-oembed__inner--providername pw-oembed--embedtype"></div> </div> If you're not happy with the "block" class .pw-oembed you can rename it to something you like better using the modules config. Every embedded media item and it's respective inner wrapper has two modifier classes: One for the provider (i.e. youtube, twitter...) and one for the media type (one of photo, video, link or rich according to the OEmbed specification). This should be enough classes to add some fancy icons, adjust widths per provider or whatever else you like to do. If you're missing a provider don't hesitate to open a pull request (see roadmap first) and I'll do my best to add it as soon as possible. In the meantime you can extend the available providers found in lib/essence/providers.php in the modules settings using the following JSON-Format (remember that you'll have to properly escape the regex): [{ "23hq" : { "class" : "OEmbed", "filter" : "#23hq\\.com/.+/photo/.+#i", "endpoint" :"http://www.23hq.com/23/oembed?format=json&url=%s" } }] Roadmap Add moaaar providers:Facebook (currently not providing a "native" oEmbed API) Google Plus (currently not providing a "native" oEmbed API) support for more fancy integration of Instagram posts (currently there are "just" images without fancy sharing stuff that will be embedded) Render only one javascript (i.e. ) when there are multiple items of the same provider Propably make this module more generic and add services as submodules at some point World domination
    1 point
  25. Hi Guys! Earlier last week I was asking about Linode here.I was reading up on how to setup a Linode and was going to sign up. But whilst searching on Google, something caught my eye.... Digital Ocean. 20GB SSD 512MB Memory. https://www.digitalocean.com/ I signed up and it's been great playing around with my first box! They take paypal and so I just popped in $10 dollars and this will of course let me play for a couple of months. What a perfect way to learn! I installed Ubuntu 12.04 as this was what diogo suggested to me in the Linode thread and to give you an idea of what resources Digital Ocean offer, I've gotten this great Ubuntu listing link to give you an idea of what you can do / have some hand holding with... https://www.digitalocean.com/community/community_tags/ubuntu Hope this helps someone! Cheers guys!
    1 point
  26. Hi everyone, I'm glag to introduce pierre-diagnostic.fr. This is the corporate website for a french real estate services agency. It was built with Processwire 2.5.3 and the following modules : AIOM ProcessBatcher Zurb Foundation 5 (wich is a delight to work with) Go Processwire!
    1 point
  27. I am working with a designer who's experience lies mostly in print. So, I have written a document explaining the fundamentals of modern adaptive web development. This is not a technical manual, but rather looking at what needs to be considered by the creative designer when coming up with something that a developer can deal with well. Since we have a good assortment of multi-disciplined souls here, would a few of you care to read it and suggest anything I perhaps should add, without making it heavier or much longer? Some of you may find this useful for your own purposes too and you are very welcome to use it. UPDATE I have done a new draft, removing the adaptive idea which kind of got lost as I wrote - the trials of writing an essay off the top of my head with no planning whatsoever! Silly me. It is now called Responsive Websites UPDATE 2 Cleaned up version - the chat about flat icons is now shoved at the end as an after thought Responsive Websites 2.pdf
    1 point
  28. +1 Or - alternatively - it could open on mouse-over. +1
    1 point
  29. +1 ImageFocusArea if you drag the area outside of the modal window it will close the modal. maybe you can handle this? besides that, cool module/idea. looks promising!
    1 point
  30. My goodness, I was so caught up in the db side of things that I completely forgot to think about approaching this through the API!! This alleviates having to keep track of the auto increments in mySql - awesome! I love this forum and this API! Thanks for your input sforsman! I feel much more confident with this approach than my previous ideas. Very simple and elegant, no wonder I overlooked it! I have a tendency of doing things the hard way, . I'm going to write the hooks for this tomorrow when I'm back @ work and see how things pan out. BTW, have you had the opportunity to try both Tungsten and Symmetricds? What's your opinion on Tungsten in comparison to Symmetricds?
    1 point
  31. Wow, thanks for the long answer! I think if you prepare the site and examples Adrian (if he wants to) and I can make something good out of it
    1 point
  32. I recommend a hosting company or I just go with what they have (if it is sufficient of course) and then I help them to set it up (better: set it up for them). But - and that's the difference that matters - I'm not the hosting company. I'm just a person offering a service to them, but I'm not responsible for say a secure server or whatever. That's the hosting company's responsibility.
    1 point
  33. +1 for ImageFocusArea
    1 point
  34. @horst: Thanks for the info and fix. I just tested your fixed ImageSizer, and now everything looks like expected! @all: Which module name do you prefer for field? Before putting this to the module directory I will likely rename this module. ImageFocusrect ImageFocusArea ImageCroppingArea ImageSoftCrop FocusImage anything else? -- Edit: Thanks for your feedback. I renamed the module to ImageFocusArea
    1 point
  35. You don't need imagemagick to do watermarks. horst has an amazing module that can do it for you via GD which is part of PHP: http://modules.processwire.com/modules/page-image-manipulator/ If you do want to use imagemagick, I would suggest the pecl imagick extension (http://pecl.php.net/package/imagick) - it can handle almost everything that imagemagick can handle and allows you to do it directly from php, rather than via exec system calls.
    1 point
  36. This with the Textareas in COnfigurable Modules I have tracked down to this line: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/InputfieldWrapper.php#L300 Before this line the content of $ffout looks like: "\n<textarea id=\"Inputfield_textarea-value\" class=\"InputfieldMaxWidth\" name=\"textarea-value\" rows=\"5\">line one\r\nline two\r\nline three\r\n</textarea>" and after processing the preg_replace, $ffout holds "\n\t\t\t<textarea id=\"Inputfield_textarea-value\" class=\"InputfieldMaxWidth\" name=\"textarea-value\" rows=\"5\">line one\r\nline two\r\nline three\r\n\t\t\t</textarea>" I have filed an issue at GitHub: https://github.com/ryancramerdesign/ProcessWire/issues/759
    1 point
  37. That's great. Logs in first time. I don't need nca proof passwords for this site and if it got sent or intercepted by email I don't think there's too much damage that could be done anyway. Awesome module
    1 point
  38. Hitting these kinds of roadblocks makes you better in the long run. At some point you'll never forget that when file or image fields are set to allow more then 1 file/image, you'll have to iterate over them because they are a WireArray. Or use a method like adrian showed. Also, this concept is explained at the start of the images documentation you referred to. One of the most common sources of confusion here on the forums .
    1 point
  39. <?php $graduates = $pages->find("template=graduate-detail, sort=-date"); foreach ($graduates as $graduate) { echo " <img src='{$graduate->graduate_photo->first()->url}' /> <h3>{$graduate->title}</h3> {$graduate->graduate_summary}<br/> <a href='{$graduate->url}'>Read more</a> <hr/> "; } ?>
    1 point
  40. I just copied and pasted your code into a test template on a page with a sidebar field of type textarea, and it works as expected. If the field is empty nothing is being output. Are you sure that there is not some stray whitespace or another invisible character in your sidebar field? Maybe check html view, or even in database. I don't have experience with the modules you mention but i don't think they would be causing this.
    1 point
  41. Hi Nico Currently lots of people are actually switching from TYPO3 to other CMS and IMHO this will be also be the case in future as they simply made to many codebreaking changes to extensions where they kept the name, but after updates your complete site was blank etc. So people get frustrated. Like us too by the way. We were looking long time for another CMS which has most or evenmore benefits than TYPO3 and I ampretty sure we found it in Processwire. it is faster very modularized multidomain capable (i.e. we made a site for 400 churches in one TYPO3 - and they now need to update from TYPO3 4.5 to 6.2.6 and are also not happy that many things no more work like before) multilingual and has multilingual SEO (if you adjust your module which you just released - it's great thanks) you can have profiles and very easy backups of your sites and profiles using the profile exporter (a think that was missing in TYPO3 all those years!) the core is separate and it can be updated much easier than in TYPO3 In TYPO3 6.2 you can now create profiles and import them >>> IMHO one way to build a migrator to processwire! and to move customers over, another way is the .t3d export of complete branches or only single pages. It is an internal format for TYPO3 where you can afterwards all data back into another TYPO3 page. Also this could be a great way to use for an importer from TYPO3 to Processwire as it imports all kind of data and files and relations. -- Like said we have lots of customers and usually they ask us to build a TYPO3 website (since 2002 we are doing that) but meanwhile we suggest that they switch toprocesswire. The main problem for all those companies and people is that they ran their sites often in TYPO3 for many many years and are now afraid that it will be very difficult to import their current site data from TYPO3 to processwire. If there would be an importer like your wordpress importer than it would be quite easy to switch customers to processwire. Another 2 problems - (need to discuss that in another thread) is the flexible templating for editors what is available in TYPO3 and now wordpress and drupal but still not in Processwire. and the Digital Asset management which id great in TYPO3 as you can integrate dropbox, googledrive using a File Abstraction Layer and the build in fileadmin is great to with his Meta Data management (similar to DAM). Those things are still missing Processwire but I hope that the Gallery Extension will be released soon as it looks great. Let's see. The biggest hurdle to convert customers from TYPO3 to Processwire is actually their data. When I did the coding of the UNESCO Bangkok website 2007-2010 they had about 550 pages with 16.000 Content Elements and 25.000 Digital Assets (in DAM Digital Asset Manager). East West Center (2008-2010) was very similar to that, but had additionally lots of user data coming from their editors and every day lots of news articles and their categories and tags and their specific permissions. This site was also TYPO3 and is now Drupal (also done with an importer to Drupal by Srijan Technology a former TYPO3 and now Drupal supporter) - http://www.srijan.net/work/typo3-drupal-east-west-center/ Those are sites we name here only as an example as we had worked before with it, but to be able to convert those sites incl their user rights management to processwire would open up very new perspectives to Processwire. This is Enterprise Level! Beside this of course there are tons Universities, NGOs, Schools, Governmental, SME and lots of small TYPO3 websites which meanwhile often complain that TYPO3 in Version 6.2 is to slow, getting to instable and that with each new update you don't know if your site perhaps will turn blank/will be inaccessible. In other words NOW is the right time to crack that nut and convert more and more of the still existing customers to Processwire. A module which would do that would be just ideal for that purpose. Perhaps you can "reconstruct it" ;-) even it's already 2 years ago you did give it a try. Perhaps those two links canhelp you to get such a module done: https://www.drupal.org/project/migrate https://www.drupal.org/project/typo3_migrate https://www.drupal.org/node/1188446 Similar to the processwire approach they are using a general Module and a CMS specific (in this case TYPO3) module the latest update is 2013-Oct-19
    1 point
  42. I can set the user timezone with date_default_timezone_set. It is important to set it before my form gets rendered, submitted and processed, not just before I save values. The current time in my date field gets calculated based on the set time zone. Example: set timezone Europe/Berlin, current date set timezone America/New_York, current date When PW saves publishing timestamps, I get timestamps for 2014-10-24 03:00 Europe/Berlin: 1414112400 America/New_York: 1414134000 Which is 21600 seconds or 6 hours off. Which is correct. So I think I'm on the right track now handling different timezones.
    1 point
  43. @MindFull: Thanks for the updated info, it was enlightening. Is the VPN down more often than their Internet-connection? The reasons behind these questions is that if you need 10+ masters, I would suggest a technique Flickr, for an example, uses. You can actually check their post about it here: http://code.flickr.net/2010/02/08/ticket-servers-distributed-unique-primary-keys-on-the-cheap/ - it's a really simple method If only the VPN-downtime is a problem, you could consider running the ticket-servers on the Internet. If things cannot be reliant on the Internet-connection either, then in my opinion, the simplest solution would be using the same method described in the article above, but just using it locally. Either way, such implementation would require hooking to the saving of new pages and just prefixing all IDs with a prefix assigned for each of the PW-instances (read from the site's wire('config') for an example). A three digit prefix would probably be enough to cover all of the customer's expansion needs (forever). Just an example Corporate instance 1: 100 + <local ticket ID> Corporate instance 2: 101 + <local ticket ID> Branch instance 1: 200 + <local ticket ID> Branch instance 2: 201 + <local ticket ID> ...and so on. This would work without any hacks to PW, because you are allowed to set the ID for new pages. UML, urgh, I feel you there!
    1 point
  44. @apeisa Can't wait to see your pw e-commerce solution. I am a little confused how it will be released or in what format. Will some of the modules still be open sourced or will they all be bundled together now under a single site licence? Have you considered releasing the shop module/modules in a similar format to others such as woocommerce whereby the basic shop plugin is open source and free with then optional paid extensions (commercial plugins)?
    1 point
  45. Take a look at Soma's gist. It loops through all the fields of your page and displays a form. Then on Submit of the form it again loops through each field and saves the value. It also includes all styles and scripts that you need for your form to work on the frontend. This is working great for my frontend form. If you need help implementing it, let us know.
    1 point
  46. Just a pointer for those interested in why the first() method that diogo mentioned solved this; if you look at your page field "food_types" and switch to the details tab, you probably have the first option selected, like this... ...which is setup to return an array of pages, even if that array only has a single page in it. Now that's why you need to call first() as you need to select a page from the array that $page->food_types was returning. /** * Examples for a page field setup to return an array of pages... */ echo $page->food_types; // This won't work for an array return as you haven't drilled down to a page entry yet. $p = $page->food_types->first(); // Ah, now $p holds a page. echo $p->title; // And now we can show the title. echo $page->food_types->first()->title; // This works too, no need to assign to a variable if we don't want to. You stated in your opening post that food_types only has one page selected... Now look at the other two options for your page field in the screen shot. Both of those options return a single value when the page field is referenced. If you had picked either of those two options then your code would have worked as you'd have been given a page (or 'false' or a NullPage) directly without having to fish it out of an array. Anyway, hope that helps explain things a little more.
    1 point
  47. There are days where I get a huge great, miserable reminder than I am a composer/writer/advertising bloke, and not a sysadmin, coder or expert anything. Warning: if some bright spark has a solution for this, don't tell me - its too late. Having had a couple of odd problems I decided that I really ought to update php on my little Ubuntu dev box. It is 12.04 with Webmin installed. Turns out that this is not very easy to do - generally, the Ubuntu repositories only let you install the php that comes with your distribution - 12.04 only comes with 5.3. However, I found a neat little tutorial that added a repository so that you can upgrade - it is maintained by some of the debian folk. So, I went and did that. Trouble is, it also went and updated Apache to 2.4 (much to my surprise) and everything went wrong. First of all, Apache wouldn't start. It was complaining about everything. I spent 2 hours reading posts from everywhere and nothing worked. So, I uninstalled it, purged it and reinstalled it. Yep, it started! Except now, it would not recognise ANY of the virtual hosts. I started reading again. I tried creating new hosts in Virtualmin, but Apache did not want to know. I tried manually - still not interested. I read every post out there and tried every trick - but the things they said would be definitely wrong were fine, except the working thing. I tried a couple of other things which included restarting apache. Guess what? It wouldn't start again - gave off the same errors. I had backed up all my sites with Virtualmin, so I tried restoring them to see if I could force it to work. Nothing. So, I have found myself staring at a development server that isn't - serving that is. And, what is more, my meagre knowledge has simply run out, as has my patience. So, I have just double backed up everything - files, MySQL and the rest and I have just downloaded a new ISO of Ubuntu. And with that, I am going to reinstall the entire thing, format all the crap away into PBS Telethon, sort out some partitioning woes I had in the process (my old boot partition was too small, really) and start from scratch. It is not clever, it is not educational and it is a sledgehammer solution - but when you are not the Demon Sysadmin of Fleet Street, sledgehammers might be all you have left.
    1 point
  48. I'm giving out an implementation which you can use while Ryan is considering this matter. It's based on Ryan's FieldtypeFloat and InputfieldFloat and it should cover all the basics. cd <pw_modules_directory> git clone https://github.com/sforsman/FieldtypeDecimal.git git clone https://github.com/sforsman/InputfieldDecimal.git To actually use them, you obviously need to tell PW to scan for new modules and then install them. Couple of notes Since the precision needs to be defined on the database-level, this module hooks ProcessField::fieldSaved and updates the database if you have changed the precision settings. You get a notification if it's been done. Be aware, if you decrease the precision you will obviously loose those decimals forever after the save - the database is immediteally and always modified. I don't consider this ugly because this is mandatory - one way or another. Due to the implementation of the DECIMAL type in MySQL, it's not possible to choose such default values that would be optimal for all of the different scenarios. Along with a dot, I prefer to accept decimals with a comma as well. This is because many humans separate them with a comma. As with InputfieldFloat, you can define the range of the values the InputfieldDecimal will accept. If you have a precision math library installed, the module will use it when doing the comparison. This will rarely make a difference but hey, what the heck. To be consistent as to how the DECIMAL type is created in MySQL, the digits-parameter refers to the the total number of digits - including the decimal parts (5.55 has three digits and two decimals). There's a few known "issues" (I prefer to call them "features", though)The min/max configuration Inputfields are still using InputfieldFloat. This means you need to separate decimals in your min/max range with a dot. The sanitizer currently uses is_numeric() to check the value, which means you can enter some weird stuff (like 0x539) and it's sent to the database. However MySQL obviously ignores such values and stores 0 for you. This should be improved later. The Fieldtype doesn't do much to the values and relies on MySQL to handle the necessary rounding etc. This is good in my opinion. However this also means that if you have set the precision to "2" and enter a value that doesn't have any decimals (e.g. "5"), MySQL will add the decimals (the DECIMAL type is afterall an exact fixed-point type) and that's what you will see after you have saved your value (e.g. "5.00") . Again, I consider this a good thing. Like InputfieldFloat, the InputfieldDecimal doesn't do any validation on the data - invalid values are just blanked. As I have intentionally hooked only ProcessField::fieldSaved, you need to manually either a) call $field->type->syncSchema() or b) hook Fields::save yourself if you are modifying the precision of a field through the API. Oh and I'm open to any ideas - at least regarding these modules.
    1 point
  49. There is a little overhead in using this module since it has to parse through the abstractions and translate them to/from URLs. There's also the aspect of being unable to stop using the module once you start (since abstracts get stored rather than URLs). As a result, I think it's best not to use this module and instead just do a search/replace on your SQL dump before you migrate it from a subdirectory install to a root install. Though I am hoping to have a native/core solution for this particular issue before long.
    1 point
  50. Works with many to many too. $prs = $pages->find("title=Zoo|Theme park|Museum"); // maybe also use the name or id $poi = $pages->find("template=poi, poi_type=$prs"); EDIT: corrected code. yours doesn't work because "get" will return only 1 page and not page array.
    1 point
×
×
  • Create New...