Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by dragan

  1. I tried the code too y'day (in Tracy console), and it worked fine as well. PW 3.0.149
  2. You can simply edit /** * mystyles.js * * This file may be used when you have "Styles" as one of the items in your toolbar. * * For a more comprehensive example, see the file ./ckeditor-[version]/styles.js * */ CKEDITOR.stylesSet.add( 'mystyles', [ { name: 'Inline Code', element: 'code' }, ... { name: 'Heading Underline Span', element: 'span', attributes: { 'class': 'heading_underline' } }, ... ] ); and in your field definition (tab input), add "Styles" to the toolbar.
  3. Well, it's just this dinosaur JS plugin. Use a custom JS in admin or a hook: $("#AdminDataTable1").trigger( 'sorton', [ [[1,1]] ] ); // sort 2nd column in descending order
  4. @Pete Just out of curiosity: Did you find out what caused these outages? At one point I could access the forums, but wasn't able to post comments (disabled form), and saw lots of JS errors in the console. Did you update the forum or server recently?
  5. I'm not quite sure about the setup... Does each project have exactly 250 tasks? Or "can have up to 250 tasks"? Is each set of 250 tasks tied to just one single project? Where or how are these tasks defined? Are they "global" (several projects can define one or more of those 250 tasks) ? If the "tasks" can be used (selected) globally from a set list of pre-defined tasks for each project, then I'd go for page-reference fields. No need for sub-pages. Perhaps you could describe a real-life usage example to get a better idea of the whole scenario.
  6. @gebeer I've installed your module today for the first time. I was mostly interested in the feature "select from folder". But sadly, that just didn't work. I cleared site/cache several times, refreshed modules etc., but the field always would state that no such folder exists. I have added that folder after creating the field. Does that matter? Does the folder have to be there before you create an image reference field? Nothing suspicious in the logs, btw (debug mode on). ProcessWire: 3.0.149 PHP: 7.3.13 Webserver: Apache/2.4.35 (Win64) OpenSSL/1.1.1d MySQL: 5.7.24
  7. A word of advice: Forget everything you learned about Wordpress. PW's technical concept and philosophy has little to do with how WP handles things. Make yourself familiar with the PW API, selectors, what a PW page is (or can be), and how pages, templates and fields work together. If you've got the basics down, I suggest you take a look at page reference fields, and how they can be used: for creating/defining cross-references, categories + relations - of any kind: not just in a classic sense of "frontent page A relates to page B". It's a very powerful concept.
  8. Nice! That's indeed much more user-friendly. Thanks for sharing.
  9. @Roych No offence, but I guess you should develop some basic PHP know-how... There are (roughly speaking) three major template output strategies with PW Direct output is what you seem to use, i.e. constantly echo()-ing everything to the browser. In that case, you would declare a variable before that language image count code block, and then use <a href="<?=$album->url; ?>"><div class="imgcount"><?=$myVariable;?></div></a> $var = ''; // init $var .= "foo"; // add stuff to that variable Since I'm using the delayed output approach in my test PW installation, my var is called $content, that's why I used it here for these quick code examples. You can of course name it whatever you want. Hope that makes sense.
  10. @adrian Both email fields are set. That's what I would suggest too. It's just a bit irritating, that's all. Thanks!
  11. Thanks! I feel bad for asking about another issue though... Since approx. 1-2 weeks I see frequent warnings like these popping up: Frequently = several times during a backend session. When I check the "clear email sent" checkbox and hit save, I get this error message: The checkbox stays un-checked after save. Latest PW dev + last 2 or 3 TD versions.
  12. There's a blog site profile you can choose when installing PW with a full example blog (comments, comments-admin, tagging etc.) I don't understand this sentence. What do you mean with "ongoing"? Do you mean "single page application"-style? Why should a blog post and a portfolio detail page have the sample template? It's certainly doable.
  13. Why did you insert so many echo()s? Remove it from echo $imgCount = $album->images->count(); and all echo() statements inside the switch statement. First we have to define a variable, before we output it 🙂 Also, I wouldn't do a another switch for non-Slovenian language. Do something like this in the else: // not slovenian: if($imgCount === 1) { $content .= "<p>$imgCount " . __('image') . "</p>"; // Image single form } else { $content .= "<p>$imgCount " . __('images') . "</p>"; // Image plural form } That way, you can handle string translation in the PW backend, as @MoritzLost suggested: setup > languages > language > select template > submit If you look at the search template in the regular site profile, you'll also see similar examples:
  14. I found a CSS bug with Firefox: The directory list panel in the file editor is not usable, i.e. you can't focus / click on any file or directory links. The three buttons at the bottom also don't work (test, save, restore backup). I can use the scrollbar, but only with dragging (mouse-scrollwheel doesn't work). The code-block works. If I remove position: absolute from .tracy-filterbox-wrap everything works fine, but it breaks in Chrome. I finally found that removing height: auto !important; from #tracyFileEditorFilterBoxWrap makes it work in both browsers. (You already set a fixed height for .tracy-filterbox-wrap, but of course an ID CSS selector + !important are much stronger than a class)
  15. $imgCount = $album->images->count(); $imgStr = ''; if ($imgCount) { if ($user->language->name === 'slo') { switch ($imgCount) { case 1: $imgStr = "slika"; break; case 2: $imgStr = "sliki"; break; case 3: case 4: $imgStr = "slike"; break; case 5: default: $imgStr = "slik"; break; } $content .= "<p>$imgCount $imgStr</p>"; } else { // not slovenian: $content .= "<p>$imgCount " . __('images') . "</p>"; } }
  16. @Roych Does this only apply to the first 5 numbers, or do the slovenian language rules go beyond that? If the former, you could simply create a switch/case with the image-count, and then output either slika, sliki, slike, slik in the output. Perhaps you'll need to create a translateable string variable __('foo') for this, so that you have an equivalent ENG as well (not sure which is your primary site-language).
  17. ... and everything went silky-smooth. I finally got around to update a small portfolio site from PW 2.3 straight to latest dev. I spent roughly one hour, tested everything, and hey: no major hassles. I updated the few modules I used (and installed some new ones like Tracy or AoS), updated PHP as well, and that was more or less it. Imagine having such an un-touched WP, Typo3 or MODX site, and updating straight to the latest version... What a nightmare. That is - if they would actually still run that long 🙂 I actually expected it to go as smooth as it did, but I'm always surprised and in awe again when I do such a big update. Thank you ProcessWire.
  18. I just got a weird error with this module and I'm a bit stumped... After entering a list, the following error occurs, and no pages are being created: CKE source code view: ProcessWire: 3.0.149 PHP: 7.3.13 Webserver: Apache/2.4.35 (Win64) OpenSSL/1.1.1d MySQL: 5.7.24 I've been using this lovely module on-and-off for a while now, but never saw such an error msg before...
  19. You can use the API: $tpl = $templates->get('service'); $tpl->tags = "foo bar something else"; $tpl->save(); or for multiple templates, just create an array with tpl-names, and do a foreach()
  20. The DB itself won't suffer, but PW performance eventually will. Too many templates and fields won't scale endlessly.
  21. Yeah well, I just did a quick test-run with embed method A. I'm not sure if this is supported at all with other embed types. Did you check the browser console for errors? btw: I guess you should have posted this question in the dedicated FB forum, rather than on the official board... FB is a commercial PW module after all. Other users in the future, who search for similar topics/keywords, and narrow down their search to the FB forum only will most probably miss this thread. Your chances that @ryan will jump in with suggestions and answers is also much higher there than on the "open" forum threads.
  22. Just go to FB module settings (not form-settings) and add it as an allowed input type: module/edit?name=FormBuilder&collapse_info=1
  23. This works just fine: $input->cookie->set("foo", "bar"); // set the cookie d($input->cookie->foo); // get it you're printing out $c, which is the set command.
  24. @Arcturus Nice. Thanks for sharing. I guess it would be nice to have this as a textformatter too.
  25. Easiest thing to do is to add some custom CSS to admin.css, e.g. body[class*="editor"] #notices { display: none; } that would hide all notifications for role "editor". Or some variation thereof, e.g. body[class*="editor"] #notices .NoticeDebug { display: none !important; } body[class*="editor"] #notices .NoticeMessage { display: none !important; } The cleanest way would be if this core module would have an in-built permission, then you could handle it normally via the PW access system.
  • Create New...