Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by ngrmm

  1. thx @Jonathan Lahijani, i'm not a pro and don't know how to do your workaround. but it tried it with simple str_replace() and it works πŸ™‚ $content = $page->body; echo str_replace("<a","<a style='color: red'",$content);
  2. i'm using a pw-page to output a newsletter-email and send it via promailer. this page has a textarea-field (ckeditor). i searched a lot but was able to find out how to automatically add inline style to a-tags. like: <a href="#" style="color:red;">…</a> adding a class via mystyles.js or config.js will not work because it's a newsletter-email. mail-apps would override class-styles. it has to be inline
  3. thx @dragan and @flydev ok i understand. this also means that i'm not able to remove items (fields) with ->remove()?
  4. i want to output some of my pagefields as options in a html select tag i can do this this way: $search_options = $templates->get("catalog_item")->fields; but i'm not able to sort them: $search_options = $templates->get("catalog_item")->fields("sort=label"); array_multisort() ksort() doesn't work either. is sort limited to pagearrays?
  5. try to use RewriteBase /page in your htaccess no need for a RewriteRule
  6. thx but how do i extend it globally in config.php? is there something like this? $config->sanitizer->pageNameUTF8(int $maxLength = 200);
  7. i get 404-Errors when my url is longer than 128 characters using pw 3.0.127 where do i find the options to set a higher limit?
  8. i'm trying to reduce redundancy and creating a structure which can be used later (relation-links) some existing should be also used as tags beside the new ones. yes yes ok, i though PW would use the first settings (parent/template) for creating the new pages, and additional setting and selector for additional options any tutorials/how-to for backend-hooks?
  9. i'm using a page-field with the inputfield-chosen-select-multiple as a tag-system – there are two different templates (template_A & template_B) which can be chosen – and both have different parents (parent_of_A's & parent_of_B's) – new pages (tags) generated from this field should be children of parent_of_A's and have template_A so i've chosen parent_of_A's as the parent and template_A as template. and selected template_B as extra template. this is must because that how the system know where to put the new pages. but this does not work when i try to add other templates as extra-templates or with the selector string method. error says: not the right template only using selector-string-method works for choosing, but no new pages can be generated
  10. 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
  11. 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 😁
  12. reason is my shitty javascript skills. i'll give it a try πŸ™‚
  13. 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?
  14. yeah! thx @Autofahrn my mistake. i had a variable defined in my header.inc which was missing!
  15. 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) {
  16. thx i had also another typo 😫 no errors now. but after clicking, the whole page is reloaded ☹️
  17. 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; });
  18. 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.
  19. 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
  20. thx problem is solved. found out that the latest adblockplus-browserplugin blocks it ... hihi
  21. 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?
  22. thats right, but how about updating prices based on billing address?
  23. 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 πŸ™‚
  24. 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>";
  25. 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.
  • Create New...