Jump to content

dragan

Members
  • Posts

    2,007
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by dragan

  1. I haven't tried out this module, but often with old modules (pre PW v.3) all you need is to add the PW namespace at the first line of the module. i.e. https://github.com/horst-n/LocalAudioFiles/blob/master/site-default/modules/LocalAudioFiles/LocalAudioFiles.module just replace first line with <?php namespace ProcessWire; then refresh modules and try again. If that doesn't work, you should post the error messages you see.
  2. I tried the code too y'day (in Tracy console), and it worked fine as well. PW 3.0.149
  3. 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.
  4. 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
  5. @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?
  6. 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.
  7. @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
  8. 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.
  9. Nice! That's indeed much more user-friendly. Thanks for sharing.
  10. @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.
  11. @adrian Both email fields are set. That's what I would suggest too. It's just a bit irritating, that's all. Thanks!
  12. 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.
  13. 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.
  14. 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:
  15. 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)
  16. $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>"; } }
  17. @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).
  18. ... 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.
  19. 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...
  20. 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()
  21. The DB itself won't suffer, but PW performance eventually will. Too many templates and fields won't scale endlessly.
  22. 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.
  23. Just go to FB module settings (not form-settings) and add it as an allowed input type: module/edit?name=FormBuilder&collapse_info=1
  24. 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.
  25. @Arcturus Nice. Thanks for sharing. I guess it would be nice to have this as a textformatter too.
×
×
  • Create New...