Jump to content

Roych

Members
  • Posts

    393
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Roych

  1. Hello Is there any update on SoundCloud textformatter module? I can't get it to work at all. I can't even install it? If I put it in modules I get error Parse Error: syntax error, unexpected '&' (line 117 of /home/ ----- /site/modules/TextformatterSoundcloudEmbed/TextformatterSoundcloudEmbed.module) Any other module for this or ... Thank you R
  2. Yees its working great now Only had to put the " : " on your code first line. No tracy debugger. Now I have bg image on all my pages and one custom settings page Thank you R
  3. Hello, I need some help with repeater images to show on another pages. I have a page called "settings" a template called "settings" and repeater with image field. I need to show that repeater on different pages, but somehow can't figure it out how to.. I have this atm ... <?php foreach($pages->get('template=settings')->BackgroundImages as $bck): ?> <?php $bckgimage = $bck->bgimage->first(); ?> <li><img data-fade='2000' src="<?php echo $bckgimage->url; ?>" alt="" /></li> <?php endforeach; ?> I searched the forum but no success :\ Any help is appreciated Thank you
  4. Yes, thank you this one is working perfectly Good to know this, wouldn't have found that one out myself. Thank you R
  5. Thank you for help I tried something similar, but had no luck. I tried your code It gave error than I realised one ")" was missing. But still not working, sadly. Nothing shows up. Any ideas? <?php if (date('d-m-Y') == date('d-m-Y', $single->Start_date)): ?> <div class='Danes-text'>TODAY!</div> <?php endif; ?> This is what I have now ... R
  6. Hello, I need you help again with this Everything is working fine but I need to put another line of text like "TODAY" if a date is today. <?php $events = $pages->find('template=calendar-post, limit=8, Start_date>=today, sort=Start_date'); ?> <?php if(count($events)): ?> <?php foreach($events as $single): ?> <!-- Event --> <li> <div class="date"> <span> <span class="day"><?php echo strftime("%d", strtotime($single->Start_date)); ?></span> <span class="month"><?php echo strftime("%h", strtotime($single->Start_date)); ?></span> <span class="year"><?php echo strftime("%Y", strtotime($single->Start_date)); ?></span> </span> </div> <div class="event-content"> <h6><a href="<?=$single->url?>"><?=$single->title?></a></h6> <ul class="event-meta"> <li><i class="fa fa-clock-o" aria-hidden="true"> </i> <?php echo strftime("%H:%M", strtotime($single->Start_date)); ?><sup><?= $out = __("h"); ?></sup></li> <!-- <div class='Danes-text'>TODAY!</div> --> </ul> </div> </li> <!-- /Event --> <?php endforeach; ?> <?php else: ?> <div style="font-size: 14px;margin-top:-15px;color: #63b2f5;"><?= $out = __("No upcoming events at this time!"); ?></div> <?php endif; ?> You can see where I wan't to put in the TODAY text. Can this be done? I tried if elseif else but no luck. Any ideas how can this be done? Thank you in advance R
  7. Hello, I like this but how do I use this within <?php foreach($page->downloadi as $download): ?> <a href="<?=$download->fajli->url ?>">Download</a><?=$download->Content ?> <?php endforeach; ?> I'm using pagetable field for adding my "downloads" Thank you R
  8. I agree completely. But still learning here, hehe. Thank you R
  9. Yes now it is working great. I got it working with my code also "I think". I used my version of code and put if-else inside like you've said and somehow works. <?php foreach($page->Slides as $Slides): ?> <?php $image = $Slides->images->first(); ?> <?php if ($Slides->Link): ?> <li data-transition="<?php echo $page->Slide_Effect; ?>" data-slotamount="7" data-link="<?=$Slides->Link ?>" data-target="_blank" > <img src="<?php echo $image->url; ?>" alt="<?php echo $image->description; ?>"> <div class="tp-caption" data-x="100" data-y="115" data-speed="700" data-start="1000" data-easing="easeOutBack"><h2><?=$Slides->title ?></h2></div> </li> <?php else: ?> <?php $image = $Slides->images->first(); ?> <li data-transition="<?php echo $page->Slide_Effect; ?>" data-slotamount="7" data-target="_blank" > <img src="<?php echo $image->url; ?>" alt="<?php echo $image->description; ?>"> <div class="tp-caption" data-x="100" data-y="115" data-speed="700" data-start="1000" data-easing="easeOutBack"><h2><?=$Slides->title ?></h2></div> </li> <?php endif; ?> <?php endforeach; ?> I will use your code ofc, shorter and probably better. Thank you very much R
  10. Thank you for reply I tried your suggestion but I get Parse Error: syntax error, unexpected 'endif' (T_ENDIF) ... Error. not sure what is wrong here Thank you R
  11. Hello, I need some help as I'm not a coder. I've created a slider from repeater which is working great. I need to make some slides with a link so I have created a "Link" field (also working) but now all my slides have links. The one with the new link is linking right but all others link to root. Basicaly what I need is if field is empty show this else this. ..;) I've tried with this: <?php if($page->Slides->Link): ?> <?php foreach($page->Slides as $Slides): ?> <?php // get the very first image from images list since image field is accepting multiple images (unless you change the value of `Maximum files allowed` under Fields > images > Details tab > Maximum files allowed). $image = $Slides->images->first(); ?> <li data-transition="<?php echo $page->Slide_Effect; ?>" data-slotamount="7" data-link="<?=$Slides->Link ?>" data-target="_blank" > <img src="<?php echo $image->url; ?>" alt="<?php echo $image->description; ?>"> <div class="tp-caption" data-x="100" data-y="115" data-speed="700" data-start="1000" data-easing="easeOutBack"><h2><?=$Slides->title ?></h2></div> </li> <?php endforeach; ?> <?php else: ?> <?php foreach($page->Slides as $Slides): ?> <?php // get the very first image from images list since image field is accepting multiple images (unless you change the value of `Maximum files allowed` under Fields > images > Details tab > Maximum files allowed). $image = $Slides->images->first(); ?> <li data-transition="<?php echo $page->Slide_Effect; ?>" data-slotamount="7" > <img src="<?php echo $image->url; ?>" alt="<?php echo $image->description; ?>"> <div class="tp-caption" data-x="100" data-y="115" data-speed="700" data-start="1000" data-easing="easeOutBack"><h2><?=$Slides->title ?></h2></div> </li> <?php endforeach; ?> <?php endif; ?> Not really working. Any help is appreciated. R
  12. Yes, exactly what I need It's working perfectly Thank you for the code, very useful. I was trying to do something like this but not realy good with PHP. R
  13. this should be the same as in the first code, I forgot to change it back as I was playing and trying all sorts of things. As I said I'm not a coder so I'm playing around, sorry for that So the first code is the one I'm using to show the events and all is working. All I need is to show the text if there is no upcoming events. Not sure how to put arjen's code together. thx R
  14. Hmm... I was to fast it's not working :/ I'm doing something wrong ... My whole original code looks like this: <?php foreach ( $pages->find('template=calendar-post, limit=8, Start_date>=today, sort=Start_date') as $single ):?> <!-- Event --> <li> <div class="date"> <span> <span class="day"><?php echo strftime("%d", strtotime($single->Start_date)); ?></span> <span class="month"><?php echo strftime("%h", strtotime($single->Start_date)); ?></span> <span class="year"><?php echo strftime("%Y", strtotime($single->Start_date)); ?></span> </span> </div> <div class="event-content"> <h6><a href="<?=$single->url?>"><?=$single->title?></a></h6> <ul class="event-meta"> <li><i class="fa fa-clock-o">&nbsp;&nbsp;</i> <?php echo strftime("%H:%M", strtotime($single->Start_date)); ?><sup><?= $out = __("h"); ?></sup></li> <li><i class="icons icon-location"></i> 340 W 50th St.New York</li> </ul> </div> </li> <!-- /Event --> <? endforeach; ?> I tried to work with your code but I'm doing it totaly wrong I guess :/ <?= $events = $pages->find('template=calendar-post, limit=8, Start_date>=today, sort=Start_date'); if (count($events)) { echo '<li>', '<div class="date">', '<span>', '<span class="day">{echo strftime("%d", strtotime($single->Start_date))}</span>', '<span class="month">{ echo strftime("%h", strtotime($single->Start_date))}</span>', '<span class="year">{ echo strftime("%Y", strtotime($single->Start_date))}</span>', '</span>', '</div>', '<div class="event-content">', '<h6><a href="<?=$single->url?>"><?=$single->title?></a></h6>', '<ul class="event-meta">', '<li><i class="fa fa-clock-o"> </i> <?php echo strftime("%H:%M", strtotime($single->Start_date)); ?><sup><?= $out = __("h"); ?></sup></li>', '<li><i class="icons icon-location"></i> 340 W 50th St.New York</li>', '</ul>', '</div>', '</li>'; } else { echo "<span style='font-size:12px;text-align:center;'>No upcoming events at this time!</span> "; } ?> If I just paste your empty code in I get Id's of articles like 1106|1107|1108 ... Thank you R
  15. It works, but if there is an upcoming event, it also shows me the id number of an event how do I get rid of it. And for multilanguage site I tried <?= $out = __('No events at this time.'); ?> but it's not working. (not that important atm) Thank you R
  16. Hello, The upper works like a charm but was wondering if it is somehow possible to add some text if there is no upcoming events. like (There is no upcoming events ...) So maybe some if else statements or something, I'm not a coder, but understand a little. I'm using Start_date>=today option from upper posts to show upcoming events. <?php foreach ( $pages->find('template=calendar-post, limit=8, sort=Start_date') as $single ):?> Thank you R
  17. Hello, any update on this or some new modules maybe. I tried this couple of times but somehow can't get this to work at all.. I'm new to PW but I think that there should be some module for this would be much easier for beginners ike me. I need this so that my "client" should see the clicks and other info like mr-fan image here Any help is appreciated Thank you. R
  18. Good to know, thank you R
  19. Oh, that easy, hehe. Works great Thank you very much, was struggling with that for some time before I decided to ask here. R
  20. Hello all I'm creating some simple events where every child is a new event. I have start date, content and image field assignet to them. Now I would ilke to show only an upcoming events. Only events that are still to come, so that events older than the (start date) are not shown. I tried to work with THIS but no luck as Im not a coder. Im showing all events like this now: <?php foreach ( $pages->find('template=calendar-post, limit=8, sort=Start_date') as $single ):?> <div class="calendar-block"> <a href="<?=$single->url?>"><h6 style="font-size: 14px;font-weight: 400;"> <img height="180" src="<?=$single->Slikces->first->url ?>" alt="<?= $single->Slikces->description->first ?>" style="margin-right: 10px; float: left; object-fit: cover;" width="220px"> <div class="naslovv"><b><?=$single->title?></b></div></h6> </a> <div class="ura-datum"> <span class="ime-dneva"><?php echo strftime("%A", strtotime($single->Start_date)); ?></span> | <i class="fa fa-calendar" aria-hidden="true"></i>&nbsp;&nbsp; <?php echo strftime("%d %B", strtotime($single->Start_date)); ?> <?php echo strftime("%Y", strtotime($single->Start_date)); ?> | <i class="fa fa-clock-o">&nbsp;&nbsp;</i> <?php echo strftime("%H:%M", strtotime($single->Start_date)); ?><sup>h</sup> </div> <div style="text-align:justify; color:inherit;padding-top:10px;padding-right:10px;"><?=$single->Content?></div><a href="<?= $single->url ?>" class="button read-more-button big button-arrow"><?= $out = __("Read more"); ?></a> </div> <? endforeach; ?> I'd like to show upcoming events on another template (homepage) as well. Any help greatly appreciated Thank you in advance R
  21. Hehe, congrats for 1001! R
  22. Woow, that was fast and works perfect. Very helpfull also, thank you R
  23. Hello, Im having some trouble hiding a <p> in my template if a checkbox is "checked". I have two fields "text field for a button" and "simple checkbox for hidding a text button field" with a dependency to hide button field if hecked. Now I need to hide that button in frontend if checked. It is a list of pages "blog like" with a read more button. Sometimes that button is not nessasary so I need an option to hide it on some articles. I tried with: (RemoveButton = Checkbox field - Text = Button text field) <?php if (strlen(trim($single->RemoveButton)) > 1): ?> <p><a button href="<?= $single->url ?>" type="submit" id="submit" class="btn btn-blue btn-effect"><?=$single->Text?></button></a></p> <?php endif; ?> I need to hide all that <p> somehow. Hope I wrote understandable. R
  24. Ok, I installed " MediaLibrary " Plugin and problem is solved I just have to upload images first in library and then I can select them in CKEditor R
  25. Hey I'm back here. I just noticed, that Now I can not upload new images into the ckeditor at all. I need to separate the image field and the Ckeditor somehow. I didn't expect this from PW at all. Very annoying actually. Thank you R
×
×
  • Create New...