Jump to content

virtualgadjo

Members
  • Posts

    99
  • Joined

  • Last visited

  • Days Won

    1

virtualgadjo last won the day on January 17 2021

virtualgadjo had the most liked content!

Recent Profile Visitors

1,221 profile views

virtualgadjo's Achievements

Full Member

Full Member (4/6)

58

Reputation

  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
Γ—
Γ—
  • Create New...