Jump to content

virtualgadjo

Members
  • Posts

    99
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by virtualgadjo

  1. hi, even it's a funny idea as - you'll be multiplying duplicate contents between this latest-article and... the latest article - the content of this latest-article will change quite often it's quite easy to achive, just use $pages->find with template and sort by -date (with your own field naming convention) to get the id of your latest article on top of the code and then use $pages->get(xxxx)->content and so on to display the latest article content/images/... in the page hope it helps have a nice day
  2. Hi all, as promised, i'm back πŸ˜€ here is a full translation for the last master release 3.0.200 https://github.com/virtualgadjo/pw30200-lang-fr yes i know, that was fast but, actually that's because i kept translating all "minor" releases from the last master one and i haven't seen any new sentence from the 3.0.199 in case it could be useful to anybody... have a nice day
  3. Hi, that's why it is strongly advised not to use closing php tags for php only files, a simple space after the closing tag is considered as an ouput and if it occurs before any php header il will return an error πŸ™‚ in case it may be useful have a nice day
  4. Hi, of course if ($page->content3 != '') // this only checks if the field has content but assumes it exists supposes that there is a field named content3 in the page, if it's possible that not then an explicit if (isset($page->content3) && $page->content3 != '') //verbose version πŸ™‚ that's one of the reason why when using markup regions for a website that have very different pages i often use the probably common sections in the _main.php file and a mainwrapper... wrapping the various fields that are more page specific in the page templates this allows my _main.php to have a little less logics and be a little more readable πŸ™‚ have a nice day
  5. @millipedia oh yes you're right, there are so many options, replace, append, optional that i often forget to quote all of them (and even sometimes to use... too much of a php by myself guy πŸ˜„ ) have a nice day
  6. hi, two simple ways to do this - i assume your sections are inside a id="mainwrapper" (just for the example, use the id you linke πŸ™‚ ) div in your page specific templates you can just use the sections you need, done... - the other way is to simply put every section inside a php if <?php if ( $page->content3 != '' ): ?> <section class="content3"> ... </section> <?php endif; ?> done πŸ™‚ have a nice day
  7. Hi, well, pw speaking, this is the simplest thing you can imagine πŸ™‚ actually, you won't need any module to realize what you describe, just page(s) and fields remember the pw way of thinking, everything is a page, so, just create a page upcoming dates which will have as many subpages you want, every subpage containing all the fields you need, date, title, description, tags, and so on, done you could even do the same thing with a simple page and a repeater field, each repeater element containing all those fields too, the only thing to keep in mind is the number of elements you'll need, if there is really a lot, maybe it will be faster to edit with subpage than with a repeater, if you're thinking about 20/50 upcoming dates, go for a repeater, everything will be in the upcoming dates page once you'll have done it, you won't believe how easy it was with pw πŸ™‚ have a nice day
  8. Hi, juste in case it would help, i nearly always add this maximize ability to ckeditor fields it adds a button to the field toolbar that allows you to write with a full screen field (very useful with heavy content pages...) you just have to go back to normal size to save but honestly, not really a problem have a nice day
  9. don't worry we have all made every kind of mistakes or omissions you can imagine at our turn... and solving them is the best way to learn and not forget again πŸ™‚ glad everything works fine now have a great pw trip πŸ™‚ and of course, have a nice day πŸ™‚
  10. hi, this makes me going back to what i was thinking πŸ™‚ is your website installed in a folder on your server, is there a domain aiming to this folder, have you installed pw using your domain (if any) what automatically fills the config file with the right config urls this being said, have a look to the bottom of your config file looking for this var $config->httpHosts = array('...') when you look at it, is the url the one you use to preview you website, if not your problem is here πŸ™‚ i must say i never run into this kind of issue as i always write my css, js and so on paths myself without the php part /site/assets/css/...css but if your config file url is the good one, in the source code you should see the right path to your website domain/site/templates/styles/main.css in fact, have look at what is in the config.php array and compare it with the path in the source code, you'll probably find a "slight" difference πŸ™‚ (usually on install, pw, checks if the folders that need to be are wirtable, a path to those folders should not return a 403 (nor a 404 by the way :)) have a nice day
  11. hi, honestly this kind of things is usually due to the path you've set to those css files (nothing to do with pw or not actually) a simple way for you to check, start emptying the cache (module page render) then look at the page source code and click on the css file link, you'll see if your run into a 404 or if you see the file source simple thing to take into account, this may depend on if you're working with a vhost/domain or juste pointing to your hosting root and if your links start with a root / or not hope it'll help haves a nice day
  12. Hi, @Jan Romero is right, if you only want to calculate the difference between two years, the first solution will work but, if you want to calculate the number of years between a specific date and today, then, as easy to achieve with php but switch to date_create() and date_diff() <?php $start = date_create('1980-07-01'); $today = date_create(date('Y-m-d')); $diff = (array) date_diff($today, $start); echo $diff['y']; the result will change every 1rst of July, a simple way to calculate an age and not only the difference between two years just print_r($diff) if you want to see how far you can go with what you get and could display with date_diff πŸ™‚ have a nice day
  13. well if you want a dynamic code depending on an entry, yes you will πŸ™‚ your hanna code tag could accept either [[count_years]] or [[count_year startyear="1920"]] in this case you can just start your hannacode with a default value $start = $startyear != '' ? $startyear : 1980; this way you cover both insertion, with and without attribute and my pleasure πŸ™‚ have a nice day
  14. Hi, the issue is not an Hannacode one but a simple php one try $start = 1890; // your attribute no need of strtotime $thisyear = date('Y'); $diff = $thisyear - $start; echo $diff; it should work have a nice day
  15. hi, honestly, hard to answer without seeing the whole page source code but you can bet that when this kind of thing happens you have somewhere either an unclosed tag (hence the whole page source code) or, and it happens more often than you could imagine, something like two body tags ("like" because it happens with a few other important tags too) just an example of when this kind of thing happens, using markupregions and forgetting an html head in another template than the _main.php => two html head and opening bodies => a little mess πŸ˜„ hope it may help looking for the issue origin have a nice day
  16. Hi, yes πŸ™‚ have a look at this blog post https://processwire.com/blog/posts/processwire-3.0.75-and-a-new-version-of-prodrafts/ have a nice day edited to say i should have clicked on your links before answering... so, just yes πŸ™‚
  17. hi, wow, of course, first thing to check out, i forgot, you're right πŸ™‚
  18. Hi, have you tried adding CreateDiv to CKeditor toolbar ? you'll find it in the field setting "input" tab => CKEditor settings this allows you not only to create div directly from the toolnar but will also keep yours if you wrote some in the source code hope it helps have a nice day
  19. Hi @Alkrav my pleasure and, wow, good idea a little search field when dealing with website with a lot of pages in my case i have three situations that help me not be lost in the matrix πŸ™‚ - when it comes to complex repeater in which i know i'll use many images, i put an image field in each repeater item (as they are pages, it works like a charm) - in the case you describe, the image field in the "parent page", well, not too long to select but here i admit i won't deny the use of a search field for big website or, simple way to prioritize this "parent" in the list page - when it comes to images i know i'm going to use in many pages i usually have a "stock page", hidden from the front side and the sitemap, in which i put some fields, default translations (with Ryan functional fields module), some default fields i'll use in many pages and... an image field i often give this page a loooong title that make it easy to find in the list πŸ™‚ but i like your search field idea, you should suggest it in the wishlist forum! Ryan may like that too πŸ˜„ have a nice day
  20. Hi @teppo thanks a lot for your insight, i was assuming something like that as it sounds very logical according to the pw "everything is a page" concept and us crazy devs are quite found of logics πŸ˜„ but thank you very much for the hook, it may help for clients who would be confused after a pw update and i'm sure @Alkrav will love it too πŸ™‚ have a nice day
  21. hi, actually this could be seen as a more strict pw way of thinking pages... each item of a repeater is a page by itself, that's what allows you to use the same fields many time in a "parent" page so far, pw repeater items ckeditor went browsing its parent page images but imagine you had an image field in the repeater item, the problem would be the same but inverse i know we can tell a ckeditor field which field to go looking for images but, in a repeater, you would have as many of this image field with the same name as you have repeater items and, have a look at the item name, a little harder to find it in a list of pages than the parent page the repeater is in i think this is the reason for this little change of behaviour have a nice day
  22. Hi @stanoliver in this case, i remember an old post that may help you adapt the code to your own need it does, at least visually, exactly what you are looking for bernhard added a more recent solution that may worth a look (like everything this guy writes here πŸ™‚) have a nice day
  23. hi, i don't know when it come to a slogan but if you need a function button or a dropdown with a series of actions behind each link, it's quite easy to do this with a module it won't go before the save button but will be easily visible in the top menu bar like in this french website i've made in case it helps πŸ™‚ have a nice day
  24. Hi @joe_g great, good to hear everything works fine πŸ™‚ you'll see, in certain cases you'll also have to use a personal config.js file for your ckeditor but usually pw does the job without help πŸ™‚ have a nice day
  25. @Mika Hi, don't be confused by this char length thing about the page title, it actually concerns the page title tag not the title of the page the title tag is not a native pw field and and would not advise you to use the page title for both things as far as SEO is concerned, google indeed said that the first 60/65 chars are really useful (taking into account that the more a word is at the beginning the stronger it is in a title tag, you don't make a keywords list but you are not too literary either and you wouldn't like your displayed page title to look like this tag πŸ™‚ have a nice day
Γ—
Γ—
  • Create New...