Jump to content

ngrmm

Members
  • Posts

    475
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by ngrmm

  1. i created a new role and activated all permissions but publish. now a user is able to create and edit new pages with this role. but editing existing pages (created by superuser) isn't possible ? templates acces rules are also set right
  2. hmmm...was easier than i thought however, if someone wants to do it: here is a good how-to by Ryan: @Autofahrn you were right. makes more sense by json. it's also way faster ?
  3. reason is my shitty javascript skills. i'll give it a try ?
  4. don't think so. i have a follow up question. i get data as a whole. is there a way to get the content of specific fields. like data->divWithClassX? i want to update the content of two different divs on the page. do i have to that with the json-method?
  5. yeah! thx @Autofahrn my mistake. i had a variable defined in my header.inc which was missing!
  6. i did, 500 error again! send @ jquery.js:2 ajax @ jquery.js:2 w.(anonymous function) @ jquery.js:2 (anonymous) @ main.js:43 dispatch @ jquery.js:2 y.handle @ jquery.js:2 main.js:43 $.get($("this").attr('href'), function(data) {
  7. thx i had also another typo ? no errors now. but after clicking, the whole page is reloaded ☹️
  8. my ajax-reload leads into a 500 error (console) am i missing something? i just want to reload the random content of the the #data-div template-markup: if(!$config->ajax) { include("./inc/header.inc"); echo "<a href='$page->url' class='button' >PRESS THE BUTTON</a>"; echo "<section class='content' id='data'>"; // some images echo "</section>"; include("./inc/footer.inc"); } else { echo "<a href='$page->url' class='button' >PRESS THE BUTTON</a>"; echo "<section class='content' id='data'>"; // some images echo "</section>"; } and js: $(".button").click(function() { $("#date").html("<p>Loading...</p>"); $.get($(this).attr('href'), function(data) { $("#data").html(data); }); return false; });
  9. true, i dont like them either. but due to GDPR is a european law to have them. technically you still have them even if they are blocked. only problem are clients who do not understand this ? but maybe you add a note into the module, that it might get blocked by adblockers.
  10. i use ADB in chrome. it updates automatically. it seems that https://www.i-dont-care-about-cookies.eu/ has been added to ADB-chrome. i guess by avoiding word like cookie, overlay, … in the dom-elements it's possible that it wont get blocked
  11. thx problem is solved. found out that the latest adblockplus-browserplugin blocks it ... hihi
  12. hi somehow i cant see the cookiebanner on frontend. it's always on display:none fro the start. could TXT records (SPF / DKIM) have any effect on this module?
  13. thats right, but how about updating prices based on billing address?
  14. hey @kongondo thx for updates some years ago i built an multilang-shop with padloper. there is always an issue with prices based on user-lang or user-location. some shopowner want to force their users to see the a different product-price based on their location. example: user from germany pays: 20€ user from poland pays: 18€ i know this not depends on padloper. but maybe there is a possibility for force-switch the language in the new product-template. or maybe update the price at the checkout if the user enter in the final billing-address. i hope you understand what i mean ?
  15. the website has several languages: english, german, … (left-to-right) and arabic, farsi (right-to-left) englisch is the default-language but only some parts/fields are translated. everything works fine. if a text-field has no translation, the default-language will be shown instead. BUT there is a problem: when user-language is arabic (rtl) i just want to set "dir=rtl" or a class on those div's with arabic-language output. i tried it this way. But got an error. I thinks it's because the second field is from another $page. Anyway this isn't the best way because $rtl and $langclass should be unique. Whats the best way to solve this problem? $userLang = $user->language->name; $userId = $user->language->id; $page->of(false); // turn off outputFormatting (if it's not already) // get unformatted textfields $body = $page->body->getLanguageValue($userLang); $otherPageTitle = $otherPage->title->getLanguageValue($userLang); // check if user lang is rtl if($userLang == 'fa' || $userLang == 'ar') { // check if var translation exists if(!$body == '') { $rtl = "dir='rtl'"; $langclass = "rtl"; } // no translation: output default else { $body = $page->body->getLanguageValue('default'); } // check if var translation exists if($otherPageTitle != '') { $rtl = "dir='rtl'"; $langclass = "rtl"; } // no translation: output default else { $otherPageTitle = otherPageTitle->getLanguageValue('default'); } } echo "<div class='$langclass' $rtl >$body</div>"; echo "<div class='$langclass' $rtl >$otherPageTitle</div>";
  16. i installed the module and its working fine! thanks @bernhard the module uses the pw-InputfieldSelect output. is this the reason why the current template is always at top/first place? is there a way to change that? i just want to keep the sorting.
  17. i was able to get it this was: $files = glob("../dir/*.*"); $files = array_combine($files, array_map("filemtime", $files)); arsort($files); $latest_file = key($files);
  18. i have jpegs inside a folder (images). the folder is located in the templates-folder of PW site > templates > images every 30 minutes a script generates and saves jpegs into the images-folder. the all have a unique filename. is it possible to save all those images into a image-field through API? if not, is it possible to add the newest one into the imagefield? i found this $p = $pages->get(1001); $p->of(true); // if in a template code, turn off output formatting $p->images->add("http://placehold.it/350x150.jpg"); $p->save(); $p->of(false); but i don't know how to grab the url automaticly of the newest file.
  19. thx @lokomotivan actually i was able to append a div with javascript and to use it as a overlay. ps: i also found this
  20. thx @Sergio i found this one and give it a try https://modules.processwire.com/modules/avb-image/
  21. thx, good idea but i need IE11 support
  22. is there a way to output jpegs with a color-overlay? i'd like to have a transparent image with a black background. the admin should be able to set the opacity. unfortunately i'm not able to change the dom-elements or add some. so, i have a div with a background-image and a field where i can set a number (0 – 100). is there a way to let PW create an image with some kind of a color-overlay to darken an image?
  23. all of a sudden module stopped working. i do not use any caching. i'm a bit puzzeld what happened any changes from facebook?
  24. /old-dir/{all} -> /new/ was exactly what i was looking for. thanks!
  25. is there a way to setup a a redirect for all files and children-directories of a directory example: /old-dir/ /old-dir/child-a/ /old-dir/child-b/ /old-dir/child-b/test.jpg they all should be redirected to /new/ can this be achieved by just one rule? something like /old-dir/* > /new/
×
×
  • Create New...