Jump to content

virtualgadjo

Members
  • Posts

    338
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by virtualgadjo

  1. @imandreas really funny this short delay but sure there must be something else allowing it to start again from every movement in the admin or you would be unlogged all the time and get crazy πŸ˜‚ i'll have a try at this module to try and understand a little more how it works but it still doesn't tell us where the problem was... maybe it simply needed an update due to the php version and re-installing it did that update by itself!? have a nice day πŸ™‚
  2. Hi @imandreas really glad you solved it! πŸ™‚ and wow, 50 secosds for a session lock, you have to be typing faster than ussein bolt πŸ˜„ have you checked if re-installing the module has changed this curious delay? have a nice day
  3. hi, hard to really answer not knowing the exact situation, local, online... but the first thing that comes to mind would be if online,, has your hoster suddenly changed the php version (a simple phpinfo in your website root will tell you) if yes, can you choose your php version and go bak to the one used when everything went well before updating your pw install and then, why not, upgrading again the php version up to one with which eveything is ok of course, all this if there was a time when averything went well, usually the case with pw πŸ™‚ if not, let us know with some more details about the full situation, config, online or not, pw release, php version and so on have a nice day
  4. Hi all, just added a repo for the 3.0.246 rmaster branch release even if very few changes (only two sentences about a potential page "trash" status error) since the 3.0.244 one https://github.com/virtualgadjo/pw-30246-lang-fr have a nice day
  5. Hi @adrian thanks a lot for your answer and yes, it helps a lot and proves that i have to update the module πŸ™‚ very good idea this separate option for the system dates πŸ™‚ the funny thing is that i usualty set the output on non formatted for the date field as well as the system date fields as i onten have to use my own multi language formatting function but in this case i just need a readable "modified" date in the csv as a reminder thanks again for your answer, update in progress within two minutes πŸ˜„ have a nice day
  6. hi, to be honest when it comes to CKE i tend to use js extra config, for example, in the site/modules/InputfieldCKEditor folder i put a file called config.js with CKEDITOR.editorConfig = function( config ) { CKEDITOR.config.fontSize_sizes = '8/.5rem;10/0.625rem;11/0.6875rem;12/0.75rem;14/0.875rem;16/1rem;18/1.125rem;20/1.25rem;22/1.375rem;24/1.5;28/1.75rem'; CKEDITOR.config.extraAllowedContent = 'section[id,class]'; }; that will define a custom font-size combo list and, just tried and check this one, allows me to add sections with an id and or classes even with ACF on (new for me as i didn't use them before but it was fun to try πŸ˜„) but htmlpurifier off as i don't know how to play with its config, i never did... i'(m sure it's quite easy to extend up to whatever else you need to allow
  7. Hi @adrian i'm wondering where i could put my saussage like fingers to get the las modified date (and why not the created one) as they are stored in the db (mysql readable dates) instead of the unix timestamp i get in the output, weather i ckeck the outpu formatting or not (which sound quite normal as they are not really fields :)) if ever i could even use a formatting function somewhere in the code, of course, i take πŸ™‚ i'm sure i must have missed something but, so far, i can't see what and where... thanks again for your help πŸ™‚ have a nice day
  8. i still have some websites done when pw used cke and the native pw div plugin works fine i've also used the cke one but those you download often need some dependencies (panel, dialog, richcombo and so on) to work, the div manager one needs dialog coming to htmlpurifier and acf, i rarely use them but if yes (could be important for front end editing which i never allow...), you can allow some extra content to tell ACF not to delete some tags you need and not to go crazy πŸ˜„ (this is more for cke, with tinymce it's a bit simpler with custom json settings like { "extended_valid_elements": "section[width|height|title|aria-labelledby]" } just an example you can go far further πŸ™‚ have a nice day
  9. Hi, just in case, you may be interested in this little thing i wrote after a thread i took part of about the same topic πŸ™‚ https://github.com/virtualgadjo/pw-tinymce-div-plugin have a nice day
  10. Hi @AndZyk actually, the first thing i wuld think about is that when your post number grows, the two categories and tags folders will be a little less easy to find and modify but, honestly only an admin usability problem for me, the important thing is what you say about this url thing and not allowing url segments (no security issue with them if you use a simple regex to say what you allow and a simple die if somebody puts something taht doesn't match nor is in the retreived/checked arrays) as, i must be used to too complicated demands of categories and/or tags selections and most of all, even with simple ones the necessity to allow mutiple categories for one post, if only one category allowed by post i would simplify the structure with the one i showed in the previous one as yours πŸ˜„ in the end, when it comes to seo the real important thingis this only one url for a blog post whichever list/category/tag you're linking from and you are absolutely right, there no right or wrong structure, the only question for me is which one makes things the most simple to use depending on what you need (and, in a certain way, on who will use it, you and i are "a liitle" used to pw and its incredible features, it's not always the case of all the people we make website for and i tend to try and give them the most obvious admin i can, their love and addiction to pw will grow and let me be maybe a little more pw geeky along the website life πŸ˜„ Have a nice day
  11. hI, maybe i should explain a litte more πŸ™‚ in the structure i use, blog posts are indeed children of the main blog page (and template, i'll go back to this later) and categories an tags are just a way to select which posts you want to display depending on url segments the important thing to me is that, whatever "list" you're coming from, domain/blog/ domain/blog/tag_n/ domain/blog/cat_n/tag_,n/ and so on, when you click o a post its url will alwasys be domain/blog/post_n, no duplicate content, url segments making easy to use back to the list link, bookmark (and are prettier than js url hash but those could be used too) now if you're sure (iron sure changing your mind would be painful to restructure), the posts will only belong to one category, @AndZyk's structure is a the best solution keeping only the tags outside the blog "folder" --- Blog -> template blog-index Category 1 -> template blog-category Post 1 -> template blog-post Post 2 Post 3 Category 2 Post 4 Post 5 Post 6 Category 3 Post 7 Post 8 Post 9 ... Tags -> template blog-tag-index Tag 1 -> template blog-tag Tag 2 Tag 3 ... @Alpina, well yes and no πŸ˜„ first of all think of the blog with 50 say 100 posts, coming into the admin to add a category or a tag, i don(t know why but i think you would be happy to find those "folders" outside the main blog one instead of having to look for it under a tide of posts, less clicks, best life :) and as pw makes my life (and my clients' one) so easy, i try to keep it this way πŸ™‚ the other thing, and in this case i'm always thinking i'm making the website for somebody else, friend, or client and not for me..,. i'm a huge fan of the children tab features which template is allowed for parent/children, in this case, when my victime clicks on the new button of the blog parent the created child has a blog_post template without having to choose (and make potential mistakes) well you could say that setteing the category and the tag parent templates on can't be used for new pages it would work too but think about the previous point i spoke about i have maybe a strange habit but making a websit i always think - as if it is not for me (well that's mainly the case πŸ™‚ ) - think of it not as it is just when i'm making it but a few months or years after being used, sort of a reality principle and when thnking about a structure, i'm under a storm of "what if...?" (and so are my victims :D ) there must be no exceptions, each exception becoming a rule, it makes things a liitle longer to decide but so more confotable to use afterwards... well i think i should call it a post :D have a nice day
  12. Hi, sorry to be so late to answer, hit week... πŸ™‚ actually it's quite simple, i would use your folder but this way Blog -> template blog-index Post 1 -> template blog-post Post 2 Post 3 Categories -> template blog-cat-index Category 1 -> template blog-category Category 2 Category 3 ... Tags -> template blog-tag-index Tag 1 -> template blog-tag Tag 2 Tag 3 ... then in your blog post template i would add two page-reference fields, one for the categories (parent => categories) and on for the tags (parent = well, guess :)) this way each post can easlily belong to various categories and have as many tags as you need afterwards, for your main blog index template allowing page numbers and url segments it's easy to add a selection of the posts based on the categories and/or the tags with,, in both cases, the ability to have a pagination as well as for the main list of posts depending on the way you want to filter your posts you'll just have to check the url segemnts, if only one (pagination or not, you can check if it is a category or a tag, if two either you decide the order (category/tag) or just check what kind is each one (easy to do making arrays of the available categories and tags to check in which one is which segment) something more, this way, each post will just have only one url yoursite.com/blog/thepostname no matter from which selection you're coming avoiding many potential isszues with duplicate content, categories and tags being only a way to select which posts are displayed on your page hope it's a little more explicit πŸ™‚ have a nice day
  13. hi, well, first i must say for many reasons (seo, menu building, sitemap and so on) i wouldn't structure e blog this way, instead i would put the two parents (categories and tags) outside the main blog parent page and then use them with page reference and url segments but well... now if you want to easily cheat, blog posts are usually ordered by reverse chronological order, then guess, add your date field to the, categories and tags parent pages and set them with a last century date πŸ˜„ job done, those two parent pages children can still be ordered the way you want have a nice day just modified to say @AndZyk was faster to have the same king of idea while i was writing πŸ™‚
  14. Hi all, just in case https://github.com/virtualgadjo/pw-30244-lang-fr as always, core tranclations only,, maybe one day i'll do the same for some modules, well, maybe πŸ˜„ have a nice day
  15. hi, in a two languages website, of course i would use two fields and use the specific one if filled, in your case i would probably tend to use a naming convention with _iso for each languageexecpt for the default one, this way, parsing your fields, it's easy to check if toto_pl.jpg exisits, if not, just use toto_jpg, it would work for any language number and, as it's easy to retreive the used languuages iso even if your client suddenly decides to add a new one and more, give your client the good habit to get used to naming convention πŸ™‚ have a nice day
  16. hi, i use profield table a lot too with this import export module but you know, as soon as you're speaking of dates, that's why @bernhard and i have this same reflex: fullcalendar (i think his module is based on fullcalendar too but making your life a lot easier than when you deal with it by yourself πŸ™‚ ) as you say, there are so many ways to deal with things in pw, repeaters could have been one too, and that's make pw so your cms and not just a wp like one in which you must do things the only way it's made for, i even sometimes use pw more like a framework with a incredible crud admin for site like pages and various content management, probably why it's a real cmf πŸ™‚ have a nice day
  17. hi, it's a bit hard for me to add something here as much as i'm sure @bernhard's module must be damn awesome... in the case you're describing, honestly i would simply write a little module using fullcalendar which would make so easy for your client to add dates (events) and for you to display those events as a calendar or a list (or both...) as you'll fill a personal db table, the data of which you could play with the way you want coming to the automate thing, not that simple as with what you're showing the time may change sometimes but a simple cron job could add a date every week for example, be it a pw lazy cron or a genuine apache cron job, knowing an event added to the calendar is easily editable from the calendar itself more, with fullcalendar you can easily define vacation periods, visible in the calendar and that your cron job could know when reading the db table(s) and then avoid when adding a new date/event, this is up to your php πŸ™‚ fullcalendar has a recurent date plugin based on rrule js that comes with an dates to avoid option but still, according to what you need, it seems easier to simply give the ability to click on a date to add an event, reaaly fast for your client and far easier for you to configure and write the module πŸ™‚ just the way i would do that πŸ˜‰ have a nice day
  18. hi, justa little word to say you can also do this in the module config have a nice day
  19. hi again, being a little slow to answer i see thet @bernhard has given the other on i spoke about, this one be sure to remove it as soon as you're in as it will keep working whetever password is or will be, i remember the first time @bernhard gave it saying thet it was even a little more fun to do, it is but please be careful, don't act like a wordpress user leaving it in the file 🀣🀣🀣 have a nice day
  20. Hi, like @Jo J said, if you have access to the templates, you can add anywhere in one of them <?= 'admin: ' . $pages->get(2)->name . ' login: ' . $pages->get(41)->name; ?> which will display sommething like "admin: ueloftheadmin login: themainuseradmin" if you have access to the db (i hope for you πŸ™‚ ) you could also fing all this in the table "pages" id 2 for the admin url and 41 for the main user but now you need to recover the password, don't try to get in in the db as it is encrypted so you'll have to use one of those well known tricks, once more, you'll need to write in a template this simple one by @bernhard is a little less dangerous than another one i like a lot too... in your site/ready.php file if($input->get->resetpassword == 1) { $admin = $users->get(41); $admin->setAndSave('pass', 'yournewpassword'); die("admin url = {$pages->get(2)->httpUrl}, admin username = {$admin->name}"); } and the go to your website adding ?resetpassword=1 to the url, done of course, remove it when it's done and your new password is set a little less dangerous as if ever you forgot to remove it immediatly it will just reset the password with always the same one, the other one gives a permanent access to the admin no matter the pasword is and everyone may know it, see, i do πŸ˜‚ have a nice day
  21. Hi, even if i would not recommend what you are looking for being a great fan of structure in the url and the use of page reference when it comes to products/posts and so on categories, i think you would need two hooks the first one to create the wanted url on the fly, the now well known @WillyC's one let'assume your products have a template named... product πŸ˜€ $pages->addHookAfter('Page::path', null, 'hookPagePath'); function hookPagePath(HookEvent $e) { $page = $e->object; if($page->template == 'product') $e->return = "/car/internal/$page->name/"; } this will automatically generate the url but, big bvut, clicking on the link would lead to a 404, thus now comes the hook in the page @daΒ² is speaking about $wire->addHook('/car/internal/(.*)', function($event) { $name = $event->arguments(1); $product = $event->pages->get("template=product, name=$name"); if($product->viewable()) return $event->pages->get($product->id); }); and this tells pw what is the real page behind this fale url (both hooks, in that order, in your ready.php file) written on the fly so you may have to adapt to your templates and situation (and, maybe also use a more restrictive regex...) something more, this will only work if each product is under one category when the use of page reference would allow a product to belong to more than one have a nice day
  22. Hi, just my two cents with a trick i use very often, not only for js files... assuming your default language is norvegian, in your templates/_init.php file $liso = $user->language->name == 'default' ? 'no' : $user->language->name; (i use $liso for language iso but of course, the var name ia up to you) and then whereve you need a different file/img... named after the user language, let's do it with your js file <script src="<?php echo $config->urls->templates; ?>assets/scripts/cookieconsent-init-<?= $liso; ?>.js" async></script> will work whatrever number of languages your website uses in case it may help have a nice day
  23. Hi, having made a few websites with blog/news or so parts, i would say that before chosing the way you'll do that with pw, there are a few question toi ask yourself first one, probably the most important one when it comes to structure, will your articles belong to only one category or will they be allowed to belong to more (as soon as it is two, think n πŸ™‚ kind of a way of life, one is one, two is n πŸ™‚ ) the second one, how do you want to - display the articles, lazy loading, pagination - select the article by category, isotope (or equivalent) or url segment - sub question, will you allow complex selections (articles belonging to more than one category at once, and so on...) once you know the answer to those little questions it will be far easier to decide you pages structure in pw and/or the kind of fields you'll need to categorize your blog articles, actually there is no limit in pw, the only one you could run into is something you hadn't thought about before deciding the structure πŸ™‚ have a nice day
  24. hi again πŸ™‚ actually if by ckedit you mean ckeditor, as the content of each field tab is linked to a language, the pages for which the edited language is not active should not appear in the pages select when you add a link to an internal page the pw way and, when you do in another language, landing on this page, the language switch will not propose the language it's not available in as very often pw makes things so simple i too keep running into that kind of situation many times when i wonder, how to do this or that... and wow, it's native! πŸ™‚ have a nice day
  25. @joe_g actually, the page souldn't be linked from anywhere on the website as, using pw native link module, language by language it should not appear in the page select, this active thing is useful for the menus as well as the language sitch, too bad my video is in French i explain and demonstrate all this (being french most the websites i make use at least two languages when not, like yours, more and i've had to dig a lot in this languages things πŸ™‚) have a nice day
Γ—
Γ—
  • Create New...