Jump to content

Roych

Members
  • Posts

    384
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Roych

  1. hello this is my first time using this module, work great but I'm not sure how should my year, month templates look like. My php is not so good, would appreciate some help here. I would like to post some articles from that "month, year", maybe a title an image and some short text. my year template name is blog-articlelist-year.php and month blog-articlelist-month.php Thank you very much R
  2. Yep, still using it on some sites and works great. ? love PW ...
  3. Yes this one works great. Thank you very much. ? R
  4. Ok i think I got it if there is something wrong, please correct me. Im just postponing this one for one day. Im using the today code wich is gone the second day and next day this one shows. first day: <?php if (date('d-m-Y') == date('d-m-Y', $single->getUnformatted('Start_date'))) : ?> <div class='Danes-text'>TODAY!</div> <?php endif; ?> Next day: <?php if( date('Ymd', time() + 86400) >= date('Ymd', $single->getUnformatted('Start_date')) AND date('Ymd', time() + 86400) <= date('Ymd', $single->getUnformatted('End_date')) ) { echo "<div class='Dates-text'>ONGOING!</div>"; } ?> it looks like it is working on my test events. ? R
  5. that was fast ? It works, is this maybe possible to combine this with the TODAY also? So if event is only one day it would say TODAY if more than one day ONGOING but the first day would stil say Today. Thank you R
  6. Hello, I'm working on a event calendar and so far everything works fine. But I would like to show some text (Still ongoing!) if an event last more than one day. right now I have a text for events that starts today, but would be great if I could implement this also. Im using this to show TODAY text for my events. I have two datetime fields caled (Start_date and End_date) for start and end of events (normal not publish_from & until). <?php if (date('d-m-Y') == date('d-m-Y', $single->getUnformatted('Start_date'))) : ?> <div class='Danes-text'>TODAY!</div> <?php endif; ?> I would like to somehow combine this with events that last more than one day. I'm not good with php so I need your help. I was playing with the code below, but not sure what I'm doing here ... ? <?php $startDate = date('d-m-Y'); $startDate=date('d-m-Y', $single->Start_date); //echo $startDate; // echos today! $eventDateBegin = date('d-m-Y', $single->Start_date); $eventDateEnd = date('d-m-Y', $single->End_date); if (($startDate > $eventDateBegin) && ($startDate < $eventDateEnd)){ echo "is between"; }else{ echo "NO GO!"; } ?> I hope u understand what I mean. Thank you R
  7. Thank you, made it work using So far so good. ? Thank you R
  8. Hello, This was probably already asked, but can't find something like this on the forum. Im having some problems adding some extra html to the menu. I'm using <?php $menu = $modules->get('MarkupMenuBuilder'); $options = array( 'wrapper_list_type' => 'ul',// ul, ol, nav, div, etc. 'list_type' => 'li',// li, a, span, etc. 'menu_css_id' => 'menu-main-menu-1',// a CSS ID for the menu 'menu_css_class' => 'menu',// a CSS Class for the menu 'submenu_css_class' => 'sub-menu',// CSS Class for sub-menus 'has_children_class' => '',// CSS Class for any menu item that has children 'first_class'=>'',// CSS Class for the first item in 'last_class' => '', 'current_class' => 'active', 'default_title' => 0,// 0=show saved titles;1=show actual/current titles 'include_children' => 4,// show 'natural' MB non-native descendant items as part of navigation 'm_max_level' => 1,// how deep to fetch 'include_children' 'current_class_level' => 1,// how high up the ancestral tree to apply 'current_class' 'default_class' => '',// a CSS class to apply to all menu items ); echo $menu->render(1032, $options); ?> as my menu which is working great, but for the mobile menu I need to add extra <span class="toggler"></span> to the parrent so the html will look like this: <li> <a href="#">Home</a><span class="toggler"></span> <ul class="sub-menu"> <li><a href="#">Sub Menu 1</a></li> <li><a href="#">Sub Menu 2</a></li> <li><a href="#">Sub Menu 3</a></li> <li><a href="#">Sub Menu 4</a></li> </ul> </li> Is it possible to achieve this somehow? Thank you R
  9. Was this solved? Im having the same issue. Everything looks fine but the home page SEO won't update. Even if I post link through Facebook. All othes pages and suppages work fine. Looking through source all is there and looks fine. Any ideas? Thank you R
  10. Hello yes ... ? It works great now. This way I can put double quotes back, so my code is back to original html. Thank you very much ? R
  11. Hello, Im having some problem translating some words in if/else statement. my code: <?php if ($single->fajli->url){ echo " <span <span class='big'>>Velikost: <?= $out = __('Size:'); ?></span><br> <span>{$single->fajli->filesizeStr}</span>"; } else{ echo "<span class='big'><?= $out = __('link:'); ?></span>"; } ?> but expl.: <?= $out = __('Size:'); ?> is not working. It wont show up in frontend nor in my backend, what am I doing wrong? My php is not that good ... I also looked all over the forum but no luck. Thank you R
  12. thanks for answers, I got it. It was a repeater, and had no image in it. I somehow made two of the same repeater field and somehow lost one which had no image in it. I deleted the field and it's fine now. Thank you all R
  13. Hello, What is wrong here, Im getting an error. It works but tracy shows error on first line. <?php foreach($pages->get('/home/')->ozadje_strani as $bck): ?> <?php $image = $bck->bgimage->first(); ?> <img src="<?=$image->url; ?>" alt="<?=$image->description; ?>" /> <?php endforeach; ?> PHP Warning: Invalid argument supplied for foreach() ... Thank you R
  14. Hello, Im back here. All is working nice on a simple site, but I'm working on a Multilanguage site and Page reference field won't show anything on different language, but works normal in default. Im using the <?php echo $single->categories->implode(' ', 'name') ?> for the name of the category (page reference field). Am I missing something or ... Thank you. R
  15. Thank you, forgot about the first post, lol ? R
  16. Hello, I'm having trouble creatin a menu. It wont work I tried all sorts of things here, I just got lost, not sure what to do to make it work. The original HTML looks like this: It looks simple but Im out of ideas ? <ul class="nav navbar-nav"> <li class="dropdown active"> <a href="index.html">Home</a></li> <li class="dropdown"> <a href="index.htm#" data-toggle="dropdown" class="dropdown-toggle js-activated">Contact<b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="room-list.html">Contact 1</a></li> <li><a href="room-detail.html">Contact 2</a></li> </ul> </li> </ul> tried with: 'parent_class' => '', 'current_class' => 'active', 'has_children_class' => 'dropdown', 'levels' => true, 'levels_prefix' => 'level-', 'max_levels' => null, 'firstlast' => false, 'collapsed' => false, 'show_root' => true, 'selector' => 'template!=', 'selector_field' => '', 'outer_tpl' => ' <ul class="nav navbar-nav">||</ul>', 'inner_tpl' => '<ul class="dropdown-menu">||</ul>', 'list_tpl' => '<li%s>||</li>', 'list_field_class' => '', 'item_tpl' => '<a href="{url}" data-toggle="dropdown" class="dropdown-toggle js-activated">{title}</a>', 'item_current_tpl' => '<a href="{url}">{title}</a>', 'xtemplates' => '', 'xitem_tpl' => '<a href="{url}">{title}</a>', 'xitem_current_tpl' => '{title}', 'date_format' => 'Y/m/d', 'code_formatting' => false, 'debug' => false It won't work. and not sure how to put the dropdown <b class="caret"></b> inside also. Please any help is appreciated. Thank you R
  17. Hehe, couldn't agree more, backup already done. ? R
  18. Ok, somehow I've managed to get it working again. Fortunately, I found one old DB on a server that was left from latest upgrade. Did a fresh install, copied site folder and this DB and it worked. With some work and some text copying site is back and working again. Not sure why this happened and hope it wont happen again. New site is now here: http://barbsart.si/new/ Thank you all for helping, couldn't do it without your advices here. R ?
  19. thank you for link, but none of that resolved my issue. Not sure what to do anymore. ?
  20. not sure how to do that? Do I add this line "useRoles":1 in admin.php or ..? (tried, still not working)
  21. Just checked and I get the same error on my local wamp server. Site itself works great but get 404 on admin. Any ideas? ?
  22. Installed in subfolder again, not sure but it shouldn't be a problem. I've never encountered this problem before.
  23. I installed a fresh copy of PW and copy the old SITE folder and old DB but the same problem occures!
  24. I have it installed. I get [2018-05-21 15-17-19] PHP Notice: Trying to get property of non-object in ..../novo/site/templates/cenik.php:20 @ http://barbsart.si/novo/si/cenik/ [2018-05-21 15-17-20] PHP Notice: Trying to get property of non-object in ..../novo/site/templates/settings.php:2 @ http://barbsart.si/novo/si/nastavitve/ Not sure what this means ? all looks fine on those files and was working great until now. I will try ti install a fresh copy and copy the site folder and DB and hope this will fix the problem. I'll get back if all goes well. Thank you. R
×
×
  • Create New...