Jump to content

vxda

Members
  • Posts

    169
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by vxda

  1. Hi, i think it would be nice to have some sort of assets base in admin panel. Once uploaded img or file coull be used multiple times on diffrent pages insted of uploading same files over and over. I imagine a button next to browse files, called choose file from base or something like that. Ty Regards Paweł
  2. HA! ... true <?php $videoFolder = $pages->find('parent=1051, limit=3'); $out =""; foreach($videoFolder as $videoItem){ $vidUrl = $videoItem->video; parse_str( parse_url( $vidUrl, PHP_URL_QUERY ), $my_array_of_vars ); $vidID = $my_array_of_vars['v']; $out .= "<div>"; $out .= "<a class='fancybox' data-fancybox-type='iframe' href='http://www.youtube.com/embed/{$vidID}?autoplay=1'><img src='http://img.youtube.com/vi/{$vidID}/0.jpg' alt='{$videoItem->title}' /></a>"; $out .= "<div class='name'><a href='http://www.youtube.com/embed/{$vidID}?autoplay=1'>{$videoItem->title}</a></div>"; $out .= "</div> "; } echo $out; ?> Ty alot
  3. i just did what u said, i dropped the module, now from admin panel i just enter the url for youtube movie and then i do this : <?php $videoFolder = $pages->find('parent=1051, limit=3'); $out =""; foreach($videoFolder as $videoItem){ $vidUrl = $videoItem->video; parse_str( parse_url( $vidUrl, PHP_URL_QUERY ), $my_array_of_vars ); $imgUrl = $my_array_of_vars['v']; $search = '/youtube\.com\/watch\?v=([a-zA-Z0-9]+)/smi'; $replace = "youtube.com/embed/$1?autoplay=1"; $vidUrl = preg_replace($search,$replace,$vidUrl); $out .= "<div>"; $out .= "<a class='fancybox' data-fancybox-type='iframe' href='{$vidUrl}'><img src='http://img.youtube.com/vi/{$imgUrl}/0.jpg' alt='{$videoItem->title}' /></a>"; $out .= "<div class='name'><a href='{$vidUrl}'>{$fotoItem->title}</a></div>"; $out .= "</div> "; } echo $out; ?> And thats it i got my video working Ty alot Adrian u ware most helpful
  4. Wow Ty Adrian. Im just trying to open embeded video in the fancybox popup window after clicking on thumb. Again thanks alot
  5. hi Adrian. cool i got the img Thank you. Now is there a way in module to get this youtube video id ? or do i have to do it with js ? thanks
  6. Ok i got it problem solved adding: if ($newsimg) { $newsimg = $newsimg->size(313,177)->url; } solved the problem so my code looks like this now : <?php $news = $pages->find("parent=1009"); $out =""; foreach($news as $newsitem){ $newsimg = $newsitem->images->first; if ($newsimg) { $newsimg = $newsimg->size(313,177)->url; } $out .= "<li><div><a href='{$newsitem->url}'>"; $out .= "<img src='{$newsimg}' alt='' />"; $out .= "{$newsitem->title}"; $out .= "{$newsitem->body}"; $out .= date("j.m.Y", $newsitem->created); $out .= "</a></div></li>"; } echo $out; ?> Thank you for help.
  7. @horst: Ty for a quick reply. i changed my code to this <?php $news = $pages->find("parent=1009"); $out =""; foreach($news as $newsitem){ $newsimg = $newsitem->images->first->width(313); $out .= "<li><a href='{$newsitem->url}'>"; $out .= "<img src='{$newsimg->url}' alt='' />"; $out .= "{$newsitem->title}"; $out .= "{$newsitem->body}"; $out .= date("j.m.Y", $newsitem->created); $out .= "</a></li>"; } echo $out; ?> and i still have this error. when i remove ->width(313) it picks the right picture and it all works, but without resizing img. what am i missing ? Thank you
  8. Hi guys, im totaly new to PHP and i cant figure out what im doing wrong here : <ul> <?php $news = $pages->find("parent=1009"); $out =" "; foreach($news as $news){ $pageimage = $news->images->first->width(313)->pimLoad('news')->pimSave()->url; $out .= "<li><a href='{$news->url}'>"; $out .= "<img src='{$pageimage}' alt='' />"; $out .= "{$news->title}"; $out .= "{$news->body}"; $out .= date("j.m.Y", $news->created); $out .= "</a></li>"; } echo $out; ?> </ul> and here is my error: <p class="error WireFatalError"> Error: Call to a member function width() on a non-object (line 9 of D:\xampp\htdocs\projects\chemik\site\templates\home\news.html) <br> <br> <em>This error message was shown because you are logged in as a Superuser. Error has been logged. </em> Ty.
  9. Hi thank you for such qucik answer. From code u give me i get this: test WINDOWS server for locales Preferred locale for english GB on this system is 'English_United Kingdom.1252' Friday 22 December 1978 Preferred locale for english USA on this system is 'English_United States.1252' Friday 22 December 1978 Preferred locale for german on this system is 'German_Germany.1252' Freitag 22 Dezember 1978 Preferred locale for spanish on this system is 'Spanish_Spain.1252' viernes 22 diciembre 1978 Preferred locale for dutch on this system is 'Dutch_Netherlands.1252' vrijdag 22 december 1978 Preferred locale for polish on this system is 'Polish_Poland.28592' pi�tek 22 grudzie� 1978 the last one is in polish but without polish chars. My code looks like this: echo "<div class='span2'>". "<div class='que'>{$e->que}<p>KOLEJKA</p></div>". "<div class='date'>{$e->date}</div>". "</div>". "<div class='span2'>". "<div class='team1'>". "<div class='pic'><img src='{$e->logo1->url}' alt='{$e->title}' /></div>". "<div class='name'>{$e->team_name1}</div>". "<div class='table'>w tabeli: <span>{$e->team_table1}</span></div>". "</div>". "<div class='versus'>VS</div>". "<div class='team2'>". "<div class='pic'><img src='{$e->logo2->url}' alt='{$e->title}' /></div>". "<div class='name'>{$e->team_name2}</div>". "<div class='table'>w tabeli: <span>{$e->team_table2}</span></div>". "</div>". "</div>"; My date is on the 4th row. what i need to do to get my date correct. Ty
  10. Hi, I have a problem with outputing months names in Polish language, Im using date filedtype, choosing date with datepicker and then outputing it in my template. i spend some times reading forums, in example this Topic: http://processwire.com/talk/topic/1751-cant-get-pw-to-output-german-month-names/ None of things work for me. in config.php $config->timezone = 'Europe/Poland'; in wire\modules\LanguageSupport\LanguageSupport.module if($locale != '0') setlocale(LC_ALL, 'pl_PL '); Still have english month names, what im doing wrong ? Regars Paweł
  11. Nope Nope ;/ still cant get it working ... it keeps filtering my class="" and style="".
  12. I found something in here : http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter but i cant wrap my head around it. Can this be the answer to my poblem? if it is how can i implement it to PW CKEditor. Cheers
  13. Hello, Is there a way to enable attributes in HTML tags such as class="" and style="" for CKEditor ?. Im building a website with alot of fields that can be edit from admin pannel, would be alot easyer if i could use CKEdit. Ty in advance
  14. Yep that did they job, problem solved. Thank you.
  15. Hi there, im new to PW, was trying to look for answer in forums but couldnt find any. My problem is with FormTemplateProcessor. Im creating fileds via Admin field options and one of my field is "select" im using this plugin -> Fieldtype: Select (AKA Drop Down) . In Field options i created 3 select option : option one option two option three In front end side i got my select showing up and it 3 options in it but they are empty like this: <select id="Inputfield_typeOfArea" name="typeOfArea"> <option value="" selected="selected"></option> <option value="option one"></option> <option value="option two"></option> <option value="option three"></option> </select> As you see value is correct but option tag is empty ;/ what im doing wrong ? Ty
×
×
  • Create New...