Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/08/2022 in all areas

  1. Yes. this -> Repeater items markup are ready before the assets are. Have a look at Inputfield::renderReady(). https://processwire.com/api/ref/inputfield/render-ready/ Also have a look at example implementations in ProcessWire Inputfields. Written in a hurry; sorry cannot go into further details.
    2 points
  2. @jacmaes To remove all in an existing parent (i.e. Align), you can add: #Align { display: none } To add custom styles at the root level, omit a #Parent. So to add "Red text" at the root level, add: span.red-text { color: red } /* Red Text */ To add your own custom parent at the root level, specify it as the #Parent for any items you want to add within it, i.e. here's how we add a parent named "Hello": #Hello span.blue-text { color: blue } /* Blue Text */ #Hello p.outline { padding: 20px; border: 1px dotted #ccc } /* Outline paragraph */ I prefer the single line rules, but it's also fine if you want to use multi-line rules: #Hello p.outline { /* Outline paragraph */ padding: 20px; border: 1px dotted #ccc; }
    2 points
  3. @jacmaes If you want to replace the entire styles menu on your own, you can do this with the custom JSON option (whether input or file). See the included defaults.json file "style_formats" item. But it sounds like you just want to remove a few things from the Styles dropdown. In that case, in your Module settings (or Field settings if enabled) edit the "Custom style formats CSS". The instructions there tell you how to add or remove items, but for the specific examples that you want to remove, enter this: #Align { display:none } #Blocks (Pre) { display: none } #Inline (Underline) { display: none } #Inline (Strikethrough) { display: none } #Inline (Code) { display: none } Note this option to remove items in this manner was added within the last week, so make sure you are running the latest version. Regarding the align options, I'm thinking we may just remove those since not many seem to want them, and our image plugin (pwimage) already includes the ability to assign alignment classes to images. For the Blocks tool, I think that is unrelated to the Styles tool in terms of configuration, and I don't think that it is a replacement for the Styles tool. I have built most of our configurable settings around the Styles tool since it offers a lot more flexibility in configuration. But if you want to investigate the Blocks tool further, it can be configured with the block_formats setting specified in custom JSON (input or file). What I would probably recommend instead of the Blocks tool is just to configure the Styles tool with exactly what you want. Keep in mind the parents (Blocks, Inline, etc.) are optional and you can add options to the root level if you prefer it, or create your own Parents within it.
    2 points
  4. Wonderful, thanks! This works and is simpler than I thought. This is exactly what I was looking for. I tried the more powerful JSON route, but I got confused quickly. That was my thinking exactly. Could you show an example of how to achieve this? I'm mostly interested in adding custom styles to the root level, and also maybe removing the "Blocks" and "Inline" dropdowns, which can be confusing for editors who don't know our jargon. I'd also like to know how to create a custom parent. Thanks Ryan for your hard work. I'm really liking this new editor.
    1 point
  5. I'm about to start developing a new site, and I thought it would be a great opportunity to try out TinyMCE. I agree that it's an improvement so far, and I appreciate the new option to quickly create custom styles, but now I'm stuck with the following issues: 1. In my "Styles" dropdown, I can see the two custom styles that I've set up, "Info" and "Intro". Great, but how do I remove the "Pre" just above that I don't want my editors to use? 2. Related to the previous question, how would I remove the "Align" menu item below "Blocks" (I certainly don't want editors to start messing with the justification of text)? 3. In the "Inline" menu item below "Headings", how do I remove "Underline", "Strikethrough" and "Code"? See below: 4. If I replace the "Styles" tool above with the "Blocks" tool, I would expect to see my custom block styles ("Info" and "Intro") to appear here. How would I do that? I've tried messing with some configurations in the module settings, but to no avail…
    1 point
  6. omg. ...... took me a good hour to realize I had forgotten to actually install the lazy cron module *hand clap*
    1 point
  7. I can replicate the install error with the configuration "utf8mb4". Using "utf8" with either "MyISAM" or "InnoDB" works for me. Deleting the line "COLLATE=utf8mb4_0900_ai_ci" in install.sql is not working for me. I will have to investigate further. For now please use "utf8" instead of "utf8mb4".
    1 point
  8. @Andy Thanks for reporting back! I just pushed an update (0.8) which should fix the issue with the file uploader. The file uploader now respect the extensions setting of the corresponding file field and shows an allert for unsupported file types. By default the video file field that comes with the profile (pg_video) only allows the extension mp4 (See screenshot). But you can add webm here if you want.
    1 point
  9. Hi all! Just dropped in to say that this module is not abandoned. I’ve been super busy with my paying projects and also in personal life at the moment so I haven’t found time to fix current issues. If @patman or someone else is willing to push PRs or even to make full rewrite I’m happy to pull them in. Current issues are easy to fix tho but unfortunately my time is VERY limited for the rest of the year.
    1 point
  10. this is because require_once "loads" the content from the file and displays it ? Of course, if you delete the part, it will no longer be displayed. But it can have negative effects, since you don't seem to know what the included file does.
    1 point
  11. Just noticing I actually messed up that module with a commit I made but someone already sent a fix, let's hope it gets pushed.
    1 point
  12. @Ivan Gretsky Absolutely, that would be great.
    1 point
  13. Note for anyone who reads this thread, the Module elabx suggested is set to do Twitter posts in Spanish. If you want to switch it to English, change line 277 to: "&maxwidth={$this->maxWidth}&maxheight={$this->maxHeight}&lang=en"; (formerly it was lang=es for Spanish) If you get the missing semicolon problem like I did, just add a semi colon to the end of line 163.
    1 point
  14. @Mats, would you allow someone to take it over? We need this and looking for a way to make it maintainable.
    1 point
  15. This week I've worked through a few minor issue reports in both the core (ProcessWire) and InputfieldTinyMCE repositories. In addition, a new version of InputfieldTinyMCE was released that includes various improvements. We'll likely go through a few minor versions of this module before it is added to the core. I recommend downloading the latest posted version (6.0.3). Thanks to all that have been helping to test and report issues as they come up. I'm going to give the core another week or so of updates before we bump to the next version there. If you've recently launched any new sites, please add them to our sites directory at processwire.com/sites/submit/ when you have a moment. And if you aren't already subscribed to the ProcessWire Weekly updates email be sure to subscribe. Thanks and have a great weekend!
    1 point
  16. @chuckymendoza try commenting out line 247 and 248: /** * is_nan(NULL) is deprecated in PHP 8.1 and $key[64] is not initialized if(is_nan($c2)) { $e3 = $e4 = 64; var_dump($c2);} else if(is_nan($c3)) {$e4 = 64; var_dump($c3);} */ worked for me without an issue and I do not see the purpose of the code.
    1 point
  17. As you can use almost ANY available HTML in ProcessWire... the part of buying templates/themes is self-explanatory. While selling themes... there are some (3 or 4 I know of) but that's it. As ProcessWire is so individual in a lot of areas, creating themes only works out for basic setups like blogs or something. That's the reason I dropped most of my starter profiles a while back. Those worked for what they were but supporting tons of "I need this, that, and whatever ... BUT without paying anything" made me drop them completely. Yet selling full-projects based on ProcessWire is thing that works out pretty well if you know your audience/niche.
    1 point
  18. Not really. The difference being that wordpress assumes you are wanting to write a blog, and as such there are a reliable set of core fields and design expectations that are the bare minimum and take into account the minimal technical back-end file structure required to accommodate 'the loop'. The good news is, you don't have to use a template that is that sophisticated for Processwire. ANY HTML template will do - even from an old static website. And since every field is essentially a custom field (like ACF or pods) it takes very little effort to convert an existing static HTML design with slices into a template that Processwire can use. The simplest form for using regular HTML is probably the 'direct output' strategy: https://processwire.com/docs/front-end/output/direct/ To get that sort of simple construction methods for Wordpress quickly you often need to use a tool like Pinegrow that can take a static HTML template and split it up appropriately into the various default template files and structure that Wordpress can accommodate. But it you are already going that far, you may as well develop it yourself.
    1 point
  19. Here's a working example for you: <?php namespace ProcessWire; $showForm = true; if ($input->post->upload) { $tempDir = wire()->files->tempDir('userUploads')->get(); $uploaded = (new WireUpload('uploadedFile')) // same as form field name ->setValidExtensions(['txt', 'png', 'jpg', 'pdf']) ->setMaxFiles(1) // remove this to allow multiple files ->setMaxFileSize(10 * pow(2, 20))// 10MB ->setDestinationPath($tempDir) ->execute(); // $page = $pages->get(1234); foreach ($uploaded as $file) { $filePath = $tempDir . $file; // $page->files->add($filePath); echo $filePath . "<br>"; } // $page->save('files'); if (count($uploaded)) { echo sprintf("Uploaded %d files", count($uploaded)); $showForm = false; } } ?> <?php if ($showForm): ?> <?php // Adding enctype is crucial!! ?> <form method="POST" action="./" enctype="multipart/form-data"> <label for="uploadedFile"> Upload: <?php // suffix name with [] and add multiple attribute if you allow multiple files ?> <input type="file" name="uploadedFile[]" id="uploadedFile" multiple> </label> <div> <button name="upload" value="1">Upload</button> </div> </form> <?php endif; ?>
    1 point
  20. This fork of AdminBar (https://github.com/teppokoivula/AdminBar) can be very useful in this situation. Style it to match your site and it's a very quick way to give logged in users the ability to edit and add new child pages. It won't ever be as flexible as building your own frontend form and processing using the PW API, but it's very easy when you have complex forms to reproduce, especially if there is image upload and ASM type select fields to reproduce. This screenshot shows that you can add a "New +" child page when viewing the main portal parent. This screeencast shows editing an existing entry:
    1 point
  21. HEY, Thank you all for your comments! My client loved seeing them too, so thank you. The site is now live: http://horton-stephens.com/ Tutorial coming this week, anything in particular people would like to know? Thanks
    1 point
×
×
  • Create New...