Jump to content

Leaderboard

Popular Content

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

  1. WireMailBranding Add email templates to wireMail From this: $mail->bodyHTML("<h1>Hello</h1><p>I'm WireMailBranding</p>"); To this: (or whatever template you create) How it works? Create an email template without content. On the spot where you wish to have your content place the tag {bodyHTML}.The markup you've set with $mail->bodyHTML('<p>Markup</p>'); will replace that tag. You could set the defaults in the Module configuration or set the properties with the API. (See below) The API will overwrite the default settings $mail = wireMail(); $mail->to('user@some-domain.ext')->from('you@own-domain.ext'); $mail->subject('Mail Subject'); // Set path to template (overwrites default settings) $mail->template('/site/templates/template_wrapper.php'); // Enable/Overwrite the Emogrifier CSS inliner. (0, bodyHTML, wrapper) $mail->inlineCSS('bodyHTML'); $mail->bodyHTML('<p>This paragraph will replace the {bodyHTML} tag in the mail template.</p>'); $mail->send(); CSS inliner We have added the beautiful css inliner Emogrifier to inline the CSS styles. When using the Emogrifier CSS inliner applying it on the bodyHTML only is the most efficient way. We recommend you to write the inline styles for the wrapper manually. The module is sponsored by Calago.nl. Thanks guys ! Updates 0.1.2 Bug fixes : - Fixed redeclare Emogrifier bug. Improvement - Added error logging for Emogrifier - Added inputfield error for the lack of PHP's mbstring in the module configuration. - Some code cleaning and other cosmetics 0.1.3 Bug fixes : - Fixed bug when module couldn't grab bodyHTML (resulted in doing nothing at all). GitHub https://github.com/Da-Fecto/WireMailBranding Modules directory http://modules.processwire.com/modules/wire-mail-branding/
    12 points
  2. AvbImage - Image Manipulator Module for ProcessWire This module using Intervention Image PHP image handling and manipulation library. Update Status Module and InterventionImage Library update - 10-12-2015 More performance imporements - 18-11-2015 Module Update and Performance Improvements - 17-11-2015 First Commit - 28-10-2015 RequirementsProcessWire >= 2.5.11 PHP >=5.4 Fileinfo Extension Supported Image LibrariesGD Library (>=2.0) Imagick PHP extension (>=6.5.7) For usage and methods please look githup repo : README.md > For issues and fix and corrections please use Githup Repo
    6 points
  3. It's actually quite simple once you get the hang of it. For one, it's far less scripting in coparison to Grunt/Gulp. Right now, my NPM config for my own site in development is this: { "name": "FoundryAssetsPackage", "preferGlobal": true, "private": true, "devDependencies": { "rimraf": "latest", "mkdirp": "latest", "less": "latest", "uglifyjs": "latest", "watch-cli": "latest", "jshint": "latest" }, "scripts": { "clean": "rimraf build/* && mkdirp build/ecma build/css", "prebuild": "npm run clean", "less": "lessc --clean-css src/less/main.less build/css/main.css", "ecma:lint": "jshint src/ecma/site.js", "ecma:packages": "uglifyjs src/ecma/packages.js -o build/ecma/packages.min.js -cm --comments", "ecma:site": "uglifyjs src/ecma/site.js -o build/ecma/site.min.js -cm --comments", "tasks": "npm run less && npm run ecma:packages && npm run ecma:site", "build": "npm run tasks", "watch:less": "watch \"-p src/less/**\" -c \"npm run less\"", "watch:ecma": "watch \"-p src/ecma/**\" -c \"npm run ecma:packages && npm run ecma:site\"", "watch:all": "watch \"-p src/**\" -c \"npm run build\"", "all": "npm run build && npm run watch:all" } } As soon as you understand how to use a terminal, understanding the above is quite simple.
    4 points
  4. Perhaps something with "vanilla"/pure javascript and/or velocity.js (which can be used with or without jquery). I've just found https://github.com/mmonkey/fireSlider There are certainly many others. NB: for other things, I've also found http://darsa.in/sly/
    2 points
  5. you would need to instantiate the class first, e.g. call the module into an object: $rss = $modules->get("MarkupRSS");
    2 points
  6. Hi Frangoo, Nameservers decide where the DNS is hosted. The DNS is like a highway interchange with signs "www.domain.com" that lead to different exits. For example you can have "helpdesk.domain.com" go to a completely different server. Changing the nameservers means you hold the DNS and you can decide where these exits go, in your case your server. As you may know servers all run off an IP this may look something like 192.168.0.1 all a domain does is mask that. For example www.domain.com = 192.168.0.1, helpdesk.domain.com = 192.168.0.2. In your case nameservers may not actually be the way to go because he may have emails hosted else where. These are known as MX records and they are part of the DNS. Changing DNS can get rid of these records and cause his emails to stop working. Scary I know. However it's not much a problem at all. What you need to do is let them host the DNS as normal, but change the "exit" to your server. To do this you need to login to where their domain is hosted, go to the DNS and change the A record "@" or "*" (These are root/wildcard records) to your server IP and change "www" to your server IP. This will give you the results you are after Actually messing around with the .htaccess file to do this is more complicated.
    2 points
  7. You can also do a var_dump($event); die(); in the module to see its content or use $event->return or $event->arguments if $event alone does not work
    2 points
  8. $event is the HookEvent object, that's passed into each hooked function. It holds all the information needed about the hooked function, arguments, objects, return values and so on.
    2 points
  9. I'd planned on using Brunch at some point, but I feel that it is too 'automagical' for my needs. I see that it is indeed really quick, but that's not necessarily a selling point for me. And yeah, I can see how it can become confusing - even the starting from scratch docs are kinda weird. Right now, I'm not using a specific build tool - just using npm to build my assets.
    2 points
  10. I will share a little texformatter from a actual project for a client. In my former CMS i had an easy addon where i could preset terms like in a glossary that will replaced in the Wysiwyg fields on every page. So there are solutions that i know but the all work not that easy like my former used addon. The title of the glossary_item is used for the termsearch. This textformatter search for terms in ||termexample|| or ||example term|| and replace them complete. If a term was in ||pipes|| and there was no hit in the glossary entries the pipes will deleted from the term and only the clean value will returned. So no room for wrong user entries like if i used HannCode or something else. This is great for abbreviations, external- and internal links and could extended for every possible replacement that makes sense like footnotes and so on. I like the pages concept for content and so i use pages for glossary and simple replacement where a user wanna have it. No autolinking without control, easy use pipes on abbreviations and links and it simple works. Some explanations from the Github Readme: Setup You have to use a pagestructure for the glossary items holder Page for entries template "glossary" glossary items template "glossary_item" The type of a glossary item could be a abbreviation, a external or internal link. Everything you need could added to the textformatter like more complex stuff, footnotes or other replacements. Why? There are working solutions like the great module from Ryan Cramer Autolink in the Profields https://processwire.com/api/modules/profields/autolinks/ But here Users don't could setup easy the terms to replace - this is only ment for webmasters or admins. There are a module for abbreviations from sunlix https://processwire.com/talk/topic/7467-module-processabbreviate/ But here i only have options for abbreviations and i couln't easy add stuff or replacments i need. Links Github: https://github.com/mr-fan/TextformatterGlossary Example Templates for Import: https://github.com/mr-fan/TextformatterGlossary/blob/master/template-examples.json Best regards mr-fan
    1 point
  11. hi everyone, i'm happy to share my first little module that could have broader use... use at your own risk! i'm quite new to module development Usage Just install the module and place your preview images in the folder /site/templates/TemplatePreviewImages filename = template-name.png Github https://github.com/BernhardBaumrock/TemplatePreviewImages Notes jquery image picker used in this module (MIT license): http://rvera.github.io/image-picker/ Room for improvement / roadmap: Images are resized via CSS (height: 200px) Images could be placed via masonry or the like create image-field to upload preview images directly to the template looking forward to hearing your feedback ps: is it intentional that i am only allowed to choose from 2 templates when adding the page and have more options available when editing the template settings of the page like you can see in the video? i'm wondering why this should be like this?!
    1 point
  12. Hey, as I often just copy someone else's (sometimes my own) modules structure as a starting point for a new module I thought there has to be a better way to archive that. That's why I created the "ProcessWire Module Generator": modules.pw If something missing? Or some more wishes for options or best practices? Let me know Here's a screenshot:
    1 point
  13. You have to search for CKEEditor using own styles so you can set the CSS classes in your mystyles.js needed and use it via the RTE field after inserting a image: example: CKEDITOR.stylesSet.add( 'mystyles', [ //images { name : 'Image left' , element : 'img', attributes : { 'class' : 'thumbnail align_left' } }, { name : 'Image right' , element : 'img', attributes : { 'class' : 'thumbnail align_right' } }, or you chould search for a module that is named ImageInterceptor so you have control over inserted images and not the user. regards mr-fan
    1 point
  14. That's fine, but those folders should never be part of an url (besides for assets), no matter how you configure the .htaccess.
    1 point
  15. I could indeed do that, but I have already implemented a templating system which gives flexibility in terms of defining plain and rich templates. Inlining CSS (as opposed to prepending a stylesheet) is a great thing for email templates, as it ensures client compatiability. So I'd like to include that specific class in SimpleForms. That said, I could look into providing the option of using your module in SimpleForms, provided it is installed. Will look into this soon. (Side note: Development of SimpleForms (and the new Jumplinks) is paused at the moment as I cannot dedicate enough time in my day to working on it. Hope to start again soon - it is still fresh in my mind.)
    1 point
  16. Thanks a lot for sharing Mike. Very tempting to forget brunch and try the above...
    1 point
  17. The site folder should not show up in any urls besides if you put the whole processwire installation in such a folder.
    1 point
  18. Hi Tom, thanks for that detailed answer!! *+1* I got it But before I go to bother my customer: Does it really help me with the problem of the showing browser-urls? I can point the "exit" of DNS of course to my server, e.g. "my-domain.com/project/cms/", but than, if I understood it correct, I will still have the "site"-folder in my links of PW, right? Plus the internal links and file-links will have the "site" as well.... arggh... I am confused :-S So sorry to bother you again!!
    1 point
  19. Hooks... http://processwire.com/api/hooks/
    1 point
  20. hi roman, welcome to the forum sorry i forgot to update the description after updating the module to version 2!
    1 point
  21. I always use slick and I don't know how the heck I didn't think about it first!!! By far one of my favourites, now that I read correctly it does say "the last carousel you will ever need", I always use it as a slider, maybe that's why it didn't cross my mind, damn, some useful time lost yesterday and today
    1 point
  22. Great module - I love it! But I had difficulties at the beginning display to the images. When I looked into the source code, i noticed that you are looking at line 69 in the folder /site/templates for the preview images and not as stated in the description in the module folder /site/modules/TemplatePreviewImages. I changed the code line in 69 $src = $this->config->urls->templates . $this->className . '/' . $tpl->name . '.png'; to $src = $this->config->urls->templates . 'img/preview/' . $tpl->name . '.png'; and now i can store the images in the folder templates/img/preview.
    1 point
  23. i offered msummers to take a look at his files and i think i got everything working. thats what i did: did a clean 2.3 installation copied the old site-folder to the new installation (overwrote existing files) replaced the database looked up admin url (db table "pages" id = 2 showed "sample" so admin url was example.com/sample/ ) find out username of superuser and reset password $admin = $users->get(41); $admin->setOutputFormatting(false); $admin->pass = 'admin'; // put in your new password $admin->save(); echo $admin->name; die(); backup working 2.3.0 site (files+db) copied ProcessWireUpgrade to modules folder and installed it... error: Error: Cannot call constructor (line 85 of /var/www/html/site/modules/ProcessWireUpgrade/ProcessWireUpgrade.module) renamed wire -> wire2.3.0 index.php -> index2.3.0.php .htaccess -> .htaccess2.3.0 downloaded pw 2.6.1 and put into old site: wire index.php .htaccess installed processwireupgrade module installed site profile exporter and exported 2.6.1 site profile with data from old page old version had a custom admin - don't know how/where to activate this in 2.6.1 as it shows the standard admin again. have no more time to investigate further, sorry.
    1 point
  24. Independent if the backup is created manually or via cron job - same result. Best regards
    1 point
  25. I think it does look more modern than the previous site! It took me a while to "find" that there was a menu bar after scrolling a bit, I don't know if contrast is the issue, or maybe the thin fonts. Code it live in livecoding.tv! I'm kind of planning doing that with my own site (this related to other thread), as you said, it's a pain to "be happy" with your own work.
    1 point
  26. This was going to be a topic for next weeks blog post, but maybe better here so I definitely welcome any feedback. The biggest factor is that PW is as much of an application framework as it is a CMS, even more so in PW 3.x. We can't be taken seriously as a framework on GPL v2. So we need to start licensing it like a framework, otherwise we risk projects excluding us on that basis. For instance, most frameworks (like Laravel) are licensed under MIT, as is jQuery. There's no plan for a commercial version of ProcessWire. I've already been there, that was Dictator CMS and ProcessWire 1.0, and not going back. We're wanting to go more open in order to gain wider adoption for the product, as well as just do the right thing for the community and best support the projects they build with PW. Following the old legacy CMS projects on license seemed to be a safe way to start, but now we seem to be the only new player using a license that preceded the existence of CMSs. So another factor is that, as we grow, that has been leaving too much ambiguity about where and how folks can use PW, and I'm aware of a recent big project that wanted to, but didn't use PW for that reason. I'm tired of that ambiguity and having to outline our interpretation, and what PW is and isn't. I'd rather the license did that for us and made people feel comfortable about using PW even if they don't totally understand what the product is. People that don't understand what PW is might interpret the license in such a way that they think anything they develop in PW (like their own web sites, templates and modules) has to also be GPL v2. This is false, and I'd like to get rid of that ambiguity. The MIT license is the most open and simple one, which I really like. But we've got a couple components (notably CKEditor) that won't work with that. So my thought was to make most of the PW framework MIT, but use MPL 2.0 for the bigger picture. The MPL 2.0 (Mozilla Public License) is a modern license that enables us to support much of the spirit of MIT while also being compatible with existing components like CKE. In terms of openness it sits in between MIT and GPL. From a framework perspective, it still lets you link any part of PW with applications under other licenses, which is what a framework must support. Under GPL we are only able support that linking with other code via modules and templates (the components PW is specifically designed to run) and that's just not enough to be taken seriously as a framework. There are other licenses like LGPL that might let us accomplish this too, but I still find LGPL too ambiguous for my taste, whereas MIT and MPL 2.0 seem to outline exactly what we're trying to accomplish as both a framework and CMS.
    1 point
  27. Update: Blog Version 2.3.5 (dev branch only for now) Changes Fixed issue of slow loading dashboards on sites with lots of posts. Added some missing translation strings, thanks @mr-fan. Decluttered modal window, thanks @mr-fan. Some code optimisations. I don't think there are any other pending issues. Apologies it took so long to get to this update; we got there in the end
    1 point
  28. @quickjeff...his Blog install got messed up by an x-debug limitation so he needed to reinstall. He was caught between a rock and a hard place and couldn't use the 'cleanup feature' since Blog didn't finish installing due to the x-debug thing.
    1 point
  29. Continuing from my previous post in this thread about some selector enhancements available on the dev branch, we've got a couple more advanced options for use in selectors in case anyone is interested: OR-groups These let you specify multiple expressions and only one of them has to match in order for the selector to match. It's a way of saying "either this has to match OR that has to match". This is useful because selectors always assumed AND – meaning everything has to match. While you have always been able to use the pipe "|" to specify ORs for fields or values or both, the scope of it was just that field=value statement only. Now we have something new called OR-groups. These let you create multiple selector groups and only one of them has to match. You can specify OR-groups by surrounding selectors in parenthesis. An example demonstrates it best. Lets say that we wanted to find all "product" pages that were in stock, and either in a featured date range, or had a highlighted checkbox checked. Previously we would do like this with two separate find operations: $items = $pages->find("template=product, stock>0, featured_from<=today, featured_to>=today"); $items->add($pages->find("template=product, stock>0, highlighted=1")); Now we can do it in one find operation: $items = $pages->find("template=product, stock>0, (featured_from<=today, featured_to>=today), (highlighted=1)"); Above are two selectors surrounded in parenthesis. Only one of them has to match. You can specify as many of them as you want. This type of OR expression is something you couldn't previously do with selectors. Think of the parenthesis as a way of saying "this is optional". But of course, at least one of your parenthesized selectors has to match in order for the full selector to match. I'm guessing the above usage probably covers 99% of the situations where you might need it. But lets say that you want to have different combinations of OR expressions. You can create named groups that OR with each-other by specifying: foo=(selector1), bar=(selector2), foo=(selector3), bar=(selector4) In the above you'd replace "foo" and "bar" with names of your choice. And you'd replace the "selector" with any selector strings. Those foo/bar names aren't referring to fields, instead they are just named groups that you can name however you want. In that selector, at least one of the "foo" named selectors would have to match, and at least one of the "bar" named selectors would have to match. If you didn't use the foo/bar named groups here (but still used the parenthesis), then only one of the 4 selectors would be required to match. Sub-selectors Some of you are already familiar with these because it was committed to the dev branch a couple weeks ago (and I think may have been outlined elsewhere in the forums). Sub-selectors let you put a selector within a selector, enabling you to perform more complex matches that used to require you to use separate API calls. These can be used on the 'id' property of any field that maps to a page. The 'id' property is assumed when referring to a page reference or a parent, so it's not necessary to specify it unless you want to, i.e. "field" and "field.id" mean the same thing in this case. Sub-selectors are specified between [square brackets]. For example, lets say we are matching products and our product template has a "company" page field. Each company also has it's own page field where all the company locations are identified. Lets say we want to find all products that are made by a company that has more than 5 locations and at least one of those locations has "Finland" in the title. Previously we would have had to do it like this: $companies = $pages->find("template=company, locations>5, locations.title%=Finland"); $items = $pages->find("template=product, company=$companies"); That's easy enough. But now it's even simpler, as you can do it in one operation: $items = $pages->find("template=product, company=[locations>5, locations.title%=Finland]"); When you've got a "field=[value]" selector, any properties you refer to in "[value]" assume the "field", so "locations" above is referring to a property of the "company" field.
    1 point
  30. put this into one of your templates and you can see the admin url and login: echo '<a href="'.$pages->get(2)->url.'">this way to the admin</a>'; found here: http://processwire.com/talk/topic/4491-unable-to-log-into-processwire-website/?p=44323
    1 point
×
×
  • Create New...