Jump to content

All Activity

This stream auto-updates     

  1. Yesterday
  2. Tracy's RequestInfo panel has all the details I think you are looking for:
  3. Hi, I have been using Laragon for a while with good success. Today all of a sudden it starts to connect with the internet when I am opening a website in localhost. So for example I start Laragon, and open http://localhost/mywebsite before it opened immediately and never connected with the internet. However now it connects with the internet and it takes halve a minute before the website shows up for editing. Does anybody know how this new behaviour could happen ?
  4. Now this works: $module = wire('modules')->getModule('ProcessPageAdd'); $test = ($module->executeNavJSON()); return $test; This gives me the following json-output: {"url":"\/processwire\/processwire\/page\/add\/","label":"Modules","icon":"plus-circle","add":null,"list":[{"url":"?parent_id=1016&template_id=57","label":"Eine neue Leistung erstellen","icon":"plus-circle","parent_id":1016,"template_id":57},{"url":"?parent_id=1048&template_id=51","label":"Neuigkeit erstellen","icon":"plus-circle","parent_id":1048,"template_id":51},{"url":"bookmarks\/?role=0","label":"Lesezeichen","icon":"bookmark-o","className":"separator separator"}]} And these are the pages I was looking for: list":[ {"url":"?parent_id=1016&template_id=57","label":"Eine neue Leistung erstellen","icon":"plus-circle","parent_id":1016,"template_id":57},/n{"url":"?parent_id=1048&template_id=51","label":"Neuigkeit erstellen","icon":"plus-circle","parent_id":1048,"template_id":51}........ So I get: parent_id: 1016, template_id:57 and parent_id:1048, template_id:51 These are the 2 pages that I have in the shortcut menu and the IDs that I need😃 So for the moment my new dashboard has the same functionality as the add-new navigation of PW, but a little more userfriendly than the small navigation in the left corner. New shortcut items can be added via the bookmark button, so every user can add his own favorites shortcuts to make his dashboard individually (if he has the rights of course ;-).
  5. Really complicated, but I will give this a try. I thought that it must be really simple to get the IDs of the pages in the shortcut navigation, but it isnt. Thanks for the tipp!!!
  6. Yes the folder is under site and if I look into the source code I can see that the correct config.js is there. "stylesSet": "customstyles:/processwire/site/templates/scripts/customstyles.js?nc=1563189734", "customConfig": "/processwire/site/modules/InputfieldCKEditor/config-body.js?nc=1563175984" Inside the config-body.js I have the following code: CKEDITOR.editorConfig = function( config ) { config.contentsCss = 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.1.6/css/uikit.min.css'; }; But the CSS from the CDN will not be loaded. Instead the one from the wire-folder will be loaded. "baseHref": "/processwire/", "contentsCss": "/processwire/wire/modules/Inputfield/InputfieldCKEditor/contents.css", "extraPlugins": "pwimage,pwlink,sourcedialog", 🙄
  7. @Juergen this is too much for monday! haha. But you know, looking at the config page, this list probably generated on runtime because there is also no way to delete them on the config screen, I took a look at the source code and I THINK, it's happening here, so maybe you can call executeNavJSON?: https://github.com/processwire/processwire/blob/master/wire/modules/Process/ProcessPageAdd/ProcessPageAdd.module#L151
  8. Same result, but I have checked the database (table 'modules') and the data column is empty. So I am wondering where the shortcuts pages are stored🙄 Inside the module file of this module you can find following lines: $configData = $this->wire('modules')->getModuleConfigData($this); // because admin theme calls with noInit option $shortcutSort = isset($configData['shortcutSort']) ? $configData['shortcutSort'] : array(); So there must be an index 'shortcutSort' inside the configuration array. Very strange?!?
  9. Maybe it's because the Array is printing as true? I don't see what could be going wrong! Have you tried: print_r($data, true);
  10. You probably need to tell PW that it should look in that folder instead of wire/modules/. Did you clone the entire module folder to site/modules/ ?
  11. Hello, I have tried to get the config data of the ProcessPageAdd module because I need the pages which are inside the ASM-Select for the 'Add new' shortcuts. This is what I have tried according to the docs: $data = wire('modules')->getConfig('ProcessPageAdd'); print_r($data); But the only output I get is 1(true). Is there something I am missing or is this the wrong way? Maybe someone can help me out. Thanks
  12. WOW. This is very impressive. Gideon
  13. @tires - could you please investigate where those "period containing" email addresses get ignored? Is the email being read, but not processed, or is it not read at all? Does it help if the "Only Users" checkbox is unchecked?
  14. In case anyone is interested, cloning also doesn't update the createdUser and modifiedUser values. I have submitted an issue: https://github.com/processwire/processwire-issues/issues/927 but in the meantime, I am using: $this->addHookAfter('Pages::cloned', function(HookEvent $event) { $p = $event->arguments(1); $p->createdUser = $this->wire('user'); $p->save(array('quiet' => true)); $sql = "UPDATE `pages` SET `modified_users_id` = '".$this->wire('user')->id."' WHERE `id` = '".$p->id."';"; $this->wire('db')->query($sql); }); Modified can't be changed via the API, hence the SQL. I suppose created could also be done this way, but hopefully this is just a temporary fix assuming Ryan agrees to change the current behavior.
  15. Each indexed field should be declared (named) in the config setting mentioned above, or via the "Indexed fields" AsmSelect field in module config. If you have a lot of fields to add, this may of course take a while, but generally unless you have a whole lot of fields it shouldn't be a major issue. Also, SearchEngine doesn't (currently) distinguish between Repeater/PageTable/RepeaterMatrix content: if they contain indexable fields, the values from those fields are indexed as part of the parent page's search index. Though now that I've said that last point out loud, I think that content from repeatable fields should only ever be included in the (parent page's) index if those fields are set to be indexable as well. I'm going to make this change in the next release 😅 Edit: done now (0.3.2). Repeatable fields need to be included in the indexed_fields array before their values can be stored in the index. This is really how it should've been from the start. -- Note that if you use the config setting instead of module settings for "indexable_fields", it's possible to generate that list of fields programmatically. I.e. you can define some hard-coded field names, and then merge that array with another one you generate with code. I'm not sure how efficient that would be, but it's doable at least. Additionally there are various hookable methods in the Indexer class included with SearchEngine, so if you need something more specific, you can always hook into those and change what gets indexed.
  16. Hi @JeevanisM, did you declare $pagefile before the call of "httpUrl()"? Maybe there are even log entries which give more information. In general it depends on wether you set a specific format for that specific field (single element or array) how to get the URL of the file. Assuming that your file field is named "pdffile": Case 1 - Single element $pdfUrl = $page->PDFFILE->httpUrl(); Case 2 - Array You either have to loop through all files or e.g. to get the first file: $pdfUrl = $page->PDFFILE->first()->httpUrl(); You can check format settings on details tab of your field.
  17. Cool thing! Is there an easy way to include all the necessary fields (by name/type) from Repeater/RepeaterMatrix fields?
  18. Thanks for your reply Teppo. I passed this on to the project developer, and he has checked/ruled out what you suggested. Please let me know if you have any other ideas? We also enabled the Jumplinks 404 monitor and found that it isn't picking up the 404s that Analytics is recording... I can't think why there would be an inconsistency here.
  19. Hello, Please help me on the below issue. I am creating a school text book website, simply displaying the PDF files of books to download by the visitor. Here I have created a new single page for a chapter and added a PDF file to that page from Admin Dashboard. But in the front I am not able to get the File Download url link to that PDF using API / Page references. Steps I followed as below : 1. created a new fields item as PDFFILE 2. added this filed into the Page template for Book 3. uploaded the PDF file to that page in Admin page edit 4. Saved and tried to use the API reference to get the full URL to the PDF file. I used this below api to get the download PDF url but this code is not working. when I load the page in browser, it keeps loading and loading and on..... $string = $pagefile->httpUrl(); Is there any other options available ? I simply a need a download PDF button to the attached PDF to that page itself thank you Jeevan S
  20. Thanks @dragan I use a custom style set for special UIKit markup classes. Including the code inside this file does not work too. BTW this file should be used to add custom styles to the dropdown not for configuration of the stylesheets. The docs of PW says that the configuration changes should be written inside /site/modules/InputfieldCKEditor/config.js I have tried it but without success. 🙄
  21. Strange. According to the official docs, this should work. Maybe a caching issue? Can't you just use @import ? Try adding a Custom Editor JS Styles Set, and then follow these steps: https://processwire.com/docs/fields/ckeditor/#custom-editor-js-styles-set
  22. Hello @ all, I am struggeling to add multiple stylesheets to the CKEditor content area. Docs from CKEditor says that it is possible to add a string or an array as source for the stylesheets. Inside the CKEditor settings tab there is an input field where you can add a path to a custom stylesheet. This works only if I enter only one stylesheet (string) - if i try to enter an array it fails and falls back to the default stylesheet. Therefore I have tried to add the stylesheets to the config-body.js directly (because the field is called body) CKEDITOR.editorConfig = function( config ) { config.contentsCss = ['https://cdnjs.cloudflare.com/ajax/libs/uikit/3.1.6/css/uikit.min.css', '/site/modules/InputfieldCKEditor/admin.css']; }; But this does not work either. Has someone an idea to get it working? Best regards
  23. Thanks! I just posted a feature request.
  24. Sounds like a great week 🙂
  25. Woah... Well... I don't use this word that often but... this is insane. In a very good and positive way.
  26. When you install PW for the first time choosing Uikit 3 Site/Blog Profile you feel good. You immediately understand it will take you sometime to fine tune your site, but you will not regret other popular CMS. After a short front end navigation with Uikit 3 Site/Blog Profile the theme looks simple but complete, so a great starting point. But suddenly your eyes will point at something strange … why my reserved user name which I took 10 minutes to invent … is right there in front of me: "Posted by mySecretUserName …" so that every visitor can see it ?! Uh! Let's make a step back. When you first installed PW you were asked for a user name and password. I tend to avoid generic user names like "admin" … "administrator" … but I normally build a complex user name using lowercase/uppercase/digits. If you open the post, and look at the bottom you will see that your reserved user name not only is below the post title but also in the preset data of the comment form. OK, keep calm! After a quick learning about Output Strategies and ... scrolling each file in /site/template you finally understand ... that what you are looking for is ukBlogPost() function in _uikit.php. Yes, this is the magic function that renders a blog-post, both when it is just summarized in a list of items or fully displayed in a page. The line of code that was waiting for me was: $name = $page->createdUser->name; Uh! So no mistakes, my reserved user name was going public ... After a quick course on the Admin side and reading this forum, you start to feel how PW is powerful. What we have to do to solve our problem it is simply to enhance the User template adding a publicName field to it. Let's proceed step by step. Login the Admin panel, select Setup, then Fields. Let's create a new text field named publicName, then save. Then select Setup, then Templates. In PW you can also edit system templates, but to do that you have to select the show system templates option: Once the list of system templates appears, we will select the template "user", and we will add the new field publicName, then save. Now clicking on your user name on the top you are going to open your user profile. A blank field named Public Name is now available. There we will write our public name, that.. by chance … will be "Administrator". Of course you can choose whatever you like, and any new user you are going to create will have available such a field. So each user can have a complex user name for login purposes and a public name that will be shown, for example when posting blog posts or replying to comments. Now that the new field is available we can go back to ukBlogPost() function in _uikit.php and change the code as follows: //$name = $page->createdUser->name; $name = $page->createdUser->publicName; //>>>>> REPLACE WITH THIS LINE Let's go back to the front end, and now we see that our reserved user name is no longer there: "Posted by Administrator on …". Good... I feel better. Please note that reserved user name in the comment form will be shown only for logged-in user, and you can manually overwrite it in case you have to reply a comment. Otherwise it's necessary to modify FieldtypeComments module. In particular the function render() of ContactForm.php: if($user->isLoggedin()) { //$inputValues['cite'] = $user->name; $inputValues['cite'] = $user->publicName; //>>>>> REPLACE WITH THIS LINE $inputValues['email'] = $user->email; } As I already did few other modifications to FieldtypeComments I also took the opportunity to fix that, but if you are a new PW user, please wait to modify FieldtypeComments until you are more familiar with the environment. It will be necessary to clone the module as described in the first steps of this tutorial: I hope some new user will find those information of help. Wish a good week start to everybody!
  1. Load more activity
  • Create New...