Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/02/2016 in all areas

  1. Hope you all are having a great week. In this post we cover ProcessWire 3.0.43 (dev) which includes a lot of updates and a newly upgraded $page->url() method. Also a bit on the FileCompiler and revisiting last week’s ProcessWire Weekly recipe. http://processwire.com/blog/posts/processwire-3.0.43-core-updates/
    7 points
  2. this is the 14.000 topic.
    6 points
  3. You could also build your selector as array: $results = $pages->find([ ['parent', '/posts/'], ['tags|category.title|title', '%=', $search], ['limit', '25'], ['sort', '-created'] ]); That way you don't have to make the array back to an string and it is more readable for complex selectors.
    5 points
  4. Update: Blog 2.4.0 Changelog Fixed SQL error thrown when comments disabled and accessed blog dashboard. Thanks @justb3a Added capability to copy demo JS and CSS files on blog install as well as remove them on uninstall. Full compatibility with ProcessWire 2.8.x and ProcessWire 3.x. Thanks to @BitPoet Happy then to announce that I've tested and can confirm that Blog is compatible with ProcessWire 2.8.x and ProcessWire 3.x
    4 points
  5. Looking at the url we can easily see that there is more going on in the private area... Or where do those extra 945 come from? BTW I was scared for a moment that it is 14000 topics by you, @horst ))
    3 points
  6. The amazing thing is that the majority of those topics/posts are thought provoking and serious helpful conversations.
    3 points
  7. Perfect! I knew I was taking the long way around! There's always a simpler way in ProcessWire I've found $results = $pages->find([ ['parent', '/posts/'], ['tags|category.title|title', '%=', explode(",", $input->get->search), 'selectorValue'], ['limit', '25'], ['sort', '-created'] ]);
    3 points
  8. One of the biggest projects I've done yet! ProcessWire has been such a god-send so far, and it continues giving. This is an estate agents powered by Vebra in real-time, which ProcessWire imports all the data from and stores as pages, allowing us to use ProcessWires amazing built in API functions. ProcessWire is really perfect for any project big or small. http://www.spencersestateagents.co.uk/ The team here at Peter & Paul really love ProcessWire and so do our clients!
    3 points
  9. Hi @heldercervantes. It looks very similar to my issue, checkout this topic
    3 points
  10. I made a few changes in my fork of the module. I added support for DateTimePicker, Recurring Events and DataTables. Here is it: https://github.com/blackberrymamba/FieldtypeEvents
    3 points
  11. How about calling $field->setAttribute("cols", 40); ? columnWidth only sizes the Inputfield's wrapper, not the actual HTML input element itself.
    2 points
  12. Not sure that you need to do the first pipe replace - you could just explode on commas and then trim(). You'll add the pipe when you implode. Also, passing by reference in a foreach can catch you out so perhaps better to avoid it. // Explode search input into array $search = explode(",", $input->get->search); // Sanitize each value foreach($search as $key => $value) { $search[$key] = $sanitizer->selectorValue(trim($value)); } But otherwise it looks fine to me; that's what I would do.
    2 points
  13. Hi @rastographics, this module won't work out of the box with PW 3.x. You need to do some changes to make it work. I don't know which one from memory, but I got a copy running locally at home. I might find some time tonight to update the code and send @rot the Pull Request I promised.
    2 points
  14. Image & File Dependencies Allows Image and File fields to be used in inputfield dependency selectors. Note: prefix field names with an underscore in your dependency selectors. Usage Install the ImageFileDependencies module. You can now create an inputfield dependency based on the number of images or files added to a Image or File field. When you create an inputfield dependency for a Image or File field, prefix your field name with an underscore. Example for a field named 'images': _images>3 Note that you do not include a '.count' subfield in the selector. https://github.com/Toutouwai/ImageFileDependencies Demo
    2 points
  15. Hi everyone, Here's a new module that lets you control whether multi-language support is enabled at the page / branch level, rather than only per template. http://modules.processwire.com/modules/restrict-multi-language-branch/ https://github.com/adrianbj/RestrictMultiLanguageBranch This is ideal for a site with repeated branches using the same templates where only some need to be multi-language. I think it is confusing to provide multiple language inputs for fields when they are not required - it just bloats the admin interface for site editors. I am hoping to expand this module to allow selection of which languages are supported per page/branch, but I am waiting on @ryan's response to this request: https://github.com/processwire/processwire-requests/issues/54 - to me this would be even more powerful if you have a situation where certain branches need some languages and other branches need different languages. The module config settings shows a summary of the restrictions you have implemented, eg: This shows that we have started with the home page which disables multi-language on itself and all its children/grandchildren (because "This Page Only" is "False". Next we have the /report-cards/ page multi-language enabled, but no inheritance (because "This Page Only" is "True"). The only branch below this to have multi-language enabled is Guanabara Bay and all it's children etc will also be enabled. All other report card branches will be disabled because they will inherit directly from the config settings default status. The Settings tab for each page gives you three options: Inherit, Enabled, Disabled. The screenshots give you an idea of how the Inherit option works and the information it provides based on the status it is inheriting and from where. My goal for this site was to just enable multi-language support for the Guanabara Bay report card branch of the tree, as well as the home page and the /report-cards/ parent. All other branches have multi-language support disabled which makes content entry much cleaner. Hope you guys find a good use for it and I'll be sure to update with the ability to define which languages are available on which pages/branches if Ryan comes up with a core solution for changing the returned $languages. Please let me know if you have any problems / suggestions.
    1 point
  16. 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
  17. I did it again http://soma.urlich.ch/posts/custom-js-in-processwire-admin/
    1 point
  18. Another option is to use the "Allow HTML" setting in this module: http://modules.processwire.com/modules/dynamic-description-notes/
    1 point
  19. just for the record, it is possible to add html to description via hook without messing around with str_replace or the like: $this->addHookBefore('InputfieldPage::render', function($event) { $field = $event->object; if(!in_array($field->name, array( 'fieldname1', 'fieldname2' ))) return; $field->entityEncodeText = false; $field->description .= ' <a href="#">test</a>'; }
    1 point
  20. When you create forms using the core Inputfield modules then you are using the same methods as used for the PW admin interface. If you're seeing something different in the admin than in your frontend (e.g. width of textareas) then use your browser dev tools to check the CSS that is applied in the admin. There you'll see that textareas have a width: 100% rule, so that the final width of the element can be controlled by the <li> wrapper (which can have its width style set inline via columnWidth).
    1 point
  21. Thanks for your help. I used Ryan's suggestion of starting the path to my includes with "./" <?php include('./includes/footer.inc.php'); ?> Worked like a charm.
    1 point
  22. I would just like to mention that I think the easiest way for most users to upgrade these days is with this module: http://modules.processwire.com/modules/process-wire-upgrade/ It handles the PW core as well as any modules you have installed.
    1 point
  23. thanks, i've seen this video before but it does not seem that anything happened since pw 2.4?
    1 point
  24. With UTF8, it's no longer necessary to encode any characters outside those that have special meaning in HTML, so accented chars are fine as they are. If you enable the text formatter "HTML Entitiy Encoder (htmlspecialchars)" in the details tab of a field that contains plain text, it will take care of any necessary encoding on the fly. CKEditor will do its own conversion as you type, so manual conversion shouldn't be necessary anymore.
    1 point
  25. access controlled VIP-Support, I believe. EDIT: this one was my 2.7k post
    1 point
  26. @bernhard You should check this out by @diogo : http://processwire.com/videos/copy-and-paste-photos/
    1 point
  27. The 500 error could have to do with the .htaccess file and the way apache handles requests on your Local server vs the Host one ^^ Or it could be user permissions on the Host server... (or something similar) I'd check out the apache error log if I were you ^^ EDIT: Wait one second, are you getting the errors while copying?? *_* (Not sure how this works .-.) Or do you mean, you copy and then try to access the site and you get 500'd?
    1 point
  28. That error means that you didn't select a db in PHPMyAdmin before clicking the Import or SQL tabs. The 500 error could be several things. Make sure you have debug mode on and read through this: https://processwire.com/docs/tutorials/troubleshooting-guide/ and this: https://processwire.com/docs/tutorials/installation-moving-and-troubleshooting/
    1 point
  29. The admin user's email address suggests the developer is Greek. I won't share here, but if you're curious....
    1 point
  30. Hi @mmc, welcome to the forums. It strikes me as unusual to use CKEditor in a contact form - I don't think I've ever seen a contact form that invites the visitor to submit their message using an RTE. A plain textarea is more typical. But anyway... For width you can set the inputfield columnWidth property: $field->columnWidth = 25; // sets width to 25% Or you can just set the width of the element that contains CKEditor in your CSS. For height, InputfieldCKEditor extends the InputfieldTextarea class so you can use the rows property: $field->rows = 3;
    1 point
  31. @SamC - please see ryan's response: https://github.com/processwire/processwire-issues/issues/96#issuecomment-264145798 Perhaps reply there if you want to discuss with him further.
    1 point
  32. Hello @heldercervantes, inside includes the following string translation should work: $this->_('Follow us'); Regards, Andreas
    1 point
  33. I don't know if it's the best practice, but i normally just organize all the files inside the templates folder since it's easier when you import/export site profiles because they get included. My normal file structure looks like this: I place all 3rd party plugins (jquery, bootstrap plugins, etc) under the vendor folder. I also use a somewhat MVC (not strictly) approach, so I place all my controller files in functions folder, and all my views in views folder. You get the idea. I hope this helps.
    1 point
  34. All UK users should start using a VPN now ... and configure / test it so that it's not leaking their IP. Not all VPN providers are the same. I recommend AirVPN which I've used for several years now.
    1 point
  35. @horst, I thought I'd share my implementation of an auto-watermarking module. This module depends on PIM, and also depends on some other stuff specific to the application the module was created for. If anybody wants to use this module for their own uses, you'll have to change the names of fields and templates that you want to apply a watermark to. We (PROGRESS: A Creative Agency) do plan to modify this module for more general use in future, and release it in the module directory. But we are really busy right now, and cannot do so. See the GitHub gist here.
    1 point
  36. When you're editing a page and meanwhile your login session expires, there should be a warning. I don't know why, but I found myself in that situation at least twice and a friend of mine had lost text (got an email just now) . Maybe if the connection has dropped while you write or some other timeout!? Anyhow, if you click save you are forwarded to the login page and the content is lost. Quite harmful Perhaps the "Save" button could check if the session is still available before finally submitting. Or a warning at the top and bottom. I think WordPress made a good solution and opens a modal window if you're session is lost.
    1 point
  37. @Robin S looks great, thanks. Can you name a use case? On a side note: What are you using to record the screen and export to gif? I tried gifrocket, but even with a small framerate, files get pretty large. Yours is tiny, I like it.
    1 point
  38. Hi, I'm hammering out the details of a project for a consortium of counseling organizations. They need a new site for sharing private case information and related knowledge, and they have a very small budget. My question is: Is this site a good fit for ProcessWire, or should I build this using a Wiki engine like MediaWiki or DokuWiki? Or something else? Here are some of the requirements: The site is access-protected so that only authorized accounts can see any site content at all—approximately 20 active users at a given time. Content types: The majority of content would be informational articles in formatted text, but the site will give them easy control over a dynamic, hierarchical category list under which content can be easily organized. They will also need to upload and link to documents, including PDFs and Word docs. All content, including uploaded files, would be available only to logged-in user accounts. Multiple editors: Users can update text, create new pages, add categories, and upload and link documents. All users would have editor privileges, but they anticipate fewer than 10 will actually do it. Recent updates: They want a section that lists recent substantial updates to the site. Based on the discussion, they prefer not to include minor article edits (like a phrase being changed to bold, for example), but only edits that change the content in substance—sounds like this could easily be accomplished with an internal blog. Alerts: Any member can post a comment on an article to note current questions or issues about the content. The purpose is to resolve the questions or issues and improve the article content, not to maintain a persistent discussion about article content. Full-text search Quick navigation: A concise list of links to highest-traffic content will be available on every page. This navigation menu should be easy to add, remove, sort, or edit links by the editors. I have two further requirements, for my own sake: Simplicity of user-facing interface: I don't want the publishing software to present the editors with superfluous configuration and options they might use to break the site, or require extensive documentation for. Stablility, security, and ease of maintenance: I don't want to introduce security vulnerabilities or create long-term maintenance difficulties simply by customizing the front-end page designs. It occurs to me that Wiki software has most of the above features built-in. But I have a few misgivings about using a Wiki: Wikis include a lot of built-in functionality that I imagine would make it incredibly complex to create a skin. I know that ProcessWire would allow me to write my own markup, and keep the page designs as simple as possible. I'm also afraid that I might introduce security vulnerabilities or maintainability problems if I create my own skin for a Wiki. I know that ProcessWire enables you to include back-end functionality in front-end templates, but you don't have to do that. I'm confident that I would have to do some obvious and deliberately reckless design in order to create any security problems with ProcessWire. On the other hand, I don't want to spend weeks building out functionality that a Wiki, or other easily-available software, offers with basic installation. Any guidance, warnings, advice, or further thoughts would be greatly appreciated. Cheers! John
    1 point
  39. One thing I want to mention is that you don't want to actually have a field of your own called "status", just because that is already a built-in field for every page. That is on our reserved words list, so I don't think PW will let you create a field with that name, but just wanted to mention it.
    1 point
×
×
  • Create New...