Jump to content

fruid

Members
  • Posts

    434
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by fruid

  1. would be great if you could add custom cookie categories… as of now you can only use and rename the existing ones and those are not plenty
  2. I'm facing some problems with including AdSense on a PW page. I basically think I've done it right, put the code in the <head> tag and done, the ads show. In my Google AdSense, there's this tool that gives you a preview of your website, where you can edit the appearance of ads (delete, change the type etc.). The problem is though, I cannot access the subpages and I don't know why. I have reached out to the google community already who suspect the usual culprits (delete Browser Cache, switch Browser) but that doesn't help. My guess is, that it has to do with the "markup regions" output strategy that PW provides and that I indeed use for this site (and all my PW sites). Could that be the case? Does the <head> tag load last?
  3. the System Override option only appears in a later PW version, after updating to 3.0.200 I was able to see it. all good
  4. Is PrivacyWire GDPR compliant? (General Data Protection Regulation in the EU) I'm in the process of implementing Google AdSense in a site. I could just leave out personalised ads altogether, which is what I do for the time being, but it's good advice to include it because of a higher ROI. To my understanding, if you want to include personalised ads in the EU, you need to give the user the possibility to opt-in and opt-out of personalised ads. I found these articles in the Google AdSense docs https://support.google.com/adsense/answer/9681920?hl=en https://support.google.com/adsense/answer/10961068?hl=en#zippy=%2Cgdpr-messages-with-two-buttons-manage-options-consent So it looks like Google offers to take care of the relevant privacy notifications and opt-in/opt-out buttons with a separate pop-up dialogue, but I want to have all that stuff handled in just one banner/dialogue (PrivacyWire), anything else is just too annoying for the user. So any chance I can accomplish this with PrivacyWire?
  5. I cannot delete the SnipWire dashboard page, I get: PagesTrash: Page /trash/1029.2.2_snipwire/custom-cart-fields/ (1030) cannot be deleted: it has “system” and/or “systemID” status I also tried to uncheck the 'system' checkboxes of the page-settings but that does not help. (discussed here). Here's the long story. Because I've developed a custom shop module I'm in the process of deleting SnipWire completely, so far with no success though. What's the right procedure? Here's what I do, does that make sense? remove unused SnipWire fields from templates unlink templates currently linked to SnipCart for indexing delete SnipWire templates delete SnipWire fields (some I re-use in my code, so I merely re-name those fields) delete SnipWire TaxSelector (fieldtype) delete SnipWire Markup (module) delete SnipWire Dashboard (module) delete SnipWire (module – can I just delete this one and it takes care of everything else?) thanks for help! EDIT: OK, turns out when updating to PW version 3.0.200 I get a System Override: Override (must be added temporarily in its own save before system status can be removed) option in the field's settings (or where ever). When checked and saved, then I can uncheck the system checkbox. Then I can delete. Maybe that helps someone else in the future, anyways, thanks for nothing I guess 😄
  6. thanks, but doesn't work either. I cannot change the status as described. There's actually two "System" checkboxes to toggle here: System: Non-deleatable and locked ID (status not removeable via API) System: Non-deleatable and locked ID, name, template, parent (status not removeable via API) If I uncheck these checkboxes and save, it's checked again. Ironically enough, these checboxes aren't even checked to start with and the page is still impossible to delete. Thanks for help.
  7. I'm in the process of removing a module (SnipWire) and all dependencies, templates, fields and pages. Now there's an admin page in the trash which I cannot delete I get: PagesTrash: Page /trash/1029.2.2_snipwire/custom-cart-fields/ (1030) cannot be deleted: it has “system” and/or “systemID” status What to do?
  8. OK thanks again. Anyways, I was looking into other modules that seem to use a different approach. Instead of relying on an admin-template with fields or constructing custom fields, they just create plain sql tables in the database via mysql commands (e.g. module ProcessPageViewStat). It would then render a form or whatever in the admin area to display the data in that database table. Is that good practice? What are the dangers? To be honest, I also struggle with creating custom fields which would go a long way for me in order to create custom modules. I'd like to construct custom fields, possibly also include custom javascript or components of some framework/library (vue.js, jquery, …) I remember having seen a dummy/boilerplate-module that illustrates and walks you through the process of creating a custom field, just cannot remember the name… thanks for help
  9. @Jan Romero thanks, what you're saying makes good sense. Creating pages instead of repeater items for each post input seems a good solution, provided that those pages can be admin only. However, for this particular use case, I prefer to have all user submissions on one page, just would make things much easier for my intentions. So I would need to create a template for that new admin page which includes a repeater field or ProFieldsTable field (I have been using that), right? Do I do that in the templates section of the admin area ("add new template") or programatically? It seems to me like those admin pages and templates are created differently… I think that's what I struggle with mostly. Also, creating a custom fieldtype is something I would love to be able to do, just couldn't wrap my mind around it yet.
  10. is there a way to store the user input (post) in some custom admin page? I don't need a new page for each submission, just one page, not visible to the user, only to me in admin with a list/table of all user submitted data.
  11. yes that's the one. I had the issue before a long time ago. still recovering from racking my brain back then
  12. I'm doing if ($config->ajax) { echo "THIS IS AJAX"; $this->halt(); } else { echo '<div id="content">'; echo 'THIS IS MY REGULAR CONTENT'; … echo '</div>'; } and I use $config->prependTemplateFile = '_init.php'; $config->appendTemplateFile = '_main.php'; $config->useMarkupRegions = true; $config->useFunctionsAPI = true; in the config.php However, the site stills loads the entire page in the ajax response, which is not what I want of course, I get the header and menu etc where I render the response (result.innerHTML = response); suggestions?
  13. I'm trying to understand the basics of module development in PW. I'm quite confused with the structure of it. what I put figured out so far… the object class "Process" is going to be applied as a "process" to the admin page and attach to the top menu of the admin panel. The function __execute is what puts content on this page. Here's my first question: How can I add input fields for content to be added to the database? then you have the module itself that will appear in the modules tab (and page tree under admin but hidden). There I can add input fields via the class ModuleConfig and the function __construct am I right? but also, you can navigate to the modules section, overview of all site and core modules (and uninstalled ones and new ones) where you can see another "settings" button which doesn't appear on the module's detail page. (a bit weird, isn't it?) anyways, long story short, I'm quite confused about the different classes and which one I should actually use when building a module and how to know. I might add that I'm not a php expert, though I have built a bunch of websites with some rather complex templates in PW already, I still haven't touched any of this stuff. Maybe it's still some of my lack of understanding of php (also need to learn about the difference of implements and extends for example) but I feel that these PW classes are somewhat arbitrary. So is there a way to get more clarity on that?
  14. Hello all, I'm familiar with HannaCode and use it on some projects already. Now I wonder what it actually is good for to apply it as a text formatter on a template field. Here's what I'm trying to accomplish and where I thought it would be a good solution to use custom code for. For a shop "module" (not yet a PW module, but some php and javascript files) I'm working on, I need a way to allow for stacked prices, say a different unit price when buying 10 units. So since these unit prices and stack price rules would differ from product to product, I thought a very simple, fast and flexible solution would be to allow for custom code injection. So for example the content manager could write: if($itemAmount=10){$unitPrice=30}else{$unitPrice=35}; Does that make sense? So long story short, I need custom code on specific pages. Is that possible with the HannaCode Text formatter?
  15. only removes the first opening double quotes, the second closing double quotes stay 😂
  16. also… if ($page->isChanged('seo_title') || $page->isChanged('seo_image') || $page->isChanged('seo_description')) return; is there a nicer way to do this?
  17. I'm trying to add hook before the page is saved. Then it should check if the SEO fields are empty and if so, use page's field's values that make sense. let me illustrate: $wire->addHookBefore('Pages::saveReady', function($event) { $page = $event->arguments[0]; if (!$page->id) return; if ($page->isChanged('seo')) return; if ($page->seo->title == '') { if ($page->template == 'speaker') { $page->seo->title = $page->academicrank.' '.$page->givenname.' '.$page->lastname; $page->message(':D'); // just to make sure the conditions are set right :D } else { $page->seo->title = $page->title; } } $event->arguments(0, $page); }); Something like this. I do get the message : D, so the issue is not there. However, the seo title field stays empty. Any ideas why this is not working?
  18. is there a $sanitizer method that can remove quotes? I need to remove them for SEO.
  19. also, sharing via facebook is not embedding the image. It seems to work fine with twitter and linkedin but not facebook. I'm using the module MarkupSEO to declare the social media image. When simply sharing the page-url on social media platforms manually, it seems to work fine, so that module doesn't seem to be the problem. However, I added <meta property="og:image:url" content="<?php echo 'http://'.$_SERVER['HTTP_HOST'].$page->poster->url; ?>" /> (as suggested further up) in case that's required for fb because the MarkupSEO-module doesn't provide that tag. Doesn't help though. And then also, I do not quite understand what the following means ?u={url}&title={title}&text={text}&media={media} these are placeholders? what goes in here for real? Lastly, I should mention that on the page itself, the image is not displayed, i.e. not included in the <body>, because it would be redundant with an embedded iframe on the page, so we left it out. Don't know if that's the issue. Thanks for help!
  20. nice module. Could you also make it possible to just copy the current url? What I mean is add another button that when clicked copies the current url to the clipboard. I'm trying to accomplish that with the current options of the module but no luck. Maybe if I could hook the function before rendering there would be a chance…
  21. webhost told me NTLM is not supported by our mail server, server runs Linux (Debian). What to do?
  22. it is, namely OpenSSL/1.0.2u
  23. This module doesn't send mails anymore, though it used to before. The module cannot connect to the email server: [0] string(87) "could not start TLS connection encryption protocol: STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT" and also: C STARTTLS S 220 2.0.0 Ready to start TLS Starting TLS cryptographic protocol could not start TLS connection encryption protocol: STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT I spent hours searching the error. Now I realised that our host uses php version 8.0.14. Might this issue be related to the php version?
  24. I need some sort of module like, or why not the exact module that is used in this very forum to add tags to a page. You start typing, it suggests tags, you select a tag from the list OR you type a tag, hit tab and the new tag is entered (is it added to the list of suggested tags too?). I have used TextInputAwesomplete before for other projects, just tried to use it again but it's quite stubborn and not exactly what I had in mind. Thanks for help!
×
×
  • Create New...