Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/23/2021 in all areas

  1. Hi @sebr As for the first point. You can copy LanguageTabs module to the site/modules folder and adopt for you needs. As for the second point. There is no ready to use solutions but it doable by hooks. I've been working on the two module. One that allows to disable default language and the second one that add reuquirement for non default langauges of multilangauge fields and check if they are filled. They are site specific but you can use them as starting point and try to addot for your needs.
    2 points
  2. Hi @sebr, 1. You could just uninstall the core module "Languages Support - Tabs". But this would disable all language tabs. ? 2. Required fields should prevent you from publishing the page if not filled out. But I think it only works for the default language. Regards, Andreas
    2 points
  3. Hi @dotnetic, That is BEYOND COOL. One more reason why all of the other "CMS's" should bow down to ProcessWire! Thank you! I shall use it. Best regards, Peter
    1 point
  4. I would suggest using something like the great Dashboard (Dashboard) - ProcessWire Module. You can easily add a custom PHP file to render whatever you want on a separate "Dashboard" page. It even has nice predefined "panels" with can show something like a sum with an up or downtrend arrow. It is very easy to setup and comes with good examples.
    1 point
  5. Hi @horst. RewriteCond %{HTTP_HOST} ^(www\.)?example-b\.com$ [NC] RewriteRule ^(.*)$ http://www.example-a.com/subpage5/$1 [L,R=301] Maybe it's cache issue? 301 redirects are cached hard by the browser. For testing it's better to set 302 or test with browser tools open and cache disabled.
    1 point
  6. Hi @kongondo, and thank you for taking time to read my post ? i'm speaking about the native ProcessPageEditLink module where we can store a few classes, rels and target for the end user to use when adding a link in ckeditor (and even add them, or not, by default, to external links, a very clever and useful feature...) i'm just wondering if it would be a good idea to modify it to deal with dynamic data-attributes or if it is again one of my savage ideas :D have a nice day chris
    1 point
  7. Hi 1. By default, every fields in page are lang tabs UI. If I click on folder icon on top right of a field, the lang versions of this fields are extending. I see all version of this lang for this field. My client would like to have this behavior by default on some templates. Is there a simple way to do that ? Hook or just a Javascript added in Admin ? 2. Is there a solution to allow the publication of a page only if the mandatory fields are filled in for all languages? Thanks in advance for your help
    1 point
  8. I would like to pass over a string from PHP to JS. I guess thats the way to go: https://processwire.com/api/ref/config/js/ However when i try it i get the error: Uncaught ReferenceError: ProcessWire is not defined at HTMLDocument. I think it's because of missing ProcessWire object in my js file. How do I import it?
    1 point
  9. Is there a particular reason why you need to use config->js() for this? In a template file, the following should work just fine: <?php namespace ProcessWire; $mydata = ['foo' => 'bar', 'bar' => 123]; $script = "<script>const mySettings = " . json_encode($mydata) . ';</script>'; echo $script; // OR: $content.= $script; if using delayed output with automatic inclusion of _main.php, for example. In the console...
    1 point
  10. Thanks, the upload_max_filesize fixed it. Didn't know that was a separate thing.
    1 point
  11. What's the value of upload_max_filesize in php.ini, and is your web server Apache or nginx? Asking because... upload_max_filesize limits the maximum size of any single file (post_max_size is the maximum size of entire request), and if you're running on nginx then there may be other directives (such as client_max_body_size) that also affect this. Depending on server config this may not work at all. If you have access to php.ini, that's definitely more likely to work.
    1 point
  12. By default, the ProcessWire object is only output in the backend or if you have frontend editing active. Otherwise, you need to add it to the html head in your your php template like this: <script> var ProcessWire = {config: <?= wireEncodeJSON($config->js(), true, $config->debug) ?>}; </script>
    1 point
  13. Thanks for this solution.
    1 point
  14. Hi everyone, I have solved the problems presenting with the module, I am already working on improvements to embed Facebook and Instagram content through their API. https://processwire.com/modules/video-or-social-post-embed/
    1 point
  15. Thank you for this module! It was not working for me until I found out that the HTML created by CKEditor was something like <p style="margin-left:0cm; margin-right:0cm">https://www.youtube.com/watch?v=Lh63JcccM7k</p> So the <p> tag has a style attribute. The regex (line 180 in module php) does not cater for that. $regex = '#<p>\s*(https?://(?:www\.)?youtu(?:.be|be.com)+/(?:watch/?\?v=|v/)?([^\s&<\'"]+))(&[-_,.=&;a-zA-Z0-9]*)?.*?</p>#'; I adjusted it, so that it also works for paragraphs with attributes $regex = '#<p.*>\s*(https?://(?:www\.)?youtu(?:.be|be.com)+/(?:watch/?\?v=|v/)?([^\s&<\'"]+))(&[-_,.=&;a-zA-Z0-9]*)?.*?</p>#'; @Lex Sanchez maybe you want to implement this in your module.
    1 point
  16. tested with 3.0.155 all embed works after two changes: 1- Find textformatter_video_or_social_embed table change embed_code collation to utf8mb4 if not // changed to utf8mb4_unicode_ci 2- https://github.com/lexsanchez/VideoOrSocialPostEmbed/blob/57c254e64ae3c03139e2bb5119ffc676d92af39c/TextformatterVideoOrSocialPostEmbed.module#L103 update this line $embedCode = utf8_encode($data['html']);
    1 point
  17. Ok, found it out... In the init-function of my module, I call $this->modules->get('JqueryUI')->use('modal'); Then I simply add «pw-modal» as a class to my link to the field-editor and viola, it opens in a modal window... Link for a new Field looks like this: <a href="/processwire/setup/field/edit?id=new&fieldgroup_id=new&modal=1&process_template=1&name=myTestField" class="pw-modal addNewField">New Field</a>
    1 point
×
×
  • Create New...