Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/21/2015 in all areas

  1. Turn on config advanced mode, create template and select fieldgroup from another templates fieldgroup to share the fields but have a new template.
    8 points
  2. You probably know both already, so perhaps you're looking for less well known alternatives, but I'd still suggest looking into Amazon CloudFront and/or CloudFlare. Big players have their benefits, and these guys can definitely "handle a lot of traffic"
    3 points
  3. I think since you can't unpublish users, Users find will find all anyway. $users->find("your selector here", $options = array("findAll" => false));
    2 points
  4. I'm keeping an eye on Flarum lately. Early days, but looking promising for simpler needs.
    2 points
  5. You have to help PHPStorm to recognize ProcessWires API vars by including a PHPDoc section in your template file. I created a gist for you which includes all (?) available API vars, simply paste this in your template file: https://gist.github.com/phlppschrr/ea81285bdf56b497193b To get even better autocompletion I can recommend the TemplateStubs module
    2 points
  6. Interesting. I found this a few days ago: https://sandstorm.io/ https://sandstorm.io/apps/:
    2 points
  7. Update: Latest release and documentation is available here: https://github.com/rolandtoth/FrontEndEditLightbox Modules directory: http://modules.processwire.com/modules/front-end-edit-lightbox/ ----------------------------------------------- Just implemented my front-end edit feature, minimal style I know there's many other solution to this but I tried making something much simpler to implement. The result is one JavaScript snippet - no css, external js dependency, module, etc. It uses the admin's Magnific Popup because it's always at hand and works just fine. The page automatically reloads on closing the lightbox, but only if the page was saved (via localStorage). You can also list jQuery selectors to hide items in the admin (see "selectorsToHide"). Usage Add the edit link to your template file (see code below) and copy the following to your main .js file.
    1 point
  8. http://mnt.io/P/2015-07-13_sabre-katana_a_contact_calendar_task_list_and_file_server.html https://github.com/fruux/sabre-katana Thought you guys might be interested in this.
    1 point
  9. You could escape the values with 'htmlentities' — either manually or automatically via custom TextFormatter. --- Edit: Or it's possibly something else; I've just $cache->saved an array with string with acute in it and had no problems.
    1 point
  10. Hmmm, so I looked further through my code where I was subsequently used a DOMDocument that set its own encoding. I had to do pass the string in as: mb_convert_encoding($blogData, 'HTML-ENTITIES', 'UTF-8') This made everything happy Thanks.
    1 point
  11. And one more: function n($singular, $plural, $count) { echo t(_n($singular, $plural, $count)); } This handles translations of singular/plural nouns, using the earlier introduced "t" helper. Of course strings have to be listed in "_strings.php" to be translatable in the admin. (I had to use "echo" instead of "return", probably because the template engine I'm using) Usage: n('minute', 'minutes', $page->count_of_something) Using "/*!" instead of "/**" will prevent addition of stars when hitting new lines in IDEs: /*! Intentionally commented out GENERAL _x('minute', 'General'); _x('minutes', 'General'); SEARCH _x('Search site', 'Search'); _x('No matches', 'Search'); *******************************************/
    1 point
  12. WOW! Just to answer myself; all of the above can easily be covered. Just don't use the render(); method. Step 1: fetch your menu data and store it in an array: $footermenu_items_json = $pages->get('name=footer-menu')->menu_items; // this is the menu page in menu builder, could also be fetched with the ID $footermenu_items = json_decode($footermenu_items_json, true); Step 2: use that array to build your custom markup: if( count($footermenu_items) > 0 ){ $out = '<ul class="nav-list">'; foreach($footermenu_items as $item){ $url = ($item['url']) ? $item['url'] : $pages->get($item['pages_id'])->url; $target = (1 == $item['newtab']) ? 'target="_blank"':''; $out .= '<li class="list-item"><a href="' . $url . '" class="list-item-link" ' . $target . '>' . $item['title'] . '</a></li>'; } if( $user->isLoggedin() ){ $out .= '<li class="list-item"><a href="' . $pages->get('name=login, template=login')->url . 'logout/' . '" class="list-item-link">Logout</a></li>'; } else { $out .= '<li class="list-item"><a href="' . $pages->get('name=login, template=login')->url . '" class="list-item-link">Login</a></li>'; } $out .= '</ul>'; echo $out; } Just make sure to var_dump the array somewhere to get an idea of what info is stored in there for the nested levels, etc. This is really neat. For me it's the best of both worlds - I can easily create and maintain menus in the backend, but can still fully control the output in the template. Thank you!! cheers, Tom
    1 point
  13. 1 point
  14. Yes, that was the problem. After changing 3 files from the Github dev version it works as expected.
    1 point
  15. None of the things you've mentioned here are impossible, and all of them are very much doable with ProcessWire. This does sound like a big project, though, so better make sure you're up to it before signing up for anything. Just a few quick notes on the specific parts: Time banking system sounds like it could be a lot of work. You'll spend quite a few hours putting that together, so especially if this is a paid client project, make sure that you've made a list of features, proper plans, and estimates beforehand. The larger the scope of the project, the easier it is to miscalculate the amount of work, so leave enough room for surprises and mistakes in your estimates. Same thing goes for the messaging system, though this depends a lot on how it's actually supposed to work. "Internal messaging system" alone isn't a very good description. If it's just about leaving messages for other users, that's not particularly complicated, but you'll need to make sure it's secure. Privacy is a very big deal in a system like that. Registered users should probably be actual ProcessWire users, so that you can let the system itself handle authentication etc. That's the complicated stuff after all. Registration state sounds like something that could be a custom field on the user template. For the viewable user profiles profiles the support for multiple user templates and parents could come in handy. The best way to handle payments / subscriptions depends on a lot of things. Check out various payment services available and see how those fit your needs. Building a payment system from scratch would be a lot of unnecessary hassle you really don't want to get into. Not sure how much this helps, except for (hopefully) making it obvious that this sounds like a pretty big project. In the end the question here is not so much whether ProcessWire can handle this – it's more about whether you can handle this
    1 point
  16. This module should do what you are looking for: http://modules.processwire.com/modules/after-save-actions/
    1 point
  17. Images (or better all file fields) are always managed as multi value field, even if they pretend to be single as long as output-formatting is active.
    1 point
  18. Hi Diogo. Yes I did try that. No joy, seemed to set the default. The CSS solution is good enough for now. Thanks.
    1 point
  19. Found it already, posting for others and my own leaky memory... <div class='action'><a class='add-to-cart-button' href='" . $plan->page_field . "'><span>".__('ADD TO CART')."</span></a></div> needed to close stuff off with " and then start and end with dots, .__('ADD TO CART').
    1 point
  20. They did start using Symfony components, though, so they're not completely immobile: http://symfony.com/projects/phpbb Also, instead of those awfully hacky mods they now have extensions. "Unlike modifications, the extensions system for edit-less changes in phpBB 3.1 makes customising phpBB easier than ever." <- that answers your "too hard to customize" worry You can even use Twig for styles now. AJAX gives perf improvements. The full launch hyping page. I didn't intend to start a marketing campaign for phpBB, but somehow it happened! I don't even host a phpBB forum currently!
    1 point
  21. I'm interested in why the new responsive phpBB 3.1 is not an option for you.
    1 point
  22. Just wanted to let you guys know that I have submitted a PR to Ryan to fix this issue: https://github.com/ryancramerdesign/ProcessWire/pull/823 Along with this, I wanted to note somewhere (for now here, although I will probably write a PW SVG tutorial sometime soon) that if you want to embed SVGs into CkEditor RTE fields and be able to drag to resize them, you need to add the following to the "Extra Allowed Content" section on the Input tab of the field: img[alt,!src,width,height] This allows the img tags to have width and height attributes, which allows you to resize the image to a fixed number of pixels.
    1 point
  23. Try the attached module - works here. Let me know if that works at your end. CustomPageListButtons.module
    1 point
×
×
  • Create New...