• Content count

  • Joined

  • Last visited

Community Reputation

2 Neutral

About androbey

  • Rank
    Jr. Member
  1. Hi @Maddogi, did you also make sure that "German" is selected in your user profile?
  2. Hi @flydev, thank you for your answer. It helped me finding my mistake (although I am not understanding what my mistake actually is). //this does not work (no output) $field = 'donationtext'.$lang; $test = $this->field; //this does work however $testArr = $this->data['donationtext'.$lang];
  3. Hi @Zeka, thank you for this link, didn't find that one. However, that did not worked out well for me. After applying the concept of Adrian, I always got the not default language outputted. I have a hardcoded version now. It's not good practice, but it does its job.
  4. Hi there, I feel like I have another rather stupid question, but I am stucked in a problem. I wrote a small module, which makes use of the multi-language option. The inputfield code looks like this: $donationText = $this->modules->InputfieldCKEditor; $donationText->useLanguages = true; $donationText->name = 'donationtext'; $donationText->label = 'Donation CTA Text'; $donationText->value = $this->donationtext; $donationText->required = true; $wrapper->add($donationText); My simplified render method in the module looks like this: public function renderDonationCTA(){ echo $this->donationtext; } However, when I call this method in my template code only the default language gets outputted. What did I miss or what can I do, in order to output the inserted text in the "right" language?
  5. Hi there, I was wondering if it is possible to use an image field with the popular "Simple Contact Form" of @justb3a? When I tried I got the following error message (without even "uploading" an image): Call to a member function path() on null in C:\xampp\htdocs\pw2\wire\modules\Fieldtype\FieldtypeFile.module on line 184 As I don't want to save messages on the server (so just sending an image), it shouln't be a security issue, I guess. But is it possible to use an image field with the SimpleContactForm module?
  6. Hi @szabesz, thanks for pointing out. Definitely will have a look at this module. Seems to be a more practicable way, like @Robin S wrote.
  7. Hi @Robin S, thank you very much for your reply. Really appreciate your help. You are right, in general my logic wouldn't make sense at all. In my case this field serves as a kind of archive (which is necessary to satisfy a duty to preserve records), even though I know it's not ideal. Anyway, I think I have still a lot to learn about hooks and how to use them. Have a good day!
  8. Hello, I'm rather new to ProcessWire, but love all the possibilities it gives us. Also, I'm a rather unexperienced developer, so please forgive me. What I like to achieve: I want to prevent users (that are not superusers) from deleting files (which are uploaded through/with a file field in ProcessWire) or at least to send a mail when someone deletes that file. I'm developing a kind-of intranet for a NPO in order to push digitalisation. However, for quality management, files should not be deleted unnoticed by not authorized persons. Is this kind of thing even hookable? I found with the help of Captian Hook, that there is a delete hook for fields and also this one: $this->addHookBefore('Fieldtype::deleteField', function(HookEvent $event) But I'm afraid that this won't help for my issue, will it? Here's my very first attempt of a module.. class Disabledelete extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Disable File Delete Functionality', 'version' => 3, 'summary' => 'Should disable delete functionality for files.', 'singular' => true, 'autoload' => true, ); } public function init() { $this->addHookBefore("File::deleteField", $this, "disableDelete"); } public function ___disableDelete($event) { //But what to do here? (If even here!) } } Hope you can help me out there!
  9. Hi @flydev, thank you for replying. Works as expected. Thank you for your help!
  10. Hello again! Unfortunately I came across another problem. I have a "regular" ProcessWire setup and want to create a separate php script. That script should be executed by a cron job and is bootstrapped with my PW setup. Main goal is to send mails which are stored in a email field. My problem: I want to access a specific field from a template where only specific users have access to. Right now, the cron job is executed as "guest", of course. How can I bypass this restriction, so that I have access to that specific field (it's only one email field)? Does it make sense to set current user via api? Hope you can help me out there. Cheers, Andreas
  11. Hi bernhard, thank you for your tips. You're right, using a workaround I could nearly get the desired outcome. However, I would say that both solutions come with a huge downside (uploading more images than necessary..) .
  12. I think it would be a great advantage for images to have an option to translate image tags, alongside the translatable description field (when using PWs language feature at all). This feature could improve the multi language support in ProcessWire even further, thus the usability of it. As a side effect that would also mean, that image tags could be easily used with the search engine, when dealing with a lot of images.
  13. Hi @heldercervantes, thanks for your reply. I see and I was afraid to hear that. Personally, I wouldn't have a big problem using extra fields for that purpose, but it looses a lot of usability for the actual client using the feature. As I am using the build in API to find images based on tags (and the capabilities that comes along with that), it would mean a huge loss for my current implementation. Thanks also for the hint to add it to the feature request list. Will add it there.
  14. Hello there, I was wondering if it's possible to somehow translate image tags. Right now I have a page which outputs all images related to one tag in a single container (as there are many tags this results in various containers). Every container has a title (and id) with the tag string, but currently only in the language of the entered tags. Using the PW format inside the code like this does, of course, not work.. _x($variable,'translated Tag') Is there a way to achieve this, without using workarounds (like extra fields)? Cheers, Andreas